Commit 945b13a6 authored by vpodpecan's avatar vpodpecan
Browse files

added new Biomine search for plants (new JSI hosted Biomine instance) and some small fixes

parent 30d97076
......@@ -506,6 +506,100 @@
"description": "Best path"
}
},
{
"pk": 427,
"model": "workflows.abstractwidget",
"fields": {
"category": 44,
"treeview_image": "",
"windows_queue": false,
"name": "Biomine search (plants)",
"is_streaming": false,
"uid": "f4955e19-df67-4092-9bf3-8a76987755bd",
"interaction_view": "",
"image": "",
"package": "segmine",
"static_image": "",
"post_interact_action": "",
"user": null,
"visualization_view": "",
"streaming_visualization_view": "",
"action": "segmine_biomine_search_plants",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"has_progress_bar": false,
"order": 1,
"description": "Calls the Biomine search engine (for plant data, updated version at JSI)."
}
},
{
"pk": 1068,
"model": "workflows.abstractinput",
"fields": {
"widget": 427,
"name": "Query nodes",
"short_name": "que",
"uid": "54934b0c-9ef7-456d-bfa6-37dab60a863a",
"default": "",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "qterms",
"parameter": false,
"order": 1,
"description": "A list of query nodes"
}
},
{
"pk": 1069,
"model": "workflows.abstractinput",
"fields": {
"widget": 427,
"name": "Max nodes",
"short_name": "mxn",
"uid": "0fe196ff-1e7b-4047-917a-2d828f52f3ae",
"default": "",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "maxnodes",
"parameter": true,
"order": 1,
"description": "Search parameter maxnodes"
}
},
{
"pk": 1070,
"model": "workflows.abstractinput",
"fields": {
"widget": 427,
"name": "Database",
"short_name": "dbs",
"uid": "cbdafcda-e0a8-4e8d-9684-f65023ec5b5b",
"default": "",
"required": false,
"multi": false,
"parameter_type": "text",
"variable": "dbname",
"parameter": true,
"order": 1,
"description": "Name of the database to use"
}
},
{
"pk": 460,
"model": "workflows.abstractoutput",
"fields": {
"widget": 427,
"name": "Biomine graph",
"short_name": "bmg",
"variable": "bmgraph",
"uid": "7f87c504-dcad-469b-84b7-67f3b1de2322",
"order": 1,
"description": "A graph in .bmg format"
}
},
{
"pk": 193,
"model": "workflows.abstractwidget",
......
......@@ -879,3 +879,27 @@ def segmine_ruletable2attribute_union_intersection(input_dict):
intersection = [constants.ENTREZ_GENE_PREFIX + ':' + x for x in intersection]
return {'atrUnion': union, 'atrInter': intersection}
def segmine_biomine_search_plants(input_dict):
import urllib
import urllib2
import json
url = 'http://biomine.ijs.si/api'
qterms = input_dict['qterms']
maxnodes = input_dict['maxnodes'].strip()
dbname = input_dict['dbname'].strip()
qdict = {'query': ' '.join(qterms)}
if maxnodes:
qdict['maxnodes'] = int(maxnodes)
if dbname:
qdict['database'] = str(dbname)
params = urllib.urlencode(qdict)
result = json.loads(urllib2.urlopen(url, params).read())
if 'error' in result:
raise Exception(result['error'])
return {'bmgraph': result['graph']}
\ No newline at end of file
<div id="widgetvisualization-{{widget.pk}}" rel="{{widget.pk}}" class="widgetvisualizationdialog" title="{{widget.name}} visualization" width=700 height=600>
<div id="widgetvisualization-{{widget.pk}}" rel="{{widget.pk}}"
class="widgetvisualizationdialog" title="{{widget.name}} visualization" width="900" height="700" >
<applet code="biomine/bmvis/BMVis.class"
archive="{{STATIC_URL}}segmine/bmvis.jar"
width=650 height=500>
width=850 height=590>
<param name="graph" value="{{ MEDIA_URL }}{{ filename }}">
</applet>
</div>
\ 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