Description Usage Arguments Details Value Examples
View source: R/interactiveCall.R
Interactively recall a marker, using DBSCAN or model-based clustering.
1 2 | interactiveCall(originalResult, startingPointFunction, n.iter, dbscanParameters,
clusterModelParameters, runHeuristicsParameters, ...)
|
originalResult |
The previous attempt at calling this marker. Must be an object of class |
startingPointFunction |
A function that generates a list of starting points for the model based clustering algorithm. Each starting point is a 2 x 2 matrix, containing two column vectors. These column vectors are the initial centers for the two homozygote clusters. |
n.iter |
The number of MCMC iterations to use for the model based clustering algorithm. |
dbscanParameters |
A list with named entries. Each entry is it self a list with two entries, named |
clusterModelParameters |
A list of parameters to the model based clustering algorithm. See |
runHeuristicsParameters |
A list of parameters to the runHeuristics function. |
... |
Undocumented arguments, used only for testing this function. |
This function allows the user to interactively recall a marker using (primarily) keyboard commands. The current marker calling result is displayed in a plot. Once a command is entered, hitting ENTER/RETURN runs the command. The commands are as follows:
Keep the current marker calling result and exit
Discard this maker, by returning a result indicating that this marker is momomorphic
Go back to the original result used as an input to this function
Generate a new set of marker calls using the model-based clustering algorithm, OR show the next model-based calling result. Once the last model-based calling result has been displayed, command "c" generates a new set of marker calls.
Apply the model-based clustering algorithm, but with the user selecting the initial centers of the two clusters by clicking on the plot.
If the input command is a name of an entry of dbscanParameters
, then the corresponding entry of dbscanParameters
is used as the parameters for the DBSCAN algorithm.
An object of class markerResult
, containing the details of the called marker.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | data("eightWayExampleData", package="magicCalling")
data <- eightWayExampleData[[1]]
#Original calling result marks the marker as monomorphic
originalResult <- list(hasVariability = FALSE, data = data)
class(originalResult) <- "markerResult"
#Specify the starting points for the model-based clustering algorithm. Four starting points, each specified twice. The y-coordinate is chosen as the mean of the y-coordinates of the input data.
startingPointFunction <- function(data)
{
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))
)
}
exampleDbscanParameters <- list("1" = list(eps = 0.04, minPts = 65), "2" = list(eps = 0.03, minPts = 105))
## Not run:
#In this call, commands "1" and "2" run DBSCAN. Command "c" calls the model-based clustering algorithm, generating eight possible calls, and displays the first. The next seven commands "c" show the next model-based call. The eighth command "c" generates another eight possible calls and shows the first, etc.
interactiveResult <- interactiveCall(originalResult, startingPointFunction = startingPointFunction, n.iter = 200, dbscanParameters = exampleDbscanParameters, clusterModelParameters = magicCalling:::exampleModelParameters, runHeuristicsParameters = list(minHomozygoteSize = 200))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.