lts_workflows_sm_scrnaseq.core package

Submodules

lts_workflows_sm_scrnaseq.core.utils module

lts_workflows_sm_scrnaseq.core.utils.get_samples(config, logger)[source]
lts_workflows_sm_scrnaseq.core.utils.python2_path(config, logger)[source]

Add python 2 path if possible

lts_workflows_sm_scrnaseq.core.utils.to_min(timestr)[source]

lts_workflows_sm_scrnaseq.core.wrappers module

lts_workflows_sm_scrnaseq.core.wrappers.lts_workflows_sm_scrnaseq_wrapper()[source]

Wrapper for running lts_workflows_sm_scrnaseq workflow. Any argument will be passed to snakemake. Consequently, this means you must supply a workflow target to run the workflow. By default, the wrapper will use a generic Snakefile shipped with the package. Note that in this case you must supply a configuration file via the –configfile option.

Examples

$ lts_workflows_sm_scrnaseq -l
$ lts_workflows_sm_scrnaseq all --configfile config.yaml -d /path/to/workdir

If the docker image is used to run the workflow, this wrapper serves as the entry point. The image uses gosu to set the user id of the main process, which defaults to user id 9001. In order to run as the local user, the environment variable LOCAL_USER_ID must be passed to the docker run process (recommended).

Examples

$ docker run scilifelablts/lts-workflows-sm-scrnaseq
$ docker run -v /path/to/workdir:/workspace -w /workspace scilifelablts/lts-workflows-sm-scrnaseq all --configfile config.yaml
$ docker run -e LOCAL_USER_ID=1000 -v /path/to/workdir:/workspace -w /workspace scilifelablts/lts-workflows-sm-scrnaseq all --configfile config.yaml
$ docker run -e LOCAL_USER_ID=1000 -v /path/to/workdir:/workspace -w /workspace --entrypoint "/bin/bash" scilifelablts/lts-workflows-sm-scrnaseq

All commands are handled by the lts_workflows_sm_scrnaseq wrapper, but you can also explicitly call snakemake:

$ docker run -v /path/to/workdir:/workspace -w /workspace scilifelablts/lts-workflows-sm-scrnaseq snakemake all --configfile config.yaml

The wrapper runs a package Snakefile with the following minimum content:

from lts_workflows_sm_scrnaseq import WORKFLOW
include: WORKFLOW

If need be, extend this file with custom rules and directives and run it with the wrapper or as usual with regular Snakemake.

Module contents