Report the results in an Excel workbook in the same directory as csd_path.

mean_of_top_and_bottom_cells(
  csd_path = NULL,
  expression_cols,
  top_count = 20,
  bottom_percentile = 0.1,
  adjacent_max = 3,
  tissue_categories = NULL,
  .by = "Slide ID",
  out_path = NULL
)

Arguments

csd_path

Path to a merged cell seg data, or NULL. If NULL, a file chooser is opened to allow file selection.

expression_cols

Vector of column names to report.

top_count

The number of top-expressing cells to select for averaging.

bottom_percentile

The cutoff for the bottom percentile cells.

adjacent_max

The maximum ratio between expression of adjacent fluors

tissue_categories

Tissue categories to include, or NULL for all

.by

The column to aggregate by

out_path

The path to the output file; if NULL, a date-stamped file will be written to the same directory as csd_path.

Value

The path to the generated file.