From 6984677a5dbdfb8f622f2e39dd93617af1fc1480 Mon Sep 17 00:00:00 2001 From: Jonas Birkelund Nilsson Date: Tue, 11 Mar 2025 11:59:56 +0100 Subject: [PATCH] Fix the environment --- Snakefile | 6 ++++++ envs/basic_dependencies.yaml | 20 ++++++++++++-------- scripts/I_filter_impact.staircase.py | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Snakefile b/Snakefile index 6eb29e8..11e4b1c 100644 --- a/Snakefile +++ b/Snakefile @@ -55,6 +55,8 @@ rule grid_search: valid_df = rules.eval_clonotypes.output.data output: grid = RES_DIR + "/eval_clonotypes/grid_search/{ext_thr}.csv" + conda: + "envs/basic_dependencies.yaml" shell: "python scripts/G1_grid_search.py \ --input {input.valid_df} \ @@ -72,6 +74,8 @@ rule extract_optimal_threshold: output: plots = expand(PLT_DIR + "/eval_clonotypes/grid_search/grid.{ext}", ext=["pdf", "png"]), opt_thr = RES_DIR + "/eval_clonotypes/threshold/opt.csv" + conda: + "envs/basic_dependencies.yaml" shell: "python scripts/G2_extract_optimal_threshold.py \ --data {input.valid} \ @@ -92,6 +96,8 @@ rule get_filters: output: lbl = RES_DIR + "/eval_clonotypes/threshold/{filtering_set}.yaml", flt = RES_DIR + "/eval_clonotypes/threshold/{filtering_set}.csv" + conda: + "envs/basic_dependencies.yaml" shell: "python scripts/H_set_filters.py \ --data {input.valid} \ diff --git a/envs/basic_dependencies.yaml b/envs/basic_dependencies.yaml index 0cbd658..95565cf 100755 --- a/envs/basic_dependencies.yaml +++ b/envs/basic_dependencies.yaml @@ -1,12 +1,16 @@ +name: basic_dependencies channels: - conda-forge - - conda - bioconda + - defaults dependencies: - - pandas = 1.3.3 - - numpy = 1.19.2 - - matplotlib = 3.0.3 #3.3.4 # - - seaborn = 0.11.2 #0.10.1 # - - openpyxl = 3.0.7 - - numexpr = 2.7.3 - - pyyaml = 5.1 + - python=3.10 + - numpy=1.23.0 + - pandas=1.3.5 + - matplotlib=3.5.1 + - pyyaml=6.0 + - snakemake=7.32.4 + - scipy=1.11.4 + - pip + - pip: + - seaborn diff --git a/scripts/I_filter_impact.staircase.py b/scripts/I_filter_impact.staircase.py index c7e0250..bcd96c2 100644 --- a/scripts/I_filter_impact.staircase.py +++ b/scripts/I_filter_impact.staircase.py @@ -143,7 +143,7 @@ def modify_legend(h,l): ax.set_xticklabels([]) if save: plt.savefig(title, bbox_inches='tight', dpi=100) - plt.show() + #plt.show() ##########################################################