def get_mapping_q_vect(alignments_handle, contig, pos, radius=150):

    """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)
    """
    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