uci-cbcl/genomix — pull request #105 by anbangx (2013-12-13 02:33:32+00:00)
Title: Anbangx/fitting mixture model

@jakebiesinger @JavierJia @Elmira88 @Nan-Zhang

This PR adds -setCutoffCoverageByFittingMixture and - setMinScaffoldingSeedLength two command line options to automatically generate minCoverage and minScaffoldingSeedLength.

The minCoverage generation is based on fitting our data into mixture model(Exponential and Normal).
Assume there are two groups (an exponential and a gaussian), every point has some probability of belonging to each category and each category has an overall probabbility, I calculate the means of the exponential and gaussian, considering every point but weighting it by the pdf value for that point in that class. The weighted means and variances are the new parameters, which gives you new pdf values. Run the whole steps until the likelihood converge. Actually this is the EM algorithm. And then one choice of our cutoff coverage threshold can be when the probability of belonging to the normal distribution is greater than the probability of belonging to the exponential distribution, this happens when the ratio of norm to exponential is > 1
I have tested it. It works well.

The minScaffoldingSeedLength generation is based on the goal that we want to get the top 1%(top means top kmerLength) of our vertices as our scaffolding seed.