Configuration

There are various aspect of pype that can be configured. Notably the installation paths of the modules are the most common variables that needs to be set.

By default the pype modules (snippets, pipelines, profiles and queues) are installed in the python library installation, within the package site-packages folder.

Retrieving the modules in the installation folder can made unnecessarily cumbersome to add/edit/change modules.

Configuring different paths for the modules, it also makes possible to easily switch from a set of modules to another (eg from a “stable” to a “development” set of modules).

The set of configuration variables are listed in the section “Available variables

Local configuration file

When a configuration file in ~/.bio_pype/config exists, the program will read the configuration to set the variables.

The configuration file looks like this:

PYPE_TMP=/tmp
PYPE_LOGDIR=/tmp/logs

Environment variable

Variables can also be set as environment variables. Setting a variable in the environment will override the corresponding variable if also set in the configuration file.

Available variables

Variable Description
PYPE_MODULES Sets the path of pipelines, profiles, queues and snippets at a prefix with the specified folder. It also overrides the path variable for each separate module.
PYPE_SNIPPETS Sets the path for the snippets module to the specified folder
PYPE_PROFILES Seta the path for the profiles module to the specified folder
PYPE_PIPELINES Sets the path for the pipelines module to the specified folder
PYPE_QUEUES Sets the path for the queues module to the specified folder
PYPE_REPOS Sets the path for the repos.yaml file to read
PYPE_NCPU It can be used to set the number of maximum CPUs to use when launching jobs in parallel without using an external scheduler.
PYPE_MEM It can be used to set the maximum amount of memory to use, when launching jobs in parallel without using an external scheduler
PYPE_TMP Sets a temporary folder that can be used in snippets using the ‘%(pype_tmp)s’ tag (or by loading __config__.PYPE_CONFIG in python snippets)
PYPE_LOGDIR Sets the path for the log files. By default is set to`~/.bio_pype/logs`
PYPE_DOCKER Sets the binary to launch docker or other container-based solution. The default value is docker. I also accepts full path of the binary. It support also udocker and singularity
PYPE_SINGULARITY_CACHE Sets the path for the singularity sif images. There is no default path for this variable