This function uses the "taxonkit filter" command to filter TaxIDs based on taxonomic ranks.
taxonkit_filter(
file_path,
black_list = NULL,
discard_noranks = FALSE,
discard_root = FALSE,
equal_to = NULL,
higher_than = NULL,
lower_than = NULL,
rank_file = NULL,
root_taxid = NULL,
save_predictable_norank = FALSE,
taxid_field = NULL,
text = FALSE,
data_dir = NULL
)
The path to the input file containing TaxIDs. Or file text (text=TRUE)
A character vector specifying the ranks to discard.
Logical value indicating whether to discard all ranks without order (default is FALSE).
Logical value indicating whether to discard the root taxid (default is FALSE).
A character vector specifying the ranks for which TaxIDs should be equal to.
The rank above which the TaxIDs should be (exclusive).
The rank below which the TaxIDs should be (exclusive).
The path to a user-defined ordered taxonomic ranks file.
The root taxid (default is 1).
Logical value indicating whether to save some special ranks without order when using lower_than (default is FALSE).
The field index of the taxid in the input file (default is 1).
logical
directory containing nodes.dmp and names.dmp (default "/Users/asa/.taxonkit")
A character vector containing the output of the "taxonkit filter" command.
Other Rtaxonkit:
check_taxonkit()
,
download_taxonkit_dataset()
,
install_taxonkit()
,
name_or_id2df()
,
taxonkit_lca()
,
taxonkit_lineage()
,
taxonkit_list()
,
taxonkit_name2taxid()
,
taxonkit_reformat()
if (FALSE) { # \dontrun{
taxids2 <- system.file("extdata/taxids2.txt", package = "pctax")
taxonkit_filter(taxids2, lower_than = "genus")
} # }