Skip to content

Commit d1e0c3c

Browse files
committed
finish this
1 parent 92e2448 commit d1e0c3c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/anyvlm/anyvar/http_client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import requests
77
from anyvar.utils.types import VrsObject
88

9-
from vlm.anyvar.base_client import AF_ANNOTATION_TYPE, AmbiguousAnnotationError
10-
from vlm.schemas.domain import AlleleFrequencyAnnotation
9+
from anyvlm.anyvar.base_client import AF_ANNOTATION_TYPE, AmbiguousAnnotationError
10+
from anyvlm.schemas.domain import AlleleFrequencyAnnotation
1111

1212

1313
class HttpAnyVarClient(abc.ABC):
@@ -69,6 +69,12 @@ def search_by_interval(
6969
:param end: end position for genomic region
7070
:return: list of matching variant objects
7171
"""
72+
response = requests.get(
73+
f"{self.hostname}/search?accession={accession}&start={start}&end{end}",
74+
timeout=self.request_timeout,
75+
)
76+
response.raise_for_status()
77+
return response.json()["variations"]
7278

7379
def get_af_annotation(self, key: str) -> AlleleFrequencyAnnotation | None:
7480
"""Get AF annotation for a key (object ID)

0 commit comments

Comments
 (0)