| 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 |
BGobj =
biograph(CMatrix)
BGobj =
biograph(CMatrix, NodeIDs)
BGobj =
biograph(CMatrix, NodeIDs,
...'ID', IDValue, ...)
BGobj = biograph(CMatrix, NodeIDs,
...'Label', LabelValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'Description', DescriptionValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'LayoutType', LayoutTypeValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'EdgeType', EdgeTypeValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'Scale', ScaleValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'LayoutScale', LayoutScaleValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'EdgeTextColor', EdgeTextColorValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'EdgeFontSize', EdgeFontSizeValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'ShowArrows', ShowArrowsValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'ArrowSize', ArrowSizeValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'ShowWeights', ShowWeightsValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'ShowTextInNodes', ShowTextInNodesValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'NodeAutoSize', NodeAutoSizeValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'NodeCallback', NodeCallbackValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'EdgeCallback', EdgeCallbackValue,
...)
BGobj = biograph(CMatrix, NodeIDs,
...'CustomNodeDrawFcn', CustomNodeDrawFcnValue,
...)
| CMatrix | Full or sparse square matrix that acts as a connection matrix. That is, a value of 1 indicates a connection between nodes while a 0 indicates no connection. The number of rows/columns is equal to the number of nodes. |
| NodeIDs | Node identification strings. Enter any of the following:
Default values are the row or column numbers. |
| IDValue | String to identify the biograph object. Default is ''. |
| LabelValue | String to label the biograph object. Default is ''. |
| DescriptionValue | String that describes the biograph object. Default is ''. |
| LayoutTypeValue | String that specifies the algorithm for the layout engine. Choices are:
|
| EdgeTypeValue | String that specifies how edges display. Choices are:
|
| ScaleValue | Positive number that post-scales the node coordinates. Default is 1. |
| LayoutScaleValue | Positive number that scales the size of the nodes before calling the layout engine. Default is 1. |
| EdgeTextColorValue | Three-element numeric vector of RGB values. Default is [0, 0, 0], which defines black. |
| EdgeFontSizeValue | Positive number that sets the size of the edge font in points. Default is 8. |
| ShowArrowsValue | Controls the display of arrows for the edges. Choices are 'on' (default) or 'off'. |
| ArrowSizeValue | Positive number that sets the size of the arrows in points. Default is 8. |
| ShowWeightsValue | Controls the display of text indicating the weight of the edges. Choices are 'on' (default) or 'off'. |
| ShowTextInNodesValue | String that specifies the node property used to label nodes when you display a biograph object using the view method. Choices are:
|
| NodeAutoSizeValue | Controls precalculating the node size before calling the layout engine. Choices are 'on' (default) or 'off'. |
| NodeCallbackValue | User callback for all nodes. Enter the name of a function, a function handle, or a cell array with multiple function handles. After using the view function to display the biograph in the Biograph Viewer, you can double-click a node to activate the first callback, or right-click and select a callback to activate. Default is @(node) inspect(node), which displays the Property Inspector dialog box. |
| EdgeCallbackValue | User callback for all edges. Enter the name of a function, a function handle, or a cell array with multiple function handles. After using the view function to display the biograph in the Biograph Viewer, you can double-click an edge to activate the first callback, or right-click and select a callback to activate. Default is @(edge) inspect(edge), which displays the Property Inspector dialog box. |
| CustomNodeDrawFcnValue | Function handle to a customized function to draw nodes. Default is []. |
BGobj = biograph(CMatrix) creates a biograph object, BGobj, using a connection matrix, CMatrix. All nondiagonal and positive entries in the connection matrix, CMatrix, indicate connected nodes, rows represent the source nodes, and columns represent the sink nodes.
BGobj = biograph(CMatrix, NodeIDs) specifies the node identification strings. NodeIDs can be:
Cell array of strings with the number of strings equal to the number of rows or columns in the connection matrix CMatrix. Each string must be unique.
Character array with the number of rows equal to the number of nodes. Each row in the array must be unique.
String with the number of characters equal to the number of nodes. Each character must be unique.
Default values are the row or column numbers.
Note If you want to specify property name/value pairs, you must specify NodeIDs. Set NodeIDs to [] to use the default values of the row/column numbers. |
BGobj = biograph(..., 'PropertyName', PropertyValue, ...) calls biograph 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:
BGobj =
biograph(CMatrix, NodeIDs,
...'ID', IDValue, ...) specifies
an ID for the biograph object. Default is ''.
BGobj = biograph(CMatrix, NodeIDs, ...'Label', LabelValue, ...) specifies a label for the biograph object. Default is ''.
BGobj = biograph(CMatrix, NodeIDs, ...'Description', DescriptionValue, ...) specifies a description of the biograph object. Default is ''.
BGobj = biograph(CMatrix, NodeIDs, ...'LayoutType', LayoutTypeValue, ...) specifies the algorithm for the layout engine.
BGobj = biograph(CMatrix, NodeIDs, ...'EdgeType', EdgeTypeValue, ...) specifies how edges display.
BGobj = biograph(CMatrix, NodeIDs, ...'Scale', ScaleValue, ...) post-scales the node coordinates. Default is 1.
BGobj = biograph(CMatrix, NodeIDs, ...'LayoutScale', LayoutScaleValue, ...) scales the size of the nodes before calling the layout engine. Default is 1.
BGobj = biograph(CMatrix, NodeIDs, ...'EdgeTextColor', EdgeTextColorValue, ...) specifies a three-element numeric vector of RGB values. Default is [0, 0, 0], which defines black.
BGobj = biograph(CMatrix, NodeIDs, ...'EdgeFontSize', EdgeFontSizeValue, ...) sets the size of the edge font in points. Default is 8.
BGobj = biograph(CMatrix, NodeIDs, ...'ShowArrows', ShowArrowsValue, ...) controls the display of arrows for the edges. Choices are 'on' (default) or 'off'.
BGobj = biograph(CMatrix, NodeIDs, ...'ArrowSize', ArrowSizeValue, ...) sets the size of the arrows in points. Default is 8.
BGobj = biograph(CMatrix, NodeIDs, ...'ShowWeights', ShowWeightsValue, ...) controls the display of text indicating the weight of the edges. Choices are 'on' (default) or 'off'.
BGobj = biograph(CMatrix, NodeIDs, ...'ShowTextInNodes', ShowTextInNodesValue, ...) specifies the node property used to label nodes when you display a biograph object using the view method.
BGobj = biograph(CMatrix, NodeIDs, ...'NodeAutoSize', NodeAutoSizeValue, ...) controls precalculating the node size before calling the layout engine. Choices are 'on' (default) or 'off'.
BGobj = biograph(CMatrix, NodeIDs, ...'NodeCallback', NodeCallbackValue, ...) specifies user callback for all nodes.
BGobj = biograph(CMatrix, NodeIDs, ...'EdgeCallback', EdgeCallbackValue, ...) specifies user callback for all edges.
BGobj = biograph(CMatrix, NodeIDs, ...'CustomNodeDrawFcn', CustomNodeDrawFcnValue, ...) specifies function handle to customized function to draw nodes. Default is [].
Create a biograph object with default node IDs, and then use the get function to display the node IDs.
cm = [0 1 1 0 0;1 0 0 1 1;1 0 0 0 0;0 0 0 0 1;1 0 1 0 0];
bg1 = biograph(cm)
Biograph object with 5 nodes and 9 edges.
get(bg1.nodes,'ID')
ans =
'Node 1'
'Node 2'
'Node 3'
'Node 4'
'Node 5'Create a biograph object, assign the node IDs, and then use the get function to display the node IDs.
cm = [0 1 1 0 0;1 0 0 1 1;1 0 0 0 0;0 0 0 0 1;1 0 1 0 0];
ids = {'M30931','L07625','K03454','M27323','M15390'};
bg2 = biograph(cm,ids);
get(bg2.nodes,'ID')
ans =
'M30931'
'L07625'
'K03454'
'M27323'
'M15390'
Use the view method to display the biograph object.
view(bg2)

Bioinformatics Toolbox object: biograph object
Bioinformatics Toolbox methods of a biograph object: allshortestpaths, conncomp, dolayout, get, getancestors, getdescendants, getedgesbynodeid, getmatrix, getnodesbyid, getrelatives, isdag, isomorphism, isspantree, maxflow, minspantree, set, shortestpath, topoorder, traverse, view

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |