// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
//
// Contact: phylosoft @ gmail . com
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
//
// Contact: phylosoft @ gmail . com
import org.forester.io.writers.PhylogenyWriter;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyMethods;
import org.forester.io.writers.PhylogenyWriter;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyMethods;
final static private String PRG_NAME = "count_support";
final static private String PRG_VERSION = "1.0";
final static private String PRG_DATE = "2008.03.04";
final static private String PRG_NAME = "count_support";
final static private String PRG_VERSION = "1.0";
final static private String PRG_DATE = "2008.03.04";
private final static boolean WRITE_EVALUATORS_AS_NHX = false;
public static void main( final String args[] ) {
private final static boolean WRITE_EVALUATORS_AS_NHX = false;
public static void main( final String args[] ) {
- ForesterUtil
- .printProgramInformation( count_support.PRG_NAME, count_support.PRG_VERSION, count_support.PRG_DATE );
+ ForesterUtil.printProgramInformation( PRG_NAME,
+ null,
+ PRG_VERSION,
+ PRG_DATE,
+ E_MAIL,
+ WWW,
+ ForesterUtil.getForesterLibraryInformation() );
if ( ( args.length < 3 ) || ( args.length > 7 ) ) {
System.out.println();
System.out.println( count_support.PRG_NAME + ": wrong number of arguments" );
System.out.println();
System.out
if ( ( args.length < 3 ) || ( args.length > 7 ) ) {
System.out.println();
System.out.println( count_support.PRG_NAME + ": wrong number of arguments" );
System.out.println();
System.out
- .println( "Usage: \"count_support [options] <file containing phylogeny to be evaluated> <file with phylogenies to be used for evaluation> <outfile> [outfile for evaluator phylogenies, "
- + "always unstripped if -t=<d> option is used, otherwise strippedness is dependent on -s option]\"\n" );
+ .println( "Usage: \"count_support [options] <file containing phylogeny to be evaluated> <file with phylogenies to be used for evaluation> <outfile> [outfile for evaluator phylogenies, "
+ + "always unstripped if -t=<d> option is used, otherwise strippedness is dependent on -s option]\"\n" );
System.out.println( " : -t=<d> threshold for similarity (0.0 to 1.0)" );
System.out.println( " : -n no branch lengths in outfile for evaluator phylogenies" );
System.out.println();
System.out.println( " : -t=<d> threshold for similarity (0.0 to 1.0)" );
System.out.println( " : -n no branch lengths in outfile for evaluator phylogenies" );
System.out.println();
else {
if ( !branch_lengths_in_ev_out ) {
ForesterUtil.fatalError( count_support.PRG_NAME,
else {
if ( !branch_lengths_in_ev_out ) {
ForesterUtil.fatalError( count_support.PRG_NAME,
p = factory.create( phylogeny_infile, pp )[ 0 ];
}
catch ( final Exception e ) {
p = factory.create( phylogeny_infile, pp )[ 0 ];
}
catch ( final Exception e ) {
ev = factory.create( evaluators_infile, pp );
}
catch ( final Exception e ) {
ev = factory.create( evaluators_infile, pp );
}
catch ( final Exception e ) {
}
if ( ( threshhold < 0 ) || ( threshhold > 1.0 ) ) {
ForesterUtil.fatalError( count_support.PRG_NAME,
}
if ( ( threshhold < 0 ) || ( threshhold > 1.0 ) ) {
ForesterUtil.fatalError( count_support.PRG_NAME,
if ( threshhold >= 0 ) {
count_support.normalizeSupport( p, 100, evaluator_phylogenies_above_threshold.size() );
System.out.println( evaluator_phylogenies_above_threshold.size() + " out of " + ev.length
if ( threshhold >= 0 ) {
count_support.normalizeSupport( p, 100, evaluator_phylogenies_above_threshold.size() );
System.out.println( evaluator_phylogenies_above_threshold.size() + " out of " + ev.length
final PhylogenyWriter w = new PhylogenyWriter();
if ( evaluator_phylogenies_above_threshold != null ) {
System.out.println( "Writing " + evaluator_phylogenies_above_threshold.size()
final PhylogenyWriter w = new PhylogenyWriter();
if ( evaluator_phylogenies_above_threshold != null ) {
System.out.println( "Writing " + evaluator_phylogenies_above_threshold.size()
if ( count_support.WRITE_EVALUATORS_AS_NHX ) {
w.toNewHampshireX( evaluator_phylogenies_above_threshold, evaluators_outfile, ";"
+ ForesterUtil.getLineSeparator() );
}
else {
w.toNewHampshire( evaluator_phylogenies_above_threshold,
if ( count_support.WRITE_EVALUATORS_AS_NHX ) {
w.toNewHampshireX( evaluator_phylogenies_above_threshold, evaluators_outfile, ";"
+ ForesterUtil.getLineSeparator() );
}
else {
w.toNewHampshire( evaluator_phylogenies_above_threshold,
branch_lengths_in_ev_out,
evaluators_outfile,
";" + ForesterUtil.getLineSeparator() );
branch_lengths_in_ev_out,
evaluators_outfile,
";" + ForesterUtil.getLineSeparator() );
- w.toNewHampshire( Arrays.asList( ev ), true, branch_lengths_in_ev_out, evaluators_outfile, ";"
+ w.toNewHampshire( Arrays.asList( ev ), branch_lengths_in_ev_out, evaluators_outfile, ";"