Commit 722bafee authored by Thonier Florian's avatar Thonier Florian

fuse.py; remove previous distribution computing

link to #3902
parent 61e9b25e
......@@ -638,33 +638,6 @@ class ListWindows(VidjilJson):
return obj_dict
def get_distribution(self, top, list_jfile):
""" Compute distributions of clone sequence length on smaller clones """
distributions = []
for jlist in list_jfile:
data = jlist.d
# Make a loop on each timepoint
for t in range(data["samples"].d["number"]):
distrib = defaultdict(lambda:0)
for clone in data["clones"]:
if clone.d["top"] <= top:
continue
# If data haven't been proceed with -y all; sequence will be 0
try:
lenNt = len(clone.d["sequence"])
except:
lenNt = 0
nb_reads = clone.d["reads"][t]
distrib[lenNt] += nb_reads
distributions.append( dict(distrib) )
self.d["distributions"] = distributions
return
### some data used for test
w1 = Window(1)
......@@ -784,7 +757,6 @@ def main():
#filtre
f = []
list_jfile = [] # Keep for distributions computing
if args.ijson:
from vidjilparser import VidjilParser
......@@ -800,7 +772,6 @@ def main():
else:
jlist = ListWindows()
jlist.load(path_name, args.pipeline)
list_jfile.append(jlist)
f += jlist.getTop(args.top)
f = sorted(set(f))
......@@ -887,7 +858,6 @@ def main():
else :
jlist_fused.d["similarity"] = [];
jlist_fused.get_distribution(args.top, list_jfile)
print("### Save merged file")
jlist_fused.save_json(args.output)
......
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