Learn R Programming

GenoView (version 1.6.0)

intSel: GRanges interval selection

Description

Truncate the range of a GRanges object

Usage

intSel(gr, new.start = NULL, new.end = NULL)

Arguments

gr
GRanges object of length 1
new.start
New start location
new.end
New end location

Value

A Granges object of length 1

Details

The start and end locations, input or user selected, create an interval which is smaller or equal to the original range of gr

Examples

Run this code
a <- GRanges(seqnames = "chr1", 
                ranges = IRanges(start = 1000, end = 5000), 
                strand = "-")
if (interactive()) {
  intSel(a)
}

b <- GRanges(seqnames = "chr2", 
                ranges = IRanges(start = 10000, end = 50000), 
                strand = "-")
intSel(gr = b, new.start = 12345, new.end = 49999)

Run the code above in your browser using DataLab