elementData

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

Retrieve or set data element (DataMatrix object) in ExptData object

Syntax

DMObj = elementData(EDObj, Element)
NewEDObj = elementData(EDObj, Element, NewDMObj)

Description

DMObj = elementData(EDObj, Element) returns the DataMatrix object from an ExptData object, specified by Element, a positive integer or string specifying an element name.

NewEDObj = elementData(EDObj, Element, NewDMObj) replaces the element (DataMatrix object) specified by Element in EDObj, an ExptData object, with NewDMObj, a new DataMatrix object, and returns NewEDObj, a new ExptData object.

Input Arguments

EDObj

Object of the bioma.data.ExptData class.

Element

Element (DataMatrix object) in an ExptData object, specified by either of the following:

  • Positive integer

  • String specifying the element name

NewDMObj

Object of the DataMatrix class. The sample names and feature names in NewDMObj must match the sample names and feature names of EDObj.

Output Arguments

DMObj

Object of the DataMatrix class, returned from an ExptData object.

NewEDObj

Object of the bioma.data.ExptData class, returned after replacing a data element (DataMatrix object).

Examples

Construct an ExptData object, and then extract a DataMatrix object 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);
% Extract first DataMatrix object
ExtractedDMObj = elementData(EDObj, 1);
Was this topic helpful?