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
Unconfigured Ad
Collapse
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:
I'm trying to make a loop like: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
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!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 SEQadmin2
Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.
There is no single reason why many patients don’t respond to treatment as expected. Cancer is...-
Channel: Articles
Today, 05:17 AM -
-
by GATTACATLove this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
-
Channel: Articles
07-01-2026, 11:43 AM -
-
by SEQadmin2
I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.
Here are nine questions we think about, in roughly the order they matter, before...-
Channel: Articles
-
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, Today, 10:08 AM
|
0 responses
6 views
0 reactions
|
Last Post
by SEQadmin2
Today, 10:08 AM
|
||
|
Started by SEQadmin2, Yesterday, 11:05 AM
|
0 responses
7 views
0 reactions
|
Last Post
by SEQadmin2
Yesterday, 11:05 AM
|
||
|
Started by SEQadmin2, 07-02-2026, 11:08 AM
|
0 responses
30 views
0 reactions
|
Last Post
by SEQadmin2
07-02-2026, 11:08 AM
|
||
|
Started by SEQadmin2, 06-30-2026, 05:37 AM
|
0 responses
28 views
0 reactions
|
Last Post
by SEQadmin2
06-30-2026, 05:37 AM
|
Leave a comment: