cnv2igv: Export CNV Segments for IGV Viewing

Description Usage Arguments Value Examples

View source: R/igv.R

Description

Exports an object of class cnv to a bedgraph file for viewing in IGV as bars.

Usage

1
2
3
4
5
6
7
8
cnv2igv(
  cnv,
  out_file = NULL,
  track_name = "cnv_segs",
  col1 = "darkgreen",
  col2 = "red",
  autoscale = "on"
)

Arguments

cnv

Either a BED file with chrom, start, end and tot_cn columns, or a cnv object.

out_file

Path to write output to. Needs to have a bedgraph suffix.

track_name

Name of track to appear in IGV (default: "cnv_segs").

col1

Colour name for amplifications (default: darkgreen).

col2

Colour name for deletions (default: red).

autoscale

With autoscaling on, IGV automatically adjusts the plot Y scale to the data range currently in view. As the user pans and moves, this scaling continually adjusts. Available options: on, off (default: on).

Value

Invisible list with the modified cnv object and the track header, where:

Examples

1
2
3
4
5
6
## Not run: 
cn_fname <- system.file("extdata", "HCC2218_purple.cnv.tsv", package = "pebbles")
cnv <- prep_purple_seg(cn_fname)
cnv2igv(cnv, out_file = "~/Desktop/tmp/cnv_segs4igv.bedgraph")

## End(Not run)

pdiakumis/rock documentation built on Oct. 12, 2020, 9:38 a.m.