Create Heatmap of Signature Exposures
SignatureExposuresPlot.Rd
Converts signature-per-sample data to a heatmap, optionally saves it as a png, and returns the ggplot. Samples are sorted for display based on their maximum signature exposure. Heatmap is plotted in the viridis colour-scheme.
Usage
SignatureExposuresPlot(
signatures,
order = FALSE,
transpose = FALSE,
save_path = FALSE,
addtitle = NULL,
obj_name = "sig_exposures_obj"
)
Arguments
- signatures
Dataframe. Expects a dataframe of signature exposures (rows) by samples (columns).
- 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")
- transpose
(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.