Commit 8e070fb3 authored by Ryan Herbert's avatar Ryan Herbert
Browse files compute extra check for keys and NoneType

See #3626
parent c9cf9aa9
Pipeline #49389 passed with stages
in 6 minutes and 45 seconds
......@@ -102,12 +102,14 @@ def compute_extra(id_file, id_config, min_threshold):
d = json.load(rf)
loci_min = {}
if 'reads' in d and 'germline' in d['reads']:
loci_totals = d['reads']['germline']
for locus in loci_totals:
if locus not in result:
result[locus] = [0]
loci_min[locus] = loci_totals[locus][0] * (min_threshold/100.0)
if 'clones' in d and d['clones'] is not None:
for clone in d["clones"]:
germline = clone['germline']
if clone['reads'][0] >= loci_min[germline]:
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