Hi every one i was trying to mapping multiple fastq files with multiple references in a single batch mode. for this i did like this
# make an index of our all resequences file
for file in ./*.fasta
do
echo $file
bwa index $file
done
#Now take two fastq file and start bwa mem for mapping
for read in./*.fastq
do
echo $read
bwa mem $file $name $name > $aln.sam
done
The problem here for input two fastq file one after another. for example my .fastq file name like this
ResetH16_S2_L001_R1_001.fastq
ResetH16_S2_L001_R2_001.fastq
Only difference in R1/R2 can anyone help me for this coding how can i take input two file one after another according to name
Thank you advance.
yes you are right it is not working as a like .Please let me know the solution. its not generating the .sam file
The general idea is something like:
Or something like that, since I can't really test things perfectly. The
s/_R1_.\+//
thing, in case you're not familiar with regular expressions, means "search for a portion that starts with '_R1_' and replace everything from there to the end of the input with nothing (i.e., delete it)".Oh, I should also mention that you likely don't need the repeated "./" stuff.
Thanks for help but still some error could you please help me out :
Yeah, the unneeded "./" are mucking things up. Just:
That's a bit more likely to work.
Thank you so much ....