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

Penalize indels more than mismatches #608

Merged
merged 2 commits into from
Mar 23, 2022
Merged

Penalize indels more than mismatches #608

merged 2 commits into from
Mar 23, 2022

Conversation

marcelm
Copy link
Owner

@marcelm marcelm commented Mar 18, 2022

This changes the method for choosing the best alignment (among those that are within the allowed error rate).
While previously, only the number of matches in the alignment counted, with this change, the score of the alignment decides.
Scores at the moment are: matches +1, mismatches -1, indels -2

See #597
Closes #604

To Do

  • Mismatch score in PrefixComparer
  • Ensure leftmost matches are found

@luchaoqi
Copy link
Contributor

Any updates on this PR? Love the way it penalizes different cases:

        self._match_score = 1
        self._mismatch_score = -1
        self._insertion_score = -2
        self._deletion_score = -2

I found CI fails and has not merged successfully. Is this because cutadapt has dropped support for python 3.6?

@marcelm
Copy link
Owner Author

marcelm commented Mar 23, 2022

The algorithm isn’t quite finished. See the To Do above: It’s not guaranteed that the leftmost match is found if there are multiple occurrences of the adapter.

Please have some patience. I will continue work on this when I have time.

This changes the method for choosing the best alignment.
While previously, only the number of matches in the alignment counted, with
this change, the score of the alignment decides.
Scores at the moment are: matches +1, mismatches -1, indels -2

Also, the leftmost alignment is now chosen somewhat more reliably.

See #597
Closes #604
@marcelm marcelm marked this pull request as ready for review March 23, 2022 14:10
@marcelm marcelm merged commit 54f5d27 into main Mar 23, 2022
@marcelm marcelm deleted the indel-scores branch March 23, 2022 14:21
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 this pull request may close these issues.

Penalize indels more
2 participants