Skip to content

Commit

Permalink
Deployed 90a6b2f with MkDocs version: 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Starlitnightly committed Jun 10, 2024
1 parent c74b13b commit 7c808f8
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 75 deletions.
50 changes: 25 additions & 25 deletions Developer_guild/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -591,33 +591,33 @@ <h2 id="framework">Framework<a class="headerlink" href="#framework" title="Perma
<p>The <code>__init__.py</code> file is responsible for importing function entries within each folder, and all function functions use a file starting with <code>_*.py</code> for function writing.</p>
<h2 id="for-developer">For Developer<a class="headerlink" href="#for-developer" title="Permanent link"></a></h2>
<p>If you want to provide pull request for omicverse, you need to be clear about which module the functionality you are developing is subordinate to, e.g. <code>TOSICA</code> belongs to the algorithms of the single-cell domain, i.e., you need to add the <code>_tosica.py</code> file inside the <code>single</code> folder of <code>omicverse</code> and <code>_init__.py</code> inside the <code>from . _tosica import pyTOSICA</code> to make the omicverse add the new functionality</p>
<div class="highlight"><pre><span></span><code><span class="linenos" data-linenos="1 "></span>.
<span class="linenos" data-linenos="2 "></span>├──<span class="w"> </span>omicverse<span class="w"> </span>
<span class="linenos" data-linenos="3 "></span>├─────<span class="w"> </span>single
<span class="linenos" data-linenos="4 "></span>├────────<span class="w"> </span>__init__.py<span class="w"> </span>
<span class="linenos" data-linenos="5 "></span>├────────<span class="w"> </span>_tosica.py<span class="w"> </span>
<div class="highlight"><pre><span></span><code>.
├──<span class="w"> </span>omicverse<span class="w"> </span>
├─────<span class="w"> </span>single
├────────<span class="w"> </span>__init__.py<span class="w"> </span>
├────────<span class="w"> </span>_tosica.py<span class="w"> </span>
</code></pre></div>
<p>All functions require parameter descriptions in the following format:</p>
<div class="highlight"><pre><span></span><code><span class="linenos" data-linenos=" 1 "></span><span class="k">def</span> <span class="nf">preprocess</span><span class="p">(</span><span class="n">adata</span><span class="p">:</span><span class="n">anndata</span><span class="o">.</span><span class="n">AnnData</span><span class="p">,</span> <span class="n">mode</span><span class="p">:</span><span class="nb">str</span><span class="o">=</span><span class="s1">'scanpy'</span><span class="p">,</span> <span class="n">target_sum</span><span class="p">:</span><span class="nb">int</span><span class="o">=</span><span class="mi">50</span><span class="o">*</span><span class="mf">1e4</span><span class="p">,</span> <span class="n">n_HVGs</span><span class="p">:</span><span class="nb">int</span><span class="o">=</span><span class="mi">2000</span><span class="p">,</span>
<span class="linenos" data-linenos=" 2 "></span> <span class="n">organism</span><span class="p">:</span><span class="nb">str</span><span class="o">=</span><span class="s1">'human'</span><span class="p">,</span> <span class="n">no_cc</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">anndata</span><span class="o">.</span><span class="n">AnnData</span><span class="p">:</span>
<span class="linenos" data-linenos=" 3 "></span><span class="w"> </span><span class="sd">"""</span>
<span class="linenos" data-linenos=" 4 "></span><span class="sd"> Preprocesses the AnnData object adata using either a scanpy or a pearson residuals workflow for size normalization</span>
<span class="linenos" data-linenos=" 5 "></span><span class="sd"> and highly variable genes (HVGs) selection, and calculates signature scores if necessary. </span>
<span class="linenos" data-linenos=" 6 "></span>
<span class="linenos" data-linenos=" 7 "></span><span class="sd"> Arguments:</span>
<span class="linenos" data-linenos=" 8 "></span><span class="sd"> adata: The data matrix.</span>
<span class="linenos" data-linenos=" 9 "></span><span class="sd"> mode: The mode for size normalization and HVGs selection. It can be either 'scanpy' or 'pearson'. If 'scanpy', performs size normalization using scanpy's normalize_total() function and selects HVGs </span>
<span class="linenos" data-linenos="10 "></span><span class="sd"> using pegasus' highly_variable_features() function with batch correction. If 'pearson', selects HVGs </span>
<span class="linenos" data-linenos="11 "></span><span class="sd"> using scanpy's experimental.pp.highly_variable_genes() function with pearson residuals method and performs </span>
<span class="linenos" data-linenos="12 "></span><span class="sd"> size normalization using scanpy's experimental.pp.normalize_pearson_residuals() function. </span>
<span class="linenos" data-linenos="13 "></span><span class="sd"> target_sum: The target total count after normalization.</span>
<span class="linenos" data-linenos="14 "></span><span class="sd"> n_HVGs: the number of HVGs to select.</span>
<span class="linenos" data-linenos="15 "></span><span class="sd"> organism: The organism of the data. It can be either 'human' or 'mouse'. </span>
<span class="linenos" data-linenos="16 "></span><span class="sd"> no_cc: Whether to remove cc-correlated genes from HVGs.</span>
<span class="linenos" data-linenos="17 "></span>
<span class="linenos" data-linenos="18 "></span><span class="sd"> Returns:</span>
<span class="linenos" data-linenos="19 "></span><span class="sd"> adata: The preprocessed data matrix. </span>
<span class="linenos" data-linenos="20 "></span><span class="sd"> """</span>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="nf">preprocess</span><span class="p">(</span><span class="n">adata</span><span class="p">:</span><span class="n">anndata</span><span class="o">.</span><span class="n">AnnData</span><span class="p">,</span> <span class="n">mode</span><span class="p">:</span><span class="nb">str</span><span class="o">=</span><span class="s1">'scanpy'</span><span class="p">,</span> <span class="n">target_sum</span><span class="p">:</span><span class="nb">int</span><span class="o">=</span><span class="mi">50</span><span class="o">*</span><span class="mf">1e4</span><span class="p">,</span> <span class="n">n_HVGs</span><span class="p">:</span><span class="nb">int</span><span class="o">=</span><span class="mi">2000</span><span class="p">,</span>
<span class="n">organism</span><span class="p">:</span><span class="nb">str</span><span class="o">=</span><span class="s1">'human'</span><span class="p">,</span> <span class="n">no_cc</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">anndata</span><span class="o">.</span><span class="n">AnnData</span><span class="p">:</span>
<span class="w"> </span><span class="sd">"""</span>
<span class="sd"> Preprocesses the AnnData object adata using either a scanpy or a pearson residuals workflow for size normalization</span>
<span class="sd"> and highly variable genes (HVGs) selection, and calculates signature scores if necessary. </span>

<span class="sd"> Arguments:</span>
<span class="sd"> adata: The data matrix.</span>
<span class="sd"> mode: The mode for size normalization and HVGs selection. It can be either 'scanpy' or 'pearson'. If 'scanpy', performs size normalization using scanpy's normalize_total() function and selects HVGs </span>
<span class="sd"> using pegasus' highly_variable_features() function with batch correction. If 'pearson', selects HVGs </span>
<span class="sd"> using scanpy's experimental.pp.highly_variable_genes() function with pearson residuals method and performs </span>
<span class="sd"> size normalization using scanpy's experimental.pp.normalize_pearson_residuals() function. </span>
<span class="sd"> target_sum: The target total count after normalization.</span>
<span class="sd"> n_HVGs: the number of HVGs to select.</span>
<span class="sd"> organism: The organism of the data. It can be either 'human' or 'mouse'. </span>
<span class="sd"> no_cc: Whether to remove cc-correlated genes from HVGs.</span>

<span class="sd"> Returns:</span>
<span class="sd"> adata: The preprocessed data matrix. </span>
<span class="sd"> """</span>
</code></pre></div>
<h2 id="pull-request">Pull request<a class="headerlink" href="#pull-request" title="Permanent link"></a></h2>
<ol>
Expand Down
Loading

0 comments on commit 7c808f8

Please sign in to comment.