topGene: List top ranked DE genes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/topGene.R

Description

Given DE test results, provide a list of top ranked DE genes according to user specified criteria

Usage

1
topGene(de.obj, phase = "both", number = 20, p.value = 0.05, adjust.method = "BH", annotation = NULL)

Arguments

de.obj

A data frame for DE test result, must be returned from twoPhaseDE.

phase

Character to indicate the phase for DE gene to be listed. Available options include '1' for phase I; '2' for phase II; and "both" for both phases.

number

Integer for the maximum number of genes to be listed. If there are less than specified number of genes with adjusted p-value lower than p.value, all of these will be included in the table.

p.value

A cutoff in adjusted p.value. Only genes with adjusted p.value lower than this cutoff are included in the table.

adjust.method

The method used in the function p.adjust{stats}. The default is "BH" for Benjamini & Hochberg (1995).

annotation

A vector of gene names for all genes in the de.obj. If left as Null, the featureNames in the de.obj will be used.

Details

This function provides a summary table for the genes identified as differentially expressed. Only genes with an adjusted p-value lower than specified in p.value are included, and the maximum number is set by number. One may choose to extract genes with differential expression in Phase 1 only, Phase 2 only. If one is interested in differential expression in any form, setting phase as "both" will include genes with either forms of differential expression, and the genes are sorted by significance in combined FDR.

Value

A data frame with following columns:

Gene.name

The gene identifier.

p1

Probability of Phase II in group 1.

p2

Probability of Phase II in group 2.

Ph1.coef

Test statistic for Phase change

Ph1.fdr

FDR for differential expression in the form of phase chage.

m1

Estimated mean phase-2 expression in group 1

m2

Estimated mean phase-2 expression in group 2

Ph2.coef

Test statistic for differential expression within Phase 2

marLogFC

Marginal log fold change

Ph2.fdr

FDR for differential expression in the form of magnitude difference in Phase 2

Phase1

Indicator for whether there is significant Phase change DE (based on the user specified p.value cutoff.)

Phase2

Indicator for whether there is significant Phase-2 DE (based on the user specified p.value cutoff.)

Comb.fdr

A combined FDR cnosidering both

Category

Indicates direction of DE. For example, "–"" down regulation in both the probability in Phase-2, and the magnitude of expression.

Author(s)

Zhijin (Jean) Wu <zwu@stat.brown.edu>

See Also

twoPhaseDE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
data(brain_scRNAseq)

## create ExpressionSet
colnames(Y) <- rownames(design)
phenoData <- new("AnnotatedDataFrame", data=design)
eset <- ExpressionSet(assayData=Y, phenoData=phenoData)

## estimate phases
data <- eset2Phase(eset)

##  DE test
de.sc2p <- twoPhaseDE(data, design="celltype", test.which=1, offset="sf")

## report top ranked genes in phase I
topGene(de.sc2p, 1)

## report top ranked genes in phase II
topGene(de.sc2p, 2)

## report top ranked genes in both phases
topGene(de.sc2p, phase="both", number=5)


## End(Not run)

haowulab/SC2P documentation built on Feb. 28, 2021, 8:39 a.m.