diff --git a/R/make-bin-mat.R b/R/make-bin-mat.R index fa35a328..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( @@ -48,6 +49,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 #