This function computes different measures of association between features and the label and visualizes the results
check.associations(siamcat, fn.plot=NULL, color.scheme = "RdYlBu", alpha =0.05, mult.corr = "fdr", sort.by = "fc", detect.lim = 1e-06, pr.cutoff = 1e-6, max.show = 50, plot.type = "quantile.box", panels = c("fc","auroc"), prompt = TRUE, feature.type = 'filtered', paired=NULL, verbose = 1)
object of class siamcat-class
string, filename for the pdf-plot. If
valid R color scheme or vector of valid R colors (must be
of the same length as the number of classes), defaults to
float, significance level, defaults to
string, multiple hypothesis correction method, see
string, sort features by p-value (
float, pseudocount to be added before log-transformation of
the data, defaults to
float, cutoff for the prevalence computation, defaults to
integer, how many associated features should be shown,
string, specify how the abundance should be plotted, must be
one of these:
vector, name of the panels to be plotted next to the
abundances, possible entries are
boolean, turn on/off prompting user input when not plotting into a pdf-file, defaults to TRUE
string, on which type of features should the function
work? Can be either
character, column name of the meta-variable containing information for a paired test
integer, control output:
object of class siamcat-class with the slot
For each feature, this function calculates different measures of association between the feature and the label. In detail, these associations are:
Significance as computed by a Wilcoxon test followed by multiple hypothesis testing correction.
AUROC (Area Under the Receiver Operating Characteristics Curve) as a non-parameteric measure of enrichment (corresponds to the effect size of the Wilcoxon test).
The generalized Fold Change (gFC) is a pseudo fold change which is calculated as geometric mean of the differences between the quantiles for the different classes found in the label.
The prevalence shift between the two different classes found in the label.
Finally, the function produces a plot of the top
associated features at a user-specified significance level
showing the distribution of the log10-transformed abundances for both
classes, and user-selected panels for the effect (AU-ROC, Prevalence
Shift, and Fold Change).
# Example data data(siamcat_example) # Simple example siamcat_example <- check.associations(siamcat_example, fn.plot='./assoc_plot.pdf') #> Plotted associations between features and label successfully to: ./assoc_plot.pdf # Plot associations as box plot siamcat_example <- check.associations(siamcat_example, fn.plot='./assoc_plot_box.pdf', plot.type='box') #> Plotted associations between features and label successfully to: ./assoc_plot_box.pdf # Additionally, sort by p-value instead of by fold change siamcat_example <- check.associations(siamcat_example, fn.plot='./assoc_plot_fc.pdf', plot.type='box', sort.by='p.val') #> Plotted associations between features and label successfully to: ./assoc_plot_fc.pdf # Custom colors siamcat_example <- check.associations(siamcat_example, fn.plot='./assoc_plot_blue_yellow.pdf', plot.type='box', color.scheme=c('cornflowerblue', '#ffc125')) #> Plotted associations between features and label successfully to: ./assoc_plot_blue_yellow.pdf