Skip to content

Installation

ShoheiKojima edited this page May 3, 2022 · 4 revisions

Install from docker hub (recommended)

Here is a tutorial to pull an environment that contains MEGAnE and other required software. The environment is available from dockerhub, and can be built for both Singularity and docker.

In the case of Singularity

For installation of Singularity, please follow the official instruction.

sudo singularity build MEGAnE.sif docker://shoheikojima/megane:tagname
# or
singularity build --fakeroot MEGAnE.sif docker://shoheikojima/megane:tagname

In the case of docker

For installation of docker, please follow the official instruction.

docker pull shoheikojima/megane:tagname

Install from GitHub

Here is a tutorial to build an environment required for MEGAnE by yourself. However, the complete environment containing all the required software is available from dockerhub - we recommend to use this. The docker and Singularity version contains the human repeat library and repeat annotations, while the GitHub version of MEGAnE does NOT include such files, and users need to prepare necessary files.

Clone this repo

git clone --recursive https://github.com/shohei-kojima/MEGAnE

Compile htslib and MEGAnE

cd ./MEGAnE/external/htslib
make
cd ../../
make

Download required software

Prerequisites

  • Python 3.7
  • BLAST 2.8 or BLAST 2.9
  • bedtools v2.26.0 to v2.28.0 (v2.30.0 is not compatible)
  • samtools 1.14

Prerequisite Python modules

  • biopython 1.74 or later
  • pysam 0.15.2 or later
  • pybedtools 0.8.0
  • matplotlib 3.1.1 or later
  • numpy 1.17.2 or later
  • scipy 1.3.1 or later
  • built-in python modules (os, sys, shutils, datetime, argsparse, glob, string, math, collections, itertools, multiprocessing, gzip, statistics, datetime)
# download BLAST
wget https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.9.0/ncbi-blast-2.9.0+-x64-linux.tar.gz
tar zxf ncbi-blast-2.9.0+-x64-linux.tar.gz
export PATH=/path/to/ncbi-blast-2.9.0+/bin:$PATH  # can be written in '.bashrc'

# download bedtools
wget https://github.com/arq5x/bedtools2/releases/download/v2.28.0/bedtools
chmod a+x bedtools
export PATH=/path/to/bedtools:$PATH  # can be written in '.bashrc'

# download samtools
wget https://github.com/samtools/samtools/releases/download/1.14/samtools-1.14.tar.bz2
tar xf samtools-1.14.tar.bz2
cd samtools-1.14
./configure --prefix=/where/to/install
make
make install
export PATH=/path/to/samtools:$PATH  # can be written in '.bashrc'

# install Python modules
conda install -c bioconda pysam
conda install -c bioconda pybedtools
conda install -c conda-forge biopython
conda install -c conda-forge matplotlib
conda install -c anaconda numpy
conda install -c anaconda scipy

Clone this wiki locally