Expand a sample_table (metadata) horizontally with different flavours of lymphgen data.

collate_lymphgen(
  these_samples_metadata,
  lymphgen_version = "default",
  tidy = FALSE
)

Arguments

these_samples_metadata

Optional parameter with metadata filtered for sample_ids of interest. If provided, this function will join lymphgen with this metadata, regardless of tidy TRUE/FALSE.

lymphgen_version

Version of selected lymphgen, default is "default".

tidy

Boolean parameter, set to TRUE for tidy format (i.e long format with no columns dropped). Default is FALSE, which returns the data in a wide format, keeping both the original Subtype. Prediction and tidied LymphGen values and puts the values from each "flavour" in its own column.

Value

A df with lymphgen information.

Details

This function takes a sample table (metadata) and adds different flavours of lymphgen data. It is possible to call this function with an already subset metadata table (with sample IDs of interest) with these_samples_metadata. If this is done, the function will join the lymphgen data with this table. Currently, the only supported lymphgen_version is "default". For more information refer to the function examples.

Examples

this_meta = get_gambl_metadata()
dlbcl_meta = dplyr::filter(this_meta, pathology == "DLBCL")

wide_lymphgen = collate_lymphgen(these_samples_metadata = dlbcl_meta,
                                 lymphgen_version = "default",
                                 tidy = FALSE)
#> Joining with `by = join_by(sample_id)`