(no commit message)
[jalview.git] / forester / java / src / org / forester / application / support_transfer.java
index 82817e9..340bcf4 100644 (file)
@@ -21,7 +21,7 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.application;
 
@@ -37,6 +37,7 @@ import org.forester.phylogeny.Phylogeny;
 import org.forester.phylogeny.PhylogenyMethods;
 import org.forester.phylogeny.PhylogenyNode;
 import org.forester.phylogeny.data.Confidence;
+import org.forester.phylogeny.data.PhylogenyDataUtil;
 import org.forester.phylogeny.factories.ParserBasedPhylogenyFactory;
 import org.forester.phylogeny.factories.PhylogenyFactory;
 import org.forester.phylogeny.iterators.PhylogenyNodeIterator;
@@ -47,7 +48,7 @@ public final class support_transfer {
      * Transfers branch length values from one Phylogeny to another. It is
      * mainly a "main method" for method "copyBranchLengthValuesFrom( Phylogeny )"
      * of org.forester.phylogeny.Phylogeny, to be used in other (Perl) programs.
-     * 
+     *
      * @param args[0]
      *            Filename (String) for Phylogeny which has correct branch
      *            length values
@@ -59,8 +60,8 @@ public final class support_transfer {
      * @param args[2]
      *            String Filename (String) for outputfile
      * @param args[3]
-     *            String [number of tree with correct bl to use in case treefile contains more than one, default 0]            
-     
+     *            String [number of tree with correct bl to use in case treefile contains more than one, default 0]
+
      */
     public static void main( final String args[] ) {
         Phylogeny phylogeny_w_bl = null; // Has correct branch lengths
@@ -94,7 +95,7 @@ public final class support_transfer {
             final PhylogenyParser pp_bl = ParserUtils.createParserDependingOnFileType( infile_bl, true );
             final PhylogenyParser pp_s = ParserUtils.createParserDependingOnFileType( infile_support_vals, true );
             if ( pp_bl instanceof NHXParser ) {
-                ( ( NHXParser ) pp_bl ).setTaxonomyExtraction( PhylogenyMethods.TAXONOMY_EXTRACTION.YES );
+                ( ( NHXParser ) pp_bl ).setTaxonomyExtraction( NHXParser.TAXONOMY_EXTRACTION.NO );
             }
             phylogeny_w_bl = factory.create( infile_bl, pp_bl )[ index_of_tree_w_bl ];
             phylogeny_w_support_vals = factory.create( infile_support_vals, pp_s )[ 0 ];
@@ -137,7 +138,7 @@ public final class support_transfer {
             else {
                 PhylogenyMethods.setBootstrapConfidence( node, Confidence.CONFIDENCE_DEFAULT_VALUE );
             }
-            node.setDistanceToParent( PhylogenyNode.DISTANCE_DEFAULT );
+            node.setDistanceToParent( PhylogenyDataUtil.BRANCH_LENGTH_DEFAULT );
         }
     } // moveBranchLengthsToBootstrap()
 
@@ -146,7 +147,7 @@ public final class support_transfer {
      * Important (but obvious): The topology of both trees needs to be the same.
      * The method is not robust, and might produce wrong results if the internal
      * topology differs or if the external node names are not unique.
-     * 
+     *
      * @param from
      *            the Phylogeny to copy the support values from
      * @param to