Skip to content

Commit 5fb02dd

Browse files
Merge branch 'sbliven-fix41' into develop
2 parents 212b66c + 8744461 commit 5fb02dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2203
-348
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,6 @@ ENV/
123123

124124
# easy install
125125
easy_setup/install_ext_software/phyml.sh
126+
127+
# configobj code
128+
validate.py

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
22
python:
3-
- "3.4"
43
- "3.6"
54
# command to install dependencies
65
install:

README.markdown renamed to README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The source code is [documented on GitHub IO].
1717

1818
### Installation
1919

20-
It is recommended to install TRAL with the [easy_setup] system.
20+
It is recommended to use TRAL with the [docker image] or install it locally with the [easy_setup] system.
2121

2222

2323
### License
@@ -31,6 +31,7 @@ Some of TRAL's functions depend on external software ([Installation instructions
3131

3232

3333
[documented on GitHub IO]:https://acg-team.github.io/tral/
34+
[docker image]:https://github.com/acg-team/tral/packages
3435
[easy_setup]:https://github.com/acg-team/tral/tree/develop/easy_setup
3536
[Installation instructions for dependencies]:https://acg-team.github.io/tral/install_external.html#install-external
3637
[Pypi]:https://pypi.python.org/pypi

README.rst

Lines changed: 0 additions & 45 deletions
This file was deleted.

Vagrantfile

Lines changed: 159 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,52 +14,39 @@ Vagrant.configure("2") do |config|
1414
# boxes at https://vagrantcloud.com/search.
1515
config.vm.box = "ubuntu/bionic64"
1616

17-
# Disable automatic box update checking. If you disable this, then
18-
# boxes will only be checked for updates when the user runs
19-
# `vagrant box outdated`. This is not recommended.
20-
# config.vm.box_check_update = false
21-
22-
# Create a forwarded port mapping which allows access to a specific port
23-
# within the machine from a port on the host machine. In the example below,
24-
# accessing "localhost:8080" will access port 80 on the guest machine.
25-
# NOTE: This will enable public access to the opened port
26-
# config.vm.network "forwarded_port", guest: 80, host: 8080
27-
28-
# Create a forwarded port mapping which allows access to a specific port
29-
# within the machine from a port on the host machine and only allow access
30-
# via 127.0.0.1 to disable public access
31-
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
32-
33-
# Create a private network, which allows host-only access to the machine
34-
# using a specific IP.
35-
# config.vm.network "private_network", ip: "192.168.33.10"
36-
37-
# Create a public network, which generally matched to bridged network.
38-
# Bridged networks make the machine appear as another physical device on
39-
# your network.
40-
# config.vm.network "public_network"
17+
# Increase CPUs and memory for the box
18+
# https://stackoverflow.com/a/37335639/81658
19+
config.vm.provider "virtualbox" do |v|
20+
host = RbConfig::CONFIG['host_os']
21+
# Give VM 3/4 system memory & access to all cpu cores on the host
22+
if host =~ /darwin/
23+
cpus = `sysctl -n hw.ncpu`.to_i
24+
elsif host =~ /linux/
25+
cpus = `nproc`.to_i
26+
else # Windows folks
27+
cpus = `wmic cpu get NumberOfCores`.split("\n")[2].to_i
28+
end
29+
30+
puts "Provisioning VM with #{cpus} CPU"
31+
v.customize ["modifyvm", :id, "--cpus", cpus]
32+
end
33+
34+
# Need extra disk size for casper compilation
35+
# Requires disksize plugin:
36+
# vagrant plugin install vagrant-disksize
37+
config.disksize.size = '15GB'
38+
39+
# Log in as root
40+
#config.ssh.username = 'root'
41+
#config.ssh.password = 'vagrant'
42+
#config.ssh.insert_key = 'true'
4143

4244
# Share an additional folder to the guest VM. The first argument is
4345
# the path on the host to the actual folder. The second argument is
4446
# the path on the guest to mount the folder. And the optional third
4547
# argument is a set of non-required options.
4648
# config.vm.synced_folder "../data", "/vagrant_data"
4749

48-
# Provider-specific configuration so you can fine-tune various
49-
# backing providers for Vagrant. These expose provider-specific options.
50-
# Example for VirtualBox:
51-
#
52-
# config.vm.provider "virtualbox" do |vb|
53-
# # Display the VirtualBox GUI when booting the machine
54-
# vb.gui = true
55-
#
56-
# # Customize the amount of memory on the VM:
57-
# vb.memory = "1024"
58-
# end
59-
#
60-
# View the documentation for the provider you are using for more
61-
# information on available options.
62-
6350
# Enable provisioning with a shell script. Additional provisioners such as
6451
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
6552
# documentation for more information about their specific syntax and use.
@@ -68,26 +55,156 @@ Vagrant.configure("2") do |config|
6855
# apt-get install -y apache2
6956
# SHELL
7057
config.vm.provision "shell", inline: <<-SHELL
58+
set -e
59+
7160
# Install dependencies
7261
apt-get update
7362
apt-get -y dist-upgrade
74-
apt-get -y install python3 python3-pip unzip
63+
apt-get -y install python3 python3-pip unzip openjdk-8-jre-headless cmake
7564
pip3 install virtualenv
7665
7766
# reduce wget output during provisioning
7867
echo 'verbose = off' >> ~/.wgetrc
7968
69+
# Assistive tech cause java problems
70+
rm -f /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/accessibility.properties
71+
8072
cd /vagrant/easy_setup
8173
8274
# accept all licenses
83-
sed -i 's/ACCEPT_ALL=no/ACCEPT_ALL=yes/i' configTRAL_path.cfg
75+
if grep -q ACCEPT_ALL configTRAL_path.cfg; then
76+
sed -i 's/ACCEPT_ALL=no/ACCEPT_ALL=yes/i' configTRAL_path.cfg
77+
else
78+
echo ACCEPT_ALL=yes >> configTRAL_path.cfg
79+
fi
8480
8581
8682
# Install TRAL software
8783
./setupTRAL.sh setup
84+
85+
# Config file
86+
cat <<END > ~/.tral/config.ini
87+
###########################################
88+
### Configuration file for TRAL Vagrant ###
89+
###########################################
90+
91+
sequence_type = AA
92+
93+
[sequence]
94+
[[repeat_detection]]
95+
# AA includes all detectors used by default on protein sequence data.
96+
AA = HHrepID, T-REKS, TRUST, XSTREAM
97+
# DNA includes all detectors used by default on protein sequence data.
98+
DNA = Phobos, TRED, T-REKS, TRF, XSTREAM
99+
[[repeat_detector_path]]
100+
# If the executable is in the system path, supply its name. Otherwise, supply the full path to the executable. Details are explained in TRAL's online docs.
101+
PHOBOS = phobos
102+
HHrepID = hhrepid_64
103+
HHrepID_dummyhmm = ~/.tral/data/hhrepid/dummyHMM.hmm
104+
T-REKS = T-REKS
105+
TRED = tred
106+
TRF = trf
107+
TRUST = TRUST
108+
TRUST_substitutionmatrix = ~/.tral/tral_external_software/TRUST_Align/Align/BLOSUM50
109+
XSTREAM = XSTREAM
110+
111+
[hmm]
112+
hmmbuild = hmmbuild
113+
l_effective_max = 50
114+
115+
[filter]
116+
[[basic]]
117+
tag = basic_filter
118+
[[[dict]]]
119+
[[[[pvalue]]]]
120+
func_name = pvalue
121+
score = phylo_gap01
122+
threshold = 0.1
123+
[[[[n_effective]]]]
124+
func_name = attribute
125+
attribute = n_effective
126+
type = min
127+
threshold = 1.9
128+
129+
130+
[repeat]
131+
scoreslist = phylo_gap01, # score (the comma in the end is needed for TRAL)
132+
calc_score = False # is the score calculated?
133+
calc_pvalue = False # is the pvalue calculated?
134+
precision = 10
135+
ginsi = ginsi # integrated in MAFFT
136+
Castor = Castor
137+
[[castor_parameter]]
138+
rate_distribution = constant # either constant or gamma
139+
alfsim = alfsim
140+
141+
[repeat_list]
142+
# Columns to include in repeat list TSV output
143+
# Allowed values:
144+
# - begin: position of the tandem repeats within the sequence,
145+
# - pvalue: statistical significance of the tandem repeats
146+
# - divergence: divergence of the tandem repeat units
147+
# - l_effective: length of the tandem repeat units
148+
# - n_effective: number of tandem repeat units
149+
# - msa_original: multiple sequence alignment
150+
# - score: score corresponding to the value of 'model'
151+
# - repeat_region_length: total length of repeat region
152+
output_characteristics = begin, msa_original, l_effective, n_effective, repeat_region_length, divergence, pvalue
153+
154+
# model for scoring repeats. Supported: entropy, parsimony, pSim, phylo, phylo_gap01, phylo_gap001
155+
model = phylo_gap01
156+
157+
[repeat_score]
158+
evolutionary_model = lg
159+
[[indel]]
160+
indel_rate_per_site = 0.01
161+
ignore_gaps = True
162+
gaps = row_wise
163+
zipf = 1.821
164+
[[optimisation]]
165+
start_min = 0.5
166+
start_max = 1.5
167+
n_iteration = 14
168+
[[K80]]
169+
kappa = 2.59
170+
[[TN93]]
171+
alpha_1 = 0.3
172+
alpha_2 = 0.4
173+
beta = 0.7
174+
[[score_calibration]]
175+
scoreslist=phylo_gap01, # score (the comma at the end is needed)
176+
save_calibration = False
177+
precision = 10
178+
179+
[AA]
180+
standard_chars = A, C, D, E, F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, Y
181+
all_chars = A, B, C, D, E, F, G, H, I, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
182+
[[ambiguous_chars]]
183+
B = D,N
184+
O = K,
185+
U = C,
186+
Z = E,Q
187+
X = A, C, D, E, F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, Y
188+
[DNA]
189+
standard_chars = A, C, G, T
190+
all_chars = A, C, G, T, N, X
191+
[[ambiguous_chars]]
192+
N = A, C, G, T
193+
X = A, C, G, T
194+
195+
END
196+
197+
198+
# All external software
199+
./install_ext_software.sh
200+
201+
cd /vagrant
202+
# dev requirements are optional but useful for tests and docs
203+
pip3 install -r requirements_dev.txt
204+
88205
echo
89206
echo "THIS MACHINE CONTAINS PROPRIETARY SOFTWARE."
90207
echo "Please check the licenses before using (e.g. no commercial use permitted)"
91208
SHELL
92-
209+
93210
end

0 commit comments

Comments
 (0)