generateHitsCache: Generate a cache of binding factor within a LayerList

View source: R/generateHitsCache.R

generateHitsCacheR Documentation

Generate a cache of binding factor within a LayerList

Description

Generate and attach a cache of binding factor hit positions for named binding factors on certain levels. This is an internal function called from runLayerBinding.BSgenome In turn it uses matchBindingFactor.BSgenome to generate hits.

Usage

generateHitsCache(layerList, factorSet, cache.layers = NULL, verbose = FALSE)

Arguments

layerList

a "Layerlist" object containing a layerSet based on a BSgenome and other meta-data

factorSet

a "list" of "bindingFactor" objects

cache.layers

which named layers to cache hits on (default NULL)

verbose

give more output

Value

"LayerList"

See Also

runLayerBinding.BSgenome matchBindingFactor.BSgenome

Examples

require(Biostrings)
require(BSgenome.Scerevisiae.UCSC.sacCer3)

genome <- BSgenome.Scerevisiae.UCSC.sacCer3   # for convenience


scLayerSet <- createLayerSet.BSgenome(genome=genome, n.layers = 5, verbose=TRUE)

testFactor3 <- createBindingFactor.DNA_motif("test", patternString="ACTGGGCTA", profile.layers = c("LAYER.1", "LAYER.3"), profile.marks = c(0,0), 
                                             mod.layers = c("LAYER.2", "LAYER.4"), mod.marks=c(0,1))

generateHitsCache(layerList=scLayerSet, factorSet=list(testFactor3))


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