Skip to content

Commit

Permalink
Deploying to gh-pages from @ af598eb 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
yaseminbridges committed Jan 20, 2025
1 parent 2860379 commit c8c804e
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 99 deletions.
79 changes: 25 additions & 54 deletions developing_a_pheval_plugin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1138,13 +1138,6 @@
Install dependencies
</a>

</li>

<li class="md-nav__item">
<a href="#add-pheval-dependency" class="md-nav__link">
Add PhEval dependency
</a>

</li>

<li class="md-nav__item">
Expand All @@ -1167,18 +1160,11 @@
</li>

<li class="md-nav__item">
<a href="#4-add-pheval-plugins-section-to-the-pyprojecttoml-file" class="md-nav__link">
4. Add PhEval Plugins section to the pyproject.toml file
</a>

</li>

<li class="md-nav__item">
<a href="#5-implementing-pheval-helper-methods" class="md-nav__link">
5. Implementing PhEval helper methods
<a href="#4-implementing-pheval-helper-methods" class="md-nav__link">
4. Implementing PhEval helper methods
</a>

<nav class="md-nav" aria-label="5. Implementing PhEval helper methods">
<nav class="md-nav" aria-label="4. Implementing PhEval helper methods">
<ul class="md-nav__list">

<li class="md-nav__item">
Expand Down Expand Up @@ -1443,13 +1429,6 @@
Install dependencies
</a>

</li>

<li class="md-nav__item">
<a href="#add-pheval-dependency" class="md-nav__link">
Add PhEval dependency
</a>

</li>

<li class="md-nav__item">
Expand All @@ -1472,18 +1451,11 @@
</li>

<li class="md-nav__item">
<a href="#4-add-pheval-plugins-section-to-the-pyprojecttoml-file" class="md-nav__link">
4. Add PhEval Plugins section to the pyproject.toml file
</a>

</li>

<li class="md-nav__item">
<a href="#5-implementing-pheval-helper-methods" class="md-nav__link">
5. Implementing PhEval helper methods
<a href="#4-implementing-pheval-helper-methods" class="md-nav__link">
4. Implementing PhEval helper methods
</a>

<nav class="md-nav" aria-label="5. Implementing PhEval helper methods">
<nav class="md-nav" aria-label="4. Implementing PhEval helper methods">
<ul class="md-nav__list">

<li class="md-nav__item">
Expand Down Expand Up @@ -1868,7 +1840,7 @@ <h2 id="description">Description</h2>
</div><hr />
<h2 id="step-by-step-plugin-development-process">Step-by-Step Plugin Development Process</h2>
<p>The plugin structure is derived from a <a href="https://cookiecutter.readthedocs.io/en/stable/">cookiecutter</a> template, <a href="https://github.com/hrshdhgd/sphintoxetry-cookiecutter">Sphintoxetry-cookiecutter</a>, and it uses <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a>, <a href="https://tox.wiki/en/latest/">tox</a> and <a href="https://python-poetry.org">poetry</a> as core dependencies.
This allows PhEval extensibility to be standardized in terms of documentation and dependency management.</p>
This allows PhEval extensibility to be standardised in terms of documentation and dependency management.</p>
<h3 id="1-sphintoxetry-cookiecutter-scaffold">1. Sphintoxetry-cookiecutter scaffold</h3>
<p>First, install the cruft package. Cruft enables keeping projects up-to-date with future updates made to this original template.</p>
<p>Install the latest release of cruft from pip</p>
Expand All @@ -1878,7 +1850,7 @@ <h3 id="1-sphintoxetry-cookiecutter-scaffold">1. Sphintoxetry-cookiecutter scaff
<p><strong><em>NOTE:</em></strong> You may encounter an error with the naming of the project layout if using an older release of cruft. To avoid this, make sure you have installed the latest release version.</p>
</blockquote>
<p>Next, create a project using the sphintoxetry-cookiecutter template.</p>
<div class="highlight"><pre><span></span><code>cruft create https://github.com/monarch-initiative/monarch-project-template
<div class="highlight"><pre><span></span><code>cruft create https://github.com/monarch-initiative/pheval-runner-template
</code></pre></div>
<h3 id="2-further-setup">2. Further setup</h3>
<h4 id="install-poetry-if-you-havent-already">Install poetry if you haven't already.</h4>
Expand All @@ -1887,25 +1859,22 @@ <h4 id="install-poetry-if-you-havent-already">Install poetry if you haven't alre
<h4 id="install-dependencies">Install dependencies</h4>
<div class="highlight"><pre><span></span><code>poetry install
</code></pre></div>
<h4 id="add-pheval-dependency">Add PhEval dependency</h4>
<div class="highlight"><pre><span></span><code>poetry add pheval
</code></pre></div>
<h4 id="run-tox-to-see-if-the-setup-works">Run tox to see if the setup works</h4>
<div class="highlight"><pre><span></span><code>poetry run tox
</code></pre></div>
<h3 id="3-implement-pheval-custom-runner">3. Implement PhEval Custom Runner</h3>
<p><em>The runner name is arbitrary and custom Runner name was chose by demonstrative purposes</em></p>
<p>Create a runner file inside the plugin project, e.g:</p>
<p><img alt="a" src="../imgs/plugin_example_folder_structure.png" /></p>
<div class="highlight"><pre><span></span><code><span class="sd">&quot;&quot;&quot;Custom Pheval Runner.&quot;&quot;&quot;</span>
<p>In the project structure generated by Cookiecutter, you'll find <code>runner.py</code> located in the <code>src</code> directory. This is where you'll define the methods required to develop the plugin. Specifically, you'll implement the prepare, run, and post-process methods, which are essential for executing the pheval run command.
<div class="highlight"><pre><span></span><code><span class="sd">&quot;&quot;&quot;Runner.&quot;&quot;&quot;</span>

<span class="kn">from</span> <span class="nn">dataclasses</span> <span class="kn">import</span> <span class="n">dataclass</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>

<span class="kn">from</span> <span class="nn">pheval.runners.runner</span> <span class="kn">import</span> <span class="n">PhEvalRunner</span>


<span class="nd">@dataclass</span>
<span class="k">class</span> <span class="nc">CustomPhevalRunner</span><span class="p">(</span><span class="n">PhEvalRunner</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;CustomPhevalRunner Class.&quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">CustomRunner</span><span class="p">(</span><span class="n">PhEvalRunner</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Runner class implementation.&quot;&quot;&quot;</span>

<span class="n">input_dir</span><span class="p">:</span> <span class="n">Path</span>
<span class="n">testdata_dir</span><span class="p">:</span> <span class="n">Path</span>
Expand All @@ -1915,23 +1884,25 @@ <h3 id="3-implement-pheval-custom-runner">3. Implement PhEval Custom Runner</h3>
<span class="n">version</span><span class="p">:</span> <span class="nb">str</span>

<span class="k">def</span> <span class="nf">prepare</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;prepare method.&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Prepare.&quot;&quot;&quot;</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;preparing&quot;</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;run method.&quot;&quot;&quot;</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;running with custom pheval runner&quot;</span><span class="p">)</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Run.&quot;&quot;&quot;</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;running&quot;</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">post_process</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;post_process method.&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Post Process.&quot;&quot;&quot;</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;post processing&quot;</span><span class="p">)</span>
</code></pre></div>
<h3 id="4-add-pheval-plugins-section-to-the-pyprojecttoml-file">4. Add PhEval Plugins section to the pyproject.toml file</h3>
</code></pre></div></p>
<p>The Cookiecutter will automatically populate the plugins section in the <code>pyproject.toml</code> file. If you decide to modify the path of <code>runner.py</code> or rename its class, be sure to update the corresponding entries in this section accordingly:</p>
<div class="highlight"><pre><span></span><code><span class="k">[tool.poetry.plugins.</span><span class="s2">&quot;pheval.plugins&quot;</span><span class="k">]</span>
<span class="n">customrunner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;pheval_plugin_example.runner:CustomPhevalRunner&quot;</span>
<span class="n">customrunner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;pheval_plugin_example.runner:CustomRunner&quot;</span>
</code></pre></div>
<p><mark>Replace the value above with the path to your custom runner plugin</mark></p>
<h3 id="5-implementing-pheval-helper-methods">5. Implementing PhEval helper methods</h3>
<blockquote>
<p>Please Note that the path here and naming of the class is case sensitive.</p>
</blockquote>
<h3 id="4-implementing-pheval-helper-methods">4. Implementing PhEval helper methods</h3>
<p>Streamlining the creation of your custom PhEval runner can be facilitated by leveraging PhEval's versatile helper methods, where applicable.</p>
<p>Within PhEval, numerous public methods have been designed to assist in your runner methods. The utilisation of these helper methods is optional, yet they are crafted to enhance the overall implementation process.</p>
<h4 id="utility-methods">Utility methods</h4>
Expand Down
Binary file removed imgs/plugin_example_folder_structure.png
Binary file not shown.
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

88 changes: 44 additions & 44 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,178 +2,178 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://monarch-initiative.github.io/pheval/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/CODE_OF_CONDUCT/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/about/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/contact/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/contributing/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/developing_a_pheval_plugin/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/executing_a_benchmark/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/exomiser_pipeline/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/pipeline/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/plugins/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/roadmap/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/styleguide/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/cli/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/config_parser/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/run_metadata/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/analysis/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/assess_prioritisation_base/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/benchmark_db_manager/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/benchmark_generator/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/benchmarking_data/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/binary_classification_stats/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/disease_prioritisation_analysis/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/gene_prioritisation_analysis/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/generate_plots/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/generate_summary_outputs/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/parse_benchmark_summary/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/parse_corpus/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/prioritisation_result_types/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/rank_stats/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/run_data_parser/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/analyse/variant_prioritisation_analysis/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/infra/exomiserdb/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/post_processing/post_processing/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/prepare/create_noisy_phenopackets/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/prepare/create_spiked_vcf/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/prepare/custom_exceptions/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/prepare/prepare_corpus/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/prepare/update_phenopacket/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/runners/runner/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/utils/exomiser/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/utils/file_utils/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/utils/phenopacket_utils/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/utils/semsim_utils/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
<url>
<loc>https://monarch-initiative.github.io/pheval/api/pheval/utils/utils/</loc>
<lastmod>2025-01-16</lastmod>
<lastmod>2025-01-20</lastmod>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit c8c804e

Please sign in to comment.