X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2Fwebservices%2FWebserviceUtil.java;h=6999f0dcd10cdaf9568f332a4e1d0a2d67fe2ac7;hb=f6b29c53c14e1ef16e4cd614c7f9465e0073309e;hp=5efee814cc5faaf69d904a58200d7f5763f83ba6;hpb=6726c4b54521e8f4f1ca3e293124776a507cbdfa;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/webservices/WebserviceUtil.java b/forester/java/src/org/forester/archaeopteryx/webservices/WebserviceUtil.java index 5efee81..6999f0d 100644 --- a/forester/java/src/org/forester/archaeopteryx/webservices/WebserviceUtil.java +++ b/forester/java/src/org/forester/archaeopteryx/webservices/WebserviceUtil.java @@ -43,57 +43,52 @@ import org.forester.util.SequenceAccessionTools; public final class WebserviceUtil { - public static final String PFAM_INST = "pfam"; - public static final String PFAM_NAME = "Pfam"; - public static final String PFAM_SERVER = "http://pfam.janelia.org"; - public static final String TOL_NAME = "Tree of Life"; - public static final String TOL_WEBSERVER = "http://tolweb.org/onlinecontributors/app?service=external&page=xml/TreeStructureService&node_id=" - + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER; - public static final String TREE_BASE_DESC = "This data set was downloaded from TreeBASE, a relational database of phylogenetic knowledge. TreeBASE has been supported by the NSF, Harvard University, Yale University, SDSC and UC Davis. Please do not remove this acknowledgment."; - public static final String TREE_BASE_INST = "treebase"; - public static final String TREE_BASE_NAME = "TreeBASE"; - public static final String TREE_FAM_INST = "tree_fam"; - public static final String TREE_FAM_NAME = "TreeFam"; - + public static final String PFAM_INST = "pfam"; + public static final String PFAM_NAME = "Pfam"; + public static final String PFAM_SERVER = "http://pfam.xfam.org"; + public static final String TOL_NAME = "Tree of Life (ToL)"; + public static final String TOL_URL_BASE = "http://tolweb.org/onlinecontributors/app?service=external&page=xml/TreeStructureService&node_id="; + public static final String TOL_WEBSERVER = TOL_URL_BASE + + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER; + public static final String TREE_BASE_DESC = "This data set was downloaded from TreeBASE, a relational database of phylogenetic knowledge. TreeBASE has been supported by the NSF, Harvard University, Yale University, SDSC and UC Davis. Please do not remove this acknowledgment."; + public static final String TREE_BASE_INST = "treebase"; + public static final String TREE_BASE_NAME = "TreeBASE"; + public static final String TREE_FAM_INST = "tree_fam"; + public static final String TREE_FAM_NAME = "TreeFam"; + public static final String TREE_FAM_URL_BASE = "http://www.treefam.org/family/TF"; + public static final String TREEBASE_PHYLOWS_STUDY_URL_BASE = "https://treebase.org/treebase-web/phylows/study/TB2:S"; + public static final String TREEBASE_PHYLOWS_TREE_URL_BASE = "https://treebase.org/treebase-web/phylows/tree/TB2:Tr"; + + + public static List createDefaultClients() { final List clients = new ArrayList(); - clients.add( new BasicPhylogeniesWebserviceClient( TOL_NAME, - "Read Tree from Tree of Life...", - "Use ToL webservice to obtain a evolutionary tree", - "Please enter a Tree of Life node identifier\n(Examples: " - + "19386 for Cephalopoda, 2461 for Cnidaria, 2466 for Deuterostomia)", - WsPhylogenyFormat.TOL_XML_RESPONSE, - PhylogenyMethods.PhylogenyNodeField.TAXONOMY_SCIENTIFIC_NAME, - WebserviceUtil.TOL_WEBSERVER, - true, - "http://tolweb.org", - null ) ); clients.add( new BasicPhylogeniesWebserviceClient( TREE_BASE_NAME, "Read Tree(s) from TreeBASE Study...", "Use TreeBASE to obtain evolutionary tree(s) from a study", - "Please enter a TreeBASE study (\"S\") identifier (without the \"S\")\n(Examples: 15613, 15632, 14525, 14909)", + "Please enter a TreeBASE study (\"S\") identifier (without the \"S\")\n(Examples: 13246, 11662, 562, 16424, 17878, 10190, 14909, 14525, 15613, 15632)", WsPhylogenyFormat.TREEBASE_STUDY, null, - "http://purl.org/phylo/treebase/phylows/study/TB2:S" - + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER - + "?format=nexus", + TREEBASE_PHYLOWS_STUDY_URL_BASE + + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER + + "?format=nexus", true, - "http://www.treebase.org", + "https://treebase.org", TREE_BASE_INST ) ); clients.add( new BasicPhylogeniesWebserviceClient( TREE_BASE_NAME, "Read Tree from TreeBASE...", "Use TreeBASE to obtain a evolutionary tree", - "Please enter a TreeBASE tree (\"Tr\") identifier (without the \"Tr\")\n(Examples: 422, 2654, 825, 4931, 2518, 2406, 4934)", + "Please enter a TreeBASE tree (\"Tr\") identifier (without the \"Tr\")\n(Examples: 2406, 422, 2654, 825, 4931, 2518, 4934)", WsPhylogenyFormat.TREEBASE_TREE, null, - "http://purl.org/phylo/treebase/phylows/tree/TB2:Tr" - + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER - + "?format=nexus", + TREEBASE_PHYLOWS_TREE_URL_BASE + + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER + + "?format=nexus", true, - "http://www.treebase.org", + "https://treebase.org", TREE_BASE_INST ) ); clients.add( new BasicPhylogeniesWebserviceClient( PFAM_NAME, - "Read Gene Tree from Pfam...", + "Read Domain Tree from Pfam...", "Use Pfam to obtain gene trees for seed alignments", "Please enter a Pfam (PF) accession number\n(Examples: 01849 for NAC, 00452 for Bcl-2, 00046 for Homeobox)", WsPhylogenyFormat.PFAM, @@ -101,21 +96,32 @@ public final class WebserviceUtil { PFAM_SERVER + "/family/PF" + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER + "/tree/download", - false, - PFAM_SERVER, - PFAM_INST ) ); + false, + PFAM_SERVER, + PFAM_INST ) ); clients.add( new BasicPhylogeniesWebserviceClient( TREE_FAM_NAME, "Read Gene Tree from TreeFam...", "Use TreeFam to obtain a gene tree", "Please enter a TreeFam (TF) accession number\n(Examples: 101004 for Cyclin D, 315938 for Hox, 105310 for Wnt)", WsPhylogenyFormat.NHX, null, - "http://www.treefam.org/family/TF" - + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER - + "/tree/newick", + TREE_FAM_URL_BASE + + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER + + "/tree/newick", true, "http://www.treefam.org", TREE_FAM_INST ) ); + clients.add( new BasicPhylogeniesWebserviceClient( TOL_NAME, + "Read Tree from Tree of Life (ToL)...", + "Use ToL webservice to obtain a evolutionary tree", + "Please enter a Tree of Life node identifier\n(Examples: " + + "14923 for ray-finned fishes, 19386 for Cephalopoda, 2461 for Cnidaria)", + WsPhylogenyFormat.TOL_XML_RESPONSE, + PhylogenyMethods.PhylogenyNodeField.TAXONOMY_SCIENTIFIC_NAME, + WebserviceUtil.TOL_WEBSERVER, + true, + "http://tolweb.org", + null ) ); return clients; } @@ -213,9 +219,9 @@ public final class WebserviceUtil { } if ( n.getNodeData().isHasTaxonomy() && ( n.getNodeData().getTaxonomy().getIdentifier() != null ) ) { n.getNodeData() - .getTaxonomy() - .setIdentifier( new Identifier( n.getNodeData().getTaxonomy().getIdentifier().getValue(), - "ncbi" ) ); + .getTaxonomy() + .setIdentifier( new Identifier( n.getNodeData().getTaxonomy().getIdentifier().getValue(), + "ncbi" ) ); } } }