subset_metanalysis: Subsetting the dataset

View source: R/subset_metaanalysis.R

subset_metanalysisR Documentation

Subsetting the dataset

Description

Subset DE analysis data for a bunch of comparisons based on fold change and p-values

Usage

subset_metanalysis(dataset, adjpval = 0.1, max_n_genes = Inf, abslog2FC = 0)

Arguments

dataset

list of 3 lists, the first with gene IDs (called names), the second with the adjusted p-values for each genes (called adjpval) and the third with log2 fold changes (called log2FC). Each one of these three lists have the number of sublists corresponding to the results of the differential expression analyses for each contrasts corresponding respectively to the geneIDs, adjusted p-values, and log2FCs.

adjpval

desired adjusted p-value threshold for subsetting the data

max_n_genes

maximum number of genes to be kept. It is used only if for a given contrasts there are more than max_n_genes genes that pass the chosen filtered. Ranking is based on the adjusted p-values and ties are included so there might be more than max_n_genes included.

abslog2FC

desired absolute log2 fold change threshold for subsetting the data

Value

A list of lists structured identically to dataset but where the genes that do not pass the filters are excluded.

Examples

# create a list of lists were only the first 500 most significant genes with adjusted p-value < 0.05 and fold change >1.5 or < -1.5 are included
data(list_array) #load data
list_array.05_fc1.5_max500 <- subset_metanalysis(dataset=list_array, adjpval = 0.05, abslog2FC = log2(1.5), max_n_genes = 500 )

Ilarius/metaDEA documentation built on May 6, 2023, 6:47 p.m.