Changes

From Genome Analysis Wiki
Jump to navigationJump to search
1,747 bytes added ,  15:54, 31 January 2017
Line 1: Line 1: −
[[Category:Software Libraries]]
   
[[Category:C++]]
 
[[Category:C++]]
 
[[Category:libStatGen]]
 
[[Category:libStatGen]]
Line 22: Line 21:       −
= Using libStatGen =
+
= Copyrights =
'''If you use this software, please e-mail me, Mary Kate Trost, at mktrost@umich.edu'''
+
'''If you use this software, please e-mail me, Mary Kate Wing, at mktrost@umich.edu'''
    
Here are links to the copyrights for our code and some of the utilities it uses:
 
Here are links to the copyrights for our code and some of the utilities it uses:
Line 31: Line 30:  
Copies of these can be found in our library under libStatGen/copyrights/.
 
Copies of these can be found in our library under libStatGen/copyrights/.
   −
= Where to Find It =
+
= Join in libStatGen mailing list =
libStatGen can be found at: [https://github.com/statgen/libStatGen https://github.com/statgen/libStatGen]
     −
libStatGen can also be found within certain releases of statgen tools.  The tools will have a release version that also includes a copy of libStatGen.
+
Please join in the [http://groups.google.com/group/libStatGen libStatGen Google Group] to ask / discuss / comment about this library.
      −
On github, you can both browse and download the latest version of the library, as well as explore the history of changes.
+
= Troubleshooting =
 +
If you are having trouble compiling any of the versions, check [[libStatGen Troubleshooting]] for help.  If that does not solve your problem, email me for support.
   −
You can access the latest version with or without using git.
     −
== Using Git To Track the Current Development Version ==
+
= Where to Find It =
 
  −
=== Clone (get your own copy) ===
  −
You can create your own git clone (copy) using:
  −
git clone https://github.com/statgen/libStatGen.git
  −
or
  −
git clone git://github.com/statgen/libStatGen.git
  −
 
  −
Either of these commands create a directory called <code>libStatGen</code> in the current directory.
  −
 
  −
Then just <code>cd libStatGen</code> and [[C++ Library: libStatGen#Building the Library|compile the library]].
     −
=== Get the latest Updates (update your copy) ===
+
{{ToolGitRepo|repoName=libStatGen|libStatGen=true|libBaseName=libStatGen}}
To update your copy to the latest version (a major advantage of using git):
  −
# <code>cd pathToYourCopy/libStatGen</code>
  −
# <code>make clean</code>
  −
# <code>git pull</code>
  −
# <code>make all</code>
     −
=== Git Refresher ===
+
== Releases ==
If you decide to use git, but need a refresher, see [[How To Use Git]] or [https://statgen.sph.umich.edu/wiki/How_To_Use_Git Notes on how to use git] (if you have access)
  −
 
  −
 
  −
== Getting the Latest Development Version without Using Git ==
  −
Periodically download the latest copy from github from the "Downloads" link on the webpage or [https://github.com/statgen/libStatGen/archives/master https://github.com/statgen/libStatGen/archives/master]. 
  −
 
  −
The downloaded tar file is named "statgen-libStatGen-''someHexNumber''.tar.gz".  The directory created when it is untared shares the same base name.  I recommend that you do not change the name of the directory.  If you want one called libStatGen, create a link to this directory.  The hex number in the directory name identifies the version of the library that you downloaded and is necessary to easily troubleshoot any issues you encounter.  If you must rename the directory, be sure to record the hex number that was on the download for future reference.
  −
 
  −
 
  −
== Released Versions ==
   
Released Versions are documented at [[libStatGen Download]]
 
Released Versions are documented at [[libStatGen Download]]
      
= What has changed =
 
= What has changed =
Line 84: Line 56:  
= Library Documentation =
 
= Library Documentation =
 
Latest Doxygen documentation:
 
Latest Doxygen documentation:
[http://www.sph.umich.edu/csg/mktrost/doxygen/2011_08_23/ 8/23/11 Library Documentation in Doxygen]
+
<!-- <a href="http://csg.sph.umich.edu//abecasis/GOLD/ -->
 +
<!-- [http://www.sph.umich.edu/csg/mktrost/doxygen/current/ Current Library Documentation in Doxygen] -->
 +
[http://csg.sph.umich.edu//mktrost/doxygen/current/ Current Library Documentation in Doxygen]
   −
Additional documentation: <span style="color:#B22222">Currently outdated, but updates will be coming soon</span>
+
Additional documentation:  
 
* [[libStatGen: general]] - General classes for file processing and performing common tasks (used by most other libraries).
 
* [[libStatGen: general]] - General classes for file processing and performing common tasks (used by most other libraries).
 
* [[libStatGen: BAM]] - Classes specific for reading/writing/analyzing SAM/BAM files.
 
* [[libStatGen: BAM]] - Classes specific for reading/writing/analyzing SAM/BAM files.
 
* [[libStatGen: GLF]] - Classes specific for reading/writing/analyzing GLF files.
 
* [[libStatGen: GLF]] - Classes specific for reading/writing/analyzing GLF files.
 
* [[libStatGen: FASTQ]] - Classes specific for reading/writing/analyzing FastQ files.
 
* [[libStatGen: FASTQ]] - Classes specific for reading/writing/analyzing FastQ files.
 +
* [[libStatGen: ASP]] - Classes specific for reading/writing/analyzing ASP files.
 +
* [[libStatGen: VCF]] - Classes specific for reading/writing/analyzing VCF files.
    
= Using the Library =
 
= Using the Library =
Line 97: Line 73:  
** g++
 
** g++
 
** development version of zlib (zlib1g-dev on ubuntu)
 
** development version of zlib (zlib1g-dev on ubuntu)
** openssl and md5 (libssl-dev on ubuntu)
   
* Compiles on Linux/Unix
 
* Compiles on Linux/Unix
   Line 148: Line 123:  
== Using the Library in Your Own Program ==
 
== Using the Library in Your Own Program ==
   −
=== Starting from a Sample Program ===
+
=== Starting from a Sample Program (Recommended) ===
 
[https://github.com/statgen/SampleProgram https://github.com/statgen/SampleProgram] is a simple program demonstrating how to write a tool that uses libStatGen and can be used as a starting point for your tool.   
 
[https://github.com/statgen/SampleProgram https://github.com/statgen/SampleProgram] is a simple program demonstrating how to write a tool that uses libStatGen and can be used as a starting point for your tool.   
   Line 175: Line 150:  
# Add your tests to the <code>test</code> directory.
 
# Add your tests to the <code>test</code> directory.
 
# Update test/Makefile as appropriate for specifying how to compile/run your tests.
 
# Update test/Makefile as appropriate for specifying how to compile/run your tests.
 +
 +
 +
After compiling a <code>bin</code> directory is created in the top level directory.  Your executable goes in there.  If you build for <code>debug</code> and/or <code>profile</code>, subdirectories for those are created under <code>bin/</code> and <code>obj</code>.
      Line 181: Line 159:       −
= Troubleshooting =
+
=== Starting from a Sample Set of Tools ===
If you are having trouble compiling any of the versions, check [[libStatGen Troubleshooting]] for helpIf that does not solve your problem, email me for support.
+
[https://github.com/statgen/SampleTools https://github.com/statgen/SampleTools] is a repository containing multiple programs within one directory structure.  It demonstrates how to have subdirectories for each tool using libStatGen and can be used as a starting point for your set of tools. 
 +
 
 +
SampleTools has 3 subdirectories:
 +
* copyrights - contains the copyright information, add your own copyrights as necessary
 +
* SampleProgram1 - a dummy demo program to show the structure for having multiple programs
 +
* SampleProgram2 - a second dummy demo program to show the structure for having multiple programs
 +
 
 +
SampleProgram1 & SampleProgram2 have 2 subdirectories:
 +
* src - this is where your own program code goes
 +
* test - this is where your test code goes.  Test code can be setup to run with <code>make test</code> to ensure the program works properly.
 +
 
 +
Upon compiling, an <code>obj</code> directory is created under <code>SampleProgram1</code> and <code>SampleProgram2</code> and a <code>bin</code> directory is created at the top level.  If you build for <code>debug</code> and/or <code>profile</code>, subdirectories for those are created under <code>bin/</code> and <code>SampleProgram1(2)/obj</code>.
 +
 
 +
 
 +
'''Using SampleTools as a starting point for your set of tools:'''
 +
# Copy <code>SampleTools</code> into a directory with your toolset name (it is the starting point for your own set of tools).
 +
# Update <code>ChangeLog</code>, <code>.gitignore</code>, and <code>README.txt</code> as appropriate.
 +
# Add any necessary copyrights to the copyrights directory.
 +
# Rename the <code>SampleProgram1</code> and <code>SampleProgram2</code> directories
 +
# Create any additional directories as necessary.
 +
#* Recursively copy the structure/Makefiles from <code>SampleProgram1</code>.
 +
# Update <code>SUBDIRS</code> in <code>Makefile</code> as necessary.
 +
# Update <code>Makefile.inc</code>
 +
## Update the <code>VERSION</code> as necessary.
 +
## Replace all occurrences of <code>SAMPLE_PROGRAM</code> with an all caps name for your toolset.
 +
##*  You can then use the <code>LIB_PATH_<your toolset name></code> environment variable to specify an alternate path to libStatGen specific for your programIn most cases you will not need to do this.
 +
#* No other updates to <code>Makefile.inc</code> should be necessary.
 +
# For each Program you want to add:
 +
## Move into the appropriate subdirectory.
 +
##* No change should be made to the program's <code>Makefile</code>
 +
## Add your program (cpp & h files) to the <code>src</code> subdirectory.
 +
## Update src/Makefile
 +
### Set EXE to your program executable (replacing sampleProgram)
 +
### Set TOOLBASE, SRCONLY, and HDRONLY as appropriate for specifying your program file names.
 +
### Set any of the other optional settings as specified in the sample makefile.
 +
##* No other changes should be necessary to src/Makefile.
 +
## Add your tests to the <code>test</code> directory.
 +
## Update test/Makefile as appropriate for specifying how to compile/run your tests.
 +
 
 +
 
 +
= How To Use the APIs =
 +
More coming soon, see: http://genome.sph.umich.edu/wiki/Sam_Library_Usage_Examples
 +
 
 +
[[LibStatGen: ASP#API for Reading ASP Files| ASP APIs]]
 +
 
 +
[[LibStatGen: VCF#API for Reading VCF Files| VCF APIs]]
96

edits

Navigation menu