private final static String generateIDRNA ( String id , String count , String annotation ) throws MonomerLoadingException , ChemistryException , CTKException { String result = id ; if ( result . startsWith ( "[" ) && result . endsWith ( "]" ) ) { result = id . substring ( 1 , id . length ( ) - 1 ) ; } if ( MonomerFactory . getInstance ( ) . getMonomerStore ( ) . getMonomer ( "RNA" , result ) . getMonomerType ( ) . equals ( Monomer . BRANCH_MOMONER_TYPE ) ) { if ( id . length ( ) > 1 ) { result = "[" + id + "]" ; } result = "(" + result + ")" ; } else { if ( id . length ( ) > 1 ) { result = "[" + id + "]" ; } } try { if ( ! ( Integer . parseInt ( count ) == 1 ) ) { result += "'" + count + "'" ; } } catch ( NumberFormatException e ) { result += "'" + count + "'" ; } if ( annotation != null ) { result += "\"" + annotation + "\"" ; } return result ; }
method to generate the MonomerNotation for a RNA