Skip to content

Commit c9496e6

Browse files
committed
Fix: unset any R-related ENV vars related to system-level and user-level package installations.
1 parent b5b02af commit c9496e6

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

workflow/rules/isoformswitchanalyzer.smk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ rule isoformswitchanalyzer_diffswitching:
326326
threads: int(allocated("threads", "isoformswitchanalyzer_diffswitching", cluster))
327327
container: config["images"]["isoformswitchanalyzer"]
328328
shell: """
329+
# Unset any R-related env variables
330+
# that may have been inherited from
331+
# the user environment
332+
unset R_LIBS_USER; unset R_LIBS_SITE;
329333
# Run differential switching analysis for:
330334
# {wildcards.case} vs. {wildcards.control}
331335
{params.script} \\

workflow/rules/leafcutter.smk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ rule leafcutter_gtf2exons:
3232
threads: int(allocated("threads", "leafcutter_gtf2exons", cluster))
3333
container: config["images"]["leafcutter"]
3434
shell: """
35+
# Unset any R-related env variables
36+
# that may have been inherited from
37+
# the user environment
38+
unset R_LIBS_USER; unset R_LIBS_SITE;
3539
# Get information for each exon, i.e
3640
# chr, start, end, strand, gene_name
3741
gtf_to_exons.R \\
@@ -345,6 +349,10 @@ rule leafcutter_diffsplicing:
345349
threads: int(allocated("threads", "leafcutter_diffsplicing", cluster))
346350
container: config["images"]["leafcutter"]
347351
shell: """
352+
# Unset any R-related env variables
353+
# that may have been inherited from
354+
# the user environment
355+
unset R_LIBS_USER; unset R_LIBS_SITE;
348356
# Run differential splicing analysis for:
349357
# {wildcards.case} vs. {wildcards.control}
350358
leafcutter_ds.R \\
@@ -392,6 +400,10 @@ rule leafcutter_prepleafviz:
392400
threads: int(allocated("threads", "leafcutter_prepleafviz", cluster))
393401
container: config["images"]["leafcutter"]
394402
shell: """
403+
# Unset any R-related env variables
404+
# that may have been inherited from
405+
# the user environment
406+
unset R_LIBS_USER; unset R_LIBS_SITE;
395407
# Create input leafviz Rdata file for:
396408
# "{wildcards.case} vs. {wildcards.control}"
397409
prepare_results.R \\

0 commit comments

Comments
 (0)