| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Bioinformatics Toolbox |
| Contents | Index |
| Learn more about Bioinformatics Toolbox |
Annotation = goannotread(File)
Annotation = goannotread(File,
...'Fields', FieldsValue, ...)
Annotation = goannotread(File,
...'Aspect', AspectValue, ...)
| File | String specifying a file name of a Gene Ontology (GO) annotated file. |
| FieldsValue | String or cell array of strings specifying one or more fields to read from the Gene Ontology annotated file. Default is to read all fields. Valid fields are listed below. |
| AspectValue | Character array specifying one or more characters. Valid aspects are:
Default is 'CFP', which specifies to read all aspects. |
| Annotation | MATLAB array of structures containing annotations from a Gene Ontology annotated file. |
Annotation = goannotread(File) converts the contents of File, a Gene Ontology annotated file, into Annotation, an array of structures. Files should have the structure specified in:
http://www.geneontology.org/GO.annotation.shtml#file
A list with some annotated files can be found at:
http://www.geneontology.org/GO.current.annotations.shtml
Annotation = goannotread(File, ...'PropertyName', PropertyValue, ...) calls goannotread 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:
Annotation = goannotread(File, ...'Fields', FieldsValue, ...) specifies the fields to read from the Gene Ontology annotated file. FieldsValue is a string or cell array of strings specifying one or more fields. Default is to read all fields. Valid fields are:
Database
DB_Object_ID
DB_Object_Symbol
Qualifier
GOid
DBReference
Evidence
WithFrom
Aspect
DB_Object_Name
Synonym
DB_Object_Type
Taxon
Date
Assigned_by
For more information on these fields, see:
http://www.geneontology.org/GO.format.annotation.shtml
Annotation = goannotread(File, ...'Aspect', AspectValue, ...) specifies the aspects to read from the Gene Ontology annotated file. AspectValue is a character array specifying one or more characters. Valid aspects are:
P — Biological process
F — Molecular function
C — Cellular component
Default is 'CFP', which specifies to read all aspects.
Reading All Annotations from a Gene Ontology Annotated File
Open a Web browser to
http://www.geneontology.org/GO.current.annotations.shtml
Download gene_association.sgd.gz, the file containing GO annotations for the gene products of Saccharomyces cerevisiae, to your MATLAB Current Directory.
Uncompress the file using the gunzip function.
gunzip('gene_association.sgd.gz')Read the file into the MATLAB software.
SGDGenes = goannotread('gene_association.sgd');Create a structure with GO annotations and display a list of the genes.
S = struct2cell(SGDGenes); genes = S(3,:)'
Reading a Subset of Annotations from a Gene Ontology Annotated File
Open a Web browser to
http://www.geneontology.org/GO.current.annotations.shtml
Download gene_association.goa_human.gz, the file containing GO annotations for the gene products of Homo sapiens, to your MATLAB Current Directory.
Uncompress the file using the gunzip function.
gunzip('gene_association.goa_human.gz')Read the file into the MATLAB software, but limit the annotations to genes related to molecular function (F), and to the fields for the gene symbol and the associated ID, that is, DB_Object_Symbol and GOid.
HumanStruct = goannotread('gene_association.goa_human', ...
'Aspect','F','Fields',{'DB_Object_Symbol','GOid'});Create a list of the Homo sapiens genes and a list of the associated GO terms.
Humangenes = {HumanStruct.DB_Object_Symbol};
HumanGO = [HumanStruct.GOid]; Bioinformatics Toolbox functions: geneont (object constructor), num2goid
Bioinformatics Toolbox class: geneont
Bioinformatics Toolbox methods of geneont object: geneont.getancestors, geneont.getdescendants, geneont.getmatrix, geneont.getrelatives
![]() | getrelatives (geneont) | gonnet | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |