optimizeModelParameters: Function optimizeModelParameters

Description Usage Arguments Value

View source: R/optimizeModelParameters.R

Description

Given model object and data object, create a results object. Mainly runs optim over sample (sub)set(s). in final version, have as part of R6 object which inherits from ModelObj and DataObj; for debugging, run as stand-alone with R6 as input.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
optimizeModelParameters(
  user_DataObj,
  user_ModelObj,
  fit_sample_param = F,
  fit_guide_param = F,
  subset_genes = NA,
  converge_ll = 100,
  max_iter = 10,
  ncpus = NA
)

Arguments

user_DataObj

DataObj with all experimental data.

user_ModelObj

ModelObj with simple inferred parameters for model.

fit_sample_param

User option to fit by-sample parameters.

fit_guide_param

User option to fit by-guide feature weights.

subset_genes

optional list of start & end points of gene indices to subset.

converge_ll

Tolerated variation in likelihood to end optimization; default 100.

max_iter

Maximum number of optimization iterations, regardless of convergence. Default 10.

ncpus

Number of threads to use in parallel optimization; auto-detected if not specified.

Value

Data.table with Gene name, optimized essentiality, guide_efficiency, sample_response, guide_covariates, gene_essentiality likelihood, gene_ess CI (hessian),; one DT each for "all", "test", and "control" conditions, and an optional 4th for differential depletion effect sizes.


CshlSiepelLab/ACE documentation built on Sept. 10, 2021, 11:21 p.m.