View source: R/modifyLayerByBindingFactor.BSgenome.R
modifyLayerByBindingFactor.BSgenome | R Documentation |
Modify all hits genome-wide on a layerSet built upon a BSgenome object.
modifyLayerByBindingFactor.BSgenome(
layerSet,
hits,
bindingFactor,
verbose = FALSE
)
layerSet |
A layerset object |
hits |
The set of hits (GRanges) determined by |
bindingFactor |
An individual bindingFactor object |
verbose |
Give more output |
"LayerList"
createLayerSet.BSgenome
createBindingFactor.DNA_motif
runLayerBinding.BSgenome
matchBindingFactor
matchBindingFactor.BSgenome
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))
listOfHits <- matchBindingFactor.BSgenome(layerSet=scLayerSet, bindingFactor=testFactor3)
moddedLayerSet <- modifyLayerByBindingFactor.BSgenome(layerSet= scLayerSet, hits=listOfHits, bindingFactor=testFactor3)
as.data.frame(lapply(moddedLayerSet$layerSet, length)) # should be hits on LAYER.0 and LAYER.4. Not LAYER.2 as these are set to 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.