Cyclone can be used to draw graphs extracted from Cyclone data. Cyclone exports '.sif' files
that can be read by Cytoscape.
Below are some examples of screenshots of EcoCyc regulatory, proteic and metabolic graphs extracted from Cyclone data and displayed by Cytoscape.
This first example shows the transcriptional regulation interaction graph.
/**
* Example 5b
* Transcriptional Regulation Interaction Graph: each node represents a gene
* export the graph into Cytoscape format
* mySQL is required
*/
public static void TutorialEx5b(String myOrganism, int max) {
String keySession = new String("cyclone");
Regulation myRegulation = TranscriptionalRegulationCreator.getRegulation( keySession , myOrganism, max);
//print in the console
myRegulation.display();
//Export it in Cytoscape format (SIF, NA)
myRegulation.toCytoscape();
//print it for NeMo clusters analysis tool
//myRegulation.toClusterMatrix();
}
The resulting Cytoscape layout of the transcriptional regulatory network extracted from EcoCyc is shown bellow:
Bellow is a zoom on the transcriptional regulatory network extracted from EcoCyc.
Activations are representing by green edges, inhibitions are representing by blue edges. Gene are representing by square. An arrow starting from a gene indicates that the gene product is a transcriptional factor, which acts as a transcriptional factor for the targeted genes.
This is a second example. The following function extracts the metabolite regulation network.
/**
* Given an organism, this function extracts the metabolic regulation network
* Foreach enzymaticreaction, extract the metabolites that inhibits/activates the enzyme
* @param orgid
* @param keySession
* @return
*/
private static Graphml getGraphml(String orgid,String keySession){
Graphml myGraphml = null;
ObjectFactory myObjectFactory = new ObjectFactory();
Graph myGraph = null;
HashMap myNodes = new HashMap();
HashMap myEdges = new HashMap();
try
{
myGraphml = myObjectFactory.createGraphml();
myGraphml.setDesc("Hard coded desc Ecoli.metabolicRegulation.network.graphml.xml");
myGraph = myObjectFactory.createGraph();
myGraph.setId("mr");
myGraph.setParseOrder(TypeGraphOrderType.FREE);
myGraph.setEdgedefault(TypeGraphEdgedefaultType.DIRECTED);
myGraphml.getGraphOrData().add(myGraph);
Key myKeyNodeType = myObjectFactory.createKey();
myKeyNodeType.setId("NodeType");
myKeyNodeType.setFor(TypeKeyForType.NODE);
myKeyNodeType.setAttrName("nodetype");
myKeyNodeType.setAttrType(TypeKeyTypeType.STRING);
myGraphml.getKey().add(myKeyNodeType);
Key myKeyEdgeType = myObjectFactory.createKey();
myKeyEdgeType.setId("regulation");
myKeyEdgeType.setFor(TypeKeyForType.NODE);
myKeyEdgeType.setAttrName("regulationtype");
myKeyEdgeType.setAttrType(TypeKeyTypeType.STRING);
myGraphml.getKey().add(myKeyEdgeType);
EnzymaticReactionsDao cdao = new EnzymaticReactionsDao(keySession);
List myEnzymaticReactions = cdao.getListAllObjects(orgid);
String framerxn;
String myFrameActivator, myFrameInhibitor;
int i=0;
for(EnzymaticReactions myEnzymaticReaction : myEnzymaticReactions){
framerxn = ((Reaction)myEnzymaticReaction.getReaction().get(0)).getValue();
List myActivators = myEnzymaticReaction.getActivatorsAll();
for(ActivatorsAll myActivatorsAll :myActivators){
myFrameActivator = myActivatorsAll.getValue();
Node myNodeRxn = getNode(myGraph,framerxn,myNodes, myKeyNodeType, "rxn");
Node myNodeMet = getNode(myGraph,myFrameActivator,myNodes, myKeyNodeType, "metabolite");
String edgeName = myNodeMet.getId()+"_"+myNodeRxn.getId();
Edge myEdge = getEdge(myGraph,edgeName,myEdges,myKeyEdgeType,"active");
myEdge.setSource(myNodeMet);
myEdge.setTarget(myNodeRxn);
}
List myInhibitorsAlls = myEnzymaticReaction.getInhibitorsAll();
for(InhibitorsAll myInhibitorsAll :myInhibitorsAlls){
myFrameInhibitor = myInhibitorsAll.getValue();
Node myNodeRxn = getNode(myGraph,framerxn,myNodes, myKeyNodeType, "rxn");
Node myNodeMet = getNode(myGraph,myFrameInhibitor,myNodes, myKeyNodeType, "metabolite");
String edgeName = myNodeMet.getId()+"_"+myNodeRxn.getId();
Edge myEdge = getEdge(myGraph,edgeName,myEdges,myKeyEdgeType,"inhibe");
myEdge.setSource(myNodeMet);
myEdge.setTarget(myNodeRxn); }
// if(i==10){ break;}else{i++;}
}
myGraph.setParseNodes(BigInteger.valueOf(myNodes.size()));
myGraph.setParseEdges(BigInteger.valueOf(myEdges.size()));
System.out.println(myEdges.size());
} catch (JAXBException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
return myGraphml;
}
The output graphs visualized in Cytoscape are bellow.
This is the metabolite regulatory network extracted from EcoCyc representing by the
'spring' graph layout algorithm of Cytoscape. Metabolite can act as regulator of the enzyme activity: inhibition, allosteric activation ...
This is a zoom on the regulated metabolic network extracted from EcoCyc.
Metabolite and reaction are representing by node. An arrow starting from a metabolite node indicates that this metabolite regulates the targeted enzymatic reaction node by inhibition or activation.
This third example shows the combined regulatory, proteic and metabolic graph.
/**
* Example 5c
* Full Graph:
* each node can represent a gene, a reaction or a metabolite,
* each link can represents transcriptional regulation, metabolite regulation, metabolite reaction
* mySQL is required
*/
public static void TutorialEx5c(String myOrganism, int max) {
FullNetwork.completeNetwork(myOrganism, max);
}
This is the resulting combined regulatory, proteic and metabolic network extracted from EcoCyc representing by the 'circle' layout algorithm of Cytoscape.
Bellow is a zoom on the combined regulatory, proteic and metabolic network extracted from EcoCyc.
Reactions are represented by square nodes. Metabolites are represented by circle nodes and genes by diamond nodes. Blue edges represent inhibition, green edges represent activation, red edge represent negative interaction, yellow edges represent positive interaction. Finally, white diamond shape represents catalyse, black arrow represents consumption or production.
|