get_DEGs: get_DEGs

View source: R/get_DEGs.R

get_DEGsR Documentation

get_DEGs

Description

This function calculates differentially expressed genes (DEGs) using DESeq2 for a group of patients. DEGs calculation can take a while so it is recommended to make this analysis as a pre-process

Usage

get_DEGs(
  expression_matrix,
  samples,
  sample_origins = NULL,
  beta = 2,
  gamma = 0.05
)

Arguments

expression_matrix

A read count matrix with genes in rows and patients on columns. All genes must be contained in the global PPI network.

samples

The sample labels as they appear in the expression matrix.

sample_origins

a vector that contains two optional values ("tumor","normal") corresponds to the tissues from which each column in expression_matrix was derived. This vector is utilized for differential expression analysis. If no vector is specified, the sample names of expression_matrix are assumed to be in TCGA format where last two digits correspond to sample type: "01"= solid tumor and "11"= normal.

beta

Minimal fold-change threshold for declering gene as differentially expressed by DESeq (default = 0.2)

gamma

FDR threshold for declering gene as differentially expressed by DESeq (default = 0.05)

Value

A named list of DEGs per sample.

References

Love, M. I., Huber, W. & Anders, S. Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biol. 15, 1-21 (2014).

Examples

data(COAD_Expression)
sample_origins = rep("tumor",ncol(expression_matrix))
sample_origins[substr(colnames(expression_matrix),nchar(colnames(expression_matrix)[1])-1,nchar(colnames(expression_matrix)[1]))=="11"] = "normal"
expression_matrix = expression_matrix[which(rownames(expression_matrix) %in% unique(c(network[,1],network[,2]))),]
DEGs = get_DEGs(expression_matrix,samples,sample_origins=NULL)

Shamir-Lab/PRODIGY documentation built on March 27, 2022, 5:29 p.m.