From: cmzmasek@gmail.com Date: Wed, 20 Nov 2013 20:46:17 +0000 (+0000) Subject: inprogress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c244a8d7a48af45dce446f57a4d7a24ea3a8c912;p=jalview.git inprogress --- diff --git a/forester/java/src/org/forester/application/dom_dup.java b/forester/java/src/org/forester/application/dom_dup.java index f1a0a8d..64b4640 100644 --- a/forester/java/src/org/forester/application/dom_dup.java +++ b/forester/java/src/org/forester/application/dom_dup.java @@ -189,7 +189,7 @@ public class dom_dup { System.out.println(); System.out.println( PRG_NAME + "" ); System.out.println(); - System.out.println( " exmple: " ); + System.out.println( " example: " ); System.out.println(); System.out .println( "dom_dup \"HUMAN~[12]-2\" groups.txt RRMa_ALL_plus_RRMa_ee3_50_hmmalign_05_40_fme_gsdi.phylo.xml" ); diff --git a/forester/java/src/org/forester/application/subtree_feature_count.java b/forester/java/src/org/forester/application/subtree_feature_count.java index cde4cbb..c5fe6f7 100644 --- a/forester/java/src/org/forester/application/subtree_feature_count.java +++ b/forester/java/src/org/forester/application/subtree_feature_count.java @@ -32,7 +32,7 @@ public class subtree_feature_count { public static void main( final String args[] ) { try { final CommandLineArguments cla = new CommandLineArguments( args ); - if ( cla.isOptionSet( HELP_OPTION_1 ) || cla.isOptionSet( HELP_OPTION_2 ) || ( cla.getNumberOfNames() != 3 ) ) { + if ( cla.isOptionSet( HELP_OPTION_1 ) || cla.isOptionSet( HELP_OPTION_2 ) || ( args.length < 2 ) ) { printHelp(); System.exit( 0 ); } @@ -121,7 +121,7 @@ public class subtree_feature_count { } } - private static PhylogenyNode moveUp( final PhylogenyNode node, final double depth ) { + private static PhylogenyNode moveUpOLd( final PhylogenyNode node, final double depth ) { PhylogenyNode n = node; double current_depth = 0.0; while ( current_depth < depth ) { @@ -134,6 +134,16 @@ public class subtree_feature_count { return n; } + private static PhylogenyNode moveUp( final PhylogenyNode node, final double depth ) { + PhylogenyNode n = node; + PhylogenyNode prev = node; + while ( depth > n.calculateDistanceToRoot() ) { + prev = n; + n = n.getParent(); + } + return prev; + } + private static void printHelp() { ForesterUtil.printProgramInformation( PRG_NAME, PRG_DESC, @@ -146,10 +156,8 @@ public class subtree_feature_count { System.out.println(); System.out.println( PRG_NAME + "" ); System.out.println(); - System.out.println( " exmple: " ); + System.out.println( " example: " ); System.out.println(); - System.out - .println( "dom_dup \"HUMAN~[12]-2\" groups.txt RRMa_ALL_plus_RRMa_ee3_50_hmmalign_05_40_fme_gsdi.phylo.xml" ); System.out.println(); System.out.println(); } diff --git a/forester/java/src/org/forester/phylogeny/data/Sequence.java b/forester/java/src/org/forester/phylogeny/data/Sequence.java index afc342b..525bc1b 100644 --- a/forester/java/src/org/forester/phylogeny/data/Sequence.java +++ b/forester/java/src/org/forester/phylogeny/data/Sequence.java @@ -455,9 +455,6 @@ public class Sequence implements PhylogenyData, MultipleUris, Comparable