oneRegionSegment: Segmentation based on one region

View source: R/bootHelper.R

oneRegionSegmentR Documentation

Segmentation based on one region

Description

This function makes a segmentation (GRanges) based on one region of one chromosome (seqnames).

Usage

oneRegionSegment(x, seqlength)

Arguments

x

a single region as GRanges object

seqlength

optional, the length of the chromosome, if not provided, the function will attempt to pull this using genome(x) and the Seqinfo function

Value

a segmentation (GRanges object) with the region of interest designated as state 2, and the rest of the chromosome as state 1.

Examples


library(GenomicRanges)
library(GenomeInfoDb)
x <- GRanges("chr1", IRanges(10e6+1,width=1e6))
genome(x) <- "hg19"
seg <- oneRegionSegment(x)


nullranges/nullranges documentation built on Aug. 29, 2023, 12:13 a.m.