GreenleafLab / motifmatchr

Fast motif matching in R
https://greenleaflab.github.io/motifmatchr/
GNU General Public License v3.0
41 stars 11 forks source link

increase tolerance in pwmType #9

Open plger opened 8 months ago

plger commented 8 months ago

motifmatchr fails when using some motifs collections (e.g. https://doi.org/10.1093/nar/gkad1240 ) due to small rounding errors in the column sums of the PFM preventing pwmType from determining whether the motifs are PFM or PWM. While it would be possible to process the matrices to avoid this, it's actually not that trivial and unnecessary, because the problem is easily solved by increasing the tolerance in pwmType. There's also no drawback in doing so, given that it's virtually impossible that all the colSums of all PWM are by chance within 0.99-1.01.