Using custom track database: Difference between revisions

From genomewiki
Jump to navigationJump to search
No edit summary
 
No edit summary
Line 3: Line 3:
A new feature of the genome browser as of March 2007 is the ability
A new feature of the genome browser as of March 2007 is the ability
to use a data base for custom tracks.  Up to this date, custom track
to use a data base for custom tracks.  Up to this date, custom track
data has been kept in files in the /trash/ct/ directory.
data has been kept in files in the <em>/trash/ct/</em> directory.
This article discusses the steps required to enable this function.
 
==Summary configuration==
<ul>
<li>database loader binaries hgLoadBed, hgLoadWiggle and wigEncode are installed in /cgi-bin/loader/ - these are installed via the normal 'make cgi' in the source tree kent/src/hg/ directory.</li>
<li>an empty customTrash database has been created on the MySQL host - create this manually once</li>
<li>configuration items are specified in /cgi-bin/hg.conf/ - this will turn on the function</li>
<li>for command line access to the database, create a special ~/.hg.ct.conf to be used with the environment variable HGDB_CONF</li>
<li>create a cron job to run a cleaner script to expire and remove older tables from the database - dbTrash command is used for this purpose</li>
</ul>
 
==Host and database name==
 
For performance and security considerations, the MySQL host for the custom
track database can be a separate machine
from the ordinary MySQL host that usually serves up the assembly databases
or the hgcentral database.  It is not required that the custom track
database be on a separate MySQL server.  The specification of the
host machine is placed in the <em>/cgi-bin/hg.conf</em> file, for
example a host machine called <em>"ctdbhost":</em>
<pre>
customTracks.host=ctdbHost
</pre>
 
The database name used on this host is fixed at <em>customTrash</em>

Revision as of 19:15, 2 March 2007

Using the Custom Track Database

A new feature of the genome browser as of March 2007 is the ability to use a data base for custom tracks. Up to this date, custom track data has been kept in files in the /trash/ct/ directory. This article discusses the steps required to enable this function.

Summary configuration

  • database loader binaries hgLoadBed, hgLoadWiggle and wigEncode are installed in /cgi-bin/loader/ - these are installed via the normal 'make cgi' in the source tree kent/src/hg/ directory.
  • an empty customTrash database has been created on the MySQL host - create this manually once
  • configuration items are specified in /cgi-bin/hg.conf/ - this will turn on the function
  • for command line access to the database, create a special ~/.hg.ct.conf to be used with the environment variable HGDB_CONF
  • create a cron job to run a cleaner script to expire and remove older tables from the database - dbTrash command is used for this purpose

Host and database name

For performance and security considerations, the MySQL host for the custom track database can be a separate machine from the ordinary MySQL host that usually serves up the assembly databases or the hgcentral database. It is not required that the custom track database be on a separate MySQL server. The specification of the host machine is placed in the /cgi-bin/hg.conf file, for example a host machine called "ctdbhost":

customTracks.host=ctdbHost

The database name used on this host is fixed at customTrash