Skip to contents

Show method for CellGraph object

Usage

# S4 method for CellGraph
show(object)

Arguments

object

A CellGraph object

Examples


library(pixelatorR)
library(dplyr)
library(tidygraph)

edge_list <-
ReadMPX_item(
  system.file("extdata/five_cells",
              "five_cells.pxl",
              package = "pixelatorR"),
  items = "edgelist"
)
bipart_graph <-
  edge_list %>%
  select(upia, upib, marker) %>%
  distinct() %>%
  as_tbl_graph(directed = FALSE) %>%
  mutate(node_type = case_when(name %in% edge_list$upia ~ "A", TRUE ~ "B"))
attr(bipart_graph, "type") <- "bipartite"

cg <- CreateCellGraphObject(cellgraph = bipart_graph)

# Show method
cg
#> A CellGraph object containing a bipartite graph with 16800 nodes and 68255 edges