-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80fd5fd
commit 562ad4d
Showing
1 changed file
with
37 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,62 @@ | ||
# 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. | ||
# AI-MARRVEL Runner for PhEval | ||
|
||
This is the AI-MARRVEL plugin for PhEval. With this plugin, you can leverage the tool, AI-MARRVEL, to run the PhEval pipeline seamlessly. Detailed instructions on setting up the appropriate directory layout, including the input directory and test data directory, can be found here. | ||
# Installation | ||
|
||
```bash | ||
git clone https://github.com/yaseminbridges/pheval.template.git | ||
cd pheval.template | ||
git clone https://github.com/yaseminbridges/pheval.ai_marrvel.git | ||
cd pheval.ai_marrvel | ||
poetry install | ||
poetry shell | ||
``` | ||
|
||
# Configuring a run with the template runner | ||
# Configuring a single run: | ||
|
||
## Setting up the input directory | ||
A `config.yaml` should be located in the input directory and formatted like so: | ||
|
||
```yaml | ||
tool: template | ||
tool: AI-MARRVEL | ||
tool_version: 1.0.0 | ||
variant_analysis: False | ||
variant_analysis: True | ||
gene_analysis: True | ||
disease_analysis: False | ||
tool_specific_configuration_options: | ||
``` | ||
The testdata directory should include the subdirectory named `phenopackets` - which should contain phenopackets. | ||
The AI-MARRVEL data dependencies should also be unpacked into the input directory. The overall structure of the input directory should look something like: | ||
```tree | ||
. | ||
├── annotate | ||
├── bcf_annotate | ||
├── config.yaml | ||
├── download.err | ||
├── filter_vep | ||
├── merge_expand | ||
├── mod5_diffusion | ||
├── model_inputs | ||
├── omim_annotate | ||
├── phrank | ||
├── predict_new | ||
├── var_tier | ||
└── vep | ||
``` | ||
|
||
The testdata directory should include the subdirectory named `phenopackets` - which should contain phenopackets and `vcf` - which should contain the gzipped VCF files. | ||
|
||
e.g., | ||
|
||
```tree | ||
├── testdata_dir | ||
├── phenopackets | ||
└── vcf | ||
``` | ||
# Run command | ||
|
||
```bash | ||
pheval run --input-dir /path/to/input_dir \ | ||
--runner templatephevalrunner \ | ||
--runner aimarrvelrunner \ | ||
--output-dir /path/to/output_dir \ | ||
--testdata-dir /path/to/testdata_dir | ||
``` | ||
|
||
# Benchmark | ||
|
||
You can benchmark the run with the `pheval-utils benchmark` command: | ||
|
||
```bash | ||
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. | ||
``` |