protected void trimStop ( List < AminoAcidCompound > sequence ) { AminoAcidCompound stop = sequence . get ( sequence . size ( ) - 1 ) ; boolean isStop = false ; if ( aminoAcidToCodon . containsKey ( stop ) ) { for ( Codon c : aminoAcidToCodon . get ( stop ) ) { if ( c . isStop ( ) ) { isStop = true ; break ; } } } if ( isStop ) { sequence . remove ( sequence . size ( ) - 1 ) ; } }
Imperfect code . Checks the last amino acid to see if a codon could have translated a stop for it . Left in for the moment