A tool and library for quality control and validation of GA4GH Phenopackets.
Project description
phenosentry
A Python package for ensuring data quality in phenopackets and collections of phenopackets.
Features
- Validate phenopacket with quality checks
Installation
Install with Poetry:
poetry add phenosentry
or with pip:
pip install phenosentry
Usage
command line interface (CLI):
phenosentry validate
or in Python code:
from phenosentry.model import AuditorLevel
from phenosentry.validation import get_phenopacket_auditor
from phenosentry.io import read_phenopacket
from pathlib import Path
import logging
# Single Phenopacket Validation
path = "path/to/phenopacket.json"
logger = logging.getLogger("phenosentry")
phenopacket = read_phenopacket(
directory=Path(path),
logger=logger
)
# Strict Validation
auditor = get_phenopacket_auditor(AuditorLevel.STRICT)
notepad = auditor.prepare_notepad(auditor.id())
auditor.audit(
item=phenopacket,
notepad=notepad,
)
if notepad.has_errors_or_warnings(include_subsections=True):
return "Not Valid Phenopacket"
else:
return "Valid Phenopacket"
Development
Run tests with:
poetry run pytest
Run lint with:
poetry run ruff check phenosentry
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
phenosentry-0.2.0.tar.gz
(7.0 kB
view details)
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 phenosentry-0.2.0.tar.gz.
File metadata
- Download URL: phenosentry-0.2.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6341ef64e312eff097f48868cebe80a3232669a0ee010adada01988681f5697
|
|
| MD5 |
ea726678a3f256cfe0583110238dfe2f
|
|
| BLAKE2b-256 |
1cd8667343ee5ba37292070fc296b27625bae0eedd2ef09c79f018860fc08052
|
File details
Details for the file phenosentry-0.2.0-py3-none-any.whl.
File metadata
- Download URL: phenosentry-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5450def054f066057001a0bd8b3f5b680c1191cc16322802fe4a80beba916ffe
|
|
| MD5 |
664975e00c0d27bde98bbfba918157a6
|
|
| BLAKE2b-256 |
6efd9b6e266341d59fbf2db61a8157ac934a5f5385e25dd68bea71884f465030
|