Main Content

sampleVarNames

Class: bioma.ExpressionSet
Namespace: bioma

Retrieve or set sample variable names in ExpressionSet object

Syntax

SamVarNames = sampleVarNames(ESObj)
SamVarNames = sampleVarNames(ESObj, Subset)
NewESObj = sampleVarNames(ESObj, Subset, NewSamVarNames)

Description

SamVarNames = sampleVarNames(ESObj) returns a cell array of character vectors specifying all sample variable names in an ExpressionSet object.

SamVarNames = sampleVarNames(ESObj, Subset) returns a cell array of character vectors specifying a subset the sample variable names in an ExpressionSet object.

NewESObj = sampleVarNames(ESObj, Subset, NewSamVarNames) replaces the sample variable names specified by Subset in ESObj, an ExpressionSet object, with NewSamVarNames, and returns NewESObj, a new ExpressionSet object.

Input Arguments

ESObj

Object of the bioma.ExpressionSet class.

Subset

One of the following to specify a subset of the sample variable names in an ExpressionSet object:

  • Character vector or string specifying a sample variable name

  • Cell array of character vectors or string vector specifying sample variable names

  • Positive integer

  • Vector of positive integers

  • Logical vector

NewSamVarNames

New sample variable names for specific sample variable names within an ExpressionSet object, specified by one of the following:

  • Numeric vector

  • String vector or cell array of character vectors

  • Character vector or string, which sampleVarNames uses as a prefix for the sample variable names, with sample variable numbers appended to the prefix

  • Logical true or false (default). If true, sampleVarNames assigns unique sample variable names using the format Var1, Var2, etc.

The number of sample variable names in NewSamVarNames must equal the number of sample variable names specified by Subset.

Output Arguments

SamVarNames

Cell array of character vectors specifying all or some of the sample variable names in an ExpressionSet object. The sample variable names are the column names of the VarValues dataset array. The sample variable names are also the row names of the VarDescriptions dataset array. Both dataset arrays are in the MetaData object in the ExpressionSet object.

NewESObj

Object of the bioma.ExpressionSet class, returned after replacing specific sample names.

Examples

Construct an ExpressionSet object, ESObj, as described in the Examples section of the bioma.ExpressionSet class reference page. Retrieve the sample variable names from the ExpressionSet object:

% Retrieve the sample variable names
VNames = sampleVarNames(ESObj)