Skip to content

Commit f0c40b1

Browse files
committed
comment global.yaml, add nodefaults and replace snakemake@source
1 parent af3af7c commit f0c40b1

File tree

10 files changed

+15
-8
lines changed

10 files changed

+15
-8
lines changed

workflow/Snakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
##### global workflow dependencies #####
3-
conda: "envs/global.yaml"
3+
# conda: "envs/global.yaml"
44

55
##### libraries #####
66
import os

workflow/envs/ggplot.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
channels:
22
- conda-forge
3-
- defaults
3+
- nodefaults
44
dependencies:
55
- r-ggplot2=3.3.6
66
- r-data.table=1.15.2

workflow/envs/heatmap.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
channels:
22
- conda-forge
33
- bioconda
4-
- defaults
4+
- nodefaults
55
dependencies:
66
- r-ggplot2=3.5.1
77
- r-ggplotify=0.1.2

workflow/envs/limma.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
channels:
22
- conda-forge
33
- bioconda
4-
- defaults
4+
- nodefaults
55
dependencies:
66
- bioconductor-limma=3.46.0
77
- bioconductor-edger=3.32.1

workflow/envs/volcanos.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
channels:
22
- conda-forge
33
- bioconda
4-
- defaults
4+
- nodefaults
55
dependencies:
66
- bioconductor-enhancedvolcano=1.20.0
77
- r-ggplot2=3.5.1

workflow/rules/dea.smk

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ rule aggregate:
7575
adj_pval = config["filters"]["adj_pval"],
7676
lfc = config["filters"]["lfc"],
7777
ave_expr = config["filters"]["ave_expr"],
78+
utils_path=workflow.source_path("../scripts/utils.R"),
7879
script:
7980
"../scripts/aggregate.R"
8081

@@ -104,5 +105,6 @@ rule feature_lists:
104105
adj_pval = config["filters"]["adj_pval"],
105106
lfc = config["filters"]["lfc"],
106107
ave_expr = config["filters"]["ave_expr"],
108+
utils_path=workflow.source_path("../scripts/utils.R"),
107109
script:
108110
"../scripts/aggregate.R"

workflow/rules/visualize.smk

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ rule volcanos:
2424
params:
2525
pCutoff = config["volcano"]["pCutoff"],
2626
FCcutoff = config["volcano"]["FCcutoff"],
27+
utils_path=workflow.source_path("../scripts/utils.R"),
2728
script:
2829
"../scripts/volcanos.R"
2930

@@ -52,5 +53,6 @@ rule lfc_heatmap:
5253
adj_pval = config["filters"]["adj_pval"],
5354
lfc = config["filters"]["lfc"],
5455
ave_expr = config["filters"]["ave_expr"],
56+
utils_path=workflow.source_path("../scripts/utils.R"),
5557
script:
5658
"../scripts/heatmap.R"

workflow/scripts/aggregate.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ library("data.table")
44

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

910
# inputs
1011
dea_result_path <- snakemake@input[["dea_results"]]

workflow/scripts/heatmap.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ library("data.table")
88

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

1314
# inputs
1415
# dea_lfc_path <- snakemake@input[["dea_lfc"]]

workflow/scripts/volcanos.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ library("data.table")
66

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

1112
# inputs
1213
dea_result_path <- snakemake@input[["dea_results"]]

0 commit comments

Comments
 (0)