determine if read overlaps with rna, if so count bases

def rna_bases(rna_cov, scaffold, bases, line):
    """
    determine if read overlaps with rna, if so count bases
    """
    start = int(line[3])
    stop = start + bases - 1
    if scaffold not in rna_cov:
        return rna_cov
    for pos in rna_cov[scaffold][2]:
        ol = get_overlap([start, stop], pos)
        rna_cov[scaffold][0] += ol
    return rna_cov