The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GenOO::Data::File::SAM::MDZ - Role - The MD:Z tag in a SAM file

SYNOPSIS

    This role when consumed requires specific attributes and provides
    methods to extract information from the MD:Z tag.

DESCRIPTION

    The cigar string does not usually contain information regarding the deletions.
    For this the MD:Z tag is usually provided. 
    
    MD:Z -> String for mismatching positions. Regex: [0-9]+(([A-Z]|\^[A-Z]+)[0-9]+)
    
    The MD field aims to achieve SNP/indel calling without looking at the reference.
    For example, a string `10A5^AC6' means from the leftmost reference base in the
    alignment, there are 10 matches followed by an A on the reference which is 
    different from the aligned read base; the next 5 reference bases are matches
    followed by a 2bp deletion from the reference; the deleted sequence is AC;
    the last 6 bases are matches. The MD field ought to match the CIGAR string.

EXAMPLES

    # Get the location information on the reference sequence
    $obj_with_role->mismatch_positions_on_reference_calculated_from_mdz; # (534515, 534529, ...)