-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathvagrant_instructions
71 lines (48 loc) · 1.71 KB
/
vagrant_instructions
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
Install vagrant via vagrantup.com. Vagrant enables the quick, easy
installation of customizeable virtual machines. The default is a 32-bit Ubuntu
12.04 box. It works really cleanly for developing these machines. I'm
currently figuring out how to share my personal machine (without having to
pay for it).
##To start Vagrant:
vagrant init hashicorp/precise32
vagrant up
vagrant ssh
##To set up treePL:
sudo apt-get install git
sudo apt-get install make
sudo apt-get install libtool
sudo apt-get install autoconf
git clone git://github.com/blackrim/treePL.git
cd treePL/
cd deps/
tar xvf adol-c_git_saved.tar.gz
tar xvf nlopt-2.2.4.tar.gz
rm *.gz
cd nlopt-2.2.4/
./configure
make
sudo make install
cd ../adol-c
autoreconf -fi
sudo ./configure --with-openmp-flag=-fopenmp --prefix=/usr
make
sudo make install
cd ../src
./configure
sudo make install
##To copy files to Vagrant box:
scp -P 2222 <file> vagrant@localhost:.
Password is 'vagrant'
##Once all your files are in Vagrant
treePL doesn't play well with Mac/Windows line endings. So, we shall switch them to *nix line endings
for file in *.txt; do sed -i 's/\r/\n/g' $file; done
Alter as needed to change all your files to *nix line endings.
treePL also gets weird about rooting. If you've rerooted your tree in a software that leaves a [&R] tag, this might cause a segmentation fault ... for some reason.
sed -i 's/\[&R]//g' your_file
should fix this.
###To run treePL
Place your config file and your tree (if in a separate file) into the treePL directory. Call as such:
./treePL treePLmatt
To call in a loop for multiple trees:
for file in *.tre ; do cp $file input.txt; ./treePL config ; cp dated.tre $file.tre; done
In your config file, set treefile = input.txt