DIFF_BAMS(1)

NAME
diff_bams.pl - Compares two BAM/CRAM files irrespective of irrelevant header file differences.

SYNOPSIS
diff_bams.pl 1.bam 2.bam
  or diff_bams.pl -a 1.bam -b 2.bam

It is rare that BAM files can be compared via MD5 due to various processing information being incorporated into the header such as input/output paths. This program works around this by only comparing relevant information such as:

  1. Same number and order of @SQ headers.
  2. All reads are in same order.

You are able to compare a BAM vs it's corresponding CRAM

  Required parameters:
    -bam_a    -a    The first BAM|CRAM file.
    -bam_b    -b    The second BAM|CRAM file.

  Other:
    -ref      -r    Required for CRAM, genome.fa with co-located fai.
    -count    -c    Count flag differences
    -skipz    -s    Don't include reads with MAPQ=0 in comparison
    -help     -h    Brief help message.
    -man      -m    Full documentation.

  Run with '-m' for more detail

OPTIONS

-bam_a
    A valid readable BAM file

-bam_b
    A valid readable BAM file (different to bam_a)

-skipz
    As reads with MAPQ zero can end up in multiple locations don't consider them as a mismatch.

-help
    Print a brief help message and exits.

-man
    Prints the manual page and exits.