findGuideHitsAllScreens: Calculate guide-level stats for multiple experiments

View source: R/MAUDE.R

findGuideHitsAllScreensR Documentation

Calculate guide-level stats for multiple experiments

Description

Uses findGuideHits to find guide-level stats for each unique entry in 'experiments'.

Usage

findGuideHitsAllScreens(experiments, countDataFrame, binStats, ...)

Arguments

experiments

a data.frame containing the headers that demarcate the screen ID, which are all also present in countDataFrame and binStats

countDataFrame

a table containing one column for each bin (A-F) and another column for non-targeting guide (logical-"NT"), and unsorted abundance (NS), as well as columns corresponding to those in 'experiments'

binStats

a bin model as created by makeBinModel, as well as columns corresponding to those in 'experiments'

...

other parameters for findGuideHits

Value

guide-level stats for all experiments

Examples

 fakeReadData = data.frame(id=rep(1:1000,2), expt=c(rep("e1",1000), rep("e2",1000)), 
                          A=rpois(2000, lambda = 100), B=rpois(2000, lambda = 100),
                          C=rpois(2000, lambda = 100), D=rpois(2000, lambda = 100),
                          E=rpois(2000, lambda = 100), F=rpois(2000, lambda = 100),
                          NotSorted=rpois(2000, lambda = 100), 
                          negControl = rep(rnorm(1000)>0,2), stringsAsFactors = FALSE)
expts = unique(fakeReadData["expt"]);
curSortBins = makeBinModel(data.frame(Bin = c("A","B","C","D","E","F"), fraction = rep(0.1,6)))
curSortBins = rbind(curSortBins, curSortBins) # duplicate and use same for both expts
curSortBins$expt = c(rep(expts$expt[1],6),rep(expts$expt[2],6))
guideHits = findGuideHitsAllScreens(experiments = expts, countDataFrame=fakeReadData,
                                    binStats = curSortBins, unsortedBin = "NotSorted",
                                    negativeControl="negControl")

Carldeboer/MAUDE documentation built on March 27, 2022, 8:50 p.m.