Skip to content

GMOD/Chado

Repository files navigation

Chado

Chado is a modular schema for handling all kinds of biological data. It is intended to be used as both a primary datastore schema as well as a warehouse-style schema.

Introduction

Chado was originally conceived as the next generation Flybase database, combining the sequence annotation database gadfly with the Harvard and Cambridge databases. We have avoided organism or project specificity in the schema, and we hope it will be of use to other projects.

The modules currently in chado are:

Module Description
Audit database audits
Companalysis data from computational analysis
Contact people and groups
Controlled Vocabulary (cv) controlled vocabularies and ontologies
Expression summarized RNA and protein expresssion
General identifiers
Genetic genetic data and genotypes
Library descriptions of molecular libraries
Mage microarray data
Map maps without sequence
Organism species
Phenotype phenotypic data
Phylogeny phylogenetic trees
Publication (pub) publications and references
Sequence sequences and sequence features
Stock specimens and biological collections
WWW generic classes for web interfaces

For documentation on the various modules, see http://www.gmod.org.

Other modules are possible; the existing modules cover a very large variety of use cases.

Chado has a fairly abstract schema, and ontologies and controlled vocabularies (CVs) are utilised where their use is favourable to relational modeling. In particular, the sequence ontology (SO) is vital to the sequence module.

Some (but not all) of the use cases we have discussed are:

  • Central dogma genome annotations

  • Genes that break the central dogma (of which there are many Annotated in fly, including polycistronic transcripts, transplicing, selenocysteine readthroughs, rna editing, ....)

  • Sequence variation data, including SNPs, transposable element insertions, indels, ... how this relates to phenotypes, how these effect the central dogma....

  • Non-wildtype data, including representing a wildtype transcriptome and proteome on a non wildtype genome; implicit and explicit central dogma examples for mutant strains

  • Complex phenotypic data

  • Ontologies structured as graphs; querying over graph ontologies non-recursively by pre-computing the closure

  • Sequence ontology

  • Comparative data

  • Genetic interactions

  • Transgene constructs, complex genetic experiments and their results

The core schema is DBMS independent. The SQL table create files can be found in the chado/modules directory. The main Chado developers are currently using PostgreSQL.

Installation

Please read the included chado/INSTALL.Chado.md document for instructions on how to install the Chado schema.

Docker

Chado has been dockerized with Flyway so that you can look around, and test migrations easily. The following instructions are going to show you how to pull the already build images. If you would like to build your own image locally, there are instructins for that at the very bottom.

Using the Chado Docker Image

You can start and work within the Chado container by using the following commands. You will want to replace the <version> with a current version available on Github. You can see the available options on the github package repository.

docker run -it ghcr.io/gmod/chado:<version>

If you don't have the image locally, this will pull it down from the Github package repository first and then start a container for you. PostgreSQL and flyway will be running within the container and Chado will be cloned in the current working directory.

The container will be shut down once you exit the opened bash terminal. If you want the container to remain running then you would use -dit instead of -it to run docker in detached mode.

As a test, you can run the flyway info command after starting the container:

flyway info

You can explore the Chado tables using the psql command in the following way:

psql -U postgres -h localhost -d chado

You will be prompted for a password. The default password is chadotest

Testing a Pull Request

In order to allow you to modify the migrations while running the container, you will mount your current directory inside the container using the following approach. This way you can edit the files locally and they will be automatically updated within the container and available to flyway.

git clone https://github.com/GMOD/Chado chado-pr<number>
cd chado-pr<number>
git checkout <prBranch>
docker run -it -rm --volume=$(pwd):/Chado ghcr.io/gmod/chado:pr-<number>

You can test FlyWay migrations by running these flyway commands:

  • See what migrations need to be applied:
flyway info
  • Run the migrations available:
flyway migrate

The migrations have been applied correctly if you do not see any red errors. However, it is good practice to run flyway info again to confirm.

Locally Build the Docker Image

The following commands should be carried out in a cloned version of this repository, in the root directory.

To build the docker image using the default values, run the following command:

docker build --tag gmod/chado:local --file docker/Dockerfile ./

If you would like to build a docker that uses a specific version of PostgreSQL then you can run the following command instead. In this case you will replace <version> with the version of PostgreSQL. We currently support 12, 13, 14, 15, and 16.

docker build --tag gmod/chado:local --file docker/Dockerfile --build-arg PGSQL_VERSION=<version> ./

Chado Support

Please see our website for more information on Chado and the GMOD project:

http://www.gmod.org/

You can send questions to the Chado mailing list:

gmod-schema@lists.sourceforge.net

You can browse the schema CVS repository here:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gmod/schema/

Authors

Chris Mungall, David Emmert and the GMOD team

Full list of committers: