| Algorithm 2 (Gibbs Sampling Algorithm for the Metagenomic Model). |
|
Require:
references species
, metagenomic reads
, hyperparameter
Global data: count statistics , read-composition distributions , memory for full conditionals Ensure: mixture parameters //initialization: obtain read-composition distributions according to alignment results zero all count statistics for to do sample the species index increment sampled species count end for //Gibbs sampling while not finished do for to do decrement target species count sample a new species index increment sampled species’ count end for if converged and a given number of samples generated then return mixture parameter according to the equation end if end while |