bioma.data.MetaData Class
Namespace: bioma.data
Superclasses:
Contain metadata from microarray experiment
Description
The MetaData class is designed to contain metadata (variable values and descriptions) from a microarray experiment. It provides a convenient way to store related metadata in a single data structure (object). It also lets you manage and subset the data.
The metadata is a collection of variable names, for example related to samples or microarray features, along with descriptions and values for the variables. A MetaData object stores the metadata in two dataset arrays.
Values dataset array — A dataset array containing the measured value of each variable per sample or feature. In this dataset array, the columns correspond to variables and rows correspond to either samples or features. The number and names of the columns in this dataset array must match the number and names of the rows in the Descriptions dataset array. If this dataset array contains sample metadata, then the number and names of the rows (samples) must match the number and names of the columns in the DataMatrix objects in the same ExpressionSet object. If this dataset array contains feature metadata, then the number and names of the rows (features) must match the number and names of the rows in the DataMatrix objects in the same ExpressionSet object.
Descriptions dataset array — A dataset array containing a list of the variable names and their descriptions. In this dataset array, each row corresponds to a variable. The row names are the variable names, and a column, named
VariableDescription
, contains a description of the variable. The number and names of the rows in the Descriptions dataset array must match the number and names of the columns in the Values dataset array.
The MetaData class includes properties and methods that let you access, retrieve, and change metadata variables, and their values and descriptions. These properties and methods are useful to view and analyze the metadata.
Construction
creates
a MetaData object from one dataset array whose rows correspond to
sample (observation) names and whose columns correspond to variables.
The dataset array contains the measured value of each variable per
sample.MDobj
= bioma.data.MetaData(VarValues
)
creates
a MetaData object from two dataset arrays. MDobj
= bioma.data.MetaData(VarValues
, VarDescriptions
)VarDescriptions
is
a dataset array whose rows correspond to variables. The row names
are the variable names, and another column, named VariableDescription
,
contains a description of each variable.
creates a MetaData object from a dataset array and MDobj
= bioma.data.MetaData(VarValues
, VarDesc
)VarDesc
a
cell array of character vectors containing descriptions of the variables.
constructs
the object using options, specified as property name/property value
pairs.MDobj
= bioma.data.MetaData(...,
'PropertyName
', PropertyValue
)
creates
a MetaData object from a text file containing a table of metadata.
The table row labels must be sample names, and its column headers
must be variable names.MDobj
= bioma.data.MetaData('File', FileValue
)
specifies
a folder or path and folder where MDobj
= bioma.data.MetaData('File', FileValue
,
...'Path', PathValue
)FileValue
is
stored.
specifies
a delimiter symbol to use as a column separator for MDobj
= bioma.data.MetaData('File', FileValue
,
...'Delimiter', DelimiterValue
)FileValue
.
Default is '\t'
.
specifies
the row names (sample names) for the MetaData object. Default is the
information in the first column of the table.MDobj
= bioma.data.MetaData('File', FileValue
,
...'RowNames', RowNamesValue
)
specifies the columns of data to read from the table.
MDobj
= bioma.data.MetaData('File', FileValue
,
...'ColumnNames', ColumnNamesValue
)ColumnNamesValue
is a cell array of character vectors
specifying the column header names. Default is to read all columns of data from the
table, assuming the first row contains column headers.
specifies
that lines in the table prefixed by MDobj
= bioma.data.MetaData('File', FileValue
,
...'VarDescChar', VarDescCharValue
)VarDescCharValue
to
be read as descriptions and used to create the VarDescriptions
dataset
array. By default, bioma.data.MetaData
does not
read variable description information, and does not create a Descriptions
dataset array. These prefixed lines must appear at the top of the
file, before the table of metadata values.
specifies
a name for the MetaData object.MDobj
= bioma.data.MetaData(...'Name', NameValue
)
specifies
a description for the MetaData object.MDobj
= bioma.data.MetaData('File', FileValue
,
...'Description', DescriptionValue
)
specifies
sample names (row names) for the MetaData object. MDobj
= bioma.data.MetaData('File', FileValue
,
...'SampleNames', SampleNamesValue
)
specifies
variable names (column names) for the MetaData object.MDobj
= bioma.data.MetaData('File', FileValue
,
...'VariableNames', VariableNamesValue
)
Input Arguments
|
Dataset array whose rows correspond to sample (observation) names and whose columns correspond to variables. The dataset array contains the measured value of each variable per sample or feature. The number and names of the columns in the |
|
Dataset array whose rows correspond to variables. The row names
are the variable names, and a column, named |
|
Cell array of character vectors containing descriptions of the variables. The number of
elements in |
|
Character vector specifying a text file containing a table of metadata. The table row labels
must be sample or feature names, and its column headers must be variable
names. The text file must be on the MATLAB search path or in the Current
Folder (unless you use the |
|
Character vector specifying a folder or path and folder where
|
|
Character vector specifying a delimiter symbol to use as a column separator for
|
|
Row names (sample or feature names) for the MetaData object, specified by one of the following:
If you specify Default: |
|
Cell array of character vectors specifying the column header names to indicate which columns
of data to read from the table. Default is to read all columns of data
from the table, assuming the first row contains column headers. If the
table does not have column headers, specify |
|
Character vector specifying a character to prefix lines in the table that are to be read as
descriptions and used to create the
|
|
Character vector specifying a name for the MetaData object. |
|
Character vector specifying a description for the MetaData object. |
|
Cell array of character vectors specifying sample names for the MetaData object. The number of elements in the cell array must equal the number of samples in the MetaData object. This input overwrites sample names from the input file. Default are the sample names (row names) from the input file. |
|
Cell array of character vectors specifying variable names for the MetaData object. The number of elements in the cell array must equal the number of variables in the MetaData object. This input overwrites variable names from the input file. Default are the variable names (column names) from the input file. |
Properties
|
Description of the MetaData object. Character vector specifying a description of the MetaData object.
Default is | ||
|
Row and column labels for the MetaData object. Two-element cell array containing character vectors specifying
labels of the rows and columns respectively in the MetaData object.
Default is | ||
|
Name of the MetaData object. Character vector specifying the name of the MetaData object.
Default is | ||
|
Number of samples (observations) in the experiment Positive integer specifying the number of samples in the experiment.
This value is equivalent to the number of rows in the Attributes:
| ||
|
Number of variables in the experiment Positive integer specifying the number of variables in the experiment.
This value is equivalent to the number of columns in the Attributes:
|
Methods
combine | Combine two MetaData objects |
isempty | Determine whether MetaData object is empty |
sampleNames | Retrieve or set sample names in MetaData object |
size | Return size of MetaData object |
varValuesTable | Create 2-D graphic table GUI of variable values in MetaData object |
variableDesc | Retrieve or set variable descriptions for samples in MetaData object |
variableNames | Retrieve or set variable names for samples in MetaData object |
variableValues | Retrieve or set variable values for samples in MetaData object |
Instance Hierarchy
An ExpressionSet object contains two MetaData objects, one for sample information and one for microarray feature information. A MetaData object contains two dataset arrays. One dataset array contains the measured value of each variable per sample or feature. The other dataset array contains a list of the variable names and their descriptions.
Attributes
To learn about attributes of classes, see Class Attributes.
Copy Semantics
Value. To learn how this affects your use of the class, see Copying Objects.
Indexing
MetaData objects support 2-D parenthesis ( ) indexing and dot . indexing to extract, assign, and delete data.
MetaData objects do not support:
Curly brace { } indexing
Linear indexing
Examples
Construct a MetaData object containing sample variable information from a text file:
% Import the bioma.data namespace to make constructor function % available import bioma.data.* % Construct MetaData object from .txt file MDObj2 = MetaData('File', 'mouseSampleData.txt', 'VarDescChar', '#'); % Display information about the MetaData object MDObj2 % Supply a description for the MetaData object MDObj2.Description = 'This MetaData Object contains sample variable info.'