fitMixtureModel {wavClusteR} | R Documentation

## Fit a non-parametric mixture model from all identified substitutions

### Description

Estimates the two-component mixture model consisting of the mixing coefficients and the density functions.

### Usage

    fitMixtureModel(countTable, substitution = "TC")

### Arguments

`countTable` | A GRanges object, corresponding to a count table as returned by the getAllSub function
`substitution` | A character indicating which substitution is induced by the experimental procedure (e.g. 4-SU treatment - a standard in PAR-CLIP experiments - induces T to C transitions and hence substitution = 'TC' in this case.)

### Value

A list containing:

`l1` | The first mixing coefficient
`l2` | The second mixing coefficient
`p` | The mixture model
`p1` | The first component of the mixture
`p2` | The second component of the mixture

### Author(s)

Federico Comoglio and Cem Sievers

### See Also

`getAllSub` `getExpInterval`

### Examples

    ## Not run:
    filename <- system.file( "extdata", "example.bam", package = "wavClusteR" )
    example <- readSortedBam(filename = filename)
    countTable <- getAllSub( example, minCov = 10, cores = 1 )

    fitMixtureModel( countTable, substitution = "TC" )

    ## End(Not run)

    #load and inspect the model
    data( model )
    str( model )

    #plot densities and estimate the relative substitution frequency support dominated by PAR-CLIP induction
    getExpInterval( model, bayes = TRUE, plot = TRUE )

[Package wavClusteR version 2.12.1 Index]