Learn R Programming

wavClusteR (version 2.6.2)

fitMixtureModel: 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:
  • l1The first mixing coefficient
  • l2The second mixing coefficient
  • pThe mixture model
  • p1The first component of the mixture
  • p2The second component of the mixture

See Also

getAllSub getExpInterval

Examples

Run this code
filename <- system.file( "extdata", "example.bam", package = "wavClusteR" )
example <- readSortedBam(filename = filename)
countTable <- getAllSub( example, minCov = 10, cores = 1 )

fitMixtureModel( countTable, substitution = "TC" )

#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 )

Run the code above in your browser using DataLab