Documentation Center

  • Trial Software
  • Product Updates

elementNames

Class: bioma.data.ExptData
Package: bioma.data

Retrieve or set element names of DataMatrix objects in ExptData object

Syntax

ElmtNames = elementNames(EDObj)
ElmtNames = elementNames(EDObj, Subset)
NewEDObj = elementNames(EDObj, Subset, NewElmtNames)

Description

ElmtNames = elementNames(EDObj) returns a cell array of strings specifying the element names of all the data elements (DataMatrix objects) stored in an ExptData object.

ElmtNames = elementNames(EDObj, Subset) returns a cell array of strings specifying the element names of a subset of the data elements (DataMatrix objects) stored in an ExptData object.

NewEDObj = elementNames(EDObj, Subset, NewElmtNames) replaces the element names of the data elements (DataMatrix objects) specified by Subset in EDObj, an ExptData object, with NewElmtNames, 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 element names of a subset of the data elements (DataMatrix objects) in an ExptData object:

  • String specifying an element name

  • Cell array of strings specifying element names

  • Positive integer

  • Vector of positive integers

  • Logical vector

NewElmtNames

New element names for specific data elements (DataMatrix objects) within an ExptData object, specified by one of the following:

  • Numeric vector

  • String or cell array of strings

  • String, which elementNames uses as a prefix for the element names, with element numbers appended to the prefix

  • Logical true or false (default). If true, elementNames assigns unique element names using the format Elmt1, Elmt2, etc.

The number of elements in NewElmtNames must equal the number of elements specified by Subset.

Output Arguments

ElmtNames

Cell array of strings specifying the element names of all or some of the data elements (DataMatrix objects) in an ExptData object.

NewEDObj

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

Examples

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

% Import bioma.data package 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 element names of DataMatrix objects
ENames = elementNames(EDObj);

See Also

| | | |

How To

Was this topic helpful?