Difference between revisions of "Template:ChadoTable feature"

From GMOD
Jump to: navigation, search
(Table definition, first upload on 2010/11/22.)
 
(Table definition for Chado on 2010/11/24)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>{{ChadoTableTemplateHeader}}</noinclude><protect>{{ChadoTableDesc|Sequence|feature|A feature is a biological sequence or a
+
<protect><noinclude>{{ChadoTableTemplateHeader}}</noinclude>
 +
{{ChadoTableDesc|Sequence|feature|A feature is a biological sequence or a
 
section of a biological sequence, or a collection of such
 
section of a biological sequence, or a collection of such
 
sections. Examples include genes, exons, transcripts, regulatory
 
sections. Examples include genes, exons, transcripts, regulatory
Line 7: Line 8:
 
organism_id, uniquename and type_id should be unique.}}
 
organism_id, uniquename and type_id should be unique.}}
 
{{ChadoColumnsHeader|Sequence|feature}}
 
{{ChadoColumnsHeader|Sequence|feature}}
{{ChadoColumnDesc||feature_id|serial|''PRIMARY KEY''
+
{{ChadoColumnDesc||feature_id|serial|''PRIMARY KEY''<br />
 
+
 
}}
 
}}
 
{{ChadoColumnDesc|{{ChadoModuleTableLink|General|dbxref}}|dbxref_id|integer|An optional primary public stable
 
{{ChadoColumnDesc|{{ChadoModuleTableLink|General|dbxref}}|dbxref_id|integer|An optional primary public stable
 
identifier for this feature. Secondary identifiers and external
 
identifier for this feature. Secondary identifiers and external
 
dbxrefs go in the table feature_dbxref.}}
 
dbxrefs go in the table feature_dbxref.}}
{{ChadoColumnDesc|{{ChadoModuleTableLink|Organism|organism}}|organism_id|integer|''UNIQUE#1''
+
{{ChadoColumnDesc|{{ChadoModuleTableLink|Organism|organism}}|organism_id|integer|''UNIQUE#1''<br />
 
+
''NOT NULL''<br />
''NOT NULL''
+
 
+
 
The organism to which this feature
 
The organism to which this feature
 
belongs. This column is mandatory.}}
 
belongs. This column is mandatory.}}
 
{{ChadoColumnDesc||name|character varying(255)|The optional human-readable common name for
 
{{ChadoColumnDesc||name|character varying(255)|The optional human-readable common name for
 
a feature, for display purposes.}}
 
a feature, for display purposes.}}
{{ChadoColumnDesc||uniquename|text|''UNIQUE#1''
+
{{ChadoColumnDesc||uniquename|text|''UNIQUE#1''<br />
 
+
''NOT NULL''<br />
''NOT NULL''
+
 
+
 
The unique name for a feature; may
 
The unique name for a feature; may
 
not be necessarily be particularly human-readable, although this is
 
not be necessarily be particularly human-readable, although this is
Line 51: Line 47:
 
be unique for any feature. This column thus acts as a unique
 
be unique for any feature. This column thus acts as a unique
 
identifier on the mathematical sequence.}}
 
identifier on the mathematical sequence.}}
{{ChadoColumnDesc|{{ChadoModuleTableLink|CV|cvterm}}|type_id|integer|''UNIQUE#1''
+
{{ChadoColumnDesc|{{ChadoModuleTableLink|CV|cvterm}}|type_id|integer|''UNIQUE#1''<br />
 
+
''NOT NULL''<br />
''NOT NULL''
+
 
+
 
A required reference to a table:cvterm
 
A required reference to a table:cvterm
 
giving the feature type. This will typically be a Sequence Ontology
 
giving the feature type. This will typically be a Sequence Ontology
 
identifier. This column is thus used to subclass the feature table.}}
 
identifier. This column is thus used to subclass the feature table.}}
{{ChadoColumnDesc||is_analysis|boolean|''NOT NULL''
+
{{ChadoColumnDesc||is_analysis|boolean|''NOT NULL''<br />
 
+
''DEFAULT ''false<br />
''DEFAULT ''false
+
 
+
 
Boolean indicating whether this
 
Boolean indicating whether this
 
feature is annotated or the result of an automated analysis. Analysis
 
feature is annotated or the result of an automated analysis. Analysis
Line 70: Line 62:
 
feature in a genome, whereas the same gene feature can be predicted
 
feature in a genome, whereas the same gene feature can be predicted
 
multiple times in different analyses.}}
 
multiple times in different analyses.}}
{{ChadoColumnDesc||is_obsolete|boolean|''NOT NULL''
+
{{ChadoColumnDesc||is_obsolete|boolean|''NOT NULL''<br />
 
+
''DEFAULT ''false<br />
''DEFAULT ''false
+
 
+
 
Boolean indicating whether this
 
Boolean indicating whether this
 
feature has been obsoleted. Some chado instances may choose to simply
 
feature has been obsoleted. Some chado instances may choose to simply
 
remove the feature altogether, others may choose to keep an obsolete
 
remove the feature altogether, others may choose to keep an obsolete
 
row in the table.}}
 
row in the table.}}
{{ChadoColumnDesc||timeaccessioned|timestamp without time zone|''NOT NULL''
+
{{ChadoColumnDesc||timeaccessioned|timestamp without time zone|''NOT NULL''<br />
 
+
''DEFAULT ''now()<br />
''DEFAULT ''now()
+
 
+
 
For handling object
 
For handling object
 
accession or modification timestamps (as opposed to database auditing data,
 
accession or modification timestamps (as opposed to database auditing data,
 
handled elsewhere). The expectation is that these fields would be
 
handled elsewhere). The expectation is that these fields would be
 
available to software interacting with chado.}}
 
available to software interacting with chado.}}
{{ChadoColumnDesc||timelastmodified|timestamp without time zone|''NOT NULL''
+
{{ChadoColumnDesc||timelastmodified|timestamp without time zone|''NOT NULL''<br />
 
+
''DEFAULT ''now()<br />
''DEFAULT ''now()
+
 
+
 
For handling object
 
For handling object
 
accession or modification timestamps (as opposed to database auditing data,
 
accession or modification timestamps (as opposed to database auditing data,
Line 97: Line 83:
  
 
{{ChadoTablesReferencingHeader|feature}}
 
{{ChadoTablesReferencingHeader|feature}}
 
+
{{ChadoReferencingTable|Sequence|featuregroup}}
* None.
+
{{ChadoReferencingTable|Companalysis|analysisfeature}}
 +
{{ChadoReferencingTable|Cell Line|cell_line_feature}}
 +
{{ChadoReferencingTable|Mage|element}}
 +
{{ChadoReferencingTable|Sequence|feature_cvterm}}
 +
{{ChadoReferencingTable|Sequence|feature_dbxref}}
 +
{{ChadoReferencingTable|Expression|feature_expression}}
 +
{{ChadoReferencingTable|Genetic|feature_genotype}}
 +
{{ChadoReferencingTable|Phenotype|feature_phenotype}}
 +
{{ChadoReferencingTable|Sequence|feature_pub}}
 +
{{ChadoReferencingTable|Sequence|feature_relationship}}
 +
{{ChadoReferencingTable|Sequence|feature_synonym}}
 +
{{ChadoReferencingTable|Sequence|featureloc}}
 +
{{ChadoReferencingTable|Map|featurepos}}
 +
{{ChadoReferencingTable|Sequence|featureprop}}
 +
{{ChadoReferencingTable|Map|featurerange}}
 +
{{ChadoReferencingTable|Library|library_feature}}
 +
{{ChadoReferencingTable|Phylogeny|phylonode}}
 +
{{ChadoReferencingTable|Mage|studyprop_feature}}
 
</protect>
 
</protect>

Latest revision as of 19:57, 24 November 2010

This template is a Chado Table Template. It defines a single table from the Chado schema, and every Chado table has a template like this one. This template is automatically included in two places:

  1. The module page for the module the table is a part of. This is where updates and comments should be posted.
  2. The Chado Tables page, which lists all tables.

You can include this template anywhere you want to show the table description.


Table: feature
Module: Sequence

A feature is a biological sequence or a section of a biological sequence, or a collection of such sections. Examples include genes, exons, transcripts, regulatory regions, polypeptides, protein domains, chromosome sequences, sequence variations, cross-genome match regions such as hits and HSPs and so on; see the Sequence Ontology for more. The combination of organism_id, uniquename and type_id should be unique.

feature columns
FK Name Type Description
feature_id serial PRIMARY KEY
dbxref dbxref_id integer An optional primary public stable

identifier for this feature. Secondary identifiers and external dbxrefs go in the table feature_dbxref.

organism organism_id integer UNIQUE#1

NOT NULL
The organism to which this feature belongs. This column is mandatory.

name character varying(255) The optional human-readable common name for

a feature, for display purposes.

uniquename text UNIQUE#1

NOT NULL
The unique name for a feature; may not be necessarily be particularly human-readable, although this is preferred. This name must be unique for this type of feature within this organism.

residues text A sequence of alphabetic characters

representing biological residues (nucleic acids, amino acids). This column does not need to be manifested for all features; it is optional for features such as exons where the residues can be derived from the featureloc. It is recommended that the value for this column be manifested for features which may may non-contiguous sublocations (e.g. transcripts), since derivation at query time is non-trivial. For expressed sequence, the DNA sequence should be used rather than the RNA sequence. The default storage method for the residues column is EXTERNAL, which will store it uncompressed to make substring operations faster.

seqlen integer The length of the residue feature. See

column:residues. This column is partially redundant with the residues column, and also with featureloc. This column is required because the location may be unknown and the residue sequence may not be manifested, yet it may be desirable to store and query the length of the feature. The seqlen should always be manifested where the length of the sequence is known.

md5checksum character(32) The 32-character checksum of the sequence,

calculated using the MD5 algorithm. This is practically guaranteed to be unique for any feature. This column thus acts as a unique identifier on the mathematical sequence.

cvterm type_id integer UNIQUE#1

NOT NULL
A required reference to a table:cvterm giving the feature type. This will typically be a Sequence Ontology identifier. This column is thus used to subclass the feature table.

is_analysis boolean NOT NULL

DEFAULT false
Boolean indicating whether this feature is annotated or the result of an automated analysis. Analysis results also use the companalysis module. Note that the dividing line between analysis and annotation may be fuzzy, this should be determined on a per-project basis in a consistent manner. One requirement is that there should only be one non-analysis version of each wild-type gene feature in a genome, whereas the same gene feature can be predicted multiple times in different analyses.

is_obsolete boolean NOT NULL

DEFAULT false
Boolean indicating whether this feature has been obsoleted. Some chado instances may choose to simply remove the feature altogether, others may choose to keep an obsolete row in the table.

timeaccessioned timestamp without time zone NOT NULL

DEFAULT now()
For handling object accession or modification timestamps (as opposed to database auditing data, handled elsewhere). The expectation is that these fields would be available to software interacting with chado.

timelastmodified timestamp without time zone NOT NULL

DEFAULT now()
For handling object accession or modification timestamps (as opposed to database auditing data, handled elsewhere). The expectation is that these fields would be available to software interacting with chado.

Tables referencing feature via foreign key constraints: