![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Where is alignment score when using bwa aln and sampe commands are used ? | hxlei | Bioinformatics | 0 | 09-21-2016 08:11 AM |
filtering - find-if commands | frz | Bioinformatics | 3 | 01-23-2014 03:15 PM |
BowTie 1 Commands ? | Arupsss | Bioinformatics | 0 | 06-21-2012 09:54 AM |
Run hundreds of BWA commands without waiting | CNVboy | Bioinformatics | 5 | 06-14-2011 06:40 PM |
testing bwa with 454 hsap data: infinite loop on sam generation? | drio | Bioinformatics | 2 | 10-24-2009 11:33 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Junior Member
Location: Utah Join Date: Nov 2019
Posts: 1
|
![]()
Hiya,
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 |
![]() |
![]() |
![]() |
#2 |
Junior Member
Location: Beirut, Lebanon Join Date: Sep 2016
Posts: 2
|
![]()
You can do the following:
for f in /Users/xxx/Desktop/Index_align/Fastq/fastq_run4/*.fastq.gz; do name=$(basename $f _L001_R1_001.fastq.gz) bwa sampe /Users/xxx/Desktop/Index_align/GRCh37_latest_genomic.fna \ ${name}_L001_read1.sai ${name}_L001_read2.sai \ ${name}_L001_R1_001.fastq.gz ${name}_L001_R2_001.fastq.gz > ${name}_aln.sam done |
![]() |
![]() |
![]() |
Tags |
bash loop, bwa, multiple bwa input files, python loop |
Thread Tools | |
|
|