NAME

Bio::Chado::Schema::Result::Cv::Cvterm

DESCRIPTION

A term, class, universal or type within an ontology or controlled vocabulary. This table is also used for relations and properties. cvterms constitute nodes in the graph defined by the collection of cvterms and cvterm_relationships.

ACCESSORS

cvterm_id

data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
sequence: 'cvterm_cvterm_id_seq'

cv_id

data_type: 'integer'
is_foreign_key: 1
is_nullable: 0

The cv or ontology or namespace to which this cvterm belongs.

name

data_type: 'varchar'
is_nullable: 0
size: 1024

A concise human-readable name or label for the cvterm. Uniquely identifies a cvterm within a cv.

definition

data_type: 'text'
is_nullable: 1

A human-readable text definition.

dbxref_id

data_type: 'integer'
is_foreign_key: 1
is_nullable: 0

Primary identifier dbxref - The unique global OBO identifier for this cvterm. Note that a cvterm may have multiple secondary dbxrefs - see also table: cvterm_dbxref.

is_obsolete

data_type: 'integer'
default_value: 0
is_nullable: 0

Boolean 0=false,1=true; see GO documentation for details of obsoletion. Note that two terms with different primary dbxrefs may exist if one is obsolete.

is_relationshiptype

data_type: 'integer'
default_value: 0
is_nullable: 0

Boolean 0=false,1=true relations or relationship types (also known as Typedefs in OBO format, or as properties or slots) form a cv/ontology in themselves. We use this flag to indicate whether this cvterm is an actual term/class/universal or a relation. Relations may be drawn from the OBO Relations ontology, but are not exclusively drawn from there.

RELATIONS

acquisitionprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Acquisitionprop

acquisition_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::AcquisitionRelationship

analysisfeatureprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Companalysis::Analysisfeatureprop

analysisprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Companalysis::Analysisprop

arraydesign_platformtypes

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Arraydesign

arraydesign_substratetypes

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Arraydesign

arraydesignprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Arraydesignprop

assayprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Assayprop

biomaterialprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Biomaterialprop

biomaterial_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::BiomaterialRelationship

biomaterial_treatments

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::BiomaterialTreatment

cell_line_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::CellLine::CellLineCvterm

cell_line_cvtermprops

Type: has_many

Related object: Bio::Chado::Schema::Result::CellLine::CellLineCvtermprop

cell_lineprops

Type: has_many

Related object: Bio::Chado::Schema::Result::CellLine::CellLineprop

cell_line_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::CellLine::CellLineRelationship

chadoprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Chadoprop

contacts

Type: has_many

Related object: Bio::Chado::Schema::Result::Contact::Contact

contact_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Contact::ContactRelationship

controls

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Control

cvprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvprop

cv

Type: belongs_to

Related object: Bio::Chado::Schema::Result::Cv::Cv

dbxref

Type: belongs_to

Related object: Bio::Chado::Schema::Result::General::Dbxref

cvterm_dbxrefs

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::CvtermDbxref

cvtermpath_types

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermpath

cvtermpath_objects

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermpath

cvtermpath_subjects

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermpath

cvtermprop_types

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermprop

cvtermprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermprop

cvterm_relationship_types

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::CvtermRelationship

cvterm_relationship_objects

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::CvtermRelationship

cvterm_relationship_subjects

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::CvtermRelationship

cvtermsynonym_types

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermsynonym

cvtermsynonyms

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermsynonym

dbxrefprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Dbxrefprop

elements

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Element

element_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::ElementRelationship

elementresult_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::ElementresultRelationship

environment_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::Genetic::EnvironmentCvterm

expression_cvterm_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::Expression::ExpressionCvterm

expression_cvterm_cvterm_types

Type: has_many

Related object: Bio::Chado::Schema::Result::Expression::ExpressionCvterm

expression_cvtermprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Expression::ExpressionCvtermprop

expressionprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Expression::Expressionprop

features

Type: has_many

Related object: Bio::Chado::Schema::Result::Sequence::Feature

feature_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::Sequence::FeatureCvterm

feature_cvtermprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Sequence::FeatureCvtermprop

feature_expressionprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Expression::FeatureExpressionprop

feature_genotypes

Type: has_many

Related object: Bio::Chado::Schema::Result::Genetic::FeatureGenotype

featuremaps

Type: has_many

Related object: Bio::Chado::Schema::Result::Map::Featuremap

featureprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Sequence::Featureprop

feature_pubprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Sequence::FeaturePubprop

feature_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Sequence::FeatureRelationship

feature_relationshipprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Sequence::FeatureRelationshipprop

genotypes

Type: has_many

Related object: Bio::Chado::Schema::Result::Genetic::Genotype

genotypeprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Genetic::Genotypeprop

libraries

Type: has_many

Related object: Bio::Chado::Schema::Result::Library::Library

library_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::Library::LibraryCvterm

libraryprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Library::Libraryprop

nd_experiments

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdExperiment

nd_experimentprops

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdExperimentprop

nd_experiment_stocks

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdExperimentStock

nd_experiment_stockprops

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdExperimentStockprop

nd_geolocationprops

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdGeolocationprop

nd_protocols

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdProtocol

nd_protocolprops

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdProtocolprop

nd_protocol_reagents

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdProtocolReagent

nd_reagents

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdReagent

nd_reagentprops

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdReagentprop

nd_reagent_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::NaturalDiversity::NdReagentRelationship

organismprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Organism::Organismprop

phendescs

Type: has_many

Related object: Bio::Chado::Schema::Result::Genetic::Phendesc

phenotype_assays

Type: has_many

Related object: Bio::Chado::Schema::Result::Phenotype::Phenotype

phenotype_attrs

Type: has_many

Related object: Bio::Chado::Schema::Result::Phenotype::Phenotype

phenotype_observables

Type: has_many

Related object: Bio::Chado::Schema::Result::Phenotype::Phenotype

phenotype_cvalues

Type: has_many

Related object: Bio::Chado::Schema::Result::Phenotype::Phenotype

phenotype_comparison_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::Genetic::PhenotypeComparisonCvterm

phenotype_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::Phenotype::PhenotypeCvterm

phenotypeprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Phenotype::Phenotypeprop

phenstatements

Type: has_many

Related object: Bio::Chado::Schema::Result::Genetic::Phenstatement

phylonodes

Type: has_many

Related object: Bio::Chado::Schema::Result::Phylogeny::Phylonode

phylonodeprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Phylogeny::Phylonodeprop

phylonode_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Phylogeny::PhylonodeRelationship

phylotrees

Type: has_many

Related object: Bio::Chado::Schema::Result::Phylogeny::Phylotree

projectprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Project::Projectprop

project_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Project::ProjectRelationship

protocols

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Protocol

protocolparam_unittypes

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Protocolparam

protocolparam_datatypes

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Protocolparam

pubs

Type: has_many

Related object: Bio::Chado::Schema::Result::Pub::Pub

pubprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Pub::Pubprop

pub_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Pub::PubRelationship

quantificationprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Quantificationprop

quantification_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::QuantificationRelationship

stocks

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::Stock

stockcollections

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::Stockcollection

stockcollectionprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::Stockcollectionprop

stock_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::StockCvterm

stock_cvtermprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::StockCvtermprop

stock_dbxrefprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::StockDbxrefprop

stockprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::Stockprop

stock_relationships

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::StockRelationship

stock_relationship_cvterms

Type: has_many

Related object: Bio::Chado::Schema::Result::Stock::StockRelationshipCvterm

studydesignprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Studydesignprop

studyfactors

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Studyfactor

studyprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Studyprop

studyprop_features

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::StudypropFeature

synonyms

Type: has_many

Related object: Bio::Chado::Schema::Result::Sequence::Synonym

treatments

Type: has_many

Related object: Bio::Chado::Schema::Result::Mage::Treatment

ADDITIONAL RELATIONS

cvtermprops

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermprop

This cvtermprops relation is a convenient synonym for the autogenerated "cvtermprop_cvterms" above, since most often you want the properties for the cvterm itself.

If you really do want the Cvtermprop rows that have this cvterm as their type, use cvtermprop_types, listed above.

cvtermsynonyms

Type: has_many

Related object: Bio::Chado::Schema::Result::Cv::Cvtermsynonym

ADDITIONAL METHODS

add_synonym

Usage:        $self->add_synonym($synonym , { type => 'exact' , autocreate => 1} );
Desc:         adds the synonym $new_synonym to this cvterm
              If the synonym $new_synonym already exists,
              nothing is added.
Args:         a synonym name  and
   options hashref as:
         {
           synonym_type => [e.g. exact, narrow, broad, related],
           autocreate => 0,
              (optional) boolean, if passed, automatically create cv,
              cvterm, and dbxref rows if one cannot be found for the
              given synonym name.  Default false.

           cv_name => cv.name to use for the given synonym type.
                      Defaults to 'synonym_type',

           db_name => db.name to use for autocreated dbxrefs,
                      default 'null',

           definitions => optional hashref of:
               { cvterm_name => definition,
               }
            to load into the cvterm table when autocreating cvterms
         }
Ret:          a Cvtermsynonym object

delete_synonym

Usage: $self->delete_synonym($synonym)
Desc:  delete synonym $synonym from cvterm object
 Ret:  nothing
Args: $synonym
Side Effects: Will delete all cvtermsynonyms with synonym=$synonym. Case insensitive

get_secondary_dbxrefs

Usage: $self->get_secondary_dbxrefs()
Desc:  find all secondary accessions associated with the cvterm
        These are stored in cvterm_dbxref table as dbxref_ids
Ret:    a list of accessions (e.g. GO:0000123)
Args:   none
Side Effects: none

add_secondary_dbxref

Usage: $self->add_secondary_dbxref(accession, 1)
Desc:  add an alternative id to cvterm. Stores in cvterm_dbxref
Ret:   a CvtermDbxref object
Args:  an alternative id (i.e. "GO:0001234"). A second arg will store a is_for_definition=1 (default = 0)
Side Effects: stores a new dbxref if accession is not found in dbxref table

delete_secondary_dbxref

Usage: $self->delete_secondary_dbxref($accession)
Desc:  delete a cvterm_dbxref from the database
Ret:   nothing
Args:  full accession (db_name:dbxref_accession e.g. PO:0001234)
Side Effects:

create_cvtermprops

Usage: $set->create_cvtermprops({ baz => 2, foo => 'bar' });
Desc : convenience method to create cvterm properties using cvterms
        from the ontology with the given name
Args : hashref of { propname => value, ...},
       options hashref as:
        {
          autocreate => 0,
             (optional) boolean, if passed, automatically create cv,
             cvterm, and dbxref rows if one cannot be found for the
             given cvtermprop name.  Default false.

          cv_name => cv.name to use for the given cvtermprops.
                     Defaults to 'cvterm_property',

          db_name => db.name to use for autocreated dbxrefs,
                     default 'null',

          dbxref_accession_prefix => optional, default
                                     'autocreated:',
          definitions => optional hashref of:
              { cvterm_name => definition,
              }
           to load into the cvterm table when autocreating cvterms

           rank => force numeric rank. Be careful not to pass ranks that already exist
                   for the property type. The function will die in such case.

           allow_duplicate_values => default false.
              If true, allow duplicate instances of the same cvterm
              and value in the properties of the cvterm.  Duplicate
              values will have different ranks.
        }
Ret  : hashref of { propname => new cvtermprop object }

root

Usage: $self->root
Desc:  find the root cvterm
Ret:   Cvterm object
Args:  none

NOTE: This method requires that your cvtermpath table is populated.

children

Usage: $self->children
Desc:  find the direct children of the cvterm

Ret: L<Bio::Chado::Schema::Result::Cv::CvtermRelationship> resultset of the
     fetched child terms (this can be used in your program to find the
      relationship type id of each child term)
Args:  none

direct_children

Usage: $self->direct_children
Desc:  find only the direct children of your term
Ret:   L<Bio::Chado::Schema::Result::Cv::Cvterm>
Args:  none
Side Effects: none

NOTE: This method requires that your cvtermpath table is populated.

recursive_children

Usage: $self->recursive_children
Desc:   find all the descendants of the cvterm (children, children of children, and so on)
Ret: a DBIC resultset of L<Bio::Chado::Schema::Result::Cv::Cvterm>
Args: none
Side Effects: none

NOTE: This method requires that your cvtermpath table is populated.

parents

Usage: my $self->parents
Desc:  Find the direct parents of the cvterm
Ret:  L<Bio::Chado::Schema::Result::Cv::CvtermRelationship> resultset of the parent terms
Args:  none
Side Effects: none

direct_parents

Usage: $self->direct_parents
Desc:  get only the direct parents of the cvterm (from the cvtermpath)
Ret:   L<Bio::Chado::Schema::Result::Cv::Cvterm>
Args:  none
Side Effects: none

NOTE: This method requires that your cvtermpath table is populated.

recursive_parents

Usage: $self->recursive_parents
Desc:   find all the ancestors of the cvterm (parents, parents of parents, and so on)
Ret: L<Bio::Chado::Schema::Result::Cv::Cvterm> resultset
Args: none
Side Effects: none

NOTE: This method requires that your cvtermpath table is populated.

create_with

Usage: $schema->resultset('Cv::Cvterm')->create_with(
                 { name   => 'cvterm name',
                   cv     => $cv  || 'cv name',
                   db     => $db  || 'db name',
                   dbxref => $dbx || 'accession',
                 });

Desc: convenience method to create a cvterm, linking it to the CV and
      DB that you name or provide.  For any cv, db, or dbxref that
      you call only by name, does a find_or_create() using that name.
Ret : a new Cvterm row
Args: hashref of:
        { name   => 'cvterm name',
          cv     => 'cv name' or L<Bio::Chado::Schema::Result::Cv::Cvterm> row,
          db     => 'db name' or L<Bio::Chado::Schema::Result::General::Db> row,
          dbxref => 'accession' or L<Bio::Chado::Schema::Result::General::Dbxref> row,
        }