Select Nearest Neighbors Shared By More Than One Selected Node
2
3
Entering edit mode
11.8 years ago
enricoferrero ▴ 900

Hi,

In Cytoscape it's easy to select first neighbors of selected nodes in a network. Does anybody know if there's a way to select only the first neighbors which are shared by more than one selected node (i.e. at least 2 nodes)?

Thanks!

cytoscape • 4.9k views
ADD COMMENT
1
Entering edit mode
11.8 years ago
Josh Herr 5.8k

I don't know Cytoscape very well, but I think you can use the 'firstNeighbors' command to choose the nodes and then filter out neighbors shared by only one selected node? I think the usage should be:

firstNeighbors ( nodes {node array or IDs} [ ignoreFilteredOut ] {true, false} )

Please let me know if this works as I can see myself using this too...

ADD COMMENT
0
Entering edit mode

Thanks but... hang on a second, I didn't even know there was a command line interface for Cytoscape... where am I supposed to enter that code?

Actually I was more looking for a way to do this by using the standard Cytoscape GUI. Am I missing something obvious here?

ADD REPLY
2
Entering edit mode

Sorry I don't know more to help you. I just haven't had the right data to force me to sit down and really learn Cytoscape yet. There's definitely command line integration.

The new documentation for Cytoscape 3 is now up with numerous updates this week. Perhaps the Cytoscape Discussion List would be a good place to turn. Wish I knew more to help you...

ADD REPLY
1
Entering edit mode
11.8 years ago
enricoferrero ▴ 900

Ok, it's quite easy, just a matter of setting up a couple of filters. I have used the "Old" filters (Select --> Old filters), because the new filters interface is quite cumbersome...

  1. Create an ad-hoc filter for the nodes you're interested in (in my case genes showing differential expression (DE) in a big network). This can be done by using a numerical or string filters which looks for an attribute that only the DE genes have (create such an attribute if you don't have it in the first place).
  2. Create a topology filter for nodes that have at least 2 neighbors within distance 1 that pass filter #1.
  3. Select your network and apply filter #1 and then filter #2
  4. Create a new network from the selection
  5. done, good luck!
ADD COMMENT

Login before adding your answer.

Traffic: 1978 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6