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)