setsApp: Maintaining and Manipulating Sets of Nodes and Edges
SetsApp is a Cytoscape 3 app allowing the user to create and manipulate sets of nodes or edges (but not sets with both nodes and edges, at least in the current version) in Cytoscape. Sets can be created from different networks. In order to create a set, the user must select a network (usually when a user imports a network or opens up a session there is a network selected by default), and the program will create sets of nodes or edges based on user input.
[Contents] [Top] |
1. Installation
To install SetsApp, download SetsApp at (insert website). Open Cytoscape, then select from the top menu bar Apps→Apps Manager to install it in Cytoscape.
[Contents] [Top] |
2. The "Sets" Panel
The "Sets" panel is the main graphical user interface through which the user creates, manipulates and destroys sets. It resides on the left side of the Cytoscape app and consists of four different sub-panels.
2.1 New Sets
This sub-panel allows the user to create new sets. It contains a drop-down menu with the following items:
- Create set from: selected nodes
- Create sets from selected nodes. Works the same as "Create node set"
- Create set from: selected edges
- Create sets from selected edges. Works the same as "Create edge set"
- Create set from: node attributes
- Create node sets using attributes. Works the same as "Create node set from attributes"
- Create set from: edge attributes
- Create edge sets using attributes. Works the same as "Create node set from attributes"
2.2 Sets Tree
Sets Tree is the panel right below the "New Sets" sub-panel. It displays all the sets that have been created using a JTree with a hidden root. Each set is represented by an internal node, and the child nodes represent elements in the set. The symbol of the pink circle indicates that a set or element is a node set. The symbol of two pink circles linked by a curved black line indicates that a set or element is an edge set. Right-click brings up a context menu that allows manipulation of the set or its elements.
2.2.1 Set Context Menu
- Select
- Select nodes/edges in the current network.
- Unselect
- Unselect nodes/edges in the current network.
- Remove Set
- Remove set from the current network.
- Rename Set
- Rename this set.
- Copy set to different network
- Copy this set to a different network. Will only copy the nodes/edges shared between the two networks.
2.2.2 Set Element Context Menu
- Select
- Select node/edge in the current network.
- Unselect
- Unselect node/edge in the current network.
- Copy to...
- Copy this node/edge to another set.
- Move to...
- Move this node/edge to another set
- Remove from set
- Remove this node/edge from this set.
2.3 Set Operations
The Set Operations sub-panel provides methods to manipulate two different sets in the Set Tree sub-panel. The three buttons Union, Intersection, and Difference are activated when two different sets are selected. On most operating systems, it could be done by using Ctrl-Z-Left-mouse-click. A new set is created after the operation is performed.
- Union
- Perform union of two sets.
- Intersection
- Perform intersection of two sets.
- Difference
- Perform difference of two sets.
2.4 Import/Export Sets to File
This sub-panel contains buttons for reading and writing sets to file. The file imported/exported should contain a list of names for the nodes/edges, which will be matched against identifiers in a column chosen by the user.
- Import Set From File
- Import a set from file. Allows the user to specify whether a node or edge set is created.
- Export Set to File
- Export a set to file.
[Contents] [Top] |
3. SetsApp menus
SetsApp provides two similar sets of menus, one under the Apps→SetsApp top-level menu and the other as part of the context menus accessed by mouse right-click in the Cytoscape network window, nodes or edges.
3.1 Top-level menus
- Create node set
- Create node set from selected nodes. This menu item is available only when there are selected nodes in the network.
- Create edge set
- Create edge set from selected nodes. This menu item is available only when there are selected edges in the network.
- Create node set from attributes
- Creates node sets for sets of nodes with the same attribute value.
- Create edge set from attributes
- Create edge sets for sets of edges with the same attribute value.
- Import set from file
- Creat a set from a file of nodes or edges.
3.2 Context menus
The network context menu contains two menu items that are the same as the top-level menu, Create node set and Create edge set. In addition, there are two menu items available by right-clicking on an node or edge, and choosing Apps→SetsApp:
- Add node to set
- Add a node to a selected set.
- Remove node from set
- Remove a node from a selected set.
- Add edge to set
- Add an edge to a selected set.
- Remove edge from set
- Remove an edge from a selected set.
[Contents] [Top] |
[Contents] [Top] |
4. SetsApp Commands
In order to facilitate the use of SetsApp, the SetsApp app exports a number of commands. These commands may be used by other apps, or as part of scripts.
- setsApp createSet
-
The createSet command is the command-line interface for creating node/edge sets.
To use this command, all arguments must be set, except for nodeList and edgeList which are mutually exclusive (either nodeList or edgeList can be non-null, but not both).
Arguments:
- edgeList=EdgeList: Specifies the list of edges to be used for creating an edge set. Example: edgeList="column:attribute" create an edge set where the attribute equals "attribute" in the column named "column".
- nodeList=NodeList: Specifies the list of edges to be used for creating a node set. Example: nodeList="column:attribute" create a node set where the attribute equals "attribute" in the column named "column".
- name=String: Specifies name of the new set.
- network=CyNetwork: Specifies the network from which the nodes/edges are taken to create the set. Defaults to the current network if null.
- setsApp remove
-
The remove command is the command-line interface for removing (deleting) sets. The only argument is the name
of the set to be removed.
Arguments:
- name=String: Specifies the set to be removed
- setsApp addTo
-
The addTo command is the command-line interface for adding nodes or edges to node or edge sets, respectively.
To use this command, all arguments must be set, except for nodeList and edgeList which are mutually exclusive (either nodeList or edgeList must be non-null, but not both).
Arguments:
- edgeList=EdgeList: Specifies the list of edges to be added to an edge set. Example: edgeList="column:attribute" add edges to an edge set where the attribute equals "attribute" in the column named "column".
- nodeList=NodeList: Specifies the list of edges to be added to a node set. Example: nodeList="column:attribute" add nodes to a node set where the attribute equals "attribute" in the column named "column".
- name=String: Specifies name of the set to add nodes or edges to.
- network=CyNetwork: Specifies the network from which the nodes/edges are taken to add to the set. Defaults to the current network if null.
- setsApp removeFrom
-
The removeFrom command is the command-line interface for removing nodes or edges from node or edge sets, respectively.
To use this command, all arguments must be set, except for nodeList and edgeList which are mutually exclusive (either nodeList or edgeList must be non-null, but not both).
Arguments:
- edgeList=EdgeList: Specifies the list of edges to be removed from an edge set. Example: edgeList="column:attribute" remove edges from an edge set where the attribute equals "attribute" in the column named "column".
- nodeList=NodeList: Specifies the list of edges to be removed from a node set. Example: nodeList="column:attribute" remove nodes from a node set where the attribute equals "attribute" in the column named "column".
- name=String: Specifies name of the set to remove nodes or edges from.
- network=CyNetwork: Specifies the network from which the nodes/edges are taken to remove from the set. Defaults to the current network if null.
- setsApp rename
- The rename command changes the name of a set.
style"margin-top: 5px">Arguments:
- newName=String: New name for the set.
- oldName=String: Old (current) name for the set.
- setsApp union
- The union command creates a union of two sets.
Arguments:
- set1=ListSingleSelection: First set to be selected.
- set2=ListSingleSelection: Second set to be selected.
- name=String: Specifies name of the new set.
- setsApp intersect
-
The intersect command creates a intersect of two sets.
Arguments:
- set1=ListSingleSelection: First set to be selected.
- set2=ListSingleSelection: Second set to be selected.
- name=String: Specifies name of the new set.
- setsApp difference
-
The difference command creates a difference of two sets. The difference is calculated as set1-set2.
Arguments:
- set1=ListSingleSelection: First set to be selected.
- set2=ListSingleSelection: Second set to be selected.
- name=String: Specifies name of the new set.
- setsApp import
-
Import set from file.
Arguments:
- Columns=ListSingleSelection: Column to use for choosing identifiers to create the set with.
- Type=ListSingleSelection: Create node or edge set.
- name=String: Specifies name of the new set.
- setFile=File: Specifies the file to import.
- setsApp export
-
Export set to file.
Arguments:
- column=ListSingleSelection: Column to use for exporting list of identifiers.
- name=String: Name of the file to export.
- file=File: Specifies the file to export to.
[Contents] [Top] |
About RBVI | Projects | People | Publications | Resources | Visit Us
Copyright 2018 Regents of the University of California. All rights reserved.