From 0c441428ca5c13aafdc77c27b6618f2a9ca99cec Mon Sep 17 00:00:00 2001 From: Kori Kuzma Date: Wed, 18 Dec 2024 10:49:59 -0500 Subject: [PATCH] wip: get tests to pass --- src/ga4gh/vrs/models.py | 6 +++--- tests/validation/test_models.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ga4gh/vrs/models.py b/src/ga4gh/vrs/models.py index 6444573a..63897e40 100644 --- a/src/ga4gh/vrs/models.py +++ b/src/ga4gh/vrs/models.py @@ -502,7 +502,7 @@ class SequenceReference(_ValueObject): residueAlphabet: Optional[ResidueAlphabet] = Field(None, description='The interpretation of the character codes referred to by the refget accession, where "aa" specifies an amino acid character set, and "na" specifies a nucleic acid character set.') circular: Optional[bool] = Field(None, description="A boolean indicating whether the molecule represented by the sequence is circular (true) or linear (false).") sequence: Optional[sequenceString] = Field(None, description="A sequenceString that is a literal representation of the referenced sequence.") - moleculeType: Optional[MoleculeType] = Field(None, description="Molecule types as [defined by RefSeq](https://www.ncbi.nlm.nih.gov/books/NBK21091/) (see Table 1).") + moleculeType: Optional[MoleculeType] = Field(None, description="Molecule types as [defined by RefSeq](https://www.ncbi.nlm.nih.gov/books/NBK21091/) (see Table 1). MUST be one of 'genomic', 'RNA', 'mRNA', or 'protein'.") class ga4gh(_ValueObject.ga4gh): keys = [ @@ -520,11 +520,11 @@ class SequenceLocation(_Ga4ghIdentifiableObject): ) start: Optional[Union[Range, int]] = Field( None, - description='The start coordinate or range of the SequenceLocation. The minimum value of this coordinate or range is 0. MUST represent a coordinate or range less than or equal to the value of `end`.', + description='The start coordinate or range of the SequenceLocation. The minimum value of this coordinate or range is 0. For locations on linear sequences, this MUST represent a coordinate or range less than or equal to the value of `end`. For circular sequences, `start` is greater than `end` when the location spans the sequence 0 coordinate.', ) end: Optional[Union[Range, int]] = Field( None, - description='The end coordinate or range of the SequenceLocation. The minimum value of this coordinate or range is 0. MUST represent a coordinate or range greater than or equal to the value of `start`.', + description='The end coordinate or range of the SequenceLocation. The minimum value of this coordinate or range is 0. For locations on linear sequences, this MUST represent a coordinate or range grater than or equal to the value of `start`. For circular sequences, `end` is less than `start` when the location spans the sequence 0 coordinate.', ) sequence: Optional[sequenceString] = Field(None, description="The literal sequence encoded by the `sequenceReference` at these coordinates.") diff --git a/tests/validation/test_models.py b/tests/validation/test_models.py index 58d8bcfa..fc574dac 100644 --- a/tests/validation/test_models.py +++ b/tests/validation/test_models.py @@ -8,7 +8,7 @@ import pytest import yaml -from ga4gh.core import ga4gh_serialize, ga4gh_digest, ga4gh_identify, PrevVrsVersion, models +from ga4gh.core import ga4gh_serialize, ga4gh_digest, ga4gh_identify, PrevVrsVersion, core_models from ga4gh.vrs import models, VrsType def ga4gh_1_3_identify(*args, **kwargs): @@ -76,7 +76,7 @@ def test_prev_vrs_version(): invalid_vrs_version_msg = f"Expected `PrevVrsVersion`, but got {invalid_vrs_version}" loc_no_seq_ref = models.SequenceLocation(start=44908821, end=44908822) - loc_iri = models.SequenceLocation(start=44908821, end=44908822, sequenceReference=models.iriReference("sequenceReferences.json#example1")) + loc_iri = models.SequenceLocation(start=44908821, end=44908822, sequenceReference=core_models.iriReference("sequenceReferences.json#example1")) allele_rle_no_seq = models.Allele(location=loc, state=models.ReferenceLengthExpression(length=11, repeatSubunitLength=3)) allele_le = models.Allele(location=loc, state=models.LengthExpression(length=2)) loc_seq_ref_msg = "Must provide `sequenceReference` and it must be a valid `SequenceReference`"