sample_test_1ctrl: Test gene expression variations for a given sample

sample_test_1ctrlR Documentation

Test gene expression variations for a given sample

Description

This function makes the test of the dysregulation of all genes for one patient. It's the adapted method for the datasets with only 1 control, if you want the normal Penda method used penda::sample_test

Usage

sample_test_1ctrl(sample, iterations, threshold)

Arguments

sample

A vector with all the genes expressions for one patient.

iterations

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

threshold

The threshold for regulation_test.

Value

This function return a list with two vectors : D, with TRUE for genes down-regulated U, with TRUE for genes up-regulated.

Examples

# First, load and define the data
dataset = penda::make_dataset_1ctrl(
  penda::penda_data_ctrl[1:10, 1],
  penda::penda_data_case[1:10, 1:3]
)
controls = dataset$data_ctrl
sample = dataset$data_case[,1]
# Second, lower and higher lists are computed
L_H_list = penda::compute_lower_and_higher_lists_1ctrl(controls, s_max = 50)
# Third, test is the expression is deregulated for each gene of a sample.

res_sample = penda::sample_test_1ctrl(sample,
                                iterations = 20,
                                threshold = 0.03)

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