phylotastic hackathon at NESCENT 120608
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 8 Jun 2012 16:05:43 +0000 (16:05 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 8 Jun 2012 16:05:43 +0000 (16:05 +0000)
forester/java/src/org/forester/application/gsdi.java
forester/java/src/org/forester/util/ForesterConstants.java

index e97b504..3f39fb8 100644 (file)
@@ -33,6 +33,7 @@ import java.util.List;
 
 
 import org.forester.io.parsers.PhylogenyParser;
+import org.forester.io.parsers.nhx.NHXParser;
 import org.forester.io.parsers.phyloxml.PhyloXmlParser;
 import org.forester.io.parsers.util.ParserUtils;
 import org.forester.io.writers.PhylogenyWriter;
@@ -48,6 +49,7 @@ import org.forester.util.ForesterUtil;
 
 public final class gsdi {
 
+    final static public boolean REPLACE_UNDERSCORES_IN_NH_SPECIES_TREE = true;
     final static private String STRIP_OPTION                 = "s";
     final static private String SDI_OPTION                   = "b";
     final static private String MOST_PARSIMONIOUS_OPTION     = "m";
@@ -151,6 +153,9 @@ public final class gsdi {
             }
             else {
                 final PhylogenyParser p = ParserUtils.createParserDependingOnFileType( species_tree_file, true );
+                if ( REPLACE_UNDERSCORES_IN_NH_SPECIES_TREE && p instanceof NHXParser ) {
+                    (( NHXParser ) p ).setReplaceUnderscores( true );
+                }
                 species_tree = factory.create( species_tree_file, p )[ 0 ];
                 PhylogenyMethods.transferNodeNameToField( species_tree,
                                                           PhylogenyMethods.PhylogenyNodeField.TAXONOMY_SCIENTIFIC_NAME );
index fc29b1f..ccb270a 100644 (file)
@@ -27,8 +27,8 @@ package org.forester.util;
 
 public final class ForesterConstants {
 
-    public final static String  FORESTER_VERSION            = "1.001";
-    public final static String  FORESTER_DATE               = "120607";
+    public final static String  FORESTER_VERSION            = "1.003";
+    public final static String  FORESTER_DATE               = "120608";
     
     public final static String  PHYLO_XML_VERSION           = "1.10";
     public final static String  PHYLO_XML_LOCATION          = "http://www.phyloxml.org";