Main Content

MetaData

Metadata from microarray experiment

    Description

    MetaData 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 object 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.

    Creation

    Description

    MDobj = bioma.data.MetaData(VarValues) 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,VarDescriptions) creates a MetaData object from two dataset arrays. Here, 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.

    MDobj = bioma.data.MetaData(VarValues,VarDesc) creates a MetaData object from a dataset array and a cell array of character vectors, VarDesc, containing descriptions of the variables.

    MDobj = bioma.data.MetaData('File',FileValue) 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,Name,Value) creates a MetaData object from a text file according to the Name,Value arguments.

    example

    MDobj = bioma.data.MetaData(___,'Name',NameValue) specifies a name for the MetaData object. Use this syntax with any input arguments from previous syntaxes.

    Input Arguments

    expand all

    Measured values of each variable per sample or feature, specified as a dataset array whose rows correspond to sample (observation) names and whose columns correspond to variables.

    The number and names of the columns in the VarValues dataset array must match the number and names of the rows in the VarDescriptions dataset array. If VarValues 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 VarValues 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 of the variables, specified as a dataset array whose rows correspond to variables. 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 VarDescriptions dataset array must match the number and names of the columns in the VarValues dataset array.

    Descriptions of the variables, specified as a cell array of character vectors. The number of elements in VarDesc must equal the number of columns (variable names) in VarValues.

    Text file containing a table of metadata, specified as a character vector. 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 Path property).

    Name for MetaData object, specified as a character vector.

    Name-Value Arguments

    Folder or path and folder containing FileValue, specified as a character vector.

    Delimiter symbol to use as a column separator for FileValue, specified as a character vector. Typical choices are:

    • ' '

    • '\t'

    • ','

    • ';'

    • '|'

    Row names (sample or feature names) for the MetaData object, specified by one of these values:

    • Cell array of character vectors

    • Single number indicating the column of the table containing the row names

    • Character vector indicating the column header of the table containing the row names

    If you specify [] for RowNames, then bioma.data.MetaData provides numbered row names, starting with 1.

    Column header names to indicate which columns of data to read from the table, specified as a cell array of character vectors. The 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 [] for ColumnNames to read all columns of data and provide numbered column names, starting with 1.

    Character to prefix lines in the table that are to be read as descriptions and used to create the VarDescriptions dataset array, specified as a character vector. By default, bioma.data.MetaData does not read variable description information, and does not create a VarDescriptions dataset array. These prefixed lines must appear at the top of the file, before the table of metadata values.

    Description for MetaData object, specified as a character vector.

    Sample names for MetaData object, specified as a cell array of character vectors. 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.

    Variable names for MetaData object, specified as a cell array of character vectors. 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

    expand all

    Description of MetaData object, stored as a character vector.

    Row and column labels for MetaData object, stored as a two-element cell array containing character vectors.

    Name of the MetaData object, stored as a character vector.

    This property is read-only.

    Number of samples (observations) in the experiment, stored as a positive integer. This value is equivalent to the number of rows in the VarValues dataset array.

    This property is read-only.

    Number of variables in experiment, stored as a positive integer. This value is equivalent to the number of columns in the VarValues dataset array.

    Object Functions

    combineCombine two MetaData objects
    isemptyDetermine whether MetaData object is empty
    sampleNamesRetrieve or set sample names in MetaData object
    sizeReturn size of MetaData object
    varValuesTableCreate 2-D graphic table GUI of variable values in MetaData object
    variableDescRetrieve or set variable descriptions for samples in MetaData object
    variableNamesRetrieve or set variable names for samples in MetaData object
    variableValuesRetrieve or set variable values for samples in MetaData object

    Examples

    collapse all

    Construct a MetaData object containing sample variable information from a text file.

    Import the bioma.data namespace to make the constructor function available.

    import bioma.data.*

    Construct MetaData object from a text file.

    MDObj2 = MetaData('File','mouseSampleData.txt','VarDescChar','#');

    Display information about the MetaData object.

    MDObj2
    MDObj2 = 
    Sample Names:
        A, B, ...,Z (26 total)
    Variable Names and Meta Information:
                  VariableDescription                           
        Gender    {' Gender of the mouse in study'         }    
        Age       {' The number of weeks since mouse birth'}    
        Type      {' Genetic characters'                   }    
        Strain    {' The mouse strain'                     }    
        Source    {' The tissue source for RNA collection' }    
    
    

    Supply a description for the MetaData object.

    MDObj2.Description = ...
        'This MetaData Object contains sample variable info.'
    MDObj2 = 
    Sample Names:
        A, B, ...,Z (26 total)
    Variable Names and Meta Information:
                  VariableDescription                           
        Gender    {' Gender of the mouse in study'         }    
        Age       {' The number of weeks since mouse birth'}    
        Type      {' Genetic characters'                   }    
        Strain    {' The mouse strain'                     }    
        Source    {' The tissue source for RNA collection' }    
    
    

    Limitations

    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

    Algorithms

    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.

    Version History

    Introduced in R2009b