forked from nservant/HiC-Pro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity
87 lines (70 loc) · 2.57 KB
/
Singularity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
BootStrap: debootstrap
DistType "debian"
MirrorURL: http://us.archive.ubuntu.com/ubuntu/
OSVersion: xenial
%labels
AUTHOR Nicolas Servant
%pre
apt-get install -y debootstrap
%post
apt-get install -y wget
apt-get install -y gzip
apt-get install -y bzip2
apt-get install -y curl
apt-get install -y unzip
## g++
apt-get install -y build-essential
# install anaconda
if [ ! -d /usr/local/anaconda ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh \
-O ~/anaconda.sh && \
bash ~/anaconda.sh -b -p /usr/local/anaconda && \
rm ~/anaconda.sh
fi
# set anaconda path
export PATH=$PATH:/usr/local/anaconda/bin
conda update conda
conda config --add channels r
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda
# Let us save some space
conda clean --packages -y
# external tools
echo "Installing dependancies ... "
conda install -y bowtie2
conda install -y samtools
# Python (>2.7) with *pysam (>=0.8.3)*, *bx(>=0.5.0)*, *numpy(>=1.8.2)*, and *scipy(>=0.15.1)* libraries
conda install -y python=2.7.11
conda install -y -c anaconda scipy
conda install -y -c anaconda numpy
conda install -y -c bcbio bx-python
conda install -y -c bioconda pysam
# Install R
conda update readline
#conda install -c conda-forge readline=6.2
conda install -c r r-base
conda install -c r r-ggplot2=2.2.1
conda install -c r r-rcolorbrewer
conda install -c r r-gridbase
# Install HiC-pro
echo "Installing latest HiC-Pro release ..."
VERSION=$(curl -s https://github.com/nservant/HiC-Pro/releases/latest | egrep -o '2.[0-9]*.[0-9]*')
echo "v"$VERSION".zip" | wget --base=http://github.com/nservant/HiC-Pro/archive/ -i - -O hicpro_latest.zip && unzip hicpro_latest.zip
#VERSION="devel"
#echo $VERSION".zip" | wget --base=http://github.com/nservant/HiC-Pro/archive/ -i - -O hicpro_latest.zip && unzip hicpro_latest.zip
cd $(echo HiC-Pro-$VERSION)
make configure
make install
# Let us save some space
conda clean --packages -y
conda clean --all -y
rm -rf /usr/local/anaconda/pkgs
%test
INSTALLED_HICPRO_VERSION=$(find /usr/local/bin -name HiC-Pro | xargs dirname)
$INSTALLED_HICPRO_VERSION/HiC-Pro -h
%environment
export PATH=$PATH:/usr/local/anaconda/bin
INSTALLED_VERSION=$(find /usr/local/bin -name HiC-Pro | xargs dirname)
export PATH=$PATH:$INSTALLED_VERSION
export LANG=C