public static String getSequence ( PolymerNotation polymer ) throws HELM2HandledException , PeptideUtilsException , ChemistryException { checkPeptidePolymer ( polymer ) ; StringBuilder sb = new StringBuilder ( ) ; List < Monomer > monomers = MethodsMonomerUtils . getListOfHandledMonomers ( polymer . getListMonomers ( ) ) ; for ( Monomer monomer : monomers ) { String id = monomer . getAlternateId ( ) ; if ( id . length ( ) > 1 ) { id = "[" + id + "]" ; } sb . append ( id ) ; } return sb . toString ( ) ; }
method to produce for a peptide PolymerNotation the sequence