Commit 72d420ad authored by Thonier Florian's avatar Thonier Florian

utils; correction of conditions for normalized_reads count

link to #3943
parent 8940a141
...@@ -54,10 +54,11 @@ def concatenate_with_padding(d, ...@@ -54,10 +54,11 @@ def concatenate_with_padding(d,
d[key] = d1[key] d[key] = d1[key]
### For field normalized_reads, we prefer set it at None if not available for a timepoint ### For field normalized_reads, we prefer set it at None if not available for a timepoint
# Create a specific loop for it # Create a specific loop for it
if key not in d2 and key != "normalized_reads": if key not in d2:
d[key] += t2 if key != "normalized_reads":
elif key == "normalized_reads": d[key] += t2
d[key] += [None]*len(d2["reads"]) 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:
...@@ -65,10 +66,11 @@ def concatenate_with_padding(d, ...@@ -65,10 +66,11 @@ 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 and key != "normalized_reads": if key not in d:
d[key] = t1 + d2[key] if key != "normalized_reads":
elif key == "normalized_reads": d[key] = t1 + d2[key]
d[key] = [None]*len(d1["reads"]) + 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