Commit 1cf43f19 authored by Ryan Herbert's avatar Ryan Herbert

sample_set.py stats_decorator.py add loci list

See #3456
parent df9a97dc
......@@ -659,6 +659,7 @@ def getStatHeaders():
b = BooleanDecorator()
p = BarDecorator()
bc = BarChartDecorator()
l = LociListDecorator()
return [('sample_sets', 'db', s),
('main_clone', 'parser', m),
('reads', 'parser', m),
......@@ -666,6 +667,7 @@ def getStatHeaders():
('mapped_percent', 'parser', p),
('bool', 'parser', b),
('bool_true', 'parser', b),
('loci', 'parser', l),
('genescan', 'parser', bc)
]
......@@ -698,6 +700,7 @@ def getFusedStats(file_name, res, dest):
dest['mapped_percent'] = 100.0 * (float(data['reads']['segmented'][result_index])/float(reads))
dest['bool'] = False
dest['bool_true'] = True
dest['loci'] = [x for x in data['reads']['germline'] if data['reads']['germline'][x][result_index] >= 0]
dest['genescan'] = [68, 27, 18, 45, 89, 63, 53, 64, 93, 21, 47, 5, 64, 68, 46, 68, 18,
72, 36, 70, 39, 21, 84, 32, 29, 4, 76, 51, 33, 67, 14, 57, 75, 61,
29, 11, 81, 71, 91, 32, 40, 71, 87, 54, 50, 88, 72, 59, 29, 80, 48,
......
......@@ -51,3 +51,15 @@ class SetsDecorator(StatDecorator):
d = DIV("(%d) %s" % (sample_set['id'], sample_set['name']))
ssets.append(d)
return DIV(*ssets)
class LociListDecorator(StatDecorator):
def __init__(self):
super(LociListDecorator, self).__init__()
def decorate(self, data):
loci = []
for locus in data:
span = SPAN(locus)
loci.append(span)
return DIV(*loci)
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