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

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('http://workflow.ijs.si:8081', 3600)
import orange
ws = WebService('http://vihar.ijs.si:8097', 3600)
data = input_dict.get('examples')
if isinstance(data, orange.ExampleTable):
with tempfile.NamedTemporaryFile(suffix='.tab', delete=True) as f:
data.save(f.name)
examples = f.read()
elif isinstance(data, list):
examples = json.dumps(data)
elif isinstance(data, str):
examples = data
else:
raise Exception('Illegal examples format. \
Supported formats: str, list or Orange')
response = ws.client.sdmaleph(
examples=input_dict.get('examples'),
examples=examples,
mapping=input_dict.get('mapping'),
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 = Orange.data.filter.IsDefined(domain = 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
else:
data_filter = Orange.data.filter.Values()
......
......@@ -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:
self.progressBar.advance()
# gene name can also be symbolic or synonym
geneID = geneID.lower()
try:
......
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