Registry / serialization / ga4gh-va-spec

ga4gh-va-spec

JSON →
library0.4.3pypypi✓ verified 86d ago

GA4GH Variant Annotation (VA) reference implementation providing Pydantic models for the VA specification. Current version 0.4.3, uses VRS-Python for variant representation and pydantic for validation. Release cadence is irregular, tied to VA spec releases.

pip install ga4gh-va-spec
INSTALL
IMPORT
SIG · GA4GH-VA-SPEC
G
ga4gh-va-spec
serializationpythonv0.4.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Statement
from ga4gh.va_spec.base import Statement
from ga4gh.va_spec import Statement
Statement is in base submodule, not top-level.

Create a minimal Statement object.

from ga4gh.va_spec.base import Statement from pydantic import ValidationError try: stmt = Statement(id='test:1', type='Statement', description='Example') print(stmt.model_dump(exclude_unset=True)) except ValidationError as e: print(e)
Debug
Known issues
breakingVersion 0.2.0 changed base model namespace; imports from ga4gh.va_spec.base are required, not ga4gh.va_spec directly.
fix
Update imports to use submodules (e.g., base, aac_2017).
affects: >=0.2.0
breakingVersion 0.4.0 updated VA spec to 1.0.0, removing deprecated fields and renaming models.
fix
Review VA spec 1.0.0 changelog. Use new model names like 'Statement' with standard GA4GH types.
affects: <0.4.0
gotchaModels enforce additionalProperties=False by default; extra fields cause validation errors.
fix
Ensure all fields match the model schema exactly. Use model_dump() with exclude_unset to inspect.
affects: >=0.4.0
Errors
Common errors & fixes
ImportError: cannot import name 'Statement' from 'ga4gh.va_spec'
Trying to import Statement from top-level instead of submodule.
fix
Use: from ga4gh.va_spec.base import Statement
pydantic_core._pydantic_core.ValidationError: 1 validation error for Statement extra_forbidden
Model has additionalProperties=False and extra fields are provided.
fix
Remove any fields not defined in the model, or update model to include them.
Upgrade
Version history
0.4.3latest on PyPI · released Dec 23, 2025
Audit
Dependencies
vrs-pythonrequiredCore dependency for variant representation models (VRS/GA4GH)
pydanticrequiredData validation and serialization
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
ga4gh-va-spec — pip install ga4gh-va-spec · libregistry