makeBinModel: Create a bin model for a single experiment

Description Usage Arguments Value Examples

View source: R/MAUDE.R

Description

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. In order to create empty bins, use curBinBounds$fraction=0.00000000001 (or some other really small number), which effectively makes the bins so small as to not exist.

Usage

1
makeBinModel(curBinBounds, tailP = 0.001)

Arguments

curBinBounds

a data.frame containing three 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)

Value

returns a data.frame with additional columns including the bin starts and ends in Z-score space, and in quantile space.

Examples

1
2
binBounds = makeBinModel(data.frame(Bin=c("A","B","C","D","E","F"), fraction=rep(0.1,6))) #generally, this is retrieved from the FACS data
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 = F); print(p)

klarman-cell-observatory/MAUDE documentation built on Nov. 4, 2019, 3:53 p.m.