nearest_neighbor_map: Make a nearest neighbor map for a single field

Description Usage Arguments Value

View source: R/spatial_maps.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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".


akoyabio/phenoptrReports documentation built on Jan. 17, 2022, 6:22 p.m.