Skip to content

Commit

Permalink
Fixed linting and added gnomad to be added as annotations; even thoug…
Browse files Browse the repository at this point in the history
…h not visualizing yet. Some additional linkout datasets included also.
  • Loading branch information
SeriousHorncat committed Dec 11, 2024
1 parent 55cbc0b commit a389b54
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 3 additions & 2 deletions backend/tests/unit/core/test_annotation_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_extraction_forge_hgvs_variant_without_transcript_version(hgvs_without_t
"""Verifies the jq query used to forge create the transcript without a version dataset for a variant"""
forge_annotation = hgvs_without_transcript_version_annotation_task.annotate()
actual_extractions = hgvs_without_transcript_version_annotation_task.extract(forge_annotation)
assert(actual_extractions, "NM_170707:c.745C>T")
assert actual_extractions == "NM_170707:c.745C>T"


def test_annotation_extraction_for_transcript_id_dataset(http_annotation_transcript_id, transcript_annotation_response):
Expand Down Expand Up @@ -258,13 +258,14 @@ def fixture_transcript_id_dataset():

@pytest.fixture(name="hgvs_without_transcript_version_annotation_task")
def fixture_hgvs_without_transcript_version(hgvs_variant_genomic_unit):
"""An Annotation Unit to experiment with jq parsing and rebuilding a string in a result."""
annotation_unit = AnnotationUnit(hgvs_variant_genomic_unit, {
"data_set": "hgvs_variant_without_transcript_version",
"data_source": "Rosalution",
"annotation_source_type": "forge",
"genomic_unit_type": "hgvs_variant",
"base_string": "{hgvs_variant}",
"attribute": ".hgvs_variant_without_transcript_version | split(\":\") as $transcript_split | $transcript_split[0] | split(\".\")[0] | . + \":\" + $transcript_split[1] | {\"hgvs_variant_without_transcript_version\": .}",
"attribute": ".hgvs_variant_without_transcript_version | split(\":\") as $transcript_split | $transcript_split[0] | split(\".\")[0] | . + \":\" + $transcript_split[1] | {\"hgvs_variant_without_transcript_version\": .}", # pylint: disable=line-too-long
"versioning_type": "rosalution"
})
task = ForgeAnnotationTask(annotation_unit)
Expand Down
10 changes: 10 additions & 0 deletions etc/fixtures/initial-seed/annotations-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,16 @@
"dependencies": ["ensembl_vep_vcf_string"],
"versioning_type": "rosalution"
},
{
"data_set": "gnomAD4",
"data_source": "OpenCravat",
"genomic_unit_type": "hgvs_variant",
"annotation_source_type": "http",
"base_string": "https://run.opencravat.org/submit/annotate?{opencravat_search_variant_vcf_string}&annotators=gnomad4",
"attribute": "{ \"gnomad4\": .gnomad4 }",
"dependencies": ["opencravat_search_variant_vcf_string"],
"versioning_type": "date"
},
{
"data_set": "COSMIC_gene_url",
"data_source": "Rosalution",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/models/analyses.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ const annotationRenderingTemporary = [
'imageFilename': 'cosmic_logo.png',
'altText': 'Catalogue Of Somatic Mutations In Cancer, COSMIC',
},
},{
}, {
'dataset': 'gnomAD_gene_url',
'type': 'icon-linkout-dataset',
'props': {
Expand Down Expand Up @@ -451,7 +451,7 @@ const annotationRenderingTemporary = [
'set': [
{'value': 'likely_benign', 'classification': 'Likely Benign', 'colour': 'Blue'},
{'value': 'ambiguous', 'classification': 'Ambiguous', 'colour': 'Yellow'},
{'value': 'likely_pathogenic', 'classification': 'Likely Pathogenic', 'colour': 'Red'}
{'value': 'likely_pathogenic', 'classification': 'Likely Pathogenic', 'colour': 'Red'},
],
},
},
Expand Down

0 comments on commit a389b54

Please sign in to comment.