rio - gsdir work...
[jalview.git] / forester / java / src / org / forester / application / rio.java
index e47e31a..1e8745f 100644 (file)
@@ -46,8 +46,8 @@ import org.forester.util.ForesterUtil;
 public class rio {
 
     final static private String PRG_NAME      = "rio";
-    final static private String PRG_VERSION   = "4.000 beta 3";
-    final static private String PRG_DATE      = "2012.12.19";
+    final static private String PRG_VERSION   = "4.000 beta 4";
+    final static private String PRG_DATE      = "2012.12.25";
     final static private String E_MAIL        = "czmasek@burnham.org";
     final static private String WWW           = "www.phylosoft.org/forester/";
     final static private String HELP_OPTION_1 = "help";
@@ -283,12 +283,18 @@ public class rio {
             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() );
@@ -299,9 +305,15 @@ public class rio {
         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" );