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

update example autofill, method choice working

parent f7e0e56f
Branches add-craft
No related tags found
No related merge requests found
......@@ -51,6 +51,11 @@ def extract_request(form):
else:
log.write("Job name: None\n")
if 'method' in form:
req["method"] = form['method'].value
else:
error_messages.append(f"Method is required")
if 'craft-example' in form:
FormTools.extract_files_from_list([common.CRAFT_PEPTIDE], resdir)
req["peptides_path"] = resdir + '/' + "craft_peptides.tsv"
......@@ -130,7 +135,9 @@ def launch_software(run_id, req):
sequences_arg = req["sequences_dir"]
command = "python pampa_craft.py --homology -p " + peptides_arg + " -d " + sequences_arg + " -o " + common.RESULT_DIR + run_id + "/" + output_arg
method = req['method']
command = "python pampa_craft.py --" + method + " -p " + peptides_arg + " -d " + sequences_arg + " -o " + common.RESULT_DIR + run_id + "/" + output_arg
if 'limit_path' in req:
limit_arg = req["limit_path"]
command += " -l " + limit_arg
......
......@@ -31,36 +31,37 @@
</table>
</div>
<h2>Method</h2>
<table class="vide table-center pampa-choice">
<tr>
<td>
<div>
<input type="radio" id="allpeptides" name="drone" value="allpeptides" checked/>
<input type="radio" id="allpeptides" name="method" value="allpeptides"/>
<label for="allpeptides">Allpeptides</label>
</div>
</td>
<td>
<div>
<input type="radio" id="deamidation" name="drone" value="deamidation"/>
<input type="radio" id="deamidation" name="method" value="deamidation"/>
<label for="deamidation">Deamidation</label>
</div>
</td>
<td>
<div>
<input type="radio" id="fillin" name="drone" value="fillin"/>
<input type="radio" id="fillin" name="method" value="fillin"/>
<label for="fillin">Fillin</label>
</div>
</td>
<td>
<div>
<input type="radio" id="homology" name="drone" value="homology"/>
<input type="radio" id="homology" name="method" value="homology" checked/>
<label for="homology">Homology</label>
</div>
</td>
<td>
<div>
<input type="radio" id="selection" name="drone" value="selection"/>
<input type="radio" id="selection" name="method" value="selection"/>
<label for="selection">Selection</label>
</div>
</td>
......
......@@ -107,6 +107,7 @@ $(document).on("click", "#example-craft", function() {
$("#sequences_input input").attr("required", false);
$("#sequences_example").show();
$("input[name='craft-example']").attr("checked", true);
$("#homology").prop("checked", true);
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment