Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure genes that have been renamed between panels are consistently coded with updated gene name #4

Merged
merged 2 commits into from
Aug 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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