Commit 8de13914 authored by Anze Vavpetic's avatar Anze Vavpetic
Browse files

.

parent cd9674dc
......@@ -5,6 +5,7 @@ Bioinformatics interaction viewes.
'''
from django.shortcuts import render
def insilico_search(request, input_dict, output_dict, widget):
#TODOl
return render(request, 'interactions/insilico_search.html', {'widget':widget})
def feature_selection(request, input_dict, output_dict, widget):
#TODO
return render(request, 'interactions/feature_selection.html', {'widget':widget})
......@@ -3,9 +3,25 @@ Bioinformatics library.
@author: Anze Vavpetic <anze.vavpetic@ijs.si>
'''
def insilico_search(input_dict):
#
# Visualization widgets:
#
def rank_plotter(input_dict):
return input_dict
def segs_rule_browser(input_dict):
return input_dict
#
# Interactions widgets:
#
def feature_selection_finished(postdata, input_dict, output_dict):
# TODO
return output_dict
def insilico_finished(input_dict):
#TODO
return input_dict
\ No newline at end of file
#
# Regular widgets:
#
def segs(input_dict):
# TODO
output_dict = {}
return output_dict
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('',
url(r'^get-new-feature-selection-scores/widget(?P<widget_id>[0-9]+)/(?P<method>\w+)/$', 'workflows.bioinformatics.views.get_new_feature_selection_scores',
name='get new feature selection scores'),
)
\ No newline at end of file
# helperji, context stvari
from django.shortcuts import render, get_object_or_404, redirect
from django.http import Http404, HttpResponse
# modeli
from workflows.models import *
# auth fore
from django.contrib.auth.decorators import login_required
# Orange bioinformatics differential expression
# from orngBioinformatics.obiExpression import *
# SCORE_METHODS = [("fold change", ExpressionSignificance_FoldChange, twoTailTest, True),
# ("log2 fold change", ExpressionSignificance_Log2FoldChange, twoTailTest, True),
# ("t-test", ExpressionSignificance_TTest_T, twoTailTest, True),
# ("t-test p-value", ExpressionSignificance_TTest_PValue, oneTailTestLow, True),
# ("anova", ExpressionSignificance_ANOVA_F, oneTailTestHi, False),
# ("anova p-value", ExpressionSignificance_ANOVA_PValue, oneTailTestLow, False),
# ("signal to noise ratio", ExpressionSignificance_SignalToNoise, twoTailTest, True),
# ("info gain", ExpressionSignificance_Info, oneTailTestHi, True),
# ("chi-square", ExpressionSignificance_ChiSquare, oneTailTestHi, True),
# ("mann-whitney", ExpressionSignigicance_MannWhitneyu_U, oneTailTestLow, True),
# ("AREA (timeseries)", ExpressionSignificance_AREA, oneTailTestHi, False),
# ("FC (timeseries)", ExpressionSignificance_FCts, oneTailTestHi, False)]
@login_required
def get_new_feature_selection_scores(request, widget_id, method = 0):
w = get_object_or_404(Widget, pk=widget_id)
if w.workflow.user == request.user:
data = w.inputs.all()[0]
_, score_method, _, twotailtest = SCORE_METHODS[method]
return HttpResponse(data, mimetype='text/json')
else:
return HttpResponse(status=400)
'''
Bioinformatics visualization viewes.
@author: Anze Vavpetic <anze.vavpetic@ijs.si>
'''
from django.shortcuts import render
def rank_plotter(request, input_dict, output_dict, widget):
#TODO
return render(request, 'interactions/rank_plotter.html', {'widget':widget})
def segs_rule_browser(request, input_dict, output_dict, widget):
#TODO
return render(request, 'interactions/segs_rule_browser.html', {'widget':widget})
......@@ -102,7 +102,6 @@ def call_webservice(input_dict):
except Exception as e:
print e
ws_dict[i['name']]=''
print ws_dict
results = function_to_call(**ws_dict)
output_dict=results
return output_dict
......
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