public static String generateFastaFromRNAPolymer ( List < PolymerNotation > polymers ) throws FastaFormatException , ChemistryException { StringBuilder fasta = new StringBuilder ( ) ; for ( PolymerNotation polymer : polymers ) { String header = polymer . getPolymerID ( ) . getId ( ) ; if ( polymer . getAnnotation ( ) != null ) { header = polymer . getAnnotation ( ) ; } fasta . append ( ">" + header + "\n" ) ; try { fasta . append ( generateFastaFromRNA ( MethodsMonomerUtils . getListOfHandledMonomers ( polymer . getListMonomers ( ) ) ) + "\n" ) ; } catch ( HELM2HandledException e ) { e . printStackTrace ( ) ; throw new FastaFormatException ( e . getMessage ( ) ) ; } } return fasta . toString ( ) ; }
method to generate Fasta for rna polymers