DoWilcoxonTest: Apply two-sample Wilcoxon tests (‘Mann-Whitney’ test) for...

Description Usage Arguments Details Value See Also Examples

View source: R/DoWilcoxonTest.R

Description

DoWilcoxonTest applies two-sample Wilcoxon test for each row of input data matrix. P-values are adjusted using Benjamini–Hochberg procedure.

Usage

1

Arguments

data

A matrix, the normalized gene/microRNA expression dataset, should be a numeric matrix, with rows referring to genes/microRNAs and columns to samples.

pheno

A vector of sample phenotypes. Sample phenotype in a scientific research could be treatment/control, normal/cancer or smoker/non-smoker. Different phenotypes should each be encoded as 0/1 when inputting to DoWilcoxonTest, for example, Normal-0; Cancer-1.

Details

This function performs two-sample Wilcoxon tests. It is recommended to use a non-parametric test when data lack normality and t-tools (DoTest) can be very misleading.

Value

A table with rows for all genes/miRNAs (ranked by significance) and columns of log2 fold change, p-value, adjusted p-value (default to Benjamini–Hochberg procedure).

See Also

pairComp and DoTest.

Examples

1
2
3
4
5
6
7
8
# prepare your normalized data matrix
data.m <- matrix(rnorm(120), nrow = 20, ncol = 6)

# prepare the phenotype info (0-control; 1-treatment)
class.v <- c(0, 0, 0, 1, 1, 1)

# run function
DoWilcoxonTest(data = data.m, pheno = class.v)

YC3/mirNet documentation built on Sept. 3, 2020, 3:25 a.m.