[2734] | 1 | $Id: README 3439 2015-11-20 05:41:52Z peter $ |
---|
[2] | 2 | |
---|
[1939] | 3 | = About yat = |
---|
[573] | 4 | |
---|
[1939] | 5 | This directory contains the yat library. For an overview of the |
---|
| 6 | project, visit |
---|
[2733] | 7 | |
---|
[1939] | 8 | http://dev.thep.lu.se/yat |
---|
[573] | 9 | |
---|
[1939] | 10 | |
---|
| 11 | = Configuring and building yat = |
---|
| 12 | |
---|
[1262] | 13 | 1. If you checked out this project from the subversion repository you |
---|
| 14 | must run '`bootstrap`' to initialize the build system. |
---|
| 15 | 2. Issue '`./configure`' to create the Makefiles. Optionally run |
---|
| 16 | configure with '`--enable-debug`', which will turn on debug |
---|
| 17 | options. |
---|
| 18 | 3. Compile with '`make`'. |
---|
[2213] | 19 | 4. '`make doc`' will generate documentation. |
---|
| 20 | 5. Optionally do '`make check`' to run test programs. |
---|
[1303] | 21 | 6. Issue '`make install`' to install the package on your system, |
---|
| 22 | documentation will not be installed if documentation was not |
---|
[1939] | 23 | generated above. Default installation location is `/usr/local`; |
---|
[1303] | 24 | this can be changed with |
---|
| 25 | '`./configure --prefix=/dir/to/install/to`'. |
---|
[2437] | 26 | 7. Optionally do '`make installcheck`' to verify that intallation |
---|
| 27 | completed correctly. |
---|
[573] | 28 | |
---|
[1939] | 29 | The `configure` script has additional options; `./configure --help` |
---|
| 30 | will offer you those choices or refer to Requirements below. |
---|
[848] | 31 | |
---|
[1059] | 32 | = Requirements = |
---|
| 33 | |
---|
[1262] | 34 | Except for the obviously needed C++ compiler there are a few packages |
---|
| 35 | and programs required for compiling yat and generate supporting |
---|
| 36 | material. The configure script will look for required programs and |
---|
| 37 | report failure to meet the requirements. Here we list some of the |
---|
[1557] | 38 | requirements, but omit required standard utilities such as echo and |
---|
[1262] | 39 | sed since these are normally available. |
---|
[1059] | 40 | |
---|
[1262] | 41 | == Required packages == |
---|
[1059] | 42 | |
---|
[1262] | 43 | === GSL === |
---|
[1059] | 44 | |
---|
[1262] | 45 | GNU Scientific Library, [http://www.gnu.org/software/gsl/ GSL] version |
---|
[1939] | 46 | 1.8 or later. If you have GSL installed in a non-standard location, |
---|
[2129] | 47 | `./configure --with-gsl=DIR` can be useful to provide the location of |
---|
| 48 | GSL. The `gsl-config` script, which is used to retrieve needed |
---|
| 49 | compiler and linker flags, is expected to be found in `DIR/bin/`. The |
---|
| 50 | check for existing GSL can be turned off with option |
---|
| 51 | `--without-gsl`. This can be useful, for example, if gsl-config is not |
---|
| 52 | available at configure time but header file will be available at make |
---|
| 53 | time. |
---|
[1059] | 54 | |
---|
[1262] | 55 | === BLAS === |
---|
[1059] | 56 | |
---|
[1262] | 57 | A C implementation of Basic Linear Algebra Subprograms |
---|
| 58 | ([http://www.netlib.org/blas BLAS]) is required. GSL comes with a |
---|
| 59 | reference implementation, but you should consider getting a hardware |
---|
| 60 | optimized implementation. ATLAS provides optimized BLAS (see below). |
---|
[1059] | 61 | |
---|
[1939] | 62 | The `configure` script searches for many different BLAS libraries in a |
---|
[2019] | 63 | specific order (for details refer to `m4/yat_cblas.m4`). If you want |
---|
| 64 | to use a specific CBLAS library, `./configure --with-cblas=LIB` may be |
---|
[2028] | 65 | useful. Note, however, that the chosen/detected CBLAS library is not |
---|
| 66 | hard-coded into the installed libyat, but a user can choose a |
---|
[2029] | 67 | different CBLAS when she links her application. A way to access which |
---|
[2028] | 68 | CBLAS was detected during the configuration is to access the |
---|
| 69 | yat-config script directly or via the autoconf macros included in the |
---|
| 70 | distribution. If you do want to hard-code a choice of CBLAS into the |
---|
| 71 | installed libyat, you may provide the appropriate value to LIBS. The |
---|
| 72 | following line, for example: |
---|
[1939] | 73 | |
---|
[2733] | 74 | #> ./configure LIBS=-lcblas |
---|
[2028] | 75 | |
---|
[2410] | 76 | will hard-code the choice of -lcblas into libyat. |
---|
[2028] | 77 | |
---|
[1325] | 78 | === Boost === |
---|
| 79 | |
---|
[2153] | 80 | [http://www.boost.org Boost] version 1.35 or later. If you have Boost |
---|
[1939] | 81 | installed in a non-standard location, `./configure --with-boost=DIR` |
---|
| 82 | can be useful to provide the location of Boost. Boost header files are |
---|
[2786] | 83 | expected to be found in `DIR/include/` and boost libraries are |
---|
[2916] | 84 | expected to be found in `DIR/lib/`. The `configure` script tries to |
---|
| 85 | detect libraries `boost_thread` and `boost_thread`. The name of a |
---|
| 86 | boost library typically depends on its configuration (see boost's |
---|
| 87 | naming convention) and there may be several versions/configurations of |
---|
| 88 | the same library installed. The `configure` tries to pick one of the |
---|
| 89 | available libraries, wchih can be overridden with `./configure |
---|
| 90 | --with-boost-thread=foo` and `configure --with-boost-system=foo`, |
---|
| 91 | respectively. The check for boost can be turned off with |
---|
| 92 | `--without-boost`. |
---|
[1325] | 93 | |
---|
[1262] | 94 | === quiet nan === |
---|
[1059] | 95 | |
---|
[1262] | 96 | Quiet NaN's must be supported. |
---|
[1059] | 97 | |
---|
[1353] | 98 | === infinity === |
---|
| 99 | |
---|
| 100 | infinity for type double must be supported. |
---|
| 101 | |
---|
[1262] | 102 | == Optional packages == |
---|
[1059] | 103 | |
---|
[3364] | 104 | === HTSLIB === |
---|
[2943] | 105 | |
---|
[3364] | 106 | In order to enable functionality related to bam files, either htslib |
---|
| 107 | (http://www.htslib.org) or its predecessor samtools |
---|
| 108 | (http://samtools.sourceforge.net) must be available. Header file |
---|
| 109 | <sam.h> is required as well as either 'libhts' or 'libbam'. The configure |
---|
| 110 | script will try to detect whether <sam.h> is available as 'sam.h', |
---|
| 111 | 'htslib/sam.h', 'bam/sam.h', or 'samtools/sam.h'. If you have header |
---|
| 112 | files installed outside compiler's search path, you can help the |
---|
| 113 | compiler with `./configure CPPFLAGS=-I<include dir>` when header files |
---|
| 114 | are found in directory `<include dir>`. Configure detects whether |
---|
[3439] | 115 | header files are from htslib or old samtools and looks for either |
---|
| 116 | libhts or libbam accordingly. If library is installed outside linker's |
---|
| 117 | search path, in `<libdir>`, you can run `./configure LDFLAGS=-L<lib |
---|
| 118 | dir>`. You can build yat without bam support by running `./configure |
---|
| 119 | --without-samtools`. |
---|
[2943] | 120 | |
---|
[3439] | 121 | The samtools program is needed for some tests related to bam |
---|
[3364] | 122 | functionality. If samtools is not found by configure, these tests will |
---|
| 123 | be skipped. If you have samtools available outside PATH, you can help |
---|
| 124 | configure to find it with `./configure SAMTOOLS=/path/to/samtools`. |
---|
| 125 | |
---|
[2943] | 126 | === ZLIB === |
---|
| 127 | |
---|
| 128 | Zlib available from http://www.zlib.net/ is required to build samtools |
---|
| 129 | and consequently needed to build yat too, unless you turn off samtools |
---|
| 130 | support (please refer to samtools section above). Header file `zlib.h` |
---|
| 131 | and library libz are required. If installed in an unconventional |
---|
| 132 | location you can help the compiler/linker with `CPPFLAGS=-I<include |
---|
| 133 | dir>` and `LDFLAGS=-L<lib dir>`, respectively. |
---|
| 134 | |
---|
[1262] | 135 | === ATLAS === |
---|
| 136 | |
---|
[1059] | 137 | GSL supplies a reference implementation of BLAS. You may want to |
---|
[1262] | 138 | consider using hardware optimized BLAS. The |
---|
| 139 | [http://math-atlas.sourceforge.net/ ATLAS] software provides an |
---|
| 140 | automatic hardware optimized BLAS library. |
---|
[1059] | 141 | |
---|
| 142 | The detection of ATLAS is supported by the yat configuration script |
---|
| 143 | but in many cases the ATLAS libraries are installed in |
---|
[1262] | 144 | non-conventional directory locations. As an example, on Fedora 8, |
---|
| 145 | ATLAS libraries are |
---|
[1059] | 146 | located in /usr/lib/atlas or /usr/lib64/atlas depending on your |
---|
| 147 | hardware architecture. If you have ATLAS installed and the configure |
---|
| 148 | script fails to locate it, try to add the location to the atlas |
---|
[1078] | 149 | libraries when running configure: |
---|
[1059] | 150 | |
---|
[2733] | 151 | #> ./configure LDFLAGS="-L/usr/lib64/atlas" |
---|
[1059] | 152 | |
---|
[1262] | 153 | === Doxygen === |
---|
[1059] | 154 | |
---|
[1442] | 155 | [http://www.doxygen.org/ Doxygen] 1.5 (or newer) is required for |
---|
[2557] | 156 | generation of the API documentation. If doxygen application is |
---|
| 157 | missing, generation of API documentation is disabled. |
---|
[1262] | 158 | |
---|
[1272] | 159 | = Documentation = |
---|
[1262] | 160 | |
---|
[2488] | 161 | The API documentation for the latest release is available in HTML and |
---|
| 162 | can be found through http://dev.thep.lu.se/yat. If you wish to build a |
---|
| 163 | local copy, issue `make doc` and you will find the documents in |
---|
[2870] | 164 | directory `doc/html/`. |
---|
[1262] | 165 | |
---|
[1368] | 166 | = Developers = |
---|
| 167 | |
---|
[2733] | 168 | See file README.developer for developer specific information. |
---|
[1368] | 169 | |
---|
[2080] | 170 | = Mac OS X = |
---|
| 171 | |
---|
| 172 | On Mac OS X you can create a universal library, a library that works |
---|
| 173 | on multiple systems. You can do this by specifying multiple `-arch` |
---|
| 174 | options to the compiler (but not to the preprocessor): |
---|
| 175 | |
---|
| 176 | #> ./configure CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ |
---|
| 177 | CXXCPP="g++ -E" --disable-dependency-tracking |
---|
| 178 | |
---|
| 179 | This will produce a universal yat library with 4 architectures. If |
---|
| 180 | your OS X does not support both Power-PC and Intel-based processors, |
---|
| 181 | you can omit these architectures. Also, required libraries, GSL and |
---|
| 182 | CBLAS, need to be available as universal libraries with desired |
---|
| 183 | architectures. |
---|
| 184 | |
---|
[1262] | 185 | ---------------------------------------------------------------------- |
---|
| 186 | {{{ |
---|
[2119] | 187 | Copyright (C) 2003 Jari Häkkinen, Peter Johansson |
---|
| 188 | Copyright (C) 2004 Jari Häkkinen |
---|
| 189 | Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson |
---|
[3439] | 190 | Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Peter Johansson |
---|
[1262] | 191 | |
---|
[1437] | 192 | This file is part of yat library, http://dev.thep.lu.se/yat |
---|
[1262] | 193 | |
---|
| 194 | The yat library is free software; you can redistribute it and/or |
---|
| 195 | modify it under the terms of the GNU General Public License as |
---|
[1486] | 196 | published by the Free Software Foundation; either version 3 of the |
---|
[1262] | 197 | License, or (at your option) any later version. |
---|
| 198 | |
---|
| 199 | The yat library is distributed in the hope that it will be useful, but |
---|
| 200 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 201 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 202 | General Public License for more details. |
---|
| 203 | |
---|
| 204 | You should have received a copy of the GNU General Public License |
---|
[1487] | 205 | along with yat. If not, see <http://www.gnu.org/licenses/>. |
---|
[1262] | 206 | }}} |
---|