diff --git a/jass/tasks.py b/jass/tasks.py index a17a8bcae4dc1be36545778c9e58d6ce16ffa671..fb8fef83454bbc5d3a889a379af3e9c997493e13 100644 --- a/jass/tasks.py +++ b/jass/tasks.py @@ -188,7 +188,14 @@ def launch_create_project( create_project_qq_plot.si(worktable_path, qq_plot_path) ) if delayed_gen_csv_file and (csv_file is not None): + # We use a chain operator between create_worktable_file and + # create_project_csv_file. + # As we put a mutable signature to create_project_csv_file + # (with .s () instead of .si ()), + # it adds the return code (Nchunk) of create_worktable_file to + # the call of create_project_csv_file as the first parameter. post_worktable_jobs.append(create_project_csv_file.s(worktable_path, csv_file)) + post_worktable_tasks_group = group(post_worktable_jobs) main_wf = chain( create_project_worktable_file.si( @@ -219,6 +226,7 @@ def create_project( chromosome: str = None, start: str = None, end: str = None, + to_init: str = "0", ): available_phenotype_ids = [phenotype.id for phenotype in available_phenotypes] @@ -247,8 +255,11 @@ def create_project( zoom_plot_path = None delayed_gen_csv_file = True + The_project_status = project.get_initialized(to_init) + print("The_project_status={}".format(The_project_status)) + # if project does not exist - if project.status == Project.DOES_NOT_EXIST: + if The_project_status == Project.DOES_NOT_EXIST: os.makedirs(project.get_folder_path()) launch_create_project( phenotype_ids=phenotype_ids,