How to get domain/kingdom name in a table of taxid in R tidyverse?
Entering edit mode
2.7 years ago
DNAngel ▴ 240

Hi all,

I have over 100 textfiles that contain BLAST hit results for each contig in that sample. The format includes taxids. I have opened these textfiles into R tidyverse for some data manipulation, but the first thing I really want to get are the domains/kingdoms for each species. For example, contig-1 top hit was a bacteria and it's taxid was 343509. I'd want to create a new column that adds "Bacteria" to it, and possibly also later on get the "Family" and "Genus" level names for the species.

Is there an R package that can look at a species name or taxid and output such information easily which I can then add into my tibble?

The R taxa package doesn't seem to be what I want, as it focuses on creating your own taxonomy definitions using taxids, but I was hoping for something that would do it automatically since I have hundreds of files to go through.


R • 564 views
Entering edit mode

I think you'll end up having to mess around with the rentrez package for this. But the taxonomizr might be the more appropriate approach here. I'd try that first.

Entering edit mode

I tried taxonomizr...had no clue what the sql node table was supposed to be or how to even make one.


Login before adding your answer.

Traffic: 2158 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6