return iter.hasNext();
}
- final static String createBasicInformation( final Phylogeny phy ) {
+ final static String createBasicInformation( final Phylogeny phy, final File treefile ) {
final StringBuilder desc = new StringBuilder();
if ( ( phy != null ) && !phy.isEmpty() ) {
+ String f = null;
+ if ( treefile != null ) {
+ try {
+ f = treefile.getCanonicalPath();
+ }
+ catch ( final IOException e ) {
+ //Not important, ignore.
+ }
+ if ( !ForesterUtil.isEmpty( f ) ) {
+ desc.append( "Path: " );
+ desc.append( f );
+ desc.append( "\n" );
+ }
+ }
if ( !ForesterUtil.isEmpty( phy.getName() ) ) {
desc.append( "Name: " );
desc.append( phy.getName() );
desc.append( "\n" );
desc.append( "Descendants per node statistics: " );
desc.append( "\n" );
- desc.append( " Median: " + ForesterUtil.round( ds.median(), 2 ) );
+ desc.append( " Median: " + ForesterUtil.round( ds.median(), 6 ) );
desc.append( "\n" );
- desc.append( " Mean: " + ForesterUtil.round( ds.arithmeticMean(), 2 ) + " (stdev: "
- + ForesterUtil.round( ds.sampleStandardDeviation(), 2 ) + ")" );
+ desc.append( " Mean: " + ForesterUtil.round( ds.arithmeticMean(), 6 ) + " (stdev: "
+ + ForesterUtil.round( ds.sampleStandardDeviation(), 6 ) + ")" );
desc.append( "\n" );
desc.append( " Minimum: " + ForesterUtil.roundToInt( ds.getMin() ) );
desc.append( "\n" );
desc.append( " (stdev: " + ForesterUtil.round( cs.sampleStandardDeviation(), 6 ) + ")" );
}
desc.append( "\n" );
- desc.append( " Minimum: " + ForesterUtil.roundToInt( cs.getMin() ) );
+ desc.append( " Minimum: " + ForesterUtil.round( cs.getMin(), 6 ) );
desc.append( "\n" );
- desc.append( " Maximum: " + ForesterUtil.roundToInt( cs.getMax() ) );
+ desc.append( " Maximum: " + ForesterUtil.round( cs.getMax(), 6 ) );
desc.append( "\n" );
}
}
nex.setIgnoreQuotes( false );
}
}
+ AptxUtil.printAppletMessage( "Archaeopteryx", "parser is " + parser.getName() );
final Phylogeny[] phys = factory.create( url.openStream(), parser );
- if ( nhx_or_nexus && internal_numbers_are_confidences ) {
- for( final Phylogeny phy : phys ) {
- PhylogenyMethods.transferInternalNodeNamesToConfidence( phy );
+ if ( phys != null ) {
+ if ( nhx_or_nexus && internal_numbers_are_confidences ) {
+ for( final Phylogeny phy : phys ) {
+ PhylogenyMethods.transferInternalNodeNamesToConfidence( phy );
+ }
}
- }
- if ( midpoint_reroot ) {
- for( final Phylogeny phy : phys ) {
- PhylogenyMethods.midpointRoot( phy );
- PhylogenyMethods.orderAppearance( phy.getRoot(), true, true, DESCENDANT_SORT_PRIORITY.NODE_NAME );
+ if ( midpoint_reroot ) {
+ for( final Phylogeny phy : phys ) {
+ PhylogenyMethods.midpointRoot( phy );
+ PhylogenyMethods.orderAppearance( phy.getRoot(), true, true, DESCENDANT_SORT_PRIORITY.NODE_NAME );
+ }
}
}
return phys;