Skip to main content

Collection of GA4GH Phenopackets

Project description

Phenopacket Store Toolkit

Phenopacket Store Toolkit is a Python package and CLI for managing Phenopacket Store, a collection of GA4GH Phenopacket cohorts that represent individuals with Mendelian diseases.

The toolkit aids the release and Q/C processes, and simplifies access to the Phenopacket Store data from the downstream applications.

Availability

Phenopacket Store Toolkit can be installed from Python Package Index (PyPi):

python3 -m pip install phenopacket-store-toolkit

Examples

Access Phenopacket Store

The toolkit simplifies download and loading the cohort data. The PhenopacketStoreRegistry API caches the release ZIP files locally (in $HOME/.phenopacket-store by default) and simplifies the loading:

from ppktstore.registry import configure_phenopacket_registry

registry = configure_phenopacket_registry()

with registry.open_phenopacket_store(release="0.1.18") as ps:
   phenopackets = list(ps.iter_cohort_phenopackets("SUOX"))

assert len(phenopackets) == 35

The code checks if the release ZIP of Phenopacket Store version 0.1.18 is already available locally, and downloads the release ZIP file if necessary. This is followed by opening the store as ps and loading all phenopackets of the SUOX cohort.

We use Python context manager to ensure proper closing of the ZIP file handle. ps cannot be used outside of the context manager block.

As an alternative to using a specific Phenopacket Store release, the latest release will be used if release argument is omitted.

Make Phenopacket Store release

The release is handled by the Command Line Interface (CLI) of the toolkit.

The release functionality requires additional dependencies, which are installed automatically by adding release profile:

python3 -m pip install phenopacket-store-toolkit[release]

Now, assuming that notebooks points to the notebook folder of the Phenopacket Store repository, we can Q/C the phenopackets by running:

python3 -m ppktstore qc --notebook-dir notebooks

and we can create the release archive by running:

python3 -m ppktstore package --notebook-dir notebooks --release-tag 0.1.18 --output all_phenopackets

This will find all phenopackets in the notebooks folder, copy them into a top-level directory called 0.1.18, and ZIP the directory into all_phenopackets.zip.

Learn more

Find more info in our detailed documentation:

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

phenopacket_store_toolkit-0.1.3.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

phenopacket_store_toolkit-0.1.3-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file phenopacket_store_toolkit-0.1.3.tar.gz.

File metadata

File hashes

Hashes for phenopacket_store_toolkit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f77e8d0ad041a21d3b53c83c623e0dbbe656c178bf23fca84ec5690ca65fde78
MD5 409300d65fed0def075879f23dca36b2
BLAKE2b-256 5046eba51698b2d067054adf0607bef37fcb544feabc70feb776ff59a1afe4b7

See more details on using hashes here.

File details

Details for the file phenopacket_store_toolkit-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for phenopacket_store_toolkit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd452a7d9b3bf7983856832b6e8b8d10b4e9d103203a5268e985249dd47a4f6
MD5 507c21d723f79b03544d505a092d8eca
BLAKE2b-256 dbf80041a8fd20c9419bf17d119f34ca86dcf2b65820eb9a945bae16390309e0

See more details on using hashes here.

Supported by

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