Description Usage Arguments Details Value Examples
View source: R/micro_heatmap.R
A function to create heatmaps of estimated beta coeffients from each model fit by nb_mods
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | micro_heatmap(
modsum,
low_grad,
high_grad,
mid_grad,
midpoint = 0,
top_taxa = 10,
low_lim,
high_lim,
mute_cols = T,
alpha = 0.05,
dot_size = 2,
dot_shape = 8,
main = NULL,
xlab = NULL,
ylab = NULL,
subtitle = NULL,
xaxis = NULL,
caption = latex2exp::TeX("'*' denotes significance at $\\alpha$ = 0.05")
)
|
modsum |
The output from nb_mods |
low_grad |
The low gradient colors for the coefficient magnitude. Will be fed into scale_fill_gradient |
high_grad |
The high gradient colors for the coefficient magnitude. Will be fed into scale_fill_gradient |
mid_grad |
The medium gradient colors for the coefficient magnitude. Will be fed into scale_fill_gradient |
midpoint |
Midpoint for coefficient magnitude in legend |
top_taxa |
Only plot X taxa with the largest magnitude beta coefficients |
low_lim |
Lower limits of the fill gradient. Will default to the largest magnitude effect size |
high_lim |
Upper limits of the fill gradient. Will default to the largest magnitude effect size |
mute_cols |
Mute the colors of the fill gradients |
alpha |
Mark beta coefficient cells with p-values below this cutoff |
dot_size |
size of marker in cells |
main |
Plot title |
xlab |
x-axis label |
ylab |
y-axis label |
subtitle |
Plot label |
xaxis |
Labels for the x-axis ticks |
shape |
shape of marker in cells |
legend_title |
Title for the legend |
The output will give gray columns if there are missing values in the supplied continuous variable
Returns a ggplot that you can add geoms to if you'd like
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(phy); data(cla); data(ord); data(fam); data(met)
otu_tabs = list(Phylum = phy, Class = cla, Order = ord, Family = fam)
set <- tidy_micro(otu_tabs = otu_tabs, meta = met) \
filter(day == 7) ## Only including the first week
## Creating negative binomial models on filtered tidy_micro set
nb_fam <- set \
mutate(bpd1 = factor(bpd1)) \
otu_filter(ra_cutoff = 0.1, exclude_taxa = c("Unclassified", "Bacteria")) \
nb_mods(table = "Family", bpd1)
nb_fam \
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.