exportBins {QDNAseq} | R Documentation

## Exports to a file

### Description

Exports to a file.

### Usage

    exportBins(object, file, format=c("tsv", "igv", "bed", "vcf", "seg"),
      type=c("copynumber", "segments", "calls"), filter=TRUE, logTransform=TRUE, digits=3,
      chromosomeReplacements=c(`23` = "X", `24` = "Y", `25` = "MT"), ...)

### Arguments

`object` | A `QDNAseqReadCounts` or `QDNAseqCopyNumbers` object.
`file` | Filename. For formats that support only one sample per file, such as BED, '%s' can be used as a placeholder for sample name or '%d' for sample number.
`format` | Format to export in. Currently supported ones are "tsv" (tab separated values), "igv" (Integrative Genomics Viewer), and "bed" (BED file format).
`type` | Type of data to export, options are "copynumber" (corrected or uncorrected read counts), "segments", or "calls".
`filter` | If `TRUE`, bins are filtered, otherwise not.
`logTransform` | If `TRUE` (default), data will be log2-transformed.
`digits` | The number of digits to round to. If not `numeric`, no no rounding is performed.
`chromosomeReplacements` | A named character vector of chromosome name replacements to be done. Only used when `object` is of class `cghRaw`, `cghSeg`, `cghCall`, or `cghRegions`, since these classes store chromosome names as integers, whereas all QDNAseq object types use character vectors. Defaults to `c("23"="X", "24"="Y", "25"="MT")` for human.
`...` | Additional arguments passed to `write.table`.

### Details

Exports `object` to a file.

### Author(s)

Ilari Scheinin

### Examples

    ## Not run:
    data(LGG150)
    readCounts <- LGG150
    readCountsFiltered <- applyFilters(readCounts)
    readCountsFiltered <- estimateCorrection(readCountsFiltered)
    copyNumbers <- correctBins(readCountsFiltered)
    copyNumbersNormalized <- normalizeBins(copyNumbers)
    copyNumbersSmooth <- smoothOutlierBins(copyNumbersNormalized)
    exportBins(copyNumbersSmooth, file="LGG150.igv", format="igv")

    ## End(Not run)

[Package QDNAseq version 1.26.0 Index]