I am trying to call peaks of my data using macs2.
macs2 being linux command, and since I am doing everything in R, I gave this command :
system("macs2 callpeak -t /home/sidrah19220/IP/rawfile/aligned/rsubread_sorted.bam -c /home/sidrah19220/IP/rawfile/aligned/rsubread2_sorted.bam -n peak")
But it is giving error in R as :
sh: 1: macs2: not found
Warning message:
In system("macs2 callpeak -t /home/sidrah19220/IP/rawfile/aligned/rsubread_sorted.bam -c /home/sidrah19220/IP/rawfile/aligned/rsubread2_sorted.bam -n peak") :
error in running command
However, the same command is running on terminal. Please help what could be the reason for the same.
try to use the full path to macs2