+ private static void writeLogFile( final File logfile, final RIO rio ) throws IOException {
+ final EasyWriter out = ForesterUtil.createEasyWriter( logfile );
+ out.println( "Species stripped from gene trees:" );
+ final SortedSet<String> rn = new TreeSet<String>();
+ for( final PhylogenyNode n : rio.getRemovedGeneTreeNodes() ) {
+ final Taxonomy t = n.getNodeData().getTaxonomy();
+ switch ( rio.getGSDIRtaxCompBase() ) {
+ case CODE: {
+ rn.add( t.getTaxonomyCode() );
+ break;
+ }
+ case ID: {
+ rn.add( t.getIdentifier().toString() );
+ break;
+ }
+ case SCIENTIFIC_NAME: {
+ rn.add( t.getScientificName() );
+ break;
+ }
+ }
+ }
+ for( final String s : rn ) {
+ out.println( s );
+ }
+ out.println();
+ out.println( "Some information about duplication numbers in gene trees:" );
+ out.println( rio.getLog().toString() );
+ out.close();
+ ForesterUtil.programMessage( PRG_NAME, "wrote log to \"" + logfile + "\"" );
+ }
+