annotate: Add plate and well metadata.

View source: R/annotate.R

annotateR Documentation

Add plate and well metadata.

Description

annotate adds plate and well metadata, as well as optional external metadata. It assumes the following files exist:

  • <workspace_dir>/metadata/<batch_id>/barcode_platemap.csv which maps the plate barcodes to the corresponding platemaps,

  • For each platemap, a file <workspace_dir>/metadata/<batch_id>/platemap/<plate_map_name>.txt which contains the metadata for each well position

Additional metadata can be appended to the output file via the optional external_metadata parameter. external_metadata is a CSV file. The following columns are required:

  • Metadata_Plate

  • Metadata_Well

The Metadata_ prefix can be dropped from required columns if the remaining metadata columns aren't also prefixed by Metadata_.

Usage

annotate(
  batch_id,
  plate_id,
  cell_id = NULL,
  external_metadata = NULL,
  format_broad_cmap = FALSE,
  output = NULL,
  perturbation_mode = "chemical",
  workspace_dir = "."
)

Arguments

batch_id

Batch ID.

plate_id

Plate ID.

cell_id

Optional cell ID. default: NULL.

external_metadata

Optional external metadata to join with, as a CSV file. default: NULL.

format_broad_cmap

Add columns for compatibility with Broad CMap naming conventions. default: FALSE.

output

Output file (.CSV) for annotated data. If NULL, writes to workspace_dir/backend/batch_id/plate_id/plate_id_augmented.csv. default: NULL.

perturbation_mode

Perturbation mode. Must be one of "chemical" or "genetic". default: "chemical".

workspace_dir

Root directory containing backend and metadata subdirectories. Can be relative or absolute. default: ".".


cytomining/cytotools documentation built on Sept. 18, 2024, 11:58 p.m.