Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
apriltuesday committed Sep 5, 2024
1 parent 4fb0d28 commit facb45d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion cmat/clinvar_xml_io/clinvar_reference_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from functools import cached_property

from cmat.clinvar_xml_io.clinical_classification import ClinicalClassification

from cmat.clinvar_xml_io.clinvar_record import ClinVarRecord
from cmat.clinvar_xml_io.xml_parsing import find_mandatory_unique_element, find_elements

Expand Down
4 changes: 2 additions & 2 deletions cmat/clinvar_xml_io/clinvar_set.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from cmat.clinvar_xml_io import ClinVarRecord
from cmat.clinvar_xml_io.clinvar_reference_record import ClinVarReferenceRecord
from cmat.clinvar_xml_io.clinvar_submitted_record import ClinVarSubmittedRecord
from cmat.clinvar_xml_io.xml_parsing import find_mandatory_unique_element, find_elements

Expand All @@ -12,7 +12,7 @@ def __init__(self, cvs_xml, xsd_version):
self.cvs_xml = cvs_xml

rcv_elem = find_mandatory_unique_element(self.cvs_xml, 'ReferenceClinVarAssertion')
self.rcv = ClinVarRecord(rcv_elem, xsd_version)
self.rcv = ClinVarReferenceRecord(rcv_elem, xsd_version)

scv_elems = find_elements(self.cvs_xml, 'ClinVarAssertion', allow_zero=False, allow_multiple=True)
self.scvs = [ClinVarSubmittedRecord(elem, xsd_version, self.rcv) for elem in scv_elems]
Expand Down
2 changes: 1 addition & 1 deletion cmat/clinvar_xml_io/clinvar_submitted_record.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
from functools import cached_property

from cmat.clinvar_xml_io import ClinVarRecord
from cmat.clinvar_xml_io.clinvar_record import ClinVarRecord
from cmat.clinvar_xml_io.xml_parsing import find_mandatory_unique_element

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion cmat/output_generation/clinvar_to_evidence_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def clinvar_to_evidence_strings(string_to_efo_mappings, variant_to_gene_mappings
# We catch exceptions but record when one is thrown, so that the pipeline will crash after processing all
# records and printing the report.
logger.error(f'Problem generating evidence for {clinvar_set.rcv.accession}')
logger.error(f'Error: {e}')
logger.error(f'Error: {repr(e)}')
exception_raised = True
continue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ chédiak-higashi syndrome http://www.orpha.net/ORDO/Orphanet_167 chédiak-higash
cobalamin c disease http://purl.obolibrary.org/obo/MONDO_0010184 methylmalonic aciduria and homocystinuria type cblC
cobalamin c disease http://www.orpha.net/ORDO/Orphanet_26 Methylmalonic acidemia with homocystinuria
cobalamin c disease http://www.orpha.net/ORDO/Orphanet_79282 Methylmalonic acidemia with homocystinuria, type cblC
coffin-siris syndrome 1 http://purl.obolibrary.org/obo/MONDO_0015452 Coffin-Siris syndrome
coffin-siris syndrome 1 http://purl.obolibrary.org/obo/MONDO_0007617 coffin-siris syndrome 1
cog1 congenital disorder of glycosylation http://purl.obolibrary.org/obo/MONDO_0012637 COG1-congenital disorder of glycosylation
cog7 congenital disorder of glycosylation http://purl.obolibrary.org/obo/MONDO_0012118 COG7-congenital disorder of glycosylation
cohen syndrome http://purl.obolibrary.org/obo/MONDO_0008999 cohen syndrome
Expand Down Expand Up @@ -278,7 +278,7 @@ hepatoencephalopathy due to combined oxidative phosphorylation defect type 1 htt
hereditary breast ovarian cancer syndrome http://purl.obolibrary.org/obo/MONDO_0003582 hereditary breast ovarian cancer syndrome
hereditary cancer-predisposing syndrome http://purl.obolibrary.org/obo/MONDO_0015356 hereditary neoplastic syndrome
hereditary diffuse gastric adenocarcinoma http://purl.obolibrary.org/obo/MONDO_0007648 hereditary diffuse gastric adenocarcinoma
hereditary diffuse leukoencephalopathy with spheroids http://www.orpha.net/ORDO/Orphanet_313808 Hereditary diffuse leukoencephalopathy with axonal spheroids and pigmented glia
hereditary diffuse leukoencephalopathy with spheroids http://www.orpha.net/ORDO/Orphanet_313808 Adult-onset leukoencephalopathy with axonal spheroids and pigmented glia
hereditary hemorrhagic telangiectasia http://purl.obolibrary.org/obo/MONDO_0019180 hereditary hemorrhagic telangiectasia
hereditary insensitivity to pain with anhidrosis http://purl.obolibrary.org/obo/MONDO_0009746 hereditary sensory and autonomic neuropathy type 4
hereditary nonpolyposis colorectal neoplasms http://www.ebi.ac.uk/efo/EFO_0009911 hereditary nonpolyposis colorectal carcinoma
Expand Down Expand Up @@ -338,7 +338,7 @@ inflammatory skin and bowel disease, neonatal, 1 http://purl.obolibrary.org/obo/
intellectual developmental disorder, autosomal dominant 64 http://purl.obolibrary.org/obo/MONDO_0030934 intellectual developmental disorder, autosomal dominant 64
intellectual disability http://purl.obolibrary.org/obo/HP_0001249 intellectual disability
intellectual disability, autosomal dominant 1 http://purl.obolibrary.org/obo/MONDO_0016459 2q23.1 microdeletion syndrome
intellectual disability, autosomal dominant 20 http://purl.obolibrary.org/obo/MONDO_0016456 5q14.3 microdeletion syndrome
intellectual disability, autosomal dominant 20 http://purl.obolibrary.org/obo/MONDO_0013266 intellectual disability, autosomal dominant 20
intellectual disability, autosomal dominant 5 http://purl.obolibrary.org/obo/MONDO_0012960 intellectual disability, autosomal dominant 5
intellectual disability, autosomal dominant 6 http://purl.obolibrary.org/obo/MONDO_0100172 intellectual disability, autosomal dominant
intellectual disability, autosomal dominant 9 http://purl.obolibrary.org/obo/MONDO_0013656 intellectual disability, autosomal dominant 9
Expand Down Expand Up @@ -508,7 +508,7 @@ retinitis pigmentosa-deafness syndrome http://purl.obolibrary.org/obo/MONDO_0019
retinoblastoma http://purl.obolibrary.org/obo/MONDO_0008380 retinoblastoma
rett syndrome http://purl.obolibrary.org/obo/MONDO_0010726 rett syndrome
rett syndrome, congenital variant http://purl.obolibrary.org/obo/MONDO_0010726 Rett syndrome
rhabdoid tumor predisposition syndrome 2 http://purl.obolibrary.org/obo/MONDO_0016473 familial rhabdoid tumor
rhabdoid tumor predisposition syndrome 2 http://purl.obolibrary.org/obo/MONDO_0013224 rhabdoid tumor predisposition syndrome 2
rod-cone dystrophy http://www.orpha.net/ORDO/Orphanet_1872 Cone rod dystrophy
rubinstein-taybi syndrome http://purl.obolibrary.org/obo/MONDO_0019188 rubinstein-taybi syndrome
ryr1-related disorders http://www.ebi.ac.uk/efo/EFO_0009143 ryr1-related disorders
Expand Down
8 changes: 4 additions & 4 deletions tests/pipelines/resources/expected/google_sheets_table.tsv
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
gc1/gc2 polymorphism 1 NT expansion http://purl.obolibrary.org/obo/MONDO_0010739|Taqi polymorphism|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_118803|solute carrier family 25 member 22|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.4.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/MONDO_0009826|PA polymorphism of alpha-2-globulin|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_122340|guanylate cyclase 2D, retinal|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.4.owl|NOT_CONTAINED
gc1/gc2 polymorphism 1 NT expansion http://purl.obolibrary.org/obo/MONDO_0010739|Taqi polymorphism|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/MONDO_0009826|PA polymorphism of alpha-2-globulin|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_118803|solute carrier family 25 member 22|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.5.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_122340|guanylate cyclase 2D, retinal|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.5.owl|NOT_CONTAINED
inherited immunodeficiency diseases 2 http://identifiers.org/medgen/C5197805|Inherited Immunodeficiency Diseases|HIGH|clinvar-xrefs|NOT_CONTAINED http://identifiers.org/medgen/C5197805|Inherited Immunodeficiency Diseases|HIGH|clinvar-xrefs|NOT_CONTAINED http://identifiers.org/mesh/D000081207|Inherited Immunodeficiency Diseases|HIGH|clinvar-xrefs|NOT_CONTAINED
congenital muscular dystrophy, alpha-dystroglycan related 1 http://identifiers.org/medgen/CN239202|Congenital Muscular Dystrophy, alpha-dystroglycan related|HIGH|clinvar-xrefs|NOT_CONTAINED http://identifiers.org/medgen/CN239202|Congenital Muscular Dystrophy, alpha-dystroglycan related|HIGH|clinvar-xrefs|NOT_CONTAINED
corneal dystrophy, recessive 1 http://identifiers.org/medgen/CN239343|Corneal Dystrophy, Recessive|HIGH|clinvar-xrefs|NOT_CONTAINED http://identifiers.org/medgen/CN239343|Corneal Dystrophy, Recessive|HIGH|clinvar-xrefs|NOT_CONTAINED
elfn1-related condition 1 http://purl.obolibrary.org/obo/MONDO_0045054|cancer-related condition|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|EFO_CURRENT http://purl.obolibrary.org/obo/MONDO_0021074|precancerous condition|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|EFO_CURRENT http://purl.obolibrary.org/obo/HP_0025256|Ameliorated by heat|MEDIUM|http://purl.obolibrary.org/obo/hp/hp-international.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/HP_0032522|Ameliorated by immunosuppresion|MEDIUM|http://purl.obolibrary.org/obo/hp/hp-international.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_568065|EPHB4-related lymphatic-related hydrops fetalis|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.4.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_471012|RAS related|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.4.owl|NOT_CONTAINED
elfn1-related condition 1 http://purl.obolibrary.org/obo/MONDO_0045054|cancer-related condition|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|EFO_CURRENT http://purl.obolibrary.org/obo/MONDO_1040010|IRF6-related condition|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/HP_0025256|Ameliorated by heat|MEDIUM|http://purl.obolibrary.org/obo/hp/hp-international.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/HP_0032522|Ameliorated by immunosuppresion|MEDIUM|http://purl.obolibrary.org/obo/hp/hp-international.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_568065|EPHB4-related lymphatic-related hydrops fetalis|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.5.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_471012|RAS related|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.5.owl|NOT_CONTAINED
blepharophimosis, ptosis, and epicanthus inversus, type i 1 http://identifiers.org/medgen/C2931135|BLEPHAROPHIMOSIS, PTOSIS, AND EPICANTHUS INVERSUS, TYPE I|HIGH|clinvar-xrefs|NOT_CONTAINED http://identifiers.org/medgen/C2931135|BLEPHAROPHIMOSIS, PTOSIS, AND EPICANTHUS INVERSUS, TYPE I|HIGH|clinvar-xrefs|NOT_CONTAINED
autosomal dominant kcnq1-related disease 1 http://purl.obolibrary.org/obo/MONDO_0018832|HTRA1-related autosomal dominant cerebral small vessel disease|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|EFO_CURRENT http://purl.obolibrary.org/obo/MONDO_0000426|autosomal dominant disease|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|EFO_CURRENT http://purl.obolibrary.org/obo/HP_0000006|Autosomal dominant inheritance|MEDIUM|http://purl.obolibrary.org/obo/hp/hp-international.owl|EFO_CURRENT http://www.orpha.net/ORDO/Orphanet_482077|HTRA1-related autosomal dominant cerebral small vessel disease|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.4.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_497757|MME-related autosomal dominant Charcot Marie Tooth disease type 2|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.4.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/HP_0003743|Genetic anticipation|MEDIUM|http://purl.obolibrary.org/obo/hp/hp-international.owl|NOT_CONTAINED
autosomal dominant kcnq1-related disease 1 http://purl.obolibrary.org/obo/MONDO_0018832|HTRA1-related autosomal dominant cerebral small vessel disease|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|EFO_CURRENT http://purl.obolibrary.org/obo/MONDO_0000426|autosomal dominant disease|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|EFO_CURRENT http://purl.obolibrary.org/obo/HP_0000006|Autosomal dominant inheritance|MEDIUM|http://purl.obolibrary.org/obo/hp/hp-international.owl|EFO_CURRENT http://www.orpha.net/ORDO/Orphanet_482077|HTRA1-related autosomal dominant cerebral small vessel disease|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.5.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_497757|MME-related autosomal dominant Charcot Marie Tooth disease type 2|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.5.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/HP_0003743|Genetic anticipation|MEDIUM|http://purl.obolibrary.org/obo/hp/hp-international.owl|NOT_CONTAINED
isolated nonsyndromic congenital heart disease 1 http://identifiers.org/medgen/CN239319|Isolated Nonsyndromic Congenital Heart Disease|HIGH|clinvar-xrefs|NOT_CONTAINED http://identifiers.org/medgen/CN239319|Isolated Nonsyndromic Congenital Heart Disease|HIGH|clinvar-xrefs|NOT_CONTAINED
simvastatin response - toxicity 1 http://www.ebi.ac.uk/efo/EFO_0011048|dermatological toxicity|MEDIUM|http://www.ebi.ac.uk/efo/efo.owl|EFO_CURRENT http://www.orpha.net/ORDO/Orphanet_529831|Letrozole toxicity|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.4.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/MONDO_0010784|chloramphenicol toxicity|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_565782|Methotrexate toxicity|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.4.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/MONDO_0023176|formaldehyde poisoning|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED
simvastatin response - toxicity 1 http://www.ebi.ac.uk/efo/EFO_0011048|dermatological toxicity|MEDIUM|http://www.ebi.ac.uk/efo/efo.owl|EFO_CURRENT http://www.orpha.net/ORDO/Orphanet_529831|Letrozole toxicity|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.5.owl|NOT_CONTAINED http://www.orpha.net/ORDO/Orphanet_565782|Methotrexate toxicity|MEDIUM|https://www.orphadata.com/data/ontologies/ordo/last_version/ORDO_en_4.5.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/MONDO_0027653|abacavir toxicity|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED http://purl.obolibrary.org/obo/MONDO_0023176|formaldehyde poisoning|MEDIUM|http://purl.obolibrary.org/obo/mondo.owl|NOT_CONTAINED
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#generated-date=2024-05-24
#generated-date=2024-09-05
#ontology=EFO
#clinvar_trait_name uri label
2-aminoadipic 2-oxoadipic aciduria http://purl.obolibrary.org/obo/MONDO_0008774 2-aminoadipic 2-oxoadipic aciduria
Expand Down Expand Up @@ -132,7 +132,7 @@ chédiak-higashi syndrome http://www.orpha.net/ORDO/Orphanet_167 chédiak-higash
cobalamin c disease http://purl.obolibrary.org/obo/MONDO_0010184 methylmalonic aciduria and homocystinuria type cblC
cobalamin c disease http://www.orpha.net/ORDO/Orphanet_26 Methylmalonic acidemia with homocystinuria
cobalamin c disease http://www.orpha.net/ORDO/Orphanet_79282 Methylmalonic acidemia with homocystinuria, type cblC
coffin-siris syndrome 1 http://purl.obolibrary.org/obo/MONDO_0015452 Coffin-Siris syndrome
coffin-siris syndrome 1 http://purl.obolibrary.org/obo/MONDO_0007617 coffin-siris syndrome 1
cog1 congenital disorder of glycosylation http://purl.obolibrary.org/obo/MONDO_0012637 COG1-congenital disorder of glycosylation
cog7 congenital disorder of glycosylation http://purl.obolibrary.org/obo/MONDO_0012118 COG7-congenital disorder of glycosylation
cohen syndrome http://purl.obolibrary.org/obo/MONDO_0008999 cohen syndrome
Expand Down Expand Up @@ -283,7 +283,7 @@ hepatoencephalopathy due to combined oxidative phosphorylation defect type 1 htt
hereditary breast ovarian cancer syndrome http://purl.obolibrary.org/obo/MONDO_0003582 hereditary breast ovarian cancer syndrome
hereditary cancer-predisposing syndrome http://purl.obolibrary.org/obo/MONDO_0015356 hereditary neoplastic syndrome
hereditary diffuse gastric adenocarcinoma http://purl.obolibrary.org/obo/MONDO_0007648 hereditary diffuse gastric adenocarcinoma
hereditary diffuse leukoencephalopathy with spheroids http://www.orpha.net/ORDO/Orphanet_313808 Hereditary diffuse leukoencephalopathy with axonal spheroids and pigmented glia
hereditary diffuse leukoencephalopathy with spheroids http://www.orpha.net/ORDO/Orphanet_313808 Adult-onset leukoencephalopathy with axonal spheroids and pigmented glia
hereditary hemorrhagic telangiectasia http://purl.obolibrary.org/obo/MONDO_0019180 hereditary hemorrhagic telangiectasia
hereditary insensitivity to pain with anhidrosis http://purl.obolibrary.org/obo/MONDO_0009746 hereditary sensory and autonomic neuropathy type 4
hereditary nonpolyposis colorectal neoplasms http://www.ebi.ac.uk/efo/EFO_0009911 hereditary nonpolyposis colorectal carcinoma
Expand Down Expand Up @@ -344,7 +344,7 @@ inflammatory skin and bowel disease, neonatal, 1 http://purl.obolibrary.org/obo/
intellectual developmental disorder, autosomal dominant 64 http://purl.obolibrary.org/obo/MONDO_0030934 intellectual developmental disorder, autosomal dominant 64
intellectual disability http://purl.obolibrary.org/obo/HP_0001249 intellectual disability
intellectual disability, autosomal dominant 1 http://purl.obolibrary.org/obo/MONDO_0016459 2q23.1 microdeletion syndrome
intellectual disability, autosomal dominant 20 http://purl.obolibrary.org/obo/MONDO_0016456 5q14.3 microdeletion syndrome
intellectual disability, autosomal dominant 20 http://purl.obolibrary.org/obo/MONDO_0013266 intellectual disability, autosomal dominant 20
intellectual disability, autosomal dominant 5 http://purl.obolibrary.org/obo/MONDO_0012960 intellectual disability, autosomal dominant 5
intellectual disability, autosomal dominant 6 http://purl.obolibrary.org/obo/MONDO_0100172 intellectual disability, autosomal dominant
intellectual disability, autosomal dominant 9 http://purl.obolibrary.org/obo/MONDO_0013656 intellectual disability, autosomal dominant 9
Expand Down Expand Up @@ -517,7 +517,7 @@ retinitis pigmentosa-deafness syndrome http://purl.obolibrary.org/obo/MONDO_0019
retinoblastoma http://purl.obolibrary.org/obo/MONDO_0008380 retinoblastoma
rett syndrome http://purl.obolibrary.org/obo/MONDO_0010726 rett syndrome
rett syndrome, congenital variant http://purl.obolibrary.org/obo/MONDO_0010726 Rett syndrome
rhabdoid tumor predisposition syndrome 2 http://purl.obolibrary.org/obo/MONDO_0016473 familial rhabdoid tumor
rhabdoid tumor predisposition syndrome 2 http://purl.obolibrary.org/obo/MONDO_0013224 rhabdoid tumor predisposition syndrome 2
rod-cone dystrophy http://www.orpha.net/ORDO/Orphanet_1872 Cone rod dystrophy
rubinstein-taybi syndrome http://purl.obolibrary.org/obo/MONDO_0019188 rubinstein-taybi syndrome
ryr1-related disorders http://www.ebi.ac.uk/efo/EFO_0009143 ryr1-related disorders
Expand Down

0 comments on commit facb45d

Please sign in to comment.