createBindingFactor.DNA_regexp: Create a binding factor object to match a given pattern of...

View source: R/createBindingFactor.DNA_regexp.R

createBindingFactor.DNA_regexpR Documentation

Create a binding factor object to match a given pattern of layers

Description

Create a new binding factor based on a simple pattern of marks on others layers and may (when used) set marks on other layers.

Usage

createBindingFactor.DNA_regexp(
  name,
  type = "DNA_regexp",
  forRegExp = "N",
  revRegExp = "N",
  patternLength = 0,
  profile.layers = NULL,
  profile.marks = NULL,
  mod.layers = NULL,
  mod.marks = NULL,
  offset = 0,
  offset.method = NULL,
  offset.params = NULL,
  stateWidth = patternLength,
  test.layer0.binding = FALSE,
  test.mismatch.rate = 0.1,
  max.pattern.tries = 1000,
  min.DM.length = 2,
  min.DR.length = 10,
  verbose = FALSE
)

Arguments

name

give the binding factor a name

type

"DNA_regexp" to differentiate from other types

forRegExp

= regular expression to match DNA sequence

revRegExp

= reverse complement of forRegExp

patternLength

[= 0] an approximate length of match but may not be the actual matched length, which may vary for regular expression matches

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

stateWidth

the width of pattern to recognise on other layers

test.layer0.binding

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

test.mismatch.rate

proportion of mismatches to tolerate when testing

max.pattern.tries

NA

min.DM.length

NA

verbose

set to TRUE for more output

min.DR.lengt

NA

Value

"hits"

See Also

runLayerBinding createBindingFactor.DNA_motif

Examples

simpleBF <- createBindingFactor.DNA_regexp("test", patternString="ACTGGGCTA")

# this regular expression finds 4 CpGs with 0-4 bases between them
CGI<- createBindingFactor.DNA_regexp("CGI", patternString="(CG.{0,4}){3}CG", 
                          patternLength=20, mod.layers = "CpG_island",
                          mod.marks=1, stateWidth=20)
                          
RAP1 <- createBindingFactor.DNA_regexp("RAP1", forRegExp="GGTGT(.{0,3})GGTGT",
                                    revRegExp="ACACC(.{0,3})ACACC",patternLength=20, 
                                    mod.layers = "RAP1_bound", mod.marks=1, stateWidth=20)                         


davetgerrard/GenomicLayers documentation built on Jan. 12, 2025, 5:06 p.m.