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
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
Loop in bwa commands
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
Latest Articles
Collapse
-
by seqadmin
The complexity of cancer is clearly demonstrated in the diverse ecosystem of the tumor microenvironment (TME). The TME is made up of numerous cell types and its development begins with the changes that happen during oncogenesis. “Genomic mutations, copy number changes, epigenetic alterations, and alternative gene expression occur to varying degrees within the affected tumor cells,” explained Andrea O’Hara, Ph.D., Strategic Technical Specialist at Azenta. “As...-
Channel: Articles
07-08-2024, 03:19 PM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Yesterday, 06:46 AM
|
0 responses
9 views
0 likes
|
Last Post
by seqadmin
Yesterday, 06:46 AM
|
||
Started by seqadmin, 07-24-2024, 11:09 AM
|
0 responses
24 views
0 likes
|
Last Post
by seqadmin
07-24-2024, 11:09 AM
|
||
Started by seqadmin, 07-19-2024, 07:20 AM
|
0 responses
159 views
0 likes
|
Last Post
by seqadmin
07-19-2024, 07:20 AM
|
||
Started by seqadmin, 07-16-2024, 05:49 AM
|
0 responses
127 views
0 likes
|
Last Post
by seqadmin
07-16-2024, 05:49 AM
|
Leave a comment: