| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Bioinformatics Toolbox |
| Contents | Index |
| Learn more about Bioinformatics Toolbox |
Retrieve or set sample names in MetaData object
SamFeatNames = sampleNames(MDObj)
SamFeatNames = sampleNames(MDObj, Subset)
NewMDObj = sampleNames(MDObj, Subset, NewSamFeatNames)
SamFeatNames = sampleNames(MDObj) returns a cell array of strings specifying all sample names in a MetaData object.
SamFeatNames = sampleNames(MDObj, Subset) returns a cell array of strings specifying a subset the sample names in a MetaData object.
NewMDObj = sampleNames(MDObj, Subset, NewSamFeatNames) replaces the sample names specified by Subset in MDObj, a MetaData object, with NewSamFeatNames, and returns NewMDObj, a new MetaData object.
MDObj |
Object of the bioma.data.MetaData class. |
Subset |
One of the following to specify a subset of the sample names in a MetaData object:
|
NewSamFeatNames |
New sample names for specific names within a MetaData object, specified by one of the following:
The number of names in NewSamFeatNames must equal the number of samples specified by Subset. |
SamFeatNames |
Cell array of strings specifying all or some of the sample names in a MetaData object. The sample names are also the row names of the VarValues dataset array in the MetaData object. |
NewMDObj |
Object of the bioma.data.MetaData class, returned after replacing specific sample names. |
Construct a MetaData object, and then retrieve the sample names from it:
% Import bioma.data package to make constructor function
% available
import bioma.data.*
% Construct MetaData object from .txt file
MDObj2 = MetaData('File', 'mouseSampleData.txt', 'VarDescChar', '#');
% Retrieve the sample names
SNames = sampleNames(MDObj2)bioma.data.MetaData | variableDesc | variableNames | variableValues

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |