bandle-internal: sample allocations, probabilities and compute loglikilihoods

proteinAllocationR Documentation

sample allocations, probabilities and compute loglikilihoods

Description

Internal sampling function, not for outside use documented for completness

Usage

proteinAllocation(loglikelihoods, currentweights, alloctemp, cond)

outlierAllocationProbs(
  outlierlikelihood,
  loglikelihoods,
  epsilon,
  alloctemp,
  cond
)

sampleOutlier(allocoutlierprob)

covOrganelle(object, fcol = "markers")

pg_prior(object_cond1, object_cond2, K, pgPrior = NULL, fcol = "markers")

sample_weights_pg(nk_mat, pgPrior, w, K, tau = 0.2)

sample_weights_dir(nk_mat, dirPrior)

Arguments

loglikelihoods

the log likelihoods

currentweights

the current allocations weights

alloctemp

the current protein allocations

cond

the control = 1, treatment = 2

outlierlikelihood

the outlier log likelihoods

epsilon

the outlier component weight

allocoutlierprob

the outlier probabilities

object

An instance of class MSnSet

fcol

The feature column containing the markers.

object_cond1

A list of instance of class MSnSets usually control

object_cond2

A list of instance of class MSnSets usually treatment

K

The number of organelle classes

pgPrior

The Polya-Gamma prior

nk_mat

The summary matrix of allocations

w

The Polya-Gamma auxiliary variable

tau

The empirical bayes parameter for the Polya-Gamma variable. Defaults to 0.2.

dirPrior

The Dirichlet prior

Value

returns samples for protein allocations, log likelihoods and probabilities

returns outlier probabilities

returns outlier allocations

returns covariance of organelles using marker proteins

returns the Polya-Gamma prior

returns A sample of the weights using Polya-Gamma priors.

returns A sample of the weights using Dirichlet prior.

Examples

library(pRolocdata)
data("tan2009r1")
covOrganelle(object = tan2009r1)


library(pRolocdata)
data("tan2009r1")
set.seed(1)
tansim <- sim_dynamic(object = tan2009r1, 
                    numRep = 6L,
                   numDyn = 100L)
d1 <- tansim$lopitrep
control1 <- d1[1:3]
treatment1 <- d1[4:6]
out <- pg_prior(object_cond1 = control1,
 object_cond2 = treatment1, K = 11) 



ococrook/bandle documentation built on Nov. 4, 2024, 12:27 a.m.