estimate.mean.dsp.values: Get the mean and dispersion values for each genes

View source: R/expression_fit.R

estimate.mean.dsp.valuesR Documentation

Get the mean and dispersion values for each genes

Description

This function estimates the mean and dispersion of each gene (in a single cell, before pseudobulk aggregation) dependent on the read depth and the gamma mixture distribution

Usage

estimate.mean.dsp.values(
  readDepth,
  read.umi.fit,
  gamma.mixed.fits,
  ct,
  disp.fun.param,
  nGenes = 21000,
  samplingMethod = "quantiles"
)

Arguments

readDepth

Target read depth per cell

read.umi.fit

Data frame for fitting the mean UMI counts per cell depending on the mean readds per cell (required columns: intercept, reads (slope))

gamma.mixed.fits

Data frame with gamma mixed fit parameters for each cell type (required columns: parameter, ct (cell type), intercept, meanUMI (slope))

ct

Cell type of interest (name from the gamma mixed models)

disp.fun.param

Function to fit the dispersion parameter dependent on the mean (required columns: ct (cell type), asymptDisp, extraPois (both from taken from DEseq))

nGenes

Number of genes to simulate (should match the number of genes used for the fitting)

samplingMethod

Approach to sample the gene mean values (either taking quantiles or random sampling)

Value

Data frame with mean and dispersion value for each gene


heiniglab/scPower documentation built on Jan. 9, 2025, 12:13 p.m.