bed_complement: Identify intervals in a genome not covered by a query.

Description Usage Arguments Value See Also Examples

View source: R/bed_complement.r

Description

Identify intervals in a genome not covered by a query.

Usage

1
bed_complement(x, genome)

Arguments

x

tbl_interval()

genome

tbl_genome()

Value

tbl_interval()

See Also

Other single set operations: bed_cluster, bed_flank, 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', 0,      10,
  'chr1', 75,     100
)

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

bed_glyph(bed_complement(x, genome))

genome <- trbl_genome(
   ~chrom,  ~size,
   'chr1',  500,
   'chr2',  600,
   'chr3',  800
)

x <- trbl_interval(
   ~chrom, ~start, ~end,
   'chr1', 100,    300,
   'chr1', 200,    400,
   'chr2', 0,      100,
   'chr2', 200,    400,
   'chr3', 500,    600
)

# intervals not covered by x
bed_complement(x, genome)

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