public static String getPeptideNaturalAnalogSequenceFromNotation ( HELM2Notation helm2Notation ) throws HELM2HandledException , PeptideUtilsException , NotationException , ChemistryException { List < PolymerNotation > polymers = helm2Notation . getListOfPolymers ( ) ; StringBuffer sb = new StringBuffer ( ) ; for ( PolymerNotation polymer : polymers ) { if ( ! ( polymer . getPolymerID ( ) instanceof PeptideEntity ) ) { throw new NotationException ( "Input complex notation contains non-peptide polymer(s)" ) ; } sb . append ( PeptideUtils . getNaturalAnalogueSequence ( polymer ) + " " ) ; } sb . setLength ( sb . length ( ) - 1 ) ; return sb . toString ( ) ; }
method to generate for all peptide polymers the natural analogue sequence