profileClusters {chroGPS} | R Documentation

## Compute enrichment/depletion ratio for the observed epigenetic profiles in epigenetic clusters.

### Description

The function computes the ratio between the proportion of epigenetic mark presence in the clusters given as input and that observed for all elements. Results are returned as a numerical matrix, easily visualized in the shape of a classical heatmap.

### Usage

    profileClusters(x, uniqueCount = TRUE, weights, clus, i, minpoints, merged = FALSE, log2 = TRUE, plt = FALSE)

### Arguments

`x` | Genes * Factors matrix or data frame used for generating epigene clusters, indicating 1 for binding of factor j in gene i, 0 otherwise.
`uniqueCount` | Logical value to indicate if clusters come from epigenes (identical rows in x are merged into a single one) or genes (every row in x is mantained). See help for `uniqueCount` for details.
`weights` | Named vector analog to that on `distGPS`. Names are used as unique column names (i.e. epigenetic factors) so that enrichment profiles for replicates of the same epigenetic factor can be merged into a single element by computing its average enrichment (arithmetic mean).
`clus` | `clusGPS` object with epigenetic clusters generated from pairwise distances from x, as generated by the `clusGPS` function. See help for `distGPS` and `clusGPS` for details.
`i` | Clustering entry from which cluster profiling is to be computed.
`minpoints` | (Optional). Ignore clusters with fewer than minpoints, deprecated.
`merged` | (Optional). If clusters provided have been previously merged or not, deprecated.
`log2` | Logical to indicate if enrichment/depletion proportions are returned in log2 scale. Defaults to TRUE.
`plt` | Deprecated.

### Value

A numerical matrix with the enrichment/depletion profile of the epigenetic marks for each cluster provided in the `clusGPS` object. Easy to visualize for instance with a heatmap plot.

### Author(s)

Oscar Reina.

### See Also

`distGPS` for computing pairwise distances between epigenetic elements. `clusGPS` for computing epigenetic clusters.

### Examples

    # 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=max(cutree(h,h=0.5)))
    # Computing cluster profiles
    # p1 <- profileClusters(s2.tab, uniqueCount = TRUE, clus, i=125, minpoints=30, log2 = TRUE, plt = FALSE)
    # Requires gplots
    # heatmap.2(p1,col=redblue(100))

[Package chroGPS version 1.27.3 Index]