Skip to content

Building and Installing from Source

kwrodarmer edited this page Nov 17, 2014 · 5 revisions

Quick instructions for building and installing sra-tools from source.

  1. Dependencies:
    sra-tools will attempt to utilize 3rd party libraries and development headers from your system if they can be located:
    libxml2 (needed for many loaders)
    libmagic (needed for copycat)
    libhdf5 (needed for pacbio-load)
    If any of these libraries cannot be located, their functionality will be missing from our library, and some tools may not be built.

  2. 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

  3. Check out the sources:
    $ cd ncbi
    $ git clone https://github.com/ncbi/sra-tools.git

  4. If you have not yet installed ngs and/or ncbi-vdb, please do so now:
    $ git clone https://github.com/ncbi/ngs.git
    $ git clone https://github.com/ncbi/ncbi-vdb.git
    and follow directions at https://github.com/ncbi/ngs/wiki/Building-and-Installing-from-Source and https://github.com/ncbi/ncbi-vdb/wiki/Building-and-Installing-from-Source respectively.

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

  6. Make the tools:
    $ make

  7. Become root:
    $ su
    <enter-root-password>

  8. Install the tools and configuration:
    # make install

  9. Exit root shell:
    # exit

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 $PATH # should now have the path to your installed sra-tools, and
$ which fastq-dump # should return the location of this utility.