Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

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

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
......@@ -803,6 +803,224 @@
"description": "rules as prolog facts"
}
},
{
"pk": 207,
"model": "workflows.abstractwidget",
"fields": {
"category": 14,
"treeview_image": "",
"name": "SDM-Aleph",
"is_streaming": false,
"uid": "14c7c1f8-d9ee-43da-9c7d-c979d3533fe7",
"interaction_view": "",
"image": "",
"package": "ilp",
"static_image": "ws.png",
"post_interact_action": "",
"user": null,
"visualization_view": "",
"action": "ilp_sdmaleph",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"has_progress_bar": false,
"order": 1,
"description": " SDM-Aleph web service.\r\n \r\n Inputs:\r\n - examples: str, a .tab dataset or a list of pairs\r\n - mapping : str, a mapping between examples and ontological terms,\r\n - ontologies : a list of {'ontology' : str} dicts\r\n - relations : a list of {'relation' : str} dicts\r\n - posClassVal : str, if the data is class-labeled, this is the target class,\r\n - cutoff : int, if the data is ranked, this is the cutoff value for splitting it into two classes,\r\n - minPos : int >= 1, minimum number of true positives per rule\r\n - noise : int > 0, false positives allowed per rule\r\n - clauseLen : int >= 1, number of predicates per clause,\r\n - dataFormat : str, legal values are 'tab' or 'list'\r\n Output:\r\n - str, the induced theory.\r\n \r\n @author: Anze Vavpetic, 2011 <anze.vavpetic@ijs.si>"
}
},
{
"pk": 566,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "examples",
"short_name": "ex",
"uid": "b82c4d43-f585-456f-824b-6ce47e27866f",
"default": "",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "examples",
"parameter": false,
"order": 1,
"description": "examples"
}
},
{
"pk": 567,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "mapping",
"short_name": "map",
"uid": "cd4ab84b-91c7-42ed-bbb2-66c4a2d36fe0",
"default": "",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "mapping",
"parameter": false,
"order": 2,
"description": "mapping from ontology concepts to examples"
}
},
{
"pk": 568,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "ontology",
"short_name": "ont",
"uid": "22bfc647-3185-44dd-8f7f-89fc4cc4dd87",
"default": "",
"required": true,
"multi": true,
"parameter_type": null,
"variable": "ontology",
"parameter": false,
"order": 3,
"description": "ontologies"
}
},
{
"pk": 569,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "relation",
"short_name": "rel",
"uid": "d22cec50-3393-4e9b-8ef3-228e959dc574",
"default": "",
"required": false,
"multi": true,
"parameter_type": null,
"variable": "relation",
"parameter": false,
"order": 4,
"description": "extra relations"
}
},
{
"pk": 570,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "positive class val",
"short_name": "pcl",
"uid": "ad84f724-9935-4a3a-90b2-a4af70721477",
"default": "",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "posClassVal",
"parameter": true,
"order": 5,
"description": "positive class value"
}
},
{
"pk": 571,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "cutoff",
"short_name": "cut",
"uid": "0e5b7e98-aaa2-481d-b2d1-5b339a05b754",
"default": "",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "cutoff",
"parameter": true,
"order": 6,
"description": "cutoff point for unlabeled data"
}
},
{
"pk": 572,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "minimum TP",
"short_name": "min",
"uid": "b2bbe491-8cf3-4ec7-b7a5-f52426ab9285",
"default": "",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "minPos",
"parameter": true,
"order": 7,
"description": "min TP examples per rule"
}
},
{
"pk": 573,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "maximum FP",
"short_name": "noi",
"uid": "87adfb36-8ca2-4c60-b404-c81e05485e00",
"default": "",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "noise",
"parameter": true,
"order": 8,
"description": "max FP examples per rule"
}
},
{
"pk": 574,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "clause length",
"short_name": "cl",
"uid": "f51f11b5-a9c4-43cd-a337-a9f6e6e64992",
"default": "",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "clauseLen",
"parameter": true,
"order": 9,
"description": "max predicates per rule"
}
},
{
"pk": 575,
"model": "workflows.abstractinput",
"fields": {
"widget": 207,
"name": "data format",
"short_name": "fmt",
"uid": "e3ae46df-56bf-4137-97bc-a98214dd6525",
"default": "",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "dataFormat",
"parameter": true,
"order": 10,
"description": "data format (tab or list)"
}
},
{
"pk": 232,
"model": "workflows.abstractoutput",
"fields": {
"widget": 207,
"name": "theory",
"short_name": "the",
"variable": "theory",
"uid": "c02ddff4-9c94-4c5f-8aaf-f962ac8d6572",
"order": 1,
"description": "the induced theory"
}
},
{
"pk": 205,
"model": "workflows.abstractwidget",
......@@ -811,7 +1029,7 @@
"treeview_image": "",
"name": "SDM-SEGS",
"is_streaming": false,
"uid": "62b2b153-f4f1-4126-b166-9d33b79140ae",
"uid": "fd68201e-c2ce-45ad-85ea-41e7171f69bd",
"interaction_view": "",
"image": "",
"package": "ilp",
......@@ -835,7 +1053,7 @@
"widget": 205,
"name": "Timeout",
"short_name": "to",
"uid": "b8824eee-dae1-4edb-8ad7-310f434a29d9",
"uid": "d8412f16-25bd-4109-8208-12be9bd4fa17",
"default": "60",
"required": false,
"multi": false,
......@@ -853,7 +1071,7 @@
"widget": 205,
"name": "Send empty strings to webservices",
"short_name": "ses",
"uid": "534792cf-c0bf-42ac-8c61-ad024c4cc879",
"uid": "0efe46b1-f1f4-4811-aacf-5f97a23e925d",
"default": "",
"required": false,
"multi": false,
......@@ -871,7 +1089,7 @@
"widget": 205,
"name": "ont3",
"short_name": "ont",
"uid": "e0523850-d582-46c0-a1b9-32ca03be9a03",
"uid": "5b1a953e-0cf6-401b-81ce-f1773e0ca1f9",
"default": "",
"required": false,
"multi": false,
......@@ -889,7 +1107,7 @@
"widget": 205,
"name": "ont2",
"short_name": "ont",
"uid": "a7cd7ac7-24d5-4104-b008-e4205ab110c6",
"uid": "3b0d4d2e-177e-4054-81d1-a841f4761f94",
"default": "",
"required": false,
"multi": false,
......@@ -907,7 +1125,7 @@
"widget": 205,
"name": "ont1",
"short_name": "ont",
"uid": "a9e8df9d-f417-45de-b7c8-c9c1d969e751",
"uid": "5a86e8aa-9230-4bd3-80f2-3b2bc2ebc2b8",
"default": "",
"required": false,
"multi": false,
......@@ -925,7 +1143,7 @@
"widget": 205,
"name": "generalTerms",
"short_name": "gen",
"uid": "c0b6e88d-8f49-47ee-8bff-c6edf8795196",
"uid": "141f075c-3634-4d6e-8254-fd9afbaa0eb7",
"default": "",
"required": false,
"multi": false,
......@@ -943,7 +1161,7 @@
"widget": 205,
"name": "interactions",
"short_name": "int",
"uid": "c12add79-923d-4d90-8a89-d1d93ae187c5",
"uid": "303998af-0f97-4895-b5fb-1ec57f0ab706",
"default": "",
"required": false,
"multi": false,
......@@ -961,7 +1179,7 @@
"widget": 205,
"name": "maxNumTerms",
"short_name": "max",
"uid": "bfc140d6-d06f-4717-9003-8121a0838c0a",
"uid": "8cbf4e91-616c-4b35-a16e-86c6ca1e2dd4",
"default": "",
"required": false,
"multi": false,
......@@ -979,7 +1197,7 @@
"widget": 205,
"name": "ont4",
"short_name": "ont",
"uid": "c72dbff7-ce7d-4708-bd3d-bb22e83ae2c1",
"uid": "0c790fc0-5f7f-4117-9b9f-dae365eb88f4",
"default": "",
"required": false,
"multi": false,
......@@ -997,7 +1215,7 @@
"widget": 205,
"name": "mapping",
"short_name": "map",
"uid": "c24bd33a-05f4-4c7f-8748-5e0a460cc99e",
"uid": "e9b6fee9-ca19-4aaf-9acf-9ecb98f11f5b",
"default": "",
"required": false,
"multi": false,
......@@ -1015,7 +1233,7 @@
"widget": 205,
"name": "weightGSEA",
"short_name": "wei",
"uid": "bf54ba64-b9c1-47c2-b80e-382f8dfe3618",
"uid": "3e15d380-742f-4134-8093-097e053bdccb",
"default": "",
"required": false,
"multi": false,
......@@ -1033,7 +1251,7 @@
"widget": 205,
"name": "wracc_k",
"short_name": "wra",
"uid": "31b12fe2-5daa-42bf-970c-9f958bf1d731",
"uid": "cb312cf6-2e82-4f17-8f36-8b0f8d17a8e0",
"default": "",
"required": false,
"multi": false,
......@@ -1051,7 +1269,7 @@
"widget": 205,
"name": "maximalPvalue",
"short_name": "max",
"uid": "3cfaa5e1-3c9b-4582-9efb-477e074a8dd4",
"uid": "b2b31c12-b1aa-4b7f-ace7-005035b92ed7",
"default": "",
"required": false,
"multi": false,
......@@ -1069,7 +1287,7 @@
"widget": 205,
"name": "legacy",
"short_name": "leg",
"uid": "1d4ffcaa-e813-408a-9908-b1c783abac06",
"uid": "15610106-cd5b-4dee-a3d1-ead67a3dc546",
"default": "",
"required": false,
"multi": false,
......@@ -1087,7 +1305,7 @@
"widget": 205,
"name": "maxReported",
"short_name": "max",
"uid": "d735e824-a568-4f02-b826-5d4892adb4dc",
"uid": "86a886d5-7acc-41b4-9f01-09505385550c",
"default": "",
"required": false,
"multi": false,
......@@ -1105,7 +1323,7 @@
"widget": 205,
"name": "dataFormat",
"short_name": "dat",
"uid": "595e4161-fa2e-4804-8c17-01039da61270",
"uid": "3ffa0341-a80e-47f5-bf77-488ef678dafa",
"default": "",
"required": false,
"multi": false,
......@@ -1123,7 +1341,7 @@
"widget": 205,
"name": "minimalSetSize",
"short_name": "min",
"uid": "5f4bc4d3-a8ef-4fe5-befb-b704e120a65a",
"uid": "c71c5076-fc5b-4b4e-823c-68350224caef",
"default": "",
"required": false,
"multi": false,
......@@ -1141,7 +1359,7 @@
"widget": 205,
"name": "weightFisher",
"short_name": "wei",
"uid": "399b1134-9b0e-48d3-a71f-0d6497365dbe",
"uid": "fd4cc0d1-621d-43da-b03a-e938b104011d",
"default": "",
"required": false,
"multi": false,
......@@ -1159,7 +1377,7 @@
"widget": 205,
"name": "posClassVal",
"short_name": "pos",
"uid": "8bc2c8d5-de47-4953-b69e-8216b7f36e7c",
"uid": "f78ab9ea-d0aa-41e4-afc2-383f0c74ce5d",
"default": "",
"required": false,
"multi": false,
......@@ -1177,7 +1395,7 @@
"widget": 205,
"name": "cutoff",
"short_name": "cut",
"uid": "1e3bd06d-0ec9-4160-ac2a-cf94da4722e6",
"uid": "5a8a4fce-7d56-43c8-9a88-1cc35969d27f",
"default": "",
"required": false,
"multi": false,
......@@ -1195,7 +1413,7 @@
"widget": 205,
"name": "inputData",
"short_name": "inp",
"uid": "864cf70e-7615-4612-8c1c-051f150bd0a7",
"uid": "4b925bc7-8605-472b-856d-35c0ec4441d2",
"default": "",
"required": false,
"multi": false,
......@@ -1213,7 +1431,7 @@
"widget": 205,
"name": "weightPAGE",
"short_name": "wei",
"uid": "689f8675-5110-4abb-bc4c-b27f9fd2769b",
"uid": "22268dfd-5362-45b8-bcec-8bbfa547b826",
"default": "",
"required": false,
"multi": false,
......@@ -1229,10 +1447,10 @@
"model": "workflows.abstractoutput",
"fields": {
"widget": 205,
"name": "results",
"short_name": "res",
"variable": "results",
"uid": "e366e00b-076a-4039-abfa-14e9541da625",
"name": "rules",
"short_name": "rls",
"variable": "rules",
"uid": "f3f44526-0877-4912-a89c-0bc14b1da6c2",
"order": 1,
"description": ""
}
......@@ -1245,7 +1463,7 @@
"treeview_image": "",
"name": "SDM-SEGS Rule Viewer",
"is_streaming": false,
"uid": "3dea450d-831b-493d-bfe4-a0f2a6c5dec4",
"uid": "792b7437-a9b5-4fca-8b21-f9939e9ff8e7",
"interaction_view": "",
"image": "",
"package": "ilp",
......@@ -1269,7 +1487,7 @@
"widget": 204,
"name": "SDM-SEGS rules",
"short_name": "rls",
"uid": "dfa4c113-9c41-4b73-bc62-d19463952e24",
"uid": "06cc9c5e-9250-423b-9c1e-6468f965284a",
"default": "",
"required": true,
"multi": false,
......
<div id="widgetinteract-{{widget.pk}}" rel="{{widget.pk}}" class="widgetinteractdialog" title="{{widget.name}} wants your input!">
<form id="interactionform-{{widget.pk}}" name="interactionform-{{widget.pk}}">
{% 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="{{widget.pk}}">
</form>
</div>
\ No newline at end of file
<div id="widgetvisualization-{{widget.pk}}" width="600" height="400" rel="{{widget.pk}}" class="widgetvisualizationdialog" title="{{widget.name}} results">
<div id="widget-data-table-{{widget.pk}}" style=" margin: 0 auto">
<center>
<table class="datasetTable">
<tr>
<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>
</tr>
{% for ex in rules.items %}
<tr class="tablerow{{widget.pk}}">
<td class='tablecellright'> {{ex.0}} </td>
<td class='tablecellleft'>
{% for e in ex.1.name %}
<p>{{e}}</p>
{% endfor %}
</td>
<td class='tablecellcenter'> {{ex.1.allGenes}} </td>
<td class='tablecellcenter'> {{ex.1.topGenes}} </td>
<td class='tablecellleft'> {{ex.1.wracc}} </td>
</tr>
{% endfor %}
<table id="sdmsegs_rules{{widget.pk}}">
<thead>
<tr>
<th>#</th>
<th>Description</th>
<th>Positive examples</th>
<th>All examples</th>
<th>WRAcc</th>
</tr>
</thead>
<tbody>
{% for rule in rules %}
<tr>
<td>{{ forloop.counter1 }}</td>
<td>
{{ rule.terms|join:", " }}
{% if rule.interacting_terms %}
<br/>INTERACTING: {{rule.interacting_terms|join:", "}}
{% endif %}
</td>
<td> {{rule.support|length}} </td>
<td> {{rule.coverage|length}} </td>
<td> {{rule.scores.wracc|floatformat:3}} </td>
</tr>
{% endfor %}
</tbody>
</table>
</center>
</div>
<script type="text/javascript">
$(function () {
$(document).ready(function() {
$('#sdmsegs_rules{{widget.pk}}').dataTable( {
"bSortCellsTop" : true,
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
} );
});
</script>
</div>
\ 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']:
try:
terms.append(d['ontDict'][t])
except Exception, e:
pass
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