Skip to content
Snippets Groups Projects
Commit ef9df26e authored by Hottlet Valentin's avatar Hottlet Valentin
Browse files

Add digestion and peak proportion configuration options

parent 7d1e7925
No related branches found
No related tags found
1 merge request!8Tests docker
......@@ -21,7 +21,7 @@ def extract_request(form):
#Options et methodes:
taxonomy = ["fillin", "homology"]
pconfig = ["fillin", "allpeptides"]
pconfig = ["fillin", "allpeptides", "homology"]
spectre = ["allpeptides", "selection"]
error_found = False
......@@ -162,15 +162,25 @@ def extract_request(form):
extract_taxonomy_selection(form, log, req, error_messages, resdir)
if method in pconfig:
digestion = None
min_prop_peaks = None
if "digestion" in form:
if form["digestion"].value != "" and form["digestion"].value != "trypsin":
digestion = form["digestion"].value
else:
digestion = None
if digestion:
if "minimum_prop_peaks" in form:
if form["minimum_prop_peaks"].value != "" and form["minimum_prop_peaks"].value != "0.7":
min_prop_peaks = float(form["minimum_prop_peaks"].value)
if not digestion and not min_prop_peaks:
pass
else:
with open(f'{common.CONFIG_FILE}', 'r') as f:
data = json.load(f)
if digestion:
data['enzyme'] = digestion
if min_prop_peaks:
data['min_proportion_of_peaks'] = min_prop_peaks
json.dump(data, open(f'{resdir}/config.json', 'w'))
log.write(f"Digestion set to {digestion}\n")
req['config_file'] = resdir + '/config.json'
......
......@@ -128,7 +128,7 @@
</div>
<div class="formulaire">
<h2>Digestion <span style="font-weight: normal">(optional) :</span></h2>
<h2>Configuration <span style="font-weight: normal">(optional) :</span></h2>
<table class="vide">
<tr>
<td class="label">
......@@ -152,6 +152,19 @@
</td>
</tr>
</table>
<br>
<table>
<tr>
<td class="label">
<B>Enter</B> the minimal proportion of peaks.
</td>
</tr>
<tr>
<td>
<input type="number" name="minimum_prop_peaks" step="0.01" min="0" max="1" value="0.7" required>
</td>
</tr>
</table>
</div>
<div class="center">
......
......@@ -137,7 +137,7 @@
</div>
<div class="formulaire">
<h2>Digestion <span style="font-weight: normal">(optional) :</span></h2>
<h2>Configuration <span style="font-weight: normal">(optional) :</span></h2>
<table class="vide">
<tr>
<td class="label">
......
......@@ -120,6 +120,33 @@
</table>
</div>
<div class="formulaire">
<h2>Configuration <span style="font-weight: normal">(optional) :</span></h2>
<table class="vide">
<tr>
<td class="label">
<B>Choose</B> your digestion enzyme.
</td>
</tr>
<tr>
<td>
<select name="digestion">
<option value="arg-c">arg-c</option>
<option value="asp-n">asp-n</option>
<option value="chymotrypsin high specificity">chymotrypsin high specificity</option>
<option value="chymotrypsin low specificity">chymotrypsin low specificity</option>
<option value="glutamyl endopeptidase">glutamyl endopeptidase</option>
<option value="pepsin ph1.3">pepsin ph1.3</option>
<option value="pepsin ph2.0">pepsin ph2.0</option>
<option value="proline endopeptidase">proline endopeptidase</option>
<option value="trypsin" selected>trypsin (Default)</option>
<option value="trypsin_exception">trypsin_exception</option>
</select>
</td>
</tr>
</table>
</div>
<div class="center">
<input type="button" id="example-homology" name="example-homology" value="Example">
<input type="submit" id="reset-craft-h" name="reset" value="Reset" />
......
......@@ -114,6 +114,22 @@
</table>
</div>
<div class="formulaire">
<h2>Configuration <span style="font-weight: normal">(optional) :</span></h2>
<table class="vide">
<tr>
<td class="label">
<B>Enter</B> the minimal proportion of peaks.
</td>
</tr>
<tr>
<td>
<input type="number" name="minimum_prop_peaks" step="0.01" min="0" max="1" value="0.7" required>
</td>
</tr>
</table>
</div>
<div class="center">
<input type="button" id="example-selection" name="example-selection" value="Example">
<input type="submit" id="reset-craft-s" name="reset" value="Reset" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment