getNodeSize: getNodeSize

Description Usage Arguments Value Author(s) See Also Examples

Description

Get the size of the specified nodes on the CytoscapeWindow canvas.

Usage

1
getNodeSize(obj, node.names)

Arguments

obj

a CytoscapeWindowClass object.

node.names

a list of strings, the names of nodes to select.

Value

A named list containing two equal-lengthed vectors, width and height. Unless node dimensions are 'unlocked' these two vectors will be identical.

Author(s)

Tanja Muetze, Georgi Kolishovski, Paul Shannon

See Also

setNodeSizeRule, setNodeSizeDirect, lockNodeDimensions

Examples

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

  cw <- CytoscapeWindow ('getNodeSize.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw)
  sizes <- getNodeSize (cw, c ('A', 'B', 'C'))
  print (sizes$width)
    # [1] 75 75 75
  print (sizes$height)
    # [1] 35 35 35
  setNodeSizeDirect (cw, 'A',  18)
  redraw (cw)
  print (getNodeSize (cw, 'A'))
  # lockNodeDimensions (cw, FALSE) # not required anymore
  setNodeWidthDirect (cw, 'A', 30)
  setNodeHeightDirect (cw, 'A', 10)
  redraw (cw) # not required anymore
  sizes <- getNodeSize (cw, 'A')
  print (sizes$width)
  print (sizes$height)
  # lockNodeDimensions (cw, TRUE) # not required anymore
  setNodeSizeDirect (cw, 'A', 80)
  redraw (cw) # not required anymore
  print (getNodeSize (cw, 'A'))

## End(Not run)

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