// Copyright (C) 2008-2009 Christian M. Zmasek
// Copyright (C) 2008-2009 Burnham Institute for Medical Research
// All rights reserved
-//
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
-//
+//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
import java.io.File;
import org.forester.io.parsers.phyloxml.PhyloXmlParser;
-import org.forester.io.writers.PhylogenyWriter;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyNode;
import org.forester.phylogeny.factories.ParserBasedPhylogenyFactory;
processNode( node, i );
i++;
}
- final PhylogenyWriter writer = new PhylogenyWriter();
- writer.toPhyloXML( out, phylogeny_0, 0 );
+ // final PhylogenyWriter writer = new PhylogenyWriter();
+ // writer.toPhyloXML( out, phylogeny_0, 0 );
}
catch ( final Exception e ) {
System.out.println( e.getLocalizedMessage() );
}
}
+ // private static void processNode( final PhylogenyNode node, final int i ) {
+ // node.setDistanceToParent( PhylogenyNode.DISTANCE_DEFAULT );
+ // if ( !node.isExternal() ) {
+ // if ( ( node.getName() == null ) || node.getName().isEmpty() ) {
+ // node.setName( BASE + i );
+ // }
+ // }
+ // }
private static void processNode( final PhylogenyNode node, final int i ) {
- node.setDistanceToParent( PhylogenyNode.DISTANCE_DEFAULT );
- if ( !node.isExternal() ) {
- if ( ( node.getName() == null ) || node.getName().isEmpty() ) {
- node.setName( BASE + i );
- }
+ if ( node.isExternal() ) {
+ final String c = "" + node.getNodeData().getBinaryCharacters().getPresentCount();
+ final String s = node.getNodeData().getTaxonomy().getScientificName();
+ System.out.println( s + "\t" + c );
}
}
}