GetLLMerged | R Documentation |
Calculate log-likelihood for all pairs of clusters
GetLLMerged(
w,
cell.count.raw.merged,
dat.impute.repress.lst,
dat.impute.active,
return.mat = FALSE
)
w |
mixing fraction of the two histone modifications, relative to a reference histone modification (usually dat.impute.active) |
cell.count.raw.merged |
vector of raw cell counts from a double-incubated cell. |
dat.impute.repress.lst |
Non-reference histone modification: list object containing cluster-specific probability weights across genomic bins. Each element in list is a probability vector across genomic bins for a cluster. |
dat.impute.active |
Reference histone modification: matrix object where rows are cluster names and columns are genomic bins. Each row is a probability vector across genomic bins. |
return.mat |
if TRUE, returns full log-likelihood matrix for all possible pairs. If False, returns the negative of the maximum likelihood value. |
if return.mat=TRUE, returns full log-likelihood matrix for all possible pairs. If False, returns the negative of the maximum likelihood value.
data(RawDblCountMatSubset)
cell.count.raw.merged.lst <- as.list(as.data.frame(as.matrix(count.mat.dbl.subset)))
act.repress.coord.lst <- lapply(cell.count.raw.merged.lst, function(cell.count.raw.merged){
optim.out <- FitMixingWeight(cell.count.raw.merged = cell.count.raw.merged,
dat.impute.repress.lst = dat.impute.repress.lst,
dat.impute.active = dat.impute.active, w.init = 0.5, w.lower = wlower, w.upper = wupper, jmethod = "Brent")
ll.mat <- GetLLMerged(optim.out$par, cell.count.raw.merged, dat.impute.repress.lst, dat.impute.active, return.mat = TRUE)
return(list(ll.mat = ll.mat, w = optim.out$par))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.