Thread Subject: help with DataMatrix objects

Subject: help with DataMatrix objects

From: Ugo

Date: 20 Feb, 2009 12:14:01

Message: 1 of 4

Dear all,
I created a DataMatrix Object with my microarray data. I am trying to find a subset (~2000) of all the probesetIDs on the DataMatrix Object. I have the probesetIDs I am interested in a cell variable. It is easy for me (consider I am a biologist!) to work with 2 cells but how can I extract specific probsetIDs, and their values, from a DataMatrix Object?
Thank you for your help

Ugo

Subject: help with DataMatrix objects

From: Lucio Andrade-Cetto

Date: 20 Feb, 2009 14:11:03

Message: 2 of 4

Ugo:
Here is an example on how to extract specific probsetIDs:

Variable d is a DataMatrix
>> d =

                Sample1 Sample2 Sample3 Sample4
    Feature1 71 72 73 74
    Feature2 81 82 83 84
    Feature3 91 92 93 94
    Feature4 101 142 143 144
Feature5 151 152 153 154

To subset with row names and column names:
>> d({'Feature1', 'Feature4'},{'Sample1', 'Sample3'})

ans =

                Sample1 Sample3
    Feature1 71 73
    Feature4 101 143


To extract only the values of a subset with row names and column names:
>> d.({'Feature1', 'Feature4'})({'Sample1', 'Sample3'})

ans =

    71 73
   101 143

Or
>>rowIdx ={'Feature1', 'Feature4'};
>> colIdx ={'Sample2', 'Sample4'};

>> d(rowIdx,colIdx)

ans =

                Sample2 Sample4
    Feature1 72 74
    Feature4 142 144

>> d.(rowIdx)(colIdx)

ans =

    72 74
   142 144

The indexing can be a numeric or logical vector like other MATLAB arrays, or cell arrays of strings for indexing.

One more thing, the colon operator should work also:

>> d(rowIdx, :)

ans =

                Sample1 Sample2 Sample3 Sample4
    Feature1 71 72 73 74
    Feature4 101 142 143 144

>> d.(rowIdx)(':') %Colon is in single quote – ‘:’

ans =

    71 72 73 74
   101 142 143 144

Let me know if this solves your question.
Lucio

"Ugo " <borello.ugo@ijm.jussieu.fr> wrote in message <gnm6q9$s6v$1@fred.mathworks.com>...
> Dear all,
> I created a DataMatrix Object with my microarray data. I am trying to find a subset (~2000) of all the probesetIDs on the DataMatrix Object. I have the probesetIDs I am interested in a cell variable. It is easy for me (consider I am a biologist!) to work with 2 cells but how can I extract specific probsetIDs, and their values, from a DataMatrix Object?
> Thank you for your help
>
> Ugo

Subject: help with DataMatrix objects

From: Lucio Andrade-Cetto

Date: 20 Feb, 2009 14:16:03

Message: 3 of 4

You can also find more information here on how to use the DataMatrix object here:
http://www.mathworks.com/access/helpdesk/help/toolbox/bioinfo/ug/brsyo6j.html
Lucio


"Ugo " <borello.ugo@ijm.jussieu.fr> wrote in message <gnm6q9$s6v$1@fred.mathworks.com>...
> Dear all,
> I created a DataMatrix Object with my microarray data. I am trying to find a subset (~2000) of all the probesetIDs on the DataMatrix Object. I have the probesetIDs I am interested in a cell variable. It is easy for me (consider I am a biologist!) to work with 2 cells but how can I extract specific probsetIDs, and their values, from a DataMatrix Object?
> Thank you for your help
>
> Ugo

Subject: help with DataMatrix objects

From: Ugo

Date: 20 Feb, 2009 14:45:04

Message: 4 of 4

Thank you Lucio.
So if:
a=cell variable containing my probesetIDs list
d=your datamatrix object variable
What will be a simple 'for' loop to find the indices in d of the corresponding probesetIDs of A?
Thank you for your help.

Ugo

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
datamatrix object Lucio Cetto 20 Feb, 2009 07:43:27
microarray Ugo 20 Feb, 2009 07:15:03
datamatrix object Ugo 20 Feb, 2009 07:15:03
bioinformatix t... Ugo 20 Feb, 2009 07:15:03
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com