bound_intervals: Select intervals bounded by a genome.

Description Usage Arguments Value See Also Examples

View source: R/read_genome.r

Description

Used to remove out-of-bounds intervals, or trim interval coordinates using a genome.

Usage

1
bound_intervals(x, genome, trim = FALSE)

Arguments

x

tbl_interval()

genome

tbl_genome()

trim

adjust coordinates for out-of-bounds intervals

Value

tbl_interval()

See Also

Other utilities: bed12_to_exons, bed_makewindows, flip_strands, interval_spacing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
x <- trbl_interval(
 ~chrom, ~start, ~end,
 "chr1", -100,   500,
 "chr1", 100,    1e9,
 "chr1", 500,    1000
)

genome <- read_genome(valr_example('hg19.chrom.sizes.gz'))

# out-of-bounds are removed by default ...
bound_intervals(x, genome)

# ... or can be trimmed within the bounds of a genome
bound_intervals(x, genome, trim = TRUE)

rnabioco/valr documentation built on Jan. 6, 2019, 9:06 a.m.