estParam {PROPER} | R Documentation

## estimate simulation parameters from a count table

### Description

This function estimate simulation parameters from a count table, which can be used to set simulation scenarios. The parameters estimated include baseline expression, biological variation in the form of dispersion paramter.

### Usage

    estParam(X,type = c(1,2))

### Arguments

`X` | An ExpressionSet or a matrix, with entries being RNA sequencing counts
`type` | `type=1` estimates with minimal assumption based on sample means and variances for each genes. `type=2` uses `edgeR` package.

### Details

This is a function that allows a user to establish simulation basis from his/her own data set. Type 1 uses simple average count and sample variance to estimate over dispersion, after normalizing by library size for each sample. Estimated dispersion is bounded at minimum 0.001. Type 2 uses `edgeR`'s `AveLogCPM` as the estiamte for baseline expression and `tagwiseDispersion` as the estimate for dispersion.

### Value

A list with following fields:

`seqDepth` | Estimated sequencing depth for each sample
`lmean` | A vector of baseline expression rate per gene in log scale, with length `nrow(X)`
`lOD` | A vector of log dispersion for each gene, with length `nrow(X)`

### Author(s)

Jean Wu <zhijin_wu@brown.edu>

### Examples

    ## Not run:
    lmu0=rnorm(20000,5,2)
    lOD0=rnorm(20000,-4,1)
    lmu=exp(rnorm(20000*10,lmu0,exp(lOD0)))
    X=matrix(rpois(20000*10,lmu),20000,10)
    param=estParam(X)

    ## End(Not run)

[Package PROPER version 1.26.0 Index]