Skip to contents

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

Usage

cr_read_cellprofiler(path)

Arguments

path

Path to CellProfiler CSV.

Value

A tibble with standardised column names.

Examples

d <- tempfile("cr_cp_"); dir.create(d)
files <- cr_example_files(d)
cp <- cr_read_cellprofiler(file.path(d, "cells_cellprofiler.csv"))
head(cp)
#> # A tibble: 6 × 10
#>   cell_id well      x     y  area circularity  DAPI marker_1 marker_2 marker_3
#>   <chr>   <chr> <dbl> <dbl> <dbl>       <dbl> <dbl>    <dbl>    <dbl>    <dbl>
#> 1 c000001 A01   1283. 1133.  99.1       0.518  521.     951.     831.     203.
#> 2 c000002 A01   1038. 1699.  76.4       0.770  587.    2563.     643.     221.
#> 3 c000003 A01   1473.  379.  53.5       0.934  750.    1283.     897.     441.
#> 4 c000004 A01    269.  543.  80.9       0.856  396.    2469.     874.     489.
#> 5 c000005 A01   1314. 1656.  66.0       0.886  728.    1116.     715.     487.
#> 6 c000006 A01   1410. 1386. 119.        0.802  545.    1377.     494.     170.