Given a tibble of sample information (sample_info) with columns capture_area, group, and imagej_xml_path, expected to have one unique path to ImageJ XML output per group, read in the pixel coordinates from each capture area's tissue_positions.csv file from Spaceranger, and transform using the rotation matrix specified by ImageJ. Write one new tissue_positions.csv file per group a copy of sample_info with additional columns transform_x, transform_y, and transform_theta representing the rigid affine transforms needed to be applied to capture areas within each group to produce the proper relative arrangements.

prep_imagej_coords(sample_info, out_dir)

Arguments

sample_info

A tibble with columns capture_area, group, imagej_xml_path, intra_group_scalar, and group_hires_scalef

out_dir

A character(1) vector giving a path to a directory to place the output pixel coordinates CSVs. Provided the parent exists, out_dir will be created if necessary.

Author

Nicholas J. Eagles

Examples

if (FALSE) { # \dontrun{
#   For internal testing
sample_info <- readr::read_csv("dev/test_data/sample_info.csv")
prep_imagej_coords(sample_info, tempdir())
} # }

## TODO: add working examples
args(prep_imagej_coords)
#> function (sample_info, out_dir) 
#> NULL