compute_lower_and_higher_lists: Compute L and H list in control samples.

compute_lower_and_higher_listsR Documentation

Compute L and H list in control samples.

Description

For each gene, this function computes two lists. The L list, with genes with a Lower expression in 'threshold*100' % of controls, and the H list with genes with an Higher expression in 'threshold*100' % of controls. These lists can be used in Penda test to compare the gene rank in samples.

Usage

compute_lower_and_higher_lists(controls, threshold, s_max = 50)

Arguments

controls

A data matrix with the expressions of control samples.

threshold

The proportion of expression that must be in the conditions.

s_max

The maximum number of L and H genes for each gene.

Value

This function returns a list of two numeric matrices : - the L matrix, with for each row gene the id of the L genes in columns, - the H Matrix, with for each row gene the id of the H genes in columns.

Examples

# First, data are ranking by median
controls = penda::penda_data_ctrl[1:10, 1:10]
median_gene = apply(controls, 1, median, na.rm = TRUE)
median_gene = sort(median_gene)
controls = controls[names(median_gene), ]
# Second, lower and higher lists are computed
L_H_list = penda::compute_lower_and_higher_lists(controls, threshold = 0.99, s_max = 50)

CDecamps/penda documentation built on Jan. 13, 2023, 2:24 p.m.