Closed bw4sz closed 10 years ago
Hi @bw4sz . Thanks for getting in touch. It's especially nice to have bug reports/questions on Github where the software is developed.
I'll take a look and get back to you asap.
The phylomatic_tree
function is undergoing changes, I'll try to get it fixed up soon
Thanks Scott, sorry that was totally rude of me to just to leave a handle,slipped my mind.
Ben Weinstein Dept. of Ecology of Evolution Stony Brook University
Thanks for your quick response. Playing around with it right now, seeing if i can force it to tax genus names, since there is little hope that sequences should exist for these relatively rare tropical plants.
No worries. Handle is just fine with me!
If it helps, here is an added twist, the names exist in the global name resolve function, if spelled correctly.
gnr_resolve("Guzmania jaramilloi")
## submitted_name matched_name data_source_title score
## 1 Guzmania jaramilloi Guzmania jaramilloi Freebase 0.988
## 2 Guzmania jaramilloi Guzmania jaramilloi EOL 0.988
## 3 Guzmania jaramilloi Guzmania jaramilloi uBio NameBank 0.988
gnr_resolve("Guzmania_jaramilloi")
## Error: arguments imply differing number of rows: 1, 0
get_uid("Guzmania jaramilloi")
##
## Retrieving data for taxon 'Guzmania jaramilloi'
##
## Not found. Consider checking the spelling or alternate classification
## [1] NA
## attr(,"match")
## [1] "not found"
## attr(,"class")
## [1] "uid"
get_uid("Guzmania_jaramilloi")
##
## Retrieving data for taxon 'Guzmania_jaramilloi'
##
## Not found. Consider checking the spelling or alternate classification
## [1] NA
## attr(,"match")
## [1] "not found"
## attr(,"class")
## [1] "uid"
Thanks!
wrt the gnr_resolve
function and get_uid
, If you try get_ids
you can search many sources like
get_ids("Guzmania jaramilloi", db=c('ncbi','itis','tropicos','eol','col'))
$ncbi
Guzmania jaramilloi
NA
attr(,"match")
[1] "not found"
attr(,"class")
[1] "uid"
$itis
Guzmania jaramilloi
NA
attr(,"match")
[1] "found"
attr(,"class")
[1] "tsn"
$tropicos
Guzmania jaramilloi
4303343
attr(,"class")
[1] "tpsid"
$eol
Guzmania jaramilloi
"24936055"
attr(,"class")
[1] "eolid"
$col
Guzmania jaramilloi
"9746606"
attr(,"class")
[1] "colid"
attr(,"class")
[1] "ids"
You can see that tropicos, eol, and col do have that species, so then you could do
id = get_ids("Guzmania jaramilloi", db='col')
classification(id)
$col
$col$`9746606`
name rank
1 Plantae Kingdom
2 Tracheophyta Phylum
3 Liliopsida Class
4 Poales Order
5 Bromeliaceae Family
6 Guzmania Genus
attr(,"db")
[1] "col"
Make sense?
You should remove underscores from your names, e.g., like:
mynames <- c('name_one', 'name_two')
gsub('_', ' ', mynames)
[1] "name one" "name two"
Note that you can use the function tnrs
in taxize
to do the same thing as ResolveNames
in rPlant
like:
tnrs(gsub("_", " ", nam), source_="iPlant_TNRS")
the result
submittedname acceptedname sourceid score matchedname annotations
1 Heliconia virginalis Heliconia virginalis iPlant_TNRS 1 Heliconia virginalis Abalo & G. Morales L.
2 Guzmania amplectens Guzmania amplectens iPlant_TNRS 1 Guzmania amplectens L.B. Sm.
4 Macleania bullata Macleania bullata iPlant_TNRS 1 Macleania bullata Yeo
3 psamisia ulbrichiana Psammisia ulbrichiana iPlant_TNRS 0.98 Psammisia ulbrichiana Hoerold
5 faramae calyptrata Faramea calyptrata iPlant_TNRS 0.98 Faramea calyptrata C.M. Taylor
uri
1 http://www.tropicos.org/Name/21500105
2 http://www.tropicos.org/Name/4303223
4 http://www.tropicos.org/Name/12303377
3 http://www.tropicos.org/Name/12300394
5 http://www.tropicos.org/Name/50151859
Here's an example of a genus level phylogeny. Note that using the source tree "smith2011" doesn't work, at least in this case
taxa <- c("Poa", "Phlox", "Helianthus")
tree <- phylomatic_tree(taxa=taxa, storedtree='R20120829', get='POST')
plot(tree)
Phylogenetic tree with 3 tips and 2 internal nodes.
Tip labels:
[1] "poa" "phlox" "helianthus"
Node labels:
[1] "poales_to_asterales" "ericales_to_asterales"
Rooted; no branch lengths.
Hey @bw4sz Did you have any further questions? If not, I'll close this issue.
closing
Comparison of rPLant and Taxize in resolving plant names from Maquipucuna Ecuador
I really love the tools in taxize, and am very eager to try the phylomatic options. For my workflow, i was first using the rPlant ResolveNames fuction because of its nice fuzzy matching of misspelled species (lots of field assistants!). Taxize doesn't seem to have the same level of fuzzy matching, so i decided on a two step process.
First use rPlant's resolve names, then run the outputs of the rPlant search into taxize to check if there are have been taxonomy changes. I'm finding that many records in rPlant, and corroborated online as good species names, are failing to be found within taxize.
As a quick reference here are the eol pages for five sample species http://eol.org/pages/1118538/overview http://eol.org/pages/8767588/overview http://eol.org/pages/1118438/overview http://eol.org/pages/8767461/overview (although ironically i can see that the images for this species are of the wrong genus on eol) http://eol.org/pages/1107632/overview
Also works from another source: http://www.theplantlist.org/tpl/record/kew-84010
My ultimate goal is to get a species list of accepted names, such that i can input them into the phylomatic_tree, i'm aiming for a genus level phylogeny, but that's the next question.
As always i appreciate your work, insight, and leadership. The RopenSci community is an incredible project.