Hiya,
I'm trying to loop multiple input files with matching prefixes and different file types in bwa sampe ; here's the general structure:
I'm trying to make a loop like:
Does anyone have suggestions for what I am missing? Like perhaps I need to create a list of the prefix file names? I would greatly appreciate any advice. Thanks!
I'm trying to loop multiple input files with matching prefixes and different file types in bwa sampe ; here's the general structure:
Code:
bwa sampe /Users/xxx/Desktop/Index_align/GRCh37_latest_genomic.fna H2_S16_L001_read1.sai H2_S16_L001_read2.sai \ H2_S16_L001_R1_001.fastq.gz H2_S16_L001_R2_001.fastq.gz > aln_H2_S16_L001.sam
Code:
for i in /Users/xxx/Desktop/Index_align/Fastq/fastq_run4/ \ do bwa sampe /Users/xxx/Desktop/Index_align/GRCh37_latest_genomic.fna \ $i\-read1.sai $i\-read2.sai $i\-R1_001.fastq.gz $i\-R2_001.fastq.gz > $i\-aln.sam; done
Comment