Commit 392a4f5c authored by c.fortmanngrote's avatar c.fortmanngrote
Browse files

Update webforms.

Added new parameter 'distance_group_seeds' to view, routes, and templates. defaults to 15.
parent 44774c61
......@@ -121,6 +121,7 @@ def upload():
session['query_rayt'] = None
session['treefile'] = None
session['min_nmer_occurrence'] = None
session['distance_group_seeds'] = None
session['nmer_length'] = None
session['e_value_cutoff'] = None
session['analyse_repins'] = None
......@@ -181,6 +182,7 @@ def submit():
session['treefile'] = treefile
session['nmer_length'] = request.form.get('nmer_length')
session['distance_group_seeds'] = request.form.get('distance_group_seeds', 15)
session['e_value_cutoff'] = request.form.get('e_value_cutoff')
session['analyse_repins'] = request.form.get('analyse_repins')
session['email'] = request.form.get('email', None)
......@@ -253,6 +255,7 @@ def submit():
"reference_strain": session['reference_strain'],
"min_nmer_occurrence": session['min_nmer_occurrence'],
"nmer_length": session['nmer_length'],
"distance_group_seeds": session.get('distance_group_seeds', 15),
"query_rayt_fname": query_rayt_fname,
"treefile": session['treefile'],
"e_value_cutoff": session['e_value_cutoff'],
......@@ -477,6 +480,8 @@ def rerun():
submit_form.min_nmer_occurrence.data = dbjob.setup.get('min_nmer_occurrence')
session['nmer_length'] = dbjob.setup.get('nmer_length')
submit_form.nmer_length.data = dbjob.setup.get('nmer_length')
session['distance_group_seeds'] = dbjob.setup.get('distance_group_seeds', 15)
submit_form.distance_group_seeds.data = dbjob.setup.get('distance_group_seeds', 15)
session['analyse_repins'] = dbjob.setup.get('analyse_repins')
submit_form.analyse_repins.data = dbjob.setup.get('analyse_repins')
session['e_value_cutoff'] = dbjob.setup.get('e_value_cutoff')
......
......@@ -7,26 +7,22 @@
<form action="{{ url_for('submit') }}" method="post" enctype="multipart/form-data">
<p>
{{ submit_form.reference_strain.label }}
<!-- <span title="{{submit_form.reference_strain.description}}" style="cursor:default">(?)</span> -->
</br>
{{ submit_form.reference_strain(title=submit_form.reference_strain.description) }}
</br></br>
</p>
<p>
{{ submit_form.query_rayt.label }}
<!-- <span title="{{submit_form.query_rayt.description}}" style="cursor:default">(?)</span> -->
</br>
{{ submit_form.query_rayt(title=submit_form.query_rayt.description) }}</br></br>
</p>
<p>
{{ submit_form.treefile.label }}
<!-- <span title="{{submit_form.treefile.description}}" style="cursor:default">(?)</span> -->
</br>
{{ submit_form.treefile(title=submit_form.treefile.description) }}</br></br>
</p>
<p>
{{ submit_form.min_nmer_occurrence.label }}
<!-- <span title="{{submit_form.min_nmer_occurrence.description}}" style="cursor:default">(?)</span> -->
</br>
{{ submit_form.min_nmer_occurrence(title=submit_form.min_nmer_occurrence.description) }}
</br>
......@@ -39,7 +35,6 @@
</p>
<p>
{{ submit_form.nmer_length.label }}
<!-- <span title="{{submit_form.nmer_length.description}}" style="cursor:default">(?)</span> -->
</br>
{{ submit_form.nmer_length(title=submit_form.nmer_length.description) }}
</br>
......@@ -49,9 +44,19 @@
{% endfor %}
</br>
</p>
<p>
{{ submit_form.distance_group_seeds.label }}
</br>
{{ submit_form.distance_group_seeds(title=submit_form.distance_group_seeds.description) }}
</br>
{% for error in submit_form.distance_group_seeds.errors %}
<span style="color: red;">
[{{ error }}]</span>
{% endfor %}
</br>
</p>
<p>
{{ submit_form.e_value_cutoff.label }}
<!-- <span title="{{submit_form.e_value_cutoff.description}}" style="cursor:default">(?)</span> -->
</br>
{{ submit_form.e_value_cutoff(title=submit_form.e_value_cutoff.description) }}</br>
{% for error in submit_form.e_value_cutoff.errors %}
......@@ -63,13 +68,11 @@
</p>
<p>
{{ submit_form.analyse_repins.label }}
<!-- <span title="{{submit_form.analyse_repins.description}}" style="cursor:default">(?)</span> -->
</br>
{{ submit_form.analyse_repins(title=submit_form.analyse_repins.description) }}</br>
</p>
<p>
{{ submit_form.email.label }}
<!-- <span title="{{submit_form.email.description}}" style="cursor:default">(?)</span> -->
</br>
{{ submit_form.email(title=submit_form.email.description) }}</br>
{% for error in submit_form.email.errors %}
......@@ -81,7 +84,6 @@
</p>
<p>
{{ submit_form.submit(title=submit_form.submit.description) }}
<!-- <span title="{{submit_form.submit.description}}" style="cursor:default">(?)</span> -->
</p>
</form>
{% endblock %}
......@@ -80,6 +80,11 @@ class SubmitForm(FlaskForm):
description="Set the Seed length (in basepairs). Only sequences of this length that occur more frequently than 'min. Seed occurrence (see above) will be considered in the REP/REPIN analysis.",
validators=[validators.DataRequired(message="Please enter the nmer length as an integer!")]
)
distance_group_seeds= IntegerField("Distance group seeds",
default=15,
description="Set the group seeds distance (???)",
validators=[validators.DataRequired(message="Please enter an integer number > 0.")]
)
e_value_cutoff = FloatField("e value cutoff",
default=1.0e-30,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment