Is there a way to access the --jobs (or -j) parameter specified on the command line when running snakemake
directly in the Snakefile without going through a parsing of the command line (sys.argv, argparse, etc...)?
One would think all command line parameters are stored in a python object accessible from within the Snakefile but I can't manage to find any documentation on that.
I am basically trying to retrieve the number of jobs given by the user to use a different parallelization system on a bottleneck script.
Thanks a lot.
Asked
Active
Viewed 128 times
3

Eric C.
- 3,310
- 2
- 22
- 29
-
Currently not, but I understand your motivation. May I ask you to file an issue? – Johannes Köster Jul 19 '18 at 16:25
-
@JohannesKöster Sure I'll try as soon as I have two minutes. Thx for the nice job on sm !! – Eric C. Jul 20 '18 at 16:05
-
Related to this, I would find it useful if one could access other command line flags from within a script. Potential use case: Do or Don't redirect `stdout` to file based on whether the rule is run with `--debug` flag. – Martin Aug 16 '18 at 08:03