BWA Alignment
1
0
Entering edit mode
2.3 years ago
sara • 0

i'm trying to make bwa i have multiple fastq files and want output of multiple sam files, however, the line does snot seem to work efficiently as it outputs all the data in only the first sam file.

for i in *.fastq.gz; do bwa mem bwaIndex/Homo_sapiens.GRCh38.dna_sm.chromosome.22.fa "$i" > $i.sam; done

how can i solve this probelm ?

Alignment BWA • 843 views
ADD COMMENT
1
Entering edit mode
2.3 years ago
GenoMax 142k

Is this data paired end or single end?

Past threads of interest:
Running BWA mem in a for loop
How to run BWA or the other aligner for paired .fastq in a bash loop and pipeline?

ADD COMMENT
0
Entering edit mode

single data

ADD REPLY
0
Entering edit mode

I tried the lines in the links nothing seem to work, the output is added to the first file.

ADD REPLY
1
Entering edit mode

Since you don't show what you actually tried you can see if it was anything like this:

for fastq in *.fq.gz
do
bwa mem bwaIndex/Homo_sapiens.GRCh38.dna_sm.chromosome.22.fa $fastq > ${fastq%.*}.bam 
done
ADD REPLY
0
Entering edit mode

I tried this line and worked for me, thank you

ADD REPLY

Login before adding your answer.

Traffic: 1135 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6