ssvSignalClustering {seqsetvis} | R Documentation

## clustering as for a heatmap

### Description

clustering as for a heatmap

### Usage

    ssvSignalClustering(bw_data, nclust = 6, row_ = "id", column_ = "x",
      fill_ = "y", facet_ = "sample", cluster_ = "cluster_id",
      max_rows = 500, max_cols = 100, clustering_col_min = -Inf,
      clustering_col_max = Inf, dcast_fill = NA)

### Arguments

`bw_data` | a GRanges or data.table of bigwig signal. As returned from `ssvFetchBam` and `ssvFetchBigwig`
`nclust` | number of clusters
`row_` | variable name mapped to row, likely peak id or gene name for ngs data
`column_` | varaible mapped to column, likely bp position for ngs data
`fill_` | numeric variable to map to fill
`facet_` | variable name to facet horizontally by
`cluster_` | variable name to use for cluster info
`max_rows` | for speed rows are sampled to 500 by default, use Inf to plot full data
`max_cols` | for speed columns are sampled to 100 by default, use Inf to plot full data
`clustering_col_min` | numeric minimum for col range considered when clustering, default in -Inf
`clustering_col_max` | numeric maximum for col range considered when clustering, default in Inf
`dcast_fill` | value to supply to dcast fill argument. default is NA.

### Value

data.table of signal profiles, ready for ssvSignalHeatmap

### Examples

    clust_dt = ssvSignalClustering(CTCF_in_10a_profiles_gr)
    ssvSignalHeatmap(clust_dt)

    clust_dt2 = ssvSignalClustering(CTCF_in_10a_profiles_gr, nclust = 2)
    ssvSignalHeatmap(clust_dt2)

    #clustering can be targetted to a specific part of the region
    clust_dt3 = ssvSignalClustering(CTCF_in_10a_profiles_gr, nclust = 2,
        clustering_col_min = -250, clustering_col_max = -150)
    ssvSignalHeatmap(clust_dt3)
    clust_dt4 = ssvSignalClustering(CTCF_in_10a_profiles_gr, nclust = 2,
        clustering_col_min = 150, clustering_col_max = 250)
    ssvSignalHeatmap(clust_dt4)

[Package seqsetvis version 1.6.0 Index]