PoisUMIImportantGenes: Fits the Poisson UMI model

Description Usage Arguments Details Value See Also Examples

Description

Calculates weights based on information contained in each expression value (i.e. difference from null expectation).

Usage

1

Arguments

expr_mat

a numeric matrix of raw UMI counts, columns = samples, rows = genes.

lambdas

a numeric matrix of estimated lambdas of equal dimension to expr_mat, see Details.

alpha

scaling parameter, see Details.

Details

The Poisson model considers each observation to be drawn from a Poisson distribution with parameter:

lambda_ij = m_i * m_j * T * alpha

where

m_i

and

m_j

are the proportion of all molecules detected that are of gene i or in cell j respectively, and T is the total molecules detected across all genes and cells.

alpha

approximates the extent of over-counting of molecules.

This function calculates weights for each observation as the probability of observing a greater or equal deviation from the mean of the Poisson distribution.

lambdas and alpha should be calculated using the PoisUMI_Fit_Full_Poisson function.

Value

A matrix of calculated weights for each expression value (same dimensions as input matrix).

See Also

mle2

Examples

1
2
3
  library(M3DExampleData)
  fit <- PoisUMI_Fit_Full_Poisson(Mmus_example_list$data)
  weights <- PoisUMI_Calc_Weights(Mmus_example_list$data, fit$lambdas, fit$alpha)

tallulandrews/PoissonUMIs documentation built on May 31, 2019, 2:56 a.m.