1. Installation
Here below are the instructions to install Sequana. There are different ways (source, bioconda, singularity, conda environment, pip). Let us summarize the different methods for you.
If you want the latest version of Sequana, you should install it from source (see From GitHub Source code). Otherwise, you can install a release of Sequana from the Pypi website (using pip). Note that for pipelines, which are now independent Python packages, we also use Pypi releases. However, third-party dependencies (not Python) should be installed manually. Most of them are provided through Anaconda channels. See the From bioconda Section for details on how to set up Conda.
For instance, if you want to use the sequana_fastqc pipelinem you must install fastqc yourself, which is not a Python package.
If you just want to test Sequana or Sequanix (see note here below) or one of the Sequana standalone, we also provide Singularity containers as explained in the Singularity/Apptainer section.
1.1. Latest recommended installation method
Sequana is maintained under Python 3.8 and above (Dev 2023).
We strongly recommend to use a virtual environment so that (i) you can install all requirements without root permissions and (ii) you do not interfer with your system.
We will use conda for that. Before starting you should install and set the channels as explained in the From bioconda section. Then, create an environment. Here we set Python to 3.8 but could be 3.9 or 3.10:
conda create --name sequana_env python=3.8
source activate sequana_env
1.1.1. pip installation
For the latest release of Sequana:
pip install sequana --upgrade
This will install all Python dependencies such as Pandas, Numpy, etc.
1.1.2. pipelines
Sequana pipelines are now easily installable using pip:
pip install sequana_rnaseq
pip install sequana_fastqc
pip install sequana_demultiplex
pip install sequana_pacbio_qc
# etc
The dependencies of this pipeline must be dealt with by the developer or users. Each pipeline has its own repository on github (https://github.com/sequana/sequana_PIPELINENAME) where more details about specific dependencies are provided. Note, however, that all pipelines can be launched with apptainers so theoritecally, only Python is required (and apptainer).
A set of predefined pipelines can be installed using:
pip install sequana[pipelines]
1.2. Other solutions (overview)
Bioconda. Sequana is available on conda/bioconda as a pre-compiled package:
# Note that its version may be behind the pypi releases conda install sequana
From source. If you prefer to install everything yourself, the source code is available on github (http://github.com/sequana/sequana):
git clone https://github.com/sequana/sequana cd sequana pip install sequana .
# Singularity/Apptainer
We provide container with sequana shipped inside (no pipelines) within the damona project (https:://github.com/cokelaer/damo/Apptainer
We provide container with sequana shipped inside (no pipelines) within the damona project (https:://github.com/cokelaer/damon/Apptainer
We provide container with sequana shipped inside (no pipelines) within the damona project (https:://github.com/cokelaer/damon/Apptainer
We provide container with sequana shipped inside (no pipelines) within the damona project (https:://github.com/cokelaer/damona))
These three methods are detailled hereafter.
1.3. From bioconda
If you have not installed Sequana, be aware that many dependencies need to be compiled (i.e., time consumming and requires proper C compilator). Besides, many pipelines rely on third-party software such as BWA or samtools that are not Python libraries. We therefore recommend to use conda that provides pre-compiled software for you.
1.3.1. Install conda executable
Warning
this is currently broken on bioconda. We advise you to install sequana with Python (pip) for the latest versions.
In practice, we do use Anaconda . We recommend to install conda executable via the manual installer (download). You may have the choice between Python 2 and 3. We recommend to choose a Python version 3.
1.3.2. Add bioconda channels
When you want to install a new package, you have to use this type of syntax:
conda install ipython
where ipython is the package you wish to install. Note that by default, conda looks on the official Anaconda website (channel). However, there are many channels available. We will use the bioconda channel. To use it, type these commands (once for all):
conda config --add channels r
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda
Warning
it is important to add them in this order, as mentionned on bioconda webpage (https://bioconda.github.io/).
If you have already set the channels, please check that the order is correct. With the following command:
conda config --get channels
You should see:
--add channels 'r' # lowest priority
--add channels 'defaults'
--add channels 'conda-forge'
--add channels 'bioconda' # highest priority
As of May 2020, the recommended order is now:
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
1.3.3. Create an environment
Once conda is installed and the channels set, open a new shell. Although this is not required strictly speaking, we would recommend to create an environment dedicated to Sequana. This environment can later be removed without affecting your system or conda installation. A conda environment is nothing else than a directory and can be created as follows:
conda create --name sequana_env 'python=3.8'
Then, since you may have several environments, you must activate the sequana environment itself (each time you open a new shell):
source activate sequana_env
1.3.4. Installation
Sequana is on bioconda. You can follow these instructions or type:
conda install sequana
1.4. From GitHub Source code
Finally, if you are a developer and wish to use the latest code, you can install sequana in develop mode as follows:
conda create --name sequana 'python=3.8'
source activate sequana
git clone git@https://github.com:sequana/sequana.git
cd sequana
pip install -e .
# to perform testing and documentation:
pip install -e .[doc,testing]
This should install most of the required dependencies. However, you may need to install more packages depending on the pipeline used (related to Qt for instance).
1.5. Singularity/Apptainer
We maintain a version of sequana within the Damona project.
You can download e.g version 0.16.2 and use it as follows:
wget https://zenodo.org/record/10258126/files/sequana_0.16.2.img
singularity sequana_0.16.2.img sequana --help