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

1 | ```
fitMixtureModel(countTable, substitution = "TC")
``` |

`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.) |

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 |

Federico Comoglio and Cem Sievers

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
## 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 )
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.