Skip to content

Commit

Permalink
ClinVar update
Browse files Browse the repository at this point in the history
  • Loading branch information
sigven committed Mar 10, 2024
1 parent 0005c54 commit 8db47b6
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 85 deletions.
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Imports:
ggplot2,
pcgrr,
rlang,
quarto,
openxlsx2,
stringr,
tidyr
Depends:
Expand Down
6 changes: 3 additions & 3 deletions R/classification.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ assign_classification <- function(var_calls) {

#' Function that assigns variant pathogenicity evidence based on ACMG guidelines
#'
#' @param calls sample calls with dbnsfp annotations
#' @param var_calls sample calls with dbnsfp annotations
#' @param settings cpsr settings object
#' @param ref_data pcgr data object
#'
Expand Down Expand Up @@ -1176,7 +1176,7 @@ exclude_vars_noncoding <- function(
var_calls = NULL,
conf = NULL){

if(config[['other']][['show_noncoding']] == T){
if(conf[['other']][['show_noncoding']] == T){
return(var_calls)
}
if("CODING_STATUS" %in% colnames(var_calls) &
Expand All @@ -1194,7 +1194,7 @@ exclude_vars_noncoding <- function(
)
)
var_calls <-
var_cals |>
var_calls |>
dplyr::filter(
.data$CODING_STATUS == "coding")

Expand Down
7 changes: 4 additions & 3 deletions R/input_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ load_germline_snv_indel <- function(
dplyr::mutate(
ENTREZGENE = as.character(.data$ENTREZGENE)) |>
dplyr::select(
ENTREZGENE, PRIMARY_TARGET
c("ENTREZGENE", "PRIMARY_TARGET")
)

if(NROW(callset[['variant']]) > 0){
callset[['variant']] <- callset[['variant']] |>
cpsr::append_cpg_properties(ref_data = ref_data) |>
cpsr::get_insilico_prediction_statistics() |>
pcgrr::append_tfbs_annotation() |>
pcgrr::append_gwas_citation_phenotype(
ref_data = ref_data) |>
cpsr::assign_pathogenicity_evidence(
Expand Down Expand Up @@ -130,9 +131,9 @@ load_germline_snv_indel <- function(
cpsr_callset[['variant']][['all']] <- callset$variant |>
dplyr::left_join(primary_targets, by = "ENTREZGENE") |>
dplyr::mutate(PRIMARY_TARGET = dplyr::if_else(
is.na(PRIMARY_TARGET),
is.na(.data$PRIMARY_TARGET),
FALSE,
as.logical(PRIMARY_TARGET)
as.logical(.data$PRIMARY_TARGET)
))
## Make variant set for tier reporting (virtual panel genes only)
cpsr_callset[['variant']][['cpg_non_sf']] <- callset$variant |>
Expand Down
3 changes: 1 addition & 2 deletions R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ generate_cpsr_report <- function(yaml_fname = NULL) {
ref_data = ref_data) |>
pcgrr::append_dbnsfp_var_link() |>
pcgrr::append_annotation_links() |>
pcgrr::append_tfbs_annotation() |>
pcgrr::append_dbmts_var_link()

if(c != "all"){
Expand Down Expand Up @@ -323,7 +322,7 @@ write_cpsr_output <- function(report,
quarto::quarto_render(
input = quarto_main_template_sample,
execute_dir = tmp_quarto_dir,
quiet = !cps_report$settings$conf$debug)
quiet = !report$settings$conf$debug)

## Copy output HTML report from temporary rendering directory
## to designated HTML file in output directory
Expand Down
36 changes: 20 additions & 16 deletions data-raw/data-raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ col_format_output[['html_tier']] <-
"PROTEIN_DOMAIN",
"HGVSp",
"HGVSc",
"ENSEMBL_GENE_ID",
"REFSEQ_TRANSCRIPT_ID",
"ENSEMBL_TRANSCRIPT_ID",
"ENSEMBL_GENE_ID",
"CDS_CHANGE",
"MUTATION_HOTSPOT",
"RMSK_HIT",
Expand Down Expand Up @@ -57,9 +57,9 @@ col_format_output[['html_sf']] <-
"PROTEIN_DOMAIN",
"HGVSp",
"HGVSc",
"ENSEMBL_GENE_ID",
"REFSEQ_TRANSCRIPT_ID",
"ENSEMBL_TRANSCRIPT_ID",
"ENSEMBL_GENE_ID",
"CDS_CHANGE",
"PREDICTED_EFFECT",
"LOSS_OF_FUNCTION",
Expand Down Expand Up @@ -90,9 +90,9 @@ col_format_output[['html_gwas']] <-
"GWAS_CITATION",
"HGVSp",
"HGVSc",
"ENSEMBL_GENE_ID",
"REFSEQ_TRANSCRIPT_ID",
"ENSEMBL_TRANSCRIPT_ID",
"ENSEMBL_GENE_ID",
"CDS_CHANGE",
"CODING_STATUS",
"miRNA_TARGET_HIT",
Expand All @@ -112,9 +112,11 @@ col_format_output[['tsv']] <-
c("SAMPLE_ID",
"GENOMIC_CHANGE",
"VAR_ID",
"GENOTYPE",
"GENOME_VERSION",
"GENOTYPE",
"CPSR_CLASSIFICATION_SOURCE",
"VARIANT_CLASS",
"CODING_STATUS",
"SYMBOL",
"GENENAME",
"CCDS",
Expand All @@ -134,7 +136,6 @@ col_format_output[['tsv']] <-
"LAST_EXON",
"EXON",
"EXON_AFFECTED",
"CODING_STATUS",
"EXON_POSITION",
"INTRON_POSITION",
"VEP_ALL_CSQ",
Expand All @@ -145,8 +146,6 @@ col_format_output[['tsv']] <-
"LOSS_OF_FUNCTION",
"NULL_VARIANT",
"DBMTS",
"miRNA_TARGET_HIT",
"miRNA_TARGET_HIT_PREDICTION",
"REGULATORY_ANNOTATION",
"TF_BINDING_SITE_VARIANT",
"TF_BINDING_SITE_VARIANT_INFO",
Expand Down Expand Up @@ -183,16 +182,17 @@ col_format_output[['html_bm']] <-
'BM_DISEASE_ONTOLOGY_ID',
'BM_PRIMARY_SITE',
'BM_CLINICAL_SIGNIFICANCE',
'BM_EVIDENCE_TYPE',
'BM_THERAPEUTIC_CONTEXT',
'BM_REFERENCE',
'BM_MOLECULAR_PROFILE_NAME',
'BM_RATING',
'BM_EVIDENCE_TYPE',
'BM_EVIDENCE_DIRECTION',
'BM_EVIDENCE_DESCRIPTION',
'BM_SOURCE_DB',
'BM_EVIDENCE_ID',
'BM_VARIANT_ORIGIN',
'BM_MATCH',
'BM_RESOLUTION',
'PROTEIN_DOMAIN',
'CDS_CHANGE',
Expand All @@ -201,9 +201,9 @@ col_format_output[['html_bm']] <-
'FINAL_CLASSIFICATION',
'PREDICTED_EFFECT',
'DBSNP_RSID',
'ENSEMBL_GENE_ID',
'ENSEMBL_TRANSCRIPT_ID',
'REFSEQ_TRANSCRIPT_ID',
'ENSEMBL_GENE_ID',
'GENOMIC_CHANGE',
'GENOME_VERSION')

Expand Down Expand Up @@ -304,19 +304,23 @@ col_format_output[['xlsx_biomarker']] <-
"CPSR_PATHOGENICITY_SCORE",
"CPSR_CLASSIFICATION_CODE",
"CLINVAR_CLASSIFICATION",
"BM_CANCER_TYPE",
"BM_DISEASE_ONTOLOGY_ID",
"BM_PRIMARY_SITE",
"BM_CLINICAL_SIGNIFICANCE",
"BM_SOURCE_DB",
"BM_RESOLUTION",
"BM_THERAPEUTIC_CONTEXT",
"BM_CITATION",
"BM_MATCH",
"BM_RATING",
"BM_MOLECULAR_PROFILE_NAME",
"BM_EVIDENCE_TYPE",
"BM_EVIDENCE_LEVEL",
"BM_EVIDENCE_DIRECTION",
"BM_EVIDENCE_ID",
"BM_EVIDENCE_DESCRIPTION",
"BM_THERAPEUTIC_CONTEXT",
"BM_DISEASE_ONTOLOGY_ID",
"BM_PRIMARY_SITE"
"BM_SOURCE_DB",
"BM_EVIDENCE_ID",
"BM_VARIANT_ORIGIN",
"BM_MATCH",
"BM_RESOLUTION"
)


Expand Down
Binary file modified data/col_format_output.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions man/assign_pathogenicity_evidence.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions pkgdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ The variant sets can be interactively explored and filtered further through diff
4) The list of [virtual gene panels](articles/virtual_panels.html) available in CPSR


### Related work

* [CharGer - Characterization of Germline variants](https://github.com/ding-lab/CharGer)
* [PathoMan - Pathogenicity of Mutation Analyzer (Beta)](https://pathoman.mskcc.org/)
* [SherLoc - Variant classification](https://www.invitae.com/en/variant-classification/)

### Contact

sigven@ifi.uio.no
4 changes: 2 additions & 2 deletions vignettes/annotation_resources.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ output: rmarkdown::html_document
* [Cancer Hotspots](http://cancerhotspots.org) - a resource for statistically significant mutations in cancer (v2, 2017)

### Variant databases of clinical utility
* [ClinVar](http://www.ncbi.nlm.nih.gov/clinvar/) - database of clinically related variants (February 2024)
* [ClinVar](http://www.ncbi.nlm.nih.gov/clinvar/) - database of clinically related variants (March 2024)
* [CIViC](https://civicdb.org) - clinical interpretations of variants in cancer (February 29th 2024)

### Protein domains/functional features
Expand All @@ -25,7 +25,7 @@ output: rmarkdown::html_document
### Cancer gene knowledge bases
* [CancerMine](http://bionlp.bcgsc.ca/cancermine/) - Literature-mined database of tumor suppressor genes/proto-oncogenes (v50, March 2023)
* [Genomics England PanelApp](https://panelapp.genomicsengland.co.uk) - cancer phenotype panels as of February 2nd 2024

* [Cancer Gene Census](https://www.sanger.ac.uk/data/cancer-gene-census/) - genes implicated with cancer susceptibility (v99)

### Phenotype ontologies
* [UMLS/MedGen](https://www.ncbi.nlm.nih.gov/medgen/) - February 2024
Expand Down
Loading

0 comments on commit 8db47b6

Please sign in to comment.