Question: bwa mem on a bam file
0
gravatar for vimartin
3.4 years ago by
vimartin30
France
vimartin30 wrote:

Hi,

I'm trying to use bwa mem for the first time and I wonder, is it possible to run it on a bam file instead of a fastq file? I noticed that bwa aln can be runned on bam file using '-b' but this option is invalid for bwa mem. The manual does not mention whether it is possible or not. I tried to simply run bwa mem on bam file and the output seems to be a header only sam file.

Does anyone has experience on the question?

 

Thanks in advance.

 

bam ngs bwa-mem • 4.3k views
ADD COMMENTlink modified 2.0 years ago by Biostar ♦♦ 20 • written 3.4 years ago by vimartin30
3
gravatar for vimartin
3.4 years ago by
vimartin30
France
vimartin30 wrote:

Ok, I should have wait I guess. Finally I found the answer which is : no.  This was detailed in the mail archive announcing the release of bwa mem. I put it as an answer in case someone else ask himself the same question.

http://sourceforge.net/p/bio-bwa/mailman/message/30527151/

ADD COMMENTlink written 3.4 years ago by vimartin30
2

you could try piping samtools fastq (former samtools bam2fq) to bwa and save both disk and time:

samtools fastq reads.bam | bwa mem -p ref.fa -
ADD REPLYlink modified 16 months ago • written 16 months ago by Jorge Amigo10k
1

you could use samtofastq from Picard to convert your bam to fastq prior BWA mem alignment.

ADD REPLYlink written 3.4 years ago by Nicolas Rosewick6.5k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 741 users visited in the last hour