Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

Managing multiple itep instances on a machine

mattb112885 edited this page Nov 7, 2013 · 5 revisions

Motivation and getting started

If you want to run two different studies looking at different groups of Bacteria (say, Lactobacillus and E. coli), but are not interested in comparing the two groups to each other, this section is for you. The current way to handle such a situation is to create a separate ITEP database for each set of organisms and switch between them by sourcing the SourceMe.sh file in the root directory of the instance you want to use.

Creating multiple ITEP instances

You can create a new ITEP instance (without any data loaded) by using git clone:

$ git clone git@github.com:mattb112885/clusterDbAnalysis

This will create a directory called "clusterDbAnalysis". If you change to that directory, you will see a SourceMe.sh file. Source that SourceMe.sh file using:

$ source SourceMe.sh

After doing this you will be able to use all of the scripts and libraries and access all of the data for this ITEP instance.

Switching between ITEP instances

You can switch to a specific ITEP instance by sourcing the SourceMe.sh file in the root directory of that instance.

Checking which ITEP instance you are referencing

After sourcing a particular SourceMe.sh file, you can find the current root directory (which I will call $root in most of this tutorial) by running this simple command:

$ db_getItepRoot.py

It is useful to do this before attempting to get any data from an ITEP database if you aren't sure which one you are pointing at. Note that if you wish whenever you see "$root" in this tutorial you can use the db_getItepRoot.py command directly to replace it. For example, to view the organisms file for the version of ITEP you are currently pointing at, use:

$ cat `db_getItepRoot.py`/organisms;

To view the groups file:

$ cat `db_getItepRoot.py`/groups;

To view the aliases file:

$ cat `db_getItepRoot.py`/aliases/aliases;

And so on... Note the ` is a backtick, not an apostrophe.

Clone this wiki locally