Skip to content

Commit

Permalink
Merge pull request #88 from cancervariants/issue-87
Browse files Browse the repository at this point in the history
Fix label in variation descriptor
  • Loading branch information
korikuzma authored Apr 13, 2021
2 parents e44197a + 7962a34 commit 18fb631
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/test_normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def braf_v600e():
},
"type": "Allele"
},
"label": "NP_001361187.1%3Ap.Val640Glu",
"label": "NP_001361187.1:p.Val640Glu",
"molecule_context": "protein",
"structural_type": "SO:0001606",
"ref_allele_seq": "V",
Expand Down Expand Up @@ -138,7 +138,7 @@ def vhl():
},
"type": "Allele"
},
"label": "NP_000542.1%3Ap.Tyr185Ter",
"label": "NP_000542.1:p.Tyr185Ter",
"molecule_context": "protein",
"structural_type": "SO:0001606",
"ref_allele_seq": "Y",
Expand Down Expand Up @@ -209,7 +209,7 @@ def vhl_silent():
params = {
"id": "normalize.variant:NP_000542.1%3Ap.Pro61%3D",
"type": "VariationDescriptor",
"label": "NP_000542.1%3Ap.Pro61%3D",
"label": "NP_000542.1:p.Pro61=",
"value_id": "ga4gh:VA.LBNTm7QqFZp1alJHaFKlKuRY9cOfdHeI",
"value": {
"location": {
Expand Down
2 changes: 1 addition & 1 deletion variant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import logging
from ftplib import FTP

__version__ = "0.1.11"
__version__ = "0.1.12"

APP_ROOT = Path(__file__).resolve().parents[0]

Expand Down
4 changes: 2 additions & 2 deletions variant/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def normalize(self, q, validations, amino_acid_cache):
for r in validations.valid_results:
if r.mane_transcript:
valid_result = r
label = quote(valid_result.mane_transcript.strip())
label = valid_result.mane_transcript.strip()
break
if not valid_result:
warning = f"Unable to find MANE Select Transcript for {q}."
logger.warning(warning)
warnings.append(warning)
valid_result = validations.valid_results[0]
label = quote(' '.join(q.strip().split()))
label = ' '.join(q.strip().split())

valid_result_tokens = valid_result.classification.all_tokens

Expand Down

0 comments on commit 18fb631

Please sign in to comment.