Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified civicpy/data/test_cache.pkl
Binary file not shown.
1 change: 1 addition & 0 deletions civicpy/exports/civic_gks_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ def _get_variant_concept_mapping(variant: GeneVariant) -> ConceptMapping:
relation=Relation.RELATED_MATCH,
)
for clinvar_id in clinvar_ids
if clinvar_id and clinvar_id != "N/A"
)

for a in molecular_profile.aliases:
Expand Down
13 changes: 13 additions & 0 deletions civicpy/tests/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,19 @@ def test_get_extensions(self, v600e_mp):
)
assert expressions is None

def test_na_clinvar_mapping(self, v600e_mp):
"""Test that get_aliases_and_mappings method works as expected when no clinvar entry found"""
variant = v600e_mp.variants[0]

with patch.object(variant, "clinvar_entries", new=["N/A"]):
gks_mp = CivicGksMolecularProfile(v600e_mp)
_, mappings = gks_mp.get_aliases_and_mappings(v600e_mp)
assert mappings
assert not any(
m.coding.system == "https://www.ncbi.nlm.nih.gov/clinvar/variation/"
for m in mappings
)


class TestCivicGksTherapyGroup(object):
"""Test that CivicGksTherapyGroup works as expected"""
Expand Down
Loading