Main Content

dmNames

Class: bioma.data.ExptData
Namespace: bioma.data

Retrieve or set Name properties of DataMatrix objects in ExptData object

Syntax

DMNames = dmNames(EDObj)
DMNames = dmNames(EDObj, Subset)
NewEDObj = dmNames(EDObj, Subset, NewDMNames)

Description

DMNames = dmNames(EDObj) returns a cell array of character vectors specifying the Name properties of all the DataMatrix objects in an ExptData object.

DMNames = dmNames(EDObj, Subset) returns a cell array of character vectors specifying the Name properties of a subset of the DataMatrix objects in an ExptData object.

NewEDObj = dmNames(EDObj, Subset, NewDMNames) replaces the Name properties of DataMatrix objects specified by Subset in EDObj, an ExptData object, with NewDMNames, and returns NewEDObj, a new ExptData object.

Input Arguments

EDObj

Object of the bioma.data.ExptData class.

Subset

One of the following to specify the names of a subset of the DataMatrix objects in an ExptData object:

  • Character vector specifying a name

  • Cell array of character vectors specifying names

  • Positive integer

  • Vector of positive integers

  • Logical vector

NewDMNames

New names for specific DataMatrix objects within an ExptData object, specified by one of the following:

  • Numeric vector

  • Character vector or cell array of character vectors

  • Character vector, which dmNames uses as a prefix for the DataMatrix object names, with numbers appended to the prefix

  • Logical true or false (default). If true, dmNames assigns unique names using the format DM1, DM2, etc.

The number of elements in NewDMNames must equal the number of DataMatrix objects specified by Subset.

Output Arguments

DMNames

Cell array of character vectors specifying the names of all or some of the DataMatrix objects in an ExptData object.

NewEDObj

Object of the bioma.data.ExptData class, returned after replacing names of specific DataMatrix objects.

Examples

Construct an ExptData object, and then retrieve the names of DataMatrix objects from it:

% Import the bioma.data namespace to make constructor functions
% available
import bioma.data.*
% Create DataMatrix object from .txt file containing 
% expression values from microarray experiment
dmObj = DataMatrix('File', 'mouseExprsData.txt');
% Construct ExptData object
EDObj = ExptData(dmObj);
% Retrieve DataMatrix object names
DMNames = dmNames(EDObj);