Skip to main content

A tool and library for quality control and valdiation 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


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.1.7.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phenosentry-0.1.7-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file phenosentry-0.1.7.tar.gz.

File metadata

  • Download URL: phenosentry-0.1.7.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/24.5.0

File hashes

Hashes for phenosentry-0.1.7.tar.gz
Algorithm Hash digest
SHA256 fa952ff4ffad6172db0fc0b86308c888cf1e6988d12a8e88f2a0abb2664d194e
MD5 dbd1c16c441b1053aad3c5cabe455371
BLAKE2b-256 2ed2a8b306fb2b8a44d69b1a6a079f2f9b7c2405446ac4e8dec8276d9d33f878

See more details on using hashes here.

File details

Details for the file phenosentry-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: phenosentry-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 10.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

Hashes for phenosentry-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e81e2ff53f8448f3d505b9028330ff31b16cb0533122641d5f8d63a77b9bd528
MD5 37b04bc89a75b63b9c8170690c62c411
BLAKE2b-256 e5234d7e1df43ab625b9ffac102defd5172d54f3b45fba5e8b8ebd9b3b1ce127

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page