fit_dropout_model: Fit a Bayesian model of dropout CRISPR screen data

Description Usage Arguments Details Value Note Examples

View source: R/fitting_functions.R

Description

This function fits a Bayesian model of survival/dropout CRISPR screen data. It uses a negative binomial to model the input and output counts of gRNAs, adjusting the results appropriately to account for sequencing depth.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fit_dropout_model(
  dropout_data,
  out_dir = NULL,
  n_cores = 1,
  tot_samp = 10000,
  n_warmup = 500,
  n_chains = 4,
  rep_cutoff = 0.1,
  plot_rep_cutoff = TRUE,
  verbose = TRUE
)

Arguments

dropout_data

a data frame of dropout data. See details for column requirements.

out_dir

path to output directory

n_cores

number of cores to utilize

tot_samp

total number of MCMC draws to take, spread evenly across chains

n_warmup

total number of warmup draws to take from each MCMC chain

n_chains

number of MCMC chains to run in each sampler

rep_cutoff

a representation cutoff quantile (0 to 1)

plot_rep_cutoff

logical indicating whether to plot the representation cutoff histogram

verbose

logical indicating whether to print messages

Details

dropout_data requires the following columns:

Value

a data frame of input counts, fit and model statistics for the log-fold-change for each input gene.

Note

Currently this function only supports marginal priors. If you want to use grouped/conditional priors, contact the malacoda developers.

The gene_data column in the output contains only the gRNAs that passed the representation cutoff.

Examples

1
2
3
4
5
6
# This example uses too-few MCMC samples for the sake of run time. Convergence will be poor.

fit_dropout_model(dropout_data = dropout_example,
n_cores = 1,
tot_samp = 20,
n_warmup = 5)

andrewGhazi/malacoda documentation built on Aug. 2, 2020, 12:54 a.m.