def writeEntry(spansTable, spanId, exonInfo, additionalColumns, chromosome, lo, hi, attributes, entry):
    if [lo, hi] not in exonInfo[chromosome] and [lo, hi-2] not in exonInfo[chromosome]:
        checkOverlap = trimOverlap(exonInfo[chromosome], lo, hi)
        if checkOverlap["hi"] - checkOverlap["lo"] > 0:
            entry[1] = checkOverlap["lo"]
            entry[2] = checkOverlap["hi"]
            if entry[6] == "-":
                entry[10] = int(entry[10]) + checkOverlap["hiChange"] % 3
            else:
                entry[10] = int(entry[10]) + checkOverlap["loChange"] % 3

            exonInfo[chromosome].append([lo, hi])
            spanId += 1
            for x in additionalColumns:
                if attributes.get(x) != None:
                    entry.append(attributes[x])
                else:
                    entry.append('')
            spansTable.add_rows([entry])
    return spanId
dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/scripts/dx_gtf_to_genes.py/writeEntry/original