ropensci / taxize Goto Github PK
View Code? Open in Web Editor NEWA taxonomic toolbelt for R
Home Page: https://docs.ropensci.org/taxize
License: Other
A taxonomic toolbelt for R
Home Page: https://docs.ropensci.org/taxize
License: Other
Write functions for http://www.try-db.org.
on testthat::check() I get:
* checking tests ...
Running 'test-all.R' [5s/69s]
ERROR
Running the tests in 'tests/test-all.R' failed.
Last 13 lines of output:
itis_taxrank : http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=202385
..
iucn_summary : ..
phylomatic_tree : http://www.itis.gov/ITISWebService/services/ITISService/getFullHierarchyFromTSN?tsn=36616
http://www.itis.gov/ITISWebService/services/ITISService/getFullHierarchyFromTSN?tsn=19322
http://www.itis.gov/ITISWebService/services/ITISService/getFullHierarchyFromTSN?tsn=183327
...
tp_acceptednames : 4
tp_namedistributions : 5
tp_namereferences : Error in getOption("tropicoskey", stop("need an API key for Tropicos")) :
need an API key for Tropicos
Calls: test_package ... eval -> eval -> tp_namereferences -> paste -> getOption
Execution halted
Error: Command failed (1)
tropicos tests are back in and appear to be working so far. @Edild can you check and see if the tropicos tests are working on your end? I submitted the package to Win Builder to see if it passes checks on windows.
I emailed the ITIS folks to see if they can fix this.
I get on check
I also get
What do you run, Linux/Windows? I wonder if I should change something in my computers or R settings?
Add also the other four databases from freshwaterecology.com to fresh_*
Using classification(), we could make up a function to contruct species trees from taxonomy.
Sure they may not reflect phylogeny and user should be cautious, but when there is no molecular information available...
-getkey
-capwords
Apparently you can't get a download of synonyms, but you can get .csv links for each plant family for accepted names, store these in data file, then give fxn for pulling down/updating data, etc.
Related to issue #45
e.g., can do with the new col_*
functions for the catalog of life probably
I submitted to the Windows checker, and there is a note about doMC being suggested, but not available for testing. Do you think this is a problem? I don't think it is, but perhaps you do?
Can't figure out how to grab different list elements in the output from TNRS. Something's funky...
then put tests back in to v0.0.3 when they are fixed
Sound okay @Edild ?
ritis functions are called right now from the itis
function, but we can just define the functions within the itis.R file, and not export them so we don't bog down the manual with tons of functions. Does this sound okay @Edild ?
itis does not return anything, which breaks some functions (eg get_tsn).
itis("Ursus", "searchbyscientificname")
Will take a look at it...
Suggested by Kay Cichini
will push up soon.
ubio_namebank(searchName = "elephant", sci = 1, vern = 0)
## Error: object of type 'externalptr' is not subsettable
I think the error comes from content()...
See also the vignette iin my 'clean' branch...
Add NAMESPACE, DESCRIPTION, functions file,
Can't run examples from eol_hierachy:
eol_hierarchy('34345893')
Opening and ending tag mismatch: hr line 5 and body
Opening and ending tag mismatch: body line 3 and html
Premature end of data in tag html line 1
Error: 1: Opening and ending tag mismatch: hr line 5 and body
2: Opening and ending tag mismatch: body line 3 and html
3: Premature end of data in tag html line 1
Did try the knitr-vignette way (since we have already a markdown-template), however could not get it passing R CMD check.
Will rewrite it in Latex.
In cases where the returned data.frame is very large, it would be nice to have the dialogue, e.g,:
More than one TSN found for species ' Quercus '!
Enter rowname of species to take:
be below the data.frame
e.g. run this to see what I mean:
classification(get_tsn(c("Quercus", "Pinus"), 'sciname'))
Currently when there is more then one tsn found, get_tsn asks which one to take.
But it should first look if there is a direct match (and than taking this).
SP.NAMES <- c("Clostridium", "Amanita", "Abies", "Lynx")
require(taxize)
tsn <- get_tsn(SP.NAMES)
asks 3 times (always one). A simple match (lowercase) between input and combinedname should solve this. And only if there is no direct match the user should be promted.
From Simon Goring:
"So, as far as the error in get_phylomatic_tree, I think it's actually
a hard limit on the length of the text string that gets sent out. It
works out to about 200 species for me, I'm not sure how many
characters that is, but I bet you could just generate a random string
of increasing length to figure it out."
Just an idea: shouldn't get_tsn() only return the tsn-numbers?
So no need for a) 'itistermscomname', 'itistermssciname', or 'tsnsvernacular', 'tsnfullhir', 'tsnhirdown',
and b)
the data.frame returned by the ritis functions (only the tsn col is necessary).
I dont know, there are two ways: Change all the ritis functions
or
keep them as they are and wrap their output into get_tsn. (as in my previously closed pull request?)
I think the second way would be less work? What do you think?
What going on here?
> require(taxize)
> get_tsn("Chironomus riparius", "anymatch", by_ = "name")
Error: Bad Request
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] taxize_0.0.1 stringr_0.6.1 RPostgreSQL_0.3-2 DBI_0.2-5
loaded via a namespace (and not attached):
[1] digest_0.5.2 httr_0.1.1 plyr_1.7.1 RCurl_1.91-1 ritis_0.0.1 RJSONIO_0.99-0 tools_2.15.1 XML_3.93-0
However this species is in ITIT under TSN 129313 (http://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value=129313)
Also something for taxize?
http://tolweb.org/tree/home.pages/downloadtree.html
From Carl Boettiger:
One thing that would be really useful to get from taxize is: given a higher taxanomic level, like class, return all the genus names that it includes. I seems I cannot search treebase by class (I can for fishbase at least), so it would be nice to simply get a list of every genus in the class and pipe that through the treebase search as a work around. What do you think?
I can then pull some traits for fish down from fishbase, and would have a working example combining three packages.
treebase and fishbase can pull down publication info, so it wouldn't be too much further to wrap in mendeley, though not sure why it would be useful -- readership is probably a poor proxy for data quality, but it would be possible.
Currently we have ping, search and hierarchy.
There are also others: http://eol.org/api
On issuing command
install_github('taxize_','ropensci')
The error is
Error in .install_package_code_files(".", instdir) :
files in 'C:/Users/Vijay/AppData/Local/Temp/RtmpygH3RG/R.INSTALL228835225118/taxize/R'
missing from 'Collate' field:
gni_parse.R
ERROR: unable to collate and parse R files for package 'taxize'
Hi,
I've some trouble installing packages:
see my R history here: https://www.dropbox.com/s/gfxsleibq5lk9yw/log_ropensci.txt
Regards,
Kay
When using get_tsn
, sometimes the given options don't match your input. Perhaps you can add an option that is "none of the above", which will just insert a character string e.g, "no_match", so that you can continue on in case you are calling get_tsn
in an apply call or for loop.
Carl got errors with:
tree <- get_phylomatic_tree(phyformat, 'TRUE', 'POST', 'new', 'FALSE')
((annona_cherimola:0.333333,annona_muricata:45.333336)annona:12.666667)euphyllophyte:1.000000;
Warning message:
In read.tree(text = z) : empty character string.
This is a problem with the 'POST' format Phylomatic query, possibly just use GET format queries.
Possibly interface with Rod Page's taxonomy database 'TBMap', that already queries many taxonomic sources, including ITIS. No response from from Rod Page on email so far
The point of the function is to automate getting all data you would like downstream of a certain taxon. For example, you may want to get all the families (and their TSNs) with the Class Insecta. I think I may have a working version somewhere on my machine, will try to dig it up.
The reason we need this stems from the fact that the ITIS API only allows you to go down to direct children using their method getHierarchyDownFromTSN
(e.g., you can only get species within a genus, not subspecies too)..
Sometimes you get a data.frame from get_tsn
and get_uid
that is too large to scroll up to see al the options. For example:
get_tsn("Andrena", "sciname")
gives a huge data.frame with 1627 rows, in which you can't scroll to the top to see all the options in RStudio. It seems that you can scroll to the top in regular R.app though
Is there any way to get around this?
To avoid problems with multiple platform OS's
Some of them are not really needed or don't make much sense anymore now that ritis
is on CRAN here.
Apologies for this, but it needed to be done
The link to the taxize Tutorial is broken.
Also, would it be worth to migrate the Tutorial to the github-wiki?
I am facing some problems with the ITIS-API:
df <- read.table(header = TRUE, as.is = TRUE, text = 'SVN Taxon CountValue
1 WP220110711 Zaitzevia.parvula 484
2 WP220110711 Tvetenia 109
3 WP220110711 Tubificidae 1054
4 WP220110711 Sweltsa 11
5 WP220110711 Suwallia.pallidula 32
6 WP220110711 Stempellinella 11 ')
df$Taxon <- gsub("\\.", " ", df$Taxon)
require(taxize)
#query itis
get_tsn(df$Taxon)
Retrieving data for species ' Zaitzevia parvula '
Error in function (type, msg, asError = TRUE) :
Recv failure: Connection reset by peer
The same with the itis_* functions
llply(df$Taxon, function(x) itis(x, "searchbyscientificname"))
Error in function (type, msg, asError = TRUE) :
Recv failure: Connection reset by peer
I tried a Sys.sleep() before every request, but that didn't fix the problem...
Any suggestions? I think the problem is on the server-side ?!
There are two packages that I have taxize depend on: ritis and rentrez. I just submitted ritis to CRAN, so hopefully that will be up soon. rentrez may be a bit farther away - perhaps we can just use a different package that hits NCBI database until rentrez is up? Or we could keep rentrez in, but when you run R CMD CHECK it doesn't pass because rentrez is not on CRAN yet. Thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.