Commit a56f08f3 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

sample_set.py stats_decorator.py alter genescan decorator.

parent 9dd1f073
Pipeline #42529 failed with stages
in 2 minutes and 4 seconds
......@@ -709,14 +709,14 @@ def getFusedStats(file_name, res, dest):
tmp[arl] += c['reads'][result_index]
min_len = int(min(tmp.keys()))
max_len = int(max(tmp.keys()))
tmp_dict = {}
for i in range(max_len - min_len):
cursor = i + min_len
if cursor in tmp:
tmp_dict[i] = 100.0*math.log(tmp[cursor])/math.log(reads)
tmp_list = []
for i in range(min_len, max_len):
if i in tmp:
tmp_val = 100.0*math.log(tmp[i])/math.log(reads)
else:
tmp_dict[i] = 0
dest['genescan'] = tmp_dict
tmp_val = 0
tmp_list.append((i, tmp_val))
dest['genescan'] = tmp_list
#dest['bool'] = False
#dest['bool_true'] = True
......
......@@ -59,9 +59,8 @@ class GenescanDecorator(LabeledBarChartDecorator):
def decorate(self, data):
import operator
sorted_values = sorted(data.items(), key=operator.itemgetter(0))
new_values = []
for t in sorted_values:
for t in data:
new_key = "%d%% at %dbp" % (t[1], t[0])
new_values.append((new_key, t[1]))
return super(GenescanDecorator, self).decorate(new_values)
......
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