eset2Phase: Estimate the phases of expression

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

View source: R/eset2Phase.R

Description

This function estimates the probabilities of expression for all genes in all cells. Given an ExpressionSet, it returns the posterior probability for being in phase II (expression) for each gene in each cell.

Usage

1
eset2Phase(eset, low.prob = 0.99)

Arguments

eset

An object of ExpressionSet for the single cell RNA-seq data. This should be constructed using the ExpressionSet function provided by Biobase.

low.prob

The probability threshold for calling phase II. When the posterior probability for a gene in a cell is greater than this threshold, it will be called as in phase II (expressed).

Details

The estimation procedure considers the cell-specific (for example, sequencing depth and marginal distribution of expression for all genes), and gene-specific (for example, average expression level for this gene cross all cells) factors, which achieves a data-driven thresholding and provides better results than using an fixed, ad hoc threshold for determining expression state.

Value

An object of sc2pSet, which is an extension of ExpressionSet. Slots in the sc2pSet include the following

assayData

This includes three matrices of the same dimension as the original data in the input eset. The normalization Offset that counts for technical bias such as library size, the estimated probability in Phase 2 (Z) and the input counts exprs.

phenoData

This expanded phenoData includes the same information for each cell(sample) as in eset, with additional Phase I parameters for each cell.

featureData

This contains the Phase II parameters in the lognormal model for each gene.

annotationInherited from the input eset experimentDataInherited from the input eset

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
## 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)
data

## visualize the results for a gene
zyPlot(rownames(data)[1], data, group.name="celltype")

## End(Not run)

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