euGenes .. Fish .. Fly .. Human .. Mouse .. Mosquito .. Rat .. Weed .. Worm .. Yeast Help .. Preferences

Support for the chado database schema

The chado schema ( is a comprehensive database schema developed largely by developers at UC Berkeley and Harvard working on FlyBase. It is intended to be a generic database schema for model organism use. Its use with GBrowse is supported via a limited implementation of the Das interface from BioPerl. It is limited in that it implements only parts of Chado.

The chado adaptor works through three perl modules included in this distribution:


These files are installed the in the BioPerl infastructure when 'make install' is run.

In addition to the standard chado schema, this adaptor requires a few additional views and functions. These are found in two files in the chado CVS or in a gmod distribution. These are:


The easiest way to get these into the chado schema is include them when building the chado schema from a gmod release during `perl Makefile.PL`. It is currently included by default when the schema is built this way.

If you already have a chado instance and want to add these items, the easiest way to do that is to cat the files to stdout and pipe that to a psql command:

  % cat sequence-gff-views.sql   | psql <chado-database-name>
  % cat sequence-gff-funcs.pgsql | psql <chado-database-name>

A sample chado configuration file is included in contrib/conf_files/. Since chado uses the Sequence Ontology for its controlled vocabulary, it is quite likely that this configuration file should work for any instance of chado once the database-specific parameters are set.

After the tables are created, the user that is running Apache must be granted privileges to select on several tables. Usually that user is 'nobody', although on RedHat systems using RPM installed Apache the user is 'apache'. First create that user in Postgres, then in the psql shell grant select permissions:

  CREATE USER nobody;
  GRANT SELECT ON feature_synonym      TO nobody;
  GRANT SELECT ON synonym              TO nobody;
  GRANT SELECT ON feature_dbxref       TO nobody;
  GRANT SELECT ON dbxref               TO nobody;
  GRANT SELECT ON feature              TO nobody;
  GRANT SELECT ON featureloc           TO nobody;
  GRANT SELECT ON cvterm               TO nobody;
  GRANT SELECT ON feature_relationship TO nobody;
  GRANT SELECT ON cv                   TO nobody;
  GRANT SELECT ON feature_cvterm       TO nobody;
  GRANT SELECT ON featureprop          TO nobody;
  GRANT SELECT ON pub                  TO nobody;
  GRANT SELECT ON feature_pub          TO nobody;
  GRANT SELECT ON db                   TO nobody;

Creating a configuration file

The GBrowse configuration file for a chado database is the same format as for any other data source, but there are a few notes specific to chado for GBrowse configuration files. A sample configuration file called 07.chado.conf is included in the contrib/conf_files directory of this distribution, and is installed in $HTDOCS/gbrowse/contrib/conf_files.

Two items specific to chado that must go into the configuration file:

Reference class

The reference class in the configuration file must be the same Sequence Ontology Feature Annotation (SOFA) type as the feature type in chado of the reference sequence, like 'chromosome', 'region' or 'contig'.

The SOFA type is usually found on line 2 of your GFF file, if you are using GFF for loading. For example:

  #sequence-region NC_001133 1 230210

This indicates that the reference class is ``region''.


Aggregators must not be used with the chado adaptor, as they are not needed and do not make sense in this context. They are used in Bio::DB::GFF to construct complex biological objects out of the flat data in GFF files, for example, attaching exons to their mRNA. In chado, this is not necessary since the relationship between features is clearly defined in the feature_relationship table, and that information is automatically obtained by the chado adaptor.


Once you are properly configured you should be able to use GBrowse with an URL like http://localhost/cgi-bin/gbrowse/chado/.

More Information

See for more information on Chado and loading Chado for use with GBrowse.


If you encounter any bugs or problems with this chado adaptor, please contact the <a href=``''>

Scott Cain 2005/03/10

Send comments to us at
euGenes uses Argos: A Replicable Genome infOrmation System