testRelations | R Documentation |
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.
testRelations(
data,
trait,
type,
restrict = rep(TRUE, ncol(data)),
multiple.adjust = "BH",
paired = FALSE,
debug = FALSE
)
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)) i.e. 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 |
testRelations
a matrix with analytical results (correlation tests) indicating rho, rho2, p and q values for each parameter tested along with the status of the test
New add on 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
Edi Prifti & Emmanuelle Le Chatelier
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.