Skip to content

Commit

Permalink
Add Eigen 3.2.1 to ProbABEL
Browse files Browse the repository at this point in the history
This is a temporary workaround for Issue #11.
The full Eigen tar-ball is included as src/3.2.1.tar.bz2 and
src/eigen-3.2.1/ contains only the header files.
  • Loading branch information
lckarssen committed May 4, 2016
1 parent b73b6dd commit 5fa7f14
Show file tree
Hide file tree
Showing 6 changed files with 425 additions and 41 deletions.
33 changes: 23 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,30 @@ AC_CHECK_HEADERS([float.h inttypes.h libintl.h limits.h stddef.h \
# Option that lets the user specify a path to the EIGEN include files.
AC_ARG_WITH([eigen-include-path],
[AS_HELP_STRING([--with-eigen-include-path],
[location of the Eigen headers, defaults to /usr/include/eigen3])],
[CPPFLAGS+=" -I${withval}"],
[CPPFLAGS+=' -I/usr/include/eigen3'])

# Check for the EIGEN header files
AC_CHECK_HEADERS([Eigen/Dense Eigen/LU])

if test x$ac_cv_header_Eigen_Dense = xno; then
AC_MSG_ERROR([Could not find the Eigen header files. Did you specify \
--with-eigen-include-path correctly?])
[location of the Eigen headers, defaults to src/eigen-3.2.1])],
[EIGEN_PATH=${withval}; EXTERNAL_EIGEN=yes],
[EIGEN_PATH="src/eigen-3.2.1"])

# Inform AutoMake that an eigen path has been specified using the
# --with-eigen-include-dir option so that AutoMake doesn't prepend
# ${top_srcdir} to the path
AM_CONDITIONAL([EXTERNAL_EIGEN], test -n "$EXTERNAL_EIGEN")

AC_SUBST(EIGEN_PATH)

# Check for the EIGEN header files (make backup of CPPFLAGS first)
CPPFLAGS_BACKUP=${CPPFLAGS}
if test -z "$EXTERNAL_EIGEN"; then
CPPFLAGS+=" -I${srcdir}/${EIGEN_PATH}"
else
CPPFLAGS+=" -I${EIGEN_PATH}"
fi
AC_CHECK_HEADERS([Eigen/Dense Eigen/LU],
[],
[AC_MSG_ERROR([Could not find the Eigen header files. \
Did you specify --with-eigen-include-path correctly?])]
)
CPPFLAGS=${CPPFLAGS_BACKUP}


# Checks for typedefs, structures, and compiler characteristics.
Expand Down
16 changes: 15 additions & 1 deletion doc/COPYING
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
GNU GENERAL PUBLIC LICENSE
ProbABEL consists of two parts:
1) The ProbABEL source code, which is licensed under the GPL
2) The source code for the Eigen library v.3.2.1
(http://eigen.tuxfamily.org), which is licensed under the MPL 2.0.

Note: the MPL allows distribution of unmodified MPL source code in a
GPL-ed larger work (see
https://www.mozilla.org/en-US/MPL/2.0/combining-mpl-and-gpl/)

The licence text for the MPL can be found in the file
lib/eigen-3.2.1/COPYING.MPL2
The licence text for the GPL is reproduced below.


GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
Expand Down
6 changes: 4 additions & 2 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
***** v.0.5.0 (2016.)
* ProbABEL now depends on the Eigen library. The option to compile without
Eigen has been removed.
Eigen has been removed. Eigen 3.2.1 is included with ProbABEL. The
directory src/eigen-3.2.1 contains header files we need. The full Eigen
source code tar-ball is included as src/3.2.1.tar.bz2.
* Fixed Issue #15: Coxph interactions not working; when using the
--interaction option the name of the model was wrong (e.g. for
--interaction=1, the interaction term was shown as mu * SNP_A1, which
obviously is not what we meant to do).
* Fixed issue Github #16: "Too many NANs for SNPs with low `Rsq` when some
* Fixed Github issue #16: "Too many NANs for SNPs with low `Rsq` when some
commandline options are specified"
* Added --flipmaf command line option to palinear, pacoxph and palogist.
If this option is selected, ProbABEL will 'flip' the alleles A1 and A2
Expand Down
10 changes: 7 additions & 3 deletions doc/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ The ProbABEL manual (in .tex or .pdf format) also contains detailed
** The Eigen library
ProbABEL has one external dependency that has to be met before
compilation will succeed: it depends on the Eigen library
(http://eigen.tuxfamily.org) for fast matrix manipulation. On
Debian/Ubuntu systems the Eigen library can be installed in the
following way: apt-get install libeigen3-dev
(http://eigen.tuxfamily.org) for fast matrix manipulation.

Eigen v3.2.1 is distributed with the ProbABEL source code, so by
default no extra steps are needed.

Alternatively, on Debian/Ubuntu systems the Eigen library can be
installed in the following way: apt-get install libeigen3-dev

If you install the eigen library by hand (e.g. after downloading
the files from the aforementioned website) you have to specify the
Expand Down
51 changes: 29 additions & 22 deletions doc/ProbABEL_manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,17 @@ \subsection{Precompiled packages}
and install it from there. The PPA can be found at
\url{https://launchpad.net/~l.c.karssen/+archive/genabel-ppa}. Instructions
on how to add the PPA can also be found there.
\item If your computer runs Debian Linux\footnote{At the moment \PA{}
is only available in Debian testing and unstable.} (and you have
\item If your computer runs Debian Linux (and you have
administrative rights on it), you can install ProbABEL like this:
\begin{lstlisting}[basicstyle=\footnotesize\ttfamily,]
user@server:~$ apt-get install probabel
user@server:~$ sudo apt install probabel probabel-examples
\end{lstlisting}
Note that since Debian has a relatively slow release cycle the
ProbABEL version in the Debian repositories may be relatively
old\footnote{The Debian package tracker
(\url{https://tracker.debian.org/pkg/probabel}) lists the \PA{}
versions currently in the Debian stable, testing and unstable
releases.}.
\item Zip files with pre-compiled binaries (if available) can be found
on the ProbABEL web page
(\url{http://www.genabel.org/packages/ProbABEL}).
Expand Down Expand Up @@ -217,35 +222,25 @@ \subsection{Obtaining the source code and compiling it yourself}
\end{lstlisting}

Before continuing, it is important to mention that \PA{} needs the
EIGEN library\footnote{EIGEN is a library for fast matrix
multiplication. In ProbABEL versions before v0.5.0 EIGEN was not
required (but still recommended).}. In order to download the
library, go to \url{http://eigen.tuxfamily.org} and download the
\texttt{tar.gz} file of the latest version of EIGEN (3.2.4 at the time
of writing). Extract the files:
\begin{lstlisting}[basicstyle=\footnotesize\ttfamily,]
user@server:~$ tar -xzf 3.2.4.tar.gz
\end{lstlisting}
This will create a directory called \texttt{eigen-eigen} followed by a
series of letters and digits. For simplicity we rename it to EIGEN
\begin{lstlisting}[basicstyle=\footnotesize\ttfamily,]
user@server:~$ mv eigen-eigen-10219c95fe65 EIGEN
\end{lstlisting}
Eigen library\footnote{Eigen is a library for fast matrix
multiplication. The Eigen website can be found at
\url{http://eigen.tuxfamily.org}. In ProbABEL versions before v0.5.0
Eigen was not required (but still recommended).}. The required
source code for Eigen v3.2.1 is included in the ProbABEL
\lstinline{.tar.gz} file in the \lstinline{src/eigen-3.2.1} directory.

Now it's time to extract the \PA{} source code and move into the
directory that is created:
\begin{lstlisting}[basicstyle=\footnotesize\ttfamily,]
user@server:~$ tar -xzf probabel-0.5.0.tar.gz
user@server:~$ cd probabel-0.5.0
\end{lstlisting}
With the following command we will indicate where the EIGEN files can
be found and where we want to install \PA{}. Let's install in a
subdirectory of your home directory,
With the following command we will indicate where we want to install
\PA{}. Let's install in a subdirectory of your home directory,
e.g.~\texttt{/home/yourusername/ProbABEL}:
\begin{lstlisting}[basicstyle=\footnotesize\ttfamily,]
user@server:~$ ./configure \
--prefix=/home/yourusername/ProbABEL/ \
--with-eigen-include-path=/home/yourusername/EIGEN
--prefix=/home/yourusername/ProbABEL/
\end{lstlisting}
This will be followed by a series of checks to see if all tools
required for compilation and installation are present on your
Expand Down Expand Up @@ -1136,6 +1131,18 @@ \section{How to cite}
%Iteratively re-weighted least squares are used to obtain parameters'
%estimates.
\section{Licence}
\PA{} is licenced under the GNU Public Licence (GPL) v2.0, which
means it is free/libre open source software, basically allowing you to
the freedoms to run, study, share, and modify the software. The full
text of the licence can be found in the file \lstinline{doc/COPYING}
or on \url{https://gnu.org/licenses/old-licenses/gpl-2.0.html}.
The Eigen library that is included with \PA{} is licenced under the
Mozilla Public Licence (MPL) v2.0. The full text of this licence can
be found in the file \lstinline{lib/eigen-3.2.1/COPYING.MPL2} or on
\url{https://www.mozilla.org/en-US/MPL/2.0/}.
\printindex
\end{document}
Expand Down
Loading

0 comments on commit 5fa7f14

Please sign in to comment.