Commit 7d60ad21 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

sample_set.py multi stats abundance

add abundance of clones per germline in a barchart form.
parent 4c5cdad7
...@@ -673,7 +673,8 @@ def getStatHeaders(): ...@@ -673,7 +673,8 @@ def getStatHeaders():
#('bool_true', 'parser', b), #('bool_true', 'parser', b),
('loci', 'parser', l), ('loci', 'parser', l),
('distribution', 'parser', lbc), ('distribution', 'parser', lbc),
('clones_five_percent', 'parser', m) ('clones_five_percent', 'parser', m),
('abundance', 'parser', lbc)
] ]
def getFusedStats(file_name, res, dest): def getFusedStats(file_name, res, dest):
...@@ -695,6 +696,7 @@ def getFusedStats(file_name, res, dest): ...@@ -695,6 +696,7 @@ def getFusedStats(file_name, res, dest):
dest['reads'] = reads dest['reads'] = reads
dest['mapped'] = "%d" % (data['reads']['segmented'][result_index]) dest['mapped'] = "%d" % (data['reads']['segmented'][result_index])
dest['mapped_percent'] = 100.0 * (float(data['reads']['segmented'][result_index])/float(reads)) dest['mapped_percent'] = 100.0 * (float(data['reads']['segmented'][result_index])/float(reads))
dest['abundance'] = [(key, 100.0*data['reads']['germline'][key][result_index]/reads) for key in data['reads']['germline']]
tmp = {} tmp = {}
for c in data['clones']: for c in data['clones']:
......
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