Install MAJIQ

The Various Repositories of MAJIQ

You can choose to use two versions of the repository depending on your goals. To use the same features that all collaborators and external users have access to, you can use the release versions in the academic repository:

The "stable" Repo

git+https://bitbucket.org/biociphers/majiq_academic.git

If you are using new features, either developed in the lab by you or someone else, you'll likely want to use the development repository instead. Note that you will need to configure your bitbucket account with either an ssh key (recommended) or app password to clone from the development repository, as it is not public. 

The MAJIQ  Repo

git+https://bitbucket.org/biociphers/majiq.git

The Various Ways To Install MAJIQ

The "venv" Method

This will install MAJIQ into a classic Python virtual environment. 

python3.10 -m venv env

source env/bin/activate

pip install git+https://bitbucket.org/biociphers/majiq.git

The "user" Method

This method will install MAJIQ in a directory in the user's home directory.  This beneficial if you don't want to mess with virtual environments.  Warning, this will install MAJIQ into a directory that's not on PATH.  

python3.10 -m pip install --user git+https://bitbucket.org/biociphers/majiq_stable.git

The conda Method

To install MAJIQ 2.0 stable in conda, first perform the required htslib-1.9 compilation steps as above. Then, using majiq2_stable.yaml , simply run:

HTSLIB_LIBRARY_DIR=/home/username/majiq_2_install/htslib_install/lib \

HTSLIB_INCLUDE_DIR=/home/username/majiq_2_install/htslib_install/include \

conda env create -f majiq2_stable.yaml

This creates a conda environment named majiq2; this can be activated by running conda activate majiq2.

If you would like to use a developer version of MAJIQ, there are two options. The second requires SSH keys to be set up to allow cloning of the developer repository without manual/interactive authentication.

Option 1: Manual cloning of repository

# Option 1: manual cloning of repository

# create the base environment in which MAJIQ 2 will be manually installed

conda env create -f majiq2_dev_manual.yaml

# activate this environment

conda activate majiq2_dev or majiq2_dev_manual

# clone the developer repository and move into it

git clone https://username@bitbucket.org/biociphers/majiq.git

cd ./majiq/

# run the installation script

HTSLIB_LIBRARY_DIR=/home/username/majiq_2_install/htslib_install/lib \

HTSLIB_INCLUDE_DIR=/home/username/majiq_2_install/htslib_install/include \

python setup.py install


Option 2: requires SSH keys to be set up

HTSLIB_LIBRARY_DIR=/home/username/majiq_2_install/htslib_install/lib \

HTSLIB_INCLUDE_DIR=/home/username/majiq_2_install/htslib_install/include \

conda env create -f majiq2_dev.yaml

 In either case, these steps will create an environment named majiq2_dev that can be activated by running conda activate majiq2_dev.


Note: the information below is legacy and kept for archival purposes only.

Installing MAJIQ in LPC  

There are two phases, phase 1 is pull git repo and create python environment

ssh sciget

module load git

module switch python python/3.6.1

git clone https://bitbucket.org/biociphers/majiq.git

python -m venv env

source env/bin/activate

pip install -r majiq/requirements.txt

Phase 2 is to install on execute node. 

ssh scisub

ibash

module switch python python/3.6.1

module switch gcc gcc/4.8.2

module load htslib/1.9

module load git

source env/bin/activate

cd majiq

HTSLIB_LIBRARY_DIR=/appl/htslib-1.9/lib python setup.py install

The Voila only install instructions

python3 -m venv env

env\Scripts\activate.bat

git clone https://bitbucket.org/biociphers/majiq.git

cd majiq 

easy_install -U pip

pip install wheel setuptools -U

python setup.py install --voila-only

The HPC adjusted instructions

INSTALLING MAJIQ 2.x

ssh username@consign.pmacs.upenn.edu

mkdir majiq_2_install

cd majiq_2_install

bsub -Is bash

module load python/3.6.3 

python3.6 -m venv myenvnamehere

source myenvnamehere/bin/activate


wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2

tar -xvjf htslib-1.9.tar.bz2

cd htslib-1.9

./configure --prefix=/home/username/majiq_2_install/htslib_install/

make

make install

cd ..


git clone https://username@bitbucket.org/biociphers/majiq.git

cd ./majiq/

pip install -r ./requirements.txt

# NOTE: THE FOLLOWING IS *ONE* LINE:

HTSLIB_LIBRARY_DIR=/home/username/majiq_2_install/htslib_install/lib HTSLIB_INCLUDE_DIR=/home/username/majiq_2_install/htslib_install/include python3.6 setup.py install



# test installation worked by running:

majiq -v

INSTALLING MAJIQ 1.2.x

In order to install previous version of majiq you can use the same steps as before depending on the HPC/LPC or local machine. During the installation steps you need to install a different branch

python3.6 -m venv myenv

source myenv/bin/activate

pip install pip -U

pip install wheel setuptools -U

pip install cython pysam numpy

pip install git+https://bitbucket.org/biociphers/majiq_stable.git@majiq_11x#egg=majiq