How to import attribute from a file

127 views
Skip to first unread message

betty

unread,
Nov 18, 2009, 8:22:30 AM11/18/09
to cytoscape-helpdesk
Here is the case:I import a network from the table,but come across a
prolem when I try to import the edge attribution from the file
***.eda.For example,I importe the following network:
a1 pp a2
a2 pp a3
a3 pp a1
a3 pp a3
the fomat of the file above is .xls.
Then I try to import the edge attribution from the file ***.eda.The
file is like this:
interactionstrength(class=java.lang.floatingpoint)
a1(pp)a2=0.3
a2(pp)a3=0.4
a3(pp)a1=0.5
a3(pp)a3=0.8
I failed to do it.I don't know what is wrong with my operation.
Look forward to some useful advice.

piet molenaar

unread,
Nov 18, 2009, 10:21:13 AM11/18/09
to cytoscape...@googlegroups.com
Hi Betty,
From the manual (http://www.cytoscape.org/manual/Cytoscape2_6Manual.html#Cytoscape%20Attribute%20File%20Format):

Edge names are all of the form:

sourceName (edgeType) targetName

Specifically, that is

Table 10. 

sourceName space openParen edgeType closeParen space targetName


Note that tabs are not allowed in edge names. Tabs can be used to separate the edge name from the "=" delimiter, but not within the edge name itself. Also note that this format is different from the specification of interactions in the SIF file format. To be explicit: a SIF entry for the previous interaction would look like

sourceName edgeType targetName

or

Table 11. 

sourceName whiteSpace edgeType whiteSpace targetName


Piet



--

You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To post to this group, send email to cytoscape...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cytoscape-helpdesk?hl=.





--
Piet Molenaar
p.mol...@amc.uva.nl
Department of Human Genetics, M1-131
Academic Medical Center
University of Amsterdam
Meibergdreef 9
1105 AZ Amsterdam
the Netherlands

tel (+31) 20-5666592
fax (+31) 20-6918626

nit...@gmail.com

unread,
Nov 18, 2009, 6:08:53 PM11/18/09
to cytoscape-helpdesk
Hello Bettey and Piet,

I am getting the same problem as Betty is. I do not know how to work
this problem out. I want to color my nodes on the basis of the
interactions strength but is not able to do it. Would be really great
if Piet could you send us a file format which we can download and run
as an example then we can try to understand much better. This would
really help.

Thank you very very much,
Nitin Kumar

On Nov 18, 4:21 pm, piet molenaar <piet....@gmail.com> wrote:
> Hi Betty,
> From the manual (http://www.cytoscape.org/manual/Cytoscape2_6Manual.html#Cytoscape%20A...
> ):
>
> Edge names are all of the form:
>
> sourceName (edgeType) targetName
>
> Specifically, that is
>
> *Table 10. *
>
> sourceName space openParen edgeType closeParen space targetName
>
> Note that tabs are not allowed in edge names. Tabs can be used to separate
> the edge name from the "=" delimiter, but not within the edge name itself.
> Also note that this format is different from the specification of
> interactions in the SIF file format. To be explicit: a SIF entry for the
> previous interaction would look like
>
> sourceName edgeType targetName
>
> or
>
> *Table 11. *
> p.molen...@amc.uva.nl

piet molenaar

unread,
Nov 19, 2009, 3:41:38 AM11/19/09
to cytoscape...@googlegroups.com
Hi,
See here for supported network fileformats; http://www.cytoscape.org/manual/Cytoscape2_6Manual.html#Supported%20Network%20File%20Formats
 
By far the easiest way however is to use import>File from Table (text/ms excel): http://www.cytoscape.org/manual/Cytoscape2_6Manual.html#Import%20Free-Format%20Table%20Files

Coloring based on an attribute can be arranged through the Visual style mapper: http://www.cytoscape.org/manual/Cytoscape2_6Manual.html#Visual%20Styles

For your case you might want to look at the continuous mapper tutorial in http://www.cytoscape.org/manual/Cytoscape2_6Manual.html#Visual%20Styles%20Tutorials

Hope this helps,
Piet
p.mol...@amc.uva.nl

piet molenaar

unread,
Nov 19, 2009, 7:10:23 AM11/19/09
to cytoscape-helpdesk
Hi Betty,
I'm replying to your question via the helpdesk list;
as I stated already the id for an edge is in the format
nodeAId [space] (interactiontype) [space] nodeBId
In your primary key column the spaces are lacking:
a1(pp)a2 -> a1 (pp) a2
cheers,
Piet

On Thu, Nov 19, 2009 at 1:05 PM, betty <zhaoyou...@yahoo.com.cn> wrote:
Hello,thanks for your help.I have seen the manual,but I still can't do
it.Can you tell me how to edit the edge attributes in a file which
format is .xls?An example is wanted.Given that I want to type the
attribute named IteractionStrength,what should I do next?
I try the following file,but it can't  be recognized.
PrimaryKey  Interactionstrength
a1(pp)a2       0.3
a2(pp)a3       0.4
a1(pp)a3       0.5

Waiting for your reply.

betty

unread,
Nov 21, 2009, 5:43:33 AM11/21/09
to cytoscape-helpdesk
I'm so soory.I was so carless that I forgot to insert a white space
between the source protein and the open parenthesis,which made the
file not be read correctly.
Thanks for the patient help.
Reply all
Reply to author
Forward
0 new messages