ge_diff_exp: ge_diff_exp

View source: R/ge_diff_exp.R

ge_diff_expR Documentation

ge_diff_exp

Description

Performs differential gene expression using DESeq2.

Usage

ge_diff_exp(counts, genes_id, metadata, design, ref_level, shrink = "apeglm")

Arguments

counts

Data frame that contains gene expression data as raw counts.

genes_id

Name of the column that contains gene identifiers. Should be one of the following:'entrezgene_id', 'ensembl_gene_id' or 'hgnc_symbol'.

metadata

Data frame that contains supporting variables to the data.

design

Variables in the design formula in the form of: 'Var1 + Var2 + ... Var_n'.

ref_level

Character vector where the first element is the column name where the reference level is located and a second element indicating the name of level to be used as a reference when calculating differential gene expression.

shrink

Name of the shrinkage method to apply: "apeglm", "ashr", "normal" or "none". Use none to skip shrinkage. Default value is "apeglm".

Value

Returns a list of differential gene expression results, one for each level comparison, in form of DESeqResults objects.

Examples

results.dds <- ge_diff_exp(counts = sample_counts,
                           genes_id = 'ensembl_gene_id',
                           metadata = sample_metadata,
                           design = 'MSI_status',
                           ref_level = c('MSI_status', 'MSS'),
                           shrink = 'apeglm')


oriolarques/GEGVIC documentation built on Oct. 30, 2024, 10:44 p.m.