Skip to contents

A whole genome heatmap of copy-number changes. It expects absolute copy-numbers. Default behaviour is to perform hierarchical clustering of the samples and plot the heatmap in that order. Setting the order parameter overrules this behaviour.

Usage

ACNDiversityPlot(
  long_segments = data.frame(),
  order = TRUE,
  ret_order = FALSE,
  save_path = FALSE,
  rmblacklist = NULL,
  addtitle = NULL,
  ann_df = NULL,
  obj_name = "version1"
)

Arguments

long_segments

A dataframe. This should be in long format with the same number of rows (bins) for each sample.
If using the output from the CalculateACNs function then first run SegmentsToCopyNumber to convert to long.
Expects the following columns:
c("chromosome", "start", "end", "state", "sample_id")

order

(optional) Character vector. Defines the order in which samples will be plotted.
This is particularly useful when plotting more than 1 heatmap next to one another.
Allows samples to line-up horizontally. Example:
c("CC-CHM-1341", "CC-CHM-1347", "CC-CHM-1355", CC-CHM-1361", "CC-HAM-0369", "CC-HAM-0374", "CC-HAM-0379", "CC-HAM-0383", "CC-HAM-0385")

ret_order

(optional) Logical. If set to TRUE the function returns the order in which samples were plotted.

save_path

(optional) String. Expects a path to a directory where the plot should be saved. (png)

obj_name

(optional) String. Adds a tag to the end of the filename if saving the image.
Only used if the save_path parameter is also set.

Value

A ggplot2 object or a list of a ggplot2 object and vector of the ordered sample names.