Skip to contents

Get a NN-network from a Giotto object

Usage

getNearestNetwork(
  gobject,
  spat_unit = NULL,
  feat_type = NULL,
  nn_type = NULL,
  name = NULL,
  output = c("nnNetObj", "igraph", "data.table"),
  set_defaults = TRUE
)

Arguments

gobject

giotto object

spat_unit

spatial unit (e.g. "cell")

feat_type

feature type (e.g. "rna", "dna", "protein")

nn_type

"kNN" or "sNN"

name

name of NN network to be used

output

return a igraph or data.table object. Default 'igraph'

set_defaults

set default spat_unit and feat_type. Change to FALSE only when expression and spat_info are not expected to exist.

Value

igraph or data.table object