getmatrix

Class: geneont

Convert geneont object into relationship matrix

Syntax

[Matrix, ID, Relationship] = getmatrix(GeneontObj)

Description

[Matrix, ID, Relationship] = getmatrix(GeneontObj) converts a geneont object, GeneontObj, into Matrix, a matrix of relationship values between nodes (row and column indices), in which 0 indicates no relationship, 1 indicates an “is_a” relationship, and 2 indicates a “part_of” relationship. ID is a column vector listing Gene Ontology IDs that correspond to the rows and columns of Matrix. Relationship is a cell array of character vectors defining the types of relationships.

Input Arguments

GeneontObjA geneont object, such as created by the geneont constructor function.

Output Arguments

MatrixMatrix of relationship values between nodes (row and column indices), in which 0 indicates no relationship, 1 indicates an “is_a” relationship, and 2 indicates a “part_of” relationship.
IDColumn vector listing Gene Ontology IDs that correspond to the rows and columns of Matrix.
RelationshipCell array of character vectors defining the types of relationships.

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 27595 Terms.
  2. Convert this geneont object into a relationship matrix.

    [MATRIX, ID, REL] = getmatrix(GO);