make_subgroups_df: Make a custom data structure for subgroups

Description Usage Arguments Value See Also Examples

View source: R/basic_functions.R

Description

Creates a data frame carrying the subgroup information and the order in which the PIDs have to be displayed. Calls aggregate on in_vcf_like_df.

Usage

1
2
3
4
5
6
7
8
make_subgroups_df(
  in_vcf_like_df,
  in_exposures_df = NULL,
  in_palette = NULL,
  in_subgroup.field = "SUBGROUP",
  in_PID.field = "PID",
  in_verbose = FALSE
)

Arguments

in_vcf_like_df

vcf-like data frame with point mutation calls

in_exposures_df

Data frame with the signature exposures

in_palette

Palette for colour attribution to the subgroups if nun-NULL

in_subgroup.field

String indicating which column of in_vcf_like_df carries the subgroup information

in_PID.field

String indicating which column of in_vcf_like_df and of in_exposures_df carries the PID information

in_verbose

Whether verbose or not.

Value

subgroups_df: A data frame carrying the subgroup and rank information.

See Also

aggregate

Examples

1
2
3
4
5
6
7
 data(lymphoma_test)
 data(lymphoma_cohort_LCD_results)
 choice_ind <- (names(lymphoma_Nature2013_COSMIC_cutoff_exposures_df)
                %in% unique(lymphoma_test_df$PID))
 lymphoma_test_exposures_df <-
   lymphoma_Nature2013_COSMIC_cutoff_exposures_df[,choice_ind]
 make_subgroups_df(lymphoma_test_df,lymphoma_test_exposures_df)

YAPSA documentation built on Nov. 8, 2020, 4:59 p.m.