Open Kdreval opened 2 weeks ago
rep example:
library(GAMBLR)
library(tidyverse)
meta <- GAMBLR.data::get_gambl_metadata() %>%
filter(cohort == "BL_Thomas")
meta <- meta %>%
mutate(
numeric_column = sample(1:100, nrow(meta), replace = TRUE),
`Treatmen Group` = sample(c("Treated", "Untreated"), nrow(meta), replace = TRUE)
)
maf <- GAMBLR.data::get_coding_ssm(
these_samples_metadata = meta,
projection = "grch37"
)
maf <- GAMBLR.data::annotate_hotspots(maf)
genes <- c("MYC", "TP53", "DDX3X", "FOXO1", "EZH2", "CREBBP", "BCL2")
col_fun <- circlize::colorRamp2(c(0, 50, 100), c("blue", "white", "red"))
prettyOncoplot(
maf,
these_samples_metadata = with(
meta,
meta[order(Tumor_Sample_Barcode), ]
),
metadataColumns = "Treatmen Group",
numericMetadataColumns = c(
"numeric_column"
),
keepSampleOrder = TRUE,
sortByColumns = "numeric_column",
highlightHotspots = TRUE,
genes = genes,
keepGeneOrder = TRUE,
removeNonMutated = FALSE,
custom_colours = list(
"Treatment Group" = c("Treated" = "#56af92", "Untreated" = "#35a3da"),
"numeric_column" = col_fun
),
hideTopBarplot = FALSE,
tally_all_mutations = TRUE,
legendFontSize = 10,
fontSizeGene = 10,
metadataBarFontsize = 12,
metadataBarHeight = 3
)
Any idea why prettyOncoplot can't handle custom colours for continuous annotations? I have a continuous column
range(patient_metadata$`T1 % Exclusive`) [1] 0 100
My col_fun iscol_fun <- colorRamp2(c(0, 50, 100), c("blue", "white", "red"))
My function is this: