final int transcriptionStart = row.getIntegerField(RefFlatColumns.TX_START.name()) + 1;
final int transcriptionEnd = row.getIntegerField(RefFlatColumns.TX_END.name());
final int codingStart = row.getIntegerField(RefFlatColumns.CDS_START.name()) + 1;
final int codingEnd = row.getIntegerField(RefFlatColumns.CDS_END.name());
final Transcript tx = gene.addTranscript(transcriptName, transcriptionStart, transcriptionEnd, codingStart, codingEnd, exonCount);
for (int i = 0; i < exonCount; ++i) {
final Exon e = tx.addExon(Integer.parseInt(exonStarts[i]) + 1, Integer.parseInt(exonEnds[i]));
if (e.start >= e.end) {
throw new AnnotationException("Exon has 0 or negative extent for " + transcriptDescription);
}
if (i > 0 && tx.exons[i-1].end >= tx.exons[i].start) {