Skip to content

Commit a4d55b5

Browse files
authored
Merge pull request #3 from tdayris/master
[fix] (NameError): extra is now defined (see issue #2)
2 parents b9d0b48 + 46b82fd commit a4d55b5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

snakemake_wrapper_utils/java.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ def get_java_opts(snakemake):
44
"""Obtain java_opts from params, and handle resource definitions in resources."""
55

66
java_opts = snakemake.params.get("java_opts", "")
7+
extra = snakemake.params.get("extra", "")
8+
79
# Getting memory in megabytes, if java opts is not filled with -Xmx parameter
810
# By doing so, backward compatibility is preserved
911
if "mem_mb" in snakemake.resources.keys():
@@ -28,6 +30,8 @@ def get_java_opts(snakemake):
2830
if "java_temp" in snakemake.output.keys():
2931
if "-Djava.io.tmpdir" in java_opts:
3032
sys.exit("You have specified output.java_temp and provided `-Djava.io.tmpdir` in params.java_opts. Please choose the one you intended and remove the other specification.")
33+
if "-Djava.io.tmpdir" in extra:
34+
sys.exit("You have specified output.java_temp and provided `-Djava.io.tmpdir` in params.extra. Please choose the one you intended and remove the other specification.")
3135
java_opts += " -Djava.io.tmpdir={}".format(snakemake.output["java_temp"])
3236

3337
return java_opts

0 commit comments

Comments
 (0)