Skip to contents

Count the matches to a PWM within an XStringSet

Usage

countPwmMatches(
  pwm,
  stringset,
  rc = TRUE,
  min_score = "80%",
  mc.cores = 1,
  ...
)

Arguments

pwm

A Position Weight Matrix

stringset

An XStringSet

rc

logical(1) Also find matches using the reverse complement of pwm

min_score

The minimum score to return a match

mc.cores

Passed to mclapply when analysing a list of PWMs

...

Passed to countPWM

Value

An integer vector

Details

Will simply count the matches within an XStringSet and return an integer. All matches are included.

Examples

## Load the example PWM
data("ex_pfm")
esr1 <- ex_pfm$ESR1

## Load the example Peaks
data("ar_er_seq")
countPwmMatches(esr1, ar_er_seq)
#> [1] 22

## Count all PWMs
countPwmMatches(ex_pfm, ar_er_seq)
#>  ESR1  ANDR FOXA1 ZN143 ZN281 
#>    22     8   113    21    14