[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •[SOLVED] Assigning color to individual edges
Page 1 of 1

[SOLVED] Assigning color to individual edges

Posted: 05 Jul 2010 21:38
by noahalexander
Hi, I've just started using Gephi to look at gene regulatory networks and have run into the problem of showing up and down regulation. It seems easiest to simply connect two nodes with a red arrow to show down regulation and a green one to show up regulation, though I can't figure out how to assign specific colors to specific edges. I would quite appreciate if you would help me out. Thanks!

Re: Assigning color to individual edges

Posted: 05 Jul 2010 21:45
by mbastian
Hello,

In Gephi the Partition module is done for that, if you have a attribute for each edge, 'DOWN' or 'UP' in a 'regulation' column, the Partition will propose you to color with this attribute.

Re: Assigning color to individual edges

Posted: 05 Jul 2010 21:55
by noahalexander
Thank you for getting back to me so quickly. Would you mind being more detailed if possible? I'm a bit confused about creating the new column.

Re: Assigning color to individual edges

Posted: 05 Jul 2010 22:29
by mbastian
Sure, in which format do you input your data ?

Re: Assigning color to individual edges

Posted: 05 Jul 2010 23:27
by noahalexander
I've been using excel spreadsheets saved as ".csv" where one column is a list of genes and the one directly next to it is another list of genes. I tried to add "up" and down" next to each row of two genes but that only resulted in more nodes.

Re: Assigning color to individual edges

Posted: 05 Jul 2010 23:38
by mbastian
I see, the CSV import can't import additional data. I would recommend to go to the GDF format, which is close from CSV.

Normally in GDF you define nodes and edges, but you can ignore nodes they wil be automatically created. However you need to provide the node line header. Therefore your file will be something like this:

Code: Select all

nodedef>name VARCHAR,label VARCHAR
edgedef>node1 VARCHAR,node2 VARCHAR,regulation VARCHAR
s1,s2,down
s2,s3,down
s3,s2,up
s3,s1,up
Then in Gephi go to the Partition module and select "Edges". Click on the green button to refresh the columns and you should see 'regulation' there.

Re: Assigning color to individual edges

Posted: 06 Jul 2010 13:10
by noahalexander
Cool, I'll give this a shot. Thanks again for the advice.