+ private static void print_help() {
+ System.out.println( "Usage: " + gsdi.PRG_NAME
+ + " [-options] <gene tree in phyloXML format> <species tree> <outfile>" );
+ System.out.println();
+ System.out.println( "Options:" );
+ System.out.println( " -" + gsdi.ALLOW_STRIPPING_OF_GENE_TREE_OPTION
+ + ": to allow stripping of gene tree nodes without a matching species" );
+ System.out.println( " -" + gsdi.MOST_PARSIMONIOUS_OPTION
+ + ": use most parimonious duplication model for GSDI: " );
+ System.out.println( " assign nodes as speciations which would otherwise be assiged" );
+ System.out.println( " as potential duplications due to polytomies in the species tree" );
+ System.out.println( " -" + gsdi.GUESS_FORMAT_OF_SPECIES_TREE
+ + ": to allow species tree in other formats than phyloXML (i.e. Newick, NHX, Nexus)" );
+ System.out.println( " -" + gsdi.GSDIR_OPTION
+ + ": to use GSDIR algorithm instead of GSDI algorithm (re-rooting)" );
+ System.out.println( " -" + TRANSFER_TAXONOMY_OPTION
+ + ": to transfer taxonomic data from species tree to gene tree\n" );
+ System.out.println();
+ System.out.println( "Gene tree:" );
+ System.out.println( " in phyloXM format, with taxonomy and sequence data in appropriate fields" );
+ System.out.println();
+ System.out.println( "Species tree:" );
+ System.out.println( " in phyloXML format (unless option -" + gsdi.GUESS_FORMAT_OF_SPECIES_TREE + " is used)" );
+ System.out.println();
+ System.out.println( "Example: gsdi -" + ALLOW_STRIPPING_OF_GENE_TREE_OPTION
+ + " gene_tree.xml tree_of_life.xml out.xml" );
+ System.out.println();
+ }
+
+ private static void printMappedNodesToLog( final EasyWriter log_writer, final GSDII gsdi ) throws IOException {
+ final SortedSet<String> ss = new TreeSet<String>();
+ for( final PhylogenyNode n : gsdi.getMappedExternalSpeciesTreeNodes() ) {
+ ss.add( n.toString() );
+ }
+ log_writer.println( "The following " + ss.size() + " species were used: " );
+ for( final String s : ss ) {
+ log_writer.println( " " + s );
+ }
+ }
+
+ private static void printStrippedGeneTreeNodesToLog( final EasyWriter log_writer, final GSDII gsdi )