Chado Stock Module

From GMOD
Jump to: navigation, search

Introduction

The stock module was designed to store information about stock collections in a laboratory. What is called a stock could also be called a strain or an accession. There is a lot in common between a Drosophila stock and a Saccharomyces strain and an Arabidopsis line. They all come from some taxon, have genotypes, physical locations in the lab, some conceivable relationship with a publication, some conceivable relationship with a sequence feature (such as a transgene), and could be described by some ontology term.

It may be that not all critical details about your collection are accomodated, if this is the case it should not be difficult to extend for your own purposes.

Tables

Table: stock

Any stock can be globally identified by the combination of organism, uniquename and stock type. A stock is the physical entities, either living or preserved, held by collections. Stocks belong to a collection; they have IDs, type, organism, description and may have a genotype.

stock Structure
F-Key Name Type Description
stock_id serial PRIMARY KEY

dbxref

dbxref_id integer

The dbxref_id is an optional primary stable identifier for this stock. Secondary indentifiers and external dbxrefs go in table: stock_dbxref.

organism

organism_id integer UNIQUE#1 NOT NULL

The organism_id is the organism to which the stock belongs. This column is mandatory.
name character varying(255)

The name is a human-readable local name for a stock.
uniquename text UNIQUE#1 NOT NULL
description text

The description is the genetic description provided in the stock list.

cvterm

type_id integer UNIQUE#1 NOT NULL

The type_id foreign key links to a controlled vocabulary of stock types. The would include living stock, genomic DNA, preserved specimen. Secondary cvterms for stocks would go in stock_cvterm.
is_obsolete boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:



Table: stock_cvterm

stock_cvterm links a stock to cvterms. This is for secondary cvterms; primary cvterms should use stock.type_id.

stock_cvterm Structure
F-Key Name Type Description
stock_cvterm_id serial PRIMARY KEY

stock

stock_id integer UNIQUE#1 NOT NULL

cvterm

cvterm_id integer UNIQUE#1 NOT NULL

pub

pub_id integer UNIQUE#1 NOT NULL


Table: stock_dbxref

stock_dbxref links a stock to dbxrefs. This is for secondary identifiers; primary identifiers should use stock.dbxref_id.

stock_dbxref Structure
F-Key Name Type Description
stock_dbxref_id serial PRIMARY KEY

stock

stock_id integer UNIQUE#1 NOT NULL

dbxref

dbxref_id integer UNIQUE#1 NOT NULL
is_current boolean NOT NULL DEFAULT true

The is_current boolean indicates whether the linked dbxref is the current -official- dbxref for the linked stock.


Table: stock_genotype

Simple table linking a stock to a genotype. Features with genotypes can be linked to stocks thru feature_genotype -> genotype -> stock_genotype -> stock.

stock_genotype Structure
F-Key Name Type Description
stock_genotype_id serial PRIMARY KEY

stock

stock_id integer UNIQUE#1 NOT NULL

genotype

genotype_id integer UNIQUE#1 NOT NULL


Table: stock_pub

Provenance. Linking table between stocks and, for example, a stocklist computer file.

stock_pub Structure
F-Key Name Type Description
stock_pub_id serial PRIMARY KEY

stock

stock_id integer UNIQUE#1 NOT NULL

pub

pub_id integer UNIQUE#1 NOT NULL


Table: stock_relationship

stock_relationship Structure
F-Key Name Type Description
stock_relationship_id serial PRIMARY KEY

stock

subject_id integer UNIQUE#1 NOT NULL

stock

object_id integer UNIQUE#1 NOT NULL

cvterm

type_id integer UNIQUE#1 NOT NULL
value text
rank integer UNIQUE#1 NOT NULL

Tables referencing this one via Foreign Key Constraints:



Table: stock_relationship_pub

Provenance. Attach optional evidence to a stock_relationship in the form of a publication.

stock_relationship_pub Structure
F-Key Name Type Description
stock_relationship_pub_id serial PRIMARY KEY

stock_relationship

stock_relationship_id integer UNIQUE#1 NOT NULL

pub

pub_id integer UNIQUE#1 NOT NULL


Table: stockcollection

The lab or stock center distributing the stocks in their collection.

stockcollection Structure
F-Key Name Type Description
stockcollection_id serial PRIMARY KEY

cvterm

type_id integer UNIQUE#1 NOT NULL

type_id is the collection type cv.

contact

contact_id integer

contact_id links to the contact information for the collection.
name character varying(255)

name is the collection.
uniquename text UNIQUE#1 NOT NULL

uniqename is the value of the collection cv.

Tables referencing this one via Foreign Key Constraints:



Table: stockcollection_stock

stockcollection_stock links a stock collection to the stocks which are contained in the collection.

stockcollection_stock Structure
F-Key Name Type Description
stockcollection_stock_id serial PRIMARY KEY

stockcollection

stockcollection_id integer UNIQUE#1 NOT NULL

stock

stock_id integer UNIQUE#1 NOT NULL


Table: stockcollectionprop

The table stockcollectionprop contains the value of the stock collection such as website/email URLs; the value of the stock collection order URLs.

stockcollectionprop Structure
F-Key Name Type Description
stockcollectionprop_id serial PRIMARY KEY

stockcollection

stockcollection_id integer UNIQUE#1 NOT NULL

cvterm

type_id integer UNIQUE#1 NOT NULL
value text
rank integer UNIQUE#1 NOT NULL


Table: stockprop

A stock can have any number of slot-value property tags attached to it. This is an alternative to hardcoding a list of columns in the relational schema, and is completely extensible. There is a unique constraint, stockprop_c1, for the combination of stock_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.

stockprop Structure
F-Key Name Type Description
stockprop_id serial PRIMARY KEY

stock

stock_id integer UNIQUE#1 NOT NULL

cvterm

type_id integer UNIQUE#1 NOT NULL
value text
rank integer UNIQUE#1 NOT NULL

Tables referencing this one via Foreign Key Constraints:



Table: stockprop_pub

Provenance. Any stockprop assignment can optionally be supported by a publication.

stockprop_pub Structure
F-Key Name Type Description
stockprop_pub_id serial PRIMARY KEY

stockprop

stockprop_id integer UNIQUE#1 NOT NULL

pub

pub_id integer UNIQUE#1 NOT NULL