getNBGaussianLikelihood | R Documentation |
Uses a normal distribution (N(mu,sigma)) to estimate how many reads are expected per bin under nullModel, and calculates the log likelihood under a negative binomial model. This function is usually not used directly.
getNBGaussianLikelihood(x, mu, k, sigma = 1, nullModel, libFract)
x |
a vector of guide counts per bin |
mu |
the mean for the normal expression distribution |
k |
the vector of total counts per bin |
sigma |
for the normal expression distribution (defaults to 1) |
nullModel |
the bin bounds for the null model (for no change in expression) |
libFract |
the fraction of the unsorted library this guide comprises (e.g. from unsorted cells, or sequencing the vector) |
the log likelihood
#usually not used directly #make a bin sorting model with 6 10% bins curSortBins = makeBinModel(data.frame(Bin = c("A","B","C","D","E","F"), fraction = rep(0.1,6))) readsForGuideX =c(10,20,30,100,200,100); #the reads for this guide getNBGaussianLikelihood(x=readsForGuideX, mu=1, k=rep(1E6,6), sigma=1, nullModel=curSortBins, libFract = 50/1E6) getNBGaussianLikelihood(x=readsForGuideX, mu=-1, k=rep(1E6,6), sigma=1, nullModel=curSortBins, libFract = 50/1E6) #mu=1 is far more likely (closer to 0) than mu=-1 for this distribution of reads
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.