Skip to content

Commit

Permalink
deploy: b49543a
Browse files Browse the repository at this point in the history
  • Loading branch information
jordibc committed Nov 8, 2023
1 parent 2c4f479 commit 6c07c8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions _modules/ete4/ncbi_taxonomy/ncbiquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ <h1>Source code for ete4.ncbi_taxonomy.ncbiquery</h1><div class="highlight"><pre
<span class="n">taxids</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span>
<span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">t</span><span class="o">.</span><span class="n">traverse</span><span class="p">():</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">tid</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">taxid_attr</span><span class="p">))</span>
<span class="n">tid</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">taxid_attr</span><span class="p">,</span> <span class="n">n</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">taxid_attr</span><span class="p">)))</span>
<span class="k">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">AttributeError</span><span class="p">,</span> <span class="ne">TypeError</span><span class="p">):</span>
<span class="k">pass</span>
<span class="k">else</span><span class="p">:</span>
Expand All @@ -574,21 +574,21 @@ <h1>Source code for ete4.ncbi_taxonomy.ncbiquery</h1><div class="highlight"><pre

<span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">t</span><span class="o">.</span><span class="n">traverse</span><span class="p">(</span><span class="s1">&#39;postorder&#39;</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">node_taxid</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">taxid_attr</span><span class="p">))</span>
<span class="n">node_taxid</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">taxid_attr</span><span class="p">,</span> <span class="n">n</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">taxid_attr</span><span class="p">)))</span>
<span class="k">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">AttributeError</span><span class="p">,</span> <span class="ne">TypeError</span><span class="p">):</span>
<span class="n">node_taxid</span> <span class="o">=</span> <span class="kc">None</span>

<span class="n">n</span><span class="o">.</span><span class="n">add_prop</span><span class="p">(</span><span class="s1">&#39;taxid&#39;</span><span class="p">,</span> <span class="n">node_taxid</span><span class="p">)</span>
<span class="k">if</span> <span class="n">node_taxid</span><span class="p">:</span>
<span class="k">if</span> <span class="n">node_taxid</span> <span class="ow">in</span> <span class="n">merged_conversion</span><span class="p">:</span>
<span class="n">node_taxid</span> <span class="o">=</span> <span class="n">merged_conversion</span><span class="p">[</span><span class="n">node_taxid</span><span class="p">]</span>
<span class="n">n</span><span class="o">.</span><span class="n">add_props</span><span class="p">(</span><span class="n">sci_name</span> <span class="o">=</span> <span class="n">tax2name</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">node_taxid</span><span class="p">,</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">taxid_attr</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">)),</span>
<span class="n">n</span><span class="o">.</span><span class="n">add_props</span><span class="p">(</span><span class="n">sci_name</span> <span class="o">=</span> <span class="n">tax2name</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">node_taxid</span><span class="p">,</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">taxid_attr</span><span class="p">,</span> <span class="n">n</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">taxid_attr</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))),</span>
<span class="n">common_name</span> <span class="o">=</span> <span class="n">tax2common_name</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">node_taxid</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">),</span>
<span class="n">lineage</span> <span class="o">=</span> <span class="n">tax2track</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">node_taxid</span><span class="p">,</span> <span class="p">[]),</span>
<span class="n">rank</span> <span class="o">=</span> <span class="n">tax2rank</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">node_taxid</span><span class="p">,</span> <span class="s1">&#39;Unknown&#39;</span><span class="p">),</span>
<span class="n">named_lineage</span> <span class="o">=</span> <span class="p">[</span><span class="n">tax2name</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">tax</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">tax</span><span class="p">))</span> <span class="k">for</span> <span class="n">tax</span> <span class="ow">in</span> <span class="n">tax2track</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">node_taxid</span><span class="p">,</span> <span class="p">[])])</span>
<span class="k">elif</span> <span class="n">n</span><span class="o">.</span><span class="n">is_leaf</span><span class="p">:</span>
<span class="n">n</span><span class="o">.</span><span class="n">add_props</span><span class="p">(</span><span class="n">sci_name</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">taxid_attr</span><span class="p">,</span> <span class="s1">&#39;NA&#39;</span><span class="p">),</span>
<span class="n">n</span><span class="o">.</span><span class="n">add_props</span><span class="p">(</span><span class="n">sci_name</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">taxid_attr</span><span class="p">,</span> <span class="n">n</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">taxid_attr</span><span class="p">,</span> <span class="s1">&#39;NA&#39;</span><span class="p">)),</span>
<span class="n">common_name</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="p">,</span>
<span class="n">lineage</span> <span class="o">=</span> <span class="p">[],</span>
<span class="n">rank</span> <span class="o">=</span> <span class="s1">&#39;Unknown&#39;</span><span class="p">,</span>
Expand Down
2 changes: 1 addition & 1 deletion reference/reference_smartview.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h1><a class="toc-backref" href="#id1" role="doc-backlink">Smartview (web graphi

<dl class="py class">
<dt class="sig sig-object py" id="ete4.smartview.gui.server.TreeData">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TreeData</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tree:</span> <span class="pre">ete4.core.tree.Tree</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name:</span> <span class="pre">str</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">style:</span> <span class="pre">ete4.smartview.renderer.treestyle.TreeStyle</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nodestyles:</span> <span class="pre">dict</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">include_props:</span> <span class="pre">list</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_props:</span> <span class="pre">list</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">layouts:</span> <span class="pre">list</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timer:</span> <span class="pre">float</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ultrametric:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">initialized:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">selected:</span> <span class="pre">dict</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">active:</span> <span class="pre">&lt;function</span> <span class="pre">namedtuple</span> <span class="pre">at</span> <span class="pre">0x7ff22ef47e20&gt;</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">searches:</span> <span class="pre">dict</span> <span class="pre">=</span> <span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ete4/smartview/gui/server.html#TreeData"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#ete4.smartview.gui.server.TreeData" title="Link to this definition"></a></dt>
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TreeData</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tree:</span> <span class="pre">ete4.core.tree.Tree</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name:</span> <span class="pre">str</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">style:</span> <span class="pre">ete4.smartview.renderer.treestyle.TreeStyle</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nodestyles:</span> <span class="pre">dict</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">include_props:</span> <span class="pre">list</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_props:</span> <span class="pre">list</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">layouts:</span> <span class="pre">list</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timer:</span> <span class="pre">float</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ultrametric:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">initialized:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">selected:</span> <span class="pre">dict</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">active:</span> <span class="pre">&lt;function</span> <span class="pre">namedtuple</span> <span class="pre">at</span> <span class="pre">0x7f9dac547e20&gt;</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">searches:</span> <span class="pre">dict</span> <span class="pre">=</span> <span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ete4/smartview/gui/server.html#TreeData"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#ete4.smartview.gui.server.TreeData" title="Link to this definition"></a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="ete4.smartview.gui.server.TreeData.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tree</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="reference_tree.html#ete4.Tree" title="ete4.core.tree.Tree"><span class="pre">Tree</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">style</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#ete4.smartview.renderer.treestyle.TreeStyle" title="ete4.smartview.renderer.treestyle.TreeStyle"><span class="pre">TreeStyle</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nodestyles</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">include_props</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_props</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">layouts</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timer</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ultrametric</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">initialized</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">selected</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">active</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">namedtuple</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">searches</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#ete4.smartview.gui.server.TreeData.__init__" title="Link to this definition"></a></dt>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 6c07c8e

Please sign in to comment.