plot_exposures: Plot the exposures of a cohort

Description Usage Arguments Value See Also Examples

View source: R/plot_functions.R

Description

plot_exposures: The exposures H, determined by NMF or by LCD, are displayed as a stacked barplot by calling

The x-axis displays the PIDs (patient identifier or sample), the y-axis the counts attributed to the different signatures with their respective colours per PID. Is called by plot_relative_exposures.

plot_relative_exposures: Plot the relative or normalized exposures of a cohort. This function first normalizes its input and then sends the normalized data to plot_exposures.

Usage

1
2
3
4
5
6
7
plot_exposures(in_exposures_df, in_signatures_ind_df, in_subgroups_df = NULL,
  in_sum_ind = NULL, in_subgroups.field = "subgroup", in_title = "",
  in_labels = TRUE, in_show_subgroups = TRUE, legend_height = 10)

plot_relative_exposures(in_exposures_df, in_signatures_ind_df, in_subgroups_df,
  in_sum_ind = NULL, in_subgroups.field = "subgroup", in_title = "",
  in_labels = TRUE, in_show_subgroups = TRUE)

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_signatures_ind_df

A data frame containing meta information about the signatures

in_subgroups_df

A data frame indicating which PID (patient or sample identifyier) belongs to which subgroup

in_sum_ind

Index vector influencing the order in which the PIDs are going to be displayed

in_subgroups.field

String indicating the column name in in_subgroups_df to take the subgroup information from.

in_title

Title for the plot to be created.

in_labels

Flag, if TRUE the PIDs are displayed on the x-axis

in_show_subgroups

Flag, if TRUE then PIDs are grouped by subgroups

legend_height

How many signatures should be displayed in one column together at most.

Value

The generated barplot - a ggplot2 plot

See Also

LCD

geom_bar

geom_text

Examples

1
2
3
4
5
6
7
8
9

huebschm/YAPSA documentation built on May 17, 2019, 9:11 p.m.