bi.deg: Transformation an expression matrix to binary differential...

View source: R/bi.deg.R

bi.degR Documentation

Transformation an expression matrix to binary differential expression matrix

Description

Transform the RNA-seq counts or normalized expression matrix into binary differential expression matrix of -1, 0 and 1, which indicates the down-regulation, no change and up-regulation.

Usage

bi.deg(exp, cl, method = c("edger", "deseq2", "normalized")[1],
  cutoff = 0.05, cores = 1)

Arguments

exp

a matrix or data frame for expression data. The expression value can be counts or normalized expression data

cl

a vector of 0 and 1. It has equal length with the column number of exp. 1 indicates the corresponding samples are patients and 0 is control or normal

method

defines the methods applied for DE analysis. The possible value is 'edger', 'deseq2', 'normalized'. 'edger' or 'deseq2' is used for RNA-seq count data; 'normalized' is used for normalized RNA-seq or microarray data

cutoff

the p-value cutoff for DEGs

cores

the thread number

Details

For each sample in 'exp', 'cl' defines the patients and normal. The normal samples are used to construct the expression references with negative binomial distribution (e.g. method='edger' or method='deseq2') or a normal distribution (method='normalized').

When counts data are used, the DEG analysis is performed using the functions implemented by 'DESeq2' or 'edgeR'. The dispersion and mu values are estimated.

Value

A deg class object with value of 1, 0 and -1.

Author(s)

Guofeng Meng

Examples

deg <- bi.deg(exp,cl=cl, method='edger', cutoff=0.05) # exp is the RNA-seq counts matrix

menggf/DEComplexDisease documentation built on June 30, 2022, 1:47 p.m.