In cytoscape, how to filter all nodes and edges directly or indirectly connected with 2 certain nodes?
Entering edit mode
4.0 years ago
Yingzi Zhang ▴ 90

Dear all, I have about 5k pairs of genes, predicted to have interactions from STRING website. The data structure I got from STRING is like this:

#node1  node2   node1_string_internal_id    node2_string_internal_id    node1_external_id   node2_external_id   neighborhood_on_chromosome  gene_fusion phylogenetic_cooccurrence   homology    coexpression    experimentally_determined_interaction   database_annotated  automated_textmining    combined_score
UPF3B   CASC3   4436211 4435465 9606.ENSP00000276201    9606.ENSP00000264645    0   0   0   0   0.062   0.993   0.900   0.808   0.999
SNRPF   SNRPA   4435728 4433858 9606.ENSP00000266735    9606.ENSP00000243563    0   0   0   0   0.600   0.975   0.900   0.191   0.999

I want to use Cytoscape to visualize their network. After importing the data, the original network is like the following:

Network example figure

I only want all the nodes directly or indirectly connected with both gene A and gene B. So in this example, I only want gene A, B, C, E and F. Gene H, I and G are not wanted. Is there any existing tool or function in Cytoscape to realize it? Or do I need to write scripts to do the filtering? (I guess it will be very difficult and evolve lots of algorithms.

Thank you in advance.

Best, Yingzi

cytoscape • 1.5k views
Entering edit mode
4.0 years ago
scooter ▴ 620

Hi Yingzi, I have a couple of answers for you. First, you could just use the stringApp from within Cytoscape and provide it with genes A and B and you'll get exactly the network you want. However, if you want to use text file you downloaded from string-db, you could also load the entire network in Cytoscape, select gene A and gene B (either manually or using the filter tab) then select the first neighbors of those two nodes (Select->Nodes->First neighbors of selected nodes->Undirected). Now, you have all of the genes you are interested selected. Next, do a File->New Network->Selected Nodes, All Edges . That will create a network with only your selected nodes and the edges between them.

-- scooter


Login before adding your answer.

Traffic: 1925 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6