Estimate proportions in Dirichlet-multinomial model

Share:

Description

Maximum likelihood estimates of genomic feature (for instance, transcript, exon, exonic bin) proportions in full Dirichlet-multinomial model used in differential splicing or sQTL analysis. Full model estimation means that proportions are estimated for every group/condition separately.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dmFit(x, ...)

## S4 method for signature 'dmDSdispersion'
dmFit(x, dispersion = "genewise_dispersion",
  prop_mode = "constrOptimG", prop_tol = 1e-12, verbose = 0,
  BPPARAM = BiocParallel::MulticoreParam(workers = 1))

## S4 method for signature 'dmSQTLdispersion'
dmFit(x, dispersion = "genewise_dispersion",
  prop_mode = "constrOptimG", prop_tol = 1e-12, verbose = 0,
  BPPARAM = BiocParallel::MulticoreParam(workers = 1))

Arguments

x

dmDSdispersion or dmSQTLdispersion object.

...

Other parameters that can be defined by methods using this generic.

dispersion

Character defining which dispersion should be used for fitting. Possible values "genewise_dispersion" or "common_dispersion".

prop_mode

Optimization method used to estimate proportions. Possible values "constrOptim" and "constrOptimG".

prop_tol

The desired accuracy when estimating proportions.

verbose

Numeric. Definie the level of progress messages displayed. 0 - no messages, 1 - main messages, 2 - message for every gene fitting.

BPPARAM

Parallelization method used by bplapply.

Value

Returns a dmDSfit or dmSQTLfit object.

Author(s)

Malgorzata Nowicka

See Also

data_dmDSdata, data_dmSQTLdata, plotFit, dmDispersion, dmTest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
###################################
### Differential splicing analysis
###################################
# If possible, use BPPARAM = BiocParallel::MulticoreParam() with more workers

d <- data_dmDSdata

### Filtering
# Check what is the minimal number of replicates per condition 
table(samples(d)$group)
d <- dmFilter(d, min_samps_gene_expr = 7, min_samps_feature_expr = 3, 
 min_samps_feature_prop = 0)

### Calculate dispersion
d <- dmDispersion(d, BPPARAM = BiocParallel::SerialParam())

### Fit full model proportions
d <- dmFit(d, BPPARAM = BiocParallel::SerialParam())

head(proportions(d))
head(statistics(d))