public static PhylogenyWriter createPhylogenyWriter() { return new PhylogenyWriter(); }
public String toNexus( final NH_CONVERSION_SUPPORT_VALUE_STYLE svs ) { try { return new PhylogenyWriter().toNexus( this, svs ).toString(); } catch ( final IOException e ) { throw new Error( "this should not have happend: " + e.getMessage() ); } }
public String toNewHampshireX() { try { return new PhylogenyWriter().toNewHampshireX( this ).toString(); } catch ( final IOException e ) { throw new Error( "this should not have happend: " + e.getMessage() ); } }
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() ); } }
private static void writeTree( final Phylogeny p, final File f, final String comment ) throws IOException { final PhylogenyWriter writer = new PhylogenyWriter(); writer.toPhyloXML( f, p, 0 ); System.out.println( comment + " \"" + f + "\"" ); } }
public String toPhyloXML( final int phyloxml_level ) { try { return new PhylogenyWriter().toPhyloXML( this, phyloxml_level ).toString(); } catch ( final IOException e ) { throw new Error( "this should not have happend: " + e.getMessage() ); } }
/** * 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(); }
public static void writePhylogenyToFile( final Phylogeny phylogeny, final String filename ) { final PhylogenyWriter writer = new PhylogenyWriter(); try { writer.toPhyloXML( new File( filename ), phylogeny, 1 ); } catch ( final IOException e ) { ForesterUtil.printWarningMessage( surfacing.PRG_NAME, "failed to write phylogeny to \"" + filename + "\": " + e ); } ForesterUtil.programMessage( surfacing.PRG_NAME, "Wrote phylogeny to \"" + filename + "\"" ); }
public static void main( final String[] args ) { // Reading-in of (a) tree(s) from a file. final File treefile = new File( "/home/czmasek/tol_117_TEST.xml" ); PhylogenyParser parser = null; try { parser = ParserUtils.createParserDependingOnFileType( treefile, true ); } catch ( final IOException e ) { e.printStackTrace(); } Phylogeny[] phys = null; try { phys = PhylogenyMethods.readPhylogenies( parser, treefile ); } catch ( final IOException e ) { e.printStackTrace(); } // Writing trees to a file. final File outfile = new File( "/home/czmasek/tol_117_TEST_out.xml" ); try { final PhylogenyWriter writer = new PhylogenyWriter(); writer.toPhyloXML( phys, 0, outfile, ForesterUtil.LINE_SEPARATOR ); } catch ( final Exception e ) { e.printStackTrace(); } } }
static boolean writeAsPhyloXml( final TreePanel tp, final Options op, boolean exception, final File file ) { try { final PhylogenyWriter writer = new PhylogenyWriter(); writer.toPhyloXML( file, tp.getPhylogeny(), 0 ); } catch ( final Exception e ) { exception = true; exceptionOccuredDuringSaveAs( e, tp, tp ); } return exception; }
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; }
static boolean writeAsNexus( final TreePanel tp, final Options op, boolean exception, final File file ) { try { final PhylogenyWriter writer = new PhylogenyWriter(); writer.toNexus( file, tp.getPhylogeny(), op.getNhConversionSupportValueStyle() ); } catch ( final Exception e ) { exception = true; exceptionOccuredDuringSaveAs( e, tp, tp ); } return exception; }
final PhylogenyWriter writer = new PhylogenyWriter(); writer.toPhyloXML( outfile, phylogeny_w_bl, 0 );
final PhylogenyWriter w = new PhylogenyWriter(); w.toPhyloXML( phy, 0, outfile );
i++; final PhylogenyWriter writer = new PhylogenyWriter();
i++; final PhylogenyWriter writer = new PhylogenyWriter(); writer.toPhyloXML( out, phylogeny_0, 0 );
i++; final PhylogenyWriter writer1 = new PhylogenyWriter(); writer1.toPhyloXML( outtree1, phy, 0 ); final PhylogenyNodeIterator it2 = phy.iteratorExternalForward(); processNode2( node, phy ); final PhylogenyWriter writer2 = new PhylogenyWriter(); writer2.toPhyloXML( outtree2, phy, 0 );
getMainPanel().getTreePanels().get( i ).setEdited( false ); final PhylogenyWriter writer = new PhylogenyWriter(); try { writer.toPhyloXML( file, trees, 0, ForesterUtil.LINE_SEPARATOR );