Skip to contents

MakeSummaryTable takes in a QDNAseq CN-object and returns tables containing agglomerated RCN gain/loss information across the provided samples.
Prior to summarizing the gains/losses, the function applies a log2 transformation to center the data at 0.
Optionally it also writes out a TSV table containing the summary.

Usage

MakeSummaryTable(
  CNobj,
  lowT,
  highT,
  pL = 0.1,
  pG = 0.1,
  prop = 0.5,
  find_peaks = FALSE,
  snames = FALSE,
  ref_genome = "hg19",
  save_path = FALSE
)

Arguments

CNobj

An S4 object of type QDNAseqCopyNumbers. This object must contain slots for:
copynumber, segmented (standard CN slots)
probgain, probdloss, probamp, probnorm, calls, probloss (from running CGHcall)

lowT

Numeric (negative). Ignore gains/losses between this value and 0. ex. -0.1
This parameter helps filter out noise.

highT

Numeric (positive). Ignore gains/losses between this value and 0. ex. 0.1
This parameter helps filter out noise.

pL

(optional) Numeric. A probability threshold (between 0 and 1). Mask loss events where the probability does not rise to this threshold.

pG

(optional) Numeric. A probability threshold (between 0 and 1). Mask gain events where the probability does not rise to this threshold.

prop

(optional) Numeric. A proportion threshold (between 0 and 1). Exclude gain/loss events that occur in less than this proportion of samples.

find_peaks

(optional) Logical. If TRUE, returns a table of peaks found in the summarized data.

snames

(optional) Character vector. A vector of sample IDs that are of interest.

ref_genome

(optional) String. The reference genome used for alignment.
Options: 'hg19', 'hg38', and 'mm10'

save_path

(optional) String. A path (directory) to where segment tables should be saved. ex. '~/Documents/test_project'.

Value

A list of data frames. Always the summary_table, optionally a peaks data frame.