export: Export

exportR Documentation

Export

Description

Export

Usage

export(object, con, format, ...)

## S4 method for signature 'DESeqAnalysis,character,missingOrNULL'
export(
  object,
  con,
  format,
  compress = getOption(x = "acid.export.compress", default = FALSE),
  overwrite = getOption(x = "acid.overwrite", default = TRUE),
  quiet = getOption(x = "acid.quiet", default = FALSE)
)

## S4 method for signature 'DESeqAnalysis,missingOrNULL,missingOrNULL'
export(object, con, format, name = NULL, dir, ...)

## S4 method for signature 'DESeqDataSet,character,missingOrNULL'
export(
  object,
  con,
  format,
  compress = getOption(x = "acid.export.compress", default = FALSE),
  overwrite = getOption(x = "acid.overwrite", default = TRUE),
  quiet = getOption(x = "acid.quiet", default = FALSE)
)

## S4 method for signature 'DESeqDataSet,missingOrNULL,missingOrNULL'
export(object, con, format, name = NULL, dir, ...)

Arguments

object

Object. An object supporting dim(), or a supported class capable of being coerced to data.frame, to be written to disk.

con

character(1), missing, or NULL. File path. Alternatively, can leave unset and use ext and dir arguments instead.

format

character(1), missing, or NULL. Output file format extension.

compress

logical(1). Apply gzip compression to all files.

overwrite

logical(1). Overwrite existing file on disk.

quiet

logical(1). Perform command quietly, suppressing messages.

name

character(1). Name to use on disk. If NULL, will use the name of the object instead.

dir

character(1). Directory path.

...

Additional arguments.

Details

Size-factor normalized coutns and FPKM values are calculated on the fly and exported automatically.

Value

Invisible character. File path(s).

Output file format extension

matrix supported arguments:

  • Comma separated values (CSV): "csv", "csv.bz2", "csv.gz", "csv.xz", "csv.zip".

  • Tab separated values (TSV): "tsv", "tsv.bz2", "tsv.gz", "tsv.xz", "tsv.zip".

Matrix (sparseMatrix) supported arguments:

  • MatrixMarket exchange (MTX): "mtx", "mtx.bz2", "mtx.gz", "mtx.xz", "mtx.zip".

Row names

Some export utilities in R have a tendency to drop row names when writing to disk in CSV format. For example, the readr family of functions never write row names by design. This is a really poor default setting for handling genomic data, which often contain gene identifiers in the row names. Here we're performing any internal tibble coercion step to ensure row names are always moved to a "rowname" column in the CSV export.

Debugging

Note that this function currently wraps readr::write_delim() by default for exporting DataFrame, data.frame, and matrix class objects.

Note

Updated 2022-05-17.

See Also

Packages:

Export functions:

  • BiocIO::export().

  • data.table::fwrite().

  • readr::write_delim().

  • rio::export().

  • rtracklayer::export().

  • vroom::vroom_write().

Examples

data(deseq)

## DESeqAnalysis ====
con <- AcidBase::tempdir2()
x <- export(deseq, con = con)
print(x)
AcidBase::unlink2(con)

steinbaugh/DESeqAnalysis documentation built on June 25, 2022, 7:29 a.m.