Skip to content
Eric Nawrocki edited this page Feb 13, 2023 · 59 revisions

Installation instructions for users

The file install.sh is an executable shell script that will install Ribovore and its dependencies and then output important instructions for updating your environment variables so you can run the Ribovore scripts.

More detailed instructions can be found in Ribovore's install.md


Installation instructions for developers

The instructions below are relevant only to developers who wish to develop Ribovore or modify Ribovore in some way. For users interested running Ribovore, see the Installation instructions for users above. The developer installation is broken down into three steps:

steps for initial checkout

Ribovore depends on several other repositiores at github:

Further, Infernal also depends on hmmer and easel.

Ribovore also requires NCBI BLAST version 2.11.0+.

Importantly vecscreen_plus_taxonomy will only run on Linux (it will not run on Mac/OSX). But it is only required for ribodbmaker, so you can still develop/run the other Ribovore scripts if you skip steps related to vecscreen_plus_taxonomy below.

To clone a Ribovore repository for the first time, and get it set up for development follow the steps below.

First, move into a directory that you want to keep all the code in. Below, you will define the $RIBOINSTALLDIR environment variable to this directory. That directory is referred to as !PATH-TO-RIBO-INSTALL-DIR! below:

   $ cd !PATH-TO-RIBO-INSTALL-DIR!
   $ git clone https://github.com/ncbi/ribovore.git
   $ git clone https://github.com/nawrockie/sequip.git
   $ git clone https://github.com/aaschaffer/rRNA_sensor.git
   $ git clone https://github.com/aaschaffer/vecscreen_plus_taxonomy.git
   $ git clone https://github.com/EddyRivasLab/infernal.git infernal
   $ cd infernal
   $ git clone https://github.com/EddyRivasLab/hmmer
   $ git clone https://github.com/EddyRivasLab/easel

This will set you up on the master branches for all packages.

To do development, you'll want to now checkout the develop branches in all of the git repos you just cloned using the commands listed below. Or alternatively you can skip this step to build the stable master branches.

   $ cd !PATH-TO-RIBO-INSTALL-DIR!
   $ (cd ribovore; git checkout develop;)
   $ (cd sequip; git checkout develop;)
   $ (cd rRNA_sensor; git checkout develop;)
   $ (cd vecscreen_plus_taxonomy; git checkout develop;)
   $ (cd infernal; git checkout develop;)
   $ (cd infernal/easel; git checkout develop;)
   $ (cd infernal/hmmer; git checkout develop;)

You'll also want to download the BLAST-2.11.0+ distribution with pre-compiled binaries either for Linux:

   $ curl -k -L -o blast.tar.gz https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.11.0/ncbi-blast-2.11.0+-x64-linux.tar.gz

or for Mac/OSX:

   $ curl -k -L -o blast.tar.gz https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.11.0/ncbi-blast-2.11.0+-x64-macosx.tar.gz

And then unpack it:

   $ tar xfz blast.tar.gz
   $ rm blast.tar.gz
   $ mv ncbi-blast-2.11.0+ ncbi-blast

steps for building

To build infernal:

   $ cd !PATH-TO-RIBO-INSTALL-DIR!
   $ cd infernal
   $ autoconf
   $ sh ./configure; 
   $ make
   $ make check

steps for setting your environment variables

To set up your environment, if you use bash shell, add the following to your ~/.bashrc file:

Add the following lines to your .bashrc file, replacing PATH-TO-X-CLONE with the directories created by the above git clone commands (or to paths where you installed Infernal and blasnt) for package/module X:

export RIBOINSTALLDIR=!PATH-TO-RIBO-INSTALL-DIR!
export RIBOSCRIPTSDIR="$RIBOINSTALLDIR/ribovore"
export RIBOINFERNALDIR="$RIBOINSTALLDIR/infernal/binaries"
export RIBOEASELDIR="$RIBOINSTALLDIR/infernal/binaries"
export RIBOSEQUIPDIR="$RIBOINSTALLDIR/sequip"
export RIBOBLASTDIR="$RIBOINSTALLDIR/ncbi-blast/bin"
export RIBOTIMEDIR=/usr/bin
export RRNASENSORDIR="$RIBOINSTALLDIR/rRNA_sensor"
export PERL5LIB="$RIBOSCRIPTSDIR":"$RIBOSEQUIPDIR":"$PERL5LIB"
export PATH="$RIBOSCRIPTSDIR":"$RIBOBLASTDIR":"$RRNASENSORDIR":"$PATH"
export VECPLUSDIR="$RIBOINSTALLDIR/vecscreen_plus_taxonomy"
export BLASTDB="$VECPLUSDIR/univec-files":"$RRNASENSORDIR":"$BLASTDB"

or if you use C shell, add the following to your ~/.cshrc file:

setenv RIBOINSTALLDIR !PATH-TO-RIBO-INSTALL-DIR!
setenv RIBOSCRIPTSDIR "$RIBOINSTALLDIR/ribovore"
setenv RIBOINFERNALDIR "$RIBOINSTALLDIR/infernal/binaries"
setenv RIBOEASELDIR "$RIBOINSTALLDIR/infernal/binaries"
setenv RIBOSEQUIPDIR "$RIBOINSTALLDIR/sequip"
setenv RIBOBLASTDIR "$RIBOINSTALLDIR/ncbi-blast/bin"
setenv RIBOTIMEDIR /usr/bin
setenv RRNASENSORDIR "$RIBOINSTALLDIR/rRNA_sensor"
setenv PERL5LIB "$RIBOSCRIPTSDIR":"$RIBOSEQUIPDIR":"$PERL5LIB"
setenv PATH "$RIBOSCRIPTSDIR":"$RIBOBLASTDIR":"$RRNASENSORDIR":"$PATH"
setenv VECPLUSDIR "$RIBOINSTALLDIR/vecscreen_plus_taxonomy"
setenv BLASTDB "$VECPLUSDIR/univec-files":"$RRNASENSORDIR":"$BLASTDB"

With the actual path replacing !PATH-TO-RIBO-INSTALL-DIR! above.

Then, source one of those files with

source ~/.bashrc

Or:

source ~/.cshrc

For information about our git workflow, read on.

git workflow

Ribovore uses the popular git workflow that's often just called "git flow". Go read the 2010 blog post by Vincent Driessen that describes it. But we use it with the difference that we don't mind having feature branches on origin.

In what follows, first we'll give concise-ish examples of the flow for normal development, making a release, and making a "hotfix". A summary of the principles and rationale follows the examples.

Normal development

Generally, for any changes you make to our code, you will make on a feature branch, off of develop. So first you create your branch:

   $ git checkout -b myfeature develop            

Now you work, for however long it takes. You can make commits on your myfeature branch locally, and/or you can push your branch up to the origin and commit there too, as you see fit.

When you're done, and you've tested your new feature, you merge it to develop (using --no-ff, which makes sure a clean new commit object gets created), and delete your feature branch:

   $ git checkout develop                     
   $ git merge --no-ff -m "Merges myfeature branch into develop" myfeature
   $ git branch -d myfeature
   $ git push origin --delete myfeature
   $ git push origin develop                  

Small features: single commits can be made to develop

Alternatively, if you're sure your change is going to be a single commit, you can work directly on the develop branch.

   $ git checkout develop                  
     # make your changes
   $ git commit
   $ git push origin develop               

Big features: keeping up to date with develop

If your work on a feature is taking a long time (days, weeks...), and if the develop trunk is accumulating changes you want, you might want to periodically merge them in:

   $ git checkout myfeature
   $ git merge --no-ff -m "Merges develop branch into myfeature branch" develop           

Making a release

To make a release, you're going to make a release branch of the code, and of the sequip, rRNA_sensor and vecscreen_plus_taxonomy repos if you made changes there as well. (*Note: if you made changes to infernal you'll want to go ahead and make a new release of infernal first, then come back here.) You assign appropriate version numbers to each, test and stabilize. When everything is ready, you merge to master and tag that commit with the version number; then you also merge back to develop, and delete the release branch.

For example, here's the git flow for a ribovore release, depending on sequip, rRNA_sensor and vecscreen_plus_taxonomy. Suppose ribovore is currently at 0.03, and all of its dependencies (sequip, rRNA_sensor and vecscreen_plus_taxonomy) are all currently at 0.02. Suppose we decide this release will be ribovore 0.1, and it does not depend on any new features in its dependencies, so we can use the last stable versions of those (this will be the head of the master sequip, rRNA_sensor, vecscreen_plus_taxonomy git repos, which is what you should be using unless you made changes in any of those repos). To proceed we first go over to sequip, rRNA_sensor, and vecscreen_plus_taxonomy and just make tags:

   $ cd sequip
   $ git checkout master
   $ git tag -a -m "Tags sequip 0.02 for ribovore-0.1 release" ribovore-0.1
   $ git push origin ribovore-0.1
   $ cd rRNA_sensor
   $ git checkout master
   $ git tag -a -m "Tags rRNA_sensor 0.02 for ribovore-0.1 release" ribovore-0.1
   $ git push origin ribovore-0.1
   $ cd vecscreen_plus_taxonomy
   $ git checkout master
   $ git tag -a -m "Tags vecscreen_plus_taxonomy 0.02 for ribovore-0.1 release" ribovore-0.1
   $ git push origin ribovore-0.1

then go over and make a new release from ribovore's develop branch:

   $ cd ribovore
   $ git checkout develop # only necessary if you're not already on develop
   $ git checkout -b release-0.1 develop
     # follow the 'Release checklist' at the bottom of this page
     # do and commit any other work needed to test/stabilize ribovore release.
   $ git commit -a -m "Version number bumped to 0.1"

When you're finished merge the ribovore release branch as follows:

   $ git checkout master
   $ git merge --no-ff -m "Merges release-0.1 branch into master" release-0.1
   $ git tag -a -m "Tags 0.1 release" ribovore-0.1
   $ git push
   $ git push origin ribovore-0.1
      # Now merge release branch back to develop...
   $ git checkout develop
   $ git merge --no-ff -m "Merges release-0.1 branch into develop" release-0.1
   $ git push
   $ git branch -d release-0.1
   $ git push origin --delete release-0.1

Finally, run the install.sh script, and make sure the installed files work.

Release process with new features in dependencies

Alternatively, what if our new release depends on some new features in sequip. In this case, we need to make a new sequip 0.03 release:

   $ cd sequip
   $ git checkout develop # only necessary if you're not already on develop
   $ git checkout -b release-0.03 develop
     # Update version in README and .pm files (actually check sequip's analogous wiki page to be safe)
   $ git commit -a -m "Version number bumped to 0.03"
     # do and commit any other work needed to test/stabilize sequip release

then go over and make the ribovore release branch (but don't actually release) as explained above in the example that bundled stable sequip 0.02.

When the ribovore release is ready we need to merge the sequip release branch:

   $ cd sequip
   $ git checkout master
   $ git merge --no-ff -m "Merges release-0.03 branch into master" release-0.03
   $ git tag -a -m "Tags sequip 0.03 release" sequip-0.03
   $ git push origin sequip-0.03
   $ git tag -a -m "Tags sequip 0.03 for ribovore-0.1 release" ribovore-0.1  # This records that ribovore-0.1 depends on sequip 0.03
   $ git push origin ribovore-0.1
       # Now merge release branch back to develop...
   $ git checkout develop
   $ git merge --no-ff -m "Merges release-0.03 branch into develop" release-0.03
   $ git push
   $ git branch -d release-0.03
   $ git push origin --delete release-0.03

and finally, we do the same pattern on ribovore itself (see above 'When you're finished merge the ribovore release branch as follows')

Dependencies always have a tag for their own release (sequip 0.02), and may have additional tags for packages that depend on them (ribovore 0.1 bundles sequip 0.02? Then there's a ribovore-0.1 tag pointing to that sequip commit object).

And really finally, test the install.sh script to make sure it works.


If you need to fix a critical bug and make a new release immediately, you create a hotfix release with an updated version number, and the hotfix release is named accordingly: for example, if we screwed up ribovore 0.03, hotfix-0.04 is the updated 0.04 release.

A hotfix branch comes off master, but otherwise is much like a release branch.

   $ cd ribovore
   $ git checkout -b hotfix-0.04 master                 
     # follow the 'Release checklist' at the bottom of this page
   $ git commit -a -m "Version number bumped to 0.04"

Now you fix the bug(s), in one or more commits. When you're done, the finishing procedure is just like a release:

    $ git checkout master              
    $ git merge --no-ff -m "Merges hotfix-0.04 branch into master" hotfix-0.04
    $ git push
    $ git tag -a -m "Tags 0.04 release" ribovore-0.04
    $ git push origin ribovore-0.04
    $ git checkout develop              
    $ git merge --no-ff -m "Merges hotfix-0.04 branch into develop" hotfix-0.04
    $ git push
    $ git branch -d hotfix-0.04

And make a tag in sequip, rRNA_sensor, and vecscreen_plus_taxonomy:

   $ cd sequip
   $ git checkout master
   $ git tag -a -m "Tags sequip-0.02 for ribovore-0.04 release" ribovore-0.04
   $ git push origin ribovore-0.04
   $ cd rRNA_sensor
   $ git checkout master
   $ git tag -a -m "Tags rRNA_sensor 0.02 for ribovore-0.04 release" ribovore-0.04
   $ git push origin ribovore-0.04
   $ cd vecscreen_plus_taxonomy
   $ git checkout master
   $ git tag -a -m "Tags vecscreen_plus_taxonomy 0.02 for ribovore-0.04 release" ribovore-0.04
   $ git push origin ribovore-0.04

And finally, test the 'install.sh' script to make sure it works.

There are two long-lived Ribovore branches: origin/master, and origin/develop. All other branches have limited lifetimes.

master is stable. Every commit object on master is a tagged release, and vice versa.

develop is for ongoing development destined to be in the next release. develop should be in a close-to-release state. Another package (e.g. ribovore) may need to create a release of a downstream dependency (e.g. sequip) at short notice. Therefore, commit objects on develop are either small features in a single commit, or a merge of a finished feature branch.

We make a feature branch off develop for any nontrivial new work -- anything that you aren't sure will be a single commit on develop. A feature branch:

  • comes from develop
  • is named anything informative (except master, develop, hotfix-* or release-*)
  • is merged back to develop (and deleted) when you're done
  • is deleted once merged

We make a release branch off develop when we're making a release. A release branch:

  • comes from develop
  • is named release-<version>, such as release-1.2
  • first commit on the hotfix branch consists of bumping version/date/copyright
  • is merged to master when you're done, and that new commit gets tagged as a release
  • is then merged back to develop too
  • is deleted once merged

We make a hotfix branch off master for a critical immediate fix to the current release. A hotfix branch:

  • comes from master
  • is named hotfix-<version>, such as hotfix-1.2.1
  • first commit on the hotfix branch consists of bumping version/date/copyright
  • is merged back to master when you're done, and that new commit object gets tagged as a release.
  • is then merged back to develop too
  • is deleted once merged

Release checklist

Optional steps only necessary for releases with significant changes since last release.

  • OPTIONAL: Update the taxonomy tree file, see this page
  • Update version and date in scripts (including those in miniscripts/ (ali-apos-to-uapos.pl and alipid-taxinfo-analyze.pl)
  • Update date version in README.md
  • Update install*sh scripts with new version (ribovore, infernal, blastn?)
  • Update version (search for all occurrences) in documentation/*.md files
  • Add release notes in RELEASE-NOTES.md
  • OPTIONAL: Go through all .md files: rerun sample runs, update output in .md files and also check via diff output files in testfiles/.
  • Attempt an installation with install.sh but you will have to manually modify install.sh to checkout the release branch the tag for the release you are about to do does not yet exist (the tags for the dependencies may exist, if not you will need to make special changes for dependencies too).
  • Run $RIBOSCRIPTSDIR/testfiles/do-all-tests.sh using test install from previous step.

Much of the text above was borrowed and modified with permission from Sean Eddy, from the HMMER github repository.


Questions, comments or feature requests? Send a mail to eric.nawrocki@nih.gov.