UpdateNodeSize: Update nodesize of FlowSOM object

Description Usage Arguments Value See Also Examples

View source: R/3_buildMST.R

Description

Add size property to the graph based on cellcount for each node

Usage

1
2
3
4
5
6
7
8
9
UpdateNodeSize(
  fsom,
  count = NULL,
  reset = FALSE,
  transform = sqrt,
  maxNodeSize = 15,
  shift = 0,
  scale = NULL
)

Arguments

fsom

FlowSOM object, as generated by BuildMST

count

Absolute cell count of the sample

reset

Logical. If TRUE, all nodes get the same size

transform

Transformation function. Use e.g. square root to let counts correspond with area of node instead of radius

maxNodeSize

Maximum node size after rescaling. Default: 15

shift

Shift of the counts, defaults to 0

scale

Scaling of the counts, defaults to the maximum of the value minus the shift. With shift and scale set as default, the largest node will be maxNodesize and an empty node will have size 0

Value

Updated FlowSOM object

See Also

BuildMST

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Read from file, build self-organizing map and minimal spanning tree
fileName <- system.file("extdata", "68983.fcs", package="FlowSOM")
flowSOM.res <- ReadInput(fileName, compensate=TRUE,transform=TRUE,
                        scale=TRUE)
flowSOM.res <- BuildSOM(flowSOM.res,colsToUse=c(9,12,14:18))
flowSOM.res <- BuildMST(flowSOM.res)

# Give all nodes same size
flowSOM.res <- UpdateNodeSize(flowSOM.res,reset=TRUE)
PlotStars(flowSOM.res)

# Node sizes relative to amount of cells assigned to the node
flowSOM.res <- UpdateNodeSize(flowSOM.res)
PlotStars(flowSOM.res)

FlowSOM documentation built on Nov. 8, 2020, 6:40 p.m.