+ final DescriptiveStatistics ds = PhylogenyMethods.calculatNumberOfDescendantsPerNodeStatistics( phy );
+ if ( ds.getN() > 2 ) {
+ desc.append( "\n" );
+ desc.append( "Descendants per node statistics: " );
+ desc.append( "\n" );
+ desc.append( " Median: " + ForesterUtil.round( ds.median(), 2 ) );
+ desc.append( "\n" );
+ desc.append( " Mean: " + ForesterUtil.round( ds.arithmeticMean(), 2 ) );
+ desc.append( "\n" );
+ desc.append( " SD: " + ForesterUtil.round( ds.sampleStandardDeviation(), 2 ) );
+ desc.append( "\n" );
+ desc.append( " Minimum: " + ForesterUtil.roundToInt( ds.getMin() ) );
+ desc.append( "\n" );
+ desc.append( " Maximum: " + ForesterUtil.roundToInt( ds.getMax() ) );
+ desc.append( "\n" );
+ }
+ List<DescriptiveStatistics> css = null;
+ try {
+ css = PhylogenyMethods.calculatConfidenceStatistics( phy );
+ }
+ catch ( final IllegalArgumentException e ) {
+ ForesterUtil.printWarningMessage( Constants.PRG_NAME, e.getMessage() );
+ }
+ if ( ( css != null ) && ( css.size() > 0 ) ) {
+ desc.append( "\n" );
+ for( int i = 0; i < css.size(); ++i ) {
+ final DescriptiveStatistics cs = css.get( i );
+ if ( ( cs != null ) && ( cs.getN() > 1 ) ) {
+ if ( css.size() > 1 ) {
+ desc.append( "Support statistics " + ( i + 1 ) + ": " );
+ }
+ else {
+ desc.append( "Support statistics: " );
+ }
+ if ( !ForesterUtil.isEmpty( cs.getDescription() ) ) {
+ desc.append( "\n" );
+ desc.append( " Type: " + cs.getDescription() );
+ }
+ desc.append( "\n" );
+ desc.append( " Branches with support: " + cs.getN() );
+ desc.append( "\n" );
+ desc.append( " Median: " + ForesterUtil.round( cs.median(), 6 ) );
+ desc.append( "\n" );
+ desc.append( " Mean: " + ForesterUtil.round( cs.arithmeticMean(), 6 ) );
+ desc.append( "\n" );
+ if ( cs.getN() > 2 ) {
+ desc.append( " SD: " + ForesterUtil.round( cs.sampleStandardDeviation(), 6 ) );
+ desc.append( "\n" );
+ }
+ desc.append( " Minimum: " + ForesterUtil.roundToInt( cs.getMin() ) );
+ desc.append( "\n" );
+ desc.append( " Maximum: " + ForesterUtil.roundToInt( cs.getMax() ) );
+ desc.append( "\n" );
+ }
+ }