Installation#
modality
is currently supported on Linux and MacOS.
Prerequisites#
The Python programming language is required to run modality
. Python version 3.11 is recommended, while version 3.10 is also supported.
The modality.annotation
submodule provides access to genomic data retrieved from GENCODE. To use it, the HTSlib and Samtools libraries need to be installed.
Quickstart#
Below you can find a step-by-step guide to set up your environment and install modality
. We provide instructions for different levels of familiarity with Python and the command line.
I have Python installed#
If you already have Python installed, first create a Python virtual environment for your modality work, and then install modality
using pip
from the biomodal package repository:
# example for creating and activating a virtual environment
# > python3 -m venv venv
# > source venv/bin/activate
# install modality
pip install --extra-index-url https://europe-python.pkg.dev/prj-biomodal-modality/modality-pypi/simple modality
HTSlib and Samtools can be installed with one of the following options:
I’m new to Python but familiar with the command line#
If you are comfortable working in the command line, the pyenv Python version manager would be a good choice to install Python. pyenv makes it easy to create and manage multiple Python environments for different projects from the command line.
After installing pyenv, use it to install Python and create a virtual environment for your modality work:
# install Python 3.11
pyenv install 3.11
# create and activate a virtual environment
pyenv virtualenv 3.11 modality
# automatically activate the virtual environment in the modality project directory
pyenv local modality
# or manually activate the virtual environment
# > pyenv activate modality
# install modality
pip install --extra-index-url https://europe-python.pkg.dev/prj-biomodal-modality/modality-pypi/simple modality
Install HTSlib and Samtools from the official source distribution.
I’m new to Python and the command line#
If you are new to Python and are more comfortable with graphical programs than the command line, the Anaconda distribution is a good choice to install Python. Anaconda is free and open source, easy to use, includes many of the most popular Python packages for data exploration and analysis, and makes it easy to install popular bioinformatics and genomics tools.
After installing Anaconda, create a virtual environment for your modality work using the commands below (in your terminal):
# create and activate virtual environment
conda create --name modality python=3.11
conda activate modality
# install modality
pip install --extra-index-url https://europe-python.pkg.dev/prj-biomodal-modality/modality-pypi/simple modality
Install HTSlib and Samtools with conda in the same virtual environment:
conda install -c bioconda htslib samtools