-
Notifications
You must be signed in to change notification settings - Fork 34
Running the analysis
If all the paths and individual configurations are defined in the config.yaml file (see configuration) and conda is available (see managing software), the workflow can be run from the command line with
snakemake --use-conda
Snakemake will create a conda environment from the envs/environment.yaml file and it will activate the environment before executing all rules with the conda directive. If you are an experienced conda user, you can specify a different environment for each rule within the Snakefile, and the correct environment will be activated.
If you want to use multiple cores, just do
snakemake --use-conda --cores 12
First make sure the paths to all your input files are specified correctly in the config.yaml (see here). Relative paths will be interpreted relative to the Snakefile directory! To run the workflow outside of the folder containing the Snakefile (and all the scripts), specify the Snakefile path, and the path to the folder containing this file
snakemake --use-conda -s <path-to-Snakefile> -d <workdir>
Where workdir is the directory of the Snakefile
If you want to use a config.yaml file that is not located in the Snakefile directory, you can specify it with the --configfile parameter. Run the workflow from the Snakefile directory with
snakemake --use-conda --configfile <path-to-config.yaml>
Or see above for how to run the workflow from an arbitrary directory.
After setting up your conda environment and system R installation (as described here), activate the environment and from within the environment run the pipeline with snakemake. For multiple cores use snakemake --cores 12
In case you have all the necessary software in your path (see here) and you don't want to use conda, simply run the workflow without the --use-conda parameter:
snakemake