Difference between revisions of "C++ Library: libStatGen"
Line 24: | Line 24: | ||
[http://www.sph.umich.edu/csg/mktrost/doxygen/version.0.1.2/ Version 0.1.2 Library Documentation in Doxygen] | [http://www.sph.umich.edu/csg/mktrost/doxygen/version.0.1.2/ Version 0.1.2 Library Documentation in Doxygen] | ||
− | Possibly out of date | + | Possibly out of date documentation: |
* [[StatGenLibrary: general]] - General classes for file processing and performing common tasks (used by most other libraries). | * [[StatGenLibrary: general]] - General classes for file processing and performing common tasks (used by most other libraries). | ||
* [[StatGenLibrary: BAM]] - Classes specific for reading/writing/analyzing SAM/BAM files. | * [[StatGenLibrary: BAM]] - Classes specific for reading/writing/analyzing SAM/BAM files. | ||
* [[StatGenLibrary: GLF]] - Classes specific for reading/writing/analyzing GLF files. | * [[StatGenLibrary: GLF]] - Classes specific for reading/writing/analyzing GLF files. | ||
* [[StatGenLibrary: FASTQ]] - Classes specific for reading/writing/analyzing FastQ files. | * [[StatGenLibrary: FASTQ]] - Classes specific for reading/writing/analyzing FastQ files. | ||
− | |||
= Using the Library = | = Using the Library = |
Revision as of 17:28, 28 March 2011
DESCRIPTION
Open source, freely available (GPL license), easy to use C++ APIs
- General Operation Classes including:
- File/Stream I/O – uncompressed, BGZF, GZIP, stdin, stdout
- String processing
- Parameter Parsing
- Statistical Genetic Specific Classes including:
- Handling Common file formats – SAM/BAM, FASTQ, GLF
- Accessors to get/set values
- Indexed access to BAM files
- Utility classes, including:
- Cigar – interpretation and mapping between query and reference
- Pileup – structured access to data by individual reference position
- Handling Common file formats – SAM/BAM, FASTQ, GLF
Library Documentation
Latest Doxygen documentation: 3/22/11 Library Documentation in Doxygen
Version 0.1.2 Library Documentation in Doxygen
Possibly out of date documentation:
- StatGenLibrary: general - General classes for file processing and performing common tasks (used by most other libraries).
- StatGenLibrary: BAM - Classes specific for reading/writing/analyzing SAM/BAM files.
- StatGenLibrary: GLF - Classes specific for reading/writing/analyzing GLF files.
- StatGenLibrary: FASTQ - Classes specific for reading/writing/analyzing FastQ files.
Using the Library
In the following instructions/comments:
- replace STATGEN_DIR with the path to where the statgen directory is located (does not include statgen/).
- replace MY_CODE_DIR with the path where you want your code located.
To use the StatGen Library, first download and compile via StatGen Download Instructions and StatGen Compile/Build Instructions
This creates the library: STATGEN_DIR/statgen/lib/libStatGen.a, where STATGEN_DIR is the path to where you dec
Creating programs using the Default Makefile
- Create a directory for your own code.
mkdir MY_CODE_DIR
- Move into your directory.
cd MY_CODE_DIR
- Copy the Makefile from the statgen directory.
cp STATGEN_DIR/statgen/src/Makefile.src Makefile
- You could instead link the Makefile, but then be careful not to modify it for your program because that may break any other programs that link to it (including those with the statgen repository).
- Create
Makefile.tool
- See Makefile.tool for what to put into Makefile.tool.
- Compile your program
- For optimal performance (be sure you also compiled statgen for optimal performance):
make
- For debug (be sure that you also compiled statgen for debug):
make OPTFLAG="-ggdb -O0"
- For optimal performance (be sure you also compiled statgen for optimal performance):
NOTE: When you compile, all of your '.o' files will go in a directory called obj that will be created by the Makefile if it does not already exist.
Creating programs Without the Default Makefile
You can also use your own Makefile or method of building.
Just be sure to add -ISTAGEN_DIR/statgen/lib/include to your compile line to pull in the library header files.
Add STATGEN_DIR/stagen/lib/libStatGen.a STATGEN_DIR/statgen/lib/samtools/libbam.a -lm -lz -lssl
in that order to the end of your compile line to pull in the necessary libraries.
NOTE: These are all handled for you if you use Makefile.src from the statgen repository.
Recently Added Capabilities