BLAST in R, taxonomy
1
0
Entering edit mode
2.3 years ago
chiarad • 0

I am a student working on a microbiome project and I am using R to retrieve species names from NCBI taxonomy data. I have obtained the accession numbers through rBLAST and now I need to retrieve the corresponding species names.

I have tried using different R packages such as taxonomizr, taxize, and now I am using rentrez. With rentrez, I was able to retrieve the taxonomy data, but it is in a list format where each UID has an additional level containing the item 'title' that corresponds to the species/strain name.

I am looking for guidance on how to efficiently extract the species names from the nested list structure in rentrez. I want to extract the 'title' value for each UID without having to manually specify the nested levels.

Any suggestions or code examples on how to accomplish this task would be greatly appreciated. Thank you! I used entrez_summary(): taxonomy_result <- entrez_summary(db = "nuccore", id = accession_numbers, rettype = "xml", parsed=TRUE)

taxonomy R microbiome BLAST • 682 views
ADD COMMENT
1
Entering edit mode
2.3 years ago
GenoMax 154k

You will need to translate this into R but you do this with the parent EntrezDirect package as follows:

$ esearch -db nuccore -query "XM_040895040" | efetch -format docsum | xtract -pattern DocumentSummary -element Organism
Aspergillus ochraceoroseus IBT 24754
ADD COMMENT

Login before adding your answer.

Traffic: 3116 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6