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

Add digestion enzyme selection and improve peak config handling

parent a41164e8
Branches add-craft
No related tags found
1 merge request!8Tests docker
......@@ -236,17 +236,30 @@ def extract_request(form):
fOut.write(f"PTM={req['limit_PTM']} ")
fOut.write("\n")
minimum = None
digestion = None
if "minimum_peaks" in form:
if form["minimum_peaks"].value != "" and form["minimum_peaks"].value != "5":
minimum = form["minimum_peaks"].value
else:
minimum = None
if minimum:
if "digestion" in form:
if form["digestion"].value != "" and form["digestion"].value != "trypsin":
digestion = form["digestion"].value
if not minimum and not digestion:
pass
else:
with open(f'{common.CONFIG_FILE}', 'r') as f:
data = json.load(f)
if minimum:
data['min_number_of_peaks'] = minimum
log.write(f"Minimum number of peaks set to {minimum}\n")
if digestion:
data['digestion'] = digestion
log.write(f"Digestion set to {digestion}\n")
json.dump(data, open(f'{resdir}/config.json', 'w'))
log.write(f"Digestion set to {minimum}\n")
req['config_file'] = resdir + '/config.json'
log.write("Recap downloads :\n")
......
......@@ -56,16 +56,6 @@
</table>
<br>
<b>Minimum peaks configuration</b>
<table class="vide pampa_choice">
<tr>
<td>
<input type="number" name="minimum_peaks" step="1" min="1" max="100" value="5" required>
</td>
</tr>
</table>
<br>
<b>Mass error tolerance</b>
<table class="vide pampa_choice">
<tr>
......@@ -299,6 +289,47 @@
</div>
</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>
<br>
<table>
<tr>
<td class="label">
<b>Minimum peaks configuration</b>
</td>
</tr>
<tr>
<td>
<input type="number" name="minimum_peaks" step="1" min="1" max="100" value="5" required>
</td>
</tr>
</table>
<br>
</div>
<div class="center">
<input type="button" id="example_1" name="example_1" value="Example">
<input type="submit" id="reset" 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