Table of Contents
Snakemake 修改默认工作目录
Snakemake 默认使用 snakefile 所在的目录作为工作目录。但是,工作目录可以使用命令行参数 –directory/-d 或者在 snakefile 中指定 workdir 来修改。但是,工作目录的修改对 conda file 路径无效,请直接指定。
命令行参数
命令行参数中的路径需要使用引号进行包裹。建议使用相对路径,无法将“~”识别为家目录。
–directory, -d
Specify working directory (relative paths in the snakefile will use this as their origin).
snakefile
All paths in the snakefile are interpreted relative to the directory snakemake is executed in. This behaviour can be overridden by specifying a workdir in the snakefile:
workdir: "path/to/workdir"
Usually, it is preferred to only set the working directory via the command line, because above directive limits the portability of Snakemake workflows.