createBindingFactor.DNA_consensus: Create a binding factor object to match a given DNA consensus

View source: R/createBindingFactor.DNA_consensus.R

createBindingFactor.DNA_consensusR Documentation

Create a binding factor object to match a given DNA consensus

Description

Create a new binding factor based on a DNA consensus 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_consensus(
  name,
  type = "DNA_consensus",
  patternString = "N",
  patternLength = nchar(patternString),
  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,
  min.DM.length = 2,
  min.DR.length = 10,
  verbose = FALSE,
  max.mismatch = 0,
  min.mismatch = 0,
  with.indels = FALSE,
  fixed = TRUE,
  algorithm = "auto"
)

Arguments

name

give the binding factor a name

type

"DNA_consensus" to differentiate from other types

patternString

"N" put consensus here (using IUPAC codes for degenerate bases)

patternLength

length of pattern to be matched [nchar(patternString)]

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]

max.pattern.tries

NA

min.DM.length

NA

verbose

set to TRUE for more output

max.mismatch

0 see vmatchPattern

min.mismatch

0 see vmatchPattern

with.indels

FALSE see vmatchPattern

fixed

TRUE see vmatchPattern

algorithm

"auto" see vmatchPattern

min.DR.lengt

NA

Value

"bindingFactor"

See Also

runLayerBinding createBindingFactor.DNA_regexp

Examples

DNA_A <- createBindingFactor.DNA_consensus(name="DNA_A",patternString = "CAT" )

gc1-2 <- createBindingFactor.DNA_consensus(name="gc1-2",
                          patternString="SSSSSSSSSSSSSSSS",
                          max.mismatch= 2, 
                          min.mismatch= 1,
                          fixed="subject",
                          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.