From 628c2207e7537029b7683962cbf4ed9047260084 Mon Sep 17 00:00:00 2001 From: Karissa Date: Tue, 27 Aug 2019 10:02:36 -0400 Subject: [PATCH 1/2] change all instances of KMT2C to MLL3 in create-bin-mat --- R/make-bin-mat.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/R/make-bin-mat.R b/R/make-bin-mat.R index fa35a328..b902ce3a 100644 --- a/R/make-bin-mat.R +++ b/R/make-bin-mat.R @@ -48,6 +48,16 @@ create.bin.matrix <- function(patients=NULL, maf, mut.type = "SOMATIC",SNP.only warning("KMT2D has been recoded to MLL2") } + if (sum(grepl("KMT2C", maf$Hugo_Symbol)) > 1) { + maf <- maf %>% + mutate(Hugo_Symbol = case_when( + Hugo_Symbol == "KMT2C" ~ "MLL3", + TRUE ~ Hugo_Symbol + )) + + warning("KMT2C has been recoded to MLL3") + } + maf <- as.data.frame(maf) # filter/define patients # From 20c692ca683cabbd397362529f1326d2043c163d Mon Sep 17 00:00:00 2001 From: Karissa Date: Tue, 27 Aug 2019 10:05:03 -0400 Subject: [PATCH 2/2] add note in code about gene name changes in create-bin-mat --- R/make-bin-mat.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/make-bin-mat.R b/R/make-bin-mat.R index b902ce3a..341c48b0 100644 --- a/R/make-bin-mat.R +++ b/R/make-bin-mat.R @@ -38,6 +38,7 @@ create.bin.matrix <- function(patients=NULL, maf, mut.type = "SOMATIC",SNP.only if(length(match("Mutation_Status",colnames(maf))) == 0) stop("The MAF file inputted is missing a mutation status column. (Mutation_Status)") + # recode gene names that have been changed between panel versions to make sure they are consistent and counted as the same gene if (sum(grepl("KMT2D", maf$Hugo_Symbol)) > 1) { maf <- maf %>% mutate(Hugo_Symbol = case_when(