Skip to content

Commit

Permalink
Minor changes to fix errors from mering the cherry-picked commit 5d79a52
Browse files Browse the repository at this point in the history
 on to the tagged 2.0.0 version.
  • Loading branch information
Tim Fennell authored and Tim Fennell committed Oct 17, 2024
1 parent c8bae07 commit 85e4f47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions prymer/offtarget/bwa.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
>>> bwa.map_all(queries=[query])
[BwaResult(query=Query(id='NA', bases='AAAAAA'), hit_count=3968, hits=[])]
>>> bwa.close()
True
```
""" # noqa: E501
Expand Down Expand Up @@ -333,6 +334,7 @@ def close(self) -> bool:
"""
safely_closed: bool = super().close()
self._stderr_thread.join()
self._reader.close()
return safely_closed

def map_one(self, query: str, id: str = "unknown") -> BwaResult:
Expand Down Expand Up @@ -441,7 +443,3 @@ def to_hits(self, rec: AlignedSegment) -> list[BwaHit]:
hits = [hit for hit in hits if not hit.refname.endswith("_alt")]

return hits

def close(self) -> None:
self._reader.close()
super().close()
1 change: 0 additions & 1 deletion tests/offtarget/test_bwa.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def test_stderr_redirected_to_logger(ref_fasta: Path, caplog: pytest.LogCaptureF
assert "[bwa_aln_core] convert to sequence coordinate..." in caplog.text
assert "[bwa_aln_core] refine gapped alignments..." in caplog.text
assert "[bwa_aln_core] print alignments..." in caplog.text
assert "[bwa_aln_core] 1 sequences have been processed" in caplog.text


def test_map_one_unmapped(ref_fasta: Path) -> None:
Expand Down

0 comments on commit 85e4f47

Please sign in to comment.