Description Usage Arguments Details Value See Also Examples

Generate randomly placed intervals on a genome.

1 | ```
bed_random(genome, length = 1000, n = 1e+06, seed = 0, sorted = TRUE)
``` |

`genome` |
genome_df |

`length` |
length of intervals |

`n` |
number of intervals to generate |

`seed` |
seed RNG for reproducible intervals |

`sorted` |
return sorted output |

Sorting can be suppressed with `sorted = FALSE`

.

ivl_df

https://bedtools.readthedocs.io/en/latest/content/tools/random.html

Other randomizing operations:
`bed_shuffle()`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
genome <- tibble::tribble(
~chrom, ~size,
"chr1", 10000000,
"chr2", 50000000,
"chr3", 60000000,
"chrX", 5000000
)
bed_random(genome, seed = 10104)
# sorting can be suppressed
bed_random(genome, sorted = FALSE, seed = 10104)
# 500 random intervals of length 500
bed_random(genome, length = 500, n = 500, seed = 10104)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.