Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case-sensitive separator filtering #7

Closed
clonder opened this issue Nov 25, 2024 · 0 comments · Fixed by #6
Closed

Case-sensitive separator filtering #7

clonder opened this issue Nov 25, 2024 · 0 comments · Fixed by #6

Comments

@clonder
Copy link
Contributor

clonder commented Nov 25, 2024

Issue
In kinex.py:

if not phospho_priming:
    sequence = sequence.upper()

The sequence string is converted to uppercase, which affects any substrings used as separators. For example, (ph) becomes (PH).

In sequence.py:

class SequenceSeparator(Enum):
    ASTERISK = "*"
    PH = "(ph)"
    
valid_patterns = get_valid_patterns(separator)
if not any(pattern in sequence_string for pattern in valid_patterns):
    return False

The valid patterns, such as (ph) from SequenceSeparator, do not match the uppercase-transformed string, leading to invalid filtering.

Example:

  • Original sequence: AAAAAAAGDS(ph)DSWDADAFSVEDPVR
  • Separator: (ph)
  • The sequence is transformed to uppercase, resulting in: AAAAAAAGDS(PH)DSWDADAFSVEDPVR.
  • Separator should be (PH), but it is not in the list.

Proposed Fix

If it is a valide issue, I added uppercase separator in #6 pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant