valr (version 0.7.0)

bed_shuffle: Shuffle input intervals.

Description

Shuffle input intervals.

Usage

bed_shuffle(
  x,
  genome,
  incl = NULL,
  excl = NULL,
  max_tries = 1000,
  within = FALSE,
  seed = 0
)

Value

ivl_df

Arguments

x

ivl_df

genome

genome_df

incl

ivl_df of included intervals

excl

ivl_df of excluded intervals

max_tries

maximum tries to identify a bounded interval

within

shuffle within chromosomes

seed

seed for reproducible intervals

See Also

Examples

Run this code
genome <- tibble::tribble(
  ~chrom, ~size,
  "chr1", 1e6,
  "chr2", 2e6,
  "chr3", 4e6
)

x <- bed_random(genome, seed = 1010486)

bed_shuffle(x, genome, seed = 9830491)

Run the code above in your browser using DataLab