Entering edit mode
4.3 years ago
sarastrafella.ss
▴
20
hi everyone! I've a problem with output directory with bwa mem. this is my code for multiple fastq files:
for file in ./*.fastq;
do
bwa mem hg19_index ${file} > ${file%.fastq}.sam
done
I want to put the output .sam files in another directory so I wrote:
for file in ./*.fastq;
do
bwa mem hg19_index ${file} > path_to_output_directory/${file%.fastq}.sam
done
but it dosen't work! :( bwa mem puts the output files in the same directory of hg19_index files!
what is wrong? thank you!
is your path a valid system path?
"path_to_output_directory" is the absolute path. I tried with with two or three files and it works
is it possible that bwa wants fastq and sam in the same folder?
BWA uses the STDOUT stream, so the location is not defined by the program
It may not resolve the issue, but you should soft-quote your variables (
" "
).