View source: R/dada_phyloseq.R
| psmelt_samples_pq | R Documentation |
Hill numbers are the number of equiprobable species giving the same diversity value as the observed distribution.
Note that contrary to hill_pq(), this function does not take into
account for difference in the number of sequences per samples/modalities.
You may use rarefy_by_sample = TRUE if the mean number of sequences per
samples differs among modalities.
psmelt_samples_pq(
physeq,
q = c(0, 1, 2),
hill_scales = lifecycle::deprecated(),
filter_zero = TRUE,
rarefy_by_sample = FALSE,
rngseed = FALSE,
verbose = TRUE,
taxa_ranks = NULL,
...
)
physeq |
(required) a |
q |
(numeric vector) Hill diversity orders to compute. If NULL, no
Hill numbers are computed. Default computes Hill number 0 (species
richness), 1 (exponential of Shannon index) and 2 (inverse of Simpson
index). Formerly |
hill_scales |
|
filter_zero |
(logical, default TRUE) Do we filter non present OTU from samples ? For the moment, this has no effect on the result because the dataframe is grouped by samples with abundance summed across OTU. |
rarefy_by_sample |
(logical, default FALSE) If TRUE, rarefy
samples using |
rngseed |
(Optional). A single integer value passed to
|
verbose |
(logical). If TRUE, print additional information. |
taxa_ranks |
A vector of taxonomic ranks. For examples c("Family","Genus"). If taxa ranks is not set (default value = NULL), taxonomic information are not present in the resulting tibble. |
... |
Additional arguments passed to |
A tibble with a row for each sample. Columns provide information
from sam_data slot as well as hill numbers, Abundance (nb of sequences),
and Abundance_log10 (log10(1+Abundance)).
Adrien Taudière
Alberdi, A., & Gilbert, M. T. P. (2019). A guide to the application of Hill numbers to DNA-based diversity analyses. Molecular Ecology Resources. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/1755-0998.13014")}
Calderón-Sanou, I., Münkemüller, T., Boyer, F., Zinger, L., & Thuiller, W. (2019). From environmental DNA sequences to ecological conclusions: How strong is the influence of methodological choices? Journal of Biogeography, 47. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/jbi.13681")}
psm_tib <- psmelt_samples_pq(data_fungi_mini, hill_scales = c(0, 2, 7))
## Not run:
if (requireNamespace("ggstatsplot")) {
ggstatsplot::ggbetweenstats(psm_tib, Height, Hill_0)
ggstatsplot::ggbetweenstats(psm_tib, Height, Hill_7)
}
psm_tib_tax <- psmelt_samples_pq(data_fungi_mini, taxa_ranks = c("Class", "Family"))
ggplot(filter(psm_tib_tax, Abundance > 2000), aes(y = Family, x = Abundance, fill = Time)) +
geom_bar(stat = "identity") +
facet_wrap(~Height)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.