Consolidate a column of LymphGen data in the original Subtype.Prediction output format to the GAMBLR tidy format.

tidy_lymphgen(
  df,
  lymphgen_column_in = "Subtype.Prediction",
  lymphgen_column_out = "Subtype.Prediction",
  relevel = FALSE
)

Arguments

df

Input data frame.

lymphgen_column_in

The name of the column with lymphgen data to be processed.

lymphgen_column_out

The name of the column to write the tidied results (optional).

relevel

If TRUE, will return the output column as a factor with plot-friendly levels.

Value

A data frame with a tidied lymphGen column

Details

This function takes an incoming data frame (df) and consolidates a column of LymphGen data. Specify the column with the lymphgen data to be processed with lymphgen_column_in and what column to write the tidied data to with lymphgen_column_out. In addition, the user can also run this function with relevel = TRUE (default is FALSE), to return the output column as a factor with plot friendly levels.

Examples

metadata = get_gambl_metadata()
lymphgen = tidy_lymphgen(df = metadata,
                         lymphgen_column_in = "lymphgen_with_cnv",
                         lymphgen_column_out = "lymphgen_with_cnv_tidy",
                         relevel = TRUE)