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.6.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.6-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phenosentry-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 4962c8c798b1c9a6b0993d3324b8594577b248fd93ce7b4679d10e37c9971f2b
MD5 97f58c6f2d4d018f63c4a8b4e3612d33
BLAKE2b-256 6df8a68f8db49257635c3e033adf652d99cfa3def2045be46e22f8c2a94e7abc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phenosentry-0.1.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 08072b57053b0dc1750e89ecea1c8919a39b9703b801a4a998fd0931ab687439
MD5 60214813302fdad4856042690ee0b94a
BLAKE2b-256 3511d7d99ec0a1a862e68de19d23576bf46b9cb6a8946bf899bbc387a574a562

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