diff --git a/.gitmodules b/.gitmodules index 068f593..93325b2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ -[submodule "ocaml+twt"] - path = ocaml+twt +[submodule "twt"] + path = twt url = git://github.com/mlin/twt.git +[submodule "CDE"] + path = CDE + url = git://github.com/pgbovine/CDE.git diff --git a/CDE b/CDE new file mode 160000 index 0000000..36f9f2f --- /dev/null +++ b/CDE @@ -0,0 +1 @@ +Subproject commit 36f9f2f1057545b3b7ec7f8570b6c6dca4c5dcd2 diff --git a/Makefile b/Makefile index a45ca78..b57daba 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,10 @@ all: PhyloCSF -.PHONY: PhyloCSF CamlPaml clean +.PHONY: PhyloCSF CamlPaml cde-package CDE clean -ARCH := `uname`.`uname -m` -export ARCH +ARCH := $(shell uname).$(shell uname -m) +PHYLOCSF_BASE := $(shell pwd) +export PHYLOCSF_BASE PhyloCSF: CamlPaml cd src; $(MAKE) clean; $(MAKE) $(MFLAGS) @@ -12,7 +13,19 @@ PhyloCSF: CamlPaml CamlPaml: cd lib/CamlPaml; $(MAKE) $(MFLAGS) reinstall +cde-package: PhyloCSF CDE + CDE/cde ./PhyloCSF.$(ARCH) 12flies PhyloCSF_Examples/tal-AA.fa + CDE/cde ./PhyloCSF.$(ARCH) 29mammals PhyloCSF_Examples/ALDH2.exon5.fa --frames=3 + #CDE/cde ./PhyloCSF.$(ARCH) 29mammals PhyloCSF_Examples/Aldh2.mRNA.fa --frames=3 --removeRefGaps --aa + mv cde-package cde-package.$(ARCH) + tar -cf cde-package.$(ARCH).tar cde-package.$(ARCH) + +CDE: + cd CDE && make + clean: cd lib/CamlPaml; $(MAKE) clean cd src; $(MAKE) clean rm -f PhyloCSF.* + rm -rf cde-package* + cd CDE && make clean || true \ No newline at end of file diff --git a/README b/README index f852708..fbcc792 100644 --- a/README +++ b/README @@ -9,35 +9,78 @@ | http://compbio.mit.edu/PhyloCSF | +---------------------------------------------------------------------+ - SOURCE DISTRIBUTION -Compiling PhyloCSF from source may be difficult for most users, -because it requires an Objective Caml toolchain that's probably not -already present on your system. For this reason, we provide -precompiled binaries for Linux and Mac OS X on our website. +Please see our web site for more information about PhyloCSF. Compiling +this software from source may be difficult for most users, because it +requires an Objective Caml toolchain that's probably not already +present on your system. For this reason, we provide digitally-signed +32-bit and 64-bit Linux executables on our web site. + +The source distribution is divided into a library, CamlPaml, containing +generic infrastructure for phylogenetic rate models, and a program +implementing the PhyloCSF-specific models and driver program. With +additional development, the CamlPaml library will eventually be +released as a separate entity, but for now it is just part of this +distribution. + +Here are the steps to build the source: + +[1A] Install various dependencies (Ubuntu 11.10+) -DEPENDENCIES +Install these packages using apt-get: +ocaml-findlib libocamlgsl-ocaml-dev libbatteries-ocaml-dev make + +[1B] Install various dependencies (other Linux, Mac OS X) - GNU Scientific Library * Objective Caml 3.11+, with native code compiler -* findlib +* OCaml findlib * OCaml Batteries Included 1.20+ * ocamlgsl 0.60+ -- ocaml+twt 0.92+ http://people.csail.mit.edu/mikelin/ocaml+twt/ * These can be set up using GODI: http://godi.camlcity.org/ -The source distribution is divided into a library, CamlPaml, -containing generic infrastructure for phylogenetic rate models, and a -program implementing the PhyloCSF-specific models and driver -program. With additional development, the CamlPaml library will -eventually be released as a separate entity, but for now it is just -part of this distribution. +[2] Configure OCaml findlib + +If you installed findlib (OCaml's package manager) using the Ubuntu +packages, or any other method that led to system-wide installation, you +must set some environment variables to make it use a directory to which +you have write access. (Alternatively, you can complete the subsequent +steps as root, e.g. using sudo) + + mkdir -p $HOME/opt/lib/ocaml # or whatever + export OCAMLPATH=$HOME/opt/lib/ocaml:$OCAMLPATH + export OCAMLFIND_DESTDIR=$OCAMLPATH + +To verify your configuration, run + + ocamlfind printconf + +"Packages will be installed in" should be a directory you can write to, +and that same directory should appear in "Search path". + +[3] Install ocaml+twt + +The code is written in a dialect of OCaml for which you must install a +preprocessor from: http://people.csail.mit.edu/mikelin/ocaml+twt/ +Download the tarball, extract it, and run + + make install INSTALLDIR=$HOME/directory/in/your/PATH + -or- + sudo make install + +If you obtained this PhyloCSF source distribution by cloning the git +repository, ocaml+twt is available as a submodule. You can run + + git submodule init + git submodule update + cd twt + +and then one of the above 'make install' commands. -COMPILING +[4] Compile PhyloCSF -Assuming the above dependencies are satisfied, just run `make` in this -directory. This will build and install the CamlPaml library, then -compile the PhyloCSF executable and copy it to PhyloCSF.ARCH in this -directory, where e.g. ARCH = Linux.x86_64. +Now just run 'make' in this directory. This will build and install the +CamlPaml library, then compile the PhyloCSF executable and copy it to +PhyloCSF.ARCH in this directory, where e.g. ARCH = Linux.x86_64. diff --git a/cde.options b/cde.options new file mode 100644 index 0000000..4826b09 --- /dev/null +++ b/cde.options @@ -0,0 +1,54 @@ +# cde.options v1 (do not alter this first line!) + +# These directories often contain pseudo-files that shouldn't be tracked +ignore_prefix=/dev/ +ignore_exact=/dev +ignore_prefix=/proc/ +ignore_exact=/proc +ignore_prefix=/sys/ +ignore_exact=/sys +ignore_prefix=/var/cache/ +ignore_prefix=/var/lock/ +ignore_prefix=/var/log/ +ignore_prefix=/var/run/ +ignore_prefix=/var/tmp/ +ignore_prefix=/tmp/ +ignore_exact=/tmp + +# un-comment the entries below if you think they might help your app: +#ignore_exact=/etc/ld.so.cache +#ignore_exact=/etc/ld.so.preload +#ignore_exact=/etc/ld.so.nohwcap + +# Ignore .Xauthority to allow X Windows programs to work +ignore_substr=.Xauthority + +# Ignore so that networking can work properly +ignore_exact=/etc/resolv.conf +# These files might be useful to ignore along with /etc/resolv.conf +# (un-comment if you want to try them) +#ignore_exact=/etc/host.conf +#ignore_exact=/etc/hosts +#ignore_exact=/etc/nsswitch.conf +#ignore_exact=/etc/gai.conf + +# Access the target machine's password files: +# (some programs like texmacs need these lines to be commented-out, +# since they try to use home directory paths within the passwd file, +# and those paths might not exist within the package.) +ignore_prefix=/etc/passwd +ignore_prefix=/etc/shadow + +# These environment vars might lead to 'overfitting' and hinder portability +ignore_environment_var=DBUS_SESSION_BUS_ADDRESS +ignore_environment_var=ORBIT_SOCKETDIR +ignore_environment_var=SESSION_MANAGER +ignore_environment_var=XAUTHORITY +ignore_environment_var=DISPLAY + +# For PhyloCSF: allow the dispatch script in our package to set PHYLOCSF_BASE +# so that the parameters and examples can reside at the top level rather than +# buried deep in cde-package/ +ignore_environment_var=PHYLOCSF_BASE +ignore_prefix=/home/mlin/src/PhyloCSF/PhyloCSF_Examples +ignore_prefix=/home/mlin/src/PhyloCSF/PhyloCSF_Parameters diff --git a/twt b/twt new file mode 160000 index 0000000..3e7d617 --- /dev/null +++ b/twt @@ -0,0 +1 @@ +Subproject commit 3e7d61734c69852031a9d348750f28477475cb54