Skip to content
Merged
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
17 changes: 0 additions & 17 deletions tests/extras/cassettes/test_from_hgvs_coding_coordinates.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
interactions:
- request:
body: null
headers: {}
method: GET
uri: http://localhost:5000/seqrepo/1/metadata/refseq:NM_001331029.1
response:
body:
string: "{\n \"added\": \"2016-08-24T05:03:40Z\",\n \"aliases\": [\n \"MD5:a8d7243ffeea4ade1dbc33613887693b\",\n
\ \"NCBI:NM_001331029.1\",\n \"refseq:NM_001331029.1\",\n \"NCBI:XM_017001344.1\",\n
\ \"refseq:XM_017001344.1\",\n \"SEGUID:qw9iIJ9BPdGZfypwQH7S3L2f9gI\",\n
\ \"SHA1:ab0f62209f413dd1997f2a70407ed2dcbd9ff602\",\n \"VMC:GS_MBIgVnoHFw34aFqNUVGM0zgjC3d-v8dK\",\n
\ \"sha512t24u:MBIgVnoHFw34aFqNUVGM0zgjC3d-v8dK\",\n \"ga4gh:SQ.MBIgVnoHFw34aFqNUVGM0zgjC3d-v8dK\"\n
\ ],\n \"alphabet\": \"ACGT\",\n \"length\": 11291\n}\n"
headers: {}
status:
code: 200
message: OK
- request:
body: null
headers: {}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ interactions:
body: null
headers: {}
method: GET
uri: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NR_040711.1&rettype=fasta&seq_start=1263&seq_stop=1263&tool=bioutils&email=biocommons-dev@googlegroups.com
uri: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NM_181798.1&rettype=fasta&seq_start=1263&seq_stop=1268&tool=bioutils&email=biocommons-dev@googlegroups.com
response:
body:
string: '>NR_040711.1:1263-1263 Homo sapiens potassium voltage-gated channel,
KQT-like subfamily, member 1 (KCNQ1), transcript variant 2, non-coding RNA
string: '>NM_181798.1:1263-1268 Homo sapiens potassium voltage-gated channel
subfamily Q member 1 (KCNQ1), transcript variant 2, mRNA

G
GTTCTG


'
Expand All @@ -85,13 +85,13 @@ interactions:
body: null
headers: {}
method: GET
uri: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NM_181798.1&rettype=fasta&seq_start=1263&seq_stop=1268&tool=bioutils&email=biocommons-dev@googlegroups.com
uri: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NR_040711.1&rettype=fasta&seq_start=1263&seq_stop=1263&tool=bioutils&email=biocommons-dev@googlegroups.com
response:
body:
string: '>NM_181798.1:1263-1268 Homo sapiens potassium voltage-gated channel
subfamily Q member 1 (KCNQ1), transcript variant 2, mRNA
string: '>NR_040711.1:1263-1263 Homo sapiens potassium voltage-gated channel,
KQT-like subfamily, member 1 (KCNQ1), transcript variant 2, non-coding RNA

GTTCTG
G


'
Expand Down
6 changes: 3 additions & 3 deletions tests/extras/test_location_bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _bounds_msg(sequence_id: str, detail: str, seq_len: int) -> str:
def test_out_of_bounds(request: pytest.FixtureRequest, case: dict) -> None:
tlr = request.getfixturevalue(case["tlr_fixture"])
with pytest.raises(DataProxyValidationError, match=f"^{re.escape(case['msg'])}$"):
tlr.translate_from(case["var"], fmt=case["fmt"], **case.get("kwargs", {}))
tlr.to_vrs(case["var"], fmt=case["fmt"], **case.get("kwargs", {}))


@pytest.mark.parametrize("case", start_after_end_cases, ids=lambda c: c["id"])
Expand All @@ -176,13 +176,13 @@ def test_start_after_end(request: pytest.FixtureRequest, case: dict) -> None:
with pytest.raises(
DataProxyValidationError, match=f"^{re.escape(START_AFTER_END_MSG)}$"
):
tlr.translate_from(case["var"], fmt="hgvs")
tlr.to_vrs(case["var"], fmt="hgvs")


@pytest.mark.parametrize("case", in_bounds_cases, ids=lambda c: c["id"])
@pytest.mark.vcr
def test_in_bounds(request: pytest.FixtureRequest, case: dict) -> None:
tlr = request.getfixturevalue(case["tlr_fixture"])
location = tlr.translate_from(case["var"], fmt=case["fmt"]).location.model_dump()
location = tlr.to_vrs(case["var"], fmt=case["fmt"]).location.model_dump()
expected_location = case["expected_location"]
assert {k: location[k] for k in expected_location} == expected_location
Loading