private enum BASE_ALGORITHM {
GSDI, SDI
}
- final static public boolean REPLACE_UNDERSCORES_IN_NH_SPECIES_TREE = true;
- final static private String ALLOW_STRIPPING_OF_GENE_TREE_OPTION = "g";
- final static private String SDI_OPTION = "b";
- final static private String MOST_PARSIMONIOUS_OPTION = "m";
- final static private String GUESS_FORMAT_OF_SPECIES_TREE = "q";
- final static private String HELP_OPTION_1 = "help";
- final static private String HELP_OPTION_2 = "h";
- final static private String DEFAULT_OUTFILE_SUFFIX = "_gsdi_out.xml";
- final static private String SUFFIX_FOR_LIST_OF_STIPPED_GENE_TREE_NODES = "_stripped_gene_tree_nodes.txt";
- final static private String SUFFIX_FOR_SPECIES_TREE_USED = "_species_tree_used.xml";
- final static private String LOGFILE_SUFFIX = "_gsdi_log.txt";
- final static private String PRG_NAME = "gsdi";
- final static private String PRG_VERSION = "0.901";
- final static private String PRG_DATE = "120608";
- final static private String PRG_DESC = "general speciation duplication inference";
- final static private String E_MAIL = "phylosoft@gmail.com";
- final static private String WWW = "www.phylosoft.org/forester";
+ final static public boolean REPLACE_UNDERSCORES_IN_NH_SPECIES_TREE = true;
+ final static private String ALLOW_STRIPPING_OF_GENE_TREE_OPTION = "g";
+ final static private String SDISE_OPTION = "b";
+ final static private String MOST_PARSIMONIOUS_OPTION = "m";
+ final static private String GUESS_FORMAT_OF_SPECIES_TREE = "q";
+ final static private String HELP_OPTION_1 = "help";
+ final static private String HELP_OPTION_2 = "h";
+ final static private String DEFAULT_OUTFILE_SUFFIX = "_gsdi_out.xml";
+ final static private String SUFFIX_FOR_SPECIES_TREE_USED = "_species_tree_used.xml";
+ final static private String LOGFILE_SUFFIX = "_gsdi_log.txt";
+ final static private String PRG_NAME = "gsdi";
+ final static private String PRG_VERSION = "1.000";
+ final static private String PRG_DATE = "120608";
+ final static private String PRG_DESC = "general speciation duplication inference";
+ final static private String E_MAIL = "phylosoft@gmail.com";
+ final static private String WWW = "www.phylosoft.org/forester";
public static void main( final String args[] ) {
try {
System.exit( -1 );
}
final List<String> allowed_options = new ArrayList<String>();
- allowed_options.add( gsdi.SDI_OPTION );
+ allowed_options.add( gsdi.SDISE_OPTION );
allowed_options.add( gsdi.GUESS_FORMAT_OF_SPECIES_TREE );
allowed_options.add( gsdi.MOST_PARSIMONIOUS_OPTION );
allowed_options.add( gsdi.ALLOW_STRIPPING_OF_GENE_TREE_OPTION );
boolean most_parsimonous_duplication_model = false;
boolean species_tree_in_phyloxml = true;
boolean allow_stripping_of_gene_tree = false;
- if ( cla.isOptionSet( gsdi.SDI_OPTION ) ) {
+ if ( cla.isOptionSet( gsdi.SDISE_OPTION ) ) {
base_algorithm = BASE_ALGORITHM.SDI;
}
if ( cla.isOptionSet( gsdi.MOST_PARSIMONIOUS_OPTION ) ) {
private static void print_help() {
System.out.println( "Usage: " + gsdi.PRG_NAME
- + " [-options] <gene tree in phyloXML format> <species tree in phyloXML format> [outfile]" );
+ + " [-options] <gene tree in phyloXML format> <species tree> [outfile]" );
System.out.println();
System.out.println( "Options:" );
- // System.out.println( " -" + gsdi.ALLOW_STRIPPING_OF_GENE_TREE_OPTION + ": to allow stripping of gene tree nodes without a matching species in the species tree (writes list of stripped nodes to " + );
- System.out.println( " -" + gsdi.SDI_OPTION + ": to use SDI algorithm instead of GSDI algorithm" );//TODO gsdi.ALLOW_STRIPPING_OF_GENE_TREE_OPTION not allowed
+ System.out.println( " -" + gsdi.ALLOW_STRIPPING_OF_GENE_TREE_OPTION
+ + ": to allow stripping of gene tree nodes without a matching species" );
System.out.println( " -" + gsdi.MOST_PARSIMONIOUS_OPTION
+ ": use most parimonious duplication model for GSDI: " );
System.out.println( " assign nodes as speciations which would otherwise be assiged" );
- System.out.println( " as unknown because of polytomies in the species tree" );
+ System.out.println( " as potential duplications dueof polytomies in the species tree" );
System.out.println( " -" + gsdi.GUESS_FORMAT_OF_SPECIES_TREE
+ ": to allow species tree in other formats than phyloXML (i.e. Newick, NHX, Nexus)" );
- System.out.println();
- System.out.println( "Species tree:" );
- System.out
- .println( " In phyloXML format (unless option -"
- + gsdi.GUESS_FORMAT_OF_SPECIES_TREE
- + " is used, in which case the species matching between gene tree and species tree must be via scientific name), with taxonomy data in appropriate fields" );
+ System.out.println( " -" + gsdi.SDISE_OPTION
+ + ": to use SDIse algorithm instead of GSDI algorithm (for binary species trees)" );
System.out.println();
System.out.println( "Gene tree:" );
- System.out.println( " In phyloXM format, with taxonomy and sequence data in appropriate fields" );
+ System.out.println( " in phyloXM format, with taxonomy and sequence data in appropriate fields" );
+ System.out.println();
+ System.out.println( "Species tree:" );
+ System.out.println( " in phyloXML format (unless option -" + gsdi.GUESS_FORMAT_OF_SPECIES_TREE + " is used)" );
System.out.println();
- System.out.println( "Example:" );
- // System.out.println( "gsdi
- // System.out.println();
- System.out.println( "Note -- GSDI algorithm is under development" );
+ System.out.println( "Example: gsdi -" + ALLOW_STRIPPING_OF_GENE_TREE_OPTION
+ + " gene_tree.xml tree_of_life.xml out.xml" );
System.out.println();
}
}