Get summary taxa abundances.
taxa_sums(
biom,
rank = -1,
sort = NULL,
lineage = FALSE,
unc = "singly",
transform = "none"
)taxa_means(
biom,
rank = -1,
sort = NULL,
lineage = FALSE,
unc = "singly",
transform = "none"
)
taxa_apply(
biom,
FUN,
rank = -1,
sort = NULL,
lineage = FALSE,
unc = "singly",
transform = "none",
...
)
For taxa_sums
and taxa_means
, a named numeric vector.
For taxa_apply
, a named vector or list with the results of FUN
.
The names are the taxa IDs.
An rbiom object, such as from as_rbiom()
.
Any value accepted by as_rbiom()
can also be given here.
What rank(s) of taxa to display. E.g. "Phylum"
,
"Genus"
, ".otu"
, etc. An integer vector can also be
given, where 1
is the highest rank, 2
is the second
highest, -1
is the lowest rank, -2
is the second
lowest, and 0
is the OTU "rank". Run biom$ranks
to
see all options for a given rbiom object. Default: -1
.
Sort the result. Options: NULL
, "asc"
, or "desc"
, where
NULL
will not sort the result. "asc"
will sort in ascending order
(smallest to largest), and "desc"
in descending order (largest to
smallest). Ignored when the result is not a simple numeric vector.
Default: NULL
Include all ranks in the name of the taxa. For instance,
setting to TRUE
will produce
Bacteria; Actinobacteria; Coriobacteriia; Coriobacteriales
.
Otherwise the taxa name will simply be Coriobacteriales
. You
want to set this to TRUE when unc = "asis"
and you have taxa
names (such as Incertae_Sedis) that map to multiple higher
level ranks. Default: FALSE
How to handle unclassified, uncultured, and similarly ambiguous taxa names. Options are:
"singly"
- Replaces them with the OTU name.
"grouped"
- Replaces them with a higher rank's name.
"drop"
- Excludes them from the result.
"asis"
- To not check/modify any taxa names.
Abbreviations are allowed. Default: "singly"
Transformation to apply. Options are:
c("none", "rank", "log", "log1p", "sqrt", "percent")
. "rank"
is
useful for correcting for non-normally distributions before applying
regression statistics. Default: "none"
The function to apply to each row of the taxa_matrix()
.
Optional arguments to FUN
.
Other taxa_abundance:
sample_sums()
,
taxa_boxplot()
,
taxa_clusters()
,
taxa_corrplot()
,
taxa_heatmap()
,
taxa_stacked()
,
taxa_stats()
,
taxa_table()
library(rbiom)
taxa_sums(hmp50) %>% head(4)
taxa_means(hmp50, 'Family') %>% head(5)
taxa_apply(hmp50, max) %>% head(5)
taxa_apply(hmp50, fivenum) %>% head(5)
Run the code above in your browser using DataLab