Skip to contents

Function to export the bins of a QDNAseq object to a wide dataframe. Can be any of the "copynumber", "segments", or "calls" slots. Unlike the similar function 'exportBins' in the QDNAseq package it does not log-normalize.

Usage

ExportBinsQDNAObj(
  object,
  type = c("copynumber", "segments", "calls"),
  filter = TRUE,
  digits = 3,
  chromosomeReplacements = c(`23` = "X", `24` = "Y", `25` = "MT"),
  ...
)

Arguments

object

QDNAseq Object containing the copy number segments in long format with columns:
chr sample_id segVal

type

character Type of data to export, options are "copynumber" (corrected or uncorrected read counts), "segments", or "calls".

filter

logical If @TRUE, bins are filtered, otherwise not.

digits

numeric The number of digits to round to.

chromosomeReplacements

named char vector 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.

Value

A wide dataframe containing a column for each sample_id as well as 4 additional columns:
feature, chromosome, start, end