This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Read Mapping with BWA mem with a bunch of files

I have 100 sequences that need to map on the reference genome. I use "bwa mem <reference file.fasta=""> <file1.fastq> > file1.sam

how can I perform all those 100 sequences file quickly? i don't really want to do it one by one, match 100times....

next-gen

1 answer

for i in *.fastq
  do 
  bwa mem reference $i > ${i%.fastq}.sam
  done

Please also use the search function, this has been asked many times before. Please get a background in looping (for loops in bash) or more advanced the use of GNU parallel.

Log in to answer this question.