
Build column definitions for oncogenicity table with category-aware styling
Source:R/render_table.R
build_oncogenicity_col_defs.RdThis function generates a list of column definitions for a reactable table that displays oncogenicity annotations. It applies specific styling to the SYMBOL and SAMPLE_ALTERATION columns based on cancer association rank and ClinVar classification, respectively. The ONCOGENICITY column is styled with background colors corresponding to oncogenicity categories. The function also ensures that only relevant columns are shown, while others are hidden, and that styling lookup columns are not displayed in the table.
Arguments
- data
The data frame containing the oncogenicity annotations and styling lookup columns.
- primary_cols
Character vector of column names that should be considered primary and kept visible in the table.
- symbol_rank_col
Name of the column in
datathat contains the cancer association rank used for styling the SYMBOL column (default: "TISSUE_ASSOC_RANK").