.. _installing-label:
Installing Flair
================
BioConda Install
~~~~~~~~~~~~~~~~
The easiest way to install Flair and all of its dependencies is via BioConda:
.. code:: sh
conda create -n flair -c conda-forge -c bioconda flair
conda activate flair
flair [align/correct/...]
On Apple Silicon Mac systems (ARM64 CPUs: M1, M2, ...) you must use:
.. code:: sh
CONDA_SUBDIR=osx-64 conda create -n flair
conda activate flair
conda config --env --set subdir osx-64
conda config --add channels bioconda
conda config --add channels conda-forge
conda install flair
Note that mamba currently fails to install FLAIR on Mac ARM64.
If you are going to use the ``diffexp`` or ``diffsplice`` modules,
you need to add addition packages to the Conda environment with:
.. code:: sh
conda env update --name flair --file https://github.com/BrooksLabUCSC/flair/releases/download/v2.2.0/flair_diffexp_conda_env.yaml
Conda Install from GitHub Release
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BioConda release are often delayed by the manual review process. To create
a Conda environment from a release in GitHub, use:
.. code:: sh
conda env create -n flair -c conda-forge --file https://github.com/BrooksLabUCSC/flair/releases/download/v2.2.0/flair_conda_env.yaml
conda activate flair
To add the `diffexp` or `diffsplice` dependencies:
.. code:: sh
conda env update --name flair --file https://github.com/BrooksLabUCSC/flair/releases/download/v2.2.0/flair_diffexp_conda_env.yaml
Running FLAIR with Docker
~~~~~~~~~~~~~~~~~~~~~~~~~
FLAIR releases are also available as a Docker images, which includes the R
dependencies to run ``diffexp`` and ``diffsplice``. Obtain and run the
FLAIR Docker with:
.. code:: sh
docker pull brookslab/flair:2.2.0
docker run -v [your_path_to_data]:/data brookslab/flair:2.2.0 flair [align/correct/...]
.. _pip-install-label:
Pip install
~~~~~~~~~~~
To install with pip, you must first install these packages. This can be done
with Conda, yes system package manager or by downloading and compiling,
- `bedtools `_
- `samtools `_
- `minimap2 `_
.. code:: sh
pip install flair-brookslab
The``flair diffexp`` and ``flair diffsplice`` modules require ``R`` , along
with these ``R`` packages. Some of these do not work on Apple Silicon.
- `DESeq2 `__
- `ggplot2 `__
- `qqman `__
- `DRIMSeq `__
- `stageR `__
.. code:: sh
pip install flair-brookslab[diffexp]
Running from GitHub clone
~~~~~~~~~~~~~~~~~~~~~~~~~
The dependence must first be installed as for :ref:`pip-install-label`.
.. code:: sh
git clone https://github.com/BrooksLabUCSC/flair.git
cd flair
./bin/flair [align/correct/...]