Commit 16a678e9 authored by Anze Vavpetic's avatar Anze Vavpetic
Browse files

exported some widgets again that went missing; sdm-aleph now accepts 3 types...

exported some widgets again that went missing; sdm-aleph now accepts 3 types of examples and makes the appropriate checks; added icons for most new widgets
parent d3f89eef
This diff is collapsed.
import re
import json
import tempfile
from string import ascii_lowercase as chars
from random import choice
......@@ -54,10 +56,22 @@ def ilp_sdmsegs_rule_viewer(input_dict):
return {}
def ilp_sdmaleph(input_dict):
#ws = WebService('', 3600)
import orange
ws = WebService('', 3600)
data = input_dict.get('examples')
if isinstance(data, orange.ExampleTable):
with tempfile.NamedTemporaryFile(suffix='.tab', delete=True) as f:
examples =
elif isinstance(data, list):
examples = json.dumps(data)
elif isinstance(data, str):
examples = data
raise Exception('Illegal examples format. \
Supported formats: str, list or Orange')
response = ws.client.sdmaleph(
ontologies=[{'ontology' : ontology} for ontology in input_dict.get('ontology')],
relations=[{'relation' : relation} for relation in input_dict.get('relation')],
......@@ -345,8 +345,6 @@ def select_data_post(postdata, input_dict, output_dict):
if cond['condition'][0]['operator'] in ["is defined", "sis defined"]:
data_filter = = data.domain)
data_filter.negate = cond['negate']
#for v in range(len(data.domain.variables)):
# data_filter.check[int(v)] = 0
data_filter.check[str(cond['condition'][0]['attr'])] = 1
data_filter =
......@@ -144,8 +144,6 @@ def segmine_resolve_gene_synonyms(input_dict):
mapped = []
genes = {}
for (i, (geneID, rank)) in enumerate(gene_ranks):
if i%100 == 0:
# gene name can also be symbolic or synonym
geneID = geneID.lower()
Supports Markdown
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