What is the best way to re-align a .bam file?
1
0
Entering edit mode
4.4 years ago
ilykos ▴ 10

I need to know exactly what reference genome was used to align a file, so I am looking for a way to de-align and re-align an existing .bam.

Could you suggest a correct way to do this? Is my original approach of going from .bam -> .fastq -> .sam -> .bam feasible?

Is there any loss of information?

P.S. At the moment I am using samtools bam2fq.

bam fasta fastq samtools • 3.2k views
ADD COMMENT
1
Entering edit mode

I used ngs-bits BamToFastq, but bedtools bamToFastq should work just as good for .bam -> .fastq.

I would not expect a loss of information unless you've filtered out unmapped reads from your bam files. Also hard clipping can create a problem - but more knowledgable people may answer better.

ADD REPLY
4
Entering edit mode
4.4 years ago

Bazam has been developed precisely for this purpose.

ADD COMMENT
0
Entering edit mode

Just tested bazam and it works great. Thanks a lot!

ADD REPLY

Login before adding your answer.

Traffic: 1672 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