dba.save {DiffBind} | R Documentation

## save DBA object

### Description

Writes out DBA object

### Usage

    dba.save(DBA, file='DBA', dir='.', pre='dba_', ext='RData',
             bRemoveAnalysis=FALSE, bRemoveBackground=FALSE,
             bCompress=FALSE)

### Arguments

`DBA` | DBA object

`file` | main filename
`dir` | directory to save model in
`pre` | string to pre-pend to filename
`ext` | extensions to use
`bRemoveAnalysis` | if `TRUE`, will remove the global `DESeq2` and/or `edgeR` analysis objects. The analysis results will be retained. If the analysis objects are required after re-loading, they will be automatically re-generated.
`bRemoveBackground` | if `TRUE`, will remove the global binned background counts used for normalization. Any normalization factors calculated using these counts will be retained. If the the normalization factors need to be re-re-calculated after re-loading, the binned background counts will be automatically re-generated.
`bCompress` | logical indicating saved DBA object should be compressed as much as possible.

### Value

string containing full path and filename.

### Author(s)

Rory Stark

### See Also

`dba.load`

### Examples

    ## Not run:
    data(tamoxifen_peaks)
    savefile <- dba.save(tamoxifen,'tamoxifenPeaks')
    savefile
    rm(tamoxifen)
    tamoxifen <- dba.load('tamoxifenPeaks')
    unlink(savefile)

    ## End(Not run)

[Package DiffBind version 3.0.15 Index]