Giter Site home page Giter Site logo

Comments (8)

sckott avatar sckott commented on May 18, 2024

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.

sckott avatar sckott commented on May 18, 2024

@Edild - akk, downstream2 doesn't work, trying to fix it now.

from taxize.

eduardszoecs avatar eduardszoecs commented on May 18, 2024

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.

sckott avatar sckott commented on May 18, 2024

Cool. So it does work sometimes, but sometimes not. Working on it now.

from taxize.

eduardszoecs avatar eduardszoecs commented on May 18, 2024

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.

eduardszoecs avatar eduardszoecs commented on May 18, 2024

When is see this:

Wouldn`t it be better when the data.frames are returned with 'stringsAsFactors = FALSE'?
What do you think?

from taxize.

sckott avatar sckott commented on May 18, 2024

Yeah, that would probably be better

from taxize.

sckott avatar sckott commented on May 18, 2024

works now., closed

from taxize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.