penda_test: Test gene expression variations in a serie of samples

View source: R/testing.R

penda_testR Documentation

Test gene expression variations in a serie of samples

Description

This function applies the function sample_test to a serie of samples.

Usage

penda_test(
  samples,
  controls,
  iterations,
  L_H_list,
  threshold,
  quant_test = 0,
  factor_test = 1
)

Arguments

samples

A vector or a matrix with all the genes expressions for each sample.

controls

A matrix with genes expressions in controls for all the patients.

iterations

The maximal number of iterations for the test. If the dysregulation list no longer changes, iterations are stop before.

L_H_list

The list of lower and higher expressed genes matrices in the control.

threshold

If Ll/Lh and Hh/Hl are under this threshold, the expression not change.

quant_test

The quantile for the test. When L and H lists are void, we use the naive method.

factor_test

The factor for the test. The limit L will be quant(gene)/factor, and the limit H quant(gene)*factor.

Value

This function return a list of two matrices (down_genes and up_genes)

Examples

# First, load and define the data
controls = penda::penda_data_ctrl[1:10, 1:10]
samples = penda::penda_data_case[1:10, 1:3]
# Second, lower and higher lists are computed
L_H_list = penda::compute_lower_and_higher_lists(controls, threshold = 0.99, s_max = 50)
# Third, test is the expression is deregulated for each gene of a sample
res_penda = penda::penda_test(samples,
                              controls,
                              iterations = 20,
                              L_H_list,
                              threshold = 0.03,
                              quant_test = 0,
                              factor_test = 1)

CDecamps/penda documentation built on March 29, 2024, 3:26 a.m.