Skip to content

Commit 57ce478

Browse files
committed
Remove reexports from pyhmmer module and update Cython headers directly
1 parent e5d2ac5 commit 57ce478

File tree

8 files changed

+33
-54
lines changed

8 files changed

+33
-54
lines changed

include/libhmmer/p7_hmmfile.pxd

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from libc.stdint cimport uint32_t
12
from libc.stdio cimport FILE
23
from posix.types cimport off_t
34

@@ -57,3 +58,16 @@ cdef extern from "hmmer.h" nogil:
5758
int p7_hmmfile_Read(P7_HMMFILE *hfp, ESL_ALPHABET **ret_abc, P7_HMM **opt_hmm)# except *
5859
int p7_hmmfile_PositionByKey(P7_HMMFILE *hfp, const char *key)
5960
int p7_hmmfile_Position(P7_HMMFILE *hfp, const off_t offset)
61+
62+
# Private re-exports
63+
64+
cdef uint32_t v3a_magic
65+
cdef uint32_t v3b_magic
66+
cdef uint32_t v3c_magic
67+
cdef uint32_t v3d_magic
68+
cdef uint32_t v3e_magic
69+
cdef uint32_t v3f_magic
70+
71+
int read_asc20hmm(P7_HMMFILE* hfp, ESL_ALPHABET** ret_abc, P7_HMM** opt_hmm)
72+
int read_asc30hmm(P7_HMMFILE* hfp, ESL_ALPHABET** ret_abc, P7_HMM** opt_hmm)
73+
int read_bin30hmm(P7_HMMFILE* hfp, ESL_ALPHABET** ret_abc, P7_HMM** opt_hmm)

include/libhmmer/p7_tophits.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ cdef extern from "hmmer.h" nogil:
3131
P7_TOPHITS *p7_tophits_Create()
3232
P7_TOPHITS *p7_tophits_Clone(const P7_TOPHITS* h)
3333
int p7_tophits_Grow(P7_TOPHITS *h)
34+
int p7_tophits_Reuse(P7_TOPHITS* h)
3435
int p7_tophits_CreateNextHit(P7_TOPHITS *h, P7_HIT **ret_hit)
3536
int p7_tophits_Add(P7_TOPHITS *h,
3637
char *name, char *acc, char *desc,

src/pyhmmer/plan7.pyx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,20 @@ from libhmmer.p7_pipeline cimport P7_PIPELINE, p7_pipemodes_e, p7_zsetby_e, p7_s
104104
from libhmmer.p7_profile cimport p7_LOCAL, p7_GLOCAL, p7_UNILOCAL, p7_UNIGLOCAL
105105
from libhmmer.p7_trace cimport P7_TRACE, p7t_statetype_e
106106
from libhmmer.p7_prior cimport P7_PRIOR
107+
from libhmmer.p7_tophits cimport p7_tophits_Reuse
107108
from libhmmer.nhmmer cimport ID_LENGTH_LIST
108109
from capacity cimport new_capacity
110+
from libhmmer.p7_hmmfile cimport (
111+
read_asc20hmm,
112+
read_asc30hmm,
113+
read_bin30hmm,
114+
v3a_magic,
115+
v3b_magic,
116+
v3c_magic,
117+
v3d_magic,
118+
v3e_magic,
119+
v3f_magic
120+
)
109121

110122
if HMMER_IMPL == "VMX":
111123
from libhmmer.impl_vmx cimport p7_oprofile, p7_omx, impl_Init, p7O_EXTRA_SB
@@ -181,18 +193,6 @@ from .easel cimport (
181193
Randomness,
182194
RandomnessOrSeed,
183195
)
184-
from .reexports.p7_tophits cimport p7_tophits_Reuse
185-
from .reexports.p7_hmmfile cimport (
186-
read_asc20hmm,
187-
read_asc30hmm,
188-
read_bin30hmm,
189-
v3a_magic,
190-
v3b_magic,
191-
v3c_magic,
192-
v3d_magic,
193-
v3e_magic,
194-
v3f_magic
195-
)
196196

197197
if TARGET_SYSTEM == "Linux":
198198
from .fileobj.linux cimport fileobj_linux_open as fopen_obj
@@ -8662,8 +8662,8 @@ cdef class TopHits:
86628662
fname = "p7_tophits_TabularTargets"
86638663
status = libhmmer.p7_tophits.p7_tophits_TabularTargets(
86648664
file,
8665-
qname,
8666-
qacc,
8665+
<char*> qname,
8666+
<char*> qacc,
86678667
self._th,
86688668
&self._pli,
86698669
header
@@ -8672,8 +8672,8 @@ cdef class TopHits:
86728672
fname = "p7_tophits_TabularDomains"
86738673
status = libhmmer.p7_tophits.p7_tophits_TabularDomains(
86748674
file,
8675-
qname,
8676-
qacc,
8675+
<char*> qname,
8676+
<char*> qacc,
86778677
self._th,
86788678
&self._pli,
86798679
header
@@ -8682,8 +8682,8 @@ cdef class TopHits:
86828682
fname = "p7_tophits_TabularXfam"
86838683
status = libhmmer.p7_tophits.p7_tophits_TabularXfam(
86848684
file,
8685-
qname,
8686-
qacc,
8685+
<char*> qname,
8686+
<char*> qacc,
86878687
self._th,
86888688
&self._pli,
86898689
)

src/pyhmmer/reexports/__init__.pxd

Whitespace-only changes.

src/pyhmmer/reexports/p7_hmmfile.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/pyhmmer/reexports/p7_hmmfile.pxd

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/pyhmmer/reexports/p7_tophits.h

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/pyhmmer/reexports/p7_tophits.pxd

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)