Commit 05463b76 authored by Thonier Florian's avatar Thonier Florian

utils.py, add a specific loop to use normalized_reads field.

This field should show a null value instead of 0 if not present
link to #3943
parent bac84808
...@@ -52,8 +52,12 @@ def concatenate_with_padding(d, ...@@ -52,8 +52,12 @@ def concatenate_with_padding(d,
continue continue
d[key] = d1[key] d[key] = d1[key]
if key not in d2 : ### For field normalized_reads, we prefer set it at None if not available for a timepoint
# Create a specific loop for it
if key not in d2 and key != "normalized_reads":
d[key] += t2 d[key] += t2
elif key == "normalized_reads":
d[key] += [None]*len(d2["reads"])
for key in d2: for key in d2:
if key in ignore_keys: if key in ignore_keys:
...@@ -61,8 +65,10 @@ def concatenate_with_padding(d, ...@@ -61,8 +65,10 @@ def concatenate_with_padding(d,
if type(d2[key]) is not list: if type(d2[key]) is not list:
continue continue
if key not in d : if key not in d and key != "normalized_reads":
d[key] = t1 + d2[key] d[key] = t1 + d2[key]
elif key == "normalized_reads":
d[key] = [None]*len(d1["reads"]) + d2[key]
else : else :
d[key] = d[key] + d2[key] d[key] = d[key] + d2[key]
......
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