Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 269d3dce authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

fuse.py: --no-clones

It's more regular to have the same mechanism to output the json file, with the associated metadata,
even when one wants only the distribution.
parent faa0055a
...@@ -816,13 +816,6 @@ class ListWindows(VidjilJson): ...@@ -816,13 +816,6 @@ class ListWindows(VidjilJson):
obj[values[0]][1] += nb_reads obj[values[0]][1] += nb_reads
return obj return obj
def save_distributions(self, foname):
# Compute aggreg just before export
fo = open(foname, "w")
json.dump(self.d["distributions"], fo, indent=2, sort_keys=True)
fo.close()
return
### some data used for test ### some data used for test
...@@ -930,7 +923,7 @@ def main(): ...@@ -930,7 +923,7 @@ def main():
group_options.add_argument('--test', action='store_true', help='run self-tests') group_options.add_argument('--test', action='store_true', help='run self-tests')
group_options.add_argument('--multi', action='store_true', help='merge different systems from a same timepoint (deprecated, do not use)') group_options.add_argument('--multi', action='store_true', help='merge different systems from a same timepoint (deprecated, do not use)')
group_options.add_argument('--distributions', '-d', action='store_true', help='compute distributions') group_options.add_argument('--distributions', '-d', action='store_true', help='compute distributions')
group_options.add_argument('--only_disributions', '-D', action='store_true', help='export only distributions') group_options.add_argument('--no-clones', action='store_true', help='do not output individual clones')
group_options.add_argument('--compress', '-c', action='store_true', help='compress point names, removing common substrings') group_options.add_argument('--compress', '-c', action='store_true', help='compress point names, removing common substrings')
group_options.add_argument('--pipeline', '-p', action='store_true', help='compress point names (internal Bonsai pipeline)') group_options.add_argument('--pipeline', '-p', action='store_true', help='compress point names (internal Bonsai pipeline)')
...@@ -1056,7 +1049,7 @@ def main(): ...@@ -1056,7 +1049,7 @@ def main():
print('\t==> merge to', jlist_fused) print('\t==> merge to', jlist_fused)
if args.distributions or args.only_disributions: if args.distributions:
print("### Compute distributions") print("### Compute distributions")
jlist_fused.init_distrib(LIST_DISTRIBUTIONS) jlist_fused.init_distrib(LIST_DISTRIBUTIONS)
jlist_fused.compute_distribution(LIST_DISTRIBUTIONS) jlist_fused.compute_distribution(LIST_DISTRIBUTIONS)
...@@ -1095,11 +1088,9 @@ def main(): ...@@ -1095,11 +1088,9 @@ def main():
else : else :
jlist_fused.d["similarity"] = []; jlist_fused.d["similarity"] = [];
if args.no_clones:
if args.only_disributions: # TODO: do not generate the list of clones in this case
print("### Save distributions file") del jlist_fused.d["clones"]
jlist_fused.save_distributions(args.output.replace(".vidjil", ".json"))
return
print("### Save merged file") print("### Save merged file")
jlist_fused.save_json(args.output) 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