subsetFun {SQMtools} | R Documentation |
Filter results by function
Description
Create a SQM object containing only the ORFs with a given function, and the contigs and bins that contain them.
Usage
subsetFun(
SQM,
fun,
columns = NULL,
ignore_case = TRUE,
fixed = FALSE,
trusted_functions_only = FALSE,
ignore_unclassified_functions = FALSE,
rescale_tpm = FALSE,
rescale_copy_number = FALSE
)
Arguments
SQM |
SQM object to be subsetted. |
fun |
character. Pattern to search for in the different functional classifications. |
columns |
character. Restrict the search to the provided column names from |
ignore_case |
logical Make pattern matching case-insensitive (default |
fixed |
logical. If |
trusted_functions_only |
logical. If |
ignore_unclassified_functions |
logical. If |
rescale_tpm |
logical. If |
rescale_copy_number |
logical. If |
Value
SQM object containing only the requested function.
See Also
subsetTax
, subsetORFs
, subsetSamples
, combineSQM
. The most abundant items of a particular table contained in a SQM object can be selected with mostAbundant
.
Examples
data(Hadza)
Hadza.iron = subsetFun(Hadza, "iron")
Hadza.carb = subsetFun(Hadza, "Carbohydrate metabolism")
# Search for multiple patterns using regular expressions
Hadza.twoKOs = subsetFun(Hadza, "K00812|K00813", fixed=FALSE)