@@ -794,7 +794,7 @@ expand_hgvs_terms <- function(var, aa_dict, add_codon_markers = FALSE) {
794794}
795795
796796load_civic_biomarkers <- function (
797- datestamp = ' 20240709 ' ,
797+ datestamp = ' 20251018 ' ,
798798 compound_synonyms = NULL ,
799799 hg38_fasta =
800800 " /Users/sigven/research/DB/hg38/hg38.fa" ,
@@ -1889,6 +1889,7 @@ load_cgi_biomarkers <- function(compound_synonyms = NULL,
18891889 " ABL1-BCR" ," BCR-ABL1" ),
18901890 as.character(gene ))
18911891 ) | >
1892+
18921893 dplyr :: mutate(gene = dplyr :: case_when(
18931894 gene == " MLL2" ~ " KMT2D" ,
18941895 TRUE ~ as.character(gene )
@@ -2004,9 +2005,31 @@ load_cgi_biomarkers <- function(compound_synonyms = NULL,
20042005 " stop_gained|splice_donor|splice_acceptor" ),
20052006 " MUT_LOF" ,
20062007 as.character(alteration_type )
2007- ))
2008+ )) | >
2009+ dplyr :: mutate(
2010+ gene = dplyr :: case_when(
2011+ alteration_type == " FUSION" &
2012+ stringr :: str_detect(alteration , " v?::v?" ) ~ alteration ,
2013+ alteration_type == " FUSION" &
2014+ ! stringr :: str_detect(alteration ," ::" ) ~
2015+ stringr :: str_replace(alteration ," __" ," ::" ),
2016+ TRUE ~ as.character(gene )
2017+ )
2018+ ) | >
2019+ dplyr :: mutate(
2020+ molecular_profile_name =
2021+ stringr :: str_replace(
2022+ .data $ molecular_profile_name , " ABL1-BCR" ," BCR-ABL1" )
2023+ ) | >
2024+ dplyr :: mutate(
2025+ gene =
2026+ stringr :: str_replace(
2027+ .data $ gene , " ABL1::BCR" ," BCR::ABL1"
2028+ )
2029+ )
20082030 )
2009-
2031+
2032+
20102033 unique_variants <- as.data.frame(
20112034 cgi_biomarkers | >
20122035 dplyr :: filter(! is.na(variant_alias ) &
@@ -2136,7 +2159,7 @@ load_cgi_biomarkers <- function(compound_synonyms = NULL,
21362159 dplyr :: ungroup() | >
21372160 dplyr :: mutate(molecule_chembl_id = stringr :: str_replace(
21382161 molecule_chembl_id ," ^NA\\ ||\\ |NA$" ," "
2139- ))
2162+ ))
21402163 )
21412164
21422165 cgi_clinical <- cgi_clinical | >
0 commit comments