Skip to content

Commit

Permalink
Fix bug with noduplicateseqs method not updating sequence number
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed May 13, 2024
1 parent 556fbbf commit 45bbb67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 14 additions & 0 deletions patches/Cleaner.cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/source/Cleaner.cpp
+++ b/source/Cleaner.cpp
@@ -1466,7 +1466,10 @@
{
if (alig->sequences[i] == alig->sequences[x])
{
- alig->saveSequences[i] = -1;
+ if (alig->saveSequences[i] != -1) {
+ alig->saveSequences[i] = -1;
+ alig->numberOfSequences--;
+ }
debug.report(InfoCode::RemovingDuplicateSequences,
new std::string[2] {
alig->seqsName[i],
1 change: 0 additions & 1 deletion pytrimal/tests/test_automatic_trimmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def test_gappyout_method(self):

@unittest.skipIf(sys.version_info < (3, 6), "No pathlib support in Python 3.5")
@unittest.skipUnless(files, "importlib.resources.files not available")
@unittest.expectedFailure
def test_noduplicateseqs_method(self):
self._test_method("noduplicateseqs")

Expand Down

0 comments on commit 45bbb67

Please sign in to comment.