exportBins: Exports to a file

Description Usage Arguments Details Author(s) Examples

View source: R/exportBins.R

Description

Exports to a file.

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

Example output

38,819	total bins
38,819	of which in selected chromosomes
36,722	of which with reference sequence
33,347	final bins
Calculating correction for GC content and mappability
    Calculating fit for sample LGG150 (1 of 1) ...
Done.
Applying median normalization ...
Smoothing outliers ...

QDNAseq documentation built on Nov. 8, 2020, 6:57 p.m.