private static String changeIdForRNA ( MonomerNotation monomerNotation ) { if ( monomerNotation instanceof MonomerNotationUnitRNA ) { StringBuilder changeid = new StringBuilder ( ) ; for ( MonomerNotation not : ( ( MonomerNotationUnitRNA ) monomerNotation ) . getContents ( ) ) { Monomer monomer = nucleotidesNaturalAnalog . get ( not . getUnit ( ) . replace ( "[" , "" ) . replace ( "]" , "" ) ) ; String id = monomer . getNaturalAnalog ( ) ; if ( monomer . getMonomerType ( ) . equals ( Monomer . BRANCH_MOMONER_TYPE ) ) { id = "(" + id + ")" ; } changeid . append ( id ) ; } return changeid . toString ( ) ; } else { Monomer monomer = nucleotidesNaturalAnalog . get ( monomerNotation . getUnit ( ) . replace ( "[" , "" ) . replace ( "]" , "" ) ) ; String id = monomer . getNaturalAnalog ( ) ; if ( monomer . getMonomerType ( ) . equals ( Monomer . BRANCH_MOMONER_TYPE ) ) { id = "(" + id + ")" ; } return id ; } }
method to get the natural analogue sequence of a MonomerNotation