Skip to content

Commit

Permalink
wip: get tests to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Dec 18, 2024
1 parent f6b0e55 commit 0c44142
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ga4gh/vrs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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.")
Expand Down
4 changes: 2 additions & 2 deletions tests/validation/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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`"
Expand Down

0 comments on commit 0c44142

Please sign in to comment.