Hi Sid,
Was just trying to do some exploratory analysis to query RBP binding to some of my 3'UTRs of interest and thought your approach would be a good starting point.
In your graphic, the equation for your binding score suggests that it normalises motif counts for the length of the motif and the query region. When I check the script, it only seems to normalise by the length of the query region e.g. at line 25
Obviously a straightforward fix. Just checking if the code/score calculation is up-to-date with what you did for the manuscript?
By the way, props for sharing analysis code & documenting as well as you did (unfortunately still a rarity these days...), was pretty straightforward for me to reproduce your workflow :)
Cheers,
Sam