getrelatives (geneont)

Find terms that are relatives of specified Gene Ontology (GO) term

Syntax

RelativeIDs = getrelatives(GeneontObj, ID)
[RelativeIDs, Counts] = getrelatives(GeneontObj, ID)

... = getrelatives(..., 'Height', HeightValue, ...)
... = getrelatives(..., 'Depth', DepthValue, ...)
... = getrelatives(..., 'Levels', LevelsValue, ...)
... = getrelatives(..., 'Relationtype', RelationtypeValue, ...)
... = getrelatives(..., 'Exclude', ExcludeValue, ...)

Arguments

GeneontObjA geneont object, such as created by the geneont function.
IDGO term identifier or vector of identifiers.
HeightValuePositive integer specifying the number of levels to search upward in the gene ontology.
DepthValuePositive integer specifying the number of levels to search downward in the gene ontology.
LevelsValuePositive integer specifying the number of levels up and down to search in the gene ontology. When specified, it overrides HeightValue and DepthValue.
RelationtypeValueString specifying the relationship types to search for in the gene ontology. Choices are:
  • 'is_a'

  • 'part_of'

  • 'both' (default)

ExcludeValueControls excluding ID, the original queried term(s), from the output RelativeIDs, unless the term was reached while searching the gene ontology. Choices are true or false (default).

Return Values

RelativeIDsVector of GO term identifiers including ID.
CountsColumn vector with the same number of elements as terms in GeneontObj, indicating the number of times each relative is found.

Description

RelativeIDs = getrelatives(GeneontObj, ID) searches GeneontObj, a geneont object, for GO terms that are relatives of the GO term(s) specified by ID, which is a GO term identifier or vector of identifiers. It returns RelativeIDs, a vector of GO term identifiers including ID. ID is a nonnegative integer or a vector containing nonnegative integers.

[RelativeIDs, Counts] = getrelatives(GeneontObj, ID) also returns the number of times each relative is found. Counts is a column vector with the same number of elements as terms in GeneontObj.

... = getrelatives(..., 'PropertyName', PropertyValue, ...) calls getrelatives with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:


... = getrelatives(..., 'Height', HeightValue, ...)
searches up through a specified number of levels, HeightValue, in the gene ontology. HeightValue is a positive integer. Default is 1.

... = getrelatives(..., 'Depth', DepthValue, ...) searches down through a specified number of levels, DepthValue, in the gene ontology. DepthValue is a positive integer. Default is 1.

... = getrelatives(..., 'Levels', LevelsValue, ...) searches up and down through a specified number of levels, LevelsValue, in the gene ontology. LevelsValue is a positive integer. When specified, it overrides HeightValue and DepthValue.

... = getrelatives(..., 'Relationtype', RelationtypeValue, ...) searches for specified relationship types, RelationtypeValue, in the gene ontology. RelationtypeValue is a string. Choices are 'is_a', 'part_of', or 'both' (default).

... = getrelatives(..., 'Exclude', ExcludeValue, ...) controls excluding ID, the original queried term(s), from the output RelativeIDs, unless a term was found while searching the gene ontology. Choices are true or false (default).

Examples

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

    GO = geneont('LIVE', true)

    The MATLAB software creates a geneont object and displays the number of terms in the database.

    Gene Ontology object with 24316 Terms.
  2. Retrieve the immediate relatives for the mitochondrial membrane GO term with an identifier of 31966.

    relatives = getrelatives(GO,31966,'levels',1)
    
    relatives =
    
            5740
            5741
            5743
           31090
           31966
           44429
           44455
  3. Create a subordinate Gene Ontology.

    subontology = GO(relatives)
    
    Gene Ontology object with 7 Terms.
  4. Create a report of the subordinate Gene Ontology terms.

    [cm acc rels] = getmatrix(subontology);
    rpt = [num2goid(acc) get(subontology.Terms, 'name')]';
    disp(sprintf('%s --> %s\n',rpt{:}))
    
    GO:0005740 --> mitochondrial envelope
    GO:0005741 --> mitochondrial outer membrane
    GO:0005743 --> mitochondrial inner membrane
    GO:0031090 --> organelle membrane
    GO:0031966 --> mitochondrial membrane
    GO:0044429 --> mitochondrial part
    GO:0044455 --> mitochondrial membrane part
  5. View relationships of the subordinate Gene Ontology using the biograph function and methods and color the mitochondrial membrane GO terms red.

    BG = biograph(cm, get(subontology.Terms, 'name'));
    BG.nodes(acc==31966).Color = [1 0 0];
    view(BG)

  6. Retrieve all relatives for the mithocondrial outer membrane GO term with an identifier of 5741.

    relatives = getrelatives(GO,5741,'levels',inf);
    
  7. Create a subordinate Gene Ontology.

    subontology = GO(relatives)
    
    Gene Ontology object with 28 Terms.
  8. View relationships using the biograph functions.

    [cm acc rels] = getmatrix(subontology);
    BG = biograph(cm, get(subontology.Terms, 'name'));
    BG.nodes(acc==5741).Color = [1 0 0];
    view(BG)

See Also

Bioinformatics Toolbox™ functions: geneont (object constructor), goannotread, num2goid

Bioinformatics Toolbox methods of geneont object: getancestors, getdescendants, getmatrix

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS