ssvSignalHeatmap {seqsetvis} | R Documentation

## heatmap style representation of membership table. instead of clustering, each column is sorted starting from the left.

### Description

See `ssvSignalHeatmap.ClusterBars` for an alternative with more control over where the cluster bars appear.

### Usage

    ssvSignalHeatmap(
      bw_data,
      nclust = 6,
      perform_clustering = c("auto", "yes", "no")[1],
      row_ = "id",
      column_ = "x",
      fill_ = "y",
      facet_ = "sample",
      cluster_ = "cluster_id",
      max_rows = 500,
      max_cols = 100,
      fill_limits = NULL,
      clustering_col_min = -Inf,
      clustering_col_max = Inf,
      within_order_strategy = c("hclust", "sort")[2],
      dcast_fill = NA,
      return_data = FALSE,
      show_cluster_bars = TRUE
    )

### Arguments

`bw_data` | a GRanges or data.table of bigwig signal. As returned from `ssvFetchBam` and `ssvFetchBigwig`
`nclust` | number of clusters
`perform_clustering` | should clustering be done? default is auto. auto considers if row_ has been ordered by being a factor and if cluster_ is a numeric.
`row_` | variable name mapped to row, likely id or gene name for ngs data. Default is "id" and works with ssvFetch* output.
`column_` | varaible mapped to column, likely bp position for ngs data. Default is "x" and works with ssvFetch* output.
`fill_` | numeric variable to map to fill. Default is "y" and works with ssvFetch* output.
`facet_` | variable name to facet horizontally by. Default is "sample" and works with ssvFetch* output. Set to "" if data is not facetted.
`cluster_` | variable name to use for cluster info. Default is "cluster_id".
`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
`fill_limits` | limits for fill legend. values will be cropped to this range if set. Default of NULL uses natural range of fill_.
`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
`within_order_strategy` | one of "hclust" or "sort". if hclust, hierarchical clustering will be used. if sort, a simple decreasing sort of rosSums.
`dcast_fill` | value to supply to dcast fill argument. default is NA.
`return_data` | logical. If TRUE, return value is no longer ggplot and is instead the data used to generate that plot. Default is FALSE.
`show_cluster_bars` | if TRUE, show bars indicating cluster membership.

### Value

ggplot heatmap of signal profiles, facetted by sample

### Examples

    #the simplest use
    ssvSignalHeatmap(CTCF_in_10a_profiles_gr)
    ssvSignalHeatmap(CTCF_in_10a_profiles_gr, show_cluster_bars = FALSE)

    #clustering can be done manually beforehand
    clust_dt = ssvSignalClustering(CTCF_in_10a_profiles_gr, nclust = 3)
    ssvSignalHeatmap(clust_dt)

    ssvSignalHeatmap(clust_dt, max_rows = 20, max_cols = 7)

[Package seqsetvis version 1.12.0 Index]