Skip to content

Commit

Permalink
Deployed 7dfce61 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Dec 12, 2023
1 parent fc59c51 commit abaa35a
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 89 deletions.
4 changes: 2 additions & 2 deletions python_api/dataset/l2g_gold_standard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2794,7 +2794,7 @@ <h2 id="otg.dataset.l2g_gold_standard.L2GGoldStandard" class="doc doc-heading">

<span class="k">return</span> <span class="p">(</span>
<span class="n">OpenTargetsL2GGoldStandard</span><span class="o">.</span><span class="n">as_l2g_gold_standard</span><span class="p">(</span><span class="n">gold_standard_curation</span><span class="p">,</span> <span class="n">v2g</span><span class="p">)</span>
<span class="o">.</span><span class="n">filter_unique_associations</span><span class="p">(</span><span class="n">study_locus_overlap</span><span class="p">)</span>
<span class="c1"># .filter_unique_associations(study_locus_overlap)</span>
<span class="o">.</span><span class="n">remove_false_negatives</span><span class="p">(</span><span class="n">interactions_df</span><span class="p">)</span>
<span class="p">)</span>

Expand Down Expand Up @@ -3293,7 +3293,7 @@ <h3 id="otg.dataset.l2g_gold_standard.L2GGoldStandard.from_otg_curation" class="

<span class="k">return</span> <span class="p">(</span>
<span class="n">OpenTargetsL2GGoldStandard</span><span class="o">.</span><span class="n">as_l2g_gold_standard</span><span class="p">(</span><span class="n">gold_standard_curation</span><span class="p">,</span> <span class="n">v2g</span><span class="p">)</span>
<span class="o">.</span><span class="n">filter_unique_associations</span><span class="p">(</span><span class="n">study_locus_overlap</span><span class="p">)</span>
<span class="c1"># .filter_unique_associations(study_locus_overlap)</span>
<span class="o">.</span><span class="n">remove_false_negatives</span><span class="p">(</span><span class="n">interactions_df</span><span class="p">)</span>
<span class="p">)</span>
</code></pre></div></td></tr></table></div>
Expand Down
10 changes: 1 addition & 9 deletions python_api/method/l2g/_l2g/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2406,15 +2406,7 @@ <h1>L2g</h1>
<span class="label"> Contributors </span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors"><li>
<a
href="https://github.com/ireneisdoomed"
title="ireneisdoomed"
data-bi-name="contributorprofile"
target="_blank"
><img src="https://avatars.githubusercontent.com/u/45119610?v=4" alt="ireneisdoomed"
/></a>
</li></ul>
<ul class="contributors" data-bi-name="contributors"></ul>
</li>
</ul>
</small>
Expand Down
10 changes: 1 addition & 9 deletions python_api/method/l2g/evaluator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3382,15 +3382,7 @@ <h3 id="otg.method.l2g.evaluator.WandbEvaluator.setspark_ml_evaluator" class="do
<span class="label"> Contributors </span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors"><li>
<a
href="https://github.com/ireneisdoomed"
title="ireneisdoomed"
data-bi-name="contributorprofile"
target="_blank"
><img src="https://avatars.githubusercontent.com/u/45119610?v=4" alt="ireneisdoomed"
/></a>
</li></ul>
<ul class="contributors" data-bi-name="contributors"></ul>
</li>
</ul>
</small>
Expand Down
18 changes: 1 addition & 17 deletions python_api/method/l2g/feature_factory/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2995,23 +2995,7 @@ <h2 id="otg.method.l2g.feature_factory.StudyLocusFactory" class="doc doc-heading
<span class="label"> Contributors </span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors"><li>
<a
href="https://github.com/d0choa"
title="d0choa"
data-bi-name="contributorprofile"
target="_blank"
><img src="https://avatars.githubusercontent.com/u/5097586?v=4" alt="d0choa"
/></a>
</li><li>
<a
href="https://github.com/ireneisdoomed"
title="ireneisdoomed"
data-bi-name="contributorprofile"
target="_blank"
><img src="https://avatars.githubusercontent.com/u/45119610?v=4" alt="ireneisdoomed"
/></a>
</li></ul>
<ul class="contributors" data-bi-name="contributors"></ul>
</li>
</ul>
</small>
Expand Down
16 changes: 4 additions & 12 deletions python_api/method/l2g/model/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3089,7 +3089,7 @@ <h2 id="otg.method.l2g.model.LocusToGeneModel" class="doc doc-heading">
<span class="n">hyperparameters</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">],</span>
<span class="n">wandb_run_name</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Perform evaluation of the model by applying it to a test set and tracking the results with W&amp;B.</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Perform evaluation of the model predictions for the test set and track the results with W&amp;B.</span>

<span class="sd"> Args:</span>
<span class="sd"> results (DataFrame): Dataframe containing the predictions</span>
Expand Down Expand Up @@ -3386,7 +3386,7 @@ <h3 id="otg.method.l2g.model.LocusToGeneModel.evaluate" class="doc doc-heading">

<div class="doc doc-contents ">

<p>Perform evaluation of the model by applying it to a test set and tracking the results with W&amp;B.</p>
<p>Perform evaluation of the model predictions for the test set and track the results with W&amp;B.</p>



Expand Down Expand Up @@ -3505,7 +3505,7 @@ <h3 id="otg.method.l2g.model.LocusToGeneModel.evaluate" class="doc doc-heading">
<span class="n">hyperparameters</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">],</span>
<span class="n">wandb_run_name</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Perform evaluation of the model by applying it to a test set and tracking the results with W&amp;B.</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Perform evaluation of the model predictions for the test set and track the results with W&amp;B.</span>

<span class="sd"> Args:</span>
<span class="sd"> results (DataFrame): Dataframe containing the predictions</span>
Expand Down Expand Up @@ -4455,15 +4455,7 @@ <h3 id="otg.method.l2g.model.LocusToGeneModel.save" class="doc doc-heading">
<span class="label"> Contributors </span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors"><li>
<a
href="https://github.com/ireneisdoomed"
title="ireneisdoomed"
data-bi-name="contributorprofile"
target="_blank"
><img src="https://avatars.githubusercontent.com/u/45119610?v=4" alt="ireneisdoomed"
/></a>
</li></ul>
<ul class="contributors" data-bi-name="contributors"></ul>
</li>
</ul>
</small>
Expand Down
10 changes: 1 addition & 9 deletions python_api/method/ld_annotator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3038,15 +3038,7 @@ <h3 id="otg.method.ld.LDAnnotator.ld_annotate" class="doc doc-heading">
<span class="label"> Contributors </span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors"><li>
<a
href="https://github.com/d0choa"
title="d0choa"
data-bi-name="contributorprofile"
target="_blank"
><img src="https://avatars.githubusercontent.com/u/5097586?v=4" alt="d0choa"
/></a>
</li></ul>
<ul class="contributors" data-bi-name="contributors"></ul>
</li>
</ul>
</small>
Expand Down
10 changes: 1 addition & 9 deletions python_api/method/pics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3229,15 +3229,7 @@ <h3 id="otg.method.pics.PICS.finemap" class="doc doc-heading">
<span class="label"> Contributors </span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors"><li>
<a
href="https://github.com/d0choa"
title="d0choa"
data-bi-name="contributorprofile"
target="_blank"
><img src="https://avatars.githubusercontent.com/u/5097586?v=4" alt="d0choa"
/></a>
</li></ul>
<ul class="contributors" data-bi-name="contributors"></ul>
</li>
</ul>
</small>
Expand Down
10 changes: 1 addition & 9 deletions python_api/method/window_based_clumping/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3792,15 +3792,7 @@ <h3 id="otg.method.window_based_clumping.WindowBasedClumping.clump_with_locus" c
<span class="label"> Contributors </span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors"><li>
<a
href="https://github.com/d0choa"
title="d0choa"
data-bi-name="contributorprofile"
target="_blank"
><img src="https://avatars.githubusercontent.com/u/5097586?v=4" alt="d0choa"
/></a>
</li></ul>
<ul class="contributors" data-bi-name="contributors"></ul>
</li>
</ul>
</small>
Expand Down
26 changes: 18 additions & 8 deletions python_api/step/l2g/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2651,8 +2651,7 @@ <h2 id="otg.l2g.LocusToGeneStep" class="doc doc-heading">

<details class="quote">
<summary>Source code in <code>src/otg/l2g.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 25</span>
<span class="normal"> 26</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 26</span>
<span class="normal"> 27</span>
<span class="normal"> 28</span>
<span class="normal"> 29</span>
Expand Down Expand Up @@ -2828,7 +2827,13 @@ <h2 id="otg.l2g.LocusToGeneStep" class="doc doc-heading">
<span class="normal">199</span>
<span class="normal">200</span>
<span class="normal">201</span>
<span class="normal">202</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@dataclass</span>
<span class="normal">202</span>
<span class="normal">203</span>
<span class="normal">204</span>
<span class="normal">205</span>
<span class="normal">206</span>
<span class="normal">207</span>
<span class="normal">208</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@dataclass</span>
<span class="k">class</span> <span class="nc">LocusToGeneStep</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Locus to gene step.</span>

Expand Down Expand Up @@ -2920,7 +2925,9 @@ <h2 id="otg.l2g.LocusToGeneStep" class="doc doc-heading">
<span class="n">credible_set</span> <span class="o">=</span> <span class="n">StudyLocus</span><span class="o">.</span><span class="n">from_parquet</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">credible_set_path</span><span class="p">,</span> <span class="n">recursiveFileLookup</span><span class="o">=</span><span class="kc">True</span>
<span class="p">)</span>
<span class="n">studies</span> <span class="o">=</span> <span class="n">StudyIndex</span><span class="o">.</span><span class="n">from_parquet</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">study_index_path</span><span class="p">)</span>
<span class="n">studies</span> <span class="o">=</span> <span class="n">StudyIndex</span><span class="o">.</span><span class="n">from_parquet</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">study_index_path</span><span class="p">,</span> <span class="n">recursiveFileLookup</span><span class="o">=</span><span class="kc">True</span>
<span class="p">)</span>
<span class="n">v2g</span> <span class="o">=</span> <span class="n">V2G</span><span class="o">.</span><span class="n">from_parquet</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">variant_gene_path</span><span class="p">)</span>
<span class="c1"># coloc = Colocalisation.from_parquet(self.session, self.colocalisation_path) # TODO: run step</span>

Expand Down Expand Up @@ -2948,8 +2955,12 @@ <h2 id="otg.l2g.LocusToGeneStep" class="doc doc-heading">

<span class="c1"># Join and fill null values with 0</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">L2GFeatureMatrix</span><span class="p">(</span>
<span class="n">_df</span><span class="o">=</span><span class="n">gold_standards</span><span class="o">.</span><span class="n">df</span><span class="o">.</span><span class="n">drop</span><span class="p">(</span><span class="s2">&quot;sources&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
<span class="n">fm</span><span class="o">.</span><span class="n">df</span><span class="p">,</span> <span class="n">on</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;studyLocusId&quot;</span><span class="p">,</span> <span class="s2">&quot;geneId&quot;</span><span class="p">],</span> <span class="n">how</span><span class="o">=</span><span class="s2">&quot;inner&quot;</span>
<span class="n">_df</span><span class="o">=</span><span class="n">fm</span><span class="o">.</span><span class="n">df</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
<span class="n">f</span><span class="o">.</span><span class="n">broadcast</span><span class="p">(</span>
<span class="n">gold_standards</span><span class="o">.</span><span class="n">df</span><span class="o">.</span><span class="n">drop</span><span class="p">(</span><span class="s2">&quot;variantId&quot;</span><span class="p">,</span> <span class="s2">&quot;studyId&quot;</span><span class="p">,</span> <span class="s2">&quot;sources&quot;</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">on</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;studyLocusId&quot;</span><span class="p">,</span> <span class="s2">&quot;geneId&quot;</span><span class="p">],</span>
<span class="n">how</span><span class="o">=</span><span class="s2">&quot;inner&quot;</span><span class="p">,</span>
<span class="p">),</span>
<span class="n">_schema</span><span class="o">=</span><span class="n">L2GFeatureMatrix</span><span class="o">.</span><span class="n">get_schema</span><span class="p">(),</span>
<span class="p">)</span><span class="o">.</span><span class="n">fill_na</span><span class="p">()</span>
Expand All @@ -2974,7 +2985,7 @@ <h2 id="otg.l2g.LocusToGeneStep" class="doc doc-heading">
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Train model</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">LocusToGeneTrainer</span><span class="o">.</span><span class="n">train</span><span class="p">(</span>
<span class="n">LocusToGeneTrainer</span><span class="o">.</span><span class="n">train</span><span class="p">(</span>
<span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span>
<span class="n">l2g_model</span><span class="o">=</span><span class="n">l2g_model</span><span class="p">,</span>
<span class="n">features_list</span><span class="o">=</span><span class="nb">list</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">features_list</span><span class="p">),</span>
Expand All @@ -2983,7 +2994,6 @@ <h2 id="otg.l2g.LocusToGeneStep" class="doc doc-heading">
<span class="n">wandb_run_name</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">wandb_run_name</span><span class="p">,</span>
<span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">hyperparameters</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">model</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">model_path</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Finished L2G step. L2G model saved to </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">model_path</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="p">)</span>
Expand Down
Loading

0 comments on commit abaa35a

Please sign in to comment.