bootRanges {nullranges} | R Documentation |
Performs a block bootstrap, optionally with respect
to a genome segmentation. Returns a bootRanges
object,
which is a GRanges object with all the ranges concatenated,
and iteration and block length indicated by metadata columns
bootRanges( y, blockLength, R = 1, seg = NULL, exclude = NULL, excludeOption = c("drop", "trim"), proportionLength = TRUE, type = c("bootstrap", "permute"), withinChrom = FALSE )
y |
the GRanges to bootstrap sample |
blockLength |
the length of the blocks (for proportional blocks, this is the maximal length of a block) |
R |
the number of bootstrap samples to generate |
seg |
the segmentation GRanges, with a column ("state") indicating segmentation state (optional) |
exclude |
the GRanges of excluded regions (optional) |
excludeOption |
whether to |
proportionLength |
for the segmented block bootstrap, whether to use scaled block lengths, (scaling by the proportion of the segmentation state out of the total genome length) |
type |
the type of null generation (un-segmented bootstrap only) |
withinChrom |
whether to re-sample (bootstrap) ranges across chromosomes (default) or only within chromosomes (un-segmented bootstrap only) |
a bootRanges (GRanges object) with the bootstrapped ranges, where iteration and block length are recorded as metadata columns
set.seed(1) library(GenomicRanges) gr <- GRanges("chr1", IRanges(0:4 * 10 + 1, width=5), seqlengths=c(chr1=50)) br <- bootRanges(gr, blockLength=10)