Skip to content

Commit

Permalink
feat: implement clingen gene dosage pathogenicity information (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Nov 21, 2023
1 parent e3e7fa1 commit 723b9e6
Show file tree
Hide file tree
Showing 8 changed files with 633 additions and 1,864 deletions.
72 changes: 31 additions & 41 deletions protos/annonars/genes/base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,48 +28,38 @@ message AcmgSecondaryFindingRecord {
string variants_to_report = 11;
}

// Per-disease annotation of ClinGen curation.
message ClingenCurationDiseaseRecord {
// ClinGen disease label.
optional string disease_label = 1;
// MONDO disease ID.
optional string mondo_id = 2;
// URL in clinicalgenome.org knowledge base for disease.
optional string disease_url = 3;
// Annotated mode of inheritance.
repeated string mode_of_inheritance = 4;
// Dosage haploinsufficiency assertion.
optional string dosage_haploinsufficiency_assertion = 5;
// Dosage triplosensitivity assertion.
optional string dosage_triplosensitivity_assertion = 6;
// URL of dosage report in clinicalgenome.org knowledge base.
optional string dosage_report = 7;
// Working group with dosage report (always "Dosage Working Group") or empty.
optional string dosage_group = 8;
// Validity assertion classifications.
repeated string gene_disease_validity_assertion_classifications = 9;
// Validity assertion report URLs.
repeated string gene_disease_validity_assertion_reports = 10;
// Validity assertion Gene Curation Expert Panels.
repeated string gene_disease_validity_gceps = 11;
// Actionability assertion classifications.
repeated string actionability_assertion_classifications = 12;
// Actionability assertion report URLs.
repeated string actionability_assertion_reports = 13;
// Actionability assertion Gene Curation Expert Panels.
repeated string actionability_groups = 14;
/// Enumeration for Haploinsufficiency / Triplosensitivity scores.
enum ClingenDosageScore {
// Sufficient evidence for dosage pathogenicity
CLINGEN_DOSAGE_SCORE_SUFFICIENT_EVIDENCE_AVAILABLE = 0;
// Some evidence for dosage pathogenicity
CLINGEN_DOSAGE_SCORE_SOME_EVIDENCE_AVAILABLE = 1;
// Little evidence for dosage pathogenicity
CLINGEN_DOSAGE_SCORE_LITTLE_EVIDENCE = 2;
// No evidence available
CLINGEN_DOSAGE_SCORE_NO_EVIDENCE_AVAILABLE = 3;
// Gene associated with autosomal recessive phenotype
CLINGEN_DOSAGE_SCORE_RECESSIVE = 4;
// Dosage sensitivity unlikely
CLINGEN_DOSAGE_SCORE_UNLIKELY = 5;
}

// Code for data from the ClinGen curation.
message ClingenCurationRecord {
// HGNC gene symbol.
/// `ClinGen` gene dosage sensitivity record.
message ClingenDosageRecord {
// Gene symbol.
string gene_symbol = 1;
// HGNC gene ID.
string hgnc_id = 2;
// URL in clinicalgenome.org knowledge base for gene.
string gene_url = 3;
// The ClinGen per-gene curation records.
repeated ClingenCurationDiseaseRecord disease_records = 4;
// NCBI gene ID.
string ncbi_gene_id = 2;
// Genomic location.
string genomic_location = 3;
// Haploinsufficiency score.
ClingenDosageScore haploinsufficiency_score = 4;
// Triplosensitivity score.
ClingenDosageScore triplosensitivity_score = 5;
// Haploinsufficiency Disease ID.
optional string haploinsufficiency_disease_id = 6;
// Haploinsufficiency Disease ID.
optional string triplosensitivity_disease_id = 7;
}

// Code for data from the dbNSFP database.
Expand Down Expand Up @@ -798,8 +788,8 @@ message GtexRecord {
message Record {
// Information from the ACMG secondary finding list.
AcmgSecondaryFindingRecord acmg_sf = 1;
// Information from ClinGen curation.
ClingenCurationRecord clingen = 2;
// Information from ClinGen dosage curation.
ClingenDosageRecord clingen = 12;
// Information from dbNSFP.
DbnsfpRecord dbnsfp = 3;
// Information from the gnomAD constraints database.
Expand Down
21 changes: 21 additions & 0 deletions src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,24 @@ macro_rules! set_snapshot_suffix {
}

pub use set_snapshot_suffix;

/// Assembly to be passed on the command line.
#[derive(
Debug,
Clone,
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
clap::ValueEnum,
serde::Deserialize,
serde::Serialize,
)]
#[serde(rename_all = "snake_case")]
pub enum Assembly {
/// GRCh37
Grch37,
/// GRCh38
Grch38,
}
20 changes: 10 additions & 10 deletions src/cons/cli/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ pub mod reading {
pub alignment: String,
}

impl Into<crate::pbs::cons::Record> for Record {
fn into(self) -> crate::pbs::cons::Record {
impl From<Record> for crate::pbs::cons::Record {
fn from(val: Record) -> Self {
crate::pbs::cons::Record {
chrom: self.chromosome,
start: self.start,
stop: self.start,
hgnc_id: self.hgnc_id,
enst_id: self.enst_id,
exon_num: self.exon_num,
exon_count: self.exon_count,
alignment: self.alignment,
chrom: val.chromosome,
start: val.start,
stop: val.start,
hgnc_id: val.hgnc_id,
enst_id: val.enst_id,
exon_num: val.exon_num,
exon_count: val.exon_count,
alignment: val.alignment,
}
}
}
Expand Down
Loading

0 comments on commit 723b9e6

Please sign in to comment.