#' get.mcl.clustering
#'
#' `get.mcl.clustering` uses the MCL clustering algorithm to define copy number events.
#'
#'
#' @return Returns the clustering results and the length of each paticular segment.
#' @importFrom magrittr %>%
#'
#' @export
get.mcl.clstering <- function(df, max.iter = 500){
M_dist <- 0.9 - mahalanobis.dist(df[,-c(1:3)])
M_dist[M_dist < 0] <- 0
res.mcl <- mcl(M_dist, addLoops = T, max.iter = max.iter)
cluster <- cbind(df,as.character(res.mcl$Cluster))
colnames(cluster)[7] <- "cluster"
cluster[,"length"] <- cluster$end - cluster$start
return(cluster)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.