Count the matches to a PWM within an XStringSet
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
Details
Will simply count the matches within an XStringSet and return an integer.
All matches are included.
Examples
## Load the example PWM
data("ex_pwm")
esr1 <- ex_pwm$ESR1
## Load the example Peaks
data("ar_er_seq")
countPwmMatches(esr1, ar_er_seq)
#> [1] 62
## Count all PWMs
countPwmMatches(ex_pwm, ar_er_seq)
#> ESR1 ANDR FOXA1 ZN143 ZN281
#> 62 61 334 1 63