Description Usage Arguments Value Author(s) Examples
View source: R/amp_diffabund.R
Tests if there is a significant difference in abundances between samples or groups hereof based on selected conditions. Returns a list containing test results as well as two different plots; an MA-plot and an abundance plot with taxa with the most significant p-value (below the threshold).
1 |
data |
(required) Data list as loaded with |
group |
(required) A categorical variable in the metadata that defines the sample groups to test. |
test |
The name of the test to use, either |
fitType |
The type of fitting of dispersions to the mean intensity, either |
num_threads |
The number of threads to use for parallelization by the |
signif_thrh |
Significance threshold. (default: |
fold |
Log2fold filter for displaying significant results. (default: |
verbose |
(Logical) Whether to print status messages during the test calculations. (Default: |
signif_plot_type |
Either |
plot_nshow |
The amount of the most significant results to display in the most-significant plot. (default: |
plot_point_size |
The size of the plotted points. (default: |
tax_aggregate |
The taxonomic level to aggregate the OTUs. (default: |
tax_add |
Additional taxonomic level(s) to display, e.g. |
tax_class |
Converts a specific phylum to class level instead, e.g. |
tax_empty |
How to show OTUs without taxonomic information. One of the following:
|
adjust_zero |
Keep 0 abundances in ggplot2 median calculations by adding a small constant to these. |
... |
Additional arguments passed on to |
A list with multiple elements:
"DESeq2_results"
: The raw output result from DESeq
.
"DESeq2_results_signif"
: The raw output result from DESeq
, but subset to only taxa with p-value below the threshold set by signif_thrh
.
"signif_plotdata"
: The data used to generate the ggplots, but subset to only taxa with p-value below the threshold set by signif_thrh
.
"Clean_results"
: A simpler version of DESeq2_results_signif only with adjusted p-values, log2FoldChange, and average abundance of each taxa per group
.
"plot_MA"
: MA-plot
"plot_MA_plotly"
: Interactive plotly
plot of MA-plot
with custom hover information.
"plot_signif"
: Abundance plot with taxa with the n most significant p-value (below the threshold), where n is set by plot_nshow
.
"plot_signif_plotly"
: Interactive plotly
plot of plot_signif
with custom hover information.
Kasper Skytte Andersen kasperskytteandersen@gmail.com
Mads Albertsen MadsAlbertsen85@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(ampvis2extras)
# Load example data
data("AalborgWWTPs")
# Subset to a few taxa, save the results in an object
d <- amp_subset_taxa(AalborgWWTPs, tax_vector = c("p__Chloroflexi", "p__Actinobacteria"))
results <- amp_diffabund(d, group = "Plant", tax_aggregate = "Genus")
# Show plots
results$plot_signif
results$plot_MA
# Or show raw results
results$Clean_results
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.