BAM file comparison
3
1
Entering edit mode
6.4 years ago
Hadeel ▴ 10

Hello Biostarers. I am trying to compare BAM files for similarity. I am doing this to assess alignment from different pipelines. Is there a quick straightforward way to do this?

alignment BAM • 5.3k views
ADD COMMENT
1
Entering edit mode

What exactly are you trying to compare in them? Do you want to compare each alignment or just come up with a correlation score?

ADD REPLY
0
Entering edit mode

I want to assess how similar the alignments are from files for the same sample but from different pipelines. An overall correlation score would be enough I guess.

ADD REPLY
4
Entering edit mode
6.4 years ago
Botond Sipos ★ 1.7k

The wub package has a script for comparing BAM files. It does a coarse comparison of alignments (checks whether the start position of the alignments is close enough) and also calculates a "consistency score" (the fraction of bases which align the same way).

The package also has a simple long read simulator, which can give you the "true" alignments in SAM format.

ADD COMMENT
3
Entering edit mode
6.4 years ago
Hussain Ather ▴ 990

You could try using bamcoverage from deeptools to convert them to bigwig files and then visualizing them using IGV or UCSC Genome Browser.

ADD COMMENT
2
Entering edit mode
6.4 years ago

From BAM files, the simplest route would be multiBamSummary followed by plotCorrelation from deepTools. If you want a bit finer grained control, then you can use bamCoverage and the multiBigwigSummary before plotCorrelation instead. Full disclosure: I'm one of the deepTools authors.

ADD COMMENT
0
Entering edit mode

I'm looking to do something similar, but instead comparing bam-files of the same input reads mapped to different assemblies to see the fraction of reads mapping to all assemblies. I was thinking to pull out the names of all mapped reads from each bam-file and then maybe simply make a venn-diagram of the lists, but could I use deepTools for this perhaps?

ADD REPLY
1
Entering edit mode

I've never implemented anything in deepTools that would be useful for this, sorry.

ADD REPLY

Login before adding your answer.

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