Commit 0700be18 authored by Anze Vavpetic's avatar Anze Vavpetic
Browse files

dont fail when there's no cell selected

parent d44c61dc
......@@ -25,16 +25,17 @@ def segmine_rule_browser_finished(postdata, input_dict, output_dict):
rules = input_dict['rules']
widget_id = postdata.get('widget_id')[0]
selectedCell = postdata.get('selectedCell')[0]
key, _, idx = selectedCell.split('_')
node_list = []
rule = rules[int(idx)]
if key == 'terms':
terms = rule['description']['terms'] + \
rule['description']['interactingTerms']
node_list.extend([term['termID'] for term in terms])
elif key in ['coveredGenes', 'coveredTopGenes']:
genes = ['EntrezGene:%s' % gene for gene in rule[key]]
node_list.extend(genes)
if selectedCell:
key, _, idx = selectedCell.split('_')
rule = rules[int(idx)]
if key == 'terms':
terms = rule['description']['terms'] + \
rule['description']['interactingTerms']
node_list.extend([term['termID'] for term in terms])
elif key in ['coveredGenes', 'coveredTopGenes']:
genes = ['EntrezGene:%s' % gene for gene in rule[key]]
node_list.extend(genes)
return {'node_list' : node_list}
def segmine_fc_gene_filter_finished(postdata, input_dict, 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