forked from biocommons/hgvs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ins/dups where splice region is preserved
- Loading branch information
Showing
5 changed files
with
135 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import os | ||
|
||
import hgvs | ||
import pytest | ||
from support import CACHE | ||
|
||
cases = [ | ||
{ | ||
"name": "ins with splice region preserved", | ||
"var_c": "NM_004119.2:c.1837+21_1837+22insCGAGAGAATATGAATATGATCTCAAATGGGAGTTTCCAAGAGAAAATTTAGAGTTTGGTAAGAATGGAATGTGCCAAA", | ||
"var_p": "NP_004110.2:p.(Lys614_Val615insAsnGlyMetCysGlnThrArgGluTyrGluTyrAspLeuLysTrpGluPheProArgGluAsnLeuGluPheGlyLys)" | ||
}, | ||
{ | ||
"name": "dup with splice region preserved", | ||
"var_c": "NM_004119.2:c.1835_1837+3dup", | ||
"var_p": "NP_004110.2:p.(Gly613_Lys614insIleGly)" | ||
}, | ||
{ | ||
"name": "dup with splice region preserved", | ||
"var_c": "NM_005228.4:c.2284-5_2290dup", | ||
"var_p": "NP_005219.2:p.(Ala763_Tyr764insPheGlnGluAla)" | ||
}, | ||
{ | ||
"name": "dup with splice region preserved", | ||
"var_c": "NM_004456.4:c.2196-1_2196dup", | ||
"var_p": "NP_004447.2:p.(Tyr733AspfsTer8)" | ||
}, | ||
{ | ||
"name": "dup with splice region preserved", | ||
"var_c": "NM_016222.3:c.27+2_27+5dup", | ||
"var_p": "NP_057306.2:p.(Arg10ValfsTer20)" | ||
}, | ||
{ | ||
"name": "dup with splice region preserved", | ||
"var_c": "NM_182758.2:c.2953-31_2953-26dup", | ||
"var_p": "NP_877435.2:p.?" | ||
}, | ||
] | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def hp(): | ||
return hgvs.parser.Parser() | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def hdp(): | ||
return hgvs.dataproviders.uta.connect( | ||
mode=os.environ.get("HGVS_CACHE_MODE", "run"), cache=CACHE | ||
) | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def am37(hdp): | ||
return hgvs.assemblymapper.AssemblyMapper(hdp, assembly_name="GRCh37") | ||
|
||
|
||
@pytest.mark.parametrize("case", cases) | ||
def test_real_c_to_p(case, hp, am37): | ||
var_c = hp.parse(case["var_c"]) | ||
assert str(am37.c_to_p(var_c)) == case["var_p"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters