Commit 077fb8d3 authored by Thonier Florian's avatar Thonier Florian

fuse.py; add statement to add distributions between to jlist object

link to #3902
parent 5e9d6a9d
......@@ -524,6 +524,22 @@ class ListWindows(VidjilJson):
obj.d["reads"] = self.d["reads"] + other.d["reads"]
obj.d["diversity"] = self.d["diversity"] + other.d["diversity"]
# verify that same file is not present twice
filename_jlist1 = self.d["distributions"]["repertoires"].keys()
filename_jlist2 = other.d["distributions"]["repertoires"].keys()
print( filename_jlist1+filename_jlist2 )
for filename in filename_jlist1:
if filename_jlist2.index(filename):
# raise
print( "error, duplicate file")
obj.d["distributions"] = {}
obj.d["distributions"]["repertoires"] = {}
for filename in filename_jlist1:
obj.d["distributions"]["repertoires"][filename] = self.d["distributions"]["repertoires"][filename]
for filename in filename_jlist2:
obj.d["distributions"]["repertoires"][filename] = other.d["distributions"]["repertoires"][filename]
return obj
###
......
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