go-standard-annotation-schema
LinkML schema for GO Standard Annotations
Documentation Website
https://geneontology.github.io/go-standard-annotation-schema
Repository Structure
- docs/ - mkdocs-managed documentation
- elements/ - generated schema documentation
- examples/ - Examples of using the schema
- project/ - project files (these files are auto-generated, do not edit)
- src/ - source files (edit these)
- go_standard_annotation_schema
- schema/ -- LinkML schema (edit this)
- datamodel/ -- generated Python datamodel
- go_standard_annotation_schema
- tests/ - Python tests
- data/ - Example data
Developer Tools
uv is the only required development tool. It installs the project dependencies and the locked copy of just:
uv sync
uv run --locked just check
uv run --locked just test
Run uv run --locked just to see focused checks, generation commands, and documentation
recipes. See CONTRIBUTING.md for automatic fixes, optional Git hooks,
and editor integration.
If you have just installed globally, you can omit the uv run --locked prefix and run
just directly.
Reading GPAD and GPI files
GpadReader and GpiReader stream validated annotations and entities without loading
the whole file into memory. Both readers support only version 2.0 of their respective
formats. A path ending in .gz is opened as a gzip-compressed text file; other paths
are opened as ordinary text files.
Use a reader as a context manager to inspect its header metadata and iterate over its records:
from go_standard_annotation_schema.io import GpadReader
with GpadReader("annotations.gpad.gz") as reader:
print(reader.metadata.generated_by)
for annotation in reader:
print(annotation.db_object_id)
By default, an invalid data row raises RowError. Use errors="skip" to continue after
invalid rows, and on_error to inspect every skipped row:
def report(issue):
print(issue.source, issue.line_number, issue.code)
with GpadReader("annotations.gpad", errors="skip", on_error=report) as reader:
for annotation in reader:
consume(annotation)
print(reader.stats.rows_skipped)
For an individual headerless GPI data row, use the class-level parser:
from go_standard_annotation_schema.io import GpiReader
entity = GpiReader.parse_line(line)
print(entity.db_object_symbol)
For an individual headerless GPAD data row, the class-level parser returns every annotation produced by that row:
from go_standard_annotation_schema.io import GpadReader
(annotation,) = GpadReader.parse_line(line)
print(annotation.ontology_class_id)
For GPAD columns 7 and 11, pipes separate alternative annotations and commas separate
values within one annotation. When either field contains pipes, the reader emits one
Annotation for each Cartesian-product combination. Therefore
GpadReader.parse_line() returns a tuple, even when a row produces one annotation.
Interacting taxon identifiers are split only on pipes. Other content is passed unchanged
to Annotation.model_validate() for model-level validation.
See the official GPAD 2.0 format documentation and GPI 2.0 format documentation.
Credits
This project uses the template linkml-project-copier.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file go_standard_annotation_schema-0.0.2.tar.gz.
File metadata
- Download URL: go_standard_annotation_schema-0.0.2.tar.gz
- Upload date:
- Size: 167.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
596083a86ef43cc6c0ed60447daeaaa8ec12d41fc016514490d5986aebe17ad3
|
|
| MD5 |
276c7322f72dfff37dfd2890e9272a1e
|
|
| BLAKE2b-256 |
6dd1bf75b3283e51f0b2951f7d8ad597e46682db1a425d68452b05bc85cca9f0
|
Provenance
The following attestation bundles were made for go_standard_annotation_schema-0.0.2.tar.gz:
Publisher:
pypi-publish.yaml on geneontology/go-standard-annotation-schema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
go_standard_annotation_schema-0.0.2.tar.gz -
Subject digest:
596083a86ef43cc6c0ed60447daeaaa8ec12d41fc016514490d5986aebe17ad3 - Sigstore transparency entry: 2373698629
- Sigstore integration time:
-
Permalink:
geneontology/go-standard-annotation-schema@55c5d646382f18694a084fe075400fb53d7ce029 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/geneontology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@55c5d646382f18694a084fe075400fb53d7ce029 -
Trigger Event:
release
-
Statement type:
File details
Details for the file go_standard_annotation_schema-0.0.2-py3-none-any.whl.
File metadata
- Download URL: go_standard_annotation_schema-0.0.2-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ff0625dc88988c8c926b87739496d0a10ef80ab3e4164ea030efd2e16568af8
|
|
| MD5 |
9f9612770db8538120e4111a4e6f3be8
|
|
| BLAKE2b-256 |
95446a37388d5f91ea52b1264fbbce448c02fa10ba33a4dceb4928a98e8de1c6
|
Provenance
The following attestation bundles were made for go_standard_annotation_schema-0.0.2-py3-none-any.whl:
Publisher:
pypi-publish.yaml on geneontology/go-standard-annotation-schema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
go_standard_annotation_schema-0.0.2-py3-none-any.whl -
Subject digest:
4ff0625dc88988c8c926b87739496d0a10ef80ab3e4164ea030efd2e16568af8 - Sigstore transparency entry: 2373698708
- Sigstore integration time:
-
Permalink:
geneontology/go-standard-annotation-schema@55c5d646382f18694a084fe075400fb53d7ce029 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/geneontology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@55c5d646382f18694a084fe075400fb53d7ce029 -
Trigger Event:
release
-
Statement type: