help > Creating required file (*.edge, *.node)
Showing 1-11 of 11 posts
Display:
Results per page:
Jun 24, 2016  02:06 AM | farzaneh keyvan
Creating required file (*.edge, *.node)
Dear experts,

I'm a beginner in using this interesting toolbox to visualize connectivity patterns. My connectivity matrices (CM) are constructed and I'd like to show its graph presentation. I found that the file format of CM should be a text file with .edge suffix which can be created by "using text editor or Matlab commands" (according to the main paper). Although I have searched a lot to understand the procedure, I couldn't figure out which command in Matlab should be used to create *.edge (or *.node) file. I really need your kind help to let me know how I can make my customized file.
Thank you very much.
Jun 24, 2016  08:06 AM | Mingrui Xia
RE: Creating required file (*.edge, *.node)
Hi,

For the edges, the matlab commands could be: 

save filname.edge a -ascii

in which a refers to the connectivity matrix. 

For the nodes, I suggest to modify the templates files in the package with your own data. 

Best,
Mingrui
Jun 24, 2016  09:06 AM | farzaneh keyvan
RE: Creating required file (*.edge, *.node)
Dear Mingrui

Thank you very much. I didn't know that .edge suffix could be used in "save" command! Thanks a lot.
Jun 25, 2016  11:06 AM | farzaneh keyvan
RE: Creating required file (*.edge, *.node)
Dear Mingrui

 I save the connectivity matrix as you mentioned, but no edge in shown in the BrainNet Viewer. I attached the file, would you please check it and let me know the problem? Is it due to the format of number? How could I solve it? Thank you very  much.

Best Regards
Attachment: Net2.edge
Jul 22, 2016  09:07 AM | Vahab Youssofzadeh - Ulster University
RE: Creating required file (*.edge, *.node)
Hi Mingrui,

How can I modify the node_AAL90.node based on my data?

or, how can I create a new node.node file from scratch?

Kindly, I tried 

dlmwrite('node.node',node,' ');

But It does save only the doubles and gives error for added strings (i.e. labels) to the last column.

Best regards,
Vahab
Jul 22, 2016  12:07 PM | Vahab Youssofzadeh - Ulster University
RE: Creating required file (*.edge, *.node)
Hi all, I found the solution:


load R
load Labels
tmp = char(L);
node = strcat(num2str(R),tmp);
node(:,end-4:end-3) = char(' ');
dlmwrite('test.node',node,'delimiter','');

for edge files you can simply try,

dlmwrite('edge.edge',edge,'\t');

Best regards,
Vahab
Attachment: data.zip
Jul 30, 2016  03:07 AM | Mingrui Xia
RE: Creating required file (*.edge, *.node)
Hi, 

BNV only deal with the upper triangular part of the matrix when drawing undirected networks. Please try the attached one. 

Best,
Mingrui
Attachment: Net2.edge
Jul 30, 2016  03:07 AM | Mingrui Xia
RE: Creating required file (*.edge, *.node)
Hi Vahab,

Nice methods, thanks!

Best,
Mingrui
Jun 17, 2019  07:06 AM | src
RE: Creating required file (*.edge, *.node)
Originally posted by Mingrui Xia:
Hi,

For the edges, the matlab commands could be: 

save filname.edge a -ascii

in which a refers to the connectivity matrix. 

For the nodes, I suggest to modify the templates files in the package with your own data. 

Best,
Mingrui
I am unable to understand how exactly does one create a node file? If we wish to create nodes for say, Desikan-Killany 112 nodes, how should we go about it? Any pointers will be very helpful as I am new to this.
Thanks
src
Jun 24, 2019  01:06 AM | Mingrui Xia
RE: Creating required file (*.edge, *.node)
Hi, 

Here is an example: 

save('m.edge','M','-ascii');

where, m.edge is file name and M is your connectivity matrix.

Best,
Mingrui

Originally posted by farzaneh keyvan:
Dear experts,

I'm a beginner in using this interesting toolbox to visualize connectivity patterns. My connectivity matrices (CM) are constructed and I'd like to show its graph presentation. I found that the file format of CM should be a text file with .edge suffix which can be created by "using text editor or Matlab commands" (according to the main paper). Although I have searched a lot to understand the procedure, I couldn't figure out which command in Matlab should be used to create *.edge (or *.node) file. I really need your kind help to let me know how I can make my customized file.
Thank you very much.
Oct 24, 2019  07:10 AM | Janzaib Masood
RE: Creating required file (*.edge, *.node)
Originally posted by Vahab Youssofzadeh:
Hi all, I found the solution:


load R
load Labels
tmp = char(L);
node = strcat(num2str(R),tmp);
node(:,end-4:end-3) = char(' ');
dlmwrite('test.node',node,'delimiter','');

for edge files you can simply try,

dlmwrite('edge.edge',edge,'\t');

Best regards,
Vahab
Dear Vahab,
Thank you for the code above. The edge making part is not working. Could you please put here an example script that could give us both the node and edge file?