id property

Class: term

Read-only numeric value that corresponds to GO identifier of GO term

Description

id is a property of the term class. id is a read-only numeric value that corresponds to the GO identifier of the GO term.

Tip

You can use the num2goid function to convert id to a GO ID character vector formatted as a 7-digit number preceded by the prefix GO:, which is the standard used by the Gene Ontology database.

Values

Any value from 1 to N, where N is the largest value for an identifier of a term object in a geneont object. Use the id property to determine GO identifiers of term objects, or to access term objects by their GO identifier.

Tip

You can use the id property for a GO term as input to methods of a geneont object, such as getancestors, getdescendants, and getrelatives.

Examples

Example 82. Displaying and Formatting the GO Identifier of a term Object
  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 27769 Terms.
  2. Display the GO identifier of the term object in the 183rd position in the geneont object, GeneontObj.

    GeneontObj.terms(183).id
    
    ans =
    
       207

    Note

    The index or position (183 in this example) of the term object in the geneont object is not the same as the GO identifier (207 in this example) for the term object. This is because there are many terms that are obsolete and are not included as term objects in the geneont object.

  3. Format the GO identifier into a character array.

    num2goid(GeneontObj.terms(183).id)
    
    ans = 
    
        'GO:0000207'
Example 83. Using the GO Identifier with Methods of a geneont Object
  1. Find the index or position number of the term object whose name property is 'membrane'.

    membrane_index = find(strcmp(get(GeneontObj.terms,'name'),'membrane'))
    
    membrane_index =
    
            9556
  2. Use this index or position number and the id property to determine the GO identifier of the term object.

    membrane_goid = GeneontObj.terms(membrane_index).id
    
    membrane_goid =
    
           16020
  3. Use this GO identifier as input to the getrelatives method to find the GO identifiers of other term objects that are immediate relatives of the term object whose name property is 'membrane'.

    relative_ids = getrelatives(GeneontObj,membrane_goid)
    
    relative_ids =
    
            5628
            5886
           16020
           19867
           30673
           31090
           34045
           34357
           42175
           42622
           42734
           44464
           45211
           48475
           60342
  4. List the name properties of these term objects.

    get(GeneontObj(relative_ids).terms,'name')
    
    ans = 
    
        'prospore membrane'
        'plasma membrane'
        'membrane'
        'outer membrane'
        'axolemma'
        'organelle membrane'
        'pre-autophagosomal structure membrane'
        'photosynthetic membrane'
        'nuclear envelope-endoplasmic reticulum network'
        'photoreceptor outer segment membrane'
        'presynaptic membrane'
        'cell part'
        'postsynaptic membrane'
        'coated membrane'
        'photoreceptor inner segment membrane'