2b99386b970fed3608557122446f987004c69ab5 braney Fri Oct 7 12:58:17 2011 -0700 fix a bug that only showed up in building the CDS FASTA alignments for rn4 RGD genes diff --git src/hg/lib/mafGene.c src/hg/lib/mafGene.c index 7a03dbc..b01a696 100644 --- src/hg/lib/mafGene.c +++ src/hg/lib/mafGene.c @@ -785,30 +785,33 @@ /* first skip 5' UTR */ for(; exonStart < lastStart; exonStart++, exonEnd++, frames++) { int size = *exonEnd - *exonStart; if (*exonStart + size > pred->cdsStart) break; } for(; exonStart < lastStart; exonStart++, exonEnd++, frames++) { struct exonInfo *gi; int thisStart = *exonStart; + if (thisStart > pred->cdsEnd) + break; + if (thisStart < pred->cdsStart) thisStart = pred->cdsStart; int thisEnd = *exonEnd; if (thisEnd > pred->cdsEnd) thisEnd = pred->cdsEnd; int thisSize = thisEnd - thisStart; verbose(3, "in %d %d cds %d %d\n",*exonStart,*exonEnd, thisStart, thisEnd); AllocVar(gi); gi->frame = *frames; gi->name = pred->name; gi->ali = getAliForRange(database, mafTable, pred->chrom,