Skip to content

Commit 16d8422

Browse files
committed
update ssr
1 parent e7e6581 commit 16d8422

File tree

2 files changed

+12
-39
lines changed

2 files changed

+12
-39
lines changed

benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import time
22
import stria
33
import pyfastx
4-
gfile = 'Homo_sapiens.GRCh38.dna.toplevel.fa.gz'
4+
gfile = 'chr1.fa.gz'
55

66
for name, seq in pyfastx.Fastx(gfile):
77
break

src/ssr.c

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -274,42 +274,15 @@ static PyMethodDef stria_ssrminer_methods[] = {
274274
};
275275

276276
PyTypeObject stria_SSRMinerType = {
277-
PyVarObject_HEAD_INIT(NULL, 0)
278-
"SSRMiner", /* tp_name */
279-
sizeof(stria_SSRMiner), /* tp_basicsize */
280-
0, /* tp_itemsize */
281-
(destructor)stria_ssrminer_dealloc, /* tp_dealloc */
282-
0, /* tp_print */
283-
0, /* tp_getattr */
284-
0, /* tp_setattr */
285-
0, /* tp_reserved */
286-
(reprfunc)stria_ssrminer_repr, /* tp_repr */
287-
0, /* tp_as_number */
288-
0, /* tp_as_sequence */
289-
0, /* tp_as_mapping */
290-
0, /* tp_hash */
291-
0, /* tp_call */
292-
0, /* tp_str */
293-
0, /* tp_getattro */
294-
0, /* tp_setattro */
295-
0, /* tp_as_buffer */
296-
Py_TPFLAGS_DEFAULT, /* tp_flags */
297-
"find microsatellites from DNA sequence", /* tp_doc */
298-
0, /* tp_traverse */
299-
0, /* tp_clear */
300-
0, /* tp_richcompare */
301-
0, /* tp_weaklistoffset */
302-
(getiterfunc)stria_ssrminer_iter, /* tp_iter */
303-
(iternextfunc)stria_ssrminer_next, /* tp_iternext */
304-
stria_ssrminer_methods, /* tp_methods */
305-
0, /* tp_members */
306-
0, /* tp_getset */
307-
0, /* tp_base */
308-
0, /* tp_dict */
309-
0, /* tp_descr_get */
310-
0, /* tp_descr_set */
311-
0, /* tp_dictoffset */
312-
0, /* tp_init */
313-
0, /* tp_alloc */
314-
stria_ssrminer_new, /* tp_new */
277+
PyVarObject_HEAD_INIT(NULL, 0)
278+
.tp_name = "SSRMiner",
279+
.tp_basicsize = sizeof(stria_SSRMiner),
280+
.tp_dealloc = (destructor)stria_ssrminer_dealloc,
281+
.tp_repr = (reprfunc)stria_ssrminer_repr,
282+
.tp_flags = Py_TPFLAGS_DEFAULT,
283+
.tp_doc = "find microsatellites from DNA sequence",
284+
.tp_iter = (getiterfunc)stria_ssrminer_iter,
285+
.tp_iternext = (iternextfunc)stria_ssrminer_next,
286+
.tp_methods = stria_ssrminer_methods,
287+
.tp_new = stria_ssrminer_new,
315288
};

0 commit comments

Comments
 (0)