diff --git a/src/ga4gh/vrs/extras/translator.py b/src/ga4gh/vrs/extras/translator.py index 1e6969f4..dfe0bdc4 100644 --- a/src/ga4gh/vrs/extras/translator.py +++ b/src/ga4gh/vrs/extras/translator.py @@ -6,7 +6,7 @@ """ from collections.abc import Mapping -from typing import Union, Tuple +from typing import Optional, Union, Tuple import logging import re @@ -50,15 +50,19 @@ class Translator: spdi_re = re.compile(r"(?P[^:]+):(?P\d+):(?P\w*):(?P\w*)") - def __init__(self, - data_proxy, - default_assembly_name="GRCh38", - normalize=True, - identify=True): + def __init__( + self, + data_proxy, + default_assembly_name="GRCh38", + normalize=True, + identify=True, + rle_seq_limit: Optional[int] = 50 + ): self.default_assembly_name = default_assembly_name self.data_proxy = data_proxy self.identify = identify self.normalize = normalize + self.rle_seq_limit = rle_seq_limit self.hgvs_tools = None self.from_translators = {} self.to_translators = {} @@ -118,6 +122,11 @@ def translate_from(self, var, fmt=None, **kwargs): order to return a VRS object. A `ValidationError` will be raised if validation checks fail. If `False` then VRS object will be returned even if validation checks fail. Defaults to `True`. + rle_seq_limit Optional(int): If RLE is set as the new state after + normalization, this sets the limit for the length of the `sequence`. + To exclude `sequence` from the response, set to 0. + For no limit, set to `None`. + Defaults value set in instance variable, `rle_seq_limit`. """ if fmt: try: @@ -239,6 +248,11 @@ def _from_beacon(self, beacon_expr, **kwargs): kwargs: assembly_name (str): Assembly used for `beacon_expr`. + rle_seq_limit Optional(int): If RLE is set as the new state after + normalization, this sets the limit for the length of the `sequence`. + To exclude `sequence` from the response, set to 0. + For no limit, set to `None`. + Defaults value set in instance variable, `rle_seq_limit`. #>>> a = tlr.from_beacon("19 : 44908822 C > T") #>>> a.model_dump() @@ -284,7 +298,7 @@ def _from_beacon(self, beacon_expr, **kwargs): location = models.SequenceLocation(sequenceReference=seq_ref, start=start, end=end) state = models.LiteralSequenceExpression(sequence=ins_seq) allele = models.Allele(location=location, state=state) - allele = self._post_process_imported_allele(allele) + allele = self._post_process_imported_allele(allele, **kwargs) return allele @@ -297,6 +311,11 @@ def _from_gnomad(self, gnomad_expr, **kwargs): order to return a VRS object. A `ValidationError` will be raised if validation checks fail. If `False` then VRS object will be returned even if validation checks fail. Defaults to `True`. + rle_seq_limit Optional(int): If RLE is set as the new state after + normalization, this sets the limit for the length of the `sequence`. + To exclude `sequence` from the response, set to 0. + For no limit, set to `None`. + Defaults value set in instance variable, `rle_seq_limit`. #>>> a = tlr.from_gnomad("1-55516888-G-GA") #>>> a.model_dump() @@ -347,12 +366,19 @@ def _from_gnomad(self, gnomad_expr, **kwargs): location = models.SequenceLocation(sequenceReference=seq_ref, start=start, end=end) sstate = models.LiteralSequenceExpression(sequence=ins_seq) allele = models.Allele(location=location, state=sstate) - allele = self._post_process_imported_allele(allele) + allele = self._post_process_imported_allele(allele, **kwargs) return allele def _from_hgvs(self, hgvs_expr: str, **kwargs): """parse hgvs into a VRS Allele Object + kwargs: + rle_seq_limit Optional(int): If RLE is set as the new state after + normalization, this sets the limit for the length of the `sequence`. + To exclude `sequence` from the response, set to 0. + For no limit, set to `None`. + Defaults value set in instance variable, `rle_seq_limit`. + #>>> a = tlr.from_hgvs("NC_000007.14:g.55181320A>T") #>>> a.model_dump() { @@ -412,7 +438,7 @@ def _from_hgvs(self, hgvs_expr: str, **kwargs): location = models.SequenceLocation(sequenceReference=seq_ref, start=start, end=end) sstate = models.LiteralSequenceExpression(sequence=state) allele = models.Allele(location=location, state=sstate) - allele = self._post_process_imported_allele(allele) + allele = self._post_process_imported_allele(allele, **kwargs) return allele @@ -420,6 +446,13 @@ def _from_spdi(self, spdi_expr, **kwargs): """Parse SPDI expression in to a GA4GH Allele + kwargs: + rle_seq_limit Optional(int): If RLE is set as the new state after + normalization, this sets the limit for the length of the `sequence`. + To exclude `sequence` from the response, set to 0. + For no limit, set to `None`. + Defaults value set in instance variable, `rle_seq_limit`. + #>>> a = tlr.from_spdi("NC_000013.11:32936731:1:C") #>>> a.model_dump() { @@ -464,7 +497,7 @@ def _from_spdi(self, spdi_expr, **kwargs): location = models.SequenceLocation(sequenceReference=seq_ref, start=start, end=end) sstate = models.LiteralSequenceExpression(sequence=ins_seq) allele = models.Allele(location=location, state=sstate) - allele = self._post_process_imported_allele(allele) + allele = self._post_process_imported_allele(allele, **kwargs) return allele def _to_hgvs(self, vo, namespace="refseq"): @@ -583,12 +616,23 @@ def _to_spdi(self, vo, namespace="refseq"): spdis = [a + spdi_tail for a in aliases] return spdis - def _post_process_imported_allele(self, allele): - """ - Provide common post-processing for imported Alleles IN-PLACE. + def _post_process_imported_allele(self, allele, **kwargs): + """Provide common post-processing for imported Alleles IN-PLACE. + + :param allele: VRS Allele object + + kwargs: + rle_seq_limit Optional(int): If RLE is set as the new state after + normalization, this sets the limit for the length of the `sequence`. + To exclude `sequence` from the response, set to 0. + For no limit, set to `None`. """ if self.normalize: - allele = normalize(allele, self.data_proxy) + allele = normalize( + allele, + self.data_proxy, + rle_seq_limit=kwargs.get("rle_seq_limit", self.rle_seq_limit) + ) if self.identify: allele.id = ga4gh_identify(allele) diff --git a/tests/extras/cassettes/test_rle_seq_limit.yaml b/tests/extras/cassettes/test_rle_seq_limit.yaml new file mode 100644 index 00000000..ec205c50 --- /dev/null +++ b/tests/extras/cassettes/test_rle_seq_limit.yaml @@ -0,0 +1,1993 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/metadata/refseq:NC_000013.11 + response: + body: + string: "{\n \"added\": \"2016-08-27T23:50:14Z\",\n \"aliases\": [\n \"GRCh38:13\",\n + \ \"GRCh38:chr13\",\n \"GRCh38.p1:13\",\n \"GRCh38.p1:chr13\",\n \"GRCh38.p10:13\",\n + \ \"GRCh38.p10:chr13\",\n \"GRCh38.p11:13\",\n \"GRCh38.p11:chr13\",\n + \ \"GRCh38.p12:13\",\n \"GRCh38.p12:chr13\",\n \"GRCh38.p2:13\",\n + \ \"GRCh38.p2:chr13\",\n \"GRCh38.p3:13\",\n \"GRCh38.p3:chr13\",\n + \ \"GRCh38.p4:13\",\n \"GRCh38.p4:chr13\",\n \"GRCh38.p5:13\",\n \"GRCh38.p5:chr13\",\n + \ \"GRCh38.p6:13\",\n \"GRCh38.p6:chr13\",\n \"GRCh38.p7:13\",\n \"GRCh38.p7:chr13\",\n + \ \"GRCh38.p8:13\",\n \"GRCh38.p8:chr13\",\n \"GRCh38.p9:13\",\n \"GRCh38.p9:chr13\",\n + \ \"MD5:a5437debe2ef9c9ef8f3ea2874ae1d82\",\n \"NCBI:NC_000013.11\",\n + \ \"refseq:NC_000013.11\",\n \"SEGUID:2oDBty0yKV9wHo7gg+Bt+fPgi5o\",\n + \ \"SHA1:da80c1b72d32295f701e8ee083e06df9f3e08b9a\",\n \"VMC:GS__0wi-qoDrvram155UmcSC-zA5ZK4fpLT\",\n + \ \"sha512t24u:_0wi-qoDrvram155UmcSC-zA5ZK4fpLT\",\n \"ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT\"\n + \ ],\n \"alphabet\": \"ACGKNTY\",\n \"length\": 114364328\n}\n" + headers: + Connection: + - close + Content-Length: + - '1002' + Content-Type: + - application/json + Date: + - Wed, 14 Feb 2024 15:22:11 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/NC_000013.11?start=32331042&end=32331094 + response: + body: + string: TTTAGTTGAACTACAGGTTTTTTTGTTGTTGTTGTTTTGATTTTTTTTTTTT + headers: + Connection: + - close + Content-Length: + - '52' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:11 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/metadata/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT + response: + body: + string: "{\n \"added\": \"2016-08-27T23:50:14Z\",\n \"aliases\": [\n \"GRCh38:13\",\n + \ \"GRCh38:chr13\",\n \"GRCh38.p1:13\",\n \"GRCh38.p1:chr13\",\n \"GRCh38.p10:13\",\n + \ \"GRCh38.p10:chr13\",\n \"GRCh38.p11:13\",\n \"GRCh38.p11:chr13\",\n + \ \"GRCh38.p12:13\",\n \"GRCh38.p12:chr13\",\n \"GRCh38.p2:13\",\n + \ \"GRCh38.p2:chr13\",\n \"GRCh38.p3:13\",\n \"GRCh38.p3:chr13\",\n + \ \"GRCh38.p4:13\",\n \"GRCh38.p4:chr13\",\n \"GRCh38.p5:13\",\n \"GRCh38.p5:chr13\",\n + \ \"GRCh38.p6:13\",\n \"GRCh38.p6:chr13\",\n \"GRCh38.p7:13\",\n \"GRCh38.p7:chr13\",\n + \ \"GRCh38.p8:13\",\n \"GRCh38.p8:chr13\",\n \"GRCh38.p9:13\",\n \"GRCh38.p9:chr13\",\n + \ \"MD5:a5437debe2ef9c9ef8f3ea2874ae1d82\",\n \"NCBI:NC_000013.11\",\n + \ \"refseq:NC_000013.11\",\n \"SEGUID:2oDBty0yKV9wHo7gg+Bt+fPgi5o\",\n + \ \"SHA1:da80c1b72d32295f701e8ee083e06df9f3e08b9a\",\n \"VMC:GS__0wi-qoDrvram155UmcSC-zA5ZK4fpLT\",\n + \ \"sha512t24u:_0wi-qoDrvram155UmcSC-zA5ZK4fpLT\",\n \"ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT\"\n + \ ],\n \"alphabet\": \"ACGKNTY\",\n \"length\": 114364328\n}\n" + headers: + Connection: + - close + Content-Length: + - '1002' + Content-Type: + - application/json + Date: + - Wed, 14 Feb 2024 15:22:11 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331042&end=32331094 + response: + body: + string: TTTAGTTGAACTACAGGTTTTTTTGTTGTTGTTGTTTTGATTTTTTTTTTTT + headers: + Connection: + - close + Content-Length: + - '52' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:11 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331094&end=32331094 + response: + body: + string: '' + headers: + Connection: + - close + Content-Length: + - '0' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:11 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331093&end=32331094 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331092&end=32331093 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331091&end=32331092 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331090&end=32331091 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331089&end=32331090 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331088&end=32331089 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331087&end=32331088 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331086&end=32331087 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331085&end=32331086 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331084&end=32331085 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331083&end=32331084 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331082&end=32331083 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331081&end=32331082 + response: + body: + string: A + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331080&end=32331081 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331079&end=32331080 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331078&end=32331079 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331077&end=32331078 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331076&end=32331077 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331075&end=32331076 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331074&end=32331075 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331073&end=32331074 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331072&end=32331073 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331071&end=32331072 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331070&end=32331071 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331069&end=32331070 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331068&end=32331069 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331067&end=32331068 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331066&end=32331067 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331065&end=32331066 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331064&end=32331065 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331063&end=32331064 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331062&end=32331063 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331061&end=32331062 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331060&end=32331061 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331059&end=32331060 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331058&end=32331059 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331057&end=32331058 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331056&end=32331057 + response: + body: + string: A + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331055&end=32331056 + response: + body: + string: C + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331054&end=32331055 + response: + body: + string: A + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331053&end=32331054 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331052&end=32331053 + response: + body: + string: C + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331051&end=32331052 + response: + body: + string: A + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331050&end=32331051 + response: + body: + string: A + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331049&end=32331050 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331048&end=32331049 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331047&end=32331048 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331046&end=32331047 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331045&end=32331046 + response: + body: + string: A + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331044&end=32331045 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331043&end=32331044 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331042&end=32331043 + response: + body: + string: T + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331041&end=32331042 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: http://localhost:5000/seqrepo/1/sequence/ga4gh:SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT?start=32331094&end=32331095 + response: + body: + string: G + headers: + Connection: + - close + Content-Length: + - '1' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Wed, 14 Feb 2024 15:22:12 GMT + Server: + - Werkzeug/2.2.2 Python/3.10.4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NC_000013.11&rettype=fasta&seq_start=32331043&seq_stop=32331094&tool=bioutils&email=biocommons-dev@googlegroups.com + response: + body: + string: !!binary | + H4sIAAAAAAAAALLzc443AAJDYz1DQytjI2NjQwMTY10Iw9JEwSM/N1+hOLEgMzWvWCE5owjILc7P + TVUwNNZRcA9yzjC20CswNFEIKMrMTSyqVHAsLk7NTcqp5AoJCXF0Dwlxd3R0DnF0dnQHssHAHQmB + pEOQABcXAAAA//8DAN0Jx5SOAAAA + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-RateLimit-Limit,X-RateLimit-Remaining + Cache-Control: + - private + Connection: + - Keep-Alive + Content-Disposition: + - attachment; filename="sequence.fasta" + Content-Security-Policy: + - upgrade-insecure-requests + Content-Type: + - text/plain + Date: + - Wed, 14 Feb 2024 15:22:16 GMT + Keep-Alive: + - timeout=4, max=40 + NCBI-PHID: + - 939BBAB6F42E1D35000058DD11C83A32.1.1.m_5 + NCBI-SID: + - 8945541C035C37C6_82E4SID + Referrer-Policy: + - origin-when-cross-origin + Server: + - Finatra + Set-Cookie: + - ncbi_sid=8945541C035C37C6_82E4SID; domain=.nih.gov; path=/; expires=Fri, 14 + Feb 2025 15:22:16 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Transfer-Encoding: + - chunked + X-RateLimit-Limit: + - '3' + X-RateLimit-Remaining: + - '2' + X-UA-Compatible: + - IE=Edge + X-XSS-Protection: + - 1; mode=block + content-encoding: + - gzip + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NC_000013.11&rettype=fasta&seq_start=32331094&seq_stop=32331094&tool=bioutils&email=biocommons-dev@googlegroups.com + response: + body: + string: !!binary | + H4sIAAAAAAAAALLzc443AAJDYz1DQytjI2NjQwNLE10YQ8EjPzdfoTixIDM1r1ghOaMIyC3Oz01V + MDTWUXAPcs4wttArMDRRCCjKzE0sqlRwLC5OzU3KqeQK4eICAAAA//8DAOcxeKNbAAAA + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-RateLimit-Limit,X-RateLimit-Remaining + Cache-Control: + - private + Connection: + - Keep-Alive + Content-Disposition: + - attachment; filename="sequence.fasta" + Content-Security-Policy: + - upgrade-insecure-requests + Content-Type: + - text/plain + Date: + - Wed, 14 Feb 2024 15:22:17 GMT + Keep-Alive: + - timeout=4, max=40 + NCBI-PHID: + - 939BBAB6F42E1D3500004ADD1871AF68.1.1.m_5 + NCBI-SID: + - F9907E0D043E9DBA_7723SID + Referrer-Policy: + - origin-when-cross-origin + Server: + - Finatra + Set-Cookie: + - ncbi_sid=F9907E0D043E9DBA_7723SID; domain=.nih.gov; path=/; expires=Fri, 14 + Feb 2025 15:22:17 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Transfer-Encoding: + - chunked + X-RateLimit-Limit: + - '3' + X-RateLimit-Remaining: + - '1' + X-UA-Compatible: + - IE=Edge + X-XSS-Protection: + - 1; mode=block + content-encoding: + - gzip + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NC_000013.11&rettype=fasta&seq_start=32331043&seq_stop=32331114&tool=bioutils&email=biocommons-dev@googlegroups.com + response: + body: + string: !!binary | + H4sIAAAAAAAAAEyKsQrDMAxEd3+FPqAJUZWhdCgIDepUStBe0mJIoK6DPeXvq2TK4zjuuLs95NU5 + SC3ilc5E2PXU7AGxh3tOGeq4zPFX4TMVrzWnCEgn0EEmurSL355lTmNZgWuN6f1dg5mxmimzGAur + 5x09aJvtgG43dTfxIu5BLYQ/AAAA//8DAGgcIEKjAAAA + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-RateLimit-Limit,X-RateLimit-Remaining + Cache-Control: + - private + Connection: + - Keep-Alive + Content-Disposition: + - attachment; filename="sequence.fasta" + Content-Security-Policy: + - upgrade-insecure-requests + Content-Type: + - text/plain + Date: + - Wed, 14 Feb 2024 15:22:17 GMT + Keep-Alive: + - timeout=4, max=40 + NCBI-PHID: + - 939BBAB6F42E1D35000025DD1D891E1C.1.1.m_5 + NCBI-SID: + - A5FDABA59611BBFE_63E7SID + Referrer-Policy: + - origin-when-cross-origin + Server: + - Finatra + Set-Cookie: + - ncbi_sid=A5FDABA59611BBFE_63E7SID; domain=.nih.gov; path=/; expires=Fri, 14 + Feb 2025 15:22:17 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + Transfer-Encoding: + - chunked + X-RateLimit-Limit: + - '3' + X-RateLimit-Remaining: + - '1' + X-UA-Compatible: + - IE=Edge + X-XSS-Protection: + - 1; mode=block + content-encoding: + - gzip + status: + code: 200 + message: OK +version: 1 diff --git a/tests/extras/test_allele_translator.py b/tests/extras/test_allele_translator.py index a249cea0..58b6f614 100644 --- a/tests/extras/test_allele_translator.py +++ b/tests/extras/test_allele_translator.py @@ -433,6 +433,49 @@ def test_hgvs(tlr, hgvsexpr, expected): assert hgvsexpr == to_hgvs[0] +@pytest.mark.vcr +def test_rle_seq_limit(tlr): + tlr.normalize = True + tlr.identify = True + + a_dict = { + "id": "ga4gh:VA.VfJkaAxTPjZAG_fWm_sB4m19R5p5WGSj", + "location": { + "id": "ga4gh:SL.0jECKVeKM2-s_uDWtUgW-qvkupO3COKr", + "end": 32331094, + "start": 32331042, + "sequenceReference": { + "refgetAccession": "SQ._0wi-qoDrvram155UmcSC-zA5ZK4fpLT", + "type": "SequenceReference" + }, + "type": "SequenceLocation" + }, + "state": { + "length": 104, + "repeatSubunitLength": 52, + "type": "ReferenceLengthExpression" + }, + "type": "Allele" + } + input_hgvs_expr = "NC_000013.11:g.32331043_32331094dup" + + # use default rle_seq_limit + allele_no_seq = tlr.translate_from(input_hgvs_expr, fmt="hgvs") + assert allele_no_seq.model_dump(exclude_none=True) == a_dict + + with pytest.raises(AttributeError, match="'NoneType' object has no attribute 'root'"): + tlr.translate_to(allele_no_seq, "hgvs") + + # set rle_seq_limit to None + allele_with_seq = tlr.translate_from(input_hgvs_expr, fmt="hgvs", rle_seq_limit=None) + a_dict_with_seq = a_dict.copy() + a_dict_with_seq["state"]["sequence"] = "TTTAGTTGAACTACAGGTTTTTTTGTTGTTGTTGTTTTGATTTTTTTTTTTTTTTAGTTGAACTACAGGTTTTTTTGTTGTTGTTGTTTTGATTTTTTTTTTTT" + assert allele_with_seq.model_dump(exclude_none=True) == a_dict_with_seq + + output_hgvs_expr = tlr.translate_to(allele_with_seq, "hgvs") + assert output_hgvs_expr == [input_hgvs_expr] + + def test_to_hgvs_invalid(tlr): # IRI is passed iri_vo = models.Allele(