Skip to content

Commit

Permalink
Update c-core to v0.14.0 and remove cut_ga param
Browse files Browse the repository at this point in the history
  • Loading branch information
horta committed Nov 30, 2023
1 parent e46e04a commit 839b7e4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion python-core/build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Ext:
Ext(
"EBI-Metagenomics",
"deciphon",
"c-core-v0.13.12",
"c-core-v0.14.0",
"./c-core",
CMAKE_OPTS + CPM_OPTS,
),
Expand Down
3 changes: 1 addition & 2 deletions python-core/deciphon_core/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ struct params
int num_threads;
bool multi_hits;
bool hmmer3_compat;
bool cut_ga;
};
int params_setup(struct params *, int num_threads, bool multi_hits, bool hmmer3_compat, bool cut_ga);
int params_setup(struct params *, int num_threads, bool multi_hits, bool hmmer3_compat);

// Press
struct press *press_new(void);
Expand Down
8 changes: 2 additions & 6 deletions python-core/deciphon_core/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@


class Params:
def __init__(
self, num_threads: int, multi_hits: bool, hmmer3_compat: bool, cut_ga: bool
):
def __init__(self, num_threads: int, multi_hits: bool, hmmer3_compat: bool):
self._cptr = ffi.new("struct params *")
if self._cptr == ffi.NULL:
raise MemoryError()

if rc := lib.params_setup(
self._cptr, num_threads, multi_hits, hmmer3_compat, cut_ga
):
if rc := lib.params_setup(self._cptr, num_threads, multi_hits, hmmer3_compat):
raise DeciphonError(rc)

@property
Expand Down
2 changes: 1 addition & 1 deletion python-core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "deciphon-core"
version = "0.18.13"
version = "0.19.0"
description = "Python wrapper around the Deciphon C library"
authors = ["Danilo Horta <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion python-core/tests/test_press.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ def test_press(tmp_path: Path, files_path: Path):
while not press.end():
press.next()

assert hmmfile.dbfile.path.stat().st_size == 3536712
assert hmmfile.dbfile.path.stat().st_size == 3536729
2 changes: 1 addition & 1 deletion python-core/tests/test_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_scan(tmp_path, files_path: Path):

hmmfile = H3File(hmm)
hmmfile.ensure_pressed()
params = Params(num_threads=1, multi_hits=True, hmmer3_compat=False, cut_ga=True)
params = Params(num_threads=1, multi_hits=True, hmmer3_compat=False)
snapfile = NewSnapFile(path=Path("snap.dcs").absolute())

with SchedContext(hmmfile) as sched:
Expand Down

0 comments on commit 839b7e4

Please sign in to comment.