Skip to contents

Imports a CellProfiler CSV export and renames the columns to the cellreportR convention (well, x, y, area, circularity, one column per marker channel).

Usage

cr_read_cellprofiler(path)

Arguments

path

Path to CellProfiler CSV.

Value

A tibble with standardised column names.

Examples

f <- tempfile(fileext = ".csv")
utils::write.csv(
  data.frame(
    Metadata_Well = c("A01", "A01"),
    Location_Center_X = c(10, 20),
    Location_Center_Y = c(15, 25),
    AreaShape_Area = c(120, 130),
    Intensity_MeanIntensity_marker_1 = c(0.4, 0.6)
  ),
  f, row.names = FALSE
)
cr_read_cellprofiler(f)
#> # A tibble: 2 × 6
#>   cell_id well      x     y  area marker_1
#>   <chr>   <chr> <dbl> <dbl> <dbl>    <dbl>
#> 1 c000001 A01      10    15   120      0.4
#> 2 c000002 A01      20    25   130      0.6