getFuncRvPosteriors: Posterior probabilities of FR given G and E.

Description Usage Arguments Value Author(s) Examples

View source: R/funcRIVER.R

Description

getFuncRvPosteriors computes posterior probabilities of functionality of regulatory variant (FR) given genomic features (G) and outlier status (E) with current estimate of beta (parameters between FR and G) and theta (parameters between FR and E).

Usage

1
getFuncRvPosteriors(Out, probFuncRvFeat, theta)

Arguments

Out

Binary values of outlier status (E).

probFuncRvFeat

probabilities of FR given genomic features and estimated beta, P(FR | G, beta), from getFuncRvFeat.

theta

Current estimate of theta.

Value

posterior probabilities of FR (P(FR | G, E, beta, theta)) and probable status of FR.

Author(s)

Yungil Kim, ipw012@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dataInput <- getData(filename=system.file("extdata", "simulation_RIVER.gz",
        package = "RIVER"), ZscoreThrd=1.5)
Feat <- scale(t(Biobase::exprs(dataInput))) # genomic features (G)
Out <- as.vector(as.numeric(unlist(dataInput$Outlier))-1) # outlier status (E)
theta.init<-matrix(c(.99, .01, .3, .7), nrow=2)
costs<-c(100, 10, 1, .1, .01, 1e-3, 1e-4)
logisticAllCV <- glmnet::cv.glmnet(Feat, Out, lambda=costs, family="binomial",
        alpha=0, nfolds=10)
probFuncRvFeat <- getFuncRvFeat(Feat, logisticAllCV$glmnet.fit,
        logisticAllCV$lambda.min)
posteriors <- getFuncRvPosteriors(Out, probFuncRvFeat, theta=theta.init)

ipw012/RIVERpkg documentation built on March 8, 2020, 7:54 p.m.