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?
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?
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.
You could try using bamcoverage from deeptools to convert them to bigwig files and then visualizing them using IGV or UCSC Genome Browser.
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.
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?
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
What exactly are you trying to compare in them? Do you want to compare each alignment or just come up with a correlation score?
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.