Skip to contents

Run hierarchical clustering permuting features to get statistics under the null

Usage

runPermutedData(
  X,
  gr,
  method = c("adjclust", "hclustgeo"),
  quiet = FALSE,
  alpha = 0.5,
  adjacentCount = 500,
  setNANtoZero = FALSE,
  method.corr = c("pearson", "spearman"),
  meanClusterSize = c(5, 10)
)

Arguments

X

data matrix were *rows* are features in sequential order

gr

GenomicRanges object with entries corresponding to the *rows* of X

method

'adjclust': adjacency constrained clustering. 'hclustgeo': incorporate data correlation and distance in bp

quiet

suppress messages

alpha

use by 'hclustgeo': mixture parameter weighing correlations (alpha=0) versus chromosome distances (alpha=1)

adjacentCount

used by 'adjclust': number of adjacent entries to compute correlation against

setNANtoZero

replace NAN correlation values with a zero

method.corr

Specify type of correlation: "pearson", "kendall", "spearman"

meanClusterSize

select target mean cluster size. Can be an array of values

Value

list of clusterScores and cutoff values at 5

Examples

library(GenomicRanges)

# load data
data('decorateData')

# First, analysis of original data
# Evaluate hierarchical clustering
treeList = runOrderedClusteringGenome( simData, simLocation ) 
#> 
Evaluating:chr20          
#> 

# Choose cutoffs and return clusters
treeListClusters = createClusters( treeList, method='meanClusterSize', meanClusterSize=c(5, 10) )
#> Method:meanClusterSize

# Evaluate score for each cluster
clstScore = scoreClusters(treeList, treeListClusters )
#> Evaluating strength of each cluster...
#> 
#> Dividing work into 2 chunks...

# Then, analysis of permuted data
# Evaluate hierarchical clustering
res = runPermutedData( simData, simLocation, meanClusterSize=c(5, 10)  ) 
#> 
Evaluating:chr20          
#> 
#> Method:meanClusterSize
#> Evaluating strength of each cluster...
#> 
#> Dividing work into 2 chunks...

# LEF values for permuted data at 5% false positive rate
res$cutoffs$LEF
#> [1] 0.10710201 0.07609162

# Retain clusters that pass this criteria
clustInclude = retainClusters( clstScore, "LEF", res$cutoffs$LEF )
#> Using cutoffs:
#> Cluster set	cutoff
#>  5		0.107
#>  10		0.0761
#>