Hi Srikanth,
I'm new to cytoscape and I'm trying to build a ceRNA network app for cytoscape.
In my app, I read 7 files from user about mRNA, circRNA, lncRNA and miRNA's expression data and their interactions.
I did some work on files and now I hava all nodes and edges needed for my ceRNA network.
I need different shapes for each mRNA, circRNA, miRNA and lncRNA nodes.
now I have problem for creating nodes, edges and finally my network.
How can I create nodes and edges in cytoscape app (depend on user input file, I have many nodes and edges)?
Can you please help me or introduce some documentation or sample codes?
Thank you,
Javad
On Thursday, February 16, 2017 at 11:22:03 PM UTC+3:30 srikanth.5283 wrote:
Hi Sachin,
You can try this.
CyNetworkView netView; // Get CyNetworkView
List<CyNode> proteinNodes; // Fill this list with protein nodes
List<CyNode> rnaNodes; // Fill with rna nodes
List<CyNode> nodeList; // all the nodes in the current network
for(CyNode node : nodeList) {
if(rnaNodes.contains(node)) {
netView.getNodeView(node).setVisualProperty(BasicVisualLexicon.NODE_FILL_COLOR, Color.ORANGE);
netView.getNodeView(node).setVisualProperty(BasicVisualLexicon.NODE_SHAPE, NodeShapeVisualProperty.OCTAGON);
}
}
// Similarly for edges, as given below
// netView.getEdgeView(edge).setVisualProperty(BasicVisualLexicon.EDGE_STROKE_UNSELECTED_PAINT, Color.ORANGE);