R/RcppExports.R

Defines functions getLLNoMaster getLLNoInit getLL get_norm_countVec get_pois_muVec get_pois_countVec get_nb_cpp

Documented in getLL getLLNoInit getLLNoMaster get_nb_cpp get_norm_countVec get_pois_countVec get_pois_muVec

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' get_nb_cpp
#' Get negative binomial probability density for double 'count', given
#' size and mu parameters.
#' @param mu NumericVector
#' @param count double
#' @param size NumericVector
#' @export
get_nb_cpp <- function(mu, count, size) {
    .Call(`_ACER_get_nb_cpp`, mu, count, size)
}

#' get_pois_countVec
#' Get poisson probability density for multiple counts.
#' @param count_vector NumericVector
#' @param mu double
#' @export
get_pois_countVec <- function(count_vector, mu) {
    .Call(`_ACER_get_pois_countVec`, count_vector, mu)
}

#' get_pois_muVec
#' @param count doubl
#' @param mu_vector NumericVector
#' @export
get_pois_muVec <- function(count, mu_vector) {
    .Call(`_ACER_get_pois_muVec`, count, mu_vector)
}

#' get_norm_countVec
#' @param count_vector NumericVector
#' @param mu double
#' @param var double
#' @export
get_norm_countVec <- function(count_vector, mu, var) {
    .Call(`_ACER_get_norm_countVec`, count_vector, mu, var)
}

#' Function getLL
#' For experiments with master library, initial infection, AND depleted samples
#' sequenced.
#' Call get_nb and get_poiss within cpp code, returning a likelihood value to optimize.
#' @param gene_essentiality NumericVector (for flexibility) by-guide essentiality to test.
#' @param guide_efficiency NumericVector by-guide efficiency.
#' @param sample_effects NumericVector by-sample effects on gene_essentiality.
#' @param init_counts NumericMatrix
#' @param dep_counts NumericMatrix
#' @param var_model int specifying which count mean~variation model to use.
#' @param master_freq NumericMatrix; log fraction of cells infected by each guide;
#'         rows correspond to guides, columns to different masterlibraries.
#' @param masterlib_key NumericVector of columns of master_freq to use per sample.
#' @param cells_infected NumericVector number of cells infected per sample in experiment.
#' @param init_scaling NumericVector of scaling factors to normalize total
#'         read depth of initial sample.
#' @param dep_scaling NumericVector of scaling factors to normalize total
#'         read depth and LFC ratio shifts due to guide drop-out.
#' @param nsg_vals Vector of percent of cells infected (unobserved, integrating over.)
#' @param var_params List of mean~variance model parameters (fit in ModelObj).
#' @param step_size Intervals of infected cells for discrete integral evaluation.
#' @export
getLL <- function(gene_essentiality, guide_efficiency, sample_effects, init_counts, dep_counts, var_model, master_freq, masterlib_key, cells_infected, init_scaling, dep_scaling, nsg_vals, var_params, step_size) {
    .Call(`_ACER_getLL`, gene_essentiality, guide_efficiency, sample_effects, init_counts, dep_counts, var_model, master_freq, masterlib_key, cells_infected, init_scaling, dep_scaling, nsg_vals, var_params, step_size)
}

#' Function getLLNoInit
#' For experiments without sequencing of initial timepoints, just masterlib.
#' Removed parameters from getLL: init_counts, init_scaling.
#' Call get_nb and get_poiss within cpp code, returning a likelihood value to optimize.
#' @param gene_essentiality NumericVector (for flexibility) by-guide essentiality to test.
#' @param guide_efficiency NumericVector by-guide efficiency.
#' @param sample_effects NumericVector by-sample effects on gene_essentiality.
#' @param dep_counts NumericMatrix
#' @param var_model int specifying
#' @param master_freq NumericMatrix; log fraction of cells infected by each guide
#' @param masterlib_key NumericVector of masterlibrary column to use per sample.
#' @param cells_infected NumericVector number of cells infected per sample in exxperiment.
#' @param dep_scaling NumericVector of scaling factors to normalize total
#'         read depth and LFC ratio shifts due to guide drop-out.
#' @param nsg_vals Vector of percent of cells infected (unobserved, integrating over.)
#' @param var_params List of mean~variance model parameters (fit in ModelObj).
#' @param step_size Intervals of infected cells for discrete integral evaluation.
#' @export
getLLNoInit <- function(gene_essentiality, guide_efficiency, sample_effects, dep_counts, var_model, master_freq, masterlib_key, cells_infected, dep_scaling, nsg_vals, var_params, step_size) {
    .Call(`_ACER_getLLNoInit`, gene_essentiality, guide_efficiency, sample_effects, dep_counts, var_model, master_freq, masterlib_key, cells_infected, dep_scaling, nsg_vals, var_params, step_size)
}

#' Function getLLNoMaster
#' Version of getLL.cpp modified to return likelihood without master library
#' information (the infection distribution).
#' Call get_nb and get_poiss within cpp code, returning a likelihood value to optimize.
#' @param gene_essentiality NumericVector (for flexibility) by-guide essentiality to test.
#' @param guide_efficiency NumericVector by-guide efficiency.
#' @param sample_effects NumericVector by-sample effects on gene_essentiality.
#' @param init_counts NumericMatrix
#' @param dep_counts NumericMatrix
#' @param var_model int specifying which mean-var model to use for count data.
#' @param init_scaling NumericVector of scaling factors to normalize total
#'         read depth of initial sample.
#' @param dep_scaling NumericVector of scaling factors to normalize total
#'         read depth and LFC ratio shifts due to guide drop-out.
#' @param nsg_vals Vector of percent of cells infected (unobserved, integrating over.)
#' @param var_params List of mean~variance model parameters (fit in ModelObj).
#' @param step_size Intervals of infected cells for discrete integral evaluation.
#' @export
getLLNoMaster <- function(gene_essentiality, guide_efficiency, sample_effects, init_counts, dep_counts, var_model, init_scaling, dep_scaling, nsg_vals, var_params, step_size) {
    .Call(`_ACER_getLLNoMaster`, gene_essentiality, guide_efficiency, sample_effects, init_counts, dep_counts, var_model, init_scaling, dep_scaling, nsg_vals, var_params, step_size)
}
CshlSiepelLab/ACE documentation built on Sept. 10, 2021, 11:21 p.m.