hclust_exposures: Cluster the PIDs according to their signature exposures

Description Usage Arguments Value See Also Examples

View source: R/plot_functions.R

Description

The PIDs are clustered according to their signature exposures by calling first creating a distance matrix:

Typically one colour per subgroup.

Usage

 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
)

Arguments

in_exposures_df

Numerical data frame encoding the exposures H, i.e. which signature contributes how much to which PID (patient identifier or sample).

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 dist. Can be either of: euclidean, maximum, manhattan, canberra, binary or minkowski

in_subgroup_column

Indicates the name of the column in which the subgroup information is encoded in in_subgroups_df

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 W with an overall exposure less than in_cutoff will be discarded for the clustering.

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_filename

in_plot_flag

Whether or not to display the dendrogram

Value

A list with entries hclust and dendrogram.

See Also

hclust

dist

labels_colors

Examples

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")

slw287r/yapsa documentation built on June 7, 2020, 12:46 a.m.