+ public void write( final Writer w, final MSA_FORMAT format ) throws IOException {
+ switch ( format ) {
+ case PHYLIP:
+ writeToPhylip( w );
+ break;
+ case FASTA:
+ writeToFasta( w );
+ break;
+ default:
+ throw new RuntimeException( "unknown format " + format );
+ }
+ }
+
+ private void writeToFasta( final Writer w ) throws IOException {
+ SequenceWriter.writeSeqs( asSequenceList(), w, SEQ_FORMAT.FASTA, 100 );
+ }
+
+ private void writeToPhylip( final Writer w ) throws IOException {