Description Usage Arguments Value See Also Examples
Performs Parallel Tempering MCMC to explore the species state space. Two types of moves are implemented: a mutation step (within chain) and an exchange step (between neighboring chains). If working with BLASTn data, use parallel.temper.nucl().
parallel.temper.explicit is the same function as parallel.temper but with a more involved syntax.
1 2 3 4 5 6 | parallel.temper(step2, readSupport = 10, noChains = 12, seed = 1,
iter = 500, bypass = FALSE)
parallel.temper.explicit(readSupport = 10, noChains = 12,
pij.sparse.mat, read.weights, ordered.species, gen.prob.unknown, outDir,
seed = 1, iter = 500, bypass = FALSE)
|
step2 |
list. The output from reduce.space(). Alternatively, it can be a character string containing the path name of the ".RData" file where step2 list was saved. |
readSupport |
The number of reads the user requires in order to believe in the presence of the species. It is used to compute the penalty factor. The default value is 10. We compute the logarithmic penalty value as the log-likelihood difference between two models: one where all N reads belong to the "unknown" category and one where r reads have a perfect match to some unspecified species and the remaining reads belong to the "unknown" category. |
noChains |
The number of parallel chains to run. The default value is 12. |
seed |
Optional argument that sets the random seed (default is 1) to make results reproducible. |
iter |
The number of MCMC iterations. The default behavior of metaMix is to take into account the number of potential species after step 2 in order in order to compute the number of MCMC iterations. By default metaMix will choose the greater value between a) the user-specified value for iter and b) the product of (5 * the number of potential species). This behavior can by bypassed by setting the bypass parameter to TRUE. Then the MCMC will run for exactly the user-specified number iter. |
bypass |
A logical flag. If set to TRUE the MCMC will run for exactly "iter" iterations. If FALSE, metaMix defaults to choosing the greater value between "iter" and "5*(nrow(ordered.sepcies))". |
pij.sparse.mat |
sparse matrix of generative probabilities, see value of ?reduce.space. |
read.weights |
see ?reduce.space. |
ordered.species |
see ?reduce.space. |
gen.prob.unknown |
see ?reduce.space. |
outDir |
see ?reduce.space. |
step3: A list with two elements. The first one (result) is a list that records MCMC information from each parallel chain. The second one (duration) records how much time the MCMC exploration took.
parallel.temper.nucl
This function should be used when working with BLASTn data.
1 2 3 4 5 6 7 8 9 10 11 | ## See vignette for more details
## Not run:
# Either load the object created by previous step (i.e from function reduce.space() )
data(step2) ## example output of reduce.space
step3<-parallel.temper(step2=step2)
# or alternatively point to the location of the step2.RData object
step3 <- parallel.temper(step2="/pathtoFile/step2.RData")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.