sampleNames
Retrieve or set sample names in MetaData object
Syntax
SamFeatNames
= sampleNames(MDObj
)
SamFeatNames
= sampleNames(MDObj
, Subset
)
NewMDObj
= sampleNames(MDObj
, Subset
, NewSamFeatNames
)
Description
returns
a cell array of character vectors specifying all sample names in a
MetaData object. SamFeatNames
= sampleNames(MDObj
)
returns
a cell array of character vectors specifying a subset the sample names
in a MetaData object. SamFeatNames
= sampleNames(MDObj
, Subset
)
replaces
the sample names specified by NewMDObj
= sampleNames(MDObj
, Subset
, NewSamFeatNames
)Subset
in MDObj
,
a MetaData object, with NewSamFeatNames
,
and returns NewMDObj
, a new MetaData object.
Input Arguments
|
Object of the |
|
One of the following to specify a subset of the sample names in a MetaData object:
|
|
New sample names for specific names within a MetaData object, specified by one of the following:
The number of names in |
Output Arguments
|
Cell array of character vectors specifying all or some of the
sample names in a MetaData object. The sample names are also the row
names of the |
|
Object of the |
Examples
Construct a MetaData object, and then retrieve the sample names from it:
% Import the bioma.data namespace 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)