def get_mapping_q_vect(alignments_handle, contig, pos, radius=150):
    'Obtain histogram of mapping qualties, clipped at 60\n\n     Args:\n        alignments(pysam.AlignmentFile) : Handle to alignmentfile\n        contig(str) : contig\n        pos(int) : zeros based position of location to check mapping qualties\n        radius(int) : radius to check around selected location\n\n    Returns:\n        mapping_qualities(list) : Histogram with 7 bins (0 to highest mapping quality)\n    '
    mapping_qualities = ([0] * 7)
    for read in alignments_handle.fetch(contig, (pos - radius), (pos + radius)):
        mapping_qualities[min(60, int((read.mapping_quality / 10)))] += 1
    return mapping_qualities
Obtain histogram of mapping qualties, clipped at 60

 Args:
    alignments(pysam.AlignmentFile) : Handle to alignmentfile
    contig(str) : contig
    pos(int) : zeros based position of location to check mapping qualties
    radius(int) : radius to check around selected location

Returns:
    mapping_qualities(list) : Histogram with 7 bins (0 to highest mapping quality)
def get_mapping_q_vect(alignments_handle, contig, pos, radius=150):
    'Obtain histogram of mapping qualties, clipped at 60\n\n     Args:\n        alignments(pysam.AlignmentFile) : Handle to alignmentfile\n        contig(str) : contig\n        pos(int) : zeros based position of location to check mapping qualties\n        radius(int) : radius to check around selected location\n\n    Returns:\n        mapping_qualities(list) : Histogram with 7 bins (0 to highest mapping quality)\n    '
    mapping_qualities = ([0] * 7)
    for read in alignments_handle.fetch(contig, (pos - radius), (pos + radius)):
        mapping_qualities[min(60, int((read.mapping_quality / 10)))] += 1
    return mapping_qualities