From b40c5634cf823d1c4cd2332bae4c4f17da31a923 Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Wed, 17 Feb 2021 09:52:11 +0100 Subject: [PATCH] src/find_interaction_cluster/clip_figures/clip_launcher_4_many_communities.py: chnage tiles in merge_figures function + pep8 changes --- .../clip_figures/clip_launcher_4_many_communities.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/find_interaction_cluster/clip_figures/clip_launcher_4_many_communities.py b/src/find_interaction_cluster/clip_figures/clip_launcher_4_many_communities.py index 9d5b0616..f860053a 100644 --- a/src/find_interaction_cluster/clip_figures/clip_launcher_4_many_communities.py +++ b/src/find_interaction_cluster/clip_figures/clip_launcher_4_many_communities.py @@ -61,7 +61,7 @@ def select_community_file(project: str, weight: int, global_weight: int, return com_file, output -def create_figure(p: Dict , clip_file: Path, +def create_figure(p: Dict, clip_file: Path, feature_bed: Path, community_file: Tuple[str, str], test_type: str = "permutation", @@ -115,7 +115,7 @@ def merge_figures(folder: Path) -> None: :param folder: A folder containing pdf files """ fig_name = folder.name - cmd = f"montage -geometry +1+1 -tile 1X6 " \ + cmd = f"montage -geometry +1+1 -tile 1X4 " \ f"-compress jpeg -density 100 -label %t -pointsize 50 " \ f"{folder}/*.tmp.pdf {folder}/{fig_name}.pdf" sp.check_call(cmd, shell=True) @@ -129,7 +129,7 @@ def clip_folder_analysis(clip_folder: str, weight: int, cell_line: str = "ALL", feature: str = "exon", test_type: str = "permutation", - iteration: int = 10000, display_size: bool=False, + iteration: int = 10000, display_size: bool = False, sl_reg: bool = False) -> None: """ Create the final figure @@ -153,7 +153,6 @@ def clip_folder_analysis(clip_folder: str, weight: int, False to display nothing. (default False) :param sl_reg: True to display the FaRLine regulation of the \ same factor, False to not display it. - :param ps: The number of processes to create (default 1) """ logging_def(ConfigGraph.community_folder, __file__, "INFO") clip_folder = Path(clip_folder) @@ -167,7 +166,7 @@ def clip_folder_analysis(clip_folder: str, weight: int, "cell_line": cell_line, "feature": feature} prod = list(product(files, zip(ConfigClip.communities, - ConfigClip.communities_name))) + ConfigClip.communities_name))) pool = mp.Pool(processes=min(len(prod), ConfigGraph.cpu)) for mfile, community_file in prod: if community_file[0] == "": @@ -184,4 +183,4 @@ def clip_folder_analysis(clip_folder: str, weight: int, if __name__ == "__main__": - clip_folder_analysis() \ No newline at end of file + clip_folder_analysis() -- GitLab