featureNames

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

Retrieve or set feature names in ExptData object

Syntax

FeatNames = featureNames(EDObj)
FeatNames = featureNames(EDObj, Subset)
NewESObj = featureNames(EDObj, Subset, NewFeatNames)

Description

FeatNames = featureNames(EDObj) returns a cell array of strings specifying all feature names in an ExptData object.

FeatNames = featureNames(EDObj, Subset) returns a cell array of strings specifying a subset the feature names in an ExptData object.

NewESObj = featureNames(EDObj, Subset, NewFeatNames) replaces the feature names specified by Subset in EDObj, an ExptData object, with NewFeatNames, and returns NewEDObj, a new ExptData object.

Input Arguments

EDObj

Object of the bioma.data.ExptData class.

Subset

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

  • String specifying a feature name

  • Cell array of strings specifying feature names

  • Positive integer

  • Vector of positive integers

  • Logical vector

NewFeatNames

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

  • Numeric vector

  • String or cell array of strings

  • String, which featureNames uses as a prefix for the feature names, with feature numbers appended to the prefix

  • Logical true or false (default). If true, featureNames assigns unique feature names using the format Feature1, Feature2, etc.

The number of feature names in NewFeatNames must equal the number of features specified by Subset.

Output Arguments

FeatNames

Cell array of strings specifying all or some of the feature names in an ExptData object. The feature names are the row names in the DataMatrix objects in the ExptData object.

NewEDObj

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

Examples

Construct an ExptData object, and then retrieve the feature names 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 feature names
FNames = featureNames(EDObj);
Was this topic helpful?