Skip to contents

Writes a differential expression result data.frame to a CSV file.

Usage

bb_export_csv(de_result, path)

Arguments

de_result

A data.frame with DE results (columns: gene, log2fc, pvalue, padj, and optionally basemean).

path

Character. File path for the output .csv file.

Value

The path invisibly.

Examples

de <- data.frame(
  gene = paste0("gene", 1:5),
  log2fc = rnorm(5),
  pvalue = runif(5, 0, 0.1),
  padj = runif(5, 0, 0.1)
)
tmp <- tempfile(fileext = ".csv")
bb_export_csv(de, tmp)
#> Saved to: /tmp/Rtmp0JZi3Y/file3293679fec39.csv