exportBins: Exports to a file

View source: R/exportBins.R

exportBinsR 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), exported data will be log2 transformed for format in "tsv", "igv", and "bed". This argument is ignored if type = "calls".

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.

Value

Returns the pathnames of the files written.

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)

ccagc/QDNAseq documentation built on July 28, 2024, 3:46 p.m.