tessellation: Cell space tessellation into hexagonal sub-regions

Description Usage Arguments Value

View source: R/tessellation.R

Description

Sub-dividing 2D cell space into hexogonal sub-regions and counting the number of immune cell, tumor cell, and stromal cell in each sub-region.

Usage

1
2
3
4
5
6
tessellation(
  cell_data = NULL,
  hex_len = 100,
  output_dir = NULL,
  plot_flag = FALSE
)

Arguments

cell_data

A data.frame of cell data of size rxc; r = total cells across all tumors and cores, 5 columns named as 'Phenotype', 'X', 'Y', 'tumor_ids', 'core_ids'. NOTE. 'tumor_ids' & 'core_ids' contain no-space and no underscore

hex_len

An integer of hexagonal length.

output_dir

A directory path for results saving.

plot_flag

A boolean for plotting option of cell image.

Value

A list contain all 5 directional sub-region count of 6 TIPC category saved in output_dir.


MPE-Lab/TIPC documentation built on Sept. 17, 2021, 6:33 p.m.