Template Runner for PhEval
This serves as a template repository designed for crafting a personalised PhEval runner. PhEval (Phenotypic Inference Evaluation Framework) is an extensible framework for evaluating variant priorotization and phenotype matching pipelines.
Presently, the runner executes a mock predictor found in src/pheval_template/run/fake_predictor.py. Nevertheless, the primary objective is to leverage this repository as a starting point to develop your own runner for your tool, allowing you to customise and override existing methods effortlessly, given that it already encompasses all the necessary setup for integration with PhEval. There are exemplary methods throughout the runner to provide an idea on how things could be implemented.
Installation
git clone https://github.com/yaseminbridges/pheval.template.git
cd pheval.template
poetry install
poetry shell
Configuring a run with the template runner
A config.yaml should be located in the input directory and formatted like so:
tool: template
tool_version: 1.0.0
variant_analysis: False
gene_analysis: True
disease_analysis: False
tool_specific_configuration_options:
The testdata directory should include the subdirectory named phenopackets - which should contain phenopackets.
Run command
pheval run --input-dir /path/to/input_dir \
--runner templatephevalrunner \
--output-dir /path/to/output_dir \
--testdata-dir /path/to/testdata_dir
Benchmark
You can benchmark the run with the pheval-utils generate-benchmark-stats command:
pheval-utils generate-benchmark-stats --run-yaml /path/to/runs.yaml \
The path provided to the ---run-yaml parameter should be the path to the YAML configuration file for running the benchmark, it may be formatted like so:
benchmark_name: pheval_template_benchmark
runs:
- run_identifier: template_runner
results_dir: /path/to/results_dir # Should be the same directory specified as the --output-dir in the pheval run command
phenopacket_dir: /path/to/phenopacket_dir
gene_analysis: True
variant_analysis: False
disease_analysis: False
threshold:
score_order: descending
plot_customisation:
gene_plots:
plot_type: bar_cumulative
rank_plot_title: PhEval Template Recall Performance
roc_curve_title: PhEval Template ROC Curve
precision_recall_title: PhEval Template PR Curve
disease_plots:
plot_type:
rank_plot_title:
roc_curve_title:
precision_recall_title:
variant_plots:
plot_type:
rank_plot_title:
roc_curve_title:
precision_recall_title:
Personalising to your own tool
If overriding this template to create your own runner implementation. There are key files that should change to fit with your runner implementation.
- The name of the Runner class in
src/pheval_template/runner.pyshould be changed. - Once the name of the Runner class has been customised, line 15 in
pyproject.tomlshould also be changed to match the class name, then runpoetry lockandpoetry install
The runner you give on the CLI will then change to the name of the runner class.
You should also remove the src/pheval_template/run/fake_predictor.py and implement the running of your own tool. Methods in the post-processing can also be altered to process your own tools output.
Metadata
Release files for pheval-template 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pheval_template-0.2.0.tar.gz | 4.4 kB | Without provenance | Details for pheval_template-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pheval_template-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pheval_template-0.2.0-py3-none-any.whl |
Total release size: 11.5 kB
Release files / pheval_template-0.2.0.tar.gz
| Download URL | pheval_template-0.2.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87876931c2b5a0501e16844b40e01983b9667b45fd4600aedded353609cf756a
|
|
BLAKE2b-256 checksum How to use checksums |
18290a56511ec96bdd48bdfec8a39d7ea06cc55984af9cf58cb622b30cfb4ac9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / pheval_template-0.2.0-py3-none-any.whl
| Download URL | pheval_template-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04632cc08ab2e4a3f1d651775595a59d75dc40093fc55f621c88823f409a4a8c
|
|
BLAKE2b-256 checksum How to use checksums |
74806dc1ee3e7e64633904c78cb80c8376ed2f30ecfc3e2c227301f86f61058c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Security for pheval-template 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.