geneont

Class: geneont

Create geneont object and term objects

Syntax

GeneontObj = geneont
GeneontObj = geneont('File', FileValue)
GeneontObj = geneont('Live', LiveValue)
GeneontObj = geneont('Live', LiveValue, 'ToFile', ToFileValue)

Description

GeneontObj = geneont creates GeneontObj, a geneont object, from the gene_ontology.obo file in the MATLAB® current directory. It also creates multiple term objects, one for each term in the geneont object.

GeneontObj = geneont('File', FileValue) creates GeneontObj, a geneont object, from FileValue, a string specifying the file name of an Open Biomedical Ontology (OBO)-formatted file that is on the MATLAB search path.

GeneontObj = geneont('Live', LiveValue) controls the creation of GeneontObj, a geneont object, from the current version of the Gene Ontology database, which is the file at:

http://www.geneontology.org/ontology/gene_ontology.obo

Choices are true or false (default).

    Note:   The full Gene Ontology database may take several minutes to download when you run this function using the 'Live' property.

GeneontObj = geneont('Live', LiveValue, 'ToFile', ToFileValue), when LiveValue is true, creates GeneontObj, a geneont object, from the most recent version of the Gene Ontology database, which is the file at:

http://www.geneontology.org/ontology/gene_ontology.obo

and saves the contents of this file to ToFileValue, a string specifying a file name or a path and file name.

Input Arguments

FileValueString specifying the file name of an OBO-formatted file that is on the MATLAB search path.
LiveValueControls the creation of the most up-to-date geneont object. Enter true to create GeneontObj, a geneont object, from the most recent version of the Gene Ontology database. Default is false.
ToFileValueString specifying a file name or path and file name to which to save the contents of the current version of the Gene Ontology database.

Output Arguments

GeneontObjMATLAB object containing gene ontology information.

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 27769 Terms.
  2. Display information about the geneont object.

    get(GeneontObj)
    
    default_namespace: 'gene_ontology'
                        format_version: '1.0'
                               version: '4.509'
                                  date: '28:11:2008 19:30'
                              saved_by: 'gocvs'
                     auto_generated_by: 'OBO-Edit 1.101'
                             subsetdef: {7x1 cell}
                                import: ''
                        synonymtypedef: ''
                               idspace: ''
        default_relationship_id_prefix: ''
                            id_mapping: ''
                                remark: [1x31 char]
                               typeref: ''
                      unrecognized_tag: {1x2 cell}
                                 Terms: [27769x1 geneont.term]
  3. Search for all GO terms in the geneont object that contain the string ribosome in the field name, and use the geneont.terms property to create a MATLAB structure array of term objects containing those terms.

    comparison = regexpi(get(GeneontObj.terms,'name'),'ribosome');
    indices = find(~cellfun('isempty',comparison));
    terms_with_ribosmome = GeneontObj.terms(indices)
    
    22x1 struct array with fields:
        id
        name
        ontology
        definition
        comment
        synonym
        is_a
        part_of
        obsolete
    

      Note:   Although the terms property 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.

Was this topic helpful?