A Shennong wrapper around rio::export() with support for common
single-cell formats such as BPCells, .h5ad, and 10x .h5.
This adapter is exported so rio can dispatch to it.
Usage
sn_write(x, path = NULL, to = NULL, ...)
.export.rio_bpcells(file, x, overwrite = FALSE, ...)
.export.rio_h5ad(file, x, mode = "w", ...)
.export.rio_h5(file, x, ...)Arguments
- x
Object to write.
- path
Output path.
- to
Optional format override when it cannot be inferred from
path.- ...
Additional arguments forwarded to the underlying exporter.
- file
Output path used by the exported
rioadapter methods.- overwrite
Logical; overwrite an existing BPCells directory.
- mode
File mode passed through to
anndataR::write_h5ad().
Examples
tmp <- tempfile(fileext = ".csv")
sn_write(mtcars[1:3, 1:3], tmp)