Skip to content

Commit

Permalink
Merge pull request #4 from karissawhiting/development
Browse files Browse the repository at this point in the history
Make sure genes that have been renamed between panels are consistently coded with updated gene name
  • Loading branch information
karissawhiting authored Aug 27, 2019
2 parents 26f9f60 + 20c692c commit 6b6f632
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions R/make-bin-mat.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 #
Expand Down

0 comments on commit 6b6f632

Please sign in to comment.