plotOverlaps: plot cluster-cluster or segment-segment overlaps

View source: R/clusterTools.R

plotOverlapsR Documentation

plot cluster-cluster or segment-segment overlaps

Description

Plots the significance distribution of cluster-cluster or segment-segment overlap statistics provided by clusterCluster, clusterProfile or segmentOverlaps, where a color gradient is calculated from -log(p), and the text shows the overlap numbers, e.g., the number of overlapping features for clusterCluster, or the Jaccard index or relative intersect values for segmentOverlaps. Option text allows to select which values to plot as text. Only "overlap" is available for a clusterCluster results, while for segmentOverlaps the Jaccard index ("jaccard"), or the relative intersect size can be shown: "intersect.target" and "intersect.query" are the intersect divided by total target or query length, respectively. Note that two distinct p-value cutoffs can be visualyized: p-values <=p.min are shown in black, and p-values p.txt are shown in white instead of black text (thus becoming visible on the black of significant overlaps).

Usage

plotOverlaps(
  x,
  p.min = 0.01,
  p.txt = p.min * 5,
  p.max,
  n = 100,
  col,
  values = c("overlap", "count", "statistic", "jaccard", "text"),
  type = 1,
  txt.col = c("black", "white"),
  rmz = TRUE,
  short = TRUE,
  scale = 1,
  round,
  axis = 1:2,
  show.sig = TRUE,
  show.total = FALSE,
  ...
)

Arguments

x

a ‘clusterOverlaps’ object returned by clusterCluster

p.min

significance cutoff, p-values equal or smaller to this cutoff will appear black (one-sided tests) or red/blue (two-sided tests)

p.txt

p-value cutoff for showing overlap numbers as white instead of black text

p.max

p-value cutoff for starting the color scale, e.g. 0.05; useful for generally high p-values.

n

number of color shades between p=1 (white) and p >= p.min (black)

col

color ramp, default are grey values (one-sided) or red (above) and blue (below) for two-sided tests, length of this vector overrules parameter n

values

selection of text (numeric values) to plot, depends on available data in x, see "Description"

type

1 for one-sided or 2 for two-sided tests color scheme, negative values of two-sided tests are reflected in negative p-values

txt.col

two colors used for the plot text, ie., the overlap counts; the second is used if 'p<p.txt' as a discrete signficance cutoff

rmz

remove 0 from text values

short

logical, indicating whether to cut higher overlap numbers; currently: division by 1000 and replacement by k

scale

factor to divide overlap numbers with, useful for low numbers in Jaccard index

round

number of digits to round overlap numbers to (useful for Jaccard index)

axis

integer vector, sets whether x-axis (1,3) and/or y-axis (2,4) are drawn; the column and row names of dat will be used as tick labels

show.sig

only for overlap lists sorted by sortClusters from package segmenTier: draws a red line where unsorted non-significant hits start

show.total

show total numbers (counts) of overlapping features on top and right axes

...

arguments to image_matrix


raim/segmenTools documentation built on March 20, 2024, 6:23 a.m.