fg_set_layout: Determines cell hierarchy layout.

View source: R/00_graph.R

fg_set_layoutR Documentation

Determines cell hierarchy layout.

Description

Determines cell hierarchy layout and returns the X, Y coordinate of each cell population. This function is a wrapper for set_layout_graph.

Usage

fg_set_layout(fg, layout_fun = "layout.reingold.tilford")

Arguments

fg

flowGraph object.

layout_fun

A string version of a function name from the igraph package that indicates what layout should be used if a cell hierarchy is to be ploted; all such functions have prefix layout_ e.g. layout_fun="layout.reingold.tilford".

Details

Given a flowGraph object, modifies the graph slot such that it contains X, Y axes for each node in accordance to a user specified layout.

Value

flowGraph object with coordinate meta data on cell populations and edges for plotting use.

Examples


   no_cores <- 1
   data(fg_data_pos30)
   fg <- flowGraph(fg_data_pos30$count, class=fg_data_pos30$meta$class,
                                   prop=FALSE, specenr=FALSE,
                                   no_cores=no_cores)

   fg <- fg_set_layout(fg)
   head(fg_get_graph(fg)$v)


aya49/flowGraph documentation built on Feb. 4, 2024, 6:40 p.m.