The phenotype definitions may be NA, in which case the base field will be shown with any available phenotype.

nearest_neighbor_map(
  csd,
  field_name,
  view_number,
  export_path,
  phenos,
  color1,
  color2,
  show_as = c("from_to", "to_from", "mutual", "none"),
  dot_size = 3,
  add_logo = TRUE
)

Arguments

csd

Cell seg data with distance columns

field_name

Sample Name or Annotation ID to map

view_number

Image index within the composite data

export_path

Path to a directory containing composite and component image files from inForm

phenos

Named list of phenotype definitions. Must have length 2.

color1, color2

Colors to draw the phenotype dots

show_as

Which nearest neighbors should be shown?

dot_size

Size of the dots used to show phenotypes

add_logo

Show the Akoya logo in the image?

Value

Returns a list containing two items:

plot

The plot, a ggplot object.

data

A tibble containing the data used to create the line segments in the plot, or NULL if show_as is "none".