getAllNodeAttributes: getAllNodeAttributes

Description Usage Arguments Value Author(s) See Also Examples

Description

Create a data frame with all the node attributes for the graph contained by the supplied CytoscapeWindow object. Only the local copy of the graph is queried. If you want all the (possibly different) node attributes from the Cytoscape network which corresponds to this graph, one option is to create a new CytoscapeWindow; see the existing.CytoscapeWindow function.

Usage

1
getAllNodeAttributes(obj, onlySelectedNodes=FALSE)

Arguments

obj

a CytoscapeWindowClass object object.

onlySelectedNodes

a logical variable, used to restrict the query.

Value

A data frame, with a column for each attribute, a row for each node.

Author(s)

Tanja Muetze, Georgi Kolishovski, Paul Shannon

See Also

getNodeAttribute deleteNodeAttribute

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  ## Not run: 
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())

  window.name <- 'demo.getAllNodeAttributes'
  cw <- CytoscapeWindow (window.name, graph=makeSimpleGraph ())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork (cw, 'force-directed')
    # get all attributes for all nodes
  tbl.noa <- getAllNodeAttributes (cw, onlySelectedNodes=FALSE)
  tbl.noa
  #                   type lfc  label count
  # A               kinase  -3 Gene A     2
  # B transcription factor   0 Gene B    30
  # C         glycoprotein   3 Gene C   100
  
  selectNodes (cw, 'A')
  getAllNodeAttributes (cw, TRUE)
  #     type lfc  label count
  # A kinase  -3 Gene A     2

## End(Not run)

tmuetze/Bioconductor_RCy3_the_new_RCytoscape documentation built on May 31, 2019, 4:39 p.m.