Description Usage Arguments Details Value Examples
View source: R/check_associations.r
This function computes different measures of association between features and the label and visualizes the results
1 2 3 4 5 6 |
siamcat |
object of class siamcat-class |
fn.plot |
string, filename for the pdf-plot. If |
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 |
string, 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
abundances, possible entries are |
prompt |
boolean, turn on/off prompting user input when not plotting into a pdf-file, defaults to TRUE |
feature.type |
string, on which type of features should the function
work? Can be either If |
verbose |
integer, control output: |
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 max.show
associated features at a user-specified significance level alpha
,
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).
object of class siamcat-class with the slot
associations
filled
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Example data
data(siamcat_example)
# Simple example
siamcat_example <- check.associations(siamcat_example,
fn.plot='./assoc_plot.pdf')
# Plot associations as box plot
siamcat_example <- check.associations(siamcat_example,
fn.plot='./assoc_plot_box.pdf', plot.type='box')
# 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')
# Custom colors
siamcat_example <- check.associations(siamcat_example,
fn.plot='./assoc_plot_blue_yellow.pdf', plot.type='box',
color.scheme=c('cornflowerblue', '#ffc125'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.