Changes

From Genome Analysis Wiki
Jump to: navigation, search

C++ Library: libStatGen

1,089 bytes added, 16:22, 28 March 2011
no edit summary
= 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 | StatGen Download Instructions]] and [[StatGen Repository#Compile.2FBuild | StatGen Compile/Build Instructions]]
This creates the library: statgen/lib/libStatGen.a
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 ==After # Create a directory for your own code.#* <code>mkdir MY_CODE_DIR</code># Move into your directory.#* <code>cd MY_CODE_DIR</code># Copy the Makefile from the statgen directory.#* <code>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 has been created).# Create <code>Makefile.tool</code>#* 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):#** <code>make</code>#* For debug (be sure that you also compiled statgen for debug):#** <code>make OPTFLAG="-ggdb -O0"</code>
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.
''' THIS IS IN THE PROCESS OF BEING UPDATED - CHECK BACK SOON'''== Creating programs ==You can also use your own Makefile or method of building.
If you are creating a program, you can start with Makefile.src found at Just be sure to add -ISTAGEN_DIR/statgen/srclib/include to your compile line to pull in the library header files.
(If you are creating Add <code>STATGEN_DIR/stagen/lib/libStatGen.a STATGEN_DIR/statgen/lib/samtools/libbam.a program -lm -lz -lssl</code> in a directory outside that order to the end of statgen/src, you may need additional modificationsyour compile line to pull in the necessary libraries.)
'''ExampleNOTE: creating statgen/src/myprog/'''# cd statgen/src/myprog# ln -s ../These are all handled for you if you use Makefile.src Makefile# cp ../bam/Makefile.tool .# Update Makefile.tool for your specific program.#* You may need settings beyond were set in from the statgen/src/bam/Makefile.tool. See Makefile.src for what settings you can userepository.
== Recently Added Capabilities ==
* [[SAM/BAM Convert Sequence|SAM/BAM support conversion between '=' and the base in a sequence]]

Navigation menu