Comments (8)
Hey @Edild, let me know if the function I just added downstream2 works for you? I am attempting to grab all taxonomic names downstream from an TSN, but it's been a bit challenging.
from taxize.
@Edild - akk, downstream2 doesn't work, trying to fix it now.
from taxize.
Seems to work like a charm :) Nice!
downstream2(114989)
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=114989
http://www.itis.gov/ITISWebService/services/ITISService/getHierarchyDownFromTSN?tsn=114989
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665931
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665932
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665931
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665932
http://www.itis.gov/ITISWebService/services/ITISService/getHierarchyDownFromTSN?tsn=665931
http://www.itis.gov/ITISWebService/services/ITISService/getHierarchyDownFromTSN?tsn=665932
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=114990
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665935
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=114991
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=114992
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=114993
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665933
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665934
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665936
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=665937
$not
parentName parentTsn rankName taxonName tsn
1 Mengenillidia 665931 Family Mengeidae 114990
2 Mengenillidia 665931 Family Mengenillidae 665935
3 Stylopidia 665932 Family Stylopidae 114991
4 Stylopidia 665932 Family Elenchidae 114992
5 Stylopidia 665932 Family Halictophagidae 114993
6 Stylopidia 665932 Family Myrmecolacidae 665933
7 Stylopidia 665932 Family Corioxenidae 665934
8 Stylopidia 665932 Family Bohartillidae 665936
9 Stylopidia 665932 Family Callipharixenidae 665937
I think this could be also easily done from the NCBI taxonomy-browser(http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=30261)... Using rentrez und get_uid()... I`ll make up a function/method these days...
Are there any restrictions with the usage of the ITIS-Api (eg like the NCBI-API. only 3 requests per second)? Not that they block any IP...
from taxize.
Cool. So it does work sometimes, but sometimes not. Working on it now.
from taxize.
Returns all Families: For me all queries worked yet...
> check <- downstream2(101594)
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=101594
http://www.itis.gov/ITISWebService/services/ITISService/getHierarchyDownFromTSN?tsn=101594
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=101596
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=101659
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=101664
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=101797
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=102020
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=102026
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=591725
http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=591726
> check
$not
parentName parentTsn rankName taxonName tsn
1 Anisoptera 101594 Family Aeshnidae 101596
2 Anisoptera 101594 Family Petaluridae 101659
3 Anisoptera 101594 Family Gomphidae 101664
4 Anisoptera 101594 Family Libellulidae 101797
5 Anisoptera 101594 Family Corduliidae 102020
6 Anisoptera 101594 Family Cordulegastridae 102026
7 Anisoptera 101594 Family Austropetaliidae 591725
8 Anisoptera 101594 Family Neopetaliidae 591726
> str(check)
List of 1
$ not:'data.frame': 8 obs. of 5 variables:
..$ parentName: Factor w/ 1 level "Anisoptera": 1 1 1 1 1 1 1 1
..$ parentTsn : Factor w/ 1 level "101594": 1 1 1 1 1 1 1 1
..$ rankName : chr [1:8] "Family" "Family" "Family" "Family" ...
..$ taxonName : Factor w/ 8 levels "Aeshnidae","Austropetaliidae",..: 1 8 5 6 4 3 2 7
..$ tsn : Factor w/ 8 levels "101596","101659",..: 1 2 3 4 5 6 7 8
So you want in the long run all families in a list-entry, all sub-families in a list entry etc...
Good idea...
from taxize.
When is see this:
Wouldn`t it be better when the data.frames are returned with 'stringsAsFactors = FALSE'?
What do you think?
from taxize.
Yeah, that would probably be better
from taxize.
works now., closed
from taxize.
Related Issues (20)
- Bad taxize book link in README HOT 2
- taxize::classification() output list of possible IDs as an object HOT 2
- Taxize always produce an API error after running for 1-2h+ HOT 4
- Could taxize do without {conditionz}? HOT 6
- bug: NA returned by get_uid when using division_filter HOT 3
- Update to bold::bold_tax_id() HOT 1
- get_tsn() function failing to retreive data HOT 4
- R taxize gnr_resolve function Internal Server Error (HTTP 500) for specific name
- Bad Gateway (HTTP 502) in get_iucn HOT 6
- HTTP 503 gnr_resolve function HOT 6
- HTTP 400 Error when using Taxize HOT 1
- taxize had controversy outputs
- Is there a function in taxize for getting all genera in a family? HOT 2
- Error 204 halts entire process rather than skipping taxon HOT 2
- `gnr_resolve` not matching the same name multiple times OR matches erroneously
- get_tsn() Error with tibble >= 3.0 HOT 1
- taxize::synonyms return error "The `x` argument of `as_tibble()` can't be missing as of tibble 3.0.0." HOT 7
- continue ncbi_downstream() for loop even when one taxon generates error?
- R CMD Check cannot run via GitHub Actions because of untagged version HOT 7
- classification() unable to find NCBI accession number known to exist in database HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taxize.