heatmap_generator: AGED Heatmap Generator

View source: R/heatmap_generator.R

heatmap_generatorR Documentation

AGED Heatmap Generator

Description

heatmap_generator will pull metagene information from AGED results to create a heatmap. By default space for four components will be allocated in the plot. At the top left will be the color key, the top right will have the column dendrogram, the bottom left will have the row dendrogram, and the bottom right will have the image plot.

Usage

heatmap_generator(
  aged_results,
  data,
  samp_info,
  batches = names(samp_info),
  clv = 0,
  transformation_type = 0,
  blind = TRUE,
  pearson = FALSE,
  specific_order = NULL,
  legend = TRUE,
  hmap_color = "skyblue",
  dendrogram = "none",
  trace = "none",
  scale = "row",
  cexRow = 0.5,
  key = FALSE,
  lhei = c(1, 3),
  lwid = c(2, 3),
  legend_size = 0.75,
  legend_space = 1,
  ...
)

Arguments

aged_results

The results of a successful call to AGED

data

The original data that was plugged into the initial call of AGED

samp_info

A matrix-like object containing sampling information regarding the samples used in the original AGED call. A proper samp_info object will have n rows corresponding to the n samples, and columns comprised of information pertaining to the samples such as extraction date, other characteristics, etc.

batches

A string vector that details the tracks of characteristics to outline on the heatmap. Each element of the string vector must correspond to a column name of samp_info.

clv

A numerical value x that reduces the dataset by removing genes with variance < x across all samples. Our recommended value is to set this parameter to 1 if genes expression low variance across samples is desired. These genes will not be considered at all for the deconvolution. This is done before any type of transformation or other reduction is performed.

blind

If a VST is to be done, this boolean value determines whether it is blind or not.

pearson

A boolean value indicating whether or not pearson (row) clustering should be performed.

specific_order

A vector of strings representing how the sample tracks (columns) should be sorted. Each element of this vector should represent a column name in batches. The sample tracks will be nested sorted by the first element first, then the second element, etc.

legend

A boolean value indicating whether or not a legend should be plotted alongside the heatmap. WARNING: Adding a row dendrogram will interfere with the legend if plotted concurrently.

hmap_color

A string value or a vector of string values indicating the color(s) for the heatmap's scale. Low values on the scale are indicated by the first value in the vector, and high values on the scale will be indicated by the last value in the vector. Intermediate value(s) will be the color(s) indicated by this string or vector value.

dendrogram

A character string indicating whether to draw "none", "row", "column" or "both" dendrograms on the heatmap. Defaults to "column". This argument should only be one of these strings. WARNING: Adding a row dendrogram will interfere with the legend if plotted concurrently.

trace

A character string indicating whether a solid trace line should be drawn across the "row"s, down the "column"s, "both", or "none". The distance of the line from the center of each color-cell is proportional to the size of the measurement. Defaults to "none". This argument should only be one of these strings.

scale

A character string indicating if the values should be centered and scaled in the "row" direction, the "column" direction, or "none". The default is "none". This argument should only be one of these strings.

cexRow

A positive number, used as 'cex.axis' for column axis labeling.

key

A boolean value indicating whether or not a color key should be drawn.

lhei

A numerical vector indicating the relative row heights of the rows of the plot.

lwid

A numerical vector indicating the relative column widths of the rows of the plot.

legend_size

A numerical value indicating the size of the legend. The default value is 0.75. Increasing this value will increase the text and block size of the legend.

legend_space

A numerical value indicating how far spaced apart different elements in the legend should be. The default value is 1. Increasing this value will increase the space between different elements in the legend.

...

Optional arguments that can be passed to heatmap.3. For a full list of arguments, check here.

transformation

A numerical value that determines whether or not a log or VST transformation should be done on the original dataset. A value of 0 indicates no transformation, a value of 1 indicates a log transformation using log1p, a value of 2 indicates a VST transformation using varianceStabilizingTransformation If this argument is used, it should be "0", "1" or "2" only. Any other value will assume no transformation. For FaStaNMF, untransformed data should be log-transformed or VST-transformed.

Value

Plots the requested heatmap


rmoffitt/aged documentation built on Aug. 11, 2022, 7:07 p.m.