forked from PGP-UK/GenomeChronicler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity
119 lines (78 loc) · 3.09 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Bootstrap: docker
From: ubuntu:bionic
%runscript
echo "Starting the GenomeChronicler container [19-296]..."
echo "Running GenomeChronicler itself"
perl /GenomeChronicler/genomechronicler
%post
# Install latest version of R (https://linuxize.com/post/how-to-install-r-on-ubuntu-18-04/)
# (do it this way otherwise by default will install 3.2)
apt-get -y update
apt-get install -y apt-transport-https software-properties-common
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
add-apt-repository ppa:linuxuprising/java
apt-get -y update
apt-get -y install openjdk-8-jdk
###Disabling oracle java for now... hoping openjdk is ok for GATK (which only supports java 8)
#echo debconf shared/accepted-oracle-license-v1-2 select true | debconf-set-selections
#echo debconf shared/accepted-oracle-license-v1-2 seen true | debconf-set-selections
#apt-get -y --force-yes install oracle-java11-installer oracle-java11-set-default
#apt-get -y update
apt-get -y install r-base-core
apt-get -y install tk-dev
apt-get -y install mesa-common-dev libglu1-mesa-dev #Satisfying dependencies for rgl that seems to be required below for RColorBrewer
# Installing perl modules
apt-get -y install wget
wget -O - http://cpanmin.us | perl - --self-upgrade #Attempting to automatically configure CPAN
cpan File::chdir
cpan Config::General
cpan Data::Dumper
cpan Excel::Writer::XLSX
cpan DBI
cpan DBD::SQLite
# Installing a couple of tools here from github releases
cd /usr/bin
wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2
tar -vxjf htslib-1.9.tar.bz2
cd htslib-1.9
make
cd /usr/bin
wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2
tar -vxjf samtools-1.9.tar.bz2
cd samtools-1.9
make
cd /usr/bin
wget https://github.com/samtools/bcftools/releases/download/1.9/bcftools-1.9.tar.bz2
tar -vxjf bcftools-1.9.tar.bz2
cd bcftools-1.9
make
cd /
# Install required R packages
R --slave -e 'install.packages("RColorBrewer", dependencies=TRUE, repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("TeachingDemos", dependencies=TRUE, repos = "http://cran.us.r-project.org")'
# Installing LaTeX stuff
apt-get -y install texlive-latex-base texlive-fonts-recommended texlive-latex-extra lmodern
# Installing extra software
#apt-get -y install libssl
apt-get -y install libssl-dev
apt-get -y install libcurl4-openssl-dev
apt-get -y install git
# Getting GenomeChronicler Repo
git clone https://github.com/PGP-UK/GenomeChronicler.git
# Running GenomeChronicler Setup
cd /GenomeChronicler
bash SetupMeFirst.sh
chmod +x GenomeChronicler_mainDruid.pl
%apprun genomechronicler
perl /GenomeChronicler/GenomeChronicler_mainDruid.pl "$@"
%apprun gc
perl /GenomeChronicler/GenomeChronicler_mainDruid.pl "$@"
%environment
export LC_ALL=C
export PATH=$PATH:$PWD
export PATH="$PATH:/usr/bin/bcftools-1.9"
export PATH="$PATH:/usr/bin/samtools-1.9"
export PATH="$PATH:/usr/bin/htslib-1.9"
export PATH="$PATH:/GenomeChronicler"
#genomechronicler