gr.sample | R Documentation |
GRanges
intervals within territorySamples k
intervals of length "len" from a pile of GRanges
.
If k is a scalar then will (uniformly) select k intervals from the summed territory of GRanges
If k is a vector of length(gr) then will uniformly select k intervals from each.
gr.sample(gr, k, wid = 100, replace = TRUE)
gr |
Granges defining the territory to sample from |
k |
integer Number of ranges to sample |
wid |
integer Length of the |
replace |
boolean If TRUE, will bootstrap. If FALSE, otherwise will sample without replacement. (default = TRUE) |
GRanges of max length sum(k) [if k is vector) or k*length(gr) (if k is scalar) with labels indicating the originating range.
This is different from GenomicRanges::sample
function, which just samples from a pile of GRanges
Marcin Imielinski
## sample 5 \code{GRanges} of length 10 each from territory of RefSeq genes
gr.sample(reduce(example_genes), k=5, wid=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.