Skip to content

Commit

Permalink
comment global.yaml, add nodefaults and replace snakemake@source
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichl committed Dec 20, 2024
1 parent 0f844f5 commit eb2f051
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion workflow/Snakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

##### global workflow dependencies #####
conda: "envs/global.yaml"
# conda: "envs/global.yaml"

##### libraries #####
import os
Expand Down
2 changes: 1 addition & 1 deletion workflow/envs/ggplot.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
channels:
- conda-forge
- defaults
- nodefaults
dependencies:
- r-ggplot2=3.4.2
- r-data.table=1.14.8
2 changes: 1 addition & 1 deletion workflow/envs/heatmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
channels:
- conda-forge
- bioconda
- defaults
- nodefaults
dependencies:
- r-ggplot2=3.4.2
- r-ggplotify=0.1.0
Expand Down
2 changes: 1 addition & 1 deletion workflow/envs/seurat.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
channels:
- conda-forge
- bioconda
- defaults
- nodefaults
dependencies:
- r-seurat=4.4.0
- bioconductor-limma=3.58.1
Expand Down
2 changes: 1 addition & 1 deletion workflow/envs/volcanos.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
channels:
- conda-forge
- bioconda
- defaults
- nodefaults
dependencies:
- bioconductor-enhancedvolcano=1.20.0
- r-data.table=1.14.10
Expand Down
2 changes: 2 additions & 0 deletions workflow/rules/dea.smk
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ rule aggregate:
assay = lambda w: annot_dict["{}".format(w.analysis)]["assay"],
metadata = lambda w: annot_dict["{}".format(w.analysis)]["metadata"],
control = lambda w: annot_dict["{}".format(w.analysis)]["control"],
utils_path = workflow.source_path("../scripts/utils.R"),
script:
"../scripts/aggregate.R"

Expand All @@ -80,5 +81,6 @@ rule feature_lists:
assay = lambda w: annot_dict["{}".format(w.analysis)]["assay"],
metadata = lambda w: annot_dict["{}".format(w.analysis)]["metadata"],
control = lambda w: annot_dict["{}".format(w.analysis)]["control"],
utils_path = workflow.source_path("../scripts/utils.R"),
script:
"../scripts/aggregate.R"
1 change: 1 addition & 0 deletions workflow/rules/visualize.smk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rule volcanos:
assay = lambda w: annot_dict["{}".format(w.analysis)]["assay"],
metadata = lambda w: annot_dict["{}".format(w.analysis)]["metadata"],
control = lambda w: annot_dict["{}".format(w.analysis)]["control"],
utils_path = workflow.source_path("../scripts/utils.R"),
script:
"../scripts/volcanos.R"

Expand Down
3 changes: 2 additions & 1 deletion workflow/scripts/aggregate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

# source utility functions
# source("workflow/scripts/utils.R")
snakemake@source("./utils.R")
# snakemake@source("./utils.R") # does not work when loaded as module (https://github.com/snakemake/snakemake/issues/2205)
source(snakemake@params[["utils_path"]])

# inputs
dea_result_path <- snakemake@input[["dea_results"]]
Expand Down
3 changes: 2 additions & 1 deletion workflow/scripts/heatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ library("reshape2")

# source utility functions
# source("workflow/scripts/utils.R")
snakemake@source("./utils.R")
# snakemake@source("./utils.R") # does not work when loaded as module (https://github.com/snakemake/snakemake/issues/2205)
source(snakemake@params[["utils_path"]])

# inputs
dea_result_path <- snakemake@input[["results"]]
Expand Down
3 changes: 2 additions & 1 deletion workflow/scripts/volcanos.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ options(ragg.max_dim = 100000) # required for large volcano panels

# source utility functions
# source("workflow/scripts/utils.R")
snakemake@source("./utils.R")
# snakemake@source("./utils.R") # does not work when loaded as module (https://github.com/snakemake/snakemake/issues/2205)
source(snakemake@params[["utils_path"]])

# inputs
dea_result_path <- snakemake@input[["results"]]
Expand Down

0 comments on commit eb2f051

Please sign in to comment.