makeBinModel | R Documentation |
Provided with the fractions captured by each bin, creates a bin model for use with MAUDE analysis, assuming 3 contiguous bins on the tails of the distribution. You can easily remove or rename bins after they have been created with this function. An example is provided in the BACH2 Vignette.
makeBinModel(curBinBounds, tailP = 0.001)
curBinBounds |
a data.frame containing two columns: Bin (must be A,B,C,D,E,F), and fraction (the fractions of the total captured by each bin) |
tailP |
the fraction of the tails of the distribution not captured in any bin (defaults to 0.001) |
returns a data.frame with additional columns including the bin starts and ends in Z-score space, and in quantile space.
#generally, the bin bounds are retrieved from the FACS data binBounds = makeBinModel(data.frame(Bin=c("A","B","C","D","E","F"), fraction=rep(0.1,6))) if(require("ggplot2")){ p = ggplot() + geom_vline(xintercept= sort(unique(c(binBounds$binStartZ, binBounds$binEndZ))),colour="gray")+ theme_classic() + xlab("Target expression") + geom_segment(data=binBounds, aes(x=binStartZ, xend=binEndZ, colour=Bin, y=0, yend=0), size=5, inherit.aes = FALSE); print(p) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.