Description Usage Arguments Details Value Examples

The whole sequence is scanned with a PWM and scores returned beginning at each position. Partial motif matches are not done, thus the last #[length of motif]-1 scores are NA.

1 2 | ```
scanWithPWM(pwm, dna, pwm.rev = NULL, odds.score = FALSE,
both.strands = FALSE, strand.fun = "mean")
``` |

`pwm` |
PWM object |

`dna` |
a DNAString or other sequence from Biostrings |

`pwm.rev` |
the reverse complement for a pwm (if it is already pre-computed) |

`odds.score` |
if to return raw scores in odds (not logodds) space |

`both.strands` |
if to return results on both strands |

`strand.fun` |
which function to use to summarise values over two strands (default is "mean") |

The function returns either an odds average (*not* log-odds average), maximal score on each strand, or scores on both strands.

The function by default returns the score in log2
following the package `Biostrings`

.

a vector representing scores starting at each position, or a matrix with score in the two strands

1 2 3 4 5 6 7 8 | ```
if(require("PWMEnrich.Dmelanogaster.background")){
data(MotifDb.Dmel)
ttk = MotifDb.Dmel[["ttk"]]
scanWithPWM(ttk, DNAString("CGTAGGATAAAGTAACT")) # odds average over the two strands expressed as log2-odds
scanWithPWM(ttk, DNAString("CGTAGGATAAAGTAACT"), both.strands=TRUE) # log2-odds scores on both strands
}
``` |

PWMEnrich documentation built on Nov. 1, 2018, 2:25 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.