sv.model.view: Integrated visualization of SVs and CNVs in local genomic...

Description Usage Arguments Value Examples

View source: R/sv.model.view.r

Description

Integrated visualization of SVs and CNVs in local genomic regions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
sv.model.view(
  svc,
  cnv,
  chr,
  start,
  stop,
  sampleids = NULL,
  cnvlim = c(-2, 2),
  addlegend = "both",
  cex.legend = 1,
  interval = NULL,
  addtext = NULL,
  cex.text = 0.8,
  plot = TRUE,
  summary = TRUE,
  ...
)

Arguments

svc

(S4) an object of class svcnvio containing data type 'svc' validated by validate.svc

cnv

(S4) an object of class svcnvio containing data type 'cnv' validated by validate.cnv

chr

(character) chromosome (e.g. chr9)

start

(numeric) genomic coordinate from specified chromosome to start plotting

stop

(numeric) genomic coordinate from specified chromosome to stop plotting

sampleids

(character) vector containing list of samples to include in plot. if set to NULL, all samples in the input will be used

cnvlim

(numeric) limits for color coding of background CNV log-ratios. Use to modify the CNV color contrast at different levels.

addlegend

(character) one of 'sv' (show SV type legend), 'cnv' (show CNV background color legend) or 'both'.

cex.legend

(numeric) the cex values for each legend

addtext

(character) a vector indicating what SV types should include text labels indicating breakpoint partners' genomic locations. The added labels are breakpoint locations outside the plot area. (e.g. c("TRA","INV") )

cex.text

(numeric) the cex value for text

plot

(logic) whether to produce a graphical output

summary

(logic) whether the function shoud return CNV segment 'segbrk' and SV 'svbrk' breakpoints tabular output

...

additional plot parameters from graphics plot function

Value

a data.frame with CNV and SVN breakpoint annotations and/or plot into open device

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot()

## validate input data.frames
cnv <- validate.cnv(segdat_lung_ccle)
svc <- validate.svc(svdat_lung_ccle)

# obtain the coordinates of a desired genomic regionbased on a known gene locus 
df <- gene.track.view(symbol = "PTPRD", plot=FALSE)$df
start <- min(df$txStart) - 150000;
stop <- max(df$txEnd) + 50000;
chr <- df$chrom[1]

sv.model.view(svc, cnv, chr, start, stop,addlegend = TRUE, addtext=c("TRA"))

gonzolgarcia/svcnvplus documentation built on March 4, 2020, 6:02 p.m.