What is a .MAT file and how do I make one?

137 views
Skip to first unread message

Barry Demchak

unread,
May 9, 2017, 10:56:56 AM5/9/17
to cytoscape-helpdesk
Hi, all --

I have an Excel spreadsheet that I'd like to load into Cytoscape ...

The spreadsheet is really an adjacency matrix with weights in the cells. The top row headers are the names of one class of node (e.g. Tonga1, Tonga2, Tonga3) and the left column is the name of the other class of node (PCB-1, PCB-2, PCB-3...). Cell (C,2) is the weight for the interaction between nodes Tonga1 and PCB-1.



I see that I may be able to use aMatReader app if I can get this spreadsheet into a .MAT format.

What's a .MAT file? I have looked around, and there aren't many easy answers.

Should I be using a different importer??

Thanks. 


Ashwani Kumar

unread,
May 9, 2017, 11:41:31 AM5/9/17
to cytoscape-helpdesk
Hi,

I think .mat is for MATLAB formatted data file. 



--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.

K. Elo

unread,
May 9, 2017, 11:56:30 AM5/9/17
to cytoscape...@googlegroups.com
Hi!
2017-05-09 07:56 -0700, Barry Demchak wrote:
> Hi, all --
>
> I have an Excel spreadsheet that I'd like to load into Cytoscape ...
>
> The spreadsheet is really an adjacency matrix with weights in the
> cells. The top row headers are the names of one class of node (e.g.
> Tonga1, Tonga2, Tonga3) and the left column is the name of the other
> class of node (PCB-1, PCB-2, PCB-3...). Cell (C,2) is the weight for
> the interaction between nodes Tonga1 and PCB-1.

It seems to be an affiliation matrix instead. An adjacency matrix would
have the same variables on rows and colums.

Anyway, maybe this helps you (supposed you transfer you matrix to a
true adjacency matrix):

http://www.cgl.ucsf.edu/cytoscape/utilities3/amatreader.shtml

HTH,
Kimmo


Barry Demchak

unread,
May 9, 2017, 12:37:15 PM5/9/17
to cytoscape...@googlegroups.com
Hi, Kimmo ...

That did pretty nicely.

For the record, I used Excel to save the matrix as a tab delimited file.

Then I installed the aMatReader app.

Then I File | Import the tab delimited file. The app and added a node Type attribute containing either "ColumnNode" or "RowNode" to describe where the node came from. It also picked up the cell value in an edge attribute called Weight.

The trick after that was to get a layout that showed the structure. For this, I selected all ColumnNode nodes and laid them out using a stacked layout. Same for RowNodes ... and then separated them to see the connections between the two.

Pretty successful, and now my analysis continues.

Thanks!
Reply all
Reply to author
Forward
0 new messages