segToGr: Import a segmentation file into GRanges object

View source: R/segToGr.R

segToGrR Documentation

Import a segmentation file into GRanges object

Description

Reverse of grToSeg

Usage

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

   A GRanges object

See Also

grToSeg

Examples


  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")


trichelab/biscuiteer documentation built on March 4, 2024, 12:22 a.m.