def readthrough_in_bedpe(record, annotation, rt_threshold):
    """
    Determine if the two genes in the record are within `rt_threshold` bp of each other on the same
    chromosome.

    :param BEDPE record: A BEDPE line from the input file
    :param dict(str, GTFRecord) annotation: see `read_fusions:gene_annotations`
    :param rt_threshold: The genomic distance on the same chromosome below which we will call a
           candidate fusion a readthrough.
    :returns: True if the pair is considered a readthrough and False if not
    :rtype: bool
    """
    return record.chrom1 == record.chrom2 and (annotation[record.hugo1].
        start <= annotation[record.hugo2].start <= annotation[record.hugo1]
        .end + rt_threshold or annotation[record.hugo2].start <= annotation
        [record.hugo1].start <= annotation[record.hugo2].end + rt_threshold)
