Supports both bulk and single-cell RNA-seq count matrices. Bulk RNA-seq counts are written to disk as comma separated values (".CSV"). Single-cell RNA-seq counts are written to disk in MatrixMarket format (".MTX"), along with the sample barcodes (".COLNAMES"), and gene identifiers (".ROWNAMES").

writeCounts(..., dir = getOption("acid.export.dir", default = "."),
  compress = getOption("acid.export.compress", default = FALSE))

Arguments

...

Symbols. Unquoted object names containing count matrices.

dir

character(1). Output directory.

compress

logical(1). Compress the files using gzip.

Value

Invisible list. File paths.

Details

Automatic gzip compression is offered as a user-defined option. This setting is enabled by default to save disk space. Note that the readr package, built into RStudio, now natively supports compressed files.

Note

This function is desired for interactive use and interprets object names using non-standard evaluation.

Examples

counts <- matrix(data = seq_len(100L), nrow = 10) writeCounts(counts, dir = "example")
#> Writing counts to /home/mike/acidbase/packages/brio/docs/reference/example.
#> Exported counts.csv.
## Clean up. unlink("example", recursive = TRUE)