Description Usage Arguments Value Author(s) References See Also Examples
The function uses contour density estimation as computed by the
clusGPS
function to merge significantly overlapping clusters in
an unsupervised manner. In
each step, clusters with highest overlap are merged, their individual
density estimates are updated in a computational feasible manner, and
the process continues until the maximum overlap between any given pair
of clusters drops swiftly, as detected by the cpt.mean
function
in the changepoint
package.
1 | mergeClusters(clus, clus.method = "unweighted", cpt.method = "mean", logscale = TRUE, brake = rep(1, length(clus@clus)), plt = TRUE, mc.cores = 1)
|
clus |
A |
clus.method |
Currently only 'unweighted' method is supported, that is, cluster overlap is computed based on spatial location of contours, but the computed overlaps are not weighted for cluster size. |
cpt.method |
Use 'mean' for using |
logscale |
Defaults to TRUE. Whether to use decimal or log scale values for computing overlap changepoint. |
brake |
(Optional). By default, the function returns the clusters from the optimal merging step as detected by the changepoint functions (brake=1). By using smaller values (0, -1, -2, ...) or bigger ones (2, 3, 4, ...) the algorithm can be forced to return the result from any previous or later merging step respectively. |
plt |
Set to TRUE to visualize maximum cluster overlap for each merging step and changepoint detection (optimal merging step). |
mc.cores |
Numbers of cores to use in parallel computation. |
A clusGPS
object where significantly overlapping clusters
are merged, highly improving visualization, cluster robustness and
further study of the epigenetic configuration of the chroGPS map.
Oscar Reina.
Changepoint package from Killick et al, 2012.
See documentation for package changepoint
, clusGPS
for
epigenetic cluster generation.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Not run
# data(s2)
# # Computing distances
# d <- distGPS(s2.tab,metric='tanimoto',uniqueRows=TRUE)
# # Creating MDS object
# mds1 <- mds(d,type='isoMDS')
# mds1
# plot(mds1)
# Precomputing clustering
# h <- hclust(as.dist(d@d),method='average')
# # Calculating densities (contours and probabilities), takes a while
# clus <- clusGPS(d,mds1,preMerge=TRUE,k=300) # Generating a high number of clusters
# clus <- mergeClusters(clus)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.