randGrangesBigGenome: randGrangesBigGenome

View source: R/randGrangesBigGenome.R

randGrangesBigGenomeR Documentation

randGrangesBigGenome

Description

Generate random non-overlapping GRanges features within parameters of size and distance

Usage

randGrangesBigGenome(
  genome,
  n = NULL,
  sizeFunc = NULL,
  gapFunc = NULL,
  argsSizeFunc,
  argsGapFunc,
  minGapSize = 1,
  minRange = 1,
  verbose = FALSE
)

Arguments

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

Value

"GRanges" object with seqinfo matching genome

Examples


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))





davetgerrard/GenomicLayers documentation built on Nov. 21, 2024, 6:21 a.m.