checkTranslationLength(transCheckExons,start,end);
// could just do this as a single seq span (start, end, seq), but then would end up recreating
// the cds segments, which will get ignored afterwards...
SeqSpan gstart_point = new SimpleSeqSpan(start, start, genomic);
SeqSpan gend_point = new SimpleSeqSpan(end, end, genomic);
SimpleSymWithProps result = new SimpleSymWithProps();
result.addSpan(gstart_point);
SeqSymmetry[] m2gPath = new SeqSymmetry[]{m2gSym};
SeqUtils.transformSymmetry((MutableSeqSymmetry) result, m2gPath);
SeqSpan mstart_point = result.getSpan(mrna);
if(mstart_point == null) {
throw new NullPointerException("Conflict with start and end in processCDS.");
}
result = new SimpleSymWithProps();
result.addSpan(gend_point);
SeqUtils.transformSymmetry((MutableSeqSymmetry) result, m2gPath);
SeqSpan mend_point = result.getSpan(mrna);
if(mend_point == null) {
throw new NullPointerException("Conflict with start and end in processCDS.");
}
TypeContainerAnnot m2pSym = new TypeContainerAnnot(elem.getAttribute(METHODSTR));
SeqSpan mspan = new SimpleSeqSpan(mstart_point.getStart(), mend_point.getEnd(), mrna);
BioSeq protein = new BioSeq(protein_id, null, mspan.getLength());
protein.setResidues(processAminoAcid(amino_acid));
protein.setBounds(mspan.getMin(), mspan.getMin() + mspan.getLength());
prot_hash.put(protein_id, protein);
SeqSpan pspan = new SimpleSeqSpan(protein.getMin(), protein.getMax(), protein);
if (DEBUG) {
System.err.println("protein: length = " + pspan.getLength());
}
m2pSym.addSpan(mspan);
m2pSym.addSpan(pspan);
m2pSym.setID("");