Skip to content

Commit

Permalink
Merge branch 'dev_next'
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahHenrikKleinschmidt committed Apr 14, 2022
2 parents 02c8f56 + 20bab06 commit 6f42644
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 17 deletions.
73 changes: 60 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3180,7 +3180,7 @@ <h2 id="getting-started">Getting started</h2>
return dilution


def pipe( self, assay : Assay, remove_calibrators : bool = True ):
def pipe( self, assay : Assay, remove_calibrators : bool = True, ignore_uncalibrated : bool = False ):
&#34;&#34;&#34;
A wrapper for calibrate / assign.

Expand All @@ -3195,6 +3195,14 @@ <h2 id="getting-started">Getting started</h2>
remove_calibrators : bool
If calibrators are present in the assay alongside other groups,
remove the calibrator replicates after assignment or efficiency calculation.
ignore_uncalibrated : bool
If `True` assays that could neither be newly calibrated nor be assigned an existing
efficiency will be ignored. Otherwise, and error will be raised.

Returns
-------
assay : qpcr.Assay
The now calibrated `qpcr.Assay`.
&#34;&#34;&#34;
if self._eff_dict != {}:
# first try to assign (will leave the assay unchanged if nothing is found)
Expand All @@ -3205,13 +3213,18 @@ <h2 id="getting-started">Getting started</h2>
try:
assay = self.calibrate( assay, remove_calibrators = remove_calibrators )
except:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
if not ignore_uncalibrated:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
aw.SoftWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
try:
assay = self.calibrate( assay, remove_calibrators = remove_calibrators )
except:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )

if not ignore_uncalibrated:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
aw.SoftWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
return assay

def calibrate( self, assay : Assay, remove_calibrators : bool = True ):
Expand Down Expand Up @@ -6176,7 +6189,7 @@ <h2 id="parameters">Parameters</h2>
return dilution


def pipe( self, assay : Assay, remove_calibrators : bool = True ):
def pipe( self, assay : Assay, remove_calibrators : bool = True, ignore_uncalibrated : bool = False ):
&#34;&#34;&#34;
A wrapper for calibrate / assign.

Expand All @@ -6191,6 +6204,14 @@ <h2 id="parameters">Parameters</h2>
remove_calibrators : bool
If calibrators are present in the assay alongside other groups,
remove the calibrator replicates after assignment or efficiency calculation.
ignore_uncalibrated : bool
If `True` assays that could neither be newly calibrated nor be assigned an existing
efficiency will be ignored. Otherwise, and error will be raised.

Returns
-------
assay : qpcr.Assay
The now calibrated `qpcr.Assay`.
&#34;&#34;&#34;
if self._eff_dict != {}:
# first try to assign (will leave the assay unchanged if nothing is found)
Expand All @@ -6201,13 +6222,18 @@ <h2 id="parameters">Parameters</h2>
try:
assay = self.calibrate( assay, remove_calibrators = remove_calibrators )
except:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
if not ignore_uncalibrated:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
aw.SoftWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
try:
assay = self.calibrate( assay, remove_calibrators = remove_calibrators )
except:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )

if not ignore_uncalibrated:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
aw.SoftWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
return assay

def calibrate( self, assay : Assay, remove_calibrators : bool = True ):
Expand Down Expand Up @@ -7041,7 +7067,7 @@ <h2 id="returns">Returns</h2>
</details>
</dd>
<dt id="qpcr.Calibrator.pipe"><code class="name flex">
<span>def <span class="ident">pipe</span></span>(<span>self, assay: <a title="qpcr.Assay" href="#qpcr.Assay">Assay</a>, remove_calibrators: bool = True)</span>
<span>def <span class="ident">pipe</span></span>(<span>self, assay: <a title="qpcr.Assay" href="#qpcr.Assay">Assay</a>, remove_calibrators: bool = True, ignore_uncalibrated: bool = False)</span>
</code></dt>
<dd>
<div class="desc"><p>A wrapper for calibrate / assign.</p>
Expand All @@ -7055,12 +7081,20 @@ <h2 id="parameters">Parameters</h2>
<dt><strong><code>remove_calibrators</code></strong> :&ensp;<code>bool</code></dt>
<dd>If calibrators are present in the assay alongside other groups,
remove the calibrator replicates after assignment or efficiency calculation.</dd>
<dt><strong><code>ignore_uncalibrated</code></strong> :&ensp;<code>bool</code></dt>
<dd>If <code>True</code> assays that could neither be newly calibrated nor be assigned an existing
efficiency will be ignored. Otherwise, and error will be raised.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
<dt><strong><code>assay</code></strong> :&ensp;<code><a title="qpcr.Assay" href="#qpcr.Assay">Assay</a></code></dt>
<dd>The now calibrated <code><a title="qpcr.Assay" href="#qpcr.Assay">Assay</a></code>.</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def pipe( self, assay : Assay, remove_calibrators : bool = True ):
<pre><code class="python">def pipe( self, assay : Assay, remove_calibrators : bool = True, ignore_uncalibrated : bool = False ):
&#34;&#34;&#34;
A wrapper for calibrate / assign.

Expand All @@ -7075,6 +7109,14 @@ <h2 id="parameters">Parameters</h2>
remove_calibrators : bool
If calibrators are present in the assay alongside other groups,
remove the calibrator replicates after assignment or efficiency calculation.
ignore_uncalibrated : bool
If `True` assays that could neither be newly calibrated nor be assigned an existing
efficiency will be ignored. Otherwise, and error will be raised.

Returns
-------
assay : qpcr.Assay
The now calibrated `qpcr.Assay`.
&#34;&#34;&#34;
if self._eff_dict != {}:
# first try to assign (will leave the assay unchanged if nothing is found)
Expand All @@ -7085,13 +7127,18 @@ <h2 id="parameters">Parameters</h2>
try:
assay = self.calibrate( assay, remove_calibrators = remove_calibrators )
except:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
if not ignore_uncalibrated:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
aw.SoftWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
try:
assay = self.calibrate( assay, remove_calibrators = remove_calibrators )
except:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )

if not ignore_uncalibrated:
aw.HardWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
else:
aw.SoftWarning(&#34;Calibrator:cannot_process_assay&#34;, id = assay.id() )
return assay</code></pre>
</details>
</dd>
Expand Down
21 changes: 17 additions & 4 deletions qpcr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3014,7 +3014,7 @@ def dilution( self, step : float or np.ndarray or tuple = None ):
return dilution


def pipe( self, assay : Assay, remove_calibrators : bool = True ):
def pipe( self, assay : Assay, remove_calibrators : bool = True, ignore_uncalibrated : bool = False ):
"""
A wrapper for calibrate / assign.
Expand All @@ -3029,6 +3029,14 @@ def pipe( self, assay : Assay, remove_calibrators : bool = True ):
remove_calibrators : bool
If calibrators are present in the assay alongside other groups,
remove the calibrator replicates after assignment or efficiency calculation.
ignore_uncalibrated : bool
If `True` assays that could neither be newly calibrated nor be assigned an existing
efficiency will be ignored. Otherwise, and error will be raised.
Returns
-------
assay : qpcr.Assay
The now calibrated `qpcr.Assay`.
"""
if self._eff_dict != {}:
# first try to assign (will leave the assay unchanged if nothing is found)
Expand All @@ -3039,13 +3047,18 @@ def pipe( self, assay : Assay, remove_calibrators : bool = True ):
try:
assay = self.calibrate( assay, remove_calibrators = remove_calibrators )
except:
aw.HardWarning("Calibrator:cannot_process_assay", id = assay.id() )
if not ignore_uncalibrated:
aw.HardWarning("Calibrator:cannot_process_assay", id = assay.id() )
else:
aw.SoftWarning("Calibrator:cannot_process_assay", id = assay.id() )
else:
try:
assay = self.calibrate( assay, remove_calibrators = remove_calibrators )
except:
aw.HardWarning("Calibrator:cannot_process_assay", id = assay.id() )

if not ignore_uncalibrated:
aw.HardWarning("Calibrator:cannot_process_assay", id = assay.id() )
else:
aw.SoftWarning("Calibrator:cannot_process_assay", id = assay.id() )
return assay

def calibrate( self, assay : Assay, remove_calibrators : bool = True ):
Expand Down

0 comments on commit 6f42644

Please sign in to comment.