Commit 5e9d6a9d authored by Thonier Florian's avatar Thonier Florian

fuse.py; move up some statement into the main fct.

Allow to compute distributions before the cut step
link to #3902
parent e082c0b9
......@@ -893,6 +893,22 @@ def main():
jlist_fused = None
LISTE_D = []
LIST_AXES = ["germline", # "top", # "name"
"seg5", "seg4", "seg3",
"lenSeq", # "evalue", l'arrondir ?
"seg5_delRight", "seg3_delLeft", "seg4_delRight", "seg3_delLeft",
"insert_53", "insert_54", "insert_43",
#"seg5_stop", "seg3_start", "seg4_stop", "seg4_start",
"lenCDR3", # "cdr3_stop", "cdr3_start",
"productive" #"junction_start", "junction_stop",
]
for axe1 in LIST_AXES:
LISTE_D.append([axe1])
for axe2 in LIST_AXES:
if axe1 != axe2:
LISTE_D.append([axe1, axe2])
print("### fuse.py -- " + DESCRIPTION)
print()
......@@ -964,6 +980,9 @@ def main():
jlist.loads(json_reads, args.pipeline)
else:
jlist.load(path_name, args.pipeline)
if args.distributions or args.only_disributions:
jlist.init_distrib(LISTE_D)
jlist.compute_distribution(LISTE_D)
jlist.build_stat()
jlist.filter(f)
......@@ -1014,28 +1033,9 @@ def main():
jlist_fused.d["similarity"] = [];
LISTE_D = []
LIST_AXES = ["germline", "top", # "name"
"seg5", "seg4", "seg3",
"lenSeq", # "evalue", l'arrondir ?
"seg5_delRight", "seg3_delLeft", "seg4_delRight", "seg3_delLeft",
"insert_53", "insert_54", "insert_43",
#"seg5_stop", "seg3_start", "seg4_stop", "seg4_start",
"lenCDR3", # "cdr3_stop", "cdr3_start",
"productive" #"junction_start", "junction_stop",
]
for axe1 in LIST_AXES:
LISTE_D.append([axe1])
for axe2 in LIST_AXES:
if axe1 != axe2:
LISTE_D.append([axe1, axe2])
if args.distributions or args.only_disributions:
print("### Save distributions file")
jlist_fused.init_distrib(LISTE_D)
jlist_fused.compute_distribution(LISTE_D)
if args.only_disributions:
jlist_fused.save_distributions("distribs.json")
print("### Save distributions file")
jlist_fused.save_distributions(args.output.replace(".vidjil", ".json"))
return
print("### Save merged file")
......
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