-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprocess_ngs_mutations.R
24 lines (21 loc) · 1.09 KB
/
process_ngs_mutations.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##' .. content for \description{} (no empty lines) ..
##'
##' .. content for \details{} ..
##'
##' @title
##' @param all_study_mutations
##' @return
##' @author whtns
##' @export
process_ngs_mutations <- function(all_study_mutations) {
panel_genes <- c("BCOR", "MYCN", "CREBBP")
dplyr::filter(all_study_mutations, sequencing_format %in% c("WES", "WGS")) %>%
dplyr::mutate(Consequence = dplyr::case_when(modality == "focal_scna" ~ "focal_scna",
is.na(Consequence) ~ "unknown",
TRUE ~ Consequence)) %>%
dplyr::mutate(Consequence = dplyr::case_when(modality == "focal_scna" & gene == "MYCN" ~ "focal_amplification",
modality == "focal_scna" & gene %in% c("BCOR", "CREBBP") ~ "focal_deletion",
TRUE ~ Consequence)) %>%
dplyr::mutate(gene = dplyr::case_when(gene %in% panel_genes ~ paste0(gene, "*"),
TRUE ~ gene))
}