[SOLVED] Assigning color to individual edges
-
- 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
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!
- 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
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.
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.
-
- 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
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.
- 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
Sure, in which format do you input your data ?
-
- 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
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.
- 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
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:
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.
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
-
- 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
Cool, I'll give this a shot. Thanks again for the advice.