plotCompareCorr | R Documentation |
Combined plot of correlation matricies from cases and controls
plotCompareCorr(
epiSignal,
peakIDs,
testVariable,
cols,
size = 5,
absCorr = FALSE
)
epiSignal |
matrix or EList of epigentic signal. Rows are features and columns are samples |
peakIDs |
feature names to extract from rows of epiSignal |
testVariable |
factor indicating two subsets of the samples to compare |
cols |
array of color values |
size |
size of text |
absCorr |
show absolute correlations |
ggplot2 of combined correlation matrix
library(GenomicRanges)
data('decorateData')
# Evaluate hierarchical clsutering
treeList = runOrderedClusteringGenome( simData, simLocation )
# Choose cutoffs and return clusters
treeListClusters = createClusters( treeList, method = "meanClusterSize", meanClusterSize=c( 10, 20) )
# Simulate variable to split dataset by
set.seed(1)
metadata = data.frame( Disease = factor(sample(0:1, ncol(simData), replace=TRUE)))
# get peak ID's from chr1, cluster 1
peakIDs = getFeaturesInCluster( treeListClusters, "chr1", 1, "10")
# plot comparison of correlation matrices for peaks in peakIDs
# where data is subset by metadata$Disease
plotCompareCorr( simData, peakIDs, metadata$Disease) + ggtitle("chr1: cluster 1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.