Check if input BAM file generated by fgbio consensus calls on UMIs.

    Identify these by lack of duplicated reads.
    This is useful for pre-aligned consensus BAMs feeding into octopus.

def _is_umi_consensus_bam(in_file):
    """Check if input BAM file generated by fgbio consensus calls on UMIs.

    Identify these by lack of duplicated reads.
    This is useful for pre-aligned consensus BAMs feeding into octopus.
    """
    cmd = "samtools view -h %s | head -500000 | samtools view -c -f 1024"
    count = subprocess.check_output(cmd % in_file, shell=True)
    return int(count) == 0