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

ivl_df

genome

ivl_df

Value

ivl_df

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 <- tibble::tribble(
  ~chrom, ~start, ~end,
  'chr1', 0,      10,
  'chr1', 75,     100
)

genome <- tibble::tribble(
  ~chrom, ~size,
  'chr1', 200
)

bed_glyph(bed_complement(x, genome))

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

x <- tibble::tribble(
   ~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)

valr documentation built on Dec. 11, 2021, 9:57 a.m.