monarch-initiative / phenopacket-store

Collections of GA4GH phenopackets that represent individuals with Mendelian diseases.
https://monarch-initiative.github.io/phenopacket-store/
BSD 3-Clause "New" or "Revised" License
14 stars 4 forks source link

Split data and code #144

Closed ielis closed 3 weeks ago

ielis commented 4 weeks ago

Split the repository into data (this repository) and code (Phenopacket Store Toolkit).

From now on, we use phenopacket-store-toolkit for Q/C, release, and access. The toolkit is versioned separately from the store.

The toolkit can be installed from PyPi:

python3 -m pip install phenopacket-store-toolkit

Use to access Phenopacket Store

The toolkit dramatically simplifies loading phenopackets, e.g. SUOX cohort of Phenopacket Store 0.1.18:

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 registry API is basically the same as HPO-toolkit's Ontology store.

Use for packaging and Q/C

For the release duties, the toolkit must be installed with a bunch of additional dependencies:

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

Then, the same CLI is available and we can use it to create the release ZIP and Q/C. The HOW_TO_RELEASE.md checklist has been updated.

@pnrobinson this will require an update on your machine(s). I'll help with the setup.