createBindingFactor.DNA_motif: Create a binding factor object to match a given DNA motif

View source: R/createBindingFactor.DNA_motif.R

createBindingFactor.DNA_motifR Documentation

Create a binding factor object to match a given DNA motif

Description

Create a new binding factor based on a DNA motif that may also require marks on others layers and may (when used) set marks on other layers. Makes use of biostrings function vmatchPattern Can use IUPAC codes and allow mismatches

Usage

createBindingFactor.DNA_motif(
  name,
  type = "DNA_motif",
  pwm,
  min.score = "80%",
  with.score = FALSE,
  patternLength = ncol(pwm),
  stateWidth = patternLength,
  profile.layers = NULL,
  profile.marks = NULL,
  mod.layers = NULL,
  mod.marks = NULL,
  offset = 0,
  offset.method = NULL,
  offset.params = NULL,
  test.layer0.binding = FALSE,
  test.mismatch.rate = 0.1,
  max.pattern.tries = 1000,
  verbose = FALSE
)

Arguments

name

give the binding factor a name

type

"DNA_motif" to differentiate from other types

pwm

NULL put motif here as matrix (see biostrings pwm)

min.score

"80%" passed to matchPWM

with.score

FALSE passed to matchPWM

patternLength

length of pattern to be matched [ncol(pwm)]

stateWidth

the width of pattern to recognise on other layers

profile.layers

a vector of named layers to set as a match

profile.marks

a vector of 0/1 to match the layers in profile.layers

mod.layers

a vector of named layers to alter on a match

mod.marks

a vector of 0/1 to set on the mod.layers

offset

0 integer value to indicate relative distance from pattern to apply modifications. Very simple.

offset.method

NULL a function to apply to apply offset. MUST have parameter "n" that is used internally to represent the number of hits.

offset.params

NULL a list of named parameters to pass to offset.method function

test.layer0.binding

when creating, test if the DNA sequence has a match.

test.mismatch.rate

proportion of mismatches to tolerate when testing [.1]

verbose

set to TRUE for more output

Value

"bindingFactor"

See Also

runLayerBinding createBindingFactor.DNA_regexp

Examples

require(Biostrings)
data(HNF4alpha)    # from Biostrings package
pwm.HNF4A <- PWM(HNF4alpha)  
bf_motif.1 <- createBindingFactor.DNA_motif(name="HNFA_match",pwm = pwm.HNF4A )

bf_motif.2 <- createBindingFactor.DNA_motif(name="HNFA_alter",pwm = pwm.HNF4A ,
                          min.score="80%", with.score=FALSE,
                          profile.layers = NULL,
                          profile.marks=NULL,
                          mod.layers="LAYER.1", mod.marks = 1)


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