Skip to content

Instantly share code, notes, and snippets.

@jimallman
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimallman/966bff09c95a25bce990 to your computer and use it in GitHub Desktop.
Save jimallman/966bff09c95a25bce990 to your computer and use it in GitHub Desktop.
Find trees/studies containing a given taxon (is this correct?)
/*
Here's a curl call (results below) to search for trees containing Mammalia:
curl -X POST http://api.opentreeoflife.org/oti/v1/singlePropertySearchForTreeNodes -H "content-type:application/json" -d '{"property":"ot:ottTaxonName", "value":"Mammalia", "verbose":"true"}'
For just the element IDs, omit the "verbose" argument or set it to "false".
To skip node-level results and just see matching trees and study information, use singlePropertySearchForTrees instead:
curl -X POST http://api.opentreeoflife.org/oti/v1/singlePropertySearchForTrees -H "content-type:application/json" -d '{"property":"ot:ottTaxonName", "value":"Mammalia", "verbose":"false"}'
*/
{
"matched_studies" : [ {
"ot:studyPublicationReference" : "Leigh J., Susko E., Baumgartner M., & Roger A. 2007. Testing Phylogenetic Congruence in Phylogenomic Analysis. Systematic Biology, 57(1): 104-115.",
"is_deprecated" : false,
"ot:studyYear" : 2007,
"matched_trees" : [ {
"is_deprecated" : false,
"ot:branchLengthMode" : "ot:substitutionCount",
"matched_nodes" : [ {
"ot:isLeaf" : true,
"ot:ottId" : 244265,
"ot:treebaseOTUId" : "Tl28251",
"ot:ottTaxonName" : "Mammalia",
"ot:originalLabel" : "Mammalia"
} ],
"ot:branchLengthDescription" : "",
"ot:studyId" : "309",
"oti_tree_id" : "309_tree255"
}, {
"is_deprecated" : false,
"ot:branchLengthMode" : "ot:substitutionCount",
"matched_nodes" : [ {
"ot:isLeaf" : true,
"ot:ottId" : 244265,
"ot:treebaseOTUId" : "Tl28251",
"ot:ottTaxonName" : "Mammalia",
"ot:originalLabel" : "Mammalia"
} ],
"ot:branchLengthDescription" : "",
"ot:studyId" : "309",
"oti_tree_id" : "309_tree254"
}, {
"is_deprecated" : false,
"ot:branchLengthMode" : "ot:substitutionCount",
"matched_nodes" : [ {
"ot:isLeaf" : true,
"ot:ottId" : 244265,
"ot:treebaseOTUId" : "Tl28251",
"ot:ottTaxonName" : "Mammalia",
"ot:originalLabel" : "Mammalia"
} ],
"ot:branchLengthDescription" : "",
"ot:studyId" : "309",
"oti_tree_id" : "309_tree256"
}, {
"is_deprecated" : false,
"ot:branchLengthMode" : "ot:substitutionCount",
"matched_nodes" : [ {
"ot:isLeaf" : true,
"ot:ottId" : 244265,
"ot:treebaseOTUId" : "Tl28251",
"ot:ottTaxonName" : "Mammalia",
"ot:originalLabel" : "Mammalia"
} ],
"ot:branchLengthDescription" : "",
"ot:studyId" : "309",
"oti_tree_id" : "309_tree257"
} ],
"ot:studyPublication" : "http://dx.doi.org/10.1080/10635150801910436",
"ot:curatorName" : "Rick Ree",
"ot:studyId" : "309",
"ot:dataDeposit" : "http://purl.org/phylo/treebase/phylows/study/TB2:S1881"
}, {
"ot:studyPublicationReference" : "Evans, N.M., & Cartwright P. 2010. The phylogenetic position of Myxozoa: exploring conflicting signals in phylogenomic and ribosomal datasets. Molecular Biology and Evolution 27 (12): 2733-2746.",
"is_deprecated" : false,
"ot:focalCladeOTTTaxonName" : "Metazoa",
"ot:studyYear" : 2010,
"matched_trees" : [ {
"is_deprecated" : false,
"ot:tag" : "Delete me",
"ot:branchLengthMode" : "ot:substitutionCount",
"matched_nodes" : [ {
"ot:isLeaf" : true,
"ot:ottId" : 244265,
"ot:treebaseOTUId" : "Tl294427",
"ot:ottTaxonName" : "Mammalia",
"ot:originalLabel" : "Mammalia"
} ],
"ot:branchLengthDescription" : "",
"ot:studyId" : "2418",
"oti_tree_id" : "2418_tree5103"
}, {
"is_deprecated" : false,
"ot:tag" : "choose me",
"ot:branchLengthMode" : "ot:substitutionCount",
"matched_nodes" : [ {
"ot:isLeaf" : true,
"ot:ottId" : 244265,
"ot:treebaseOTUId" : "Tl294427",
"ot:ottTaxonName" : "Mammalia",
"ot:originalLabel" : "Mammalia"
} ],
"ot:branchLengthDescription" : "",
"ot:studyId" : "2418",
"oti_tree_id" : "2418_tree6152"
} ],
"ot:studyPublication" : "http://dx.doi.org/10.1093/molbev/msq159",
"ot:curatorName" : "Chris Owen",
"ot:focalClade" : 691846,
"ot:studyId" : "2418",
"ot:dataDeposit" : "http://purl.org/phylo/treebase/phylows/study/TB2:S10454"
} ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment