Skip to content

Commit

Permalink
web: diffpdb add check box for using --names
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagnus committed Jan 21, 2022
1 parent f8b3f4b commit 4263cbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions rna_tools/tools/webserver-engine/app/templates/diffpdb.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
function go() {
$.ajax({
url: "/run/diffpdb/{{ j.job_id }}",
data: { names: $('#names').is(':checked')},
success: function(d) {
$("#log_txt").html(d['log']);
if (d['reload']==true){
Expand Down Expand Up @@ -81,6 +82,10 @@ <h2>diffpdb</h2>
</div>
</form>

<label class="checkbox" type="checkbox" >
<input type="checkbox" id="names"> use atom names and residues only
</label>

<pre><div id="log_txt" class='log'>{{ log | safe }}</div></pre>

<p>The raw output files for each step of the pipeline can be found <a href="{% url 'download_project_dir' job_id=j.job_id %}">here</a></p>
Expand Down
6 changes: 5 additions & 1 deletion rna_tools/tools/webserver-engine/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,13 @@ def run(request, tool, job_id):
files = glob.glob(job_dir + "/*pdb")
files.sort(key=os.path.getmtime)
files = [os.path.basename(f) for f in files]
r = request.GET['names'].strip()
opt = ''
if r == 'true':
opt = ' --names '
with open(job_dir + '/run.sh', 'w') as f:
f.write("""
diffpdb.py --method diff %s %s &> log.txt \n
diffpdb.py """ + opt + """ --method diff %s %s &> log.txt \n
""" % (files[0], files[1]))

if tool == 'extract':
Expand Down

0 comments on commit 4263cbc

Please sign in to comment.