Skip to contents

Reads per-cell measurements from CSV, TSV, Excel, RDS or FCS formats. The format is auto-detected from the file extension unless format is given explicitly.

Usage

cr_read_cells(path, format = NULL)

Arguments

path

Path to file.

format

Optional format string: one of "csv", "tsv", "xlsx", "rds", "fcs". If NULL, inferred from file extension.

Value

A tibble of cell measurements.

Examples

f <- tempfile(fileext = ".csv")
utils::write.csv(
  data.frame(cell_id = "c1", well = "A01", target_signal = 12),
  f, row.names = FALSE
)
cr_read_cells(f)
#> # A tibble: 1 × 3
#>   cell_id well  target_signal
#>   <chr>   <chr>         <dbl>
#> 1 c1      A01              12