bamcmp is a command-line tool for comparing two alignment files that contain the same alignment data. For example,
two alignments that are in BAM and SAM format, or BAM and CRAM format.
To install the command, first ensure you have Python 3.7 or above installed. Then, run:
python3 -m pip install git+https://github.com/TMiguelT/BamCmpOnce you install this package, you will have the bamcmp command available.
The full command line interface, including additional flags, is listed here:
usage: bamcmp [-h] [--reference REFERENCE] [--ignore-tags] [--sort-tags]
bam_a bam_b
positional arguments:
bam_a
bam_b
optional arguments:
-h, --help show this help message and exit
--reference REFERENCE
Path to reference fasta file, needed for CRAM
alignments
--ignore-tags Ignore the optional tags section for each segment
--sort-tags Sort tag dictionary before comparing, meaning that
alignments with differently ordered tags will still be
considered identical