chr1 . CDS 7000 7600 . + 1 ID=cds00004;Parent=mRNA00003;Name=edenprotein.4
*/
Set<Integer> mRNA3CdStarts = new HashSet<Integer>(Arrays.asList(3300, 3390));
for (Feature feature : features) {
BasicFeature bf = (BasicFeature) feature;
String ident = bf.getIdentifier();
List<Exon> exons = bf.getExons();
String type = bf.getType();
if (type.equals("mRNA")) {
actmRNAFeats++;
mRNAIds.add(bf.getIdentifier());
} else if (type.equals("gene")) {
assertEquals(bf.getIdentifier(), "gene00001");
continue;
} else {
continue;
}
Exon lastExon = exons.get(exons.size() - 1);
assertEquals(7600, lastExon.getCdEnd());
assertEquals(lastExon.getCdStart(), lastExon.getStart());
assertEquals(9000, lastExon.getEnd());
int midCDSInd = 2;
if (ident.equals("mRNA00001")) {
assertEquals(4, bf.getExonCount());
assertEquals(1201 - 1, exons.get(0).getCdStart());
Exon secExon = exons.get(1);
assertWholeExonCoding(secExon);
assertEquals(3000 - 1, secExon.getStart());
assertEquals(3902, secExon.getEnd());
}
if (ident.equals("mRNA00002")) {
assertEquals(3, bf.getExonCount());
assertEquals(1201 - 1, exons.get(0).getCdStart());
midCDSInd = 1;
}
if (ident.equals("mRNA00003")) {
assertEquals(4, bf.getExonCount());
boolean passedCdStart = false;
for (Exon exon : exons) {
if (exon.isNonCoding()) {
assertEquals("Entire exon is UTR but has coding region: " + exon.getName(), 0, exon.getCodingLength());
assertEquals("Entire exon is UTR but has coding region: " + exon.getName(), 0, exon.getCdEnd() - exon.getCdEnd());