View source: R/randGrangesBigGenome.R
randGrangesBigGenome | R Documentation |
Generate random non-overlapping GRanges features within parameters of size and distance
randGrangesBigGenome(
genome,
n = NULL,
sizeFunc = NULL,
gapFunc = NULL,
argsSizeFunc,
argsGapFunc,
minGapSize = 1,
minRange = 1,
verbose = FALSE
)
genome |
A BSgenome object |
n |
NULL |
sizeFunc |
NULL must be a function that generates a vector of positive integers |
gapFunc |
NULL must be a function that generates a vector of positive integers |
argsSizeFunc |
NULL a list giving named parameter values passed to sizeFunc |
argsGapFunc |
NULL a list giving named parameter values passed to gapFunc |
minGapSize |
1 |
minRange |
1 |
verbose |
FALSE Give more output |
"GRanges"
object with seqinfo matching genome
library(BSgenome.Scerevisiae.UCSC.sacCer3)
genome <- BSgenome.Scerevisiae.UCSC.sacCer3
test <- randGrangesBigGenome(genome=genome,
sizeFunc = function(value, n) rep(x=value, times=n),
gapFunc = function(value, n) rep(x=value, times=n),
argsSizeFunc = list(value=147, n=5),
argsGapFunc = list(value=30, n=7), verbose=T)
# fixed nuclesomes of 147bp with random gaps following a poisson.
testGR <- randGrangesBigGenome(genome=genome,
sizeFunc = function(value, n) rep(x=value, times=n),
gapFunc = function(n, value) rpois(n = n , lambda = value),
argsSizeFunc = list(value=147, n=5),
argsGapFunc = list(value=40, n=7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.