This function uses the "taxonkit taxonkit_name2taxid" command to convert taxonomic names to corresponding taxonomic IDs (TaxIDs).
taxonkit_name2taxid(
file_path,
name_field = NULL,
sci_name = FALSE,
show_rank = FALSE,
text = FALSE,
data_dir = NULL
)
The path to the input file containing taxonomic names. Or file text (text=TRUE)
The field index of the taxonomic name in the input file (default is 1).
Logical value indicating whether to search only for scientific names (default is FALSE).
Logical value indicating whether to show the taxonomic rank in the output (default is FALSE).
Logical
directory containing nodes.dmp and names.dmp (default "/Users/asa/.taxonkit")
A character vector containing the output of the "taxonkit_name2taxid" command.
Other Rtaxonkit:
check_taxonkit()
,
download_taxonkit_dataset()
,
install_taxonkit()
,
name_or_id2df()
,
taxonkit_filter()
,
taxonkit_lca()
,
taxonkit_lineage()
,
taxonkit_list()
,
taxonkit_reformat()
if (FALSE) { # \dontrun{
names <- system.file("extdata/name.txt", package = "pctax")
taxonkit_name2taxid(names, name_field = 1, sci_name = FALSE, show_rank = FALSE)
"Homo sapiens" %>% taxonkit_name2taxid(text = TRUE)
} # }