def splitExons(transcriptInfo, chromosome, lo, hi, strand):
    upstream = "5' UTR"
    downstream = "3' UTR"
    if strand == "-":
        upstream = "3' UTR"
        downstream = "5' UTR"

    result = [["CDS", lo, hi, True]]
    if hi < transcriptInfo[chromosome]["codingLo"]:
        result[0][0] = upstream
    elif transcriptInfo[chromosome]["codingHi"] > lo:
        result[0][0] = downstream
    if lo < transcriptInfo[chromosome]["codingLo"]:
        result[0][1] = transcriptInfo[chromosome]["codingLo"]
        result.append([upstream, lo, transcriptInfo[chromosome]["codingLo"], False])
    if hi > transcriptInfo[chromosome]["codingHi"]:
        result[0][2] = transcriptInfo[chromosome]["codingHi"]
        result.append([downstream, transcriptInfo[chromosome]["codingHi"], hi, False])
    return result
dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/scripts/dx_gtf_to_genes.py/splitExons/swapped operands of `>`