[SOLVED] Assigning color to individual edges

Visual manipulations and refinements
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
noahalexander
Posts:4
Joined:05 Jul 2010 21:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[SOLVED] Assigning color to individual edges

Post by noahalexander » 05 Jul 2010 21:38

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!

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Assigning color to individual edges

Post by mbastian » 05 Jul 2010 21:45

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.

noahalexander
Posts:4
Joined:05 Jul 2010 21:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Assigning color to individual edges

Post by noahalexander » 05 Jul 2010 21:55

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.

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Assigning color to individual edges

Post by mbastian » 05 Jul 2010 22:29

Sure, in which format do you input your data ?

noahalexander
Posts:4
Joined:05 Jul 2010 21:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Assigning color to individual edges

Post by noahalexander » 05 Jul 2010 23:27

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.

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Assigning color to individual edges

Post by mbastian » 05 Jul 2010 23:38

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.

noahalexander
Posts:4
Joined:05 Jul 2010 21:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Assigning color to individual edges

Post by noahalexander » 06 Jul 2010 13:10

Cool, I'll give this a shot. Thanks again for the advice.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable