GSnap  0.8.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
GSnap Source Documentation

Welcome

Welcome to GSnap's source documentation! Using this detailed documentation, it is easy to become familiar with the code base and begin making contributions. In addition to providing documentation for the public members of each class, this documentation provides documentation for many private and protected class members so that you can understand the internal details of the implementation. Feel free to fix bugs, improve current features, and add new features. If you find a piece of code that is poorly documented, treat this as a bug and file a bug report. Alternatively, you can contribute by adding Doxygen-style documentation to the source and then performing a pull request.

Getting Started

First, note that the header global.h is included in all files, either directly or indirectly. This header contains global typedefs, enumerations, and a few global functions declared in the gsnap namespace, which is the only namespace defined by GSnap. The global.h header includes settings.h, which contains a few preprocessor definitions.

By clicking on the Files link, above, you can browse through all of GSnap's source files. Note that the code is divided into several major components, which are stored in separate directories. The directories are,

CLI: the command line interface and related tools.
Core: the most basic functionality, used by all other components.
GUI: the graphical user interface.
IO: snapshot file input and output utilities.
Viz: the visualization code.

To understand the code as a whole, begin by looking at main.cc, which simply launches the command line interface or the graphical user interface, depending on how the program is invoked. Then study the CLI and Core source code. Understanding these will require you to visit the IO and Viz code as well. When reading through the source, clicking on any hyper-linked word will take you to documentation on that specific class, function, typedef, or enumeration. When reading file documentation, studying the "Include dependency graph" can help you to get an idea of how all of the pieces fit together.

By clicking on the Classes link above, you can browse through all of the classes used by GSnap. This provides you with another entry point to understand the details of the code. Note that clicking on the "caller graph" and "call graph" for the member functions can be helpful.

If you wish to understand the code as quickly as possible, I recommend using the Qt Creator integrated development environment along with this documentation. See the following section for more information.

Using Qt Creator

If you use the Qt Creator integrated development environment to work on GSnap (recommended), you can integrate this source code documentation, which makes it even easier to understand the source.

Requirements

First, you will need to download the GSnap source and install Doxygen, Graphviz, and a $\mbox{\LaTeX}$ system, such as TeXLive on your local system in addition to Qt Creator and a complete installation of the Qt Framework.

Step 1:

In the gsnap/src/ directory, issue the command

doxygen

This command will create the latest version of this documentation in the gsnap/Documentation/html/ directory.

Step 2:

Navigate to gsnap/Documentation/html/ and run the command

qhelpgenerator index.qhp

This generates the file index.qch, which can be used by Qt Creator to connect this documentation with the source.

Step 3:

Open Qt Creator and navigate to Tools > Options > Help. Then click the Documentation tab. Click Add... and locate the file gsnap/Documentation/html/index.qch. ma

Step 4:

Restart Qt Creator and load the GSnap project file, gsnap/src/gsnap.pro. Now you can quickly access the documentation for any class, function, variable, typedef, etc. by hovering over the name of the entity in the source code and pressing the F1 key.

Note:

Using Qt Creator 2.8 or later and Doxygen 1.8.3.1 or later is recommended, since earlier versions did not support enough C++11 syntax to be useful for all parts of the GSnap source. If you wish to use Eclipse or XCode as your IDE, you can modify the Doxygen file, gsnap/src/Doxyfile. If you modify the Doxygen file, please do not include it in your pull request.

Contributing Code

In order to contribute code, follow the instructions for forking the source and performing a a pull request. The instructions can be found here. Please read and follow the gsnap/Coding_Guidelines document and test your code thoroughly before performing a pull request.