Description Usage Arguments Value See Also Examples
View source: R/plot_functions.R
The PIDs are clustered according to their signature exposures by calling first creating a distance matrix:
dist
, then
hclust
and then
labels_colors
to colour the labels (the text) of
the leaves in the dendrogram.
Typically one colour per subgroup.
1 2 3 4 5 6 7 8 9 10 11 12 13 | hclust_exposures(
in_exposures_df,
in_subgroups_df,
in_method = "manhattan",
in_subgroup_column = "subgroup",
in_palette = NULL,
in_cutoff = 0,
in_filename = NULL,
in_shift_factor = 0.3,
in_cex = 0.2,
in_title = "",
in_plot_flag = FALSE
)
|
in_exposures_df |
Numerical data frame encoding the exposures |
in_subgroups_df |
A data frame indicating which PID (patient or sample identifyier) belongs to which subgroup |
in_method |
Method of the clustering to be supplied to
|
in_subgroup_column |
Indicates the name of the column in which the
subgroup information is encoded in |
in_palette |
Palette with colours or colour codes for the labels (the text) of the leaves in the dendrogram. Typically one colour per subgroup. If none is specified, a rainbow palette of the length of the number of subgroups will be used as default. |
in_cutoff |
A numeric value less than 1. Signatures from within |
in_filename |
A path to save the dendrogram. If none is specified, the figure will be plotted to the running environment. |
in_shift_factor |
Graphical parameter to adjust figure to be created |
in_cex |
Graphical parameter to adjust figure to be created |
in_title |
Title in the figure to be created under |
in_plot_flag |
Whether or not to display the dendrogram |
A list with entries hclust
and dendrogram
.
hclust
: The object created by hclust
dendrogram
: The above object wrapped in as.dendrogram
1 2 3 4 5 | data(lymphoma_cohort_LCD_results)
hclust_exposures(rel_lymphoma_Nature2013_COSMIC_cutoff_exposures_df,
COSMIC_subgroups_df,
in_method="manhattan",
in_subgroup_column="subgroup")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.