check.associations {SIAMCAT} | R Documentation |
This function calculates for each feature a pseudo-fold change (geometrical mean of the difference between quantiles) between the different classes found in labels.
Significance of the differences is computed for each feature using a Wilcoxon test followed by multiple hypothesis testing correction.
Additionally, the Area Under the Receiver Operating Characteristic Curve
(AU-ROC) and a prevalence shift are computed for the features found to be
associated with the two different classes at a user-specified
significance level alpha
.
Finally, the function produces a plot of the top max.show
associated features, 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)
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', verbose = 1)
siamcat |
object of class siamcat-class |
fn.plot |
filename for the pdf-plot |
color.scheme |
valid R color scheme or vector of valid R colors (must be
of the same length as the number of classes), defaults to |
alpha |
float, significance level, defaults to |
mult.corr |
multiple hypothesis correction method, see
|
sort.by |
string, sort features by p-value ( |
detect.lim |
float, pseudocount to be added before log-transformation of
the data, defaults to |
pr.cutoff |
float, cutoff for the prevalence computation, defaults to
|
max.show |
integer, how many associated features should be shown,
defaults to |
plot.type |
string, specify how the abundance should be plotted, must be
one of these: |
panels |
vector, name of the panels to be plotted next to the log10-
transformed abundances, possible entries are |
prompt |
boolean to turn on/off prompting user input when not plotting into a pdf-file, defaults to TRUE |
feature.type |
On which type of features should the function work? Can be either "original", "filtered", or "normalized". Please only change this paramter if you know what you are doing! |
verbose |
control output: |
Does not return anything, but produces an association plot
# Example data data(siamcat_example) # Simple example check.associations(siamcat_example, './assoc_plot.pdf') # Plot associations as bean plot check.associations(siamcat_example, './assoc_plot_bean.pdf', plot.type='bean') # Plot assocations as box plot # Additionally, sort by p-value instead of by fold change check.associations(siamcat_example, './assoc_plot_fc.pdf', plot.type='box', sort.by='p.val') # Custom colors check.associations(siamcat_example, './assoc_plot_blue_yellow.pdf', plot.type='box', color.scheme=c('cornflowerblue', '#ffc125'))