diffAnalyses: Perform statistical analyses

View source: R/analysis.R

diffAnalysesR Documentation

Perform statistical analyses

Description

Perform statistical analyses

Usage

diffAnalyses(
  data,
  groups = NULL,
  analyses = c("wilcoxRankSum", "ttest", "kruskal", "levene", "fligner"),
  pvalueAdjust = "BH",
  geneExpr = NULL,
  inputID = "sparklineInput"
)

Arguments

data

Data frame or matrix: gene expression or alternative splicing quantification

groups

Named list of characters (containing elements belonging to each group) or character vector (containing the group of each individual sample); if NULL, sample types are used instead when available, e.g. normal, tumour and metastasis

analyses

Character: statistical tests to perform (see Details)

pvalueAdjust

Character: method used to adjust p-values (see Details)

geneExpr

Character: name of the gene expression dataset (only required for density sparklines available in the interactive mode)

inputID

Character: identifier of input to get attributes of clicked event (Shiny only)

Details

The following statistical analyses may be performed simultaneously via the analysis argument:

  • ttest - Unpaired t-test (2 groups)

  • wilcoxRankSum - Wilcoxon Rank Sum test (2 groups)

  • kruskal - Kruskal test (2 or more groups)

  • levene - Levene's test (2 or more groups)

  • fligner - Fligner-Killeen test (2 or more groups)

  • density - Sample distribution per group (only usable through the visual interface)

The following p-value adjustment methods are supported via the pvalueAdjust argument:

  • none: do not adjust p-values

  • BH: Benjamini-Hochberg's method (false discovery rate)

  • BY: Benjamini-Yekutieli's method (false discovery rate)

  • bonferroni: Bonferroni correction (family-wise error rate)

  • holm: Holm's method (family-wise error rate)

  • hochberg: Hochberg's method (family-wise error rate)

  • hommel: Hommel's method (family-wise error rate)

Value

Table of statistical analyses

See Also

Other functions to perform and plot differential analyses: plotDistribution()

Examples

# Calculate PSI for skipped exon (SE) and mutually exclusive (MXE) events
eventType <- c("SE", "MXE")
annot <- readFile("ex_splicing_annotation.RDS")
junctionQuant <- readFile("ex_junctionQuant.RDS")

psi <- quantifySplicing(annot, junctionQuant, eventType=c("SE", "MXE"))
group <- c(rep("Normal", 3), rep("Tumour", 3))
diffAnalyses(psi, group)

nuno-agostinho/psichomics documentation built on Feb. 11, 2024, 11:16 p.m.