Skip to content

Commit

Permalink
Treat Accession Based Variants as Fully Qualified
Browse files Browse the repository at this point in the history
  • Loading branch information
bencap committed Sep 20, 2024
1 parent 59925e9 commit 810bb71
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/mavedb/lib/validation/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,6 @@ def validate_hgvs_genomic_column(
This function also validates all individual variants in the column and checks for agreement against the target
sequence (for non-splice variants).
Implementation NOTE: We assume variants will only be presented as fully qualified (accession:variant)
if this column is being validated against multiple targets.
Parameters
----------
column : pd.Series
Expand Down Expand Up @@ -508,12 +505,9 @@ def validate_hgvs_genomic_column(
for i, s in column.items():
if s is not None:
for variant in s.split(" "):
# Add accession info when we only have one target
if len(targets) == 1:
s = f"{targets[0].accession}:{variant}"
try:
# We set strict to `False` to suppress validation warnings about intronic variants.
vr.validate(hp.parse(s), strict=False)
vr.validate(hp.parse(variant), strict=False)
except hgvs.exceptions.HGVSError as e:
invalid_variants.append(f"Failed to parse row {i} with HGVS exception: {e}")

Expand Down

0 comments on commit 810bb71

Please sign in to comment.