Skip to content

Building and Installing from Source

Andrew Klymenko edited this page Feb 15, 2022 · 7 revisions

ANNOUNCEMENTS:

This repository is now frozen. The NGS project has moved to https://github.com/ncbi/sra-tools/ngs. See the full announcement on (https://github.com/ncbi/ngs).

Quick instructions for building and installing ngs from source.

Please note - the ngs API was designed as a front-end to one or more back-end "engines" that provide an implementation for a particular technology. The engine that provides SRA technology is contained within the ncbi-vdb library (https://github.com/ncbi/ncbi-vdb/). A library is needed for complete functionality.

  1. Create an ncbi source directory if needed.
    While this is not strictly required, our configuration scripts will benefit by being able to locate related projects without asking for explicit paths:
    $ mkdir ncbi

  2. Check out the sources:
    $ cd ncbi
    $ git clone https://github.com/ncbi/ngs.git

  3. If you are interested in ngs-python support, you should also check out ncbi-vdb:
    $ git clone https://github.com/ncbi/ncbi-vdb.git
    Otherwise, skip steps below that refer to ngs-python.

  4. Configure the build:
    $ cd ngs
    $ ./configure
    By default, configure will select a build-output directory under your $HOME and will install under /usr/local/ngs on Linux.
    The default settings can be changed, of course. For all options, you can run:
    $ ./configure --help

  5. Make each of the sub-projects:
    $ make -C ngs-sdk
    $ make -C ngs-java
    $ make -C ngs-python # (optional)

NB - the sub-project ngs-bam has been deprecated and was not configured by step 4.

  1. If you are installing ngs-python and have not yet installed ncbi-vdb, you should build and install it now. See: https://github.com/ncbi/ncbi-vdb/wiki/Building-and-Installing-from-Source

  2. Install each of the sub-projects (you may be asked for an admin password):
    $ sudo make -C ngs-sdk install
    $ sudo make -C ngs-java install
    $ sudo make -C ngs-python install # (optional)

At this point, the installation should be complete, although you will probably have to login again before all changes take place. If the installation is successful, you should find library code installed and an update to shell variables (only AFTER logging in again). To verify update of your environment:
$ echo $LD_LIBRARY_PATH # should now have the path to your installed ngs libraries
$ echo $CLASSPATH # should now have the path to your installed ngs jar

Some users have experienced difficulties: see Issue #1