def get_perfect_coverage(Alignments, identifier, start, end):
    """
    Returns number of reads with a full alignment (CIGAR: readLengthM )
    in the intervall chromsome:start-stop
    Alignments is an instance of a pysam.AlignmentFile
    """
    
    perfectCoverage=0
    for read in Alignments.fetch(reference=identifier, start=start, end=end):
        #check for reads that match over the whole length with no mismatches
        if read.cigarstring=='{}M'.format(len(read.query_sequence)) and\
        read.get_tag('NM') <2:
            perfectCoverage+=1
        
    return perfectCoverage