Question: Select Nearest Neighbors Shared By More Than One Selected Node
3
gravatar for enricoferrero
8.4 years ago by
enricoferrero800
United Kingdom
enricoferrero800 wrote:

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 • 3.2k views
ADD COMMENTlink modified 5.5 years ago by Biostar ♦♦ 20 • written 8.4 years ago by enricoferrero800
1
gravatar for Josh Herr
8.4 years ago by
Josh Herr5.7k
University of Nebraska
Josh Herr5.7k wrote:

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 COMMENTlink written 8.4 years ago by Josh Herr5.7k

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 REPLYlink written 8.4 years ago by enricoferrero800
2

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 REPLYlink modified 8.4 years ago • written 8.4 years ago by Josh Herr5.7k
1
gravatar for enricoferrero
8.4 years ago by
enricoferrero800
United Kingdom
enricoferrero800 wrote:

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 COMMENTlink written 8.4 years ago by enricoferrero800
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2059 users visited in the last hour