determineBreaks: Determine Breaks

View source: R/determineBreaks.R

determineBreaksR Documentation

Determine Breaks

Description

Determine custom breaks for heatmap by excluding high values.

Usage

determineBreaks(
  data_mat,
  colors_v = rev(colorRampPalette(brewer.pal(11, "RdBu"))(100)),
  cut_v = "max",
  print_v = F,
  verbose_v = F,
  main = NA,
  show_rownames = F
)

Arguments

data_mat

matrix of counts. Most likely will be row-scaled, but doesn't have to be. if data.table provided, 1st column is assumed to be an identifier column and will be assigned to row.names.

colors_v

Vector of colors that will be used. Default is red (high) to blue (low)

cut_v

Three options to determine which values to exclude when making breaks: (1) a numeric value indicating which percentile to use for removal (3 would use the 3rd and 97th percentile) (2) "max" (default) remove minimum and maximum values (3) "none" don't remove any (to see what default behavior is) which will cut off the maximum value on either end.

print_v

logical indicating whether or not to print a test heatmap

verbose_v

logical indicating whether or not to print out messages

main

title passed to pheatmap

Value

list of 3. "breaks" = numerical breaks to provide to pheatmap; "colors" = hex colors to provide to pheatmap; "table" = number of rows in data_mat that are in each break.


weshorton/wrh.rUtils documentation built on Oct. 28, 2024, 7:24 a.m.