View source: R/local_correlations.R
whichCluster | R Documentation |
Find which cluster a peak is in
whichCluster(treeListClusters, feature_id, id = NULL)
treeListClusters |
from createClusters() |
feature_id |
name of query feature, can also be array |
id |
clustering parameter identifier. After filtering by feature_id, filter by id |
data.frame of chromosome and cluster
library(GenomicRanges)
data('decorateData')
# Evaluate hierarchical clustering
treeList = runOrderedClusteringGenome( simData, simLocation )
# Choose cutoffs and return clusters
treeListClusters = createClusters( treeList, method='meanClusterSize', meanClusterSize = c(50, 100) )
# Find chromsome and cluster of peak_20
whichCluster( treeListClusters, 'peak_20')
# Find chromsome and cluster of peak_20 with clustering parameter 50
# corresponding to meanClusterSize
whichCluster( treeListClusters, 'peak_20', "50")
# Search for multiple clusters
whichCluster( treeListClusters, c('peak_20', 'peak_21'), "50")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.