Learn R Programming

QDNAseq (version 1.8.0)

exportBins: Exports to a file

Description

Exports to a file.

Usage

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

Arguments

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.

Examples

Run this code
## 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)

Run the code above in your browser using DataLab