The exposures for different signatures can be
visualized using a heatmap with this function.
Heatmaps make it easier to visualize the data by
representing the magnitude of exposure values
as color in 2-dimensions. The variation in color
intensity can help see if the exposures are clustered
or how they vary over space. Exposures can be
normalized by providing the proportional
argument.
Column annotations can also be seen by passing the col_annot
argument.
Usage
plot_heatmap(
musica,
model_name,
modality = "SBS96",
result_name = "result",
proportional = FALSE,
show_column_names = FALSE,
show_row_names = TRUE,
scale = TRUE,
subset_tumor = NULL,
subset_signatures = NULL,
annotation = NULL,
...
)
Arguments
- musica
A
musica
object containing a mutational discovery or prediction.- model_name
The name of the desired model.
- modality
The modality of the model. Must be "SBS96", "DBS78", or "IND83". Default
"SBS96"
.- result_name
Name of the result list entry containing desired model. Default
"result"
.- proportional
If
TRUE
, then the exposures will be normalized to between 0 and 1 by dividing by the total number of counts for each sample. DefaultFALSE
.- show_column_names
Boolean check. If
True
, column names are shown. Otherwise, they aren't. DefaultFALSE
- show_row_names
Boolean check. If
True
, row names are shown. Otherwise, they aren't. DefaultFALSE
- scale
Boolean check. If
True
, values are scaled by z-score. Otherwise, they aren't. DefaultTRUE
- subset_tumor
Users can specify certain tumor types on which they want to subset the exposure matrix for plotting the heatmap.
- subset_signatures
Users can specify certain signatures on which they want to subset the exposure matrix plotting the heatmap.
- annotation
Users have the option of plotting the exposure matrix based on their given annotation like Tumor_Subtypes or age. Error given if the user given annotation doesn't exist in the res_annot annotation object.
- ...
Ellipsis used for passing any arguments directly to the ComplexHeatmap's heatmap function.
Examples
data(res_annot)
plot_heatmap(
musica = res_annot, model_name = "res_annot",
proportional = TRUE, scale = TRUE, annotation = "Tumor_Subtypes"
)