GithubHelp home page GithubHelp logo

Comments (12)

hariszaf avatar hariszaf commented on August 22, 2024

@cpavloud I found out about the ncbi-taxonomist tool.

We could use it I think.

Would you like to have a look and share any thoughts?

from pema.

cpavloud avatar cpavloud commented on August 22, 2024

I am not sure how it would work exactly (the ncbi-taxonomist page does not provide very good examples/explanations), but we could give it a try.

from pema.

hariszaf avatar hariszaf commented on August 22, 2024

Think of a while loop that will start from the end of the taxonomy in each row of the finalTable.tsv file and will use the ncbi-taxonomist for each level.
Using each level, we ll do queries searching for an ncbi taxonomy id, and when we have one we ll have something like this:

Assiming we are looking for Saprospiraceae

ncbi-taxonomist collect -n 'Saprospiraceae'

would return:

{"taxid":131567,"rank":"no rank","names":{"cellular organisms":"scientific_name"},"parentid":null,"name":"cellular organisms"}
{"taxid":2,"rank":"superkingdom","names":{"Bacteria":"scientific_name"},"parentid":131567,"name":"Bacteria"}
{"taxid":1783270,"rank":"clade","names":{"FCB group":"scientific_name"},"parentid":2,"name":"FCB group"}
{"taxid":68336,"rank":"clade","names":{"Bacteroidetes/Chlorobi group":"scientific_name"},"parentid":1783270,"name":"Bacteroidetes/Chlorobi group"}
{"taxid":976,"rank":"phylum","names":{"Bacteroidetes":"scientific_name"},"parentid":68336,"name":"Bacteroidetes"}
{"taxid":1937959,"rank":"class","names":{"Saprospiria":"scientific_name"},"parentid":976,"name":"Saprospiria"}
{"taxid":1936988,"rank":"order","names":{"Saprospirales":"scientific_name"},"parentid":1937959,"name":"Saprospirales"}
{"taxid":89374,"rank":"family","names":{"Saprospiraceae":"scientific_name","Saprospira group":"Synonym"},"parentid":1936988,"name":"Saprospiraceae"}

from pema.

cpavloud avatar cpavloud commented on August 22, 2024

So, for example, if you have this classifications in the finalTable.tsv

Main genome;Eukaryota;Opisthokonta;Nucletmycea;Fungi;Dikarya;Ascomycota;Saccharomycotina;Saccharomycetes;Saccharomycetales;Dipodascaceae;Geotrichum

you would search for Geotrichum
and then for Dipodascaceae
and then for Saccharomycetales
etc etc.

and get the last line for each of your searches?

from pema.

hariszaf avatar hariszaf commented on August 22, 2024

I would search for Geotrichum, if that has a hit, i d get

  • only its ncbi taxonomy id
  • the ncbi taxonomy ids of all its lineage
    we could think about that.

If I would not get a hit, I would continue with Dipodascaceae etc.

from pema.

hariszaf avatar hariszaf commented on August 22, 2024

@cpavloud have a look. would that be ok ?

root@3bbfa77ef486:/mnt/analysis# more extenedFinalTable.tsv 
OTU	ERR0000001	Classification	TAXON:NCBI_TAX_ID
Otu4056	1	Main genome;Bacteria;Patescibacteria;Saccharimonadia;Saccharimonadales	Patescibacteria:1783273

from pema.

cpavloud avatar cpavloud commented on August 22, 2024

@cpavloud have a look. would that be ok ?

root@3bbfa77ef486:/mnt/analysis# more extenedFinalTable.tsv 
OTU	ERR0000001	Classification	TAXON:NCBI_TAX_ID
Otu4056	1	Main genome;Bacteria;Patescibacteria;Saccharimonadia;Saccharimonadales	Patescibacteria:1783273

If there were no NCBI taxonomy IDs for Saccharimonadia and Saccharimonadales, I think we are fine :)

from pema.

hariszaf avatar hariszaf commented on August 22, 2024

Exactly!
The thing is that there is not a ncbi taxonomy id always for a name in a ref db.
So i thought we could go up to the taxonomy found and work at one rank at a time starting from the species level.
I ll add this asap.

from pema.

hariszaf avatar hariszaf commented on August 22, 2024

Just fyi, here is what you would get if you d search on ncbi taxonomy db for Saccharimonadales

image

and Saccharimonadia

image

from pema.

hariszaf avatar hariszaf commented on August 22, 2024

This feature is now ready and will be part of pema:v.2.1.4.

The issue is now resolved.

from pema.

cpavloud avatar cpavloud commented on August 22, 2024

Re-opening the issue:
In case it might be helpful, we can go from the sequence accession number to the NCBI Id: https://www.biostars.org/p/10959/

from pema.

hariszaf avatar hariszaf commented on August 22, 2024

This is definitely useful for ITS #52

from pema.

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.