diffExp: Compute differential expression

Description Usage Arguments Value See Also Examples

View source: R/diffExp.R

Description

Compute differential expression for case vs control samples. Will produce the file computedEmpGenes.csv listing empiricaly differentially expressed genes used for RNA-Seq normalization.

Usage

1
2
3
4
  diffExp(case_id='',control_id='',source='octad.small',
  file='octad.counts.and.tpm.h5',normalize_samples=TRUE,k=1,
  expSet=NULL,n_topGenes=500,DE_method='edgeR',
  parallel_cores = 2,output=TRUE,outputFolder='', annotate=TRUE)

Arguments

case_id

vector of cases used for differential expression.

control_id

vector of controls used for differential expression.

source

the file for the octad expression matrix. By default, set to octad.small to use only 978 landmark genes profiled in LINCS database. Use octad.whole option to compute DE on the whole transcriptome octad.counts.and.tpm.h5 file. The file should be present in the working directory or the whole path should be included. If source is set to 'side', the expSet matrix is estimated.

expSet

input expression matrix. By default set to NULL since the expSet is created based on cases, controls and source file.

file

if expSet='octad.whole', source path to expSet='octad.counts.and.tpm.h5' file is required if it is not in working directory. By default function seeks for the .h5 file in the working directory.

normalize_samples

if TRUE, RUVSeq normalization is applied to either EdgeR or DESeq. No normalization needed for limma+voom.

k

eiter k=1 (by default), k=2 or k=3, number of factors used in model matrix construction in RUVSeq normalization if normalize_samples=TRUE.

n_topGenes

number of empiricaly differentially expressed genes estimated for RUVSeq normalization. Default is 5000.

DE_method

edgeR, DESeq2 or limma DE analysis.

parallel_cores

number of cores to be used for parallel computing in DESeq2.

output

if TRUE, output files is produced.

outputFolder

path to output folder. By default, the function produces result files in working directory.

annotate

if TRUE, annotation by ENSEMBL gene is performed. If TRUE, make sure row.names of the custom input contain ensembl gene ids.

Value

res

data.frame with list of differentially expressed genes.

computedEmpGenes.csv

data.frame listing empiricaly differentially expressed genes used for RNA-Seq normalization.

See Also

computeRefTissue,runsRGES,geneEnrich.

Examples

1
2
3
4
5
HCC_primary=subset(phenoDF,cancer=='liver hepatocellular carcinoma'&sample.type == 'primary') #select data
case_id=HCC_primary$sample.id #select cases
HCC_adjacent=subset(phenoDF,cancer=='liver hepatocellular carcinoma'&sample.type == 'adjacent'&data.source == 'TCGA') #select data
control_id=HCC_adjacent$sample.id #select cases
res=diffExp(case_id,control_id,source='octad.small',output=TRUE)

Bin-Chen-Lab/octad_desktop documentation built on Oct. 28, 2020, 11:13 a.m.