From 4d17cd2337cde11319b35a318a310be81a1dba24 Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Wed, 4 Nov 2020 15:57:00 +0100 Subject: [PATCH] src/visu/figure_maker.py: removing the creation of a tmp file to speed up the creation of a figure made on the same input files --- src/visu/figure_maker.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/visu/figure_maker.py b/src/visu/figure_maker.py index 2da518f..75676b2 100644 --- a/src/visu/figure_maker.py +++ b/src/visu/figure_maker.py @@ -459,14 +459,10 @@ def create_figure(design: Path, bw_folder: Path, region_beds: List[Path], outfile += f'_file_norm' outfile += '.txt.gz' cov_file = output / outfile - if cov_file.is_file(): - df_cov = pd.read_csv(cov_file, sep="\t", compression='gzip') - else: - df_cov = create_full_table(df_exp, regions, nb_bin, environment, - bw_folder) - if norm is not None: - df_cov = bin_normalisation(df_cov, norm, cov_file) - df_cov.to_csv(cov_file, sep="\t", index=False, compression='gzip') + df_cov = create_full_table(df_exp, regions, nb_bin, environment, + bw_folder) + if norm is not None: + df_cov = bin_normalisation(df_cov, norm, cov_file) ordered_condition = [] for condition in df_exp['condition'].to_list(): if condition not in ordered_condition: -- GitLab