Comparing ranking and filtering motifs with character classes: application to biological sequence analysis