kruskalWallis: Kruskal-Wallis rank sum tests on a 'SummarizedExperiment'...

Description Usage Arguments Value See Also Examples

View source: R/analysis_on_quantification.R

Description

Perform Kruskal-Wallis tests on a SummarizedExperiment object obtained with the formatForAnalysis function

Usage

1
2
3
4
5
6
7
kruskalWallis(
  analysis_data,
  condition,
  alpha = 0.05,
  type.data = "quantifications",
  ...
)

Arguments

analysis_data

A SummarizedExperiment object obtained with the formatForAnalysis function.

condition

The name of the design variable (two level factor) specifying the group of each sample.

alpha

Cutoff for adjusted p-values. Default to 0.05.

type.data

Type of data used for the analyses (e.g.,

...

Arguments to be passed to p.adjust such as the correction method to use with the method argument. "quantifications", "buckets"...). Default to "quantifications".

Value

A S4 object of class AnalysisResults containing test results.

See Also

AnalysisResults

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Import quantification results
if (require("ASICSdata", quietly = TRUE)) {
  quantif_path <- system.file("extdata", "results_ASICS.txt",
                              package = "ASICSdata")
  quantification <- read.table(quantif_path, header = TRUE, row.names = 1)

  # Import design
  design <- read.table(system.file("extdata", "design_diabete_example.txt",
                                   package = "ASICSdata"), header = TRUE)
  design$condition <- factor(design$condition)

  # Create object for analysis and remove features with more than 25% of
  # zeros
  analysis_obj <- formatForAnalysis(quantification,
                                    zero.threshold = 25, design = design)
  res_tests <- kruskalWallis(analysis_obj, "condition", method = "BH")
}

ASICS documentation built on Nov. 8, 2020, 8:19 p.m.