Description Usage Arguments Value Examples
Format differential abundance/prevalence results for elegant presentation, selecting only the significant hits.
1 | format_hits(results, p.adjust.threshold = 0.1, p.adjust.method = NULL)
|
results |
Results from |
p.adjust.threshold |
Adjusted P-value threshold to use when returning the significant hits. |
p.adjust.method |
P-value adjustment method, in case you want it to be re-estimated. Use this only if you know what you are doing!! |
Returns a list containing all the entities in the input results
variable,
with the following changes:
table
: Data frame consisting of taxa that pass given FDR threshold, with names formatted for elegant presentation.
All hits up to and including the P-value threshold will be returned.
Columns depend on the type of results.
Common columns are: Taxon, Annotation, padj, Significance, Direction
.
Depending on the result type, the following extra columns will be present:
Prevalence test: OR, OR_CE
DESeq2: log2FC
Wilcoxon: Med_1, Med_2
nhits
: Number of significant hits that pass the threshold for adjusted P-value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
# Run DESeq2
x <- test_differential_abundance_DESeq2(physeq, group = "Health_status", compare = c("T2D", "Healthy"))
y <- format_hits(x, p.adjust.method= "bonferroni") # Overwrite DESeq's FDR padj with Bonferroni padj
z <- format_hits_for_heatmap(y)
draw_taxa_heatmap(physeq, taxa_data = z, group = "Health_status", compare = c("T2D", "Healthy"))
# Run Wilcoxon rank sum test
x <- test_differential_abundance_Wilcoxon(physeq, group = "Health_status")
y <- format_hits(x)
z <- format_hits_for_heatmap(y)
draw_taxa_heatmap(physeq, taxa_data = z, group = "Health_status", block = "Enterotype")
# Set up custom palette
pal = list(Health_status = "Set2", Enterotype = "Pastel1", Significance = "PuRd")
# Run differential prevalence test
x <- test_differential_prevalence(physeq, group = "Health_status")
y <- format_hits(x)
z <- format_hits_for_heatmap(y, p.adjust.threshold = 0.01)
draw_taxa_heatmap(physeq, taxa_data = z, group = "Health_status", custom_palette = pal)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.