modifyLayerByBindingFactor.BSgenome: modifyLayerByBindingFactor.BSgenome

View source: R/modifyLayerByBindingFactor.BSgenome.R

modifyLayerByBindingFactor.BSgenomeR Documentation

modifyLayerByBindingFactor.BSgenome

Description

Modify all hits genome-wide on a layerSet built upon a BSgenome object.

Usage

modifyLayerByBindingFactor.BSgenome(
  layerSet,
  hits,
  bindingFactor,
  verbose = FALSE
)

Arguments

layerSet

A layerset object

hits

The set of hits (GRanges) determined by matchBindingFactor or matchBindingFactor.BSgenome

bindingFactor

An individual bindingFactor object

verbose

Give more output

Value

"LayerList"

See Also

createLayerSet.BSgenome createBindingFactor.DNA_motif runLayerBinding.BSgenome matchBindingFactor 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))

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.


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