Get ncbi phylogeny level for a given ncbi taxonomy id.

get_taxon_rank(x, rank = "kingdom")

Arguments

x

a vector of valid ncbi taxonomy id.

rank

a string denoting required ncbi phylogenetic level. Default "kingdom". An input can be one of the followings

  1. superkingdom

  2. kingdom

  3. phylum

  4. subphylum

  5. class

  6. subclass

  7. infraclass

  8. cohort

  9. order

  10. suborder

  11. infraorder

  12. superfamily

  13. family

  14. subfamily

  15. genus

  16. species

  17. tribe

  18. no rank

Value

a tbl with the below column.

  1. query_taxon

  2. kingdom

  3. kingdom_id

  4. rank

Examples

if (FALSE) { x <- c(166361, 166361, 224129, 217634) get_taxon_rank(x) }