Skip to content

Commit

Permalink
Deploying to gh-pages from @ f1702e5 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera committed Nov 10, 2024
1 parent c38b2a2 commit 9bc968d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
8 changes: 5 additions & 3 deletions _modules/pydna/amplify.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,18 +422,20 @@ <h1>Source code for pydna.amplify</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">template</span><span class="o">.</span><span class="n">circular</span><span class="p">:</span>
<span class="n">shift</span> <span class="o">=</span> <span class="n">fp</span><span class="o">.</span><span class="n">position</span> <span class="o">-</span> <span class="n">fp</span><span class="o">.</span><span class="n">_fp</span>
<span class="n">tpl</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">template</span><span class="o">.</span><span class="n">shifted</span><span class="p">(</span><span class="n">shift</span><span class="p">)</span> <span class="c1"># shift template so that it starts where the fp starts anneling</span>
<span class="n">feats</span> <span class="o">=</span> <span class="n">tpl</span><span class="p">[:</span> <span class="n">rp</span><span class="o">.</span><span class="n">position</span> <span class="o">+</span> <span class="n">rp</span><span class="o">.</span><span class="n">_fp</span><span class="p">]</span><span class="o">.</span><span class="n">features</span>
<span class="n">fp</span><span class="o">.</span><span class="n">position</span> <span class="o">=</span> <span class="n">fp</span><span class="o">.</span><span class="n">_fp</span> <span class="c1"># New position of fp becomes the footprint length</span>
<span class="n">rp</span><span class="o">.</span><span class="n">position</span> <span class="o">=</span> <span class="p">(</span><span class="n">rp</span><span class="o">.</span><span class="n">position</span> <span class="o">-</span> <span class="n">shift</span><span class="p">)</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">template</span><span class="p">)</span> <span class="c1"># Shift the rp position as well</span>
<span class="n">feats</span> <span class="o">=</span> <span class="n">tpl</span><span class="p">[:</span> <span class="n">rp</span><span class="o">.</span><span class="n">position</span> <span class="o">+</span> <span class="n">rp</span><span class="o">.</span><span class="n">_fp</span><span class="p">]</span><span class="o">.</span><span class="n">features</span>
<span class="k">elif</span> <span class="n">fp</span><span class="o">.</span><span class="n">position</span> <span class="o">&lt;=</span> <span class="n">rp</span><span class="o">.</span><span class="n">position</span><span class="p">:</span> <span class="c1"># pcr products only formed if fp anneals forward of rp</span>
<span class="n">feats</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">template</span><span class="p">[</span>
<span class="n">fp</span><span class="o">.</span><span class="n">position</span> <span class="o">-</span> <span class="n">fp</span><span class="o">.</span><span class="n">_fp</span> <span class="p">:</span> <span class="n">rp</span><span class="o">.</span><span class="n">position</span> <span class="o">+</span> <span class="n">rp</span><span class="o">.</span><span class="n">_fp</span>
<span class="p">]</span><span class="o">.</span><span class="n">features</span> <span class="c1"># Save features covered by primers</span>
<span class="n">shift_amount</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">fp</span><span class="o">.</span><span class="n">tail</span><span class="p">)</span>
<span class="n">feats</span> <span class="o">=</span> <span class="p">[</span><span class="n">_shift_feature</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">shift_amount</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">feats</span><span class="p">]</span>
<span class="n">tpl</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">template</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">continue</span>
<span class="c1"># Shift features to the right if there was a tail</span>
<span class="n">shift_amount</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">fp</span><span class="o">.</span><span class="n">tail</span><span class="p">)</span>
<span class="n">feats</span> <span class="o">=</span> <span class="p">[</span><span class="n">_shift_feature</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">shift_amount</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">feats</span><span class="p">]</span>

<span class="k">if</span> <span class="n">tpl</span><span class="o">.</span><span class="n">circular</span> <span class="ow">and</span> <span class="n">fp</span><span class="o">.</span><span class="n">position</span> <span class="o">==</span> <span class="n">rp</span><span class="o">.</span><span class="n">position</span><span class="p">:</span>
<span class="n">prd</span> <span class="o">=</span> <span class="n">_Dseqrecord</span><span class="p">(</span><span class="n">fp</span><span class="p">)</span> <span class="o">+</span> <span class="n">_Dseqrecord</span><span class="p">(</span><span class="n">rp</span><span class="p">)</span><span class="o">.</span><span class="n">reverse_complement</span><span class="p">()</span>
<span class="k">else</span><span class="p">:</span>
Expand Down
3 changes: 2 additions & 1 deletion _modules/pydna/tm.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ <h1>Source code for pydna.tm</h1><div class="highlight"><pre>

<span class="kn">import</span> <span class="nn">textwrap</span> <span class="k">as</span> <span class="nn">_textwrap</span>
<span class="kn">from</span> <span class="nn">pydna._pretty</span> <span class="kn">import</span> <span class="n">pretty_str</span> <span class="k">as</span> <span class="n">_pretty_str</span>
<span class="kn">import</span> <span class="nn">requests</span>

<span class="c1"># See the documentation for Bio.SeqUtils.MeltingTemp for more details</span>
<span class="c1"># The 10X Taq Buffer with (NH4)2SO4 is commercialized by companies like</span>
Expand Down Expand Up @@ -409,6 +408,8 @@ <h1>Source code for pydna.tm</h1><div class="highlight"><pre>


<div class="viewcode-block" id="tm_neb"><a class="viewcode-back" href="../../modules/pydna_tm.html#pydna.tm.tm_neb">[docs]</a><span class="k">def</span> <span class="nf">tm_neb</span><span class="p">(</span><span class="n">primer</span><span class="p">,</span> <span class="n">conc</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">prodcode</span><span class="o">=</span><span class="s2">&quot;q5-0&quot;</span><span class="p">):</span>
<span class="kn">import</span> <span class="nn">requests</span>

<span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates a single primers melting temp from NEB.</span>

<span class="sd"> Parameters</span>
Expand Down
18 changes: 1 addition & 17 deletions modules/pydna_tm.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,7 @@
<dl class="py function">
<dt class="sig sig-object py" id="pydna.tm.tm_neb">
<span class="sig-prename descclassname"><span class="pre">pydna.tm.</span></span><span class="sig-name descname"><span class="pre">tm_neb</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">primer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">conc</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prodcode</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'q5-0'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pydna/tm.html#tm_neb"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydna.tm.tm_neb" title="Permalink to this definition"></a></dt>
<dd><p>Calculates a single primers melting temp from NEB.</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>primer1</strong> (<a class="reference external" href="https://docs.python.org/3.8/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – </p></li>
<li><p><strong>conc</strong> (<a class="reference external" href="https://docs.python.org/3.8/library/functions.html#float" title="(in Python v3.8)"><em>float</em></a>) – </p></li>
<li><p><strong>prodcode</strong> (<a class="reference external" href="https://docs.python.org/3.8/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – find product codes on nebswebsite: <a class="reference external" href="https://tmapi.neb.com/docs/productcodes">https://tmapi.neb.com/docs/productcodes</a></p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>tm</strong> – primer melting temperature</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.8/library/functions.html#int" title="(in Python v3.8)">int</a></p>
</dd>
</dl>
</dd></dl>
<dd></dd></dl>

</section>

Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 9bc968d

Please sign in to comment.