Documentation Center

  • Trial Software
  • Product Updates

sampleNames

Class: bioma.ExpressionSet
Package: bioma

Retrieve or set sample names in ExpressionSet object

Syntax

SamNames = sampleNames(ESObj)
SamNames = sampleNames(ESObj, Subset)
NewESObj = sampleNames(ESObj, Subset, NewSamNames)

Description

SamNames = sampleNames(ESObj) returns a cell array of strings specifying all sample names in an ExpressionSet object.

SamNames = sampleNames(ESObj, Subset) returns a cell array of strings specifying a subset the sample names in an ExpressionSet object.

NewESObj = sampleNames(ESObj, Subset, NewSamNames) replaces the sample names specified by Subset in ESObj, an ExpressionSet object, with NewSamNames, 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 names in an ExpressionSet object:

  • String specifying a sample name

  • Cell array of strings specifying sample names

  • Positive integer

  • Vector of positive integers

  • Logical vector

NewSamNames

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

  • Numeric vector

  • String or cell array of strings

  • String, which sampleNames uses as a prefix for the sample names, with sample numbers appended to the prefix

  • Logical true or false (default). If true, sampleNames assigns unique sample names using the format Sample1, Sample2, etc.

The number of sample names in NewSamNames must equal the number of samples specified by Subset.

Output Arguments

SamNames

Cell array of strings specifying all or some of the sample names in an ExpressionSet object. The sample names are the column names in the DataMatrix objects in the ExpressionSet object. The sample names are also the row names of the VarValues dataset array 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 names from it:

% Retrieve the sample names 
SNames = sampleNames(ESObj);

See Also

| | | |

How To

Was this topic helpful?