Skip to content

Commit

Permalink
rename _Ga4ghIdentifiableObject -> Ga4ghIdentifiableObject
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Dec 18, 2024
1 parent c06d43c commit f4dae80
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/ga4gh/vrs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Syntax(str, Enum):


def _recurse_ga4gh_serialize(obj):
if isinstance(obj, _Ga4ghIdentifiableObject):
if isinstance(obj, Ga4ghIdentifiableObject):
return obj.get_or_create_digest()
elif isinstance(obj, (_ValueObject, MappableConcept)):
return obj.ga4gh_serialize()
Expand Down Expand Up @@ -245,7 +245,7 @@ def is_ga4gh_identifiable():
return False


class _Ga4ghIdentifiableObject(_ValueObject, ABC):
class Ga4ghIdentifiableObject(_ValueObject, ABC):
"""A contextual value object for which a GA4GH computed identifier can be created.
All GA4GH Identifiable Objects may have computed digests from the VRS Computed
Identifier algorithm.
Expand Down Expand Up @@ -511,7 +511,7 @@ class ga4gh(_ValueObject.ga4gh):
]


class SequenceLocation(_Ga4ghIdentifiableObject):
class SequenceLocation(Ga4ghIdentifiableObject):
"""A `Location` defined by an interval on a referenced `Sequence`."""

type: Literal["SequenceLocation"] = Field(VrsType.SEQ_LOC.value, description=f'MUST be "{VrsType.SEQ_LOC.value}"')
Expand Down Expand Up @@ -587,7 +587,7 @@ def get_refget_accession(self):
else:
return None

class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
class ga4gh(Ga4ghIdentifiableObject.ga4gh):
prefix = 'SL'
priorPrefix = {PrevVrsVersion.V1_3.value: 'VSL'}
keys = [
Expand All @@ -602,7 +602,7 @@ class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
#########################################


class _VariationBase(_Ga4ghIdentifiableObject, ABC):
class _VariationBase(Ga4ghIdentifiableObject, ABC):
"""Base class for variation"""

expressions: Optional[List[Expression]] = None
Expand Down Expand Up @@ -645,7 +645,7 @@ def ga4gh_serialize_as_version(self, as_version: PrevVrsVersion):
return f'{{"location":"{location_digest}","state":{{"sequence":"{sequence}","type":"LiteralSequenceExpression"}},"type":"Allele"}}'


class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
class ga4gh(Ga4ghIdentifiableObject.ga4gh):
prefix = 'VA'
priorPrefix = {PrevVrsVersion.V1_3.value: 'VA'}
keys = [
Expand All @@ -671,7 +671,7 @@ def ga4gh_serialize(self) -> Dict:
out["members"] = sorted(out["members"])
return out

class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
class ga4gh(Ga4ghIdentifiableObject.ga4gh):
prefix = 'CPB'
keys = [
'members',
Expand Down Expand Up @@ -716,7 +716,7 @@ def validate_adjoined_sequences(cls, v) -> List[Union[iriReference, SequenceLoca
return v


class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
class ga4gh(Ga4ghIdentifiableObject.ga4gh):
prefix = 'AJ'
keys = [
'adjoinedSequences',
Expand All @@ -734,7 +734,7 @@ class Terminus(_VariationBase):
type: Literal["Terminus"] = Field(VrsType.TERMINUS.value, description=f'MUST be "{VrsType.TERMINUS.value}".')
location: Union[iriReference, SequenceLocation] = Field(..., description="The location of the terminus.")

class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
class ga4gh(Ga4ghIdentifiableObject.ga4gh):
prefix = "TM"
keys = [
"location",
Expand Down Expand Up @@ -781,7 +781,7 @@ class DerivativeMolecule(_VariationBase):
)
circular: Optional[bool] = Field(None, description="A boolean indicating whether the molecule represented by the sequence is circular (true) or linear (false).")

class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
class ga4gh(Ga4ghIdentifiableObject.ga4gh):
prefix = "DM"
keys = [
"components",
Expand All @@ -808,7 +808,7 @@ class CopyNumberCount(_VariationBase):
..., description='The integral number of copies of the subject in a system'
)

class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
class ga4gh(Ga4ghIdentifiableObject.ga4gh):
prefix = 'CN'
keys = [
'copies',
Expand Down Expand Up @@ -853,7 +853,7 @@ def validate_copy_change(cls, v) -> MappableConcept:

return v

class ga4gh(_Ga4ghIdentifiableObject.ga4gh):
class ga4gh(Ga4ghIdentifiableObject.ga4gh):
prefix = 'CX'
keys = [
'copyChange',
Expand Down

0 comments on commit f4dae80

Please sign in to comment.