bed_random

0th

Percentile

Generate randomly placed intervals on a genome.

Generate randomly placed intervals on a genome.

Usage
bed_random(genome, length = 1000, n = 1e+06, sort_by = c("chrom",
  "start"), seed = 0)
Arguments
genome

tbl_genome()

length

length of intervals

n

number of intervals to generate

sort_by

sorting variables

seed

seed RNG for reproducible intervals

Details

Sorting can be suppressed with sort_by = NULL.

Value

tbl_interval()

See Also

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

Other randomizing operations: bed_shuffle

Aliases
  • bed_random
Examples
# NOT RUN {
genome <- trbl_genome(
  ~chrom,  ~size,
  "chr1",  10000000,
  "chr2",  50000000,
  "chr3",  60000000,
  "chrX",  5000000
)

bed_random(genome, seed = 10104)

# sorting can be suppressed
bed_random(genome, sort_by = NULL, seed = 10104)

# 500 random intervals of length 500
bed_random(genome, length = 500, n = 500, seed = 10104)

# }
Documentation reproduced from package valr, version 0.5.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.