Commit 3f0439c2 authored by Anze Vavpetic's avatar Anze Vavpetic

added sdmaleph widget; updated sdmsegs viewer to use simpler result dictionary...

added sdmaleph widget; updated sdmsegs viewer to use simpler result dictionary and to use DataTable.js
parent e551939f
This diff is collapsed.
<div id="widgetinteract-{{}}" rel="{{}}" class="widgetinteractdialog" title="{{}} wants your input!">
<form id="interactionform-{{}}" name="interactionform-{{}}">
{% for i in intList %}
<input type="checkbox" name="intListOut" value="{{i}}" style="display:inline;width:auto;">{{i}}<br>
{% endfor %}
<input type="hidden" name="widget_id" value="{{}}">
\ No newline at end of file
<div id="widgetvisualization-{{}}" width="600" height="400" rel="{{}}" class="widgetvisualizationdialog" title="{{}} results">
<div id="widget-data-table-{{}}" style=" margin: 0 auto">
<table class="datasetTable">
<th class="tablecellcenter">#</th>
<th class="tablecellcenter">Description</th>
<th class="tablecellcenter">Covered examples</th>
<th class="tablecellcenter">Positive examples</th>
<th class="tablecellcenter">WRAcc</th>
{% for ex in rules.items %}
<tr class="tablerow{{}}">
<td class='tablecellright'> {{ex.0}} </td>
<td class='tablecellleft'>
{% for e in %}
{% endfor %}
<td class='tablecellcenter'> {{ex.1.allGenes}} </td>
<td class='tablecellcenter'> {{ex.1.topGenes}} </td>
<td class='tablecellleft'> {{ex.1.wracc}} </td>
{% endfor %}
<table id="sdmsegs_rules{{}}">
<th>Positive examples</th>
<th>All examples</th>
{% for rule in rules %}
<td>{{ forloop.counter1 }}</td>
{{ rule.terms|join:", " }}
{% if rule.interacting_terms %}
<br/>INTERACTING: {{rule.interacting_terms|join:", "}}
{% endif %}
<td> {{|length}} </td>
<td> {{rule.coverage|length}} </td>
<td> {{rule.scores.wracc|floatformat:3}} </td>
{% endfor %}
<script type="text/javascript">
$(function () {
$(document).ready(function() {
$('#sdmsegs_rules{{}}').dataTable( {
"bSortCellsTop" : true,
"bJQueryUI": true,
"sPaginationType": "full_numbers"
} );
\ No newline at end of file
......@@ -2,19 +2,4 @@ from django.shortcuts import render
import json
def ilp_sdmsegs_rule_viewer(request,input_dict,output_dict,widget):
d = json.loads(input_dict['sdmsegs_rules'])
output = {}
for k, v in d['A']['WRAcc'].items():
terms = []
for t in v['terms']:
except Exception, e:
output[int(k)] = {
'name': terms,
'topGenes': int(len(v['topGenes'])),
'allGenes': int(len(v['allGenes'])),
'wracc': round(v['scores']['wracc'], 3)
return render(request, 'visualizations/sdmsegs_viewer.html',{'widget':widget,'input_dict':input_dict,'rules':output})
\ No newline at end of file
return render(request, 'visualizations/sdmsegs_viewer.html',{'widget':widget,'rules':json.loads(input_dict['sdmsegs_rules'])})
\ No newline at end of file
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