public void toNewHampshire( final List<Phylogeny> trees, final boolean write_distance_to_parent, final File out_file, final String separator ) throws IOException { final Iterator<Phylogeny> it = trees.iterator(); final StringBuffer sb = new StringBuffer(); while ( it.hasNext() ) { sb.append( toNewHampshire( it.next(), write_distance_to_parent ) ); sb.append( separator ); } writeToFile( sb, out_file ); }
public void toNewHampshire( final Phylogeny tree, final boolean write_distance_to_parent, final NH_CONVERSION_SUPPORT_VALUE_STYLE svs, final File out_file ) throws IOException { writeToFile( toNewHampshire( tree, write_distance_to_parent, svs ), out_file ); }
public String toNewHampshire( final NH_CONVERSION_SUPPORT_VALUE_STYLE nh_conversion_support_style ) { try { return new PhylogenyWriter().toNewHampshire( this, true, nh_conversion_support_style ).toString(); } catch ( final IOException e ) { throw new Error( "this should not have happend: " + e.getMessage() ); } }
public void toNewHampshire( final Phylogeny[] trees, final boolean write_distance_to_parent, final File out_file, final String separator ) throws IOException { final StringBuffer sb = new StringBuffer(); for( final Phylogeny element : trees ) { sb.append( toNewHampshire( element, write_distance_to_parent ) ); sb.append( separator ); } writeToFile( sb, out_file ); }
/** * Convert a Phylogenetic tree to its Newick representation, so that it can * be exported to an external application. * * @param phylo * Phylogeny phylogenetic tree * @param writeDistances * write the branch lengths if true * @return * @throws IOException */ public static String getNewickString(Phylogeny phylo, boolean writeDistances) throws IOException { PhylogenyWriter w = new PhylogenyWriter(); StringBuffer newickString = w.toNewHampshire(phylo, writeDistances); return newickString.toString(); }
/** * Convert a Phylogenetic tree to its Newick representation, so that it can * be exported to an external application. * * @param phylo * Phylogeny phylogenetic tree * @param writeDistances * write the branch lengths if true * @return * @throws IOException */ public static String getNewickString(Phylogeny phylo, boolean writeDistances) throws IOException { PhylogenyWriter w = new PhylogenyWriter(); StringBuffer newickString = w.toNewHampshire(phylo, writeDistances); return newickString.toString(); }
/** * Convert a Phylogenetic tree to its Newick representation, so that it can * be exported to an external application. * * @param phylo * Phylogeny phylogenetic tree * @param writeDistances * write the branch lengths if true * @return * @throws IOException */ public static String getNewickString(Phylogeny phylo, boolean writeDistances) throws IOException { PhylogenyWriter w = new PhylogenyWriter(); StringBuffer newickString = w.toNewHampshire(phylo, writeDistances); return newickString.toString(); }
static boolean writeAsNewHampshire( final TreePanel tp, final Options op, boolean exception, final File file ) { try { final PhylogenyWriter writer = new PhylogenyWriter(); writer.toNewHampshire( tp.getPhylogeny(), true, op.getNhConversionSupportValueStyle(), file ); } catch ( final Exception e ) { exception = true; exceptionOccuredDuringSaveAs( e, tp, tp ); } return exception; }
w.toNewHampshire( evaluator_phylogenies_above_threshold, branch_lengths_in_ev_out, evaluators_outfile, w.toNewHampshire( Arrays.asList( ev ), branch_lengths_in_ev_out, evaluators_outfile, ";" + ForesterUtil.getLineSeparator() );
String s = w.toNewHampshire( t4, true ).toString(); if ( !s.equals( "((A,(B11,B12)),(C,D));" ) ) { return false; s = w.toNewHampshire( t4, true ).toString(); if ( !s.equals( "((A,B12),D);" ) ) { return false; s = w.toNewHampshire( t5, true ).toString(); if ( !s.equals( "(((B11,B12),B2),(C,D));" ) ) { return false; s = w.toNewHampshire( t6, false ).toString(); if ( !s.equals( "((A,(B12,B2)),(C,D));" ) ) { return false; s = w.toNewHampshire( t7, true ).toString(); if ( !s.equals( "((A,(B11,B2)),(C,D));" ) ) { return false; s = w.toNewHampshire( t8, false ).toString(); if ( !s.equals( "((A,(B11,B12)),(C,D));" ) ) { return false; s = w.toNewHampshire( t9, true ).toString(); if ( !s.equals( "((A,((B11,B12),B2)),D);" ) ) { return false; s = w.toNewHampshire( t10, true ).toString();