Get feature names in selected cluster given array of chrom and cluster ids
Arguments
- treeListClusters
from createClusters()
- chrom
chromosome name of cluster
- clustID
cluster identifier
- id
clustering parameter identifier
Examples
library(GenomicRanges)
data('decorateData')
# Evaluate hierarchical clustering
treeList = runOrderedClusteringGenome( simData, simLocation )
#>
Evaluating:chr20
#>
# Choose cutoffs and return clusters
treeListClusters = createClusters( treeList, method='meanClusterSize', meanClusterSize = 50 )
#> Method:meanClusterSize
df_cluster = data.frame( chrom = c("chr20", "chr20"),
cluster = c(3,5),
id = c("50", "50"), stringsAsFactors=FALSE )
# Find features for the clusters in df_cluster
getFeaturesInClusterList( treeListClusters, chrom=df_cluster$chrom, clustID=df_cluster$cluster, id=df_cluster$id)
#> [[1]]
#> [1] "peak_100" "peak_101" "peak_102" "peak_103" "peak_104" "peak_105"
#> [7] "peak_106" "peak_107" "peak_108" "peak_109" "peak_110" "peak_111"
#> [13] "peak_112" "peak_113" "peak_114" "peak_115" "peak_116" "peak_117"
#> [19] "peak_118" "peak_119" "peak_120" "peak_121" "peak_122" "peak_123"
#> [25] "peak_124" "peak_125"
#>
#> [[2]]
#> [1] "peak_183" "peak_184" "peak_185" "peak_186" "peak_187" "peak_188"
#> [7] "peak_189" "peak_190" "peak_191" "peak_192" "peak_193" "peak_194"
#> [13] "peak_195" "peak_196" "peak_197" "peak_198" "peak_199" "peak_200"
#> [19] "peak_201" "peak_202" "peak_203" "peak_204" "peak_205" "peak_206"
#> [25] "peak_207" "peak_208" "peak_209" "peak_210" "peak_211" "peak_212"
#> [31] "peak_213" "peak_214" "peak_215" "peak_216" "peak_217" "peak_218"
#> [37] "peak_219" "peak_220" "peak_221" "peak_222" "peak_223" "peak_224"
#> [43] "peak_225" "peak_226" "peak_227" "peak_228" "peak_229" "peak_230"
#> [49] "peak_231" "peak_232" "peak_233" "peak_234" "peak_235" "peak_236"
#> [55] "peak_237" "peak_238" "peak_239" "peak_240"
#>