Description Usage Arguments Details Examples
Plot the results of a hierarchical Bayesian model
1 2 3 4 5 |
x |
An object of class hierarchicalBayesianModel (generated by |
allFounderNames |
Optional list of the names of the founder lines replicates within the genetic data. |
chainIndex |
The index of the MCMC chain to show. |
... |
Extra arguments to these functions are ignored. |
This function plots the result of using the end-point of one of the Markov chains as a fitted model. Homozygote clusters are shown in red and green, and the heterozygote cluster in dark blue. Light blue represents points falling in the outlier cluster. Black points are unclassified. Ovals represent the covariance matrixces of the homozygote and heterozygote clusters. If Input allfounderNames is input, then the founding lines of the population are given a different shape, and shown in black.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data("eightWayExampleData", package="magicCalling")
data <- eightWayExampleData[[1]]
meanY <- mean(data[,2])
startingPoints <- list(
rbind(c(0.5, meanY), c(0.5, meanY)),
rbind(c(0.5, meanY), c(0.5, meanY)),
rbind(c(0.25, meanY), c(0.5, meanY)),
rbind(c(0.25, meanY), c(0.5, meanY)),
rbind(c(0.75, meanY), c(0.5, meanY)),
rbind(c(0.75, meanY), c(0.5, meanY)),
rbind(c(0.8, meanY), c(0.2, meanY)),
rbind(c(0.8, meanY), c(0.2, meanY))
)
result <- fitClusterModel(data, startingPoints, n.iter = 200, D_hom = diag(2)*4, V_hom = cbind(c(0.005, 0), c(0, 0.1))/3, n_hom = 30, D_err = diag(2), V_err = diag(2)*10/3, n_err = 300, V_het = diag(2)*0.025/3, n_het = 1500)
plot(result, chainIndex = 1)
heuristicResults <- runHeuristics(result, minHomozygoteSize = 200)
plot(heuristicResults, chainIndex = heuristicResults$chainIndex)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.