final BasicDescriptiveStatistics stats = rio.getDuplicationsStatistics();
final java.text.DecimalFormat df = new java.text.DecimalFormat( "0.#" );
System.out.println( "Mean number of duplications : " + df.format( stats.arithmeticMean() ) + " (sd: "
- + df.format( stats.sampleStandardDeviation() ) + ")" );
+ + df.format( stats.sampleStandardDeviation() ) + ") ("
+ + df.format( 100.0 * stats.arithmeticMean() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
if ( stats.getN() > 3 ) {
- System.out.println( "Median number of duplications: " + df.format( stats.median() ) );
+ System.out.println( "Median number of duplications: " + df.format( stats.median() ) + " ("
+ + df.format( 100.0 * stats.median() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
}
- System.out.println( "Minimum duplications : " + ( int ) stats.getMin() );
- System.out.println( "Maximum duplications : " + ( int ) stats.getMax() );
+ System.out.println( "Minimum duplications : " + ( int ) stats.getMin() + " ("
+ + df.format( 100.0 * stats.getMin() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+ System.out.println( "Maximum duplications : " + ( int ) stats.getMax() + " ("
+ + df.format( 100.0 * stats.getMax() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+ System.out.println( "Gene tree internal nodes : " + rio.getIntNodesOfAnalyzedGeneTrees() );
+ System.out.println( "Gene tree external nodes : " + rio.getExtNodesOfAnalyzedGeneTrees() );
}
catch ( final RIOException e ) {
ForesterUtil.fatalError( e.getLocalizedMessage() );
catch ( final IOException e ) {
ForesterUtil.fatalError( e.getLocalizedMessage() );
}
+ catch ( final OutOfMemoryError e ) {
+ ForesterUtil.outOfMemoryError( e );
+ }
catch ( final Exception e ) {
ForesterUtil.unexpectedFatalError( e );
}
+ catch ( final Error e ) {
+ ForesterUtil.unexpectedFatalError( e );
+ }
time = System.currentTimeMillis() - time;
System.out.println( "Time: " + time + "ms" );
System.out.println( "OK" );
System.out.println( " disallowed, as are most options)" );
System.out.println();
System.out.println( " Formats" );
- System.out.println( " The species tree is expected to be in phyloXML format." );
System.out
- .println( " The gene trees ideally are in phyloXML as well, but can also be in New Hamphshire (Newick)" );
- System.out.println( " or Nexus format as long as species information can be extracted from the gene names" );
- System.out.println( " (e.g. \"HUMAN\" from \"BCL2_HUMAN\")." );
+ .println( " The gene trees, as well as the species tree, ideally are in phyloXML (www.phyloxml.org) format," );
+ System.out
+ .println( " but can also be in New Hamphshire (Newick) or Nexus format as long as species information can be" );
+ System.out
+ .println( " extracted from the gene names (e.g. \"HUMAN\" from \"BCL2_HUMAN\") and matched to a single species" );
+ System.out.println( " in the species tree." );
System.out.println();
System.out.println( " Examples" );
System.out.println( " \"rio gene_trees.nh species.xml outtable.tsv log.txt\"" );