Skip to main content

No project description provided

Project description

Template Runner for PhEval

This serves as a template repository designed for crafting a personalised PhEval runner. 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.

  1. The name of the Runner class in src/pheval_template/runner.py should be changed.
  2. 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 run poetry lock and poetry 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pheval_ai_marrvel-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

pheval_ai_marrvel-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file pheval_ai_marrvel-0.1.0.tar.gz.

File metadata

  • Download URL: pheval_ai_marrvel-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pheval_ai_marrvel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 38d72fb719d67a0f87fdf21e8b82077d9f4add7bf654400f02e3d7865e0804e4
MD5 b900f159dd2daf8c0a62adbf4254d1ae
BLAKE2b-256 85c67b561ac25b421ca7c51452babad36929bdea5f320b7e1e1099aa7682350f

See more details on using hashes here.

File details

Details for the file pheval_ai_marrvel-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pheval_ai_marrvel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a5a3090f5c77f6a78b486312b9d9bc453c5f3193052662baacc7b8e47c30c60
MD5 c1f0221dd970e345a351230251290803
BLAKE2b-256 b42e07ea523a771e352cbd4724d2a3cace22d3808dadbf72cfb53fbbe6cc4301

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