| Installation Installation of SeqAn and compiling example programs. Contents 1 Installation 2 Using Applications and Demos 2.1 Unix Makefiles 2.2 Microsoft Visual C++ Projects 2.3 CMake 3 Using SeqAn in your own projects 3.1 Linux, Darwin, Solaris, MinGW 3.2 MS Visual C++ Projects 1 Installation SeqAn was successfully tested under Unix-like platforms like GNU/Linux, Darwin and Solaris with the GCC compiler version 3.x and 4.x as well as Windows using MS Visual Studio 7-9 or MinGW. To install SeqAn, you have to download a current snapshot from http://www.seqan.de and extract the files. Under Unix-like platforms do the following (change path_to_SeqAn_XY.zip to your downloaded file): mkdir seqan cd seqan unzip path_to_SeqAn_XY.zip 2 Using Applications and Demos SeqAn comes with applications and many small example programs that demonstrate the use of the library. The applications and most of the examples are described in the Projects section on the SeqAn homepage or the examples section of this documentation. The source code of the applications and demos can be found apps and demos folders of the SeqAn installation directory. To compile the sources you can either use the Makefiles in the apps and demos folders or the provided Visual Studio project files. 2.1 Unix Makefiles The demos folder contains a Makefile that can be used with make to build the examples.
make all | Build all examples at once
make [file] | Build only the example [file], where [file] is a .cpp file in demos.
make clean | Removes all executables.
The apps folder also contains a Makefile with the following targets.
make all | Build all applications at once
make [app] | Build only one application, where [app] can be dfi, razers, micro_razers, seqan_tcoffee, seqcons, pair_align, or tree_recon
make clean | Removes all executables.
2.2 Microsoft Visual C++ Projects There are two pairs of MS Visual Studio project and solution files in the apps and demos folders: 1: Seqan_7.vcproj and Seqan_7.sln for Microsoft Visual C++ Version 7 ("Visual Studio .net 2003"), 2: Seqan_8.vcproj and Seqan_8.sln for Microsoft Visual C++ Version 8 ("Visual Studio .net 2005"), and 3: Seqan_9.vcproj and Seqan_9.sln for Microsoft Visual C++ Version 9 ("Visual Studio .net 2008"). Each example file has its own solution configuration, e.g. set the solution configuration "iterator" to the active solution configuration to select "iterator.cpp" for compiling. 2.3 CMake You can also build a project file for the IDE of your choice using CMake version 2.6 or later. After installing cmake you can generate project files for e.g. Xcode (only Mac OSX) run: cd cmake cmake -G Xcode To see the list of possible project files supported by cmake type: cmake --help After successfully generating the project files, you can either choose between project files in the apps or demos folders (below the cmake folder) or the project file in the cmake folder combining both of them. 3 Using SeqAn in your own projects As a pure template library, SeqAn solely consists of header files. To use SeqAn, you only have to add the path to the SeqAn installation folder of the installed snapshot to the compiler's include path. 3.1 Linux, Darwin, Solaris, MinGW The SeqAn installation path is added as include path by adding the compiler argument '-I'. To compile your own projects using SeqAn, you can use the Makefile in the demos folder as a starting point or write your own. By some (yet unknown) reasons, some versions of the GCC compiler needs the extra flag -pedantic to compile flawlessly. For a large file (>4GB) access on 32-bit operating systems you should add -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to the compiler. Under GNU/Linux it is also necessary to link against the runtime library with the additional linker switch -lrt. 3.2 MS Visual C++ Projects To add the SeqAn installation folder to the include path for a specific VC++-project, do the following: 1. Open the projects property page by a right click on the project in the solution explorer and select "Properties". 2. In the "Configurations" box select "All Configurations". 3. In the section "Configurations Properties" - "C/C++" - "General" add the SeqAn installation path to the field "Additional Include Directories".
Adding the SeqAn installation path to the include path of a Visual Studio project.
Optionally, you could also add the SeqAn installation folder to the include path for all VC++-projects: 1. Open the option panel from the menu bar by selecting "Tools" - "Options". 2. Select section "Projects" - "VC++ Directories". 3. In the "Show directories for" box select "Include files". 4. Click the "New Line" button and insert the SeqAn installation path.
Adding the SeqAn installation path to the include path of all Visual Studio projects.
See: Examples SeqAn - Sequence Analysis Library - www.seqan.de