No project description provided
Project description
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 benchmark
command:
pheval-utils benchmark --directory /path/to/output_directoy \
--phenopacket-dir /path/to/phenopacket_dir \
--output-prefix OUTPUT_PREFIX \
--gene-analysis \
--plot-type bar_cumulative
The path provided to the --directory
parameter should be the same as the one provided to the --output-dir
in the pheval run
command
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.py
should be changed. - Once the name of the Runner class has been customised, line 15 in
pyproject.toml
should also be changed to match the class name, then runpoetry lock
andpoetry 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pheval_template-0.1.2.tar.gz
.
File metadata
- Download URL: pheval_template-0.1.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | accfc707f8e1f48f9c12be5d334d36c2df22cea57c52c2bb3a44799ecc2f8e43 |
|
MD5 | 270ff36ad298cea854b6a8583e433cbe |
|
BLAKE2b-256 | 84e14788d768d4c18d9133a0491b017f5232099605526065333b50467681f9dd |
Provenance
File details
Details for the file pheval_template-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pheval_template-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f5b32a877048a2d717f97fa6f0eb8cc5b85932a97b1a6c72660ea2599d04446 |
|
MD5 | 0d342484f5a1047acf564e8eca1a36d7 |
|
BLAKE2b-256 | b79f1362ceb3778263b2d651db893a6928c1f712b5887d845667e65f60069d00 |