X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fapplication%2Fphyloxml_converter.java;h=0dac775e0b5edc617b65496e47e93fabe01ee1cb;hb=f4c563596b6968fd343fdab7fa32b54431a17f2e;hp=8951e18bd38d80752984a6cf6db830fd19908aee;hpb=8161eb0ffe094f29eeefbb4e71eabcd0884c5e63;p=jalview.git diff --git a/forester/java/src/org/forester/application/phyloxml_converter.java b/forester/java/src/org/forester/application/phyloxml_converter.java index 8951e18..0dac775 100644 --- a/forester/java/src/org/forester/application/phyloxml_converter.java +++ b/forester/java/src/org/forester/application/phyloxml_converter.java @@ -22,7 +22,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; @@ -70,10 +70,10 @@ public class phyloxml_converter { final static private String REPLACE_UNDER_SCORES = "ru"; final static private String IGNORE_QUOTES = "iqs"; final static private String PRG_NAME = "phyloxml_converter"; - final static private String PRG_VERSION = "1.301"; - final static private String PRG_DATE = "2012.08.31"; - final static private String E_MAIL = "phylosoft@gmail.com"; - final static private String WWW = "www.phylosoft.org/forester/"; + final static private String PRG_VERSION = "1.302"; + final static private String PRG_DATE = "140516"; + final static private String E_MAIL = "phyloxml@gmail.com"; + final static private String WWW = "sites.google.com/site/cmzmasek/home/software/forester"; final static private boolean SPECIAL = false; public static void main( final String args[] ) throws PhyloXmlDataFormatException { @@ -210,16 +210,17 @@ public class phyloxml_converter { && ( field != PhylogenyMethods.PhylogenyNodeField.TAXONOMY_SCIENTIFIC_NAME ) ) { if ( extr_taxonomy_pf_only ) { ( ( NHXParser ) parser ) - .setTaxonomyExtraction( PhylogenyMethods.TAXONOMY_EXTRACTION.PFAM_STYLE_ONLY ); + .setTaxonomyExtraction( NHXParser.TAXONOMY_EXTRACTION.PFAM_STYLE_STRICT ); replace_underscores = false; } else if ( extr_taxonomy ) { - ( ( NHXParser ) parser ).setTaxonomyExtraction( PhylogenyMethods.TAXONOMY_EXTRACTION.YES ); + ( ( NHXParser ) parser ) + .setTaxonomyExtraction( NHXParser.TAXONOMY_EXTRACTION.PFAM_STYLE_RELAXED ); replace_underscores = false; } } else { - ( ( NHXParser ) parser ).setTaxonomyExtraction( PhylogenyMethods.TAXONOMY_EXTRACTION.NO ); + ( ( NHXParser ) parser ).setTaxonomyExtraction( NHXParser.TAXONOMY_EXTRACTION.NO ); } ( ( NHXParser ) parser ).setReplaceUnderscores( replace_underscores ); ( ( NHXParser ) parser ).setIgnoreQuotes( ignore_quotes ); @@ -359,44 +360,43 @@ public class phyloxml_converter { System.out.println( "Usage:" ); System.out.println(); System.out - .println( PRG_NAME - + " -" - + FIELD_OPTION - + "= [options] " ); + .println( PRG_NAME + + " -" + + FIELD_OPTION + + "= [options] " ); System.out.println(); System.out.println( " field options: " ); System.out.println(); - System.out.println( " " + FIELD_CLADE_NAME + ": transfer name to node/clade name" ); - System.out.println( " " + FIELD_TAXONOMY_CODE + ": transfer name to taxonomy code" ); - System.out.println( " " + FIELD_TAXONOMY_SCI_NAME + ": transfer name to taxonomy scientific name" ); - System.out.println( " " + FIELD_TAXONOMY_COMM_NAME + ": transfer name to taxonomy common name" ); - System.out.println( " " + FIELD_SEQUENCE_GENE_NAME + ": transfer name to sequence name" ); - System.out.println( " " + FIELD_SEQUENCE_SYMBOL + ": transfer name to sequence symbol" ); - System.out - .println( " " - + FIELD_UNIPROT_TAXONOMY_ID_SPLIT_1 - + ": transfer/split name to taxonomy uniprot identifier\n (split at underscore if \"id_name\" pattern, e.g. \"817_SusD\")" ); - System.out - .println( " " - + FIELD_UNIPROT_TAXONOMY_ID_SPLIT_2 - + ": transfer/split name to taxonomy uniprot identifier\n (split at underscore if \"name_id\" pattern, e.g. \"SusD_817\")" ); + System.out.println( " " + FIELD_CLADE_NAME + ": transfer name to node/clade name" ); + System.out.println( " " + FIELD_TAXONOMY_CODE + ": transfer name to taxonomy code" ); + System.out.println( " " + FIELD_TAXONOMY_SCI_NAME + ": transfer name to taxonomy scientific name" ); + System.out.println( " " + FIELD_TAXONOMY_COMM_NAME + ": transfer name to taxonomy common name" ); + System.out.println( " " + FIELD_SEQUENCE_GENE_NAME + ": transfer name to sequence name" ); + System.out.println( " " + FIELD_SEQUENCE_SYMBOL + ": transfer name to sequence symbol" ); + System.out.println( " " + FIELD_DUMMY + ": to convert NHX formatted trees to phyloXML" ); + System.out.println( " " + FIELD_UNIPROT_TAXONOMY_ID_SPLIT_1 + + ": transfer/split name to taxonomy uniprot identifier" ); + System.out.println( " (split at underscore if \"id_name\" pattern, e.g. \"817_SusD\")" ); + System.out.println( " " + FIELD_UNIPROT_TAXONOMY_ID_SPLIT_2 + + ": transfer/split name to taxonomy uniprot identifier" ); + System.out.println( " (split at underscore if \"name_id\" pattern, e.g. \"SusD_817\")" ); System.out.println(); System.out.println( " options: " ); System.out.println( " -" + INTERNAL_NAMES_ARE_BOOT_SUPPPORT - + " : internal names in NH or NHX tree are bootstrap support values" ); + + " : internal names in NH or NHX tree are bootstrap support values" ); System.out.println( " -" + REPLACE_UNDER_SCORES + " : replace all underscores with spaces" ); System.out.println( " -" + MIDPOINT_REROOT + " : midpoint reroot" ); System.out.println( " -" + ORDER_SUBTREES + " : order subtrees" ); System.out - .println( " -" - + EXTRACT_TAXONOMY - + " : extract taxonomy to taxonomy code from \"seqname_TAXON\"-style names (cannot be used with the following field options: " - + FIELD_TAXONOMY_CODE + ", " + FIELD_TAXONOMY_COMM_NAME + ", " + FIELD_TAXONOMY_SCI_NAME + ")" ); + .println( " -" + + EXTRACT_TAXONOMY + + " : extract taxonomy to taxonomy code from \"seqname_TAXON\"-style names (cannot be used with the following field options: " + + FIELD_TAXONOMY_CODE + ", " + FIELD_TAXONOMY_COMM_NAME + ", " + FIELD_TAXONOMY_SCI_NAME + ")" ); System.out - .println( " -" - + EXTRACT_TAXONOMY_PF - + " : extract taxonomy to taxonomy code from Pfam (\"seqname_TAXON/x-y\") style names only (cannot be used with the following field options: " - + FIELD_TAXONOMY_CODE + ", " + FIELD_TAXONOMY_COMM_NAME + ", " + FIELD_TAXONOMY_SCI_NAME + ")" ); + .println( " -" + + EXTRACT_TAXONOMY_PF + + " : extract taxonomy to taxonomy code from Pfam (\"seqname_TAXON/x-y\") style names only (cannot be used with the following field options: " + + FIELD_TAXONOMY_CODE + ", " + FIELD_TAXONOMY_COMM_NAME + ", " + FIELD_TAXONOMY_SCI_NAME + ")" ); System.out.println( " -" + NO_TREE_LEVEL_INDENDATION + " : no tree level indendation in phyloXML output" ); System.out.println( " -" + IGNORE_QUOTES + ": ignore quotes and whitespace (e.g. \"a b\" becomes ab)" ); System.out.println();