Skip to content

Commit

Permalink
Deploying to gh-pages from @ 20c4304 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche committed Jan 2, 2024
1 parent 56a314d commit 07cc697
Show file tree
Hide file tree
Showing 19 changed files with 143 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 0c312cfbcd58d3a9be9515ea28f5bc23
config: 9b8e571a50650677b7f4446e64b24ac5
tags: 645f666f9bcd5a90fca523b33c5a78b7
57 changes: 53 additions & 4 deletions _modules/biocframe/BiocFrame.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />

<!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>biocframe.BiocFrame - BiocFrame 0.5.4 documentation</title>
<title>biocframe.BiocFrame - BiocFrame 0.5.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=36a5483c" />
Expand Down Expand Up @@ -122,7 +122,7 @@
</label>
</div>
<div class="header-center">
<a href="../../index.html"><div class="brand">BiocFrame 0.5.4 documentation</div></a>
<a href="../../index.html"><div class="brand">BiocFrame 0.5.5 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -145,7 +145,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">


<span class="sidebar-brand-text">BiocFrame 0.5.4 documentation</span>
<span class="sidebar-brand-text">BiocFrame 0.5.5 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -1397,6 +1397,55 @@ <h1>Source code for biocframe.BiocFrame</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__copy__</span><span class="p">()</span></div>


<span class="c1">##########################</span>
<span class="c1">######&gt;&gt; split by &lt;&lt;######</span>
<span class="c1">##########################</span>

<div class="viewcode-block" id="BiocFrame.split">
<a class="viewcode-back" href="../../api/biocframe.html#biocframe.BiocFrame.BiocFrame.split">[docs]</a>
<span class="k">def</span> <span class="nf">split</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">only_indices</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Union</span><span class="p">[</span><span class="s2">&quot;BiocFrame&quot;</span><span class="p">,</span> <span class="n">List</span><span class="p">[</span><span class="nb">int</span><span class="p">]]]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Split the object by a column.</span>

<span class="sd"> Args:</span>
<span class="sd"> group:</span>
<span class="sd"> Name of the column to split by.</span>

<span class="sd"> only_indices:</span>
<span class="sd"> Whether to only return indices.</span>
<span class="sd"> Defaults to False</span>

<span class="sd"> Returns:</span>
<span class="sd"> A dictionary of biocframe objects, with names representing the</span>
<span class="sd"> group and the value the sliced frames.</span>

<span class="sd"> if ``only_indices`` is True, the values contain the row indices</span>
<span class="sd"> that map to the same group.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">name</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_column_names</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2">&#39; is not a valid column name.&quot;</span><span class="p">)</span>

<span class="n">_column</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_column</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>

<span class="n">_grps</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="p">)):</span>
<span class="n">_key</span> <span class="o">=</span> <span class="n">_column</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
<span class="k">if</span> <span class="n">_key</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">_grps</span><span class="p">:</span>
<span class="n">_grps</span><span class="p">[</span><span class="n">_key</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>

<span class="n">_grps</span><span class="p">[</span><span class="n">_key</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>

<span class="k">if</span> <span class="n">only_indices</span> <span class="ow">is</span> <span class="kc">True</span><span class="p">:</span>
<span class="k">return</span> <span class="n">_grps</span>

<span class="n">_sliced_grps</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">_grps</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">_sliced_grps</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="p">[</span><span class="n">v</span><span class="p">,]</span>

<span class="k">return</span> <span class="n">_sliced_grps</span></div>


<span class="c1">################################</span>
<span class="c1">######&gt;&gt; pandas interop &lt;&lt;######</span>
<span class="c1">################################</span>
Expand Down Expand Up @@ -1952,7 +2001,7 @@ <h1>Source code for biocframe.BiocFrame</h1><div class="highlight"><pre>

</aside>
</div>
</div><script src="../../_static/documentation_options.js?v=e1a677a5"></script>
</div><script src="../../_static/documentation_options.js?v=45def3bc"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
8 changes: 4 additions & 4 deletions _modules/biocframe/io/from_pandas.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../../genindex.html" /><link rel="search" title="Search" href="../../../search.html" />

<!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>biocframe.io.from_pandas - BiocFrame 0.5.4 documentation</title>
<title>biocframe.io.from_pandas - BiocFrame 0.5.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../../../_static/styles/furo-extensions.css?v=36a5483c" />
Expand Down Expand Up @@ -122,7 +122,7 @@
</label>
</div>
<div class="header-center">
<a href="../../../index.html"><div class="brand">BiocFrame 0.5.4 documentation</div></a>
<a href="../../../index.html"><div class="brand">BiocFrame 0.5.5 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -145,7 +145,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../../index.html">


<span class="sidebar-brand-text">BiocFrame 0.5.4 documentation</span>
<span class="sidebar-brand-text">BiocFrame 0.5.5 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../../../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -246,7 +246,7 @@ <h1>Source code for biocframe.io.from_pandas</h1><div class="highlight"><pre>

</aside>
</div>
</div><script src="../../../_static/documentation_options.js?v=e1a677a5"></script>
</div><script src="../../../_static/documentation_options.js?v=45def3bc"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
8 changes: 4 additions & 4 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" />

<!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>Overview: module code - BiocFrame 0.5.4 documentation</title>
<title>Overview: module code - BiocFrame 0.5.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
Expand Down Expand Up @@ -122,7 +122,7 @@
</label>
</div>
<div class="header-center">
<a href="../index.html"><div class="brand">BiocFrame 0.5.4 documentation</div></a>
<a href="../index.html"><div class="brand">BiocFrame 0.5.5 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -145,7 +145,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html">


<span class="sidebar-brand-text">BiocFrame 0.5.4 documentation</span>
<span class="sidebar-brand-text">BiocFrame 0.5.5 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -234,7 +234,7 @@ <h1>All modules for which code is available</h1>

</aside>
</div>
</div><script src="../_static/documentation_options.js?v=e1a677a5"></script>
</div><script src="../_static/documentation_options.js?v=45def3bc"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
2 changes: 1 addition & 1 deletion _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '0.5.4',
VERSION: '0.5.5',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
34 changes: 30 additions & 4 deletions api/biocframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="biocframe.io package" href="biocframe.io.html" /><link rel="prev" title="biocframe" href="modules.html" />

<!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>biocframe package - BiocFrame 0.5.4 documentation</title>
<title>biocframe package - BiocFrame 0.5.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
Expand Down Expand Up @@ -123,7 +123,7 @@
</label>
</div>
<div class="header-center">
<a href="../index.html"><div class="brand">BiocFrame 0.5.4 documentation</div></a>
<a href="../index.html"><div class="brand">BiocFrame 0.5.5 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -146,7 +146,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html">


<span class="sidebar-brand-text">BiocFrame 0.5.4 documentation</span>
<span class="sidebar-brand-text">BiocFrame 0.5.5 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -888,6 +888,31 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="biocframe.BiocFrame.BiocFrame.split">
<span class="sig-name descname"><span class="pre">split</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">only_indices</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/biocframe/BiocFrame.html#BiocFrame.split"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#biocframe.BiocFrame.BiocFrame.split" title="Link to this definition">#</a></dt>
<dd><p>Split the object by a column.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>group</strong> – Name of the column to split by.</p></li>
<li><p><strong>only_indices</strong> (<span class="sphinx_autodoc_typehints-type"><a class="reference external" href="https://docs.python.org/3.9/library/functions.html#bool" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></span>) – Whether to only return indices.
Defaults to False</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><a class="reference external" href="https://docs.python.org/3.9/library/typing.html#typing.Dict" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code></a>[<a class="reference external" href="https://docs.python.org/3.9/library/stdtypes.html#str" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3.9/library/typing.html#typing.Union" title="(in Python v3.9)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code></a>[<a class="reference internal" href="#biocframe.BiocFrame.BiocFrame" title="biocframe.BiocFrame.BiocFrame"><code class="xref py py-class docutils literal notranslate"><span class="pre">BiocFrame</span></code></a>, <a class="reference external" href="https://docs.python.org/3.9/library/typing.html#typing.List" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3.9/library/functions.html#int" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>]]]</span></p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p><p>A dictionary of biocframe objects, with names representing the
group and the value the sliced frames.</p>
<p>if <code class="docutils literal notranslate"><span class="pre">only_indices</span></code> is True, the values contain the row indices
that map to the same group.</p>
</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="biocframe.BiocFrame.BiocFrame.to_pandas">
<span class="sig-name descname"><span class="pre">to_pandas</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/biocframe/BiocFrame.html#BiocFrame.to_pandas"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#biocframe.BiocFrame.BiocFrame.to_pandas" title="Link to this definition">#</a></dt>
Expand Down Expand Up @@ -1121,6 +1146,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<li><a class="reference internal" href="#biocframe.BiocFrame.BiocFrame.set_slice"><code class="docutils literal notranslate"><span class="pre">BiocFrame.set_slice()</span></code></a></li>
<li><a class="reference internal" href="#biocframe.BiocFrame.BiocFrame.shape"><code class="docutils literal notranslate"><span class="pre">BiocFrame.shape</span></code></a></li>
<li><a class="reference internal" href="#biocframe.BiocFrame.BiocFrame.slice"><code class="docutils literal notranslate"><span class="pre">BiocFrame.slice()</span></code></a></li>
<li><a class="reference internal" href="#biocframe.BiocFrame.BiocFrame.split"><code class="docutils literal notranslate"><span class="pre">BiocFrame.split()</span></code></a></li>
<li><a class="reference internal" href="#biocframe.BiocFrame.BiocFrame.to_pandas"><code class="docutils literal notranslate"><span class="pre">BiocFrame.to_pandas()</span></code></a></li>
</ul>
</li>
Expand All @@ -1147,7 +1173,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi

</aside>
</div>
</div><script src="../_static/documentation_options.js?v=e1a677a5"></script>
</div><script src="../_static/documentation_options.js?v=45def3bc"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
Loading

0 comments on commit 07cc697

Please sign in to comment.