Installation¶
Although installing lts_workflows_sm_scrnaseq
itself should be
easy enough, installing the workflow dependencies requires that you
perform some manual steps. The number of steps depend on the
installation route you take. For instance, the conda installation will
install all python3 dependencies on the fly.
Hint
Whatever installation route you choose, it is recommended to create conda environments for python2 and python3 packages. The workflow will be executed from the python3 environment and by default is configured to load a python2 environment named py2.7. You can modify the python2 environment name in the configuration setting config[‘conda’][‘python2’].
Stable release from Conda (including all dependencies)¶
Note
Make sure your channel order complies with the instructions provided by bioconda. In short, your ~/.condarc file should have the following channel configuration:
channels:
- bioconda
- conda-forge
The workflow depends on a couple of python2 packages that cannot be added as requirement to Conda. Therefore, these packages must be installed manually.
$ conda create -n py2.7 python=2.7 rpkmforgenes=1.0.1 rseqc=2.6.4
To install lts_workflows_sm_scrnaseq
, create a new environment,
activate it and install the package:
$ conda create -n lts-workflows-sm-scrnaseq -c scilifelab-lts lts-workflows-sm-scrnaseq
This is the preferred method to install
lts_workflows_sm_scrnaseq
, as it will always install the most
recent stable release.
Stable release from Conda (only workflow)¶
lts_workflows_sm_scrnaseq
is also shipped with all the
dependencies packaged in Docker/Singularity images. By running
either the whole workflow or the individual jobs in containers, you
can avoid having to install all the dependencies from Conda. If you’d
like to run Snakemake and the workflow itself on the host system but
execute the jobs in containers, then you can install a lightweight version
version with:
$ conda create -n lts-workflows-sm-scrnaseq -c scilifelab-lts lts-workflows-sm-scrnaseq-slim
See Usage for details on how this works.
From sources¶
The sources for lts_workflows_sm_scrnaseq can be downloaded from the Bitbucket repo.
$ git clone git@bitbucket.org:scilifelab-lts/lts-workflows-sm-scrnaseq.git
Once you have a copy of the source, you can install it with:
$ cd lts-workflows-sm-scrnaseq
$ python setup.py install
You can also install in development mode with:
$ python setup.py develop
See the section on Development for more information.
You can setup the python 2 packages as in the previous section, or by using the environment file lts_workflows_sm_scrnaseq/environment-27.yaml:
$ conda env create -n py2.7 -f lts_workflows_sm_scrnaseq/environment-27.yaml
Tests¶
If lts_workflows_sm_scrnaseq
has been installed as a module, run
$ pytest -v -rs -s --pyargs lts_workflows_sm_scrnaseq
In order to load the pytest options provided by the module, the full path to the test suite needs to be given:
$ pytest -v -rs -s /path/to/lts_workflows_sm_scrnaseq/tests
See Test-based development for more information.