Hi, I'm trying to align my reads to a reference genome using the bwa alignment. I used this command wherein I already specified the path for my BWA folder ("path_bwa"):
system(paste(path_bwa, "/bwa aln -t ", proc, " ", genome, " FASTQ_FILTERED.fq > ", file_sai, sep=""))
However, it always shows this error: sh: /Applications/bwa/bwa: No such file or directory
Somehow, I think it assumes that the "/" in the "/bwa aln -t " is a directory and it is trying to look for it.
I tried deleting the "/" and just put "bwa aln -t " but it still doesn't work. Do you have any idea on what's wrong with the code?
Thank you so much for your help. It will be greatly appreciated.
Best, Carla
citing OP on twitter :
I can easily invoke my BWA program by using full paths like this:
What is the value of
path_bwa
andproc
?In addition to all comments on why do you want to wrap this on R, are you sure you want to use
bwa aln
?bwa mem
is the recommended algorithm for most uses, unless your reads are really short, bellow 70bp.1) why R ? why ? why ? why not a good-old bash/shell script ?
2) sounds like a path problem. check
paste(path_bwa, "/bwa
. What is the output ofand
just curious why you don't do it in shell? And whether it's working in shell?
...or why not use one of the many fine pipeline frameworks actually designed for this?