def get_reads_in_interval(sam, chrom, start, end):
    """ Given an open pysam.AlignmentFile, return only the reads that overlap
        the provided interval. Note that this means there may be reads that
        extend beyond the bounds of the interval. """
    iterator = sam.fetch(chrom, start, end)
    reads = [ x for x in iterator ]
    return reads