Commit e9aac210 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team Windows.__add__() also uses concatenate_with_padding()

0ee4e4e9 forgot this one
parent 24ac221f
......@@ -134,30 +134,10 @@ class Window:
myList = [ "seg", "top", "id", "sequence", "name", "id", "stats", "germline"]
obj = Window(1)
t1 = []
t2 = []
for i in range(len(self.d["reads"])):
for i in range(len(other.d["reads"])):
#concat data, if there is some missing data we use an empty buffer t1/t2
#with the same size as the number of misssing data
for key in self.d :
if key not in myList and type(self.d[key]) is list:
obj.d[key] = self.d[key]
if key not in other.d :
obj.d[key] += t2
else :
obj.d[key] = self.d[key]
for key in other.d :
if key not in myList and type(other.d[key]) is list:
if key not in obj.d:
obj.d[key] = t1 + other.d[key]
else :
obj.d[key] += other.d[key]
self.d, len(self.d["reads"]),
other.d, len(other.d["reads"]),
#keep other data who don't need to be concat
if other.d["top"] < self.d["top"] :
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