testRelations: testRelations

Description Usage Arguments Details Value Note Author(s)

Description

This function applies a statistical test either a correlation (spearman, pearson), wilcoxon or t.test as a function of a given phenotype. It will return a matrix of probabilities p and q values along with the correlation coefficient or the enrichment variable when a binary parameter.

Usage

1
2
testRelations(data, trait, type, restrict = rep(TRUE, ncol(data)),
  multiple.adjust = "BH", paired = FALSE, debug = FALSE)

Arguments

data

: frequency matrix with gene_ids in the rownames

trait

: a vector with the trait to test, binary or numerical variable

type

: a character string indicating the type of test to be applied

restrict

: an optional logical vector to select a subset of the samples to perform the test default restrict = rep(TRUE, ncol(data)) ie all the samples are selected

multiple.adjust

: type of multiple adjustment default is "BH" i.e. Benjamini & Hochberg method

paired

: logical with default FALSE wether the test should be paired or not

debug

: default FALSE, when TRUE the progress is printed each 1000 steps

Details

testRelations

Value

a matrix with analytical results (correlation tests) indicating rho, rho2, p and q values for each parameter tested

Note

New addon taking into account a trait for correlation, when it is a two class variable with the same number of elements a correlation between both groups is performed

Author(s)

Edi Prifti & Emmanuelle Le Chatelier


momr documentation built on May 2, 2019, 4:21 a.m.