代表Expression Data Values in DataMatrix Objects
datamatrix对象的概述
该工具箱包括用于创建,存储和访问微阵列数据的功能,对象和方法。
对象构造函数,datamatrix
,让您创建一个datamatrix对象从微阵列实验中封装数据和元数据(行和列名)。Datamatrix对象将实验数据存储在矩阵中,行通常对应于基因名称或探针标识符,列通常与样本标识符相对应。Datamatrix对象还存储元数据,包括基因名称或探针标识符(作为行名)和示例标识符(作为列名)。
You can reference microarray expression values in a DataMatrix object the same way you reference data in a MATLAB®array, that is, by using linear or logical indexing. Alternately, you can reference this experimental data by gene (probe) identifiers and sample identifiers. Indexing by these identifiers lets you quickly and conveniently access subsets of the data without having to maintain additional index arrays.
Many MATLAB operators and arithmetic functions are available to DataMatrix objects by means of methods. These methods let you modify, combine, compare, analyze, plot, and access information from DataMatrix objects. Additionally, you can easily extend the functionality by using general element-wise functions,dmarrayfun
和dmbsxfun
, 和by manually accessing the properties of a DataMatrix object.
Note
对于描述Datamatrix对象的属性和方法的表格,请参见datamatrix对象参考页。
Constructing DataMatrix Objects
加载包含酵母数据的BioInformitics Toolbox™软件提供的垫子文件。该垫子文件包括三个变量:
yeastvalues
,一个基因表达数据的614 x-7矩阵,genes
,一个614 GenBank的细胞阵列®标记行的登录号yeastvalues
, 和时代
,标记列的时间值的1 x-7向量yeastvalues
.load filteredyeastdata
创建变量以包含数据的子集,特别是前五行和前四列
yeastvalues
矩阵,genes
细胞阵列和时代
向量。YeastValues = YeastValues(1:5,1:4);基因=基因(1:5,:);时间=时间(1:4);
Import the microarray object package so that the
datamatrix
constructor function will be available.进口生物瘤。
Use the
datamatrix
构造函数函数从基因表达数据创建一个小的datamatrix对象。dmo = DataMatrix(yeastvalues,genes,times) dmo = 0 9.5 11.5 13.5 SS DNA -0.131 1.699 -0.026 0.365 YAL003W 0.305 0.146 -0.129 -0.444 YAL012W 0.157 0.175 0.467 -0.379 YAL026C 0.246 0.796 0.384 0.981 YAL034C -0.235 0.487 -0.184 -0.669
datamatrix对象的获取和设置属性
You use theget
和set
methods to retrieve and set properties of a DataMatrix object.
Use the
get
method to display the properties of the DataMatrix object,dmo
.get(dmo) Name: '' RowNames: {5x1 cell} ColNames: {' 0' ' 9.5' '11.5' '13.5'} NRows: 5 NCols: 4 NDims: 2 ElementClass: 'double'
Use the
set
指定Datamatrix对象的名称的方法,dmo
.dmo = set(dmo,'Name','MyDMObject');
Use the
get
再次显示datamatrix对象的属性,dmo
.get(dmo) Name: 'MyDMObject' RowNames: {5x1 cell} ColNames: {' 0' ' 9.5' '11.5' '13.5'} NRows: 5 NCols: 4 NDims: 2 ElementClass: 'double'
Note
For a description of all properties of a DataMatrix object, see thedatamatrix对象参考页。
Accessing Data in DataMatrix Objects
Datamatrix对象支持以下类型的万博1manbetx索引类型,以提取,分配和删除数据:
Parenthesis ( ) indexing
点。索引
括号()索引
使用括号索引提取数据子集中dmo
和assign it to a new DataMatrix objectDMO2
:
DMO2= dmo(1:5,2:3) dmo2 = 9.5 11.5 SS DNA 1.699 -0.026 YAL003W 0.146 -0.129 YAL012W 0.175 0.467 YAL026C 0.796 0.384 YAL034C 0.487 -0.184
Use parenthesis indexing to extract a subset of the data using row names and column names, and assign it to a new DataMatrix objectDMO3
:
DMO3= dmo({'SS DNA','YAL012W','YAL034C'},'11.5') dmo3 = 11.5 SS DNA -0.026 YAL012W 0.467 YAL034C -0.184
Note
If you use a cell array of row names or column names to index into a DataMatrix object, the names must be unique, even though the row names or column names within the DataMatrix object are not unique.
Use parenthesis indexing to assign new data to a subset of the elements inDMO2
:
DMO2({'SS DNA', 'YAL003W'}, 1:2) = [1.700 -0.030; 0.150 -0.130] dmo2 = 9.5 11.5 SS DNA 1.7 -0.03 YAL003W 0.15 -0.13 YAL012W 0.175 0.467 YAL026C 0.796 0.384 YAL034C 0.487 -0.184
使用括号索引删除数据子集中的一个子集DMO2
:
DMO2({'SS DNA', 'YAL003W'}, :) = [] dmo2 = 9.5 11.5 YAL012W 0.175 0.467 YAL026C 0.796 0.384 YAL034C 0.487 -0.184
点。索引
Note
In the following examples, notice that when using dot indexing with DataMatrix objects, you specify all rows or all columns using a colon within single quotation marks,(':')
.
Use dot indexing to extract the data from the11.5
仅列dmo
:
timeValues = dmo。(':')('11.5')timeValues = -0.0260 -0.1290 0.4670 0.3840 -0.1840
Use dot indexing to assign new data to a subset of the elements indmo
:
dmo.(1:2)(':') = 7 dmo = 0 9.5 11.5 13.5 SS DNA 7 7 7 7 YAL003W 7 7 7 7 YAL012W 0.157 0.175 0.467 -0.379 YAL026C 0.246 0.796 0.384 0.981 YAL034C -0.235 0.487 -0.184 -0.669
使用DOT索引从中删除整个变量dmo
:
dmo.YAL034C = [] dmo = 0 9.5 11.5 13.5 SS DNA 7 7 7 7 YAL003W 7 7 7 7 YAL012W 0.157 0.175 0.467 -0.379 YAL026C 0.246 0.796 0.384 0.981
使用DOT索引将两列从dmo
:
dmo。(':')(2:3)= [] dmo = 0 13.5 SS DNA 7 7 YAL003W 7 7 YAL012W 0.157 -0.379 YAL026C 0.246 0.981