Documentation Center

  • Trial Software
  • Product Updates

terms property

Class: geneont

Read-only column vector with handles to term objects of geneont object

Description

terms is a read-only property of the geneont class. terms is a column vector with handles to the term objects of a geneont object.

    Note:   Although terms is a column vector with handles to term objects, in the MATLAB® Command Window, it displays as a structure array, with one structure for each GO term in the geneont object.

Values

Use the information in this structure to access (by GO ID) the terms of a geneont object and to view the properties of individual terms.

Examples

  1. Download the current version of the Gene Ontology database from the Web into a geneont object in the MATLAB software.

    GeneontObj = geneont('LIVE', true)

    The MATLAB software creates a geneont object and displays the number of term objects associated with the geneont object.

    Gene Ontology object with 27786 Terms.
  2. Use the terms property to display the MATLAB structure array containing 27,786 term objects associated with the geneont object.

    GeneontObj.terms
    
    27786x1 struct array with fields:
        id
        name
        ontology
        definition
        comment
        synonym
        is_a
        part_of
        obsolete
    

      Note:   Although the terms property is an array of handles to term objects, in the MATLAB Command Window, it displays as a structure array, with one structure for each GO term in the geneont object.

  3. Use the terms property to view the properties of the term object in the 14,723rd position in the geneont object.

    GeneontObj.terms(14723)
    
                id: 31655
              name: 'negative regulation of heat dissipation'
          ontology: 'biological process'
        definition: [1x113 char]
           comment: ''
           synonym: {4x2 cell}
              is_a: [3x1 double]
           part_of: 31653
          obsolete: 0
  4. Create a cell array of strings that list the ontology property for each term in the geneont object.

    ontologies = get(GeneontObj.terms,'ontology');
  5. Create a logical mask that identifies all the terms with an ontology property of cellular component.

    mask = strcmp(ontologies,'cellular component');
  6. Apply the logical mask to all the terms in the GeneontObj geneont object to return a MATLAB structure array of term objects, containing only terms with an ontology property of cellular component.

    cell_comp_terms = GeneontObj.terms(mask)
    2362x1 struct array with fields:
        id
        name
        ontology
        definition
        comment
        synonym
        is_a
        part_of
        obsolete

    There are 2,362 terms with an ontology property of cellular component.

  7. Create a subontology of all the cellular component terms by indexing into the GeneontObj geneont object with the masked term objects.

    subontology = GeneontObj(cell_comp_terms)
    
    Gene Ontology object with 2367 Terms.

See Also

Was this topic helpful?