ivl_df: Bed-like data.frame requirements for valr functions

Description Usage Arguments Examples

Description

Required column names for interval dataframes are chrom, start and end. Internally interval dataframes are validated using check_interval()

Required column names for genome dataframes are chrom and size. Internally genome dataframes are validated using check_genome().

Usage

1
2
3

Arguments

x

A data.frame or tibble::tibble

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
# using tibble
x <- tibble::tribble(
  ~chrom, ~start, ~end,
  'chr1',  1,     50,
  'chr1',  10,    75,
  'chr1',  100,   120
)

check_interval(x)

# using base R data.frame
x <- data.frame(chrom = "chr1",
           start = 0,
           end = 100,
           stringsAsFactors = FALSE
)

check_interval(x)

# example genome input

x <- tibble::tribble(
  ~chrom, ~size,
  'chr1', 1e6
)

check_genome(x)

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