bed_flank: Create flanking intervals from input intervals.

Description Usage Arguments Value See Also Examples

View source: R/bed_flank.r

Description

Create flanking intervals from input intervals.

Usage

1
2
bed_flank(x, genome, both = 0, left = 0, right = 0,
  fraction = FALSE, strand = FALSE, trim = FALSE, ...)

Arguments

x

tbl_interval()

genome

tbl_genome()

both

number of bases on both sizes

left

number of bases on left side

right

number of bases on right side

fraction

define flanks based on fraction of interval length

strand

define left and right based on strand

trim

adjust coordinates for out-of-bounds intervals

...

extra arguments (not used)

Value

tbl_interval()

See Also

http://bedtools.readthedocs.org/en/latest/content/tools/flank.html

Other single set operations: bed_cluster, bed_complement, bed_merge, bed_partition, bed_shift, bed_slop

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
x <- trbl_interval(
  ~chrom, ~start, ~end,
  'chr1',      25,      50,
  'chr1',      100,     125
)

genome <- trbl_genome(
  ~chrom, ~size,
  'chr1', 130
)

bed_glyph(bed_flank(x, genome, both = 20))

x <- trbl_interval(
 ~chrom, ~start, ~end, ~name, ~score, ~strand,
 'chr1', 500,    1000, '.',   '.',    '+',
 'chr1', 1000,   1500, '.',   '.',    '-'
)

genome <- trbl_genome(
  ~chrom, ~size,
  'chr1', 5000
)

bed_flank(x, genome, left = 100)

bed_flank(x, genome, right = 100)

bed_flank(x, genome, both = 100)

bed_flank(x, genome, both = 0.5, fraction = TRUE)

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