segToGr: Import a segmentation file into GRanges object

Description Usage Arguments Value See Also Examples

View source: R/segToGr.R

Description

Reverse of grToSeg

Usage

1
segToGr(seg, genome = "hg19", name = "ID", score = "seg.mean")

Arguments

seg

The .seg filename

genome

Genome against which segments were annotated (DEFAULT: "hg19")

name

.seg file column to use as $name metadata (DEFAULT: "ID")

score

.seg file column to use as $score metadata (DEFAULT: "seg.mean")

Value

1
   A GRanges object

See Also

grToSeg

Examples

1
2
3
4
5
6
7
  clock <- getClock(model="horvathshrunk", genome="hg38")
  gr <- clock$gr

  df <- grToSeg(gr = gr, file = "test_grToSeg.seg")
  segs <- segToGr("test_grToSeg.seg", genome="hg38")

  if (file.exists("test_grToSeg.seg")) file.remove("test_grToSeg.seg")

biscuiteer documentation built on Nov. 8, 2020, 8:28 p.m.