comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/pysam/libcbcf.c @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 69:33d812a61356
1 /* Generated by Cython 3.0.11 */
2
3 /* BEGIN: Cython Metadata
4 {
5 "distutils": {
6 "define_macros": [
7 [
8 "BUILDING_WHEEL",
9 null
10 ]
11 ],
12 "depends": [
13 "/project/htslib/htslib/bgzf.h",
14 "/project/htslib/htslib/cram.h",
15 "/project/htslib/htslib/faidx.h",
16 "/project/htslib/htslib/hfile.h",
17 "/project/htslib/htslib/hts.h",
18 "/project/htslib/htslib/kstring.h",
19 "/project/htslib/htslib/sam.h",
20 "/project/htslib/htslib/tbx.h",
21 "/project/htslib/htslib/vcf.h",
22 "/project/htslib/htslib/vcfutils.h",
23 "/project/pysam/htslib_util.h"
24 ],
25 "extra_compile_args": [
26 "-Wno-unused",
27 "-Wno-strict-prototypes",
28 "-Wno-sign-compare",
29 "-Wno-error=declaration-after-statement"
30 ],
31 "extra_link_args": [
32 "-Wl,-rpath,$ORIGIN"
33 ],
34 "include_dirs": [
35 "pysam",
36 "/project/pysam",
37 "/project/htslib",
38 "/project/samtools",
39 "/project/samtools/lz4",
40 "/project/bcftools",
41 "/project"
42 ],
43 "language": "c",
44 "libraries": [
45 "z",
46 "lzma",
47 "bz2",
48 "z",
49 "m",
50 "curl",
51 "crypto",
52 "chtslib.cpython-37m-x86_64-linux-gnu",
53 "cutils.cpython-37m-x86_64-linux-gnu"
54 ],
55 "library_dirs": [
56 "/project/pysam",
57 "/project",
58 "build/lib.linux-x86_64-cpython-37/pysam",
59 "build/lib.linux-x86_64-cpython-37/pysam",
60 "build/lib.linux-x86_64-cpython-37/pysam",
61 "build/lib.linux-x86_64-cpython-37/pysam",
62 "build/lib.linux-x86_64-cpython-37/pysam",
63 "build/lib.linux-x86_64-cpython-37/pysam",
64 "build/lib.linux-x86_64-cpython-37/pysam",
65 "build/lib.linux-x86_64-cpython-37/pysam",
66 "build/lib.linux-x86_64-cpython-37/pysam",
67 "build/lib.linux-x86_64-cpython-37/pysam"
68 ],
69 "name": "pysam.libcbcf",
70 "sources": [
71 "pysam/libcbcf.pyx"
72 ]
73 },
74 "module_name": "pysam.libcbcf"
75 }
76 END: Cython Metadata */
77
78 #ifndef PY_SSIZE_T_CLEAN
79 #define PY_SSIZE_T_CLEAN
80 #endif /* PY_SSIZE_T_CLEAN */
81 #if defined(CYTHON_LIMITED_API) && 0
82 #ifndef Py_LIMITED_API
83 #if CYTHON_LIMITED_API+0 > 0x03030000
84 #define Py_LIMITED_API CYTHON_LIMITED_API
85 #else
86 #define Py_LIMITED_API 0x03030000
87 #endif
88 #endif
89 #endif
90
91 #include "Python.h"
92
93 #if PY_MAJOR_VERSION <= 2
94 #define PyDict_GetItemWithError _PyDict_GetItemWithError
95 #endif
96
97
98 #if PY_MAJOR_VERSION >= 3
99 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj)
100 #else
101 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL)
102 #endif
103
104
105 #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get)
106 #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) )
107 #endif
108
109 #ifndef Py_PYTHON_H
110 #error Python headers needed to compile C extensions, please install development version of Python.
111 #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
112 #error Cython requires Python 2.7+ or Python 3.3+.
113 #else
114 #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
115 #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
116 #else
117 #define __PYX_EXTRA_ABI_MODULE_NAME ""
118 #endif
119 #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
120 #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
121 #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
122 #define CYTHON_HEX_VERSION 0x03000BF0
123 #define CYTHON_FUTURE_DIVISION 1
124 #include <stddef.h>
125 #ifndef offsetof
126 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
127 #endif
128 #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
129 #ifndef __stdcall
130 #define __stdcall
131 #endif
132 #ifndef __cdecl
133 #define __cdecl
134 #endif
135 #ifndef __fastcall
136 #define __fastcall
137 #endif
138 #endif
139 #ifndef DL_IMPORT
140 #define DL_IMPORT(t) t
141 #endif
142 #ifndef DL_EXPORT
143 #define DL_EXPORT(t) t
144 #endif
145 #define __PYX_COMMA ,
146 #ifndef HAVE_LONG_LONG
147 #define HAVE_LONG_LONG
148 #endif
149 #ifndef PY_LONG_LONG
150 #define PY_LONG_LONG LONG_LONG
151 #endif
152 #ifndef Py_HUGE_VAL
153 #define Py_HUGE_VAL HUGE_VAL
154 #endif
155 #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
156 #if defined(GRAALVM_PYTHON)
157 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
158 The existence of this section does not imply that anything works or is even tested */
159 #define CYTHON_COMPILING_IN_PYPY 0
160 #define CYTHON_COMPILING_IN_CPYTHON 0
161 #define CYTHON_COMPILING_IN_LIMITED_API 0
162 #define CYTHON_COMPILING_IN_GRAAL 1
163 #define CYTHON_COMPILING_IN_NOGIL 0
164 #undef CYTHON_USE_TYPE_SLOTS
165 #define CYTHON_USE_TYPE_SLOTS 0
166 #undef CYTHON_USE_TYPE_SPECS
167 #define CYTHON_USE_TYPE_SPECS 0
168 #undef CYTHON_USE_PYTYPE_LOOKUP
169 #define CYTHON_USE_PYTYPE_LOOKUP 0
170 #if PY_VERSION_HEX < 0x03050000
171 #undef CYTHON_USE_ASYNC_SLOTS
172 #define CYTHON_USE_ASYNC_SLOTS 0
173 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
174 #define CYTHON_USE_ASYNC_SLOTS 1
175 #endif
176 #undef CYTHON_USE_PYLIST_INTERNALS
177 #define CYTHON_USE_PYLIST_INTERNALS 0
178 #undef CYTHON_USE_UNICODE_INTERNALS
179 #define CYTHON_USE_UNICODE_INTERNALS 0
180 #undef CYTHON_USE_UNICODE_WRITER
181 #define CYTHON_USE_UNICODE_WRITER 0
182 #undef CYTHON_USE_PYLONG_INTERNALS
183 #define CYTHON_USE_PYLONG_INTERNALS 0
184 #undef CYTHON_AVOID_BORROWED_REFS
185 #define CYTHON_AVOID_BORROWED_REFS 1
186 #undef CYTHON_ASSUME_SAFE_MACROS
187 #define CYTHON_ASSUME_SAFE_MACROS 0
188 #undef CYTHON_UNPACK_METHODS
189 #define CYTHON_UNPACK_METHODS 0
190 #undef CYTHON_FAST_THREAD_STATE
191 #define CYTHON_FAST_THREAD_STATE 0
192 #undef CYTHON_FAST_GIL
193 #define CYTHON_FAST_GIL 0
194 #undef CYTHON_METH_FASTCALL
195 #define CYTHON_METH_FASTCALL 0
196 #undef CYTHON_FAST_PYCALL
197 #define CYTHON_FAST_PYCALL 0
198 #ifndef CYTHON_PEP487_INIT_SUBCLASS
199 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
200 #endif
201 #undef CYTHON_PEP489_MULTI_PHASE_INIT
202 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
203 #undef CYTHON_USE_MODULE_STATE
204 #define CYTHON_USE_MODULE_STATE 0
205 #undef CYTHON_USE_TP_FINALIZE
206 #define CYTHON_USE_TP_FINALIZE 0
207 #undef CYTHON_USE_DICT_VERSIONS
208 #define CYTHON_USE_DICT_VERSIONS 0
209 #undef CYTHON_USE_EXC_INFO_STACK
210 #define CYTHON_USE_EXC_INFO_STACK 0
211 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
212 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
213 #endif
214 #undef CYTHON_USE_FREELISTS
215 #define CYTHON_USE_FREELISTS 0
216 #elif defined(PYPY_VERSION)
217 #define CYTHON_COMPILING_IN_PYPY 1
218 #define CYTHON_COMPILING_IN_CPYTHON 0
219 #define CYTHON_COMPILING_IN_LIMITED_API 0
220 #define CYTHON_COMPILING_IN_GRAAL 0
221 #define CYTHON_COMPILING_IN_NOGIL 0
222 #undef CYTHON_USE_TYPE_SLOTS
223 #define CYTHON_USE_TYPE_SLOTS 0
224 #ifndef CYTHON_USE_TYPE_SPECS
225 #define CYTHON_USE_TYPE_SPECS 0
226 #endif
227 #undef CYTHON_USE_PYTYPE_LOOKUP
228 #define CYTHON_USE_PYTYPE_LOOKUP 0
229 #if PY_VERSION_HEX < 0x03050000
230 #undef CYTHON_USE_ASYNC_SLOTS
231 #define CYTHON_USE_ASYNC_SLOTS 0
232 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
233 #define CYTHON_USE_ASYNC_SLOTS 1
234 #endif
235 #undef CYTHON_USE_PYLIST_INTERNALS
236 #define CYTHON_USE_PYLIST_INTERNALS 0
237 #undef CYTHON_USE_UNICODE_INTERNALS
238 #define CYTHON_USE_UNICODE_INTERNALS 0
239 #undef CYTHON_USE_UNICODE_WRITER
240 #define CYTHON_USE_UNICODE_WRITER 0
241 #undef CYTHON_USE_PYLONG_INTERNALS
242 #define CYTHON_USE_PYLONG_INTERNALS 0
243 #undef CYTHON_AVOID_BORROWED_REFS
244 #define CYTHON_AVOID_BORROWED_REFS 1
245 #undef CYTHON_ASSUME_SAFE_MACROS
246 #define CYTHON_ASSUME_SAFE_MACROS 0
247 #undef CYTHON_UNPACK_METHODS
248 #define CYTHON_UNPACK_METHODS 0
249 #undef CYTHON_FAST_THREAD_STATE
250 #define CYTHON_FAST_THREAD_STATE 0
251 #undef CYTHON_FAST_GIL
252 #define CYTHON_FAST_GIL 0
253 #undef CYTHON_METH_FASTCALL
254 #define CYTHON_METH_FASTCALL 0
255 #undef CYTHON_FAST_PYCALL
256 #define CYTHON_FAST_PYCALL 0
257 #ifndef CYTHON_PEP487_INIT_SUBCLASS
258 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
259 #endif
260 #if PY_VERSION_HEX < 0x03090000
261 #undef CYTHON_PEP489_MULTI_PHASE_INIT
262 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
263 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
264 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
265 #endif
266 #undef CYTHON_USE_MODULE_STATE
267 #define CYTHON_USE_MODULE_STATE 0
268 #undef CYTHON_USE_TP_FINALIZE
269 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
270 #undef CYTHON_USE_DICT_VERSIONS
271 #define CYTHON_USE_DICT_VERSIONS 0
272 #undef CYTHON_USE_EXC_INFO_STACK
273 #define CYTHON_USE_EXC_INFO_STACK 0
274 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
275 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
276 #endif
277 #undef CYTHON_USE_FREELISTS
278 #define CYTHON_USE_FREELISTS 0
279 #elif defined(CYTHON_LIMITED_API)
280 #ifdef Py_LIMITED_API
281 #undef __PYX_LIMITED_VERSION_HEX
282 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
283 #endif
284 #define CYTHON_COMPILING_IN_PYPY 0
285 #define CYTHON_COMPILING_IN_CPYTHON 0
286 #define CYTHON_COMPILING_IN_LIMITED_API 1
287 #define CYTHON_COMPILING_IN_GRAAL 0
288 #define CYTHON_COMPILING_IN_NOGIL 0
289 #undef CYTHON_CLINE_IN_TRACEBACK
290 #define CYTHON_CLINE_IN_TRACEBACK 0
291 #undef CYTHON_USE_TYPE_SLOTS
292 #define CYTHON_USE_TYPE_SLOTS 0
293 #undef CYTHON_USE_TYPE_SPECS
294 #define CYTHON_USE_TYPE_SPECS 1
295 #undef CYTHON_USE_PYTYPE_LOOKUP
296 #define CYTHON_USE_PYTYPE_LOOKUP 0
297 #undef CYTHON_USE_ASYNC_SLOTS
298 #define CYTHON_USE_ASYNC_SLOTS 0
299 #undef CYTHON_USE_PYLIST_INTERNALS
300 #define CYTHON_USE_PYLIST_INTERNALS 0
301 #undef CYTHON_USE_UNICODE_INTERNALS
302 #define CYTHON_USE_UNICODE_INTERNALS 0
303 #ifndef CYTHON_USE_UNICODE_WRITER
304 #define CYTHON_USE_UNICODE_WRITER 0
305 #endif
306 #undef CYTHON_USE_PYLONG_INTERNALS
307 #define CYTHON_USE_PYLONG_INTERNALS 0
308 #ifndef CYTHON_AVOID_BORROWED_REFS
309 #define CYTHON_AVOID_BORROWED_REFS 0
310 #endif
311 #undef CYTHON_ASSUME_SAFE_MACROS
312 #define CYTHON_ASSUME_SAFE_MACROS 0
313 #undef CYTHON_UNPACK_METHODS
314 #define CYTHON_UNPACK_METHODS 0
315 #undef CYTHON_FAST_THREAD_STATE
316 #define CYTHON_FAST_THREAD_STATE 0
317 #undef CYTHON_FAST_GIL
318 #define CYTHON_FAST_GIL 0
319 #undef CYTHON_METH_FASTCALL
320 #define CYTHON_METH_FASTCALL 0
321 #undef CYTHON_FAST_PYCALL
322 #define CYTHON_FAST_PYCALL 0
323 #ifndef CYTHON_PEP487_INIT_SUBCLASS
324 #define CYTHON_PEP487_INIT_SUBCLASS 1
325 #endif
326 #undef CYTHON_PEP489_MULTI_PHASE_INIT
327 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
328 #undef CYTHON_USE_MODULE_STATE
329 #define CYTHON_USE_MODULE_STATE 1
330 #ifndef CYTHON_USE_TP_FINALIZE
331 #define CYTHON_USE_TP_FINALIZE 0
332 #endif
333 #undef CYTHON_USE_DICT_VERSIONS
334 #define CYTHON_USE_DICT_VERSIONS 0
335 #undef CYTHON_USE_EXC_INFO_STACK
336 #define CYTHON_USE_EXC_INFO_STACK 0
337 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
338 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
339 #endif
340 #undef CYTHON_USE_FREELISTS
341 #define CYTHON_USE_FREELISTS 0
342 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
343 #define CYTHON_COMPILING_IN_PYPY 0
344 #define CYTHON_COMPILING_IN_CPYTHON 0
345 #define CYTHON_COMPILING_IN_LIMITED_API 0
346 #define CYTHON_COMPILING_IN_GRAAL 0
347 #define CYTHON_COMPILING_IN_NOGIL 1
348 #ifndef CYTHON_USE_TYPE_SLOTS
349 #define CYTHON_USE_TYPE_SLOTS 1
350 #endif
351 #ifndef CYTHON_USE_TYPE_SPECS
352 #define CYTHON_USE_TYPE_SPECS 0
353 #endif
354 #undef CYTHON_USE_PYTYPE_LOOKUP
355 #define CYTHON_USE_PYTYPE_LOOKUP 0
356 #ifndef CYTHON_USE_ASYNC_SLOTS
357 #define CYTHON_USE_ASYNC_SLOTS 1
358 #endif
359 #ifndef CYTHON_USE_PYLONG_INTERNALS
360 #define CYTHON_USE_PYLONG_INTERNALS 0
361 #endif
362 #undef CYTHON_USE_PYLIST_INTERNALS
363 #define CYTHON_USE_PYLIST_INTERNALS 0
364 #ifndef CYTHON_USE_UNICODE_INTERNALS
365 #define CYTHON_USE_UNICODE_INTERNALS 1
366 #endif
367 #undef CYTHON_USE_UNICODE_WRITER
368 #define CYTHON_USE_UNICODE_WRITER 0
369 #ifndef CYTHON_AVOID_BORROWED_REFS
370 #define CYTHON_AVOID_BORROWED_REFS 0
371 #endif
372 #ifndef CYTHON_ASSUME_SAFE_MACROS
373 #define CYTHON_ASSUME_SAFE_MACROS 1
374 #endif
375 #ifndef CYTHON_UNPACK_METHODS
376 #define CYTHON_UNPACK_METHODS 1
377 #endif
378 #undef CYTHON_FAST_THREAD_STATE
379 #define CYTHON_FAST_THREAD_STATE 0
380 #undef CYTHON_FAST_GIL
381 #define CYTHON_FAST_GIL 0
382 #ifndef CYTHON_METH_FASTCALL
383 #define CYTHON_METH_FASTCALL 1
384 #endif
385 #undef CYTHON_FAST_PYCALL
386 #define CYTHON_FAST_PYCALL 0
387 #ifndef CYTHON_PEP487_INIT_SUBCLASS
388 #define CYTHON_PEP487_INIT_SUBCLASS 1
389 #endif
390 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
391 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
392 #endif
393 #ifndef CYTHON_USE_MODULE_STATE
394 #define CYTHON_USE_MODULE_STATE 0
395 #endif
396 #ifndef CYTHON_USE_TP_FINALIZE
397 #define CYTHON_USE_TP_FINALIZE 1
398 #endif
399 #undef CYTHON_USE_DICT_VERSIONS
400 #define CYTHON_USE_DICT_VERSIONS 0
401 #undef CYTHON_USE_EXC_INFO_STACK
402 #define CYTHON_USE_EXC_INFO_STACK 0
403 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
404 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
405 #endif
406 #ifndef CYTHON_USE_FREELISTS
407 #define CYTHON_USE_FREELISTS 0
408 #endif
409 #else
410 #define CYTHON_COMPILING_IN_PYPY 0
411 #define CYTHON_COMPILING_IN_CPYTHON 1
412 #define CYTHON_COMPILING_IN_LIMITED_API 0
413 #define CYTHON_COMPILING_IN_GRAAL 0
414 #define CYTHON_COMPILING_IN_NOGIL 0
415 #ifndef CYTHON_USE_TYPE_SLOTS
416 #define CYTHON_USE_TYPE_SLOTS 1
417 #endif
418 #ifndef CYTHON_USE_TYPE_SPECS
419 #define CYTHON_USE_TYPE_SPECS 0
420 #endif
421 #ifndef CYTHON_USE_PYTYPE_LOOKUP
422 #define CYTHON_USE_PYTYPE_LOOKUP 1
423 #endif
424 #if PY_MAJOR_VERSION < 3
425 #undef CYTHON_USE_ASYNC_SLOTS
426 #define CYTHON_USE_ASYNC_SLOTS 0
427 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
428 #define CYTHON_USE_ASYNC_SLOTS 1
429 #endif
430 #ifndef CYTHON_USE_PYLONG_INTERNALS
431 #define CYTHON_USE_PYLONG_INTERNALS 1
432 #endif
433 #ifndef CYTHON_USE_PYLIST_INTERNALS
434 #define CYTHON_USE_PYLIST_INTERNALS 1
435 #endif
436 #ifndef CYTHON_USE_UNICODE_INTERNALS
437 #define CYTHON_USE_UNICODE_INTERNALS 1
438 #endif
439 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
440 #undef CYTHON_USE_UNICODE_WRITER
441 #define CYTHON_USE_UNICODE_WRITER 0
442 #elif !defined(CYTHON_USE_UNICODE_WRITER)
443 #define CYTHON_USE_UNICODE_WRITER 1
444 #endif
445 #ifndef CYTHON_AVOID_BORROWED_REFS
446 #define CYTHON_AVOID_BORROWED_REFS 0
447 #endif
448 #ifndef CYTHON_ASSUME_SAFE_MACROS
449 #define CYTHON_ASSUME_SAFE_MACROS 1
450 #endif
451 #ifndef CYTHON_UNPACK_METHODS
452 #define CYTHON_UNPACK_METHODS 1
453 #endif
454 #ifndef CYTHON_FAST_THREAD_STATE
455 #define CYTHON_FAST_THREAD_STATE 1
456 #endif
457 #ifndef CYTHON_FAST_GIL
458 #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
459 #endif
460 #ifndef CYTHON_METH_FASTCALL
461 #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
462 #endif
463 #ifndef CYTHON_FAST_PYCALL
464 #define CYTHON_FAST_PYCALL 1
465 #endif
466 #ifndef CYTHON_PEP487_INIT_SUBCLASS
467 #define CYTHON_PEP487_INIT_SUBCLASS 1
468 #endif
469 #if PY_VERSION_HEX < 0x03050000
470 #undef CYTHON_PEP489_MULTI_PHASE_INIT
471 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
472 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
473 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
474 #endif
475 #ifndef CYTHON_USE_MODULE_STATE
476 #define CYTHON_USE_MODULE_STATE 0
477 #endif
478 #if PY_VERSION_HEX < 0x030400a1
479 #undef CYTHON_USE_TP_FINALIZE
480 #define CYTHON_USE_TP_FINALIZE 0
481 #elif !defined(CYTHON_USE_TP_FINALIZE)
482 #define CYTHON_USE_TP_FINALIZE 1
483 #endif
484 #if PY_VERSION_HEX < 0x030600B1
485 #undef CYTHON_USE_DICT_VERSIONS
486 #define CYTHON_USE_DICT_VERSIONS 0
487 #elif !defined(CYTHON_USE_DICT_VERSIONS)
488 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5)
489 #endif
490 #if PY_VERSION_HEX < 0x030700A3
491 #undef CYTHON_USE_EXC_INFO_STACK
492 #define CYTHON_USE_EXC_INFO_STACK 0
493 #elif !defined(CYTHON_USE_EXC_INFO_STACK)
494 #define CYTHON_USE_EXC_INFO_STACK 1
495 #endif
496 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
497 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
498 #endif
499 #ifndef CYTHON_USE_FREELISTS
500 #define CYTHON_USE_FREELISTS 1
501 #endif
502 #endif
503 #if !defined(CYTHON_FAST_PYCCALL)
504 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
505 #endif
506 #if !defined(CYTHON_VECTORCALL)
507 #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
508 #endif
509 #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
510 #if CYTHON_USE_PYLONG_INTERNALS
511 #if PY_MAJOR_VERSION < 3
512 #include "longintrepr.h"
513 #endif
514 #undef SHIFT
515 #undef BASE
516 #undef MASK
517 #ifdef SIZEOF_VOID_P
518 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
519 #endif
520 #endif
521 #ifndef __has_attribute
522 #define __has_attribute(x) 0
523 #endif
524 #ifndef __has_cpp_attribute
525 #define __has_cpp_attribute(x) 0
526 #endif
527 #ifndef CYTHON_RESTRICT
528 #if defined(__GNUC__)
529 #define CYTHON_RESTRICT __restrict__
530 #elif defined(_MSC_VER) && _MSC_VER >= 1400
531 #define CYTHON_RESTRICT __restrict
532 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
533 #define CYTHON_RESTRICT restrict
534 #else
535 #define CYTHON_RESTRICT
536 #endif
537 #endif
538 #ifndef CYTHON_UNUSED
539 #if defined(__cplusplus)
540 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
541 * but leads to warnings with -pedantic, since it is a C++17 feature */
542 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
543 #if __has_cpp_attribute(maybe_unused)
544 #define CYTHON_UNUSED [[maybe_unused]]
545 #endif
546 #endif
547 #endif
548 #endif
549 #ifndef CYTHON_UNUSED
550 # if defined(__GNUC__)
551 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
552 # define CYTHON_UNUSED __attribute__ ((__unused__))
553 # else
554 # define CYTHON_UNUSED
555 # endif
556 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
557 # define CYTHON_UNUSED __attribute__ ((__unused__))
558 # else
559 # define CYTHON_UNUSED
560 # endif
561 #endif
562 #ifndef CYTHON_UNUSED_VAR
563 # if defined(__cplusplus)
564 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
565 # else
566 # define CYTHON_UNUSED_VAR(x) (void)(x)
567 # endif
568 #endif
569 #ifndef CYTHON_MAYBE_UNUSED_VAR
570 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
571 #endif
572 #ifndef CYTHON_NCP_UNUSED
573 # if CYTHON_COMPILING_IN_CPYTHON
574 # define CYTHON_NCP_UNUSED
575 # else
576 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
577 # endif
578 #endif
579 #ifndef CYTHON_USE_CPP_STD_MOVE
580 #if defined(__cplusplus) && (\
581 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
582 #define CYTHON_USE_CPP_STD_MOVE 1
583 #else
584 #define CYTHON_USE_CPP_STD_MOVE 0
585 #endif
586 #endif
587 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
588 #ifdef _MSC_VER
589 #ifndef _MSC_STDINT_H_
590 #if _MSC_VER < 1300
591 typedef unsigned char uint8_t;
592 typedef unsigned short uint16_t;
593 typedef unsigned int uint32_t;
594 #else
595 typedef unsigned __int8 uint8_t;
596 typedef unsigned __int16 uint16_t;
597 typedef unsigned __int32 uint32_t;
598 #endif
599 #endif
600 #if _MSC_VER < 1300
601 #ifdef _WIN64
602 typedef unsigned long long __pyx_uintptr_t;
603 #else
604 typedef unsigned int __pyx_uintptr_t;
605 #endif
606 #else
607 #ifdef _WIN64
608 typedef unsigned __int64 __pyx_uintptr_t;
609 #else
610 typedef unsigned __int32 __pyx_uintptr_t;
611 #endif
612 #endif
613 #else
614 #include <stdint.h>
615 typedef uintptr_t __pyx_uintptr_t;
616 #endif
617 #ifndef CYTHON_FALLTHROUGH
618 #if defined(__cplusplus)
619 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
620 * but leads to warnings with -pedantic, since it is a C++17 feature */
621 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
622 #if __has_cpp_attribute(fallthrough)
623 #define CYTHON_FALLTHROUGH [[fallthrough]]
624 #endif
625 #endif
626 #ifndef CYTHON_FALLTHROUGH
627 #if __has_cpp_attribute(clang::fallthrough)
628 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
629 #elif __has_cpp_attribute(gnu::fallthrough)
630 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
631 #endif
632 #endif
633 #endif
634 #ifndef CYTHON_FALLTHROUGH
635 #if __has_attribute(fallthrough)
636 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
637 #else
638 #define CYTHON_FALLTHROUGH
639 #endif
640 #endif
641 #if defined(__clang__) && defined(__apple_build_version__)
642 #if __apple_build_version__ < 7000000
643 #undef CYTHON_FALLTHROUGH
644 #define CYTHON_FALLTHROUGH
645 #endif
646 #endif
647 #endif
648 #ifdef __cplusplus
649 template <typename T>
650 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
651 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
652 #else
653 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
654 #endif
655 #if CYTHON_COMPILING_IN_PYPY == 1
656 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
657 #else
658 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
659 #endif
660 #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
661
662 #ifndef CYTHON_INLINE
663 #if defined(__clang__)
664 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
665 #elif defined(__GNUC__)
666 #define CYTHON_INLINE __inline__
667 #elif defined(_MSC_VER)
668 #define CYTHON_INLINE __inline
669 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
670 #define CYTHON_INLINE inline
671 #else
672 #define CYTHON_INLINE
673 #endif
674 #endif
675
676 #define __PYX_BUILD_PY_SSIZE_T "n"
677 #define CYTHON_FORMAT_SSIZE_T "z"
678 #if PY_MAJOR_VERSION < 3
679 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
680 #define __Pyx_DefaultClassType PyClass_Type
681 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
682 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
683 #else
684 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
685 #define __Pyx_DefaultClassType PyType_Type
686 #if CYTHON_COMPILING_IN_LIMITED_API
687 static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
688 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
689 PyObject *fv, PyObject *cell, PyObject* fn,
690 PyObject *name, int fline, PyObject *lnos) {
691 PyObject *exception_table = NULL;
692 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
693 #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
694 PyObject *version_info;
695 PyObject *py_minor_version = NULL;
696 #endif
697 long minor_version = 0;
698 PyObject *type, *value, *traceback;
699 PyErr_Fetch(&type, &value, &traceback);
700 #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
701 minor_version = 11;
702 #else
703 if (!(version_info = PySys_GetObject("version_info"))) goto end;
704 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
705 minor_version = PyLong_AsLong(py_minor_version);
706 Py_DECREF(py_minor_version);
707 if (minor_version == -1 && PyErr_Occurred()) goto end;
708 #endif
709 if (!(types_module = PyImport_ImportModule("types"))) goto end;
710 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
711 if (minor_version <= 7) {
712 (void)p;
713 result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
714 c, n, v, fn, name, fline, lnos, fv, cell);
715 } else if (minor_version <= 10) {
716 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
717 c, n, v, fn, name, fline, lnos, fv, cell);
718 } else {
719 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
720 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
721 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
722 }
723 end:
724 Py_XDECREF(code_type);
725 Py_XDECREF(exception_table);
726 Py_XDECREF(types_module);
727 if (type) {
728 PyErr_Restore(type, value, traceback);
729 }
730 return result;
731 }
732 #ifndef CO_OPTIMIZED
733 #define CO_OPTIMIZED 0x0001
734 #endif
735 #ifndef CO_NEWLOCALS
736 #define CO_NEWLOCALS 0x0002
737 #endif
738 #ifndef CO_VARARGS
739 #define CO_VARARGS 0x0004
740 #endif
741 #ifndef CO_VARKEYWORDS
742 #define CO_VARKEYWORDS 0x0008
743 #endif
744 #ifndef CO_ASYNC_GENERATOR
745 #define CO_ASYNC_GENERATOR 0x0200
746 #endif
747 #ifndef CO_GENERATOR
748 #define CO_GENERATOR 0x0020
749 #endif
750 #ifndef CO_COROUTINE
751 #define CO_COROUTINE 0x0080
752 #endif
753 #elif PY_VERSION_HEX >= 0x030B0000
754 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
755 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
756 PyObject *fv, PyObject *cell, PyObject* fn,
757 PyObject *name, int fline, PyObject *lnos) {
758 PyCodeObject *result;
759 PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
760 if (!empty_bytes) return NULL;
761 result =
762 #if PY_VERSION_HEX >= 0x030C0000
763 PyUnstable_Code_NewWithPosOnlyArgs
764 #else
765 PyCode_NewWithPosOnlyArgs
766 #endif
767 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
768 Py_DECREF(empty_bytes);
769 return result;
770 }
771 #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
772 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
773 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
774 #else
775 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
776 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
777 #endif
778 #endif
779 #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
780 #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
781 #else
782 #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
783 #endif
784 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
785 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
786 #else
787 #define __Pyx_Py_Is(x, y) ((x) == (y))
788 #endif
789 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
790 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
791 #else
792 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
793 #endif
794 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
795 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
796 #else
797 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
798 #endif
799 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
800 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
801 #else
802 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
803 #endif
804 #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
805 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
806 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
807 #else
808 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
809 #endif
810 #ifndef CO_COROUTINE
811 #define CO_COROUTINE 0x80
812 #endif
813 #ifndef CO_ASYNC_GENERATOR
814 #define CO_ASYNC_GENERATOR 0x200
815 #endif
816 #ifndef Py_TPFLAGS_CHECKTYPES
817 #define Py_TPFLAGS_CHECKTYPES 0
818 #endif
819 #ifndef Py_TPFLAGS_HAVE_INDEX
820 #define Py_TPFLAGS_HAVE_INDEX 0
821 #endif
822 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
823 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
824 #endif
825 #ifndef Py_TPFLAGS_HAVE_FINALIZE
826 #define Py_TPFLAGS_HAVE_FINALIZE 0
827 #endif
828 #ifndef Py_TPFLAGS_SEQUENCE
829 #define Py_TPFLAGS_SEQUENCE 0
830 #endif
831 #ifndef Py_TPFLAGS_MAPPING
832 #define Py_TPFLAGS_MAPPING 0
833 #endif
834 #ifndef METH_STACKLESS
835 #define METH_STACKLESS 0
836 #endif
837 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
838 #ifndef METH_FASTCALL
839 #define METH_FASTCALL 0x80
840 #endif
841 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
842 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
843 Py_ssize_t nargs, PyObject *kwnames);
844 #else
845 #if PY_VERSION_HEX >= 0x030d00A4
846 # define __Pyx_PyCFunctionFast PyCFunctionFast
847 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
848 #else
849 # define __Pyx_PyCFunctionFast _PyCFunctionFast
850 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
851 #endif
852 #endif
853 #if CYTHON_METH_FASTCALL
854 #define __Pyx_METH_FASTCALL METH_FASTCALL
855 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
856 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
857 #else
858 #define __Pyx_METH_FASTCALL METH_VARARGS
859 #define __Pyx_PyCFunction_FastCall PyCFunction
860 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
861 #endif
862 #if CYTHON_VECTORCALL
863 #define __pyx_vectorcallfunc vectorcallfunc
864 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
865 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
866 #elif CYTHON_BACKPORT_VECTORCALL
867 typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
868 size_t nargsf, PyObject *kwnames);
869 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
870 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
871 #else
872 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
873 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
874 #endif
875 #if PY_MAJOR_VERSION >= 0x030900B1
876 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
877 #else
878 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
879 #endif
880 #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
881 #if CYTHON_COMPILING_IN_CPYTHON
882 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
883 #elif !CYTHON_COMPILING_IN_LIMITED_API
884 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
885 #endif
886 #if CYTHON_COMPILING_IN_CPYTHON
887 #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
888 static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
889 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
890 }
891 #endif
892 static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
893 #if CYTHON_COMPILING_IN_LIMITED_API
894 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
895 #else
896 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
897 #endif
898 }
899 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
900 #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
901 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
902 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
903 #else
904 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
905 #define __Pyx_PyCMethod PyCMethod
906 #endif
907 #ifndef METH_METHOD
908 #define METH_METHOD 0x200
909 #endif
910 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
911 #define PyObject_Malloc(s) PyMem_Malloc(s)
912 #define PyObject_Free(p) PyMem_Free(p)
913 #define PyObject_Realloc(p) PyMem_Realloc(p)
914 #endif
915 #if CYTHON_COMPILING_IN_LIMITED_API
916 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
917 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
918 #else
919 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
920 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
921 #endif
922 #if CYTHON_COMPILING_IN_LIMITED_API
923 #define __Pyx_PyThreadState_Current PyThreadState_Get()
924 #elif !CYTHON_FAST_THREAD_STATE
925 #define __Pyx_PyThreadState_Current PyThreadState_GET()
926 #elif PY_VERSION_HEX >= 0x030d00A1
927 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
928 #elif PY_VERSION_HEX >= 0x03060000
929 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
930 #elif PY_VERSION_HEX >= 0x03000000
931 #define __Pyx_PyThreadState_Current PyThreadState_GET()
932 #else
933 #define __Pyx_PyThreadState_Current _PyThreadState_Current
934 #endif
935 #if CYTHON_COMPILING_IN_LIMITED_API
936 static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
937 {
938 void *result;
939 result = PyModule_GetState(op);
940 if (!result)
941 Py_FatalError("Couldn't find the module state");
942 return result;
943 }
944 #endif
945 #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
946 #if CYTHON_COMPILING_IN_LIMITED_API
947 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
948 #else
949 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
950 #endif
951 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
952 #include "pythread.h"
953 #define Py_tss_NEEDS_INIT 0
954 typedef int Py_tss_t;
955 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
956 *key = PyThread_create_key();
957 return 0;
958 }
959 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
960 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
961 *key = Py_tss_NEEDS_INIT;
962 return key;
963 }
964 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
965 PyObject_Free(key);
966 }
967 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
968 return *key != Py_tss_NEEDS_INIT;
969 }
970 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
971 PyThread_delete_key(*key);
972 *key = Py_tss_NEEDS_INIT;
973 }
974 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
975 return PyThread_set_key_value(*key, value);
976 }
977 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
978 return PyThread_get_key_value(*key);
979 }
980 #endif
981 #if PY_MAJOR_VERSION < 3
982 #if CYTHON_COMPILING_IN_PYPY
983 #if PYPY_VERSION_NUM < 0x07030600
984 #if defined(__cplusplus) && __cplusplus >= 201402L
985 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
986 #elif defined(__GNUC__) || defined(__clang__)
987 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
988 #elif defined(_MSC_VER)
989 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
990 #endif
991 static CYTHON_INLINE int PyGILState_Check(void) {
992 return 0;
993 }
994 #else // PYPY_VERSION_NUM < 0x07030600
995 #endif // PYPY_VERSION_NUM < 0x07030600
996 #else
997 static CYTHON_INLINE int PyGILState_Check(void) {
998 PyThreadState * tstate = _PyThreadState_Current;
999 return tstate && (tstate == PyGILState_GetThisThreadState());
1000 }
1001 #endif
1002 #endif
1003 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
1004 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
1005 #else
1006 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
1007 #endif
1008 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
1009 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
1010 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
1011 #else
1012 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
1013 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
1014 #endif
1015 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
1016 #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
1017 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
1018 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
1019 if (res == NULL) PyErr_Clear();
1020 return res;
1021 }
1022 #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
1023 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
1024 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
1025 #else
1026 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
1027 #if CYTHON_COMPILING_IN_PYPY
1028 return PyDict_GetItem(dict, name);
1029 #else
1030 PyDictEntry *ep;
1031 PyDictObject *mp = (PyDictObject*) dict;
1032 long hash = ((PyStringObject *) name)->ob_shash;
1033 assert(hash != -1);
1034 ep = (mp->ma_lookup)(mp, name, hash);
1035 if (ep == NULL) {
1036 return NULL;
1037 }
1038 return ep->me_value;
1039 #endif
1040 }
1041 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
1042 #endif
1043 #if CYTHON_USE_TYPE_SLOTS
1044 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
1045 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
1046 #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext)
1047 #else
1048 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
1049 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
1050 #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next
1051 #endif
1052 #if CYTHON_COMPILING_IN_LIMITED_API
1053 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
1054 #else
1055 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
1056 #endif
1057 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
1058 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
1059 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
1060 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
1061 PyObject_GC_Del(obj);\
1062 Py_DECREF(type);\
1063 }
1064 #else
1065 #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
1066 #endif
1067 #if CYTHON_COMPILING_IN_LIMITED_API
1068 #define CYTHON_PEP393_ENABLED 1
1069 #define __Pyx_PyUnicode_READY(op) (0)
1070 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u)
1071 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
1072 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
1073 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
1074 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
1075 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
1076 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
1077 #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
1078 #define CYTHON_PEP393_ENABLED 1
1079 #if PY_VERSION_HEX >= 0x030C0000
1080 #define __Pyx_PyUnicode_READY(op) (0)
1081 #else
1082 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
1083 0 : _PyUnicode_Ready((PyObject *)(op)))
1084 #endif
1085 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
1086 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
1087 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
1088 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
1089 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
1090 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
1091 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
1092 #if PY_VERSION_HEX >= 0x030C0000
1093 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
1094 #else
1095 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
1096 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
1097 #else
1098 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
1099 #endif
1100 #endif
1101 #else
1102 #define CYTHON_PEP393_ENABLED 0
1103 #define PyUnicode_1BYTE_KIND 1
1104 #define PyUnicode_2BYTE_KIND 2
1105 #define PyUnicode_4BYTE_KIND 4
1106 #define __Pyx_PyUnicode_READY(op) (0)
1107 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
1108 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
1109 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
1110 #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE))
1111 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
1112 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
1113 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
1114 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
1115 #endif
1116 #if CYTHON_COMPILING_IN_PYPY
1117 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
1118 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
1119 #else
1120 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
1121 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
1122 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
1123 #endif
1124 #if CYTHON_COMPILING_IN_PYPY
1125 #if !defined(PyUnicode_DecodeUnicodeEscape)
1126 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
1127 #endif
1128 #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
1129 #undef PyUnicode_Contains
1130 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
1131 #endif
1132 #if !defined(PyByteArray_Check)
1133 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
1134 #endif
1135 #if !defined(PyObject_Format)
1136 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
1137 #endif
1138 #endif
1139 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
1140 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
1141 #if PY_MAJOR_VERSION >= 3
1142 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
1143 #else
1144 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
1145 #endif
1146 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
1147 #define PyObject_ASCII(o) PyObject_Repr(o)
1148 #endif
1149 #if PY_MAJOR_VERSION >= 3
1150 #define PyBaseString_Type PyUnicode_Type
1151 #define PyStringObject PyUnicodeObject
1152 #define PyString_Type PyUnicode_Type
1153 #define PyString_Check PyUnicode_Check
1154 #define PyString_CheckExact PyUnicode_CheckExact
1155 #ifndef PyObject_Unicode
1156 #define PyObject_Unicode PyObject_Str
1157 #endif
1158 #endif
1159 #if PY_MAJOR_VERSION >= 3
1160 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
1161 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
1162 #else
1163 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
1164 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
1165 #endif
1166 #if CYTHON_COMPILING_IN_CPYTHON
1167 #define __Pyx_PySequence_ListKeepNew(obj)\
1168 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
1169 #else
1170 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
1171 #endif
1172 #ifndef PySet_CheckExact
1173 #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
1174 #endif
1175 #if PY_VERSION_HEX >= 0x030900A4
1176 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
1177 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
1178 #else
1179 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
1180 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
1181 #endif
1182 #if CYTHON_ASSUME_SAFE_MACROS
1183 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1184 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1185 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1186 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1187 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1188 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1189 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1190 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1191 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1192 #else
1193 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1194 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1195 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1196 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1197 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1198 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1199 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1200 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1201 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1202 #endif
1203 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
1204 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
1205 #else
1206 static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
1207 PyObject *module = PyImport_AddModule(name);
1208 Py_XINCREF(module);
1209 return module;
1210 }
1211 #endif
1212 #if PY_MAJOR_VERSION >= 3
1213 #define PyIntObject PyLongObject
1214 #define PyInt_Type PyLong_Type
1215 #define PyInt_Check(op) PyLong_Check(op)
1216 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
1217 #define __Pyx_Py3Int_Check(op) PyLong_Check(op)
1218 #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op)
1219 #define PyInt_FromString PyLong_FromString
1220 #define PyInt_FromUnicode PyLong_FromUnicode
1221 #define PyInt_FromLong PyLong_FromLong
1222 #define PyInt_FromSize_t PyLong_FromSize_t
1223 #define PyInt_FromSsize_t PyLong_FromSsize_t
1224 #define PyInt_AsLong PyLong_AsLong
1225 #define PyInt_AS_LONG PyLong_AS_LONG
1226 #define PyInt_AsSsize_t PyLong_AsSsize_t
1227 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
1228 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
1229 #define PyNumber_Int PyNumber_Long
1230 #else
1231 #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op))
1232 #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op))
1233 #endif
1234 #if PY_MAJOR_VERSION >= 3
1235 #define PyBoolObject PyLongObject
1236 #endif
1237 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
1238 #ifndef PyUnicode_InternFromString
1239 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1240 #endif
1241 #endif
1242 #if PY_VERSION_HEX < 0x030200A4
1243 typedef long Py_hash_t;
1244 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
1245 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
1246 #else
1247 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
1248 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
1249 #endif
1250 #if CYTHON_USE_ASYNC_SLOTS
1251 #if PY_VERSION_HEX >= 0x030500B1
1252 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1253 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
1254 #else
1255 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
1256 #endif
1257 #else
1258 #define __Pyx_PyType_AsAsync(obj) NULL
1259 #endif
1260 #ifndef __Pyx_PyAsyncMethodsStruct
1261 typedef struct {
1262 unaryfunc am_await;
1263 unaryfunc am_aiter;
1264 unaryfunc am_anext;
1265 } __Pyx_PyAsyncMethodsStruct;
1266 #endif
1267
1268 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1269 #if !defined(_USE_MATH_DEFINES)
1270 #define _USE_MATH_DEFINES
1271 #endif
1272 #endif
1273 #include <math.h>
1274 #ifdef NAN
1275 #define __PYX_NAN() ((float) NAN)
1276 #else
1277 static CYTHON_INLINE float __PYX_NAN() {
1278 float value;
1279 memset(&value, 0xFF, sizeof(value));
1280 return value;
1281 }
1282 #endif
1283 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1284 #define __Pyx_truncl trunc
1285 #else
1286 #define __Pyx_truncl truncl
1287 #endif
1288
1289 #define __PYX_MARK_ERR_POS(f_index, lineno) \
1290 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
1291 #define __PYX_ERR(f_index, lineno, Ln_error) \
1292 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1293
1294 #ifdef CYTHON_EXTERN_C
1295 #undef __PYX_EXTERN_C
1296 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1297 #elif defined(__PYX_EXTERN_C)
1298 #ifdef _MSC_VER
1299 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1300 #else
1301 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1302 #endif
1303 #else
1304 #ifdef __cplusplus
1305 #define __PYX_EXTERN_C extern "C"
1306 #else
1307 #define __PYX_EXTERN_C extern
1308 #endif
1309 #endif
1310
1311 #define __PYX_HAVE__pysam__libcbcf
1312 #define __PYX_HAVE_API__pysam__libcbcf
1313 /* Early includes */
1314 #include <stdint.h>
1315 #include <string.h>
1316 #include <stdlib.h>
1317 #include <stdio.h>
1318 #include <sys/types.h>
1319 #include "stdarg.h"
1320 #include "htslib/kstring.h"
1321 #include "htslib_util.h"
1322 #include "htslib/hfile.h"
1323 #include "htslib/bgzf.h"
1324 #include "htslib/hts.h"
1325 #include "htslib/sam.h"
1326 #include "htslib/faidx.h"
1327 #include "htslib/tbx.h"
1328 #include "htslib/vcf.h"
1329 #include "htslib/vcfutils.h"
1330 #include "htslib/cram.h"
1331 #include <errno.h>
1332 #include <stddef.h>
1333 #include "pythread.h"
1334
1335 #if CYTHON_COMPILING_IN_PYPY
1336 #ifdef _MSC_VER
1337 #pragma message ("This module uses CPython specific internals of 'array.array', which are not available in PyPy.")
1338 #else
1339 #warning This module uses CPython specific internals of 'array.array', which are not available in PyPy.
1340 #endif
1341 #endif
1342
1343 #ifdef _OPENMP
1344 #include <omp.h>
1345 #endif /* _OPENMP */
1346
1347 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1348 #define CYTHON_WITHOUT_ASSERTIONS
1349 #endif
1350
1351 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
1352 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
1353
1354 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1355 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1356 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
1357 #define __PYX_DEFAULT_STRING_ENCODING ""
1358 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1359 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1360 #define __Pyx_uchar_cast(c) ((unsigned char)c)
1361 #define __Pyx_long_cast(x) ((long)x)
1362 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1363 (sizeof(type) < sizeof(Py_ssize_t)) ||\
1364 (sizeof(type) > sizeof(Py_ssize_t) &&\
1365 likely(v < (type)PY_SSIZE_T_MAX ||\
1366 v == (type)PY_SSIZE_T_MAX) &&\
1367 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1368 v == (type)PY_SSIZE_T_MIN))) ||\
1369 (sizeof(type) == sizeof(Py_ssize_t) &&\
1370 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1371 v == (type)PY_SSIZE_T_MAX))) )
1372 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1373 return (size_t) i < (size_t) limit;
1374 }
1375 #if defined (__cplusplus) && __cplusplus >= 201103L
1376 #include <cstdlib>
1377 #define __Pyx_sst_abs(value) std::abs(value)
1378 #elif SIZEOF_INT >= SIZEOF_SIZE_T
1379 #define __Pyx_sst_abs(value) abs(value)
1380 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
1381 #define __Pyx_sst_abs(value) labs(value)
1382 #elif defined (_MSC_VER)
1383 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1384 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1385 #define __Pyx_sst_abs(value) llabs(value)
1386 #elif defined (__GNUC__)
1387 #define __Pyx_sst_abs(value) __builtin_llabs(value)
1388 #else
1389 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1390 #endif
1391 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
1392 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
1393 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1394 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
1395 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1396 #define __Pyx_PyBytes_FromString PyBytes_FromString
1397 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1398 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
1399 #if PY_MAJOR_VERSION < 3
1400 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
1401 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1402 #else
1403 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
1404 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
1405 #endif
1406 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1407 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1408 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1409 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1410 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1411 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1412 #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1413 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1414 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1415 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1416 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1417 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1418 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1419 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1420 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
1421 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1422 #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1423 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1424 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
1425 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
1426 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
1427 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
1428 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1429 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
1430 #define __Pyx_PySequence_Tuple(obj)\
1431 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1432 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1433 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
1434 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1435 #if CYTHON_ASSUME_SAFE_MACROS
1436 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1437 #else
1438 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1439 #endif
1440 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
1441 #if PY_MAJOR_VERSION >= 3
1442 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1443 #else
1444 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
1445 #endif
1446 #if CYTHON_USE_PYLONG_INTERNALS
1447 #if PY_VERSION_HEX >= 0x030C00A7
1448 #ifndef _PyLong_SIGN_MASK
1449 #define _PyLong_SIGN_MASK 3
1450 #endif
1451 #ifndef _PyLong_NON_SIZE_BITS
1452 #define _PyLong_NON_SIZE_BITS 3
1453 #endif
1454 #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
1455 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
1456 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1457 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
1458 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
1459 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1460 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1461 #define __Pyx_PyLong_SignedDigitCount(x)\
1462 ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1463 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1464 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1465 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1466 #else
1467 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1468 #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1469 #endif
1470 typedef Py_ssize_t __Pyx_compact_pylong;
1471 typedef size_t __Pyx_compact_upylong;
1472 #else
1473 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1474 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1475 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1476 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1477 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1478 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1479 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1480 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1481 #define __Pyx_PyLong_CompactValue(x)\
1482 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1483 typedef sdigit __Pyx_compact_pylong;
1484 typedef digit __Pyx_compact_upylong;
1485 #endif
1486 #if PY_VERSION_HEX >= 0x030C00A5
1487 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1488 #else
1489 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1490 #endif
1491 #endif
1492 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1493 #include <string.h>
1494 static int __Pyx_sys_getdefaultencoding_not_ascii;
1495 static int __Pyx_init_sys_getdefaultencoding_params(void) {
1496 PyObject* sys;
1497 PyObject* default_encoding = NULL;
1498 PyObject* ascii_chars_u = NULL;
1499 PyObject* ascii_chars_b = NULL;
1500 const char* default_encoding_c;
1501 sys = PyImport_ImportModule("sys");
1502 if (!sys) goto bad;
1503 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
1504 Py_DECREF(sys);
1505 if (!default_encoding) goto bad;
1506 default_encoding_c = PyBytes_AsString(default_encoding);
1507 if (!default_encoding_c) goto bad;
1508 if (strcmp(default_encoding_c, "ascii") == 0) {
1509 __Pyx_sys_getdefaultencoding_not_ascii = 0;
1510 } else {
1511 char ascii_chars[128];
1512 int c;
1513 for (c = 0; c < 128; c++) {
1514 ascii_chars[c] = (char) c;
1515 }
1516 __Pyx_sys_getdefaultencoding_not_ascii = 1;
1517 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
1518 if (!ascii_chars_u) goto bad;
1519 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
1520 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
1521 PyErr_Format(
1522 PyExc_ValueError,
1523 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
1524 default_encoding_c);
1525 goto bad;
1526 }
1527 Py_DECREF(ascii_chars_u);
1528 Py_DECREF(ascii_chars_b);
1529 }
1530 Py_DECREF(default_encoding);
1531 return 0;
1532 bad:
1533 Py_XDECREF(default_encoding);
1534 Py_XDECREF(ascii_chars_u);
1535 Py_XDECREF(ascii_chars_b);
1536 return -1;
1537 }
1538 #endif
1539 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
1540 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1541 #else
1542 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1543 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
1544 #include <string.h>
1545 static char* __PYX_DEFAULT_STRING_ENCODING;
1546 static int __Pyx_init_sys_getdefaultencoding_params(void) {
1547 PyObject* sys;
1548 PyObject* default_encoding = NULL;
1549 char* default_encoding_c;
1550 sys = PyImport_ImportModule("sys");
1551 if (!sys) goto bad;
1552 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
1553 Py_DECREF(sys);
1554 if (!default_encoding) goto bad;
1555 default_encoding_c = PyBytes_AsString(default_encoding);
1556 if (!default_encoding_c) goto bad;
1557 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
1558 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
1559 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
1560 Py_DECREF(default_encoding);
1561 return 0;
1562 bad:
1563 Py_XDECREF(default_encoding);
1564 return -1;
1565 }
1566 #endif
1567 #endif
1568
1569
1570 /* Test for GCC > 2.95 */
1571 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1572 #define likely(x) __builtin_expect(!!(x), 1)
1573 #define unlikely(x) __builtin_expect(!!(x), 0)
1574 #else /* !__GNUC__ or GCC < 2.95 */
1575 #define likely(x) (x)
1576 #define unlikely(x) (x)
1577 #endif /* __GNUC__ */
1578 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1579
1580 #if !CYTHON_USE_MODULE_STATE
1581 static PyObject *__pyx_m = NULL;
1582 #endif
1583 static int __pyx_lineno;
1584 static int __pyx_clineno = 0;
1585 static const char * __pyx_cfilenm = __FILE__;
1586 static const char *__pyx_filename;
1587
1588 /* #### Code section: filename_table ### */
1589
1590 static const char *__pyx_f[] = {
1591 "pysam/libcbcf.pyx",
1592 "contextvars.pxd",
1593 "array.pxd",
1594 "pysam/libcbcf.pxd",
1595 "<stringsource>",
1596 "type.pxd",
1597 "bool.pxd",
1598 "complex.pxd",
1599 };
1600 /* #### Code section: utility_code_proto_before_types ### */
1601 /* ForceInitThreads.proto */
1602 #ifndef __PYX_FORCE_INIT_THREADS
1603 #define __PYX_FORCE_INIT_THREADS 0
1604 #endif
1605
1606 /* NoFastGil.proto */
1607 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
1608 #define __Pyx_PyGILState_Release PyGILState_Release
1609 #define __Pyx_FastGIL_Remember()
1610 #define __Pyx_FastGIL_Forget()
1611 #define __Pyx_FastGilFuncInit()
1612
1613 /* #### Code section: numeric_typedefs ### */
1614 /* #### Code section: complex_type_declarations ### */
1615 /* #### Code section: type_declarations ### */
1616
1617 /*--- Type declarations ---*/
1618 #ifndef _ARRAYARRAY_H
1619 struct arrayobject;
1620 typedef struct arrayobject arrayobject;
1621 #endif
1622 struct __pyx_obj_5pysam_10libchtslib_HTSFile;
1623 struct __pyx_obj_5pysam_7libcbcf_VariantHeader;
1624 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord;
1625 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords;
1626 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs;
1627 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples;
1628 struct __pyx_obj_5pysam_7libcbcf_VariantContig;
1629 struct __pyx_obj_5pysam_7libcbcf_VariantMetadata;
1630 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata;
1631 struct __pyx_obj_5pysam_7libcbcf_VariantRecord;
1632 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter;
1633 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat;
1634 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo;
1635 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples;
1636 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample;
1637 struct __pyx_obj_5pysam_7libcbcf_BaseIndex;
1638 struct __pyx_obj_5pysam_7libcbcf_BCFIndex;
1639 struct __pyx_obj_5pysam_7libcbcf_TabixIndex;
1640 struct __pyx_obj_5pysam_7libcbcf_BaseIterator;
1641 struct __pyx_obj_5pysam_7libcbcf_BCFIterator;
1642 struct __pyx_obj_5pysam_7libcbcf_TabixIterator;
1643 struct __pyx_obj_5pysam_7libcbcf_VariantFile;
1644 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple;
1645 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr;
1646 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr;
1647 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr;
1648 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr;
1649 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__;
1650 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr;
1651 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__;
1652 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues;
1653 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems;
1654 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__;
1655 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__;
1656 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues;
1657 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems;
1658 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__;
1659 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues;
1660 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems;
1661 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__;
1662 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__;
1663 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues;
1664 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems;
1665 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__;
1666 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues;
1667 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems;
1668 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__;
1669 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues;
1670 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems;
1671 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__;
1672 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues;
1673 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems;
1674 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__;
1675 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr;
1676 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr;
1677 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__;
1678 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues;
1679 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems;
1680 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues;
1681 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems;
1682 struct __pyx_opt_args_7cpython_11contextvars_get_value;
1683 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;
1684
1685 /* "cpython/contextvars.pxd":112
1686 *
1687 *
1688 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
1689 * """Return a new reference to the value of the context variable,
1690 * or the default value of the context variable,
1691 */
1692 struct __pyx_opt_args_7cpython_11contextvars_get_value {
1693 int __pyx_n;
1694 PyObject *default_value;
1695 };
1696
1697 /* "cpython/contextvars.pxd":129
1698 *
1699 *
1700 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
1701 * """Return a new reference to the value of the context variable,
1702 * or the provided default value if no such value was found.
1703 */
1704 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
1705 int __pyx_n;
1706 PyObject *default_value;
1707 };
1708 struct __pyx_opt_args_5pysam_9libcutils_parse_region;
1709 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array;
1710 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring;
1711 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring;
1712 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str;
1713 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes;
1714 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len;
1715 struct __pyx_opt_args_5pysam_9libcutils_force_str;
1716 struct __pyx_opt_args_5pysam_9libcutils_force_bytes;
1717 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes;
1718
1719 /* "pysam/libcutils.pxd":8
1720 * from cpython cimport array as c_array
1721 *
1722 * cpdef parse_region(contig=*, start=*, stop=*, region=*, reference=*, end=*) # <<<<<<<<<<<<<<
1723 *
1724 * cdef int libc_whence_from_io(int whence)
1725 */
1726 struct __pyx_opt_args_5pysam_9libcutils_parse_region {
1727 int __pyx_n;
1728 PyObject *contig;
1729 PyObject *start;
1730 PyObject *stop;
1731 PyObject *region;
1732 PyObject *reference;
1733 PyObject *end;
1734 };
1735
1736 /* "pysam/libcutils.pxd":15
1737 * # Utility functions for quality string conversions
1738 *
1739 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) # <<<<<<<<<<<<<<
1740 * cpdef array_to_qualitystring(c_array.array arr, int offset=*)
1741 * cpdef qualities_to_qualitystring(qualities, int offset=*)
1742 */
1743 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array {
1744 int __pyx_n;
1745 int offset;
1746 };
1747
1748 /* "pysam/libcutils.pxd":16
1749 *
1750 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
1751 * cpdef array_to_qualitystring(c_array.array arr, int offset=*) # <<<<<<<<<<<<<<
1752 * cpdef qualities_to_qualitystring(qualities, int offset=*)
1753 *
1754 */
1755 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring {
1756 int __pyx_n;
1757 int offset;
1758 };
1759
1760 /* "pysam/libcutils.pxd":17
1761 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
1762 * cpdef array_to_qualitystring(c_array.array arr, int offset=*)
1763 * cpdef qualities_to_qualitystring(qualities, int offset=*) # <<<<<<<<<<<<<<
1764 *
1765 * ########################################################################
1766 */
1767 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring {
1768 int __pyx_n;
1769 int offset;
1770 };
1771
1772 /* "pysam/libcutils.pxd":29
1773 * ## Python 3 compatibility functions
1774 * ########################################################################
1775 * cdef charptr_to_str(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<<
1776 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
1777 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
1778 */
1779 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str {
1780 int __pyx_n;
1781 PyObject *encoding;
1782 PyObject *errors;
1783 };
1784
1785 /* "pysam/libcutils.pxd":30
1786 * ########################################################################
1787 * cdef charptr_to_str(const char *s, encoding=*, errors=*)
1788 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<<
1789 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
1790 * cdef force_str(object s, encoding=*, errors=*)
1791 */
1792 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes {
1793 int __pyx_n;
1794 PyObject *encoding;
1795 PyObject *errors;
1796 };
1797
1798 /* "pysam/libcutils.pxd":31
1799 * cdef charptr_to_str(const char *s, encoding=*, errors=*)
1800 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
1801 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) # <<<<<<<<<<<<<<
1802 * cdef force_str(object s, encoding=*, errors=*)
1803 * cdef bytes force_bytes(object s, encoding=*, errors=*)
1804 */
1805 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len {
1806 int __pyx_n;
1807 PyObject *encoding;
1808 PyObject *errors;
1809 };
1810
1811 /* "pysam/libcutils.pxd":32
1812 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
1813 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
1814 * cdef force_str(object s, encoding=*, errors=*) # <<<<<<<<<<<<<<
1815 * cdef bytes force_bytes(object s, encoding=*, errors=*)
1816 * cdef decode_bytes(bytes s, encoding=*, errors=*)
1817 */
1818 struct __pyx_opt_args_5pysam_9libcutils_force_str {
1819 int __pyx_n;
1820 PyObject *encoding;
1821 PyObject *errors;
1822 };
1823
1824 /* "pysam/libcutils.pxd":33
1825 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
1826 * cdef force_str(object s, encoding=*, errors=*)
1827 * cdef bytes force_bytes(object s, encoding=*, errors=*) # <<<<<<<<<<<<<<
1828 * cdef decode_bytes(bytes s, encoding=*, errors=*)
1829 * cdef bytes encode_filename(object filename)
1830 */
1831 struct __pyx_opt_args_5pysam_9libcutils_force_bytes {
1832 int __pyx_n;
1833 PyObject *encoding;
1834 PyObject *errors;
1835 };
1836
1837 /* "pysam/libcutils.pxd":34
1838 * cdef force_str(object s, encoding=*, errors=*)
1839 * cdef bytes force_bytes(object s, encoding=*, errors=*)
1840 * cdef decode_bytes(bytes s, encoding=*, errors=*) # <<<<<<<<<<<<<<
1841 * cdef bytes encode_filename(object filename)
1842 * cdef from_string_and_size(const char *s, size_t length)
1843 */
1844 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes {
1845 int __pyx_n;
1846 PyObject *encoding;
1847 PyObject *errors;
1848 };
1849 struct __pyx_opt_args_5pysam_7libcbcf_char_array_to_tuple;
1850
1851 /* "pysam/libcbcf.pyx":267
1852 *
1853 *
1854 * cdef tuple char_array_to_tuple(const char **a, ssize_t n, int free_after=0): # <<<<<<<<<<<<<<
1855 * if not a:
1856 * return None
1857 */
1858 struct __pyx_opt_args_5pysam_7libcbcf_char_array_to_tuple {
1859 int __pyx_n;
1860 int free_after;
1861 };
1862
1863 /* "pysam/libchtslib.pxd":2706
1864 *
1865 *
1866 * cdef class HTSFile(object): # <<<<<<<<<<<<<<
1867 * cdef htsFile *htsfile # pointer to htsFile structure
1868 * cdef int64_t start_offset # BGZF offset of first record
1869 */
1870 struct __pyx_obj_5pysam_10libchtslib_HTSFile {
1871 PyObject_HEAD
1872 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtab;
1873 htsFile *htsfile;
1874 int64_t start_offset;
1875 PyObject *filename;
1876 PyObject *mode;
1877 PyObject *threads;
1878 PyObject *index_filename;
1879 int is_stream;
1880 int is_remote;
1881 int duplicate_filehandle;
1882 };
1883
1884
1885 /* "pysam/libcbcf.pxd":39
1886 *
1887 *
1888 * cdef class VariantHeader(object): # <<<<<<<<<<<<<<
1889 * cdef bcf_hdr_t *ptr
1890 *
1891 */
1892 struct __pyx_obj_5pysam_7libcbcf_VariantHeader {
1893 PyObject_HEAD
1894 struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *__pyx_vtab;
1895 bcf_hdr_t *ptr;
1896 };
1897
1898
1899 /* "pysam/libcbcf.pxd":47
1900 *
1901 *
1902 * cdef class VariantHeaderRecord(object): # <<<<<<<<<<<<<<
1903 * cdef readonly VariantHeader header
1904 * cdef bcf_hrec_t *ptr
1905 */
1906 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord {
1907 PyObject_HEAD
1908 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
1909 bcf_hrec_t *ptr;
1910 };
1911
1912
1913 /* "pysam/libcbcf.pxd":52
1914 *
1915 *
1916 * cdef class VariantHeaderRecords(object): # <<<<<<<<<<<<<<
1917 * cdef readonly VariantHeader header
1918 *
1919 */
1920 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords {
1921 PyObject_HEAD
1922 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
1923 };
1924
1925
1926 /* "pysam/libcbcf.pxd":56
1927 *
1928 *
1929 * cdef class VariantHeaderContigs(object): # <<<<<<<<<<<<<<
1930 * cdef readonly VariantHeader header
1931 *
1932 */
1933 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs {
1934 PyObject_HEAD
1935 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
1936 };
1937
1938
1939 /* "pysam/libcbcf.pxd":60
1940 *
1941 *
1942 * cdef class VariantHeaderSamples(object): # <<<<<<<<<<<<<<
1943 * cdef readonly VariantHeader header
1944 *
1945 */
1946 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples {
1947 PyObject_HEAD
1948 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
1949 };
1950
1951
1952 /* "pysam/libcbcf.pxd":64
1953 *
1954 *
1955 * cdef class VariantContig(object): # <<<<<<<<<<<<<<
1956 * cdef readonly VariantHeader header
1957 * cdef int id
1958 */
1959 struct __pyx_obj_5pysam_7libcbcf_VariantContig {
1960 PyObject_HEAD
1961 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
1962 int id;
1963 };
1964
1965
1966 /* "pysam/libcbcf.pxd":69
1967 *
1968 *
1969 * cdef class VariantMetadata(object): # <<<<<<<<<<<<<<
1970 * cdef readonly VariantHeader header
1971 * cdef int type
1972 */
1973 struct __pyx_obj_5pysam_7libcbcf_VariantMetadata {
1974 PyObject_HEAD
1975 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
1976 int type;
1977 int id;
1978 };
1979
1980
1981 /* "pysam/libcbcf.pxd":75
1982 *
1983 *
1984 * cdef class VariantHeaderMetadata(object): # <<<<<<<<<<<<<<
1985 * cdef readonly VariantHeader header
1986 * cdef int32_t type
1987 */
1988 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata {
1989 PyObject_HEAD
1990 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
1991 int32_t type;
1992 };
1993
1994
1995 /* "pysam/libcbcf.pxd":80
1996 *
1997 *
1998 * cdef class VariantRecord(object): # <<<<<<<<<<<<<<
1999 * cdef readonly VariantHeader header
2000 * cdef bcf1_t *ptr
2001 */
2002 struct __pyx_obj_5pysam_7libcbcf_VariantRecord {
2003 PyObject_HEAD
2004 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
2005 bcf1_t *ptr;
2006 };
2007
2008
2009 /* "pysam/libcbcf.pxd":85
2010 *
2011 *
2012 * cdef class VariantRecordFilter(object): # <<<<<<<<<<<<<<
2013 * cdef VariantRecord record
2014 *
2015 */
2016 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter {
2017 PyObject_HEAD
2018 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *record;
2019 };
2020
2021
2022 /* "pysam/libcbcf.pxd":89
2023 *
2024 *
2025 * cdef class VariantRecordFormat(object): # <<<<<<<<<<<<<<
2026 * cdef VariantRecord record
2027 *
2028 */
2029 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat {
2030 PyObject_HEAD
2031 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *record;
2032 };
2033
2034
2035 /* "pysam/libcbcf.pxd":93
2036 *
2037 *
2038 * cdef class VariantRecordInfo(object): # <<<<<<<<<<<<<<
2039 * cdef VariantRecord record
2040 *
2041 */
2042 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo {
2043 PyObject_HEAD
2044 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *record;
2045 };
2046
2047
2048 /* "pysam/libcbcf.pxd":97
2049 *
2050 *
2051 * cdef class VariantRecordSamples(object): # <<<<<<<<<<<<<<
2052 * cdef VariantRecord record
2053 *
2054 */
2055 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples {
2056 PyObject_HEAD
2057 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *record;
2058 };
2059
2060
2061 /* "pysam/libcbcf.pxd":101
2062 *
2063 *
2064 * cdef class VariantRecordSample(object): # <<<<<<<<<<<<<<
2065 * cdef VariantRecord record
2066 * cdef readonly int32_t index
2067 */
2068 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample {
2069 PyObject_HEAD
2070 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *record;
2071 int32_t index;
2072 };
2073
2074
2075 /* "pysam/libcbcf.pxd":106
2076 *
2077 *
2078 * cdef class BaseIndex(object): # <<<<<<<<<<<<<<
2079 * cdef tuple refs
2080 * cdef dict refmap
2081 */
2082 struct __pyx_obj_5pysam_7libcbcf_BaseIndex {
2083 PyObject_HEAD
2084 PyObject *refs;
2085 PyObject *refmap;
2086 };
2087
2088
2089 /* "pysam/libcbcf.pxd":111
2090 *
2091 *
2092 * cdef class BCFIndex(BaseIndex): # <<<<<<<<<<<<<<
2093 * cdef readonly VariantHeader header
2094 * cdef hts_idx_t *ptr
2095 */
2096 struct __pyx_obj_5pysam_7libcbcf_BCFIndex {
2097 struct __pyx_obj_5pysam_7libcbcf_BaseIndex __pyx_base;
2098 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
2099 hts_idx_t *ptr;
2100 };
2101
2102
2103 /* "pysam/libcbcf.pxd":116
2104 *
2105 *
2106 * cdef class TabixIndex(BaseIndex): # <<<<<<<<<<<<<<
2107 * cdef tbx_t *ptr
2108 *
2109 */
2110 struct __pyx_obj_5pysam_7libcbcf_TabixIndex {
2111 struct __pyx_obj_5pysam_7libcbcf_BaseIndex __pyx_base;
2112 tbx_t *ptr;
2113 };
2114
2115
2116 /* "pysam/libcbcf.pxd":120
2117 *
2118 *
2119 * cdef class BaseIterator(object): # <<<<<<<<<<<<<<
2120 * cdef VariantFile bcf
2121 * cdef hts_itr_t *iter
2122 */
2123 struct __pyx_obj_5pysam_7libcbcf_BaseIterator {
2124 PyObject_HEAD
2125 struct __pyx_obj_5pysam_7libcbcf_VariantFile *bcf;
2126 hts_itr_t *iter;
2127 };
2128
2129
2130 /* "pysam/libcbcf.pxd":125
2131 *
2132 *
2133 * cdef class BCFIterator(BaseIterator): # <<<<<<<<<<<<<<
2134 * cdef BCFIndex index
2135 *
2136 */
2137 struct __pyx_obj_5pysam_7libcbcf_BCFIterator {
2138 struct __pyx_obj_5pysam_7libcbcf_BaseIterator __pyx_base;
2139 struct __pyx_obj_5pysam_7libcbcf_BCFIndex *index;
2140 };
2141
2142
2143 /* "pysam/libcbcf.pxd":129
2144 *
2145 *
2146 * cdef class TabixIterator(BaseIterator): # <<<<<<<<<<<<<<
2147 * cdef TabixIndex index
2148 * cdef kstring_t line_buffer
2149 */
2150 struct __pyx_obj_5pysam_7libcbcf_TabixIterator {
2151 struct __pyx_obj_5pysam_7libcbcf_BaseIterator __pyx_base;
2152 struct __pyx_obj_5pysam_7libcbcf_TabixIndex *index;
2153 kstring_t line_buffer;
2154 };
2155
2156
2157 /* "pysam/libcbcf.pxd":134
2158 *
2159 *
2160 * cdef class VariantFile(HTSFile): # <<<<<<<<<<<<<<
2161 * cdef readonly VariantHeader header
2162 * cdef readonly BaseIndex index
2163 */
2164 struct __pyx_obj_5pysam_7libcbcf_VariantFile {
2165 struct __pyx_obj_5pysam_10libchtslib_HTSFile __pyx_base;
2166 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *header;
2167 struct __pyx_obj_5pysam_7libcbcf_BaseIndex *index;
2168 int drop_samples;
2169 int is_reading;
2170 int header_written;
2171 };
2172
2173
2174 /* "pysam/libcbcf.pyx":267
2175 *
2176 *
2177 * cdef tuple char_array_to_tuple(const char **a, ssize_t n, int free_after=0): # <<<<<<<<<<<<<<
2178 * if not a:
2179 * return None
2180 */
2181 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple {
2182 PyObject_HEAD
2183 char const **__pyx_v_a;
2184 };
2185
2186
2187 /* "pysam/libcbcf.pyx":271
2188 * return None
2189 * try:
2190 * return tuple(charptr_to_str(a[i]) for i in range(n)) # <<<<<<<<<<<<<<
2191 * finally:
2192 * if free_after and a:
2193 */
2194 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr {
2195 PyObject_HEAD
2196 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple *__pyx_outer_scope;
2197 Py_ssize_t __pyx_genexpr_arg_0;
2198 Py_ssize_t __pyx_v_i;
2199 Py_ssize_t __pyx_t_0;
2200 Py_ssize_t __pyx_t_1;
2201 Py_ssize_t __pyx_t_2;
2202 };
2203
2204
2205 /* "pysam/libcbcf.pyx":302
2206 * # Otherwise, copy the entire block
2207 * b = datac[:n]
2208 * value = tuple(decode_bytes(v, 'utf-8') if v and v != bcf_str_missing else None for v in b.split(b',')) # <<<<<<<<<<<<<<
2209 * else:
2210 * value = []
2211 */
2212 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr {
2213 PyObject_HEAD
2214 PyObject *__pyx_genexpr_arg_0;
2215 PyObject *__pyx_v_v;
2216 PyObject *__pyx_t_0;
2217 Py_ssize_t __pyx_t_1;
2218 PyObject *(*__pyx_t_2)(PyObject *);
2219 };
2220
2221
2222 /* "pysam/libcbcf.pyx":360
2223 * if bt_type == BCF_BT_CHAR:
2224 * if not isinstance(values, (str, bytes)):
2225 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values) # <<<<<<<<<<<<<<
2226 * value_count = len(values)
2227 * assert value_count <= n
2228 */
2229 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr {
2230 PyObject_HEAD
2231 PyObject *__pyx_genexpr_arg_0;
2232 PyObject *__pyx_v_v;
2233 PyObject *__pyx_t_0;
2234 Py_ssize_t __pyx_t_1;
2235 PyObject *(*__pyx_t_2)(PyObject *);
2236 };
2237
2238
2239 /* "pysam/libcbcf.pyx":614
2240 * raise ValueError('Integer value too small/large to store in VCF/BCF')
2241 * elif ht_type == BCF_HT_STR:
2242 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values) # <<<<<<<<<<<<<<
2243 * elif ht_type == BCF_HT_FLAG:
2244 * if values[0] not in (True, False, None, 1, 0):
2245 */
2246 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr {
2247 PyObject_HEAD
2248 PyObject *__pyx_genexpr_arg_0;
2249 PyObject *__pyx_v_v;
2250 PyObject *__pyx_t_0;
2251 Py_ssize_t __pyx_t_1;
2252 PyObject *(*__pyx_t_2)(PyObject *);
2253 };
2254
2255
2256 /* "pysam/libcbcf.pyx":1274
2257 * return charptr_to_str(r.value) if r and r.value else None
2258 *
2259 * @property # <<<<<<<<<<<<<<
2260 * def attrs(self):
2261 * """sequence of additional header attributes"""
2262 */
2263 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__ {
2264 PyObject_HEAD
2265 bcf_hrec_t *__pyx_v_r;
2266 };
2267
2268
2269 /* "pysam/libcbcf.pyx":1281
2270 * return ()
2271 * cdef int i
2272 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None, # <<<<<<<<<<<<<<
2273 * charptr_to_str(r.vals[i]) if r.vals[i] else None)
2274 * for i in range(r.nkeys))
2275 */
2276 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr {
2277 PyObject_HEAD
2278 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__ *__pyx_outer_scope;
2279 int __pyx_genexpr_arg_0;
2280 int __pyx_v_i;
2281 int __pyx_t_0;
2282 int __pyx_t_1;
2283 int __pyx_t_2;
2284 };
2285
2286
2287 /* "pysam/libcbcf.pyx":1304
2288 * raise KeyError('cannot find metadata key')
2289 *
2290 * def __iter__(self): # <<<<<<<<<<<<<<
2291 * cdef bcf_hrec_t *r = self.ptr
2292 * if not r:
2293 */
2294 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ {
2295 PyObject_HEAD
2296 int __pyx_v_i;
2297 bcf_hrec_t *__pyx_v_r;
2298 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self;
2299 int __pyx_t_0;
2300 int __pyx_t_1;
2301 int __pyx_t_2;
2302 };
2303
2304
2305 /* "pysam/libcbcf.pyx":1332
2306 * return iter(self)
2307 *
2308 * def itervalues(self): # <<<<<<<<<<<<<<
2309 * """D.itervalues() -> an iterator over the values of D"""
2310 * cdef bcf_hrec_t *r = self.ptr
2311 */
2312 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues {
2313 PyObject_HEAD
2314 int __pyx_v_i;
2315 bcf_hrec_t *__pyx_v_r;
2316 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self;
2317 int __pyx_t_0;
2318 int __pyx_t_1;
2319 int __pyx_t_2;
2320 };
2321
2322
2323 /* "pysam/libcbcf.pyx":1342
2324 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None
2325 *
2326 * def iteritems(self): # <<<<<<<<<<<<<<
2327 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2328 * cdef bcf_hrec_t *r = self.ptr
2329 */
2330 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems {
2331 PyObject_HEAD
2332 int __pyx_v_i;
2333 bcf_hrec_t *__pyx_v_r;
2334 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self;
2335 int __pyx_t_0;
2336 int __pyx_t_1;
2337 int __pyx_t_2;
2338 };
2339
2340
2341 /* "pysam/libcbcf.pyx":1453
2342 * return makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
2343 *
2344 * def __iter__(self): # <<<<<<<<<<<<<<
2345 * cdef int32_t i
2346 * for i in range(self.header.ptr.nhrec):
2347 */
2348 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ {
2349 PyObject_HEAD
2350 int32_t __pyx_v_i;
2351 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self;
2352 int __pyx_t_0;
2353 int __pyx_t_1;
2354 int32_t __pyx_t_2;
2355 };
2356
2357
2358 /* "pysam/libcbcf.pyx":1643
2359 * #bcf_hdr_sync(hdr)
2360 *
2361 * def __iter__(self): # <<<<<<<<<<<<<<
2362 * cdef bcf_hdr_t *hdr = self.header.ptr
2363 * cdef bcf_idpair_t *idpair
2364 */
2365 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ {
2366 PyObject_HEAD
2367 bcf_hdr_t *__pyx_v_hdr;
2368 int32_t __pyx_v_i;
2369 bcf_idpair_t *__pyx_v_idpair;
2370 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self;
2371 int32_t __pyx_t_0;
2372 int32_t __pyx_t_1;
2373 int32_t __pyx_t_2;
2374 };
2375
2376
2377 /* "pysam/libcbcf.pyx":1672
2378 * return iter(self)
2379 *
2380 * def itervalues(self): # <<<<<<<<<<<<<<
2381 * """D.itervalues() -> an iterator over the values of D"""
2382 * for key in self:
2383 */
2384 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues {
2385 PyObject_HEAD
2386 PyObject *__pyx_v_key;
2387 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self;
2388 PyObject *__pyx_t_0;
2389 Py_ssize_t __pyx_t_1;
2390 PyObject *(*__pyx_t_2)(PyObject *);
2391 };
2392
2393
2394 /* "pysam/libcbcf.pyx":1677
2395 * yield self[key]
2396 *
2397 * def iteritems(self): # <<<<<<<<<<<<<<
2398 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2399 * for key in self:
2400 */
2401 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems {
2402 PyObject_HEAD
2403 PyObject *__pyx_v_key;
2404 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self;
2405 PyObject *__pyx_t_0;
2406 Py_ssize_t __pyx_t_1;
2407 PyObject *(*__pyx_t_2)(PyObject *);
2408 };
2409
2410
2411 /* "pysam/libcbcf.pyx":1823
2412 * #bcf_hdr_sync(hdr)
2413 *
2414 * def __iter__(self): # <<<<<<<<<<<<<<
2415 * cdef bcf_hdr_t *hdr = self.header.ptr
2416 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG]
2417 */
2418 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ {
2419 PyObject_HEAD
2420 vdict_t *__pyx_v_d;
2421 bcf_hdr_t *__pyx_v_hdr;
2422 uint32_t __pyx_v_i;
2423 uint32_t __pyx_v_n;
2424 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self;
2425 uint32_t __pyx_t_0;
2426 uint32_t __pyx_t_1;
2427 uint32_t __pyx_t_2;
2428 };
2429
2430
2431 /* "pysam/libcbcf.pyx":1852
2432 * return iter(self)
2433 *
2434 * def itervalues(self): # <<<<<<<<<<<<<<
2435 * """D.itervalues() -> an iterator over the values of D"""
2436 * for key in self:
2437 */
2438 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues {
2439 PyObject_HEAD
2440 PyObject *__pyx_v_key;
2441 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self;
2442 PyObject *__pyx_t_0;
2443 Py_ssize_t __pyx_t_1;
2444 PyObject *(*__pyx_t_2)(PyObject *);
2445 };
2446
2447
2448 /* "pysam/libcbcf.pyx":1857
2449 * yield self[key]
2450 *
2451 * def iteritems(self): # <<<<<<<<<<<<<<
2452 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2453 * for key in self:
2454 */
2455 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems {
2456 PyObject_HEAD
2457 PyObject *__pyx_v_key;
2458 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self;
2459 PyObject *__pyx_t_0;
2460 Py_ssize_t __pyx_t_1;
2461 PyObject *(*__pyx_t_2)(PyObject *);
2462 };
2463
2464
2465 /* "pysam/libcbcf.pyx":1922
2466 * return charptr_to_str(hdr.samples[i])
2467 *
2468 * def __iter__(self): # <<<<<<<<<<<<<<
2469 * cdef bcf_hdr_t *hdr = self.header.ptr
2470 * cdef int32_t i, n = bcf_hdr_nsamples(hdr)
2471 */
2472 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ {
2473 PyObject_HEAD
2474 bcf_hdr_t *__pyx_v_hdr;
2475 int32_t __pyx_v_i;
2476 int32_t __pyx_v_n;
2477 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self;
2478 int32_t __pyx_t_0;
2479 int32_t __pyx_t_1;
2480 int32_t __pyx_t_2;
2481 };
2482
2483
2484 /* "pysam/libcbcf.pyx":2321
2485 * r.d.n_flt = 0
2486 *
2487 * def __iter__(self): # <<<<<<<<<<<<<<
2488 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2489 * cdef bcf1_t *r = self.record.ptr
2490 */
2491 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ {
2492 PyObject_HEAD
2493 bcf_hdr_t *__pyx_v_hdr;
2494 int __pyx_v_i;
2495 bcf1_t *__pyx_v_r;
2496 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self;
2497 int __pyx_t_0;
2498 int __pyx_t_1;
2499 int __pyx_t_2;
2500 };
2501
2502
2503 /* "pysam/libcbcf.pyx":2346
2504 * return iter(self)
2505 *
2506 * def itervalues(self): # <<<<<<<<<<<<<<
2507 * """D.itervalues() -> an iterator over the values of D"""
2508 * for key in self:
2509 */
2510 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues {
2511 PyObject_HEAD
2512 PyObject *__pyx_v_key;
2513 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self;
2514 PyObject *__pyx_t_0;
2515 Py_ssize_t __pyx_t_1;
2516 PyObject *(*__pyx_t_2)(PyObject *);
2517 };
2518
2519
2520 /* "pysam/libcbcf.pyx":2351
2521 * yield self[key]
2522 *
2523 * def iteritems(self): # <<<<<<<<<<<<<<
2524 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2525 * for key in self:
2526 */
2527 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems {
2528 PyObject_HEAD
2529 PyObject *__pyx_v_key;
2530 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self;
2531 PyObject *__pyx_t_0;
2532 Py_ssize_t __pyx_t_1;
2533 PyObject *(*__pyx_t_2)(PyObject *);
2534 };
2535
2536
2537 /* "pysam/libcbcf.pyx":2465
2538 * raise ValueError('Unable to delete FORMAT')
2539 *
2540 * def __iter__(self): # <<<<<<<<<<<<<<
2541 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2542 * cdef bcf1_t *r = self.record.ptr
2543 */
2544 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ {
2545 PyObject_HEAD
2546 bcf_fmt_t *__pyx_v_fmt;
2547 bcf_hdr_t *__pyx_v_hdr;
2548 int __pyx_v_i;
2549 bcf1_t *__pyx_v_r;
2550 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self;
2551 uint32_t __pyx_t_0;
2552 uint32_t __pyx_t_1;
2553 int __pyx_t_2;
2554 };
2555
2556
2557 /* "pysam/libcbcf.pyx":2494
2558 * return iter(self)
2559 *
2560 * def itervalues(self): # <<<<<<<<<<<<<<
2561 * """D.itervalues() -> an iterator over the values of D"""
2562 * for key in self:
2563 */
2564 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues {
2565 PyObject_HEAD
2566 PyObject *__pyx_v_key;
2567 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self;
2568 PyObject *__pyx_t_0;
2569 Py_ssize_t __pyx_t_1;
2570 PyObject *(*__pyx_t_2)(PyObject *);
2571 };
2572
2573
2574 /* "pysam/libcbcf.pyx":2499
2575 * yield self[key]
2576 *
2577 * def iteritems(self): # <<<<<<<<<<<<<<
2578 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2579 * for key in self:
2580 */
2581 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems {
2582 PyObject_HEAD
2583 PyObject *__pyx_v_key;
2584 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self;
2585 PyObject *__pyx_t_0;
2586 Py_ssize_t __pyx_t_1;
2587 PyObject *(*__pyx_t_2)(PyObject *);
2588 };
2589
2590
2591 /* "pysam/libcbcf.pyx":2671
2592 * raise ValueError('Unable to delete INFO')
2593 *
2594 * def __iter__(self): # <<<<<<<<<<<<<<
2595 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2596 * cdef bcf1_t *r = self.record.ptr
2597 */
2598 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ {
2599 PyObject_HEAD
2600 bcf_hdr_t *__pyx_v_hdr;
2601 int __pyx_v_i;
2602 bcf_info_t *__pyx_v_info;
2603 char const *__pyx_v_key;
2604 bcf1_t *__pyx_v_r;
2605 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self;
2606 uint32_t __pyx_t_0;
2607 uint32_t __pyx_t_1;
2608 int __pyx_t_2;
2609 };
2610
2611
2612 /* "pysam/libcbcf.pyx":2738
2613 * return iter(self)
2614 *
2615 * def itervalues(self): # <<<<<<<<<<<<<<
2616 * """D.itervalues() -> an iterator over the values of D"""
2617 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2618 */
2619 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues {
2620 PyObject_HEAD
2621 bcf_hdr_t *__pyx_v_hdr;
2622 int __pyx_v_i;
2623 bcf_info_t *__pyx_v_info;
2624 char const *__pyx_v_key;
2625 bcf1_t *__pyx_v_r;
2626 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self;
2627 uint32_t __pyx_t_0;
2628 uint32_t __pyx_t_1;
2629 int __pyx_t_2;
2630 };
2631
2632
2633 /* "pysam/libcbcf.pyx":2756
2634 * yield bcf_info_get_value(self.record, info)
2635 *
2636 * def iteritems(self): # <<<<<<<<<<<<<<
2637 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2638 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2639 */
2640 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems {
2641 PyObject_HEAD
2642 bcf_hdr_t *__pyx_v_hdr;
2643 int __pyx_v_i;
2644 bcf_info_t *__pyx_v_info;
2645 char const *__pyx_v_key;
2646 bcf1_t *__pyx_v_r;
2647 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self;
2648 PyObject *__pyx_v_value;
2649 uint32_t __pyx_t_0;
2650 uint32_t __pyx_t_1;
2651 int __pyx_t_2;
2652 };
2653
2654
2655 /* "pysam/libcbcf.pyx":2899
2656 * return makeVariantRecordSample(self.record, sample_index)
2657 *
2658 * def __iter__(self): # <<<<<<<<<<<<<<
2659 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2660 * cdef bcf1_t *r = self.record.ptr
2661 */
2662 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ {
2663 PyObject_HEAD
2664 bcf_hdr_t *__pyx_v_hdr;
2665 int32_t __pyx_v_i;
2666 int32_t __pyx_v_n;
2667 bcf1_t *__pyx_v_r;
2668 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self;
2669 int32_t __pyx_t_0;
2670 int32_t __pyx_t_1;
2671 int32_t __pyx_t_2;
2672 };
2673
2674
2675 /* "pysam/libcbcf.pyx":2936
2676 * return iter(self)
2677 *
2678 * def itervalues(self): # <<<<<<<<<<<<<<
2679 * """D.itervalues() -> an iterator over the values of D"""
2680 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2681 */
2682 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues {
2683 PyObject_HEAD
2684 bcf_hdr_t *__pyx_v_hdr;
2685 int32_t __pyx_v_i;
2686 int32_t __pyx_v_n;
2687 bcf1_t *__pyx_v_r;
2688 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self;
2689 int32_t __pyx_t_0;
2690 int32_t __pyx_t_1;
2691 int32_t __pyx_t_2;
2692 };
2693
2694
2695 /* "pysam/libcbcf.pyx":2945
2696 * yield makeVariantRecordSample(self.record, i)
2697 *
2698 * def iteritems(self): # <<<<<<<<<<<<<<
2699 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2700 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2701 */
2702 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems {
2703 PyObject_HEAD
2704 bcf_hdr_t *__pyx_v_hdr;
2705 int32_t __pyx_v_i;
2706 int32_t __pyx_v_n;
2707 bcf1_t *__pyx_v_r;
2708 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self;
2709 int32_t __pyx_t_0;
2710 int32_t __pyx_t_1;
2711 int32_t __pyx_t_2;
2712 };
2713
2714
2715 /* "pysam/libcbcf.pyx":3477
2716 * return bcf_format_get_alleles(self)
2717 *
2718 * @alleles.setter # <<<<<<<<<<<<<<
2719 * def alleles(self, value):
2720 * # Sets the genotype, supply a tuple of alleles to set.
2721 */
2722 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ {
2723 PyObject_HEAD
2724 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self;
2725 };
2726
2727
2728 /* "pysam/libcbcf.pyx":3487
2729 * return
2730 *
2731 * if any((type(x) == int for x in value)): # <<<<<<<<<<<<<<
2732 * raise ValueError('Use .allele_indices to set integer allele indices')
2733 *
2734 */
2735 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr {
2736 PyObject_HEAD
2737 PyObject *__pyx_genexpr_arg_0;
2738 PyObject *__pyx_v_x;
2739 };
2740
2741
2742 /* "pysam/libcbcf.pyx":3492
2743 * # determine and set allele indices:
2744 * try:
2745 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) ) # <<<<<<<<<<<<<<
2746 * except ValueError:
2747 * raise ValueError("One or more of the supplied sample alleles are not defined as alleles of the corresponding pysam.libcbcf.VariantRecord."
2748 */
2749 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr {
2750 PyObject_HEAD
2751 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *__pyx_outer_scope;
2752 PyObject *__pyx_genexpr_arg_0;
2753 PyObject *__pyx_v_allele;
2754 PyObject *__pyx_t_0;
2755 Py_ssize_t __pyx_t_1;
2756 PyObject *(*__pyx_t_2)(PyObject *);
2757 };
2758
2759
2760 /* "pysam/libcbcf.pyx":3557
2761 * bcf_format_del_value(self, bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
2762 *
2763 * def __iter__(self): # <<<<<<<<<<<<<<
2764 * cdef bcf_hdr_t *hdr = self.record.header.ptr
2765 * cdef bcf1_t *r = self.record.ptr
2766 */
2767 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ {
2768 PyObject_HEAD
2769 bcf_fmt_t *__pyx_v_fmt;
2770 bcf_hdr_t *__pyx_v_hdr;
2771 int __pyx_v_i;
2772 bcf1_t *__pyx_v_r;
2773 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self;
2774 uint32_t __pyx_t_0;
2775 uint32_t __pyx_t_1;
2776 int __pyx_t_2;
2777 };
2778
2779
2780 /* "pysam/libcbcf.pyx":3586
2781 * return iter(self)
2782 *
2783 * def itervalues(self): # <<<<<<<<<<<<<<
2784 * """D.itervalues() -> an iterator over the values of D"""
2785 * for key in self:
2786 */
2787 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues {
2788 PyObject_HEAD
2789 PyObject *__pyx_v_key;
2790 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self;
2791 PyObject *__pyx_t_0;
2792 Py_ssize_t __pyx_t_1;
2793 PyObject *(*__pyx_t_2)(PyObject *);
2794 };
2795
2796
2797 /* "pysam/libcbcf.pyx":3591
2798 * yield self[key]
2799 *
2800 * def iteritems(self): # <<<<<<<<<<<<<<
2801 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2802 * for key in self:
2803 */
2804 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems {
2805 PyObject_HEAD
2806 PyObject *__pyx_v_key;
2807 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self;
2808 PyObject *__pyx_t_0;
2809 Py_ssize_t __pyx_t_1;
2810 PyObject *(*__pyx_t_2)(PyObject *);
2811 };
2812
2813
2814 /* "pysam/libcbcf.pyx":3701
2815 * return iter(self)
2816 *
2817 * def itervalues(self): # <<<<<<<<<<<<<<
2818 * """D.itervalues() -> an iterator over the values of D"""
2819 * for key in self:
2820 */
2821 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues {
2822 PyObject_HEAD
2823 PyObject *__pyx_v_key;
2824 struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self;
2825 PyObject *__pyx_t_0;
2826 Py_ssize_t __pyx_t_1;
2827 PyObject *(*__pyx_t_2)(PyObject *);
2828 };
2829
2830
2831 /* "pysam/libcbcf.pyx":3706
2832 * yield self[key]
2833 *
2834 * def iteritems(self): # <<<<<<<<<<<<<<
2835 * """D.iteritems() -> an iterator over the (key, value) items of D"""
2836 * for key in self:
2837 */
2838 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems {
2839 PyObject_HEAD
2840 PyObject *__pyx_v_key;
2841 struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self;
2842 PyObject *__pyx_t_0;
2843 Py_ssize_t __pyx_t_1;
2844 PyObject *(*__pyx_t_2)(PyObject *);
2845 };
2846
2847
2848
2849 /* "pysam/libchtslib.pxd":2706
2850 *
2851 *
2852 * cdef class HTSFile(object): # <<<<<<<<<<<<<<
2853 * cdef htsFile *htsfile # pointer to htsFile structure
2854 * cdef int64_t start_offset # BGZF offset of first record
2855 */
2856
2857 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile {
2858 htsFile *(*_open_htsfile)(struct __pyx_obj_5pysam_10libchtslib_HTSFile *);
2859 };
2860 static struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtabptr_5pysam_10libchtslib_HTSFile;
2861
2862
2863 /* "pysam/libcbcf.pyx":1957
2864 *
2865 *
2866 * cdef class VariantHeader(object): # <<<<<<<<<<<<<<
2867 * """header information for a :class:`VariantFile` object"""
2868 * #FIXME: Add structured proxy
2869 */
2870
2871 struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader {
2872 PyObject *(*_add_sample)(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, PyObject *);
2873 PyObject *(*_hdr_sync)(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *);
2874 PyObject *(*_subset_samples)(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, PyObject *);
2875 };
2876 static struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *__pyx_vtabptr_5pysam_7libcbcf_VariantHeader;
2877
2878
2879 /* "pysam/libcbcf.pyx":4033
2880 *
2881 *
2882 * cdef class VariantFile(HTSFile): # <<<<<<<<<<<<<<
2883 * """*(filename, mode=None, index_filename=None, header=None, drop_samples=False,
2884 * duplicate_filehandle=True, ignore_truncation=False, threads=1)*
2885 */
2886
2887 struct __pyx_vtabstruct_5pysam_7libcbcf_VariantFile {
2888 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile __pyx_base;
2889 int (*write)(struct __pyx_obj_5pysam_7libcbcf_VariantFile *, struct __pyx_obj_5pysam_7libcbcf_VariantRecord *, int __pyx_skip_dispatch);
2890 };
2891 static struct __pyx_vtabstruct_5pysam_7libcbcf_VariantFile *__pyx_vtabptr_5pysam_7libcbcf_VariantFile;
2892 /* #### Code section: utility_code_proto ### */
2893
2894 /* --- Runtime support code (head) --- */
2895 /* Refnanny.proto */
2896 #ifndef CYTHON_REFNANNY
2897 #define CYTHON_REFNANNY 0
2898 #endif
2899 #if CYTHON_REFNANNY
2900 typedef struct {
2901 void (*INCREF)(void*, PyObject*, Py_ssize_t);
2902 void (*DECREF)(void*, PyObject*, Py_ssize_t);
2903 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
2904 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
2905 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
2906 void (*FinishContext)(void**);
2907 } __Pyx_RefNannyAPIStruct;
2908 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
2909 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
2910 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
2911 #ifdef WITH_THREAD
2912 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2913 if (acquire_gil) {\
2914 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2915 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2916 PyGILState_Release(__pyx_gilstate_save);\
2917 } else {\
2918 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2919 }
2920 #define __Pyx_RefNannyFinishContextNogil() {\
2921 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2922 __Pyx_RefNannyFinishContext();\
2923 PyGILState_Release(__pyx_gilstate_save);\
2924 }
2925 #else
2926 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2927 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
2928 #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
2929 #endif
2930 #define __Pyx_RefNannyFinishContextNogil() {\
2931 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2932 __Pyx_RefNannyFinishContext();\
2933 PyGILState_Release(__pyx_gilstate_save);\
2934 }
2935 #define __Pyx_RefNannyFinishContext()\
2936 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
2937 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2938 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2939 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2940 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2941 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
2942 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
2943 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
2944 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
2945 #else
2946 #define __Pyx_RefNannyDeclarations
2947 #define __Pyx_RefNannySetupContext(name, acquire_gil)
2948 #define __Pyx_RefNannyFinishContextNogil()
2949 #define __Pyx_RefNannyFinishContext()
2950 #define __Pyx_INCREF(r) Py_INCREF(r)
2951 #define __Pyx_DECREF(r) Py_DECREF(r)
2952 #define __Pyx_GOTREF(r)
2953 #define __Pyx_GIVEREF(r)
2954 #define __Pyx_XINCREF(r) Py_XINCREF(r)
2955 #define __Pyx_XDECREF(r) Py_XDECREF(r)
2956 #define __Pyx_XGOTREF(r)
2957 #define __Pyx_XGIVEREF(r)
2958 #endif
2959 #define __Pyx_Py_XDECREF_SET(r, v) do {\
2960 PyObject *tmp = (PyObject *) r;\
2961 r = v; Py_XDECREF(tmp);\
2962 } while (0)
2963 #define __Pyx_XDECREF_SET(r, v) do {\
2964 PyObject *tmp = (PyObject *) r;\
2965 r = v; __Pyx_XDECREF(tmp);\
2966 } while (0)
2967 #define __Pyx_DECREF_SET(r, v) do {\
2968 PyObject *tmp = (PyObject *) r;\
2969 r = v; __Pyx_DECREF(tmp);\
2970 } while (0)
2971 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
2972 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
2973
2974 /* PyErrExceptionMatches.proto */
2975 #if CYTHON_FAST_THREAD_STATE
2976 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2977 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2978 #else
2979 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2980 #endif
2981
2982 /* PyThreadStateGet.proto */
2983 #if CYTHON_FAST_THREAD_STATE
2984 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
2985 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
2986 #if PY_VERSION_HEX >= 0x030C00A6
2987 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
2988 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
2989 #else
2990 #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2991 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
2992 #endif
2993 #else
2994 #define __Pyx_PyThreadState_declare
2995 #define __Pyx_PyThreadState_assign
2996 #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
2997 #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
2998 #endif
2999
3000 /* PyErrFetchRestore.proto */
3001 #if CYTHON_FAST_THREAD_STATE
3002 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
3003 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
3004 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
3005 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
3006 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
3007 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
3008 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3009 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
3010 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
3011 #else
3012 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
3013 #endif
3014 #else
3015 #define __Pyx_PyErr_Clear() PyErr_Clear()
3016 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
3017 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
3018 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
3019 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
3020 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
3021 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
3022 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
3023 #endif
3024
3025 /* PyObjectGetAttrStr.proto */
3026 #if CYTHON_USE_TYPE_SLOTS
3027 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
3028 #else
3029 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
3030 #endif
3031
3032 /* PyObjectGetAttrStrNoError.proto */
3033 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
3034
3035 /* GetBuiltinName.proto */
3036 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
3037
3038 /* TupleAndListFromArray.proto */
3039 #if CYTHON_COMPILING_IN_CPYTHON
3040 static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
3041 static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
3042 #endif
3043
3044 /* IncludeStringH.proto */
3045 #include <string.h>
3046
3047 /* BytesEquals.proto */
3048 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
3049
3050 /* UnicodeEquals.proto */
3051 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
3052
3053 /* fastcall.proto */
3054 #if CYTHON_AVOID_BORROWED_REFS
3055 #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
3056 #elif CYTHON_ASSUME_SAFE_MACROS
3057 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
3058 #else
3059 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
3060 #endif
3061 #if CYTHON_AVOID_BORROWED_REFS
3062 #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
3063 #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
3064 #else
3065 #define __Pyx_Arg_NewRef_VARARGS(arg) arg
3066 #define __Pyx_Arg_XDECREF_VARARGS(arg)
3067 #endif
3068 #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
3069 #define __Pyx_KwValues_VARARGS(args, nargs) NULL
3070 #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
3071 #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
3072 #if CYTHON_METH_FASTCALL
3073 #define __Pyx_Arg_FASTCALL(args, i) args[i]
3074 #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
3075 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
3076 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
3077 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
3078 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
3079 #else
3080 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
3081 #endif
3082 #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
3083 to have the same reference counting */
3084 #define __Pyx_Arg_XDECREF_FASTCALL(arg)
3085 #else
3086 #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
3087 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
3088 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
3089 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
3090 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
3091 #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
3092 #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
3093 #endif
3094 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3095 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
3096 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
3097 #else
3098 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
3099 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
3100 #endif
3101
3102 /* Profile.proto */
3103 #ifndef CYTHON_PROFILE
3104 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
3105 #define CYTHON_PROFILE 0
3106 #else
3107 #define CYTHON_PROFILE 1
3108 #endif
3109 #endif
3110 #ifndef CYTHON_TRACE_NOGIL
3111 #define CYTHON_TRACE_NOGIL 0
3112 #else
3113 #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
3114 #define CYTHON_TRACE 1
3115 #endif
3116 #endif
3117 #ifndef CYTHON_TRACE
3118 #define CYTHON_TRACE 0
3119 #endif
3120 #if CYTHON_TRACE
3121 #undef CYTHON_PROFILE_REUSE_FRAME
3122 #endif
3123 #ifndef CYTHON_PROFILE_REUSE_FRAME
3124 #define CYTHON_PROFILE_REUSE_FRAME 0
3125 #endif
3126 #if CYTHON_PROFILE || CYTHON_TRACE
3127 #include "compile.h"
3128 #include "frameobject.h"
3129 #include "traceback.h"
3130 #if PY_VERSION_HEX >= 0x030b00a6
3131 #ifndef Py_BUILD_CORE
3132 #define Py_BUILD_CORE 1
3133 #endif
3134 #include "internal/pycore_frame.h"
3135 #endif
3136 #if CYTHON_PROFILE_REUSE_FRAME
3137 #define CYTHON_FRAME_MODIFIER static
3138 #define CYTHON_FRAME_DEL(frame)
3139 #else
3140 #define CYTHON_FRAME_MODIFIER
3141 #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
3142 #endif
3143 #define __Pyx_TraceDeclarations\
3144 static PyCodeObject *__pyx_frame_code = NULL;\
3145 CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
3146 int __Pyx_use_tracing = 0;
3147 #define __Pyx_TraceFrameInit(codeobj)\
3148 if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
3149 #if PY_VERSION_HEX >= 0x030b00a2
3150 #if PY_VERSION_HEX >= 0x030C00b1
3151 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
3152 ((!(check_tracing) || !(tstate)->tracing) &&\
3153 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
3154 #else
3155 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
3156 (unlikely((tstate)->cframe->use_tracing) &&\
3157 (!(check_tracing) || !(tstate)->tracing) &&\
3158 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
3159 #endif
3160 #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
3161 #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
3162 #elif PY_VERSION_HEX >= 0x030a00b1
3163 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
3164 (unlikely((tstate)->cframe->use_tracing) &&\
3165 (!(check_tracing) || !(tstate)->tracing) &&\
3166 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
3167 #define __Pyx_EnterTracing(tstate)\
3168 do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
3169 #define __Pyx_LeaveTracing(tstate)\
3170 do {\
3171 tstate->tracing--;\
3172 tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
3173 || tstate->c_profilefunc != NULL);\
3174 } while (0)
3175 #else
3176 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
3177 (unlikely((tstate)->use_tracing) &&\
3178 (!(check_tracing) || !(tstate)->tracing) &&\
3179 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
3180 #define __Pyx_EnterTracing(tstate)\
3181 do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
3182 #define __Pyx_LeaveTracing(tstate)\
3183 do {\
3184 tstate->tracing--;\
3185 tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
3186 || tstate->c_profilefunc != NULL);\
3187 } while (0)
3188 #endif
3189 #ifdef WITH_THREAD
3190 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
3191 if (nogil) {\
3192 if (CYTHON_TRACE_NOGIL) {\
3193 PyThreadState *tstate;\
3194 PyGILState_STATE state = PyGILState_Ensure();\
3195 tstate = __Pyx_PyThreadState_Current;\
3196 if (__Pyx_IsTracing(tstate, 1, 1)) {\
3197 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
3198 }\
3199 PyGILState_Release(state);\
3200 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
3201 }\
3202 } else {\
3203 PyThreadState* tstate = PyThreadState_GET();\
3204 if (__Pyx_IsTracing(tstate, 1, 1)) {\
3205 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
3206 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
3207 }\
3208 }
3209 #else
3210 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
3211 { PyThreadState* tstate = PyThreadState_GET();\
3212 if (__Pyx_IsTracing(tstate, 1, 1)) {\
3213 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
3214 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
3215 }\
3216 }
3217 #endif
3218 #define __Pyx_TraceException()\
3219 if (likely(!__Pyx_use_tracing)); else {\
3220 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3221 if (__Pyx_IsTracing(tstate, 0, 1)) {\
3222 __Pyx_EnterTracing(tstate);\
3223 PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
3224 if (exc_info) {\
3225 if (CYTHON_TRACE && tstate->c_tracefunc)\
3226 tstate->c_tracefunc(\
3227 tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
3228 tstate->c_profilefunc(\
3229 tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
3230 Py_DECREF(exc_info);\
3231 }\
3232 __Pyx_LeaveTracing(tstate);\
3233 }\
3234 }
3235 static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
3236 PyObject *type, *value, *traceback;
3237 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
3238 __Pyx_EnterTracing(tstate);
3239 if (CYTHON_TRACE && tstate->c_tracefunc)
3240 tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
3241 if (tstate->c_profilefunc)
3242 tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
3243 CYTHON_FRAME_DEL(frame);
3244 __Pyx_LeaveTracing(tstate);
3245 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
3246 }
3247 #ifdef WITH_THREAD
3248 #define __Pyx_TraceReturn(result, nogil)\
3249 if (likely(!__Pyx_use_tracing)); else {\
3250 if (nogil) {\
3251 if (CYTHON_TRACE_NOGIL) {\
3252 PyThreadState *tstate;\
3253 PyGILState_STATE state = PyGILState_Ensure();\
3254 tstate = __Pyx_PyThreadState_Current;\
3255 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3256 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
3257 }\
3258 PyGILState_Release(state);\
3259 }\
3260 } else {\
3261 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3262 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3263 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
3264 }\
3265 }\
3266 }
3267 #else
3268 #define __Pyx_TraceReturn(result, nogil)\
3269 if (likely(!__Pyx_use_tracing)); else {\
3270 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3271 if (__Pyx_IsTracing(tstate, 0, 0)) {\
3272 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
3273 }\
3274 }
3275 #endif
3276 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
3277 static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
3278 #else
3279 #define __Pyx_TraceDeclarations
3280 #define __Pyx_TraceFrameInit(codeobj)
3281 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
3282 #define __Pyx_TraceException()
3283 #define __Pyx_TraceReturn(result, nogil)
3284 #endif
3285 #if CYTHON_TRACE
3286 static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
3287 int ret;
3288 PyObject *type, *value, *traceback;
3289 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
3290 __Pyx_PyFrame_SetLineNumber(frame, lineno);
3291 __Pyx_EnterTracing(tstate);
3292 ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
3293 __Pyx_LeaveTracing(tstate);
3294 if (likely(!ret)) {
3295 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
3296 } else {
3297 Py_XDECREF(type);
3298 Py_XDECREF(value);
3299 Py_XDECREF(traceback);
3300 }
3301 return ret;
3302 }
3303 #ifdef WITH_THREAD
3304 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
3305 if (likely(!__Pyx_use_tracing)); else {\
3306 if (nogil) {\
3307 if (CYTHON_TRACE_NOGIL) {\
3308 int ret = 0;\
3309 PyThreadState *tstate;\
3310 PyGILState_STATE state = __Pyx_PyGILState_Ensure();\
3311 tstate = __Pyx_PyThreadState_Current;\
3312 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
3313 ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
3314 }\
3315 __Pyx_PyGILState_Release(state);\
3316 if (unlikely(ret)) goto_error;\
3317 }\
3318 } else {\
3319 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3320 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
3321 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
3322 if (unlikely(ret)) goto_error;\
3323 }\
3324 }\
3325 }
3326 #else
3327 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
3328 if (likely(!__Pyx_use_tracing)); else {\
3329 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
3330 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
3331 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
3332 if (unlikely(ret)) goto_error;\
3333 }\
3334 }
3335 #endif
3336 #else
3337 #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
3338 #endif
3339
3340 /* DivInt[long].proto */
3341 static CYTHON_INLINE long __Pyx_div_long(long, long);
3342
3343 /* PyObjectCall.proto */
3344 #if CYTHON_COMPILING_IN_CPYTHON
3345 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
3346 #else
3347 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
3348 #endif
3349
3350 /* PyIntBinop.proto */
3351 #if !CYTHON_COMPILING_IN_PYPY
3352 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
3353 #else
3354 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
3355 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
3356 #endif
3357
3358 /* RaiseException.proto */
3359 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
3360
3361 /* AssertionsEnabled.proto */
3362 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
3363 #define __Pyx_init_assertions_enabled() (0)
3364 #define __pyx_assertions_enabled() (1)
3365 #elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
3366 static int __pyx_assertions_enabled_flag;
3367 #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
3368 static int __Pyx_init_assertions_enabled(void) {
3369 PyObject *builtins, *debug, *debug_str;
3370 int flag;
3371 builtins = PyEval_GetBuiltins();
3372 if (!builtins) goto bad;
3373 debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
3374 if (!debug_str) goto bad;
3375 debug = PyObject_GetItem(builtins, debug_str);
3376 Py_DECREF(debug_str);
3377 if (!debug) goto bad;
3378 flag = PyObject_IsTrue(debug);
3379 Py_DECREF(debug);
3380 if (flag == -1) goto bad;
3381 __pyx_assertions_enabled_flag = flag;
3382 return 0;
3383 bad:
3384 __pyx_assertions_enabled_flag = 1;
3385 return -1;
3386 }
3387 #else
3388 #define __Pyx_init_assertions_enabled() (0)
3389 #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
3390 #endif
3391
3392 /* GetException.proto */
3393 #if CYTHON_FAST_THREAD_STATE
3394 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
3395 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3396 #else
3397 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
3398 #endif
3399
3400 /* pep479.proto */
3401 static void __Pyx_Generator_Replace_StopIteration(int in_async_gen);
3402
3403 /* SwapException.proto */
3404 #if CYTHON_FAST_THREAD_STATE
3405 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
3406 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3407 #else
3408 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
3409 #endif
3410
3411 /* GetTopmostException.proto */
3412 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
3413 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
3414 #endif
3415
3416 /* SaveResetException.proto */
3417 #if CYTHON_FAST_THREAD_STATE
3418 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
3419 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3420 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
3421 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
3422 #else
3423 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
3424 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
3425 #endif
3426
3427 /* RaiseUnboundLocalError.proto */
3428 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
3429
3430 /* UnpackUnboundCMethod.proto */
3431 typedef struct {
3432 PyObject *type;
3433 PyObject **method_name;
3434 PyCFunction func;
3435 PyObject *method;
3436 int flag;
3437 } __Pyx_CachedCFunction;
3438
3439 /* CallUnboundCMethod1.proto */
3440 static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
3441 #if CYTHON_COMPILING_IN_CPYTHON
3442 static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
3443 #else
3444 #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg)
3445 #endif
3446
3447 /* RaiseUnexpectedTypeError.proto */
3448 static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
3449
3450 /* ListAppend.proto */
3451 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
3452 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
3453 PyListObject* L = (PyListObject*) list;
3454 Py_ssize_t len = Py_SIZE(list);
3455 if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
3456 Py_INCREF(x);
3457 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
3458 L->ob_item[len] = x;
3459 #else
3460 PyList_SET_ITEM(list, len, x);
3461 #endif
3462 __Pyx_SET_SIZE(list, len + 1);
3463 return 0;
3464 }
3465 return PyList_Append(list, x);
3466 }
3467 #else
3468 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
3469 #endif
3470
3471 /* PyFunctionFastCall.proto */
3472 #if CYTHON_FAST_PYCALL
3473 #if !CYTHON_VECTORCALL
3474 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
3475 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
3476 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
3477 #endif
3478 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
3479 (sizeof(char [1 - 2*!(cond)]) - 1)
3480 #ifndef Py_MEMBER_SIZE
3481 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
3482 #endif
3483 #if !CYTHON_VECTORCALL
3484 #if PY_VERSION_HEX >= 0x03080000
3485 #include "frameobject.h"
3486 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
3487 #ifndef Py_BUILD_CORE
3488 #define Py_BUILD_CORE 1
3489 #endif
3490 #include "internal/pycore_frame.h"
3491 #endif
3492 #define __Pxy_PyFrame_Initialize_Offsets()
3493 #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
3494 #else
3495 static size_t __pyx_pyframe_localsplus_offset = 0;
3496 #include "frameobject.h"
3497 #define __Pxy_PyFrame_Initialize_Offsets()\
3498 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
3499 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
3500 #define __Pyx_PyFrame_GetLocalsplus(frame)\
3501 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
3502 #endif
3503 #endif
3504 #endif
3505
3506 /* PyObjectCallMethO.proto */
3507 #if CYTHON_COMPILING_IN_CPYTHON
3508 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
3509 #endif
3510
3511 /* PyObjectFastCall.proto */
3512 #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
3513 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
3514
3515 /* PyObjectCall2Args.proto */
3516 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
3517
3518 /* PyObjectCallOneArg.proto */
3519 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
3520
3521 /* PyObjectGetMethod.proto */
3522 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
3523
3524 /* PyObjectCallMethod1.proto */
3525 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
3526
3527 /* append.proto */
3528 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
3529
3530 /* PySequenceMultiply.proto */
3531 #define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul)
3532 static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
3533
3534 /* GetItemInt.proto */
3535 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
3536 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
3537 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
3538 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
3539 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
3540 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
3541 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
3542 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
3543 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
3544 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
3545 int wraparound, int boundscheck);
3546 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
3547 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
3548 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
3549 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
3550 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
3551 int wraparound, int boundscheck);
3552 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
3553 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
3554 int is_list, int wraparound, int boundscheck);
3555
3556 /* StringJoin.proto */
3557 #if PY_MAJOR_VERSION < 3
3558 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
3559 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
3560 #else
3561 #define __Pyx_PyString_Join PyUnicode_Join
3562 #define __Pyx_PyBaseString_Join PyUnicode_Join
3563 #endif
3564 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
3565
3566 /* PyIntCompare.proto */
3567 static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
3568
3569 /* PyObjectSetAttrStr.proto */
3570 #if CYTHON_USE_TYPE_SLOTS
3571 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
3572 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
3573 #else
3574 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
3575 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
3576 #endif
3577
3578 /* KeywordStringCheck.proto */
3579 static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
3580
3581 /* RaiseDoubleKeywords.proto */
3582 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
3583
3584 /* ParseKeywords.proto */
3585 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
3586 PyObject **argnames[],
3587 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
3588 const char* function_name);
3589
3590 /* RaiseArgTupleInvalid.proto */
3591 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
3592 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
3593
3594 /* ObjectGetItem.proto */
3595 #if CYTHON_USE_TYPE_SLOTS
3596 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
3597 #else
3598 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
3599 #endif
3600
3601 /* IterFinish.proto */
3602 static CYTHON_INLINE int __Pyx_IterFinish(void);
3603
3604 /* PyObjectCallNoArg.proto */
3605 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
3606
3607 /* PyObjectCallMethod0.proto */
3608 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
3609
3610 /* RaiseNeedMoreValuesToUnpack.proto */
3611 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
3612
3613 /* RaiseTooManyValuesToUnpack.proto */
3614 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
3615
3616 /* UnpackItemEndCheck.proto */
3617 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
3618
3619 /* RaiseNoneIterError.proto */
3620 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
3621
3622 /* UnpackTupleError.proto */
3623 static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
3624
3625 /* UnpackTuple2.proto */
3626 #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
3627 (likely(is_tuple || PyTuple_Check(tuple)) ?\
3628 (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
3629 __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
3630 (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
3631 __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
3632 static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
3633 PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
3634 static int __Pyx_unpack_tuple2_generic(
3635 PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);
3636
3637 /* dict_iter.proto */
3638 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
3639 Py_ssize_t* p_orig_length, int* p_is_dict);
3640 static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
3641 PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
3642
3643 /* GetAttr3.proto */
3644 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
3645
3646 /* PyDictVersioning.proto */
3647 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
3648 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
3649 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
3650 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
3651 (version_var) = __PYX_GET_DICT_VERSION(dict);\
3652 (cache_var) = (value);
3653 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
3654 static PY_UINT64_T __pyx_dict_version = 0;\
3655 static PyObject *__pyx_dict_cached_value = NULL;\
3656 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
3657 (VAR) = __pyx_dict_cached_value;\
3658 } else {\
3659 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
3660 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
3661 }\
3662 }
3663 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
3664 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
3665 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
3666 #else
3667 #define __PYX_GET_DICT_VERSION(dict) (0)
3668 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
3669 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
3670 #endif
3671
3672 /* GetModuleGlobalName.proto */
3673 #if CYTHON_USE_DICT_VERSIONS
3674 #define __Pyx_GetModuleGlobalName(var, name) do {\
3675 static PY_UINT64_T __pyx_dict_version = 0;\
3676 static PyObject *__pyx_dict_cached_value = NULL;\
3677 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
3678 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
3679 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
3680 } while(0)
3681 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
3682 PY_UINT64_T __pyx_dict_version;\
3683 PyObject *__pyx_dict_cached_value;\
3684 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
3685 } while(0)
3686 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
3687 #else
3688 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
3689 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
3690 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
3691 #endif
3692
3693 /* PySequenceContains.proto */
3694 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
3695 int result = PySequence_Contains(seq, item);
3696 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
3697 }
3698
3699 /* py_dict_items.proto */
3700 static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
3701
3702 /* CallUnboundCMethod0.proto */
3703 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
3704 #if CYTHON_COMPILING_IN_CPYTHON
3705 #define __Pyx_CallUnboundCMethod0(cfunc, self)\
3706 (likely((cfunc)->func) ?\
3707 (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
3708 (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
3709 (PY_VERSION_HEX >= 0x030700A0 ?\
3710 (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
3711 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
3712 (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
3713 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
3714 (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
3715 ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
3716 __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
3717 __Pyx__CallUnboundCMethod0(cfunc, self))
3718 #else
3719 #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
3720 #endif
3721
3722 /* WriteUnraisableException.proto */
3723 static void __Pyx_WriteUnraisable(const char *name, int clineno,
3724 int lineno, const char *filename,
3725 int full_traceback, int nogil);
3726
3727 /* ArgTypeTest.proto */
3728 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
3729 ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
3730 __Pyx__ArgTypeTest(obj, type, name, exact))
3731 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
3732
3733 /* DictGetItem.proto */
3734 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
3735 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
3736 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
3737 (likely(PyDict_CheckExact(obj)) ?\
3738 __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
3739 #else
3740 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
3741 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
3742 #endif
3743
3744 /* PyObject_Unicode.proto */
3745 #if PY_MAJOR_VERSION >= 3
3746 #define __Pyx_PyObject_Unicode(obj)\
3747 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
3748 #else
3749 #define __Pyx_PyObject_Unicode(obj)\
3750 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
3751 #endif
3752
3753 /* py_dict_pop.proto */
3754 static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value);
3755
3756 /* CallUnboundCMethod2.proto */
3757 static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
3758 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
3759 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
3760 #else
3761 #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
3762 #endif
3763
3764 /* ListCompAppend.proto */
3765 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
3766 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
3767 PyListObject* L = (PyListObject*) list;
3768 Py_ssize_t len = Py_SIZE(list);
3769 if (likely(L->allocated > len)) {
3770 Py_INCREF(x);
3771 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
3772 L->ob_item[len] = x;
3773 #else
3774 PyList_SET_ITEM(list, len, x);
3775 #endif
3776 __Pyx_SET_SIZE(list, len + 1);
3777 return 0;
3778 }
3779 return PyList_Append(list, x);
3780 }
3781 #else
3782 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
3783 #endif
3784
3785 /* SetItemInt.proto */
3786 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
3787 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
3788 __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
3789 (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
3790 __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
3791 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
3792 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
3793 int is_list, int wraparound, int boundscheck);
3794
3795 /* PyIntBinop.proto */
3796 #if !CYTHON_COMPILING_IN_PYPY
3797 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
3798 #else
3799 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
3800 (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
3801 #endif
3802
3803 /* RaiseClosureNameError.proto */
3804 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
3805
3806 /* ExtTypeTest.proto */
3807 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
3808
3809 /* PyUnicodeContains.proto */
3810 static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
3811 int result = PyUnicode_Contains(text, substring);
3812 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
3813 }
3814
3815 /* SliceObject.proto */
3816 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
3817 PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
3818 PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
3819 int has_cstart, int has_cstop, int wraparound);
3820
3821 /* Import.proto */
3822 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
3823
3824 /* ImportFrom.proto */
3825 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
3826
3827 /* GetAttr.proto */
3828 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
3829
3830 /* HasAttr.proto */
3831 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
3832
3833 /* CallNextTpDealloc.proto */
3834 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
3835
3836 /* CallNextTpTraverse.proto */
3837 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
3838
3839 /* CallNextTpClear.proto */
3840 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear);
3841
3842 /* IncludeStructmemberH.proto */
3843 #include <structmember.h>
3844
3845 /* FixUpExtensionType.proto */
3846 #if CYTHON_USE_TYPE_SPECS
3847 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
3848 #endif
3849
3850 /* ValidateBasesTuple.proto */
3851 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
3852 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
3853 #endif
3854
3855 /* PyType_Ready.proto */
3856 CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
3857
3858 /* PyObject_GenericGetAttrNoDict.proto */
3859 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
3860 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
3861 #else
3862 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
3863 #endif
3864
3865 /* PyObject_GenericGetAttr.proto */
3866 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
3867 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
3868 #else
3869 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
3870 #endif
3871
3872 /* SetVTable.proto */
3873 static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
3874
3875 /* GetVTable.proto */
3876 static void* __Pyx_GetVtable(PyTypeObject *type);
3877
3878 /* MergeVTables.proto */
3879 #if !CYTHON_COMPILING_IN_LIMITED_API
3880 static int __Pyx_MergeVtables(PyTypeObject *type);
3881 #endif
3882
3883 /* SetupReduce.proto */
3884 #if !CYTHON_COMPILING_IN_LIMITED_API
3885 static int __Pyx_setup_reduce(PyObject* type_obj);
3886 #endif
3887
3888 /* TypeImport.proto */
3889 #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
3890 #define __PYX_HAVE_RT_ImportType_proto_3_0_11
3891 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
3892 #include <stdalign.h>
3893 #endif
3894 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
3895 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
3896 #else
3897 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
3898 #endif
3899 enum __Pyx_ImportType_CheckSize_3_0_11 {
3900 __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
3901 __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
3902 __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
3903 };
3904 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size);
3905 #endif
3906
3907 /* ImportDottedModule.proto */
3908 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
3909 #if PY_MAJOR_VERSION >= 3
3910 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
3911 #endif
3912
3913 /* FetchSharedCythonModule.proto */
3914 static PyObject *__Pyx_FetchSharedCythonABIModule(void);
3915
3916 /* FetchCommonType.proto */
3917 #if !CYTHON_USE_TYPE_SPECS
3918 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
3919 #else
3920 static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
3921 #endif
3922
3923 /* PyMethodNew.proto */
3924 #if CYTHON_COMPILING_IN_LIMITED_API
3925 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
3926 PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
3927 CYTHON_UNUSED_VAR(typ);
3928 if (!self)
3929 return __Pyx_NewRef(func);
3930 typesModule = PyImport_ImportModule("types");
3931 if (!typesModule) return NULL;
3932 methodType = PyObject_GetAttrString(typesModule, "MethodType");
3933 Py_DECREF(typesModule);
3934 if (!methodType) return NULL;
3935 result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
3936 Py_DECREF(methodType);
3937 return result;
3938 }
3939 #elif PY_MAJOR_VERSION >= 3
3940 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
3941 CYTHON_UNUSED_VAR(typ);
3942 if (!self)
3943 return __Pyx_NewRef(func);
3944 return PyMethod_New(func, self);
3945 }
3946 #else
3947 #define __Pyx_PyMethod_New PyMethod_New
3948 #endif
3949
3950 /* PyVectorcallFastCallDict.proto */
3951 #if CYTHON_METH_FASTCALL
3952 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
3953 #endif
3954
3955 /* CythonFunctionShared.proto */
3956 #define __Pyx_CyFunction_USED
3957 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
3958 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
3959 #define __Pyx_CYFUNCTION_CCLASS 0x04
3960 #define __Pyx_CYFUNCTION_COROUTINE 0x08
3961 #define __Pyx_CyFunction_GetClosure(f)\
3962 (((__pyx_CyFunctionObject *) (f))->func_closure)
3963 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
3964 #define __Pyx_CyFunction_GetClassObj(f)\
3965 (((__pyx_CyFunctionObject *) (f))->func_classobj)
3966 #else
3967 #define __Pyx_CyFunction_GetClassObj(f)\
3968 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
3969 #endif
3970 #define __Pyx_CyFunction_SetClassObj(f, classobj)\
3971 __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
3972 #define __Pyx_CyFunction_Defaults(type, f)\
3973 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
3974 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
3975 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
3976 typedef struct {
3977 #if CYTHON_COMPILING_IN_LIMITED_API
3978 PyObject_HEAD
3979 PyObject *func;
3980 #elif PY_VERSION_HEX < 0x030900B1
3981 PyCFunctionObject func;
3982 #else
3983 PyCMethodObject func;
3984 #endif
3985 #if CYTHON_BACKPORT_VECTORCALL
3986 __pyx_vectorcallfunc func_vectorcall;
3987 #endif
3988 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
3989 PyObject *func_weakreflist;
3990 #endif
3991 PyObject *func_dict;
3992 PyObject *func_name;
3993 PyObject *func_qualname;
3994 PyObject *func_doc;
3995 PyObject *func_globals;
3996 PyObject *func_code;
3997 PyObject *func_closure;
3998 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
3999 PyObject *func_classobj;
4000 #endif
4001 void *defaults;
4002 int defaults_pyobjects;
4003 size_t defaults_size;
4004 int flags;
4005 PyObject *defaults_tuple;
4006 PyObject *defaults_kwdict;
4007 PyObject *(*defaults_getter)(PyObject *);
4008 PyObject *func_annotations;
4009 PyObject *func_is_coroutine;
4010 } __pyx_CyFunctionObject;
4011 #undef __Pyx_CyOrPyCFunction_Check
4012 #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
4013 #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
4014 #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
4015 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
4016 #undef __Pyx_IsSameCFunction
4017 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
4018 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
4019 int flags, PyObject* qualname,
4020 PyObject *closure,
4021 PyObject *module, PyObject *globals,
4022 PyObject* code);
4023 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
4024 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
4025 size_t size,
4026 int pyobjects);
4027 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
4028 PyObject *tuple);
4029 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
4030 PyObject *dict);
4031 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
4032 PyObject *dict);
4033 static int __pyx_CyFunction_init(PyObject *module);
4034 #if CYTHON_METH_FASTCALL
4035 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
4036 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
4037 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
4038 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
4039 #if CYTHON_BACKPORT_VECTORCALL
4040 #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
4041 #else
4042 #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
4043 #endif
4044 #endif
4045
4046 /* CythonFunction.proto */
4047 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
4048 int flags, PyObject* qualname,
4049 PyObject *closure,
4050 PyObject *module, PyObject *globals,
4051 PyObject* code);
4052
4053 /* CLineInTraceback.proto */
4054 #ifdef CYTHON_CLINE_IN_TRACEBACK
4055 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
4056 #else
4057 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
4058 #endif
4059
4060 /* CodeObjectCache.proto */
4061 #if !CYTHON_COMPILING_IN_LIMITED_API
4062 typedef struct {
4063 PyCodeObject* code_object;
4064 int code_line;
4065 } __Pyx_CodeObjectCacheEntry;
4066 struct __Pyx_CodeObjectCache {
4067 int count;
4068 int max_count;
4069 __Pyx_CodeObjectCacheEntry* entries;
4070 };
4071 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
4072 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
4073 static PyCodeObject *__pyx_find_code_object(int code_line);
4074 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
4075 #endif
4076
4077 /* AddTraceback.proto */
4078 static void __Pyx_AddTraceback(const char *funcname, int c_line,
4079 int py_line, const char *filename);
4080
4081 /* GCCDiagnostics.proto */
4082 #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
4083 #define __Pyx_HAS_GCC_DIAGNOSTIC
4084 #endif
4085
4086 /* ArrayAPI.proto */
4087 #ifndef _ARRAYARRAY_H
4088 #define _ARRAYARRAY_H
4089 typedef struct arraydescr {
4090 int typecode;
4091 int itemsize;
4092 PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
4093 int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *);
4094 #if PY_MAJOR_VERSION >= 3
4095 char *formats;
4096 #endif
4097 } arraydescr;
4098 struct arrayobject {
4099 PyObject_HEAD
4100 Py_ssize_t ob_size;
4101 union {
4102 char *ob_item;
4103 float *as_floats;
4104 double *as_doubles;
4105 int *as_ints;
4106 unsigned int *as_uints;
4107 unsigned char *as_uchars;
4108 signed char *as_schars;
4109 char *as_chars;
4110 unsigned long *as_ulongs;
4111 long *as_longs;
4112 #if PY_MAJOR_VERSION >= 3
4113 unsigned long long *as_ulonglongs;
4114 long long *as_longlongs;
4115 #endif
4116 short *as_shorts;
4117 unsigned short *as_ushorts;
4118 Py_UNICODE *as_pyunicodes;
4119 void *as_voidptr;
4120 } data;
4121 Py_ssize_t allocated;
4122 struct arraydescr *ob_descr;
4123 PyObject *weakreflist;
4124 #if PY_MAJOR_VERSION >= 3
4125 int ob_exports;
4126 #endif
4127 };
4128 #ifndef NO_NEWARRAY_INLINE
4129 static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
4130 struct arraydescr *descr) {
4131 arrayobject *op;
4132 size_t nbytes;
4133 if (size < 0) {
4134 PyErr_BadInternalCall();
4135 return NULL;
4136 }
4137 nbytes = size * descr->itemsize;
4138 if (nbytes / descr->itemsize != (size_t)size) {
4139 return PyErr_NoMemory();
4140 }
4141 op = (arrayobject *) type->tp_alloc(type, 0);
4142 if (op == NULL) {
4143 return NULL;
4144 }
4145 op->ob_descr = descr;
4146 op->allocated = size;
4147 op->weakreflist = NULL;
4148 __Pyx_SET_SIZE(op, size);
4149 if (size <= 0) {
4150 op->data.ob_item = NULL;
4151 }
4152 else {
4153 op->data.ob_item = PyMem_NEW(char, nbytes);
4154 if (op->data.ob_item == NULL) {
4155 Py_DECREF(op);
4156 return PyErr_NoMemory();
4157 }
4158 }
4159 return (PyObject *) op;
4160 }
4161 #else
4162 PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size,
4163 struct arraydescr *descr);
4164 #endif
4165 static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) {
4166 void *items = (void*) self->data.ob_item;
4167 PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize));
4168 if (items == NULL) {
4169 PyErr_NoMemory();
4170 return -1;
4171 }
4172 self->data.ob_item = (char*) items;
4173 __Pyx_SET_SIZE(self, n);
4174 self->allocated = n;
4175 return 0;
4176 }
4177 static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) {
4178 void *items = (void*) self->data.ob_item;
4179 Py_ssize_t newsize;
4180 if (n < self->allocated && n*4 > self->allocated) {
4181 __Pyx_SET_SIZE(self, n);
4182 return 0;
4183 }
4184 newsize = n + (n / 2) + 1;
4185 if (newsize <= n) {
4186 PyErr_NoMemory();
4187 return -1;
4188 }
4189 PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize));
4190 if (items == NULL) {
4191 PyErr_NoMemory();
4192 return -1;
4193 }
4194 self->data.ob_item = (char*) items;
4195 __Pyx_SET_SIZE(self, n);
4196 self->allocated = newsize;
4197 return 0;
4198 }
4199 #endif
4200
4201 /* CIntToPy.proto */
4202 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
4203
4204 /* CIntFromPy.proto */
4205 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
4206
4207 /* CIntToPy.proto */
4208 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);
4209
4210 /* CIntFromPy.proto */
4211 static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);
4212
4213 /* CIntFromPy.proto */
4214 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
4215
4216 /* CIntToPy.proto */
4217 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
4218
4219 /* CIntToPy.proto */
4220 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int8_t(int8_t value);
4221
4222 /* CIntToPy.proto */
4223 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value);
4224
4225 /* CIntFromPy.proto */
4226 static CYTHON_INLINE int8_t __Pyx_PyInt_As_int8_t(PyObject *);
4227
4228 /* CIntFromPy.proto */
4229 static CYTHON_INLINE int16_t __Pyx_PyInt_As_int16_t(PyObject *);
4230
4231 /* CIntToPy.proto */
4232 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);
4233
4234 /* CIntFromPy.proto */
4235 static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);
4236
4237 /* CIntToPy.proto */
4238 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint8_t(uint8_t value);
4239
4240 /* CIntFromPy.proto */
4241 static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);
4242
4243 /* CIntToPy.proto */
4244 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
4245
4246 /* FormatTypeName.proto */
4247 #if CYTHON_COMPILING_IN_LIMITED_API
4248 typedef PyObject *__Pyx_TypeName;
4249 #define __Pyx_FMT_TYPENAME "%U"
4250 static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
4251 #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
4252 #else
4253 typedef const char *__Pyx_TypeName;
4254 #define __Pyx_FMT_TYPENAME "%.200s"
4255 #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
4256 #define __Pyx_DECREF_TypeName(obj)
4257 #endif
4258
4259 /* FastTypeChecks.proto */
4260 #if CYTHON_COMPILING_IN_CPYTHON
4261 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
4262 #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
4263 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
4264 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
4265 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
4266 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
4267 #else
4268 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
4269 #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
4270 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
4271 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
4272 #endif
4273 #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
4274 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
4275
4276 /* CoroutineBase.proto */
4277 struct __pyx_CoroutineObject;
4278 typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
4279 #if CYTHON_USE_EXC_INFO_STACK
4280 #define __Pyx_ExcInfoStruct _PyErr_StackItem
4281 #else
4282 typedef struct {
4283 PyObject *exc_type;
4284 PyObject *exc_value;
4285 PyObject *exc_traceback;
4286 } __Pyx_ExcInfoStruct;
4287 #endif
4288 typedef struct __pyx_CoroutineObject {
4289 PyObject_HEAD
4290 __pyx_coroutine_body_t body;
4291 PyObject *closure;
4292 __Pyx_ExcInfoStruct gi_exc_state;
4293 PyObject *gi_weakreflist;
4294 PyObject *classobj;
4295 PyObject *yieldfrom;
4296 PyObject *gi_name;
4297 PyObject *gi_qualname;
4298 PyObject *gi_modulename;
4299 PyObject *gi_code;
4300 PyObject *gi_frame;
4301 int resume_label;
4302 char is_running;
4303 } __pyx_CoroutineObject;
4304 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
4305 PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
4306 PyObject *name, PyObject *qualname, PyObject *module_name);
4307 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
4308 __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
4309 PyObject *name, PyObject *qualname, PyObject *module_name);
4310 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
4311 static int __Pyx_Coroutine_clear(PyObject *self);
4312 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
4313 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
4314 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
4315 #if CYTHON_USE_EXC_INFO_STACK
4316 #define __Pyx_Coroutine_SwapException(self)
4317 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
4318 #else
4319 #define __Pyx_Coroutine_SwapException(self) {\
4320 __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
4321 __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
4322 }
4323 #define __Pyx_Coroutine_ResetAndClearException(self) {\
4324 __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
4325 (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
4326 }
4327 #endif
4328 #if CYTHON_FAST_THREAD_STATE
4329 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
4330 __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
4331 #else
4332 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
4333 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
4334 #endif
4335 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
4336 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
4337
4338 /* PatchModuleWithCoroutine.proto */
4339 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
4340
4341 /* PatchGeneratorABC.proto */
4342 static int __Pyx_patch_abc(void);
4343
4344 /* Generator.proto */
4345 #define __Pyx_Generator_USED
4346 #define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType)
4347 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
4348 __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
4349 static PyObject *__Pyx_Generator_Next(PyObject *self);
4350 static int __pyx_Generator_init(PyObject *module);
4351
4352 /* CheckBinaryVersion.proto */
4353 static unsigned long __Pyx_get_runtime_version(void);
4354 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
4355
4356 /* FunctionImport.proto */
4357 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
4358
4359 /* InitStrings.proto */
4360 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
4361
4362 /* #### Code section: module_declarations ### */
4363 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
4364 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
4365 static PyObject *__pyx_f_5pysam_7libcbcf_13VariantHeader__subset_samples(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_include_samples); /* proto*/
4366 static PyObject *__pyx_f_5pysam_7libcbcf_13VariantHeader__add_sample(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_name); /* proto*/
4367 static PyObject *__pyx_f_5pysam_7libcbcf_13VariantHeader__hdr_sync(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto*/
4368 static int __pyx_f_5pysam_7libcbcf_11VariantFile_write(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, int __pyx_skip_dispatch); /* proto*/
4369
4370 /* Module declarations from "libc.stdint" */
4371
4372 /* Module declarations from "libc.string" */
4373
4374 /* Module declarations from "libc.stdlib" */
4375
4376 /* Module declarations from "libc.stdio" */
4377
4378 /* Module declarations from "posix.types" */
4379
4380 /* Module declarations from "pysam.libchtslib" */
4381
4382 /* Module declarations from "libc.errno" */
4383
4384 /* Module declarations from "cython" */
4385
4386 /* Module declarations from "__builtin__" */
4387
4388 /* Module declarations from "cpython.type" */
4389
4390 /* Module declarations from "cpython.version" */
4391
4392 /* Module declarations from "cpython.ref" */
4393
4394 /* Module declarations from "cpython.exc" */
4395
4396 /* Module declarations from "cpython.module" */
4397
4398 /* Module declarations from "cpython.mem" */
4399
4400 /* Module declarations from "cpython.tuple" */
4401
4402 /* Module declarations from "cpython.list" */
4403
4404 /* Module declarations from "cpython.sequence" */
4405
4406 /* Module declarations from "cpython.mapping" */
4407
4408 /* Module declarations from "cpython.iterator" */
4409
4410 /* Module declarations from "cpython.number" */
4411
4412 /* Module declarations from "cpython.int" */
4413
4414 /* Module declarations from "__builtin__" */
4415
4416 /* Module declarations from "cpython.bool" */
4417
4418 /* Module declarations from "cpython.long" */
4419
4420 /* Module declarations from "cpython.float" */
4421
4422 /* Module declarations from "__builtin__" */
4423
4424 /* Module declarations from "cpython.complex" */
4425
4426 /* Module declarations from "cpython.string" */
4427
4428 /* Module declarations from "libc.stddef" */
4429
4430 /* Module declarations from "cpython.unicode" */
4431
4432 /* Module declarations from "cpython.pyport" */
4433
4434 /* Module declarations from "cpython.dict" */
4435
4436 /* Module declarations from "cpython.instance" */
4437
4438 /* Module declarations from "cpython.function" */
4439
4440 /* Module declarations from "cpython.method" */
4441
4442 /* Module declarations from "cpython.weakref" */
4443
4444 /* Module declarations from "cpython.getargs" */
4445
4446 /* Module declarations from "cpython.pythread" */
4447
4448 /* Module declarations from "cpython.pystate" */
4449
4450 /* Module declarations from "cpython.cobject" */
4451
4452 /* Module declarations from "cpython.oldbuffer" */
4453
4454 /* Module declarations from "cpython.set" */
4455
4456 /* Module declarations from "cpython.buffer" */
4457
4458 /* Module declarations from "cpython.bytes" */
4459
4460 /* Module declarations from "cpython.pycapsule" */
4461
4462 /* Module declarations from "cpython.contextvars" */
4463
4464 /* Module declarations from "cpython" */
4465
4466 /* Module declarations from "cpython.object" */
4467
4468 /* Module declarations from "array" */
4469
4470 /* Module declarations from "cpython.array" */
4471 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/
4472
4473 /* Module declarations from "pysam.libcutils" */
4474 static PyObject *(*__pyx_f_5pysam_9libcutils_charptr_to_str)(char const *, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str *__pyx_optional_args); /*proto*/
4475 static PyObject *(*__pyx_f_5pysam_9libcutils_charptr_to_str_w_len)(char const *, size_t, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len *__pyx_optional_args); /*proto*/
4476 static PyObject *(*__pyx_f_5pysam_9libcutils_force_str)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args); /*proto*/
4477 static PyObject *(*__pyx_f_5pysam_9libcutils_force_bytes)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_bytes *__pyx_optional_args); /*proto*/
4478 static PyObject *(*__pyx_f_5pysam_9libcutils_decode_bytes)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_decode_bytes *__pyx_optional_args); /*proto*/
4479 static PyObject *(*__pyx_f_5pysam_9libcutils_encode_filename)(PyObject *); /*proto*/
4480 static PyObject *(*__pyx_f_5pysam_9libcutils_from_string_and_size)(char const *, size_t); /*proto*/
4481
4482 /* Module declarations from "pysam.libcbcf" */
4483 static int __pyx_v_5pysam_7libcbcf_MAX_POS;
4484 static PyObject *__pyx_v_5pysam_7libcbcf_VALUE_TYPES = 0;
4485 static PyObject *__pyx_v_5pysam_7libcbcf_METADATA_TYPES = 0;
4486 static PyObject *__pyx_v_5pysam_7libcbcf_METADATA_LENGTHS = 0;
4487 static PyObject *__pyx_v_5pysam_7libcbcf__nothing = 0;
4488 static PyObject *__pyx_v_5pysam_7libcbcf_bcf_str_cache = 0;
4489 static CYTHON_INLINE PyObject *__pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(char const *); /*proto*/
4490 static int __pyx_f_5pysam_7libcbcf_comb(int, int); /*proto*/
4491 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_bcf_geno_combinations(int, int); /*proto*/
4492 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_check_header_id(bcf_hdr_t *, int, int); /*proto*/
4493 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_is_gt_fmt(bcf_hdr_t *, int); /*proto*/
4494 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_bcf_genotype_count(bcf_hdr_t *, bcf1_t *, int); /*proto*/
4495 static PyObject *__pyx_f_5pysam_7libcbcf_char_array_to_tuple(char const **, Py_ssize_t, struct __pyx_opt_args_5pysam_7libcbcf_char_array_to_tuple *__pyx_optional_args); /*proto*/
4496 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_array_to_object(void *, int, Py_ssize_t, Py_ssize_t, int); /*proto*/
4497 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_object_to_array(PyObject *, void *, int, Py_ssize_t, int); /*proto*/
4498 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_empty_array(int, Py_ssize_t, int); /*proto*/
4499 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_copy_expand_array(void *, int, size_t, void *, int, size_t, int); /*proto*/
4500 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_get_value_count(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *, int, int, Py_ssize_t *, int *, int); /*proto*/
4501 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_info_get_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *, bcf_info_t const *); /*proto*/
4502 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_check_values(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *, PyObject *, int, int, int, int, int, Py_ssize_t, Py_ssize_t *, int *, int *); /*proto*/
4503 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_encode_alleles(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *, PyObject *); /*proto*/
4504 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_info_set_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *, PyObject *, PyObject *); /*proto*/
4505 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_get_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *, PyObject *); /*proto*/
4506 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_set_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *, PyObject *, PyObject *); /*proto*/
4507 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_del_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *, PyObject *); /*proto*/
4508 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_get_allele_indices(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *); /*proto*/
4509 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_get_alleles(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *); /*proto*/
4510 static int __pyx_f_5pysam_7libcbcf_bcf_sample_get_phased(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *); /*proto*/
4511 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_sample_set_phased(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *, int); /*proto*/
4512 static CYTHON_INLINE PyObject *__pyx_f_5pysam_7libcbcf_bcf_sync_end(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *); /*proto*/
4513 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_has_symbolic_allele(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *); /*proto*/
4514 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecord(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, bcf_hrec_t *); /*proto*/
4515 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecords(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *); /*proto*/
4516 static struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_f_5pysam_7libcbcf_makeVariantMetadata(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, int, int); /*proto*/
4517 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_f_5pysam_7libcbcf_makeVariantHeaderMetadata(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, int32_t); /*proto*/
4518 static struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_f_5pysam_7libcbcf_makeVariantContig(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, int); /*proto*/
4519 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_f_5pysam_7libcbcf_makeVariantHeaderContigs(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *); /*proto*/
4520 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_f_5pysam_7libcbcf_makeVariantHeaderSamples(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *); /*proto*/
4521 static struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_f_5pysam_7libcbcf_makeVariantHeader(bcf_hdr_t *); /*proto*/
4522 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_bcf_header_get_info_id(bcf_hdr_t *, PyObject *); /*proto*/
4523 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_f_5pysam_7libcbcf_makeVariantRecordFilter(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *); /*proto*/
4524 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_f_5pysam_7libcbcf_makeVariantRecordFormat(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *); /*proto*/
4525 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_f_5pysam_7libcbcf_makeVariantRecordInfo(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *); /*proto*/
4526 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_f_5pysam_7libcbcf_makeVariantRecordSamples(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *); /*proto*/
4527 static struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_f_5pysam_7libcbcf_makeVariantRecord(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, bcf1_t *); /*proto*/
4528 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_f_5pysam_7libcbcf_makeVariantRecordSample(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *, int32_t); /*proto*/
4529 static struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_f_5pysam_7libcbcf_makeBCFIndex(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, hts_idx_t *); /*proto*/
4530 static struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_f_5pysam_7libcbcf_makeTabixIndex(tbx_t *); /*proto*/
4531 static void __pyx_f_5pysam_7libcbcf__stop_BCFIterator(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *, bcf1_t *); /*proto*/
4532 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *, PyObject *); /*proto*/
4533 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantMetadata__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *, PyObject *); /*proto*/
4534 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderMetadata__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *, PyObject *); /*proto*/
4535 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantContig__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantContig *, PyObject *); /*proto*/
4536 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderContigs__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *, PyObject *); /*proto*/
4537 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderSamples__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *, PyObject *); /*proto*/
4538 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordFilter__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *, PyObject *); /*proto*/
4539 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordFormat__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *, PyObject *); /*proto*/
4540 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordInfo__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *, PyObject *); /*proto*/
4541 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordSamples__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *, PyObject *); /*proto*/
4542 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordSample__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *, PyObject *); /*proto*/
4543 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_BaseIndex__set_state(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *, PyObject *); /*proto*/
4544 /* #### Code section: typeinfo ### */
4545 /* #### Code section: before_global_var ### */
4546 #define __Pyx_MODULE_NAME "pysam.libcbcf"
4547 extern int __pyx_module_is_main_pysam__libcbcf;
4548 int __pyx_module_is_main_pysam__libcbcf = 0;
4549
4550 /* Implementation of "pysam.libcbcf" */
4551 /* #### Code section: global_var ### */
4552 static PyObject *__pyx_builtin_object;
4553 static PyObject *__pyx_builtin_range;
4554 static PyObject *__pyx_builtin_ValueError;
4555 static PyObject *__pyx_builtin_AssertionError;
4556 static PyObject *__pyx_builtin_TypeError;
4557 static PyObject *__pyx_builtin_chr;
4558 static PyObject *__pyx_builtin_KeyError;
4559 static PyObject *__pyx_builtin_IndexError;
4560 static PyObject *__pyx_builtin_MemoryError;
4561 static PyObject *__pyx_builtin_enumerate;
4562 static PyObject *__pyx_builtin_NotImplemented;
4563 static PyObject *__pyx_builtin_reversed;
4564 static PyObject *__pyx_builtin_IOError;
4565 static PyObject *__pyx_builtin_StopIteration;
4566 /* #### Code section: string_decls ### */
4567 static const char __pyx_k_A[] = "A";
4568 static const char __pyx_k_G[] = "G";
4569 static const char __pyx_k_R[] = "R";
4570 static const char __pyx_k_d[] = "d";
4571 static const char __pyx_k_f[] = "f";
4572 static const char __pyx_k_i[] = "i";
4573 static const char __pyx_k_k[] = "k";
4574 static const char __pyx_k_m[] = "m";
4575 static const char __pyx_k_n[] = "n";
4576 static const char __pyx_k_r[] = "r";
4577 static const char __pyx_k_v[] = "v";
4578 static const char __pyx_k_w[] = "w";
4579 static const char __pyx_k_GT[] = "GT";
4580 static const char __pyx_k_ID[] = "ID";
4581 static const char __pyx_k__2[] = ",";
4582 static const char __pyx_k_gc[] = "gc";
4583 static const char __pyx_k_gz[] = ".gz";
4584 static const char __pyx_k_id[] = "id";
4585 static const char __pyx_k_os[] = "os";
4586 static const char __pyx_k_wb[] = "wb";
4587 static const char __pyx_k_wz[] = "wz";
4588 static const char __pyx_k_ALT[] = "ALT";
4589 static const char __pyx_k_BND[] = "BND";
4590 static const char __pyx_k_END[] = "END";
4591 static const char __pyx_k_MNP[] = "MNP";
4592 static const char __pyx_k_REF[] = "REF";
4593 static const char __pyx_k_SNP[] = "SNP";
4594 static const char __pyx_k__12[] = "";
4595 static const char __pyx_k__52[] = ".";
4596 static const char __pyx_k__53[] = "\"";
4597 static const char __pyx_k_add[] = "add";
4598 static const char __pyx_k_all[] = "__all__";
4599 static const char __pyx_k_arg[] = "arg";
4600 static const char __pyx_k_bcf[] = "bcf";
4601 static const char __pyx_k_chr[] = "chr";
4602 static const char __pyx_k_end[] = "end";
4603 static const char __pyx_k_fmt[] = "fmt";
4604 static const char __pyx_k_get[] = "get";
4605 static const char __pyx_k_hdr[] = "hdr";
4606 static const char __pyx_k_idx[] = "idx";
4607 static const char __pyx_k_key[] = "key";
4608 static const char __pyx_k_msg[] = "msg";
4609 static const char __pyx_k_new[] = "__new__";
4610 static const char __pyx_k_pop[] = "pop";
4611 static const char __pyx_k_rec[] = "rec";
4612 static const char __pyx_k_ref[] = "ref";
4613 static const char __pyx_k_ret[] = "ret";
4614 static const char __pyx_k_rid[] = "rid";
4615 static const char __pyx_k_rwa[] = "rwa";
4616 static const char __pyx_k_sys[] = "sys";
4617 static const char __pyx_k_tid[] = "tid";
4618 static const char __pyx_k_wb0[] = "wb0";
4619 static const char __pyx_k_wbu[] = "wbu";
4620 static const char __pyx_k_Flag[] = "Flag";
4621 static const char __pyx_k_INFO[] = "INFO";
4622 static const char __pyx_k_PASS[] = "PASS";
4623 static const char __pyx_k_Type[] = "Type";
4624 static const char __pyx_k__181[] = ", ";
4625 static const char __pyx_k__241[] = "-";
4626 static const char __pyx_k__278[] = "*";
4627 static const char __pyx_k__323[] = "_";
4628 static const char __pyx_k__330[] = "?";
4629 static const char __pyx_k_args[] = "args";
4630 static const char __pyx_k_bkey[] = "bkey";
4631 static const char __pyx_k_ckey[] = "ckey";
4632 static const char __pyx_k_copy[] = "copy";
4633 static const char __pyx_k_dict[] = "__dict__";
4634 static const char __pyx_k_hash[] = "__hash__";
4635 static const char __pyx_k_hrec[] = "hrec";
4636 static const char __pyx_k_info[] = "info";
4637 static const char __pyx_k_init[] = "__init__";
4638 static const char __pyx_k_iter[] = "__iter__";
4639 static const char __pyx_k_join[] = "join";
4640 static const char __pyx_k_keys[] = "keys";
4641 static const char __pyx_k_line[] = "line";
4642 static const char __pyx_k_main[] = "__main__";
4643 static const char __pyx_k_mode[] = "mode";
4644 static const char __pyx_k_name[] = "name";
4645 static const char __pyx_k_open[] = "open";
4646 static const char __pyx_k_qual[] = "qual";
4647 static const char __pyx_k_seek[] = "seek";
4648 static const char __pyx_k_self[] = "self";
4649 static const char __pyx_k_send[] = "send";
4650 static const char __pyx_k_spec[] = "__spec__";
4651 static const char __pyx_k_stop[] = "stop";
4652 static const char __pyx_k_tell[] = "tell";
4653 static const char __pyx_k_test[] = "__test__";
4654 static const char __pyx_k_tidx[] = "tidx";
4655 static const char __pyx_k_type[] = "type";
4656 static const char __pyx_k_vars[] = "vars";
4657 static const char __pyx_k_FIXED[] = "FIXED";
4658 static const char __pyx_k_Float[] = "Float";
4659 static const char __pyx_k_INDEL[] = "INDEL";
4660 static const char __pyx_k_OTHER[] = "OTHER";
4661 static const char __pyx_k_bcf_2[] = ".bcf";
4662 static const char __pyx_k_bcguz[] = "bcguz";
4663 static const char __pyx_k_bgzfp[] = "bgzfp";
4664 static const char __pyx_k_bline[] = "bline";
4665 static const char __pyx_k_clear[] = "clear";
4666 static const char __pyx_k_close[] = "close";
4667 static const char __pyx_k_cmode[] = "cmode";
4668 static const char __pyx_k_fetch[] = "fetch";
4669 static const char __pyx_k_index[] = "index";
4670 static const char __pyx_k_items[] = "items";
4671 static const char __pyx_k_merge[] = "merge";
4672 static const char __pyx_k_range[] = "range";
4673 static const char __pyx_k_remap[] = "remap";
4674 static const char __pyx_k_reset[] = "reset";
4675 static const char __pyx_k_split[] = "split";
4676 static const char __pyx_k_start[] = "start";
4677 static const char __pyx_k_state[] = "state";
4678 static const char __pyx_k_strip[] = "strip";
4679 static const char __pyx_k_throw[] = "throw";
4680 static const char __pyx_k_upper[] = "upper";
4681 static const char __pyx_k_utf_8[] = "utf-8";
4682 static const char __pyx_k_value[] = "value";
4683 static const char __pyx_k_write[] = "write";
4684 static const char __pyx_k_CONTIG[] = "CONTIG";
4685 static const char __pyx_k_FILTER[] = "FILTER";
4686 static const char __pyx_k_FORMAT[] = "FORMAT";
4687 static const char __pyx_k_Number[] = "Number";
4688 static const char __pyx_k_String[] = "String";
4689 static const char __pyx_k_append[] = "append";
4690 static const char __pyx_k_contig[] = "contig";
4691 static const char __pyx_k_dict_2[] = "_dict";
4692 static const char __pyx_k_enable[] = "enable";
4693 static const char __pyx_k_filter[] = "filter";
4694 static const char __pyx_k_format[] = "format";
4695 static const char __pyx_k_header[] = "header";
4696 static const char __pyx_k_import[] = "__import__";
4697 static const char __pyx_k_kwargs[] = "kwargs";
4698 static const char __pyx_k_length[] = "length";
4699 static const char __pyx_k_name_2[] = "__name__";
4700 static const char __pyx_k_number[] = "number";
4701 static const char __pyx_k_object[] = "object";
4702 static const char __pyx_k_phased[] = "phased";
4703 static const char __pyx_k_pickle[] = "pickle";
4704 static const char __pyx_k_quoted[] = "quoted";
4705 static const char __pyx_k_record[] = "record";
4706 static const char __pyx_k_reduce[] = "__reduce__";
4707 static const char __pyx_k_region[] = "region";
4708 static const char __pyx_k_remove[] = "remove";
4709 static const char __pyx_k_reopen[] = "reopen";
4710 static const char __pyx_k_sample[] = "sample";
4711 static const char __pyx_k_update[] = "update";
4712 static const char __pyx_k_values[] = "values";
4713 static const char __pyx_k_GENERIC[] = "GENERIC";
4714 static const char __pyx_k_IOError[] = "IOError";
4715 static const char __pyx_k_Integer[] = "Integer";
4716 static const char __pyx_k_NON_REF[] = "<NON_REF>";
4717 static const char __pyx_k_OVERLAP[] = "OVERLAP";
4718 static const char __pyx_k_alleles[] = "alleles";
4719 static const char __pyx_k_default[] = "default";
4720 static const char __pyx_k_disable[] = "disable";
4721 static const char __pyx_k_dst_hdr[] = "dst_hdr";
4722 static const char __pyx_k_genexpr[] = "genexpr";
4723 static const char __pyx_k_get_tid[] = "get_tid";
4724 static const char __pyx_k_info_id[] = "info_id";
4725 static const char __pyx_k_is_open[] = "is_open";
4726 static const char __pyx_k_records[] = "records";
4727 static const char __pyx_k_samples[] = "samples";
4728 static const char __pyx_k_src_hdr[] = "src_hdr";
4729 static const char __pyx_k_threads[] = "threads";
4730 static const char __pyx_k_BCFIndex[] = "BCFIndex";
4731 static const char __pyx_k_KeyError[] = "KeyError";
4732 static const char __pyx_k_VARIABLE[] = "VARIABLE";
4733 static const char __pyx_k_add_line[] = "add_line";
4734 static const char __pyx_k_add_meta[] = "add_meta";
4735 static const char __pyx_k_endswith[] = "endswith";
4736 static const char __pyx_k_filename[] = "filename";
4737 static const char __pyx_k_getstate[] = "__getstate__";
4738 static const char __pyx_k_iterkeys[] = "iterkeys";
4739 static const char __pyx_k_pyx_type[] = "__pyx_type";
4740 static const char __pyx_k_reversed[] = "reversed";
4741 static const char __pyx_k_setstate[] = "__setstate__";
4742 static const char __pyx_k_BaseIndex[] = "BaseIndex";
4743 static const char __pyx_k_TypeError[] = "TypeError";
4744 static const char __pyx_k_cfilename[] = "cfilename";
4745 static const char __pyx_k_enumerate[] = "enumerate";
4746 static const char __pyx_k_isenabled[] = "isenabled";
4747 static const char __pyx_k_iteritems[] = "iteritems";
4748 static const char __pyx_k_pyx_state[] = "__pyx_state";
4749 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
4750 static const char __pyx_k_reference[] = "reference";
4751 static const char __pyx_k_translate[] = "translate";
4752 static const char __pyx_k_IndexError[] = "IndexError";
4753 static const char __pyx_k_STRUCTURED[] = "STRUCTURED";
4754 static const char __pyx_k_TabixIndex[] = "TabixIndex";
4755 static const char __pyx_k_ValueError[] = "ValueError";
4756 static const char __pyx_k_add_record[] = "add_record";
4757 static const char __pyx_k_add_sample[] = "add_sample";
4758 static const char __pyx_k_dst_header[] = "dst_header";
4759 static const char __pyx_k_itervalues[] = "itervalues";
4760 static const char __pyx_k_new_record[] = "new_record";
4761 static const char __pyx_k_pyx_result[] = "__pyx_result";
4762 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
4763 static const char __pyx_k_startswith[] = "startswith";
4764 static const char __pyx_k_BCFIterator[] = "BCFIterator";
4765 static const char __pyx_k_Description[] = "Description";
4766 static const char __pyx_k_Invalid_tid[] = "Invalid tid";
4767 static const char __pyx_k_MemoryError[] = "MemoryError";
4768 static const char __pyx_k_PickleError[] = "PickleError";
4769 static const char __pyx_k_VariantFile[] = "VariantFile";
4770 static const char __pyx_k_add_samples[] = "add_samples";
4771 static const char __pyx_k_description[] = "description";
4772 static const char __pyx_k_invalid_key[] = "invalid key: {}";
4773 static const char __pyx_k_invalid_tag[] = "invalid tag";
4774 static const char __pyx_k_pysam_utils[] = "pysam.utils";
4775 static const char __pyx_k_BaseIterator[] = "BaseIterator";
4776 static const char __pyx_k_clear_header[] = "clear_header";
4777 static const char __pyx_k_drop_samples[] = "drop_samples";
4778 static const char __pyx_k_format_modes[] = "format_modes";
4779 static const char __pyx_k_initializing[] = "_initializing";
4780 static const char __pyx_k_is_coroutine[] = "_is_coroutine";
4781 static const char __pyx_k_is_valid_tid[] = "is_valid_tid";
4782 static const char __pyx_k_parse_region[] = "parse_region";
4783 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
4784 static const char __pyx_k_stringsource[] = "<stringsource>";
4785 static const char __pyx_k_unknown_INFO[] = "unknown INFO: {}";
4786 static const char __pyx_k_unknown_mode[] = "unknown mode {}";
4787 static const char __pyx_k_unquoted_str[] = "unquoted_str";
4788 static const char __pyx_k_use_setstate[] = "use_setstate";
4789 static const char __pyx_k_BaseIndex_get[] = "BaseIndex.get";
4790 static const char __pyx_k_BaseIndex_pop[] = "BaseIndex.pop";
4791 static const char __pyx_k_StopIteration[] = "StopIteration";
4792 static const char __pyx_k_TabixIterator[] = "TabixIterator";
4793 static const char __pyx_k_VariantContig[] = "VariantContig";
4794 static const char __pyx_k_VariantHeader[] = "VariantHeader";
4795 static const char __pyx_k_VariantRecord[] = "VariantRecord";
4796 static const char __pyx_k_class_getitem[] = "__class_getitem__";
4797 static const char __pyx_k_invalid_modes[] = "invalid_modes";
4798 static const char __pyx_k_pysam_libcbcf[] = "pysam.libcbcf";
4799 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
4800 static const char __pyx_k_remove_header[] = "remove_header";
4801 static const char __pyx_k_AssertionError[] = "AssertionError";
4802 static const char __pyx_k_BCFIndex_fetch[] = "BCFIndex.fetch";
4803 static const char __pyx_k_BaseIndex_keys[] = "BaseIndex.keys";
4804 static const char __pyx_k_Invalid_filter[] = "Invalid filter: {}";
4805 static const char __pyx_k_Invalid_header[] = "Invalid header";
4806 static const char __pyx_k_NotImplemented[] = "NotImplemented";
4807 static const char __pyx_k_Unknown_allele[] = "Unknown allele";
4808 static const char __pyx_k_index_filename[] = "index_filename";
4809 static const char __pyx_k_invalid_FORMAT[] = "invalid FORMAT: {}";
4810 static const char __pyx_k_invalid_contig[] = "invalid contig: {}";
4811 static const char __pyx_k_subset_samples[] = "subset_samples";
4812 static const char __pyx_k_truncated_file[] = "truncated file";
4813 static const char __pyx_k_unknown_format[] = "unknown format: {}";
4814 static const char __pyx_k_BaseIndex_items[] = "BaseIndex.items";
4815 static const char __pyx_k_VariantMetadata[] = "VariantMetadata";
4816 static const char __pyx_k_cindex_filename[] = "cindex_filename";
4817 static const char __pyx_k_include_samples[] = "include_samples";
4818 static const char __pyx_k_limits_violated[] = "limits violated";
4819 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
4820 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
4821 static const char __pyx_k_unable_to_fetch[] = "unable to fetch {}:{}-{}";
4822 static const char __pyx_k_BaseIndex_update[] = "BaseIndex.update";
4823 static const char __pyx_k_BaseIndex_values[] = "BaseIndex.values";
4824 static const char __pyx_k_TabixIndex_fetch[] = "TabixIndex.fetch";
4825 static const char __pyx_k_VariantFile_copy[] = "VariantFile.copy";
4826 static const char __pyx_k_VariantFile_open[] = "VariantFile.open";
4827 static const char __pyx_k_check_truncation[] = "check_truncation";
4828 static const char __pyx_k_invalid_contig_2[] = "invalid contig";
4829 static const char __pyx_k_unsupported_type[] = "unsupported type";
4830 static const char __pyx_k_Error_updating_id[] = "Error updating id";
4831 static const char __pyx_k_Invalid_header_id[] = "Invalid header id";
4832 static const char __pyx_k_VariantFile_close[] = "VariantFile.close";
4833 static const char __pyx_k_VariantFile_fetch[] = "VariantFile.fetch";
4834 static const char __pyx_k_VariantFile_reset[] = "VariantFile.reset";
4835 static const char __pyx_k_VariantFile_write[] = "VariantFile.write";
4836 static const char __pyx_k_VariantRecordInfo[] = "VariantRecordInfo";
4837 static const char __pyx_k_bcguz0123456789ex[] = "bcguz0123456789ex";
4838 static const char __pyx_k_ignore_truncation[] = "ignore_truncation";
4839 static const char __pyx_k_invalid_contig_id[] = "invalid contig id";
4840 static const char __pyx_k_pysam_libcbcf_pyx[] = "pysam/libcbcf.pyx";
4841 static const char __pyx_k_unsupported_types[] = "unsupported types";
4842 static const char __pyx_k_vcf_format_failed[] = "vcf_format failed";
4843 static const char __pyx_k_BaseIndex_iterkeys[] = "BaseIndex.iterkeys";
4844 static const char __pyx_k_Invalid_INFO_field[] = "Invalid INFO field: {}";
4845 static const char __pyx_k_Unknown_INFO_field[] = "Unknown INFO field: {}";
4846 static const char __pyx_k_VariantHeader_copy[] = "VariantHeader.copy";
4847 static const char __pyx_k_VariantRecord_copy[] = "VariantRecord.copy";
4848 static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
4849 static const char __pyx_k_bcf_index_required[] = "bcf index required";
4850 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
4851 static const char __pyx_k_error_in_vcf_parse[] = "error in vcf_parse";
4852 static const char __pyx_k_get_reference_name[] = "get_reference_name";
4853 static const char __pyx_k_BaseIndex_iteritems[] = "BaseIndex.iteritems";
4854 static const char __pyx_k_Error_extracting_ID[] = "Error extracting ID";
4855 static const char __pyx_k_VariantFile_get_tid[] = "VariantFile.get_tid";
4856 static const char __pyx_k_VariantHeaderRecord[] = "VariantHeaderRecord";
4857 static const char __pyx_k_VariantHeader_merge[] = "VariantHeader.merge";
4858 static const char __pyx_k_VariantRecordFilter[] = "VariantRecordFilter";
4859 static const char __pyx_k_VariantRecordFormat[] = "VariantRecordFormat";
4860 static const char __pyx_k_VariantRecordSample[] = "VariantRecordSample";
4861 static const char __pyx_k_invalid_header_line[] = "invalid header line";
4862 static const char __pyx_k_invalid_metadata_id[] = "invalid metadata id";
4863 static const char __pyx_k_invalid_sample_name[] = "invalid sample name: {}";
4864 static const char __pyx_k_BaseIndex_itervalues[] = "BaseIndex.itervalues";
4865 static const char __pyx_k_Invalid_allele_index[] = "Invalid allele index";
4866 static const char __pyx_k_Invalid_index_object[] = "Invalid index object";
4867 static const char __pyx_k_Unable_to_delete_END[] = "Unable to delete END";
4868 static const char __pyx_k_VariantHeaderContigs[] = "VariantHeaderContigs";
4869 static const char __pyx_k_VariantHeaderRecords[] = "VariantHeaderRecords";
4870 static const char __pyx_k_VariantHeaderSamples[] = "VariantHeaderSamples";
4871 static const char __pyx_k_VariantRecordSamples[] = "VariantRecordSamples";
4872 static const char __pyx_k_bcf_must_not_be_None[] = "bcf must not be None";
4873 static const char __pyx_k_duplicate_filehandle[] = "duplicate_filehandle";
4874 static const char __pyx_k_invalid_contig_index[] = "invalid contig index";
4875 static const char __pyx_k_invalid_filter_index[] = "invalid filter index";
4876 static const char __pyx_k_invalid_mode_options[] = "invalid mode options: {}";
4877 static const char __pyx_k_invalid_reference_id[] = "invalid reference id";
4878 static const char __pyx_k_invalid_sample_index[] = "invalid sample index";
4879 static const char __pyx_k_tabix_index_required[] = "tabix index required";
4880 static const char __pyx_k_Unable_to_delete_INFO[] = "Unable to delete INFO";
4881 static const char __pyx_k_Unknown_format_length[] = "Unknown format length";
4882 static const char __pyx_k_Unsupported_INFO_type[] = "Unsupported INFO type";
4883 static const char __pyx_k_VariantHeaderMetadata[] = "VariantHeaderMetadata";
4884 static const char __pyx_k_VariantRecordInfo_get[] = "VariantRecordInfo.get";
4885 static const char __pyx_k_VariantRecordInfo_pop[] = "VariantRecordInfo.pop";
4886 static const char __pyx_k_bcf_hdr_format_failed[] = "bcf_hdr_format failed";
4887 static const char __pyx_k_invalid_VariantHeader[] = "invalid VariantHeader";
4888 static const char __pyx_k_invalid_VariantRecord[] = "invalid VariantRecord";
4889 static const char __pyx_k_invalid_metadata_type[] = "invalid metadata type";
4890 static const char __pyx_k_Cannot_re_open_htsfile[] = "Cannot re-open htsfile";
4891 static const char __pyx_k_Duplicated_sample_name[] = "Duplicated sample name: {}";
4892 static const char __pyx_k_Error_s_reading_record[] = "Error(s) reading record: {}";
4893 static const char __pyx_k_Error_updating_alleles[] = "Error updating alleles";
4894 static const char __pyx_k_VariantFile_new_record[] = "VariantFile.new_record";
4895 static const char __pyx_k_VariantHeader_add_line[] = "VariantHeader.add_line";
4896 static const char __pyx_k_VariantHeader_add_meta[] = "VariantHeader.add_meta";
4897 static const char __pyx_k_VariantRecordInfo_keys[] = "VariantRecordInfo.keys";
4898 static const char __pyx_k_cannot_set_null_allele[] = "cannot set null allele";
4899 static const char __pyx_k_pyx_unpickle_BaseIndex[] = "__pyx_unpickle_BaseIndex";
4900 static const char __pyx_k_unknown_type_specified[] = "unknown type specified: {}";
4901 static const char __pyx_k_Unable_to_delete_FORMAT[] = "Unable to delete FORMAT";
4902 static const char __pyx_k_Unsupported_FORMAT_type[] = "Unsupported FORMAT type";
4903 static const char __pyx_k_VariantHeaderRecord_get[] = "VariantHeaderRecord.get";
4904 static const char __pyx_k_VariantHeaderRecord_pop[] = "VariantHeaderRecord.pop";
4905 static const char __pyx_k_VariantRecordFilter_add[] = "VariantRecordFilter.add";
4906 static const char __pyx_k_VariantRecordFilter_get[] = "VariantRecordFilter.get";
4907 static const char __pyx_k_VariantRecordFormat_get[] = "VariantRecordFormat.get";
4908 static const char __pyx_k_VariantRecordInfo_clear[] = "VariantRecordInfo.clear";
4909 static const char __pyx_k_VariantRecordInfo_items[] = "VariantRecordInfo.items";
4910 static const char __pyx_k_VariantRecordSample_get[] = "VariantRecordSample.get";
4911 static const char __pyx_k_VariantRecordSample_pop[] = "VariantRecordSample.pop";
4912 static const char __pyx_k_VariantRecord_translate[] = "VariantRecord.translate";
4913 static const char __pyx_k_fetch_requires_an_index[] = "fetch requires an index";
4914 static const char __pyx_k_header_must_not_be_None[] = "header must not be None";
4915 static const char __pyx_k_invalid_character_found[] = "invalid character found";
4916 static const char __pyx_k_record_must_not_be_None[] = "record must not be None";
4917 static const char __pyx_k_sample_must_not_be_None[] = "sample must not be None";
4918 static const char __pyx_k_BCFIndex___reduce_cython[] = "BCFIndex.__reduce_cython__";
4919 static const char __pyx_k_VariantFile_is_valid_tid[] = "VariantFile.is_valid_tid";
4920 static const char __pyx_k_VariantHeaderContigs_add[] = "VariantHeaderContigs.add";
4921 static const char __pyx_k_VariantHeaderContigs_get[] = "VariantHeaderContigs.get";
4922 static const char __pyx_k_VariantHeaderRecord_keys[] = "VariantHeaderRecord.keys";
4923 static const char __pyx_k_VariantHeaderSamples_add[] = "VariantHeaderSamples.add";
4924 static const char __pyx_k_VariantHeader_add_record[] = "VariantHeader.add_record";
4925 static const char __pyx_k_VariantHeader_add_sample[] = "VariantHeader.add_sample";
4926 static const char __pyx_k_VariantHeader_new_record[] = "VariantHeader.new_record";
4927 static const char __pyx_k_VariantRecordFilter_keys[] = "VariantRecordFilter.keys";
4928 static const char __pyx_k_VariantRecordFormat_keys[] = "VariantRecordFormat.keys";
4929 static const char __pyx_k_VariantRecordInfo___iter[] = "VariantRecordInfo.__iter__";
4930 static const char __pyx_k_VariantRecordInfo_update[] = "VariantRecordInfo.update";
4931 static const char __pyx_k_VariantRecordInfo_values[] = "VariantRecordInfo.values";
4932 static const char __pyx_k_VariantRecordSample_keys[] = "VariantRecordSample.keys";
4933 static const char __pyx_k_VariantRecordSamples_get[] = "VariantRecordSamples.get";
4934 static const char __pyx_k_VariantRecordSamples_pop[] = "VariantRecordSamples.pop";
4935 static const char __pyx_k_cannot_find_metadata_key[] = "cannot find metadata key";
4936 static const char __pyx_k_contig_must_be_specified[] = "contig must be specified";
4937 static const char __pyx_k_could_not_open_file_mode[] = "could not open file `{}` (mode='{}')";
4938 static const char __pyx_k_BaseIndex___reduce_cython[] = "BaseIndex.__reduce_cython__";
4939 static const char __pyx_k_Cannot_create_empty_array[] = "Cannot create empty array";
4940 static const char __pyx_k_Invalid_chromosome_contig[] = "Invalid chromosome/contig";
4941 static const char __pyx_k_Position_must_be_positive[] = "Position must be positive";
4942 static const char __pyx_k_VariantHeaderContigs_keys[] = "VariantHeaderContigs.keys";
4943 static const char __pyx_k_VariantHeaderMetadata_add[] = "VariantHeaderMetadata.add";
4944 static const char __pyx_k_VariantHeaderMetadata_get[] = "VariantHeaderMetadata.get";
4945 static const char __pyx_k_VariantHeaderRecord_items[] = "VariantHeaderRecord.items";
4946 static const char __pyx_k_VariantHeader_add_samples[] = "VariantHeader.add_samples";
4947 static const char __pyx_k_VariantRecordFilter_clear[] = "VariantRecordFilter.clear";
4948 static const char __pyx_k_VariantRecordFilter_items[] = "VariantRecordFilter.items";
4949 static const char __pyx_k_VariantRecordFormat_clear[] = "VariantRecordFormat.clear";
4950 static const char __pyx_k_VariantRecordFormat_items[] = "VariantRecordFormat.items";
4951 static const char __pyx_k_VariantRecordSample_clear[] = "VariantRecordSample.clear";
4952 static const char __pyx_k_VariantRecordSample_items[] = "VariantRecordSample.items";
4953 static const char __pyx_k_VariantRecordSamples_keys[] = "VariantRecordSamples.keys";
4954 static const char __pyx_k_invalid_number_of_columns[] = "invalid number of columns";
4955 static const char __pyx_k_BCFIndex___setstate_cython[] = "BCFIndex.__setstate_cython__";
4956 static const char __pyx_k_TabixIndex___reduce_cython[] = "TabixIndex.__reduce_cython__";
4957 static const char __pyx_k_VariantFile_subset_samples[] = "VariantFile.subset_samples";
4958 static const char __pyx_k_VariantHeaderContigs_items[] = "VariantHeaderContigs.items";
4959 static const char __pyx_k_VariantHeaderMetadata_keys[] = "VariantHeaderMetadata.keys";
4960 static const char __pyx_k_VariantHeaderRecord___iter[] = "VariantHeaderRecord.__iter__";
4961 static const char __pyx_k_VariantHeaderRecord_remove[] = "VariantHeaderRecord.remove";
4962 static const char __pyx_k_VariantHeaderRecord_update[] = "VariantHeaderRecord.update";
4963 static const char __pyx_k_VariantHeaderRecord_values[] = "VariantHeaderRecord.values";
4964 static const char __pyx_k_VariantRecordFilter___iter[] = "VariantRecordFilter.__iter__";
4965 static const char __pyx_k_VariantRecordFilter_values[] = "VariantRecordFilter.values";
4966 static const char __pyx_k_VariantRecordFormat___iter[] = "VariantRecordFormat.__iter__";
4967 static const char __pyx_k_VariantRecordFormat_values[] = "VariantRecordFormat.values";
4968 static const char __pyx_k_VariantRecordInfo_iterkeys[] = "VariantRecordInfo.iterkeys";
4969 static const char __pyx_k_VariantRecordSample___iter[] = "VariantRecordSample.__iter__";
4970 static const char __pyx_k_VariantRecordSample_update[] = "VariantRecordSample.update";
4971 static const char __pyx_k_VariantRecordSample_values[] = "VariantRecordSample.values";
4972 static const char __pyx_k_VariantRecordSamples_items[] = "VariantRecordSamples.items";
4973 static const char __pyx_k_cannot_set_null_alt_allele[] = "cannot set null alt allele";
4974 static const char __pyx_k_error_in_bcf_subset_format[] = "error in bcf_subset_format";
4975 static const char __pyx_k_pyx_unpickle_VariantContig[] = "__pyx_unpickle_VariantContig";
4976 static const char __pyx_k_unsupported_info_type_code[] = "unsupported info type code";
4977 static const char __pyx_k_BCFIterator___reduce_cython[] = "BCFIterator.__reduce_cython__";
4978 static const char __pyx_k_BaseIndex___setstate_cython[] = "BaseIndex.__setstate_cython__";
4979 static const char __pyx_k_Invalid_header_record_index[] = "Invalid header record index";
4980 static const char __pyx_k_VariantContig_remove_header[] = "VariantContig.remove_header";
4981 static const char __pyx_k_VariantFile___reduce_cython[] = "VariantFile.__reduce_cython__";
4982 static const char __pyx_k_VariantHeaderContigs___iter[] = "VariantHeaderContigs.__iter__";
4983 static const char __pyx_k_VariantHeaderContigs_values[] = "VariantHeaderContigs.values";
4984 static const char __pyx_k_VariantHeaderMetadata_items[] = "VariantHeaderMetadata.items";
4985 static const char __pyx_k_VariantHeaderRecords___iter[] = "VariantHeaderRecords.__iter__";
4986 static const char __pyx_k_VariantHeaderSamples___iter[] = "VariantHeaderSamples.__iter__";
4987 static const char __pyx_k_VariantRecordInfo_iteritems[] = "VariantRecordInfo.iteritems";
4988 static const char __pyx_k_VariantRecordSamples___iter[] = "VariantRecordSamples.__iter__";
4989 static const char __pyx_k_VariantRecordSamples_update[] = "VariantRecordSamples.update";
4990 static const char __pyx_k_VariantRecordSamples_values[] = "VariantRecordSamples.values";
4991 static const char __pyx_k_cannot_create_VariantHeader[] = "cannot create VariantHeader";
4992 static const char __pyx_k_cannot_create_VariantRecord[] = "cannot create VariantRecord";
4993 static const char __pyx_k_could_not_open_variant_file[] = "could not open variant file `{}`: {}";
4994 static const char __pyx_k_dst_header_must_not_be_None[] = "dst_header must not be None";
4995 static const char __pyx_k_invalid_header_record_index[] = "invalid header record index";
4996 static const char __pyx_k_missing_d_requested_samples[] = "missing {:d} requested samples";
4997 static const char __pyx_k_must_set_at_least_2_alleles[] = "must set at least 2 alleles";
4998 static const char __pyx_k_ref_allele_must_not_be_null[] = "ref allele must not be null";
4999 static const char __pyx_k_unable_to_fetch_next_record[] = "unable to fetch next record";
5000 static const char __pyx_k_unable_to_parse_next_record[] = "unable to parse next record";
5001 static const char __pyx_k_BaseIterator___reduce_cython[] = "BaseIterator.__reduce_cython__";
5002 static const char __pyx_k_Header_already_exists_for_id[] = "Header already exists for id={}";
5003 static const char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on closed file";
5004 static const char __pyx_k_TabixIndex___setstate_cython[] = "TabixIndex.__setstate_cython__";
5005 static const char __pyx_k_Unable_to_update_INFO_values[] = "Unable to update INFO values";
5006 static const char __pyx_k_VariantHeaderMetadata___iter[] = "VariantHeaderMetadata.__iter__";
5007 static const char __pyx_k_VariantHeaderMetadata_values[] = "VariantHeaderMetadata.values";
5008 static const char __pyx_k_VariantHeaderRecord_iterkeys[] = "VariantHeaderRecord.iterkeys";
5009 static const char __pyx_k_VariantRecordFilter_iterkeys[] = "VariantRecordFilter.iterkeys";
5010 static const char __pyx_k_VariantRecordFormat_iterkeys[] = "VariantRecordFormat.iterkeys";
5011 static const char __pyx_k_VariantRecordInfo_itervalues[] = "VariantRecordInfo.itervalues";
5012 static const char __pyx_k_VariantRecordSample_iterkeys[] = "VariantRecordSample.iterkeys";
5013 static const char __pyx_k_pyx_unpickle_VariantMetadata[] = "__pyx_unpickle_VariantMetadata";
5014 static const char __pyx_k_unsupported_header_type_code[] = "unsupported header type code";
5015 static const char __pyx_k_BCFIterator___setstate_cython[] = "BCFIterator.__setstate_cython__";
5016 static const char __pyx_k_Error_unpacking_VariantRecord[] = "Error unpacking VariantRecord";
5017 static const char __pyx_k_Stop_position_of_the_interval[] = "Stop position of the interval";
5018 static const char __pyx_k_TabixIterator___reduce_cython[] = "TabixIterator.__reduce_cython__";
5019 static const char __pyx_k_VariantContig___reduce_cython[] = "VariantContig.__reduce_cython__";
5020 static const char __pyx_k_VariantFile___setstate_cython[] = "VariantFile.__setstate_cython__";
5021 static const char __pyx_k_VariantHeaderContigs_iterkeys[] = "VariantHeaderContigs.iterkeys";
5022 static const char __pyx_k_VariantHeaderRecord_iteritems[] = "VariantHeaderRecord.iteritems";
5023 static const char __pyx_k_VariantHeader___reduce_cython[] = "VariantHeader.__reduce_cython__";
5024 static const char __pyx_k_VariantMetadata_remove_header[] = "VariantMetadata.remove_header";
5025 static const char __pyx_k_VariantRecordFilter_iteritems[] = "VariantRecordFilter.iteritems";
5026 static const char __pyx_k_VariantRecordFormat_iteritems[] = "VariantRecordFormat.iteritems";
5027 static const char __pyx_k_VariantRecordSample_iteritems[] = "VariantRecordSample.iteritems";
5028 static const char __pyx_k_VariantRecordSamples_iterkeys[] = "VariantRecordSamples.iterkeys";
5029 static const char __pyx_k_VariantRecord___reduce_cython[] = "VariantRecord.__reduce_cython__";
5030 static const char __pyx_k_could_not_open_variant_file_2[] = "could not open variant file `{}`";
5031 static const char __pyx_k_mode_must_begin_with_r_w_or_a[] = "mode must begin with r, w or a";
5032 static const char __pyx_k_unable_to_allocate_BCF_record[] = "unable to allocate BCF record";
5033 static const char __pyx_k_BaseIterator___setstate_cython[] = "BaseIterator.__setstate_cython__";
5034 static const char __pyx_k_Unable_to_update_format_values[] = "Unable to update format values";
5035 static const char __pyx_k_VariantFile_get_reference_name[] = "VariantFile.get_reference_name";
5036 static const char __pyx_k_VariantHeaderContigs_iteritems[] = "VariantHeaderContigs.iteritems";
5037 static const char __pyx_k_VariantHeaderMetadata_iterkeys[] = "VariantHeaderMetadata.iterkeys";
5038 static const char __pyx_k_VariantHeaderRecord_itervalues[] = "VariantHeaderRecord.itervalues";
5039 static const char __pyx_k_VariantRecordFilter_itervalues[] = "VariantRecordFilter.itervalues";
5040 static const char __pyx_k_VariantRecordFormat_itervalues[] = "VariantRecordFormat.itervalues";
5041 static const char __pyx_k_VariantRecordSample_itervalues[] = "VariantRecordSample.itervalues";
5042 static const char __pyx_k_VariantRecordSamples_iteritems[] = "VariantRecordSamples.iteritems";
5043 static const char __pyx_k_bcf_hdr_set_samples_failed_ret[] = "bcf_hdr_set_samples failed: ret = {}";
5044 static const char __pyx_k_invalid_value_for_Float_format[] = "invalid value for Float format";
5045 static const char __pyx_k_pyx_unpickle_VariantHeaderCont[] = "__pyx_unpickle_VariantHeaderContigs";
5046 static const char __pyx_k_pyx_unpickle_VariantHeaderMeta[] = "__pyx_unpickle_VariantHeaderMetadata";
5047 static const char __pyx_k_pyx_unpickle_VariantHeaderReco[] = "__pyx_unpickle_VariantHeaderRecords";
5048 static const char __pyx_k_pyx_unpickle_VariantHeaderSamp[] = "__pyx_unpickle_VariantHeaderSamples";
5049 static const char __pyx_k_pyx_unpickle_VariantRecordFilt[] = "__pyx_unpickle_VariantRecordFilter";
5050 static const char __pyx_k_pyx_unpickle_VariantRecordForm[] = "__pyx_unpickle_VariantRecordFormat";
5051 static const char __pyx_k_pyx_unpickle_VariantRecordInfo[] = "__pyx_unpickle_VariantRecordInfo";
5052 static const char __pyx_k_pyx_unpickle_VariantRecordSamp[] = "__pyx_unpickle_VariantRecordSamples";
5053 static const char __pyx_k_Invalid_VariantRecord_Number_of[] = "Invalid VariantRecord. Number of samples does not match header ({} vs {})";
5054 static const char __pyx_k_Number_must_be_None_when_adding[] = "Number must be None when adding a filter";
5055 static const char __pyx_k_TabixIterator___setstate_cython[] = "TabixIterator.__setstate_cython__";
5056 static const char __pyx_k_Type_must_be_None_when_adding_a[] = "Type must be None when adding a filter";
5057 static const char __pyx_k_VariantContig___setstate_cython[] = "VariantContig.__setstate_cython__";
5058 static const char __pyx_k_VariantHeaderContigs___setstate[] = "VariantHeaderContigs.__setstate_cython__";
5059 static const char __pyx_k_VariantHeaderContigs_itervalues[] = "VariantHeaderContigs.itervalues";
5060 static const char __pyx_k_VariantHeaderMetadata_iteritems[] = "VariantHeaderMetadata.iteritems";
5061 static const char __pyx_k_VariantHeaderRecords___setstate[] = "VariantHeaderRecords.__setstate_cython__";
5062 static const char __pyx_k_VariantHeaderSamples___setstate[] = "VariantHeaderSamples.__setstate_cython__";
5063 static const char __pyx_k_VariantHeader___setstate_cython[] = "VariantHeader.__setstate_cython__";
5064 static const char __pyx_k_VariantMetadata___reduce_cython[] = "VariantMetadata.__reduce_cython__";
5065 static const char __pyx_k_VariantRecordSamples___setstate[] = "VariantRecordSamples.__setstate_cython__";
5066 static const char __pyx_k_VariantRecordSamples_itervalues[] = "VariantRecordSamples.itervalues";
5067 static const char __pyx_k_VariantRecord___setstate_cython[] = "VariantRecord.__setstate_cython__";
5068 static const char __pyx_k_bcf_check_values_locals_genexpr[] = "bcf_check_values.<locals>.genexpr";
5069 static const char __pyx_k_cannot_iterate_over_Variantfile[] = "cannot iterate over Variantfile opened for writing";
5070 static const char __pyx_k_file_does_not_have_valid_header[] = "file `{}` does not have valid header (mode=`{}`) - is it VCF/BCF format?";
5071 static const char __pyx_k_invalid_file_mode_is_it_VCF_BCF[] = "invalid file `{}` (mode=`{}`) - is it VCF/BCF format?";
5072 static const char __pyx_k_self_ptr_cannot_be_converted_to[] = "self.ptr cannot be converted to a Python object for pickling";
5073 static const char __pyx_k_Cannot_add_extra_threads_when_ig[] = "Cannot add extra threads when \"ignore_truncation\" is True";
5074 static const char __pyx_k_Cannot_copy_arrays_with_src_valu[] = "Cannot copy arrays with src_values={} > dst_values={}";
5075 static const char __pyx_k_Cannot_set_phased_before_genotyp[] = "Cannot set phased before genotype is set";
5076 static const char __pyx_k_Cannot_specify_an_index_filename[] = "Cannot specify an index filename when writing a VCF/BCF file";
5077 static const char __pyx_k_Cannot_translate_record_Number_o[] = "Cannot translate record. Number of samples does not match header ({} vs {})";
5078 static const char __pyx_k_END_is_a_reserved_attribute_acce[] = "END is a reserved attribute; access is via record.stop";
5079 static const char __pyx_k_Flag_types_are_not_allowed_on_FO[] = "Flag types are not allowed on FORMATs";
5080 static const char __pyx_k_Flag_values_must_be_True_False_N[] = "Flag values must be: True, False, None, 1, 0";
5081 static const char __pyx_k_Header_already_exists_for_contig[] = "Header already exists for contig {}";
5082 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))";
5083 static const char __pyx_k_Integer_value_too_small_large_to[] = "Integer value too small/large to store in VCF/BCF";
5084 static const char __pyx_k_One_or_more_of_the_supplied_samp[] = "One or more of the supplied sample alleles are not defined as alleles of the corresponding pysam.libcbcf.VariantRecord.First set the .alleles of this record to define the alleles";
5085 static const char __pyx_k_Start_coordinate_must_be_non_neg[] = "Start coordinate must be non-negative";
5086 static const char __pyx_k_Stop_coordinate_must_be_non_nega[] = "Stop coordinate must be non-negative";
5087 static const char __pyx_k_Use_allele_indices_to_set_intege[] = "Use .allele_indices to set integer allele indices";
5088 static const char __pyx_k_VariantHeaderContigs___reduce_cy[] = "VariantHeaderContigs.__reduce_cython__";
5089 static const char __pyx_k_VariantHeaderContigs_clear_heade[] = "VariantHeaderContigs.clear_header";
5090 static const char __pyx_k_VariantHeaderContigs_remove_head[] = "VariantHeaderContigs.remove_header";
5091 static const char __pyx_k_VariantHeaderMetadata___reduce_c[] = "VariantHeaderMetadata.__reduce_cython__";
5092 static const char __pyx_k_VariantHeaderMetadata___setstate[] = "VariantHeaderMetadata.__setstate_cython__";
5093 static const char __pyx_k_VariantHeaderMetadata_clear_head[] = "VariantHeaderMetadata.clear_header";
5094 static const char __pyx_k_VariantHeaderMetadata_itervalues[] = "VariantHeaderMetadata.itervalues";
5095 static const char __pyx_k_VariantHeaderMetadata_remove_hea[] = "VariantHeaderMetadata.remove_header";
5096 static const char __pyx_k_VariantHeaderRecord___get___loca[] = "VariantHeaderRecord.__get__.<locals>.genexpr";
5097 static const char __pyx_k_VariantHeaderRecord___reduce_cyt[] = "VariantHeaderRecord.__reduce_cython__";
5098 static const char __pyx_k_VariantHeaderRecord___setstate_c[] = "VariantHeaderRecord.__setstate_cython__";
5099 static const char __pyx_k_VariantHeaderRecords___reduce_cy[] = "VariantHeaderRecords.__reduce_cython__";
5100 static const char __pyx_k_VariantHeaderSamples___reduce_cy[] = "VariantHeaderSamples.__reduce_cython__";
5101 static const char __pyx_k_VariantMetadata___setstate_cytho[] = "VariantMetadata.__setstate_cython__";
5102 static const char __pyx_k_VariantRecordFilter___reduce_cyt[] = "VariantRecordFilter.__reduce_cython__";
5103 static const char __pyx_k_VariantRecordFilter___setstate_c[] = "VariantRecordFilter.__setstate_cython__";
5104 static const char __pyx_k_VariantRecordFormat___reduce_cyt[] = "VariantRecordFormat.__reduce_cython__";
5105 static const char __pyx_k_VariantRecordFormat___setstate_c[] = "VariantRecordFormat.__setstate_cython__";
5106 static const char __pyx_k_VariantRecordInfo___reduce_cytho[] = "VariantRecordInfo.__reduce_cython__";
5107 static const char __pyx_k_VariantRecordInfo___setstate_cyt[] = "VariantRecordInfo.__setstate_cython__";
5108 static const char __pyx_k_VariantRecordSample___reduce_cyt[] = "VariantRecordSample.__reduce_cython__";
5109 static const char __pyx_k_VariantRecordSample___set___loca[] = "VariantRecordSample.__set__.<locals>.genexpr";
5110 static const char __pyx_k_VariantRecordSample___setstate_c[] = "VariantRecordSample.__setstate_cython__";
5111 static const char __pyx_k_VariantRecordSamples___reduce_cy[] = "VariantRecordSamples.__reduce_cython__";
5112 static const char __pyx_k_bcf_array_to_object_locals_genex[] = "bcf_array_to_object.<locals>.genexpr";
5113 static const char __pyx_k_bcf_object_to_array_locals_genex[] = "bcf_object_to_array.<locals>.genexpr";
5114 static const char __pyx_k_cannot_convert_deleted_record_to[] = "cannot convert deleted record to str";
5115 static const char __pyx_k_cannot_create_VariantRecordSampl[] = "cannot create VariantRecordSample";
5116 static const char __pyx_k_cannot_fetch_from_Variantfile_op[] = "cannot fetch from Variantfile opened for writing";
5117 static const char __pyx_k_cannot_subset_samples_after_fetc[] = "cannot subset samples after fetching records";
5118 static const char __pyx_k_cannot_subset_samples_from_Varia[] = "cannot subset samples from Variantfile opened for writing";
5119 static const char __pyx_k_cannot_write_to_a_Variantfile_op[] = "cannot write to a Variantfile opened for reading";
5120 static const char __pyx_k_char_array_to_tuple_locals_genex[] = "char_array_to_tuple.<locals>.genexpr";
5121 static const char __pyx_k_either_value_or_items_must_be_sp[] = "either value or items must be specified";
5122 static const char __pyx_k_genotype_is_only_valid_as_a_form[] = "genotype is only valid as a format field";
5123 static const char __pyx_k_invalid_value_for_Integer_format[] = "invalid value for Integer format";
5124 static const char __pyx_k_mode_contains_conflicting_format[] = "mode contains conflicting format specifiers: {}";
5125 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
5126 static const char __pyx_k_pyx_unpickle_VariantRecordSamp_2[] = "__pyx_unpickle_VariantRecordSample";
5127 static const char __pyx_k_self_iter_cannot_be_converted_to[] = "self.iter cannot be converted to a Python object for pickling";
5128 static const char __pyx_k_this_class_cannot_be_instantiate[] = "this class cannot be instantiated from Python";
5129 static const char __pyx_k_unable_to_reallocate_VariantHead[] = "unable to reallocate VariantHeader";
5130 static const char __pyx_k_value_expected_to_be_scalar_give[] = "value expected to be scalar, given len={}";
5131 static const char __pyx_k_values_expected_to_be_tuple_give[] = "values expected to be {}-tuple, given len={}";
5132 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0xcd1335f, 0xa03cdd6, 0x9d0a56c) = (header, id, type))";
5133 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_3[] = "Incompatible checksums (0x%x vs (0x816ca43, 0x0a33d30, 0xed5e66b) = (header, type))";
5134 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_4[] = "Incompatible checksums (0x%x vs (0x2572060, 0x8ae1160, 0xbe66ecb) = (header, id))";
5135 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_5[] = "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))";
5136 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_6[] = "Incompatible checksums (0x%x vs (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b) = (index, record))";
5137 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_7[] = "Incompatible checksums (0x%x vs (0x7898a51, 0x1fe4488, 0xd936de3) = (refmap, refs))";
5138 /* #### Code section: decls ### */
5139 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */
5140 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
5141 static PyObject *__pyx_pf_5pysam_7libcbcf_19char_array_to_tuple_genexpr(PyObject *__pyx_self, Py_ssize_t __pyx_genexpr_arg_0); /* proto */
5142 static PyObject *__pyx_pf_5pysam_7libcbcf_19bcf_array_to_object_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
5143 static PyObject *__pyx_pf_5pysam_7libcbcf_19bcf_object_to_array_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
5144 static PyObject *__pyx_pf_5pysam_7libcbcf_16bcf_check_values_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
5145 static int __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5146 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_4type___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5147 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_3key___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5148 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5value___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5149 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_7__get___genexpr(PyObject *__pyx_self, int __pyx_genexpr_arg_0); /* proto */
5150 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5attrs___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5151 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5152 static int __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5153 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5154 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5155 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_11get(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5156 static int __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_13__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5157 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_15iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5158 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_17itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5159 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_20iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5160 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_23keys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5161 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_25items(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5162 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_27values(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5163 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_29update(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs); /* proto */
5164 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_31pop(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5165 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_33__str__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5166 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_35remove(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5167 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5168 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_37__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self); /* proto */
5169 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_39__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5170 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5171 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self); /* proto */
5172 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self); /* proto */
5173 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
5174 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self); /* proto */
5175 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self); /* proto */
5176 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_11__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self); /* proto */
5177 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_13__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5178 static int __pyx_pf_5pysam_7libcbcf_15VariantMetadata___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5179 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_4name___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5180 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_2id___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5181 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_6number___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5182 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_4type___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5183 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_11description___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5184 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_6record___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5185 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_2remove_header(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5186 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5187 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_4__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self); /* proto */
5188 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_6__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5189 static int __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5190 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_2add(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_number, PyObject *__pyx_v_type, PyObject *__pyx_v_description, PyObject *__pyx_v_kwargs); /* proto */
5191 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_4__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5192 static int __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_6__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5193 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_8__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5194 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_10remove_header(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5195 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_12clear_header(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5196 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_14__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5197 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_17get(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5198 static int __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_19__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5199 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_21iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5200 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_23itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5201 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_26iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5202 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_29keys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5203 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_31items(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5204 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_33values(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5205 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5206 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_35__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self); /* proto */
5207 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_37__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5208 static int __pyx_pf_5pysam_7libcbcf_13VariantContig___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5209 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_4name___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self); /* proto */
5210 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_2id___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self); /* proto */
5211 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_6length___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self); /* proto */
5212 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_13header_record___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self); /* proto */
5213 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_2remove_header(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self); /* proto */
5214 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self); /* proto */
5215 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_4__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self); /* proto */
5216 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_6__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5217 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5218 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5219 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5220 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5221 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_8remove_header(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5222 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_10clear_header(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5223 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_12__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5224 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_15get(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5225 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_17__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5226 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_19iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5227 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_21itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5228 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_24iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5229 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_27keys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5230 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_29items(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5231 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_31values(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5232 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_33add(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_length, PyObject *__pyx_v_kwargs); /* proto */
5233 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5234 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_35__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self); /* proto */
5235 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_37__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5236 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5237 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self); /* proto */
5238 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self); /* proto */
5239 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
5240 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self); /* proto */
5241 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_11__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5242 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_13add(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
5243 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self); /* proto */
5244 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_15__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self); /* proto */
5245 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_17__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5246 static int __pyx_pf_5pysam_7libcbcf_13VariantHeader___cinit__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5247 static int __pyx_pf_5pysam_7libcbcf_13VariantHeader_2__init__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5248 static void __pyx_pf_5pysam_7libcbcf_13VariantHeader_4__dealloc__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5249 static int __pyx_pf_5pysam_7libcbcf_13VariantHeader_6__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5250 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_8copy(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5251 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_10merge(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header); /* proto */
5252 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7version___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5253 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7samples___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5254 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7records___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5255 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7contigs___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5256 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7filters___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5257 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_4info___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5258 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7formats___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5259 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_4alts___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5260 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_12__str__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5261 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_14new_record(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_alleles, PyObject *__pyx_v_id, PyObject *__pyx_v_qual, PyObject *__pyx_v_filter, PyObject *__pyx_v_info, PyObject *__pyx_v_samples, PyObject *__pyx_v_kwargs); /* proto */
5262 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_16add_record(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_record); /* proto */
5263 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_18add_line(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_line); /* proto */
5264 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_20add_meta(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_items); /* proto */
5265 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_22add_sample(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
5266 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_24add_samples(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
5267 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_26__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self); /* proto */
5268 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_28__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5269 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5270 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5271 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5272 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5273 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_8add(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5274 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_10__delitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5275 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_12clear(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5276 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_14__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5277 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_17get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5278 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_19__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5279 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_21iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5280 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_23itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5281 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_26iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5282 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_29keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5283 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_31items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5284 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_33values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5285 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_35__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_other, int __pyx_v_op); /* proto */
5286 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_37__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self); /* proto */
5287 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_39__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5288 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5289 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5290 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5291 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5292 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_8__delitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5293 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_10clear(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5294 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_12__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5295 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_15get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5296 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_17__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5297 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_19iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5298 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_21itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5299 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_24iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5300 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_27keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5301 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_29items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5302 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_31values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5303 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_33__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self); /* proto */
5304 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_35__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5305 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5306 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5307 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5308 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5309 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_8__setitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
5310 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_10__delitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5311 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_12clear(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5312 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_14__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5313 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_17get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5314 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_19__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5315 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_21iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5316 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_23itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5317 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_26iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5318 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_29keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5319 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_31items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5320 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_33values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5321 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_35update(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs); /* proto */
5322 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_37pop(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5323 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_39__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_other, int __pyx_v_op); /* proto */
5324 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_41__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self); /* proto */
5325 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_43__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5326 static int __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5327 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5328 static int __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5329 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5330 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5331 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_11get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5332 static int __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_13__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5333 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_15iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5334 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_17itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5335 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_20iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5336 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_23keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5337 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_25items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5338 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_27values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5339 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_29update(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs); /* proto */
5340 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_31pop(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5341 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_33__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_other, int __pyx_v_op); /* proto */
5342 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_35__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self); /* proto */
5343 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_37__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5344 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5345 static void __pyx_pf_5pysam_7libcbcf_13VariantRecord_2__dealloc__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5346 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4copy(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5347 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6translate(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_dst_header); /* proto */
5348 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_3rid___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5349 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_3rid_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5350 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_5chrom___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5351 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_5chrom_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5352 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6contig___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5353 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_6contig_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5354 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_3pos___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5355 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_3pos_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5356 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_5start___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5357 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_5start_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5358 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4stop___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5359 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_4stop_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5360 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4rlen___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5361 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_4rlen_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5362 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4qual___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5363 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_4qual_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5364 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_2id___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5365 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_2id_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5366 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_3ref___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5367 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_3ref_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5368 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_7alleles___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5369 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_7alleles_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
5370 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4alts___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5371 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_4alts_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5372 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6filter___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5373 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4info___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5374 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6format___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5375 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_7samples___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5376 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_21alleles_variant_types___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5377 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_8__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_other, int __pyx_v_op); /* proto */
5378 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_10__str__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5379 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5380 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self); /* proto */
5381 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5382 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5383 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_4name___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5384 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5385 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5386 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_4__del__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5387 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5388 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
5389 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___3genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
5390 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5391 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_4__del__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5392 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6phased___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5393 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6phased_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5394 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5395 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5396 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5397 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_8__setitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
5398 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_10__delitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5399 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_12clear(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5400 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5401 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_17get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5402 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_19__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5403 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_21iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5404 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_23itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5405 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_26iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5406 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_29keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5407 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_31items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5408 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_33values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5409 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_35update(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs); /* proto */
5410 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_37pop(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5411 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_39__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_other, int __pyx_v_op); /* proto */
5412 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_5index___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5413 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_41__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self); /* proto */
5414 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_43__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5415 static int __pyx_pf_5pysam_7libcbcf_9BaseIndex___init__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5416 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_9BaseIndex_2__len__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5417 static int __pyx_pf_5pysam_7libcbcf_9BaseIndex_4__bool__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5418 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5419 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_8__iter__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5420 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_10get(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5421 static int __pyx_pf_5pysam_7libcbcf_9BaseIndex_12__contains__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
5422 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_14iterkeys(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5423 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_16itervalues(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5424 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_19iteritems(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5425 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_22keys(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5426 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_24items(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5427 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_26values(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5428 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_28update(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs); /* proto */
5429 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_30pop(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
5430 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_32__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self); /* proto */
5431 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_34__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
5432 static int __pyx_pf_5pysam_7libcbcf_8BCFIndex___init__(struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self); /* proto */
5433 static void __pyx_pf_5pysam_7libcbcf_8BCFIndex_2__dealloc__(struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self); /* proto */
5434 static PyObject *__pyx_pf_5pysam_7libcbcf_8BCFIndex_4fetch(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self, PyObject *__pyx_v_bcf, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_reopen); /* proto */
5435 static PyObject *__pyx_pf_5pysam_7libcbcf_8BCFIndex_6header___get__(struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self); /* proto */
5436 static PyObject *__pyx_pf_5pysam_7libcbcf_8BCFIndex_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self); /* proto */
5437 static PyObject *__pyx_pf_5pysam_7libcbcf_8BCFIndex_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5438 static int __pyx_pf_5pysam_7libcbcf_10TabixIndex___init__(struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self); /* proto */
5439 static void __pyx_pf_5pysam_7libcbcf_10TabixIndex_2__dealloc__(struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self); /* proto */
5440 static PyObject *__pyx_pf_5pysam_7libcbcf_10TabixIndex_4fetch(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self, PyObject *__pyx_v_bcf, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_reopen); /* proto */
5441 static PyObject *__pyx_pf_5pysam_7libcbcf_10TabixIndex_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self); /* proto */
5442 static PyObject *__pyx_pf_5pysam_7libcbcf_10TabixIndex_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5443 static PyObject *__pyx_pf_5pysam_7libcbcf_12BaseIterator___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BaseIterator *__pyx_v_self); /* proto */
5444 static PyObject *__pyx_pf_5pysam_7libcbcf_12BaseIterator_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BaseIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5445 static int __pyx_pf_5pysam_7libcbcf_11BCFIterator___init__(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_bcf, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_reopen); /* proto */
5446 static void __pyx_pf_5pysam_7libcbcf_11BCFIterator_2__dealloc__(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self); /* proto */
5447 static PyObject *__pyx_pf_5pysam_7libcbcf_11BCFIterator_4__iter__(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self); /* proto */
5448 static PyObject *__pyx_pf_5pysam_7libcbcf_11BCFIterator_6__next__(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self); /* proto */
5449 static PyObject *__pyx_pf_5pysam_7libcbcf_11BCFIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self); /* proto */
5450 static PyObject *__pyx_pf_5pysam_7libcbcf_11BCFIterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5451 static int __pyx_pf_5pysam_7libcbcf_13TabixIterator___cinit__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5452 static int __pyx_pf_5pysam_7libcbcf_13TabixIterator_2__init__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_bcf, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_reopen); /* proto */
5453 static void __pyx_pf_5pysam_7libcbcf_13TabixIterator_4__dealloc__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self); /* proto */
5454 static PyObject *__pyx_pf_5pysam_7libcbcf_13TabixIterator_6__iter__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self); /* proto */
5455 static PyObject *__pyx_pf_5pysam_7libcbcf_13TabixIterator_8__next__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self); /* proto */
5456 static PyObject *__pyx_pf_5pysam_7libcbcf_13TabixIterator_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self); /* proto */
5457 static PyObject *__pyx_pf_5pysam_7libcbcf_13TabixIterator_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5458 static int __pyx_pf_5pysam_7libcbcf_11VariantFile___cinit__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
5459 static int __pyx_pf_5pysam_7libcbcf_11VariantFile_2__init__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
5460 static void __pyx_pf_5pysam_7libcbcf_11VariantFile_4__dealloc__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5461 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_6close(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5462 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5463 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_10__next__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5464 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_12copy(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5465 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_14open(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_index_filename, struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, PyObject *__pyx_v_drop_samples, PyObject *__pyx_v_duplicate_filehandle, PyObject *__pyx_v_ignore_truncation, PyObject *__pyx_v_threads); /* proto */
5466 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_16reset(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5467 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_18is_valid_tid(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_tid); /* proto */
5468 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_20get_tid(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
5469 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_22get_reference_name(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_tid); /* proto */
5470 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_24fetch(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_region, PyObject *__pyx_v_reopen, PyObject *__pyx_v_end, PyObject *__pyx_v_reference); /* proto */
5471 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_26new_record(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
5472 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_28write(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record); /* proto */
5473 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_30subset_samples(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_include_samples); /* proto */
5474 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5475 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_5index___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5476 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_12drop_samples___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5477 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_10is_reading___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5478 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_14header_written___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5479 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self); /* proto */
5480 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5481 static PyObject *__pyx_pf_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5482 static PyObject *__pyx_pf_5pysam_7libcbcf_2__pyx_unpickle_VariantMetadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5483 static PyObject *__pyx_pf_5pysam_7libcbcf_4__pyx_unpickle_VariantHeaderMetadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5484 static PyObject *__pyx_pf_5pysam_7libcbcf_6__pyx_unpickle_VariantContig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5485 static PyObject *__pyx_pf_5pysam_7libcbcf_8__pyx_unpickle_VariantHeaderContigs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5486 static PyObject *__pyx_pf_5pysam_7libcbcf_10__pyx_unpickle_VariantHeaderSamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5487 static PyObject *__pyx_pf_5pysam_7libcbcf_12__pyx_unpickle_VariantRecordFilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5488 static PyObject *__pyx_pf_5pysam_7libcbcf_14__pyx_unpickle_VariantRecordFormat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5489 static PyObject *__pyx_pf_5pysam_7libcbcf_16__pyx_unpickle_VariantRecordInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5490 static PyObject *__pyx_pf_5pysam_7libcbcf_18__pyx_unpickle_VariantRecordSamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5491 static PyObject *__pyx_pf_5pysam_7libcbcf_20__pyx_unpickle_VariantRecordSample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5492 static PyObject *__pyx_pf_5pysam_7libcbcf_22__pyx_unpickle_BaseIndex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
5493 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5494 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecord(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5495 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecords(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5496 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderContigs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5497 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderSamples(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5498 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantContig(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5499 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantMetadata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5500 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderMetadata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5501 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecord(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5502 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordFilter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5503 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordFormat(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5504 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5505 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordSamples(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5506 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordSample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5507 static PyObject *__pyx_tp_new_5pysam_7libcbcf_BaseIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5508 static PyObject *__pyx_tp_new_5pysam_7libcbcf_BCFIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5509 static PyObject *__pyx_tp_new_5pysam_7libcbcf_BaseIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5510 static PyObject *__pyx_tp_new_5pysam_7libcbcf_BCFIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5511 static PyObject *__pyx_tp_new_5pysam_7libcbcf_TabixIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5512 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5513 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5514 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5515 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5516 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5517 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5518 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_5___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5519 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5520 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5521 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_8_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5522 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_9_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5523 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_10___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5524 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_11___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5525 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_12_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5526 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_13_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5527 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_14___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5528 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_15_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5529 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_16_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5530 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_17___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5531 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_18___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5532 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_19_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5533 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_20_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5534 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_21___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5535 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_22_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5536 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_23_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5537 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_24___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5538 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_25_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5539 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_26_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5540 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_27___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5541 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_28_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5542 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_29_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5543 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_30___set__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5544 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_31_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5545 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_32_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5546 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_33___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5547 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_34_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5548 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_35_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5549 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_36_itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5550 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_37_iteritems(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
5551 static __Pyx_CachedCFunction __pyx_umethod_PyBytes_Type_split = {0, 0, 0, 0, 0};
5552 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, 0, 0, 0, 0};
5553 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, 0, 0, 0, 0};
5554 static __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type_format = {0, 0, 0, 0, 0};
5555 /* #### Code section: late_includes ### */
5556 /* #### Code section: module_state ### */
5557 typedef struct {
5558 PyObject *__pyx_d;
5559 PyObject *__pyx_b;
5560 PyObject *__pyx_cython_runtime;
5561 PyObject *__pyx_empty_tuple;
5562 PyObject *__pyx_empty_bytes;
5563 PyObject *__pyx_empty_unicode;
5564 #ifdef __Pyx_CyFunction_USED
5565 PyTypeObject *__pyx_CyFunctionType;
5566 #endif
5567 #ifdef __Pyx_FusedFunction_USED
5568 PyTypeObject *__pyx_FusedFunctionType;
5569 #endif
5570 #ifdef __Pyx_Generator_USED
5571 PyTypeObject *__pyx_GeneratorType;
5572 #endif
5573 #ifdef __Pyx_IterableCoroutine_USED
5574 PyTypeObject *__pyx_IterableCoroutineType;
5575 #endif
5576 #ifdef __Pyx_Coroutine_USED
5577 PyTypeObject *__pyx_CoroutineAwaitType;
5578 #endif
5579 #ifdef __Pyx_Coroutine_USED
5580 PyTypeObject *__pyx_CoroutineType;
5581 #endif
5582 #if CYTHON_USE_MODULE_STATE
5583 #endif
5584 #if CYTHON_USE_MODULE_STATE
5585 #endif
5586 #if CYTHON_USE_MODULE_STATE
5587 #endif
5588 #if CYTHON_USE_MODULE_STATE
5589 #endif
5590 #if CYTHON_USE_MODULE_STATE
5591 #endif
5592 #if CYTHON_USE_MODULE_STATE
5593 #endif
5594 PyTypeObject *__pyx_ptype_5pysam_10libchtslib_HTSFile;
5595 #if CYTHON_USE_MODULE_STATE
5596 #endif
5597 #if CYTHON_USE_MODULE_STATE
5598 #endif
5599 #if CYTHON_USE_MODULE_STATE
5600 #endif
5601 #if CYTHON_USE_MODULE_STATE
5602 #endif
5603 PyTypeObject *__pyx_ptype_7cpython_4type_type;
5604 #if CYTHON_USE_MODULE_STATE
5605 #endif
5606 #if CYTHON_USE_MODULE_STATE
5607 #endif
5608 #if CYTHON_USE_MODULE_STATE
5609 #endif
5610 #if CYTHON_USE_MODULE_STATE
5611 #endif
5612 #if CYTHON_USE_MODULE_STATE
5613 #endif
5614 #if CYTHON_USE_MODULE_STATE
5615 #endif
5616 #if CYTHON_USE_MODULE_STATE
5617 #endif
5618 #if CYTHON_USE_MODULE_STATE
5619 #endif
5620 #if CYTHON_USE_MODULE_STATE
5621 #endif
5622 #if CYTHON_USE_MODULE_STATE
5623 #endif
5624 #if CYTHON_USE_MODULE_STATE
5625 #endif
5626 #if CYTHON_USE_MODULE_STATE
5627 #endif
5628 #if CYTHON_USE_MODULE_STATE
5629 #endif
5630 #if CYTHON_USE_MODULE_STATE
5631 #endif
5632 PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
5633 #if CYTHON_USE_MODULE_STATE
5634 #endif
5635 #if CYTHON_USE_MODULE_STATE
5636 #endif
5637 #if CYTHON_USE_MODULE_STATE
5638 #endif
5639 #if CYTHON_USE_MODULE_STATE
5640 #endif
5641 PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
5642 #if CYTHON_USE_MODULE_STATE
5643 #endif
5644 #if CYTHON_USE_MODULE_STATE
5645 #endif
5646 #if CYTHON_USE_MODULE_STATE
5647 #endif
5648 #if CYTHON_USE_MODULE_STATE
5649 #endif
5650 #if CYTHON_USE_MODULE_STATE
5651 #endif
5652 #if CYTHON_USE_MODULE_STATE
5653 #endif
5654 #if CYTHON_USE_MODULE_STATE
5655 #endif
5656 #if CYTHON_USE_MODULE_STATE
5657 #endif
5658 #if CYTHON_USE_MODULE_STATE
5659 #endif
5660 #if CYTHON_USE_MODULE_STATE
5661 #endif
5662 #if CYTHON_USE_MODULE_STATE
5663 #endif
5664 #if CYTHON_USE_MODULE_STATE
5665 #endif
5666 #if CYTHON_USE_MODULE_STATE
5667 #endif
5668 #if CYTHON_USE_MODULE_STATE
5669 #endif
5670 #if CYTHON_USE_MODULE_STATE
5671 #endif
5672 #if CYTHON_USE_MODULE_STATE
5673 #endif
5674 #if CYTHON_USE_MODULE_STATE
5675 #endif
5676 #if CYTHON_USE_MODULE_STATE
5677 #endif
5678 #if CYTHON_USE_MODULE_STATE
5679 #endif
5680 #if CYTHON_USE_MODULE_STATE
5681 #endif
5682 #if CYTHON_USE_MODULE_STATE
5683 #endif
5684 #if CYTHON_USE_MODULE_STATE
5685 #endif
5686 #if CYTHON_USE_MODULE_STATE
5687 #endif
5688 PyTypeObject *__pyx_ptype_7cpython_5array_array;
5689 #if CYTHON_USE_MODULE_STATE
5690 #endif
5691 #if CYTHON_USE_MODULE_STATE
5692 PyObject *__pyx_type_5pysam_7libcbcf_VariantHeader;
5693 PyObject *__pyx_type_5pysam_7libcbcf_VariantHeaderRecord;
5694 PyObject *__pyx_type_5pysam_7libcbcf_VariantHeaderRecords;
5695 PyObject *__pyx_type_5pysam_7libcbcf_VariantHeaderContigs;
5696 PyObject *__pyx_type_5pysam_7libcbcf_VariantHeaderSamples;
5697 PyObject *__pyx_type_5pysam_7libcbcf_VariantContig;
5698 PyObject *__pyx_type_5pysam_7libcbcf_VariantMetadata;
5699 PyObject *__pyx_type_5pysam_7libcbcf_VariantHeaderMetadata;
5700 PyObject *__pyx_type_5pysam_7libcbcf_VariantRecord;
5701 PyObject *__pyx_type_5pysam_7libcbcf_VariantRecordFilter;
5702 PyObject *__pyx_type_5pysam_7libcbcf_VariantRecordFormat;
5703 PyObject *__pyx_type_5pysam_7libcbcf_VariantRecordInfo;
5704 PyObject *__pyx_type_5pysam_7libcbcf_VariantRecordSamples;
5705 PyObject *__pyx_type_5pysam_7libcbcf_VariantRecordSample;
5706 PyObject *__pyx_type_5pysam_7libcbcf_BaseIndex;
5707 PyObject *__pyx_type_5pysam_7libcbcf_BCFIndex;
5708 PyObject *__pyx_type_5pysam_7libcbcf_TabixIndex;
5709 PyObject *__pyx_type_5pysam_7libcbcf_BaseIterator;
5710 PyObject *__pyx_type_5pysam_7libcbcf_BCFIterator;
5711 PyObject *__pyx_type_5pysam_7libcbcf_TabixIterator;
5712 PyObject *__pyx_type_5pysam_7libcbcf_VariantFile;
5713 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple;
5714 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr;
5715 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr;
5716 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr;
5717 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr;
5718 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get__;
5719 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr;
5720 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter__;
5721 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues;
5722 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems;
5723 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter__;
5724 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter__;
5725 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues;
5726 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems;
5727 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter__;
5728 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues;
5729 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems;
5730 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter__;
5731 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter__;
5732 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues;
5733 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems;
5734 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter__;
5735 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues;
5736 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems;
5737 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter__;
5738 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues;
5739 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems;
5740 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter__;
5741 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues;
5742 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems;
5743 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set__;
5744 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr;
5745 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr;
5746 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter__;
5747 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues;
5748 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems;
5749 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues;
5750 PyObject *__pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems;
5751 #endif
5752 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantHeader;
5753 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord;
5754 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords;
5755 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs;
5756 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples;
5757 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantContig;
5758 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantMetadata;
5759 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata;
5760 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantRecord;
5761 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter;
5762 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat;
5763 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo;
5764 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples;
5765 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantRecordSample;
5766 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_BaseIndex;
5767 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_BCFIndex;
5768 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_TabixIndex;
5769 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_BaseIterator;
5770 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_BCFIterator;
5771 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_TabixIterator;
5772 PyTypeObject *__pyx_ptype_5pysam_7libcbcf_VariantFile;
5773 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple;
5774 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr;
5775 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr;
5776 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr;
5777 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr;
5778 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__;
5779 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr;
5780 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__;
5781 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues;
5782 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems;
5783 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__;
5784 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__;
5785 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues;
5786 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems;
5787 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__;
5788 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues;
5789 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems;
5790 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__;
5791 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__;
5792 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues;
5793 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems;
5794 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__;
5795 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues;
5796 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems;
5797 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__;
5798 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues;
5799 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems;
5800 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__;
5801 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues;
5802 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems;
5803 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__;
5804 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr;
5805 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr;
5806 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__;
5807 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues;
5808 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems;
5809 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues;
5810 PyTypeObject *__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems;
5811 PyObject *__pyx_n_u_A;
5812 PyObject *__pyx_n_u_ALT;
5813 PyObject *__pyx_n_s_AssertionError;
5814 PyObject *__pyx_n_s_BCFIndex;
5815 PyObject *__pyx_n_u_BCFIndex;
5816 PyObject *__pyx_n_s_BCFIndex___reduce_cython;
5817 PyObject *__pyx_n_s_BCFIndex___setstate_cython;
5818 PyObject *__pyx_n_s_BCFIndex_fetch;
5819 PyObject *__pyx_n_s_BCFIterator;
5820 PyObject *__pyx_n_u_BCFIterator;
5821 PyObject *__pyx_n_s_BCFIterator___reduce_cython;
5822 PyObject *__pyx_n_s_BCFIterator___setstate_cython;
5823 PyObject *__pyx_n_u_BND;
5824 PyObject *__pyx_n_s_BaseIndex;
5825 PyObject *__pyx_n_u_BaseIndex;
5826 PyObject *__pyx_n_s_BaseIndex___reduce_cython;
5827 PyObject *__pyx_n_s_BaseIndex___setstate_cython;
5828 PyObject *__pyx_n_s_BaseIndex_get;
5829 PyObject *__pyx_n_s_BaseIndex_items;
5830 PyObject *__pyx_n_s_BaseIndex_iteritems;
5831 PyObject *__pyx_n_s_BaseIndex_iterkeys;
5832 PyObject *__pyx_n_s_BaseIndex_itervalues;
5833 PyObject *__pyx_n_s_BaseIndex_keys;
5834 PyObject *__pyx_n_s_BaseIndex_pop;
5835 PyObject *__pyx_n_s_BaseIndex_update;
5836 PyObject *__pyx_n_s_BaseIndex_values;
5837 PyObject *__pyx_n_s_BaseIterator;
5838 PyObject *__pyx_n_u_BaseIterator;
5839 PyObject *__pyx_n_s_BaseIterator___reduce_cython;
5840 PyObject *__pyx_n_s_BaseIterator___setstate_cython;
5841 PyObject *__pyx_n_u_CONTIG;
5842 PyObject *__pyx_kp_u_Cannot_add_extra_threads_when_ig;
5843 PyObject *__pyx_kp_u_Cannot_copy_arrays_with_src_valu;
5844 PyObject *__pyx_kp_u_Cannot_create_empty_array;
5845 PyObject *__pyx_kp_u_Cannot_re_open_htsfile;
5846 PyObject *__pyx_kp_u_Cannot_set_phased_before_genotyp;
5847 PyObject *__pyx_kp_u_Cannot_specify_an_index_filename;
5848 PyObject *__pyx_kp_u_Cannot_translate_record_Number_o;
5849 PyObject *__pyx_n_u_Description;
5850 PyObject *__pyx_kp_u_Duplicated_sample_name;
5851 PyObject *__pyx_n_b_END;
5852 PyObject *__pyx_n_u_END;
5853 PyObject *__pyx_kp_u_END_is_a_reserved_attribute_acce;
5854 PyObject *__pyx_kp_u_Error_extracting_ID;
5855 PyObject *__pyx_kp_u_Error_s_reading_record;
5856 PyObject *__pyx_kp_u_Error_unpacking_VariantRecord;
5857 PyObject *__pyx_kp_u_Error_updating_alleles;
5858 PyObject *__pyx_kp_u_Error_updating_id;
5859 PyObject *__pyx_n_u_FILTER;
5860 PyObject *__pyx_n_u_FIXED;
5861 PyObject *__pyx_n_u_FORMAT;
5862 PyObject *__pyx_n_u_Flag;
5863 PyObject *__pyx_kp_u_Flag_types_are_not_allowed_on_FO;
5864 PyObject *__pyx_kp_u_Flag_values_must_be_True_False_N;
5865 PyObject *__pyx_n_u_Float;
5866 PyObject *__pyx_n_u_G;
5867 PyObject *__pyx_n_u_GENERIC;
5868 PyObject *__pyx_n_u_GT;
5869 PyObject *__pyx_kp_u_Header_already_exists_for_contig;
5870 PyObject *__pyx_kp_u_Header_already_exists_for_id;
5871 PyObject *__pyx_n_u_ID;
5872 PyObject *__pyx_n_u_INDEL;
5873 PyObject *__pyx_n_u_INFO;
5874 PyObject *__pyx_n_s_IOError;
5875 PyObject *__pyx_kp_u_I_O_operation_on_closed_file;
5876 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
5877 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
5878 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3;
5879 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4;
5880 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5;
5881 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6;
5882 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7;
5883 PyObject *__pyx_n_s_IndexError;
5884 PyObject *__pyx_n_u_Integer;
5885 PyObject *__pyx_kp_u_Integer_value_too_small_large_to;
5886 PyObject *__pyx_kp_u_Invalid_INFO_field;
5887 PyObject *__pyx_kp_u_Invalid_VariantRecord_Number_of;
5888 PyObject *__pyx_kp_u_Invalid_allele_index;
5889 PyObject *__pyx_kp_u_Invalid_chromosome_contig;
5890 PyObject *__pyx_kp_u_Invalid_filter;
5891 PyObject *__pyx_kp_u_Invalid_header;
5892 PyObject *__pyx_kp_u_Invalid_header_id;
5893 PyObject *__pyx_kp_u_Invalid_header_record_index;
5894 PyObject *__pyx_kp_u_Invalid_index_object;
5895 PyObject *__pyx_kp_u_Invalid_tid;
5896 PyObject *__pyx_n_s_KeyError;
5897 PyObject *__pyx_n_u_MNP;
5898 PyObject *__pyx_n_s_MemoryError;
5899 PyObject *__pyx_kp_u_NON_REF;
5900 PyObject *__pyx_n_s_NotImplemented;
5901 PyObject *__pyx_n_u_Number;
5902 PyObject *__pyx_kp_u_Number_must_be_None_when_adding;
5903 PyObject *__pyx_n_u_OTHER;
5904 PyObject *__pyx_n_u_OVERLAP;
5905 PyObject *__pyx_kp_u_One_or_more_of_the_supplied_samp;
5906 PyObject *__pyx_n_u_PASS;
5907 PyObject *__pyx_n_s_PickleError;
5908 PyObject *__pyx_kp_u_Position_must_be_positive;
5909 PyObject *__pyx_n_u_R;
5910 PyObject *__pyx_n_u_REF;
5911 PyObject *__pyx_n_u_SNP;
5912 PyObject *__pyx_n_u_STRUCTURED;
5913 PyObject *__pyx_kp_u_Start_coordinate_must_be_non_neg;
5914 PyObject *__pyx_n_s_StopIteration;
5915 PyObject *__pyx_kp_u_Stop_coordinate_must_be_non_nega;
5916 PyObject *__pyx_kp_u_Stop_position_of_the_interval;
5917 PyObject *__pyx_n_u_String;
5918 PyObject *__pyx_n_s_TabixIndex;
5919 PyObject *__pyx_n_u_TabixIndex;
5920 PyObject *__pyx_n_s_TabixIndex___reduce_cython;
5921 PyObject *__pyx_n_s_TabixIndex___setstate_cython;
5922 PyObject *__pyx_n_s_TabixIndex_fetch;
5923 PyObject *__pyx_n_s_TabixIterator;
5924 PyObject *__pyx_n_u_TabixIterator;
5925 PyObject *__pyx_n_s_TabixIterator___reduce_cython;
5926 PyObject *__pyx_n_s_TabixIterator___setstate_cython;
5927 PyObject *__pyx_n_u_Type;
5928 PyObject *__pyx_n_s_TypeError;
5929 PyObject *__pyx_kp_u_Type_must_be_None_when_adding_a;
5930 PyObject *__pyx_kp_u_Unable_to_delete_END;
5931 PyObject *__pyx_kp_u_Unable_to_delete_FORMAT;
5932 PyObject *__pyx_kp_u_Unable_to_delete_INFO;
5933 PyObject *__pyx_kp_u_Unable_to_update_INFO_values;
5934 PyObject *__pyx_kp_u_Unable_to_update_format_values;
5935 PyObject *__pyx_kp_u_Unknown_INFO_field;
5936 PyObject *__pyx_kp_u_Unknown_allele;
5937 PyObject *__pyx_kp_u_Unknown_format_length;
5938 PyObject *__pyx_kp_u_Unsupported_FORMAT_type;
5939 PyObject *__pyx_kp_u_Unsupported_INFO_type;
5940 PyObject *__pyx_kp_u_Use_allele_indices_to_set_intege;
5941 PyObject *__pyx_n_u_VARIABLE;
5942 PyObject *__pyx_n_s_ValueError;
5943 PyObject *__pyx_n_s_VariantContig;
5944 PyObject *__pyx_n_u_VariantContig;
5945 PyObject *__pyx_n_s_VariantContig___reduce_cython;
5946 PyObject *__pyx_n_s_VariantContig___setstate_cython;
5947 PyObject *__pyx_n_s_VariantContig_remove_header;
5948 PyObject *__pyx_n_s_VariantFile;
5949 PyObject *__pyx_n_u_VariantFile;
5950 PyObject *__pyx_n_s_VariantFile___reduce_cython;
5951 PyObject *__pyx_n_s_VariantFile___setstate_cython;
5952 PyObject *__pyx_n_s_VariantFile_close;
5953 PyObject *__pyx_n_s_VariantFile_copy;
5954 PyObject *__pyx_n_s_VariantFile_fetch;
5955 PyObject *__pyx_n_s_VariantFile_get_reference_name;
5956 PyObject *__pyx_n_s_VariantFile_get_tid;
5957 PyObject *__pyx_n_s_VariantFile_is_valid_tid;
5958 PyObject *__pyx_n_s_VariantFile_new_record;
5959 PyObject *__pyx_n_s_VariantFile_open;
5960 PyObject *__pyx_n_s_VariantFile_reset;
5961 PyObject *__pyx_n_s_VariantFile_subset_samples;
5962 PyObject *__pyx_n_s_VariantFile_write;
5963 PyObject *__pyx_n_s_VariantHeader;
5964 PyObject *__pyx_n_u_VariantHeader;
5965 PyObject *__pyx_n_s_VariantHeaderContigs;
5966 PyObject *__pyx_n_u_VariantHeaderContigs;
5967 PyObject *__pyx_n_s_VariantHeaderContigs___iter;
5968 PyObject *__pyx_n_s_VariantHeaderContigs___reduce_cy;
5969 PyObject *__pyx_n_s_VariantHeaderContigs___setstate;
5970 PyObject *__pyx_n_s_VariantHeaderContigs_add;
5971 PyObject *__pyx_n_s_VariantHeaderContigs_clear_heade;
5972 PyObject *__pyx_n_s_VariantHeaderContigs_get;
5973 PyObject *__pyx_n_s_VariantHeaderContigs_items;
5974 PyObject *__pyx_n_s_VariantHeaderContigs_iteritems;
5975 PyObject *__pyx_n_s_VariantHeaderContigs_iterkeys;
5976 PyObject *__pyx_n_s_VariantHeaderContigs_itervalues;
5977 PyObject *__pyx_n_s_VariantHeaderContigs_keys;
5978 PyObject *__pyx_n_s_VariantHeaderContigs_remove_head;
5979 PyObject *__pyx_n_s_VariantHeaderContigs_values;
5980 PyObject *__pyx_n_s_VariantHeaderMetadata;
5981 PyObject *__pyx_n_u_VariantHeaderMetadata;
5982 PyObject *__pyx_n_s_VariantHeaderMetadata___iter;
5983 PyObject *__pyx_n_s_VariantHeaderMetadata___reduce_c;
5984 PyObject *__pyx_n_s_VariantHeaderMetadata___setstate;
5985 PyObject *__pyx_n_s_VariantHeaderMetadata_add;
5986 PyObject *__pyx_n_s_VariantHeaderMetadata_clear_head;
5987 PyObject *__pyx_n_s_VariantHeaderMetadata_get;
5988 PyObject *__pyx_n_s_VariantHeaderMetadata_items;
5989 PyObject *__pyx_n_s_VariantHeaderMetadata_iteritems;
5990 PyObject *__pyx_n_s_VariantHeaderMetadata_iterkeys;
5991 PyObject *__pyx_n_s_VariantHeaderMetadata_itervalues;
5992 PyObject *__pyx_n_s_VariantHeaderMetadata_keys;
5993 PyObject *__pyx_n_s_VariantHeaderMetadata_remove_hea;
5994 PyObject *__pyx_n_s_VariantHeaderMetadata_values;
5995 PyObject *__pyx_n_s_VariantHeaderRecord;
5996 PyObject *__pyx_n_u_VariantHeaderRecord;
5997 PyObject *__pyx_n_s_VariantHeaderRecord___get___loca;
5998 PyObject *__pyx_n_s_VariantHeaderRecord___iter;
5999 PyObject *__pyx_n_s_VariantHeaderRecord___reduce_cyt;
6000 PyObject *__pyx_n_s_VariantHeaderRecord___setstate_c;
6001 PyObject *__pyx_n_s_VariantHeaderRecord_get;
6002 PyObject *__pyx_n_s_VariantHeaderRecord_items;
6003 PyObject *__pyx_n_s_VariantHeaderRecord_iteritems;
6004 PyObject *__pyx_n_s_VariantHeaderRecord_iterkeys;
6005 PyObject *__pyx_n_s_VariantHeaderRecord_itervalues;
6006 PyObject *__pyx_n_s_VariantHeaderRecord_keys;
6007 PyObject *__pyx_n_s_VariantHeaderRecord_pop;
6008 PyObject *__pyx_n_s_VariantHeaderRecord_remove;
6009 PyObject *__pyx_n_s_VariantHeaderRecord_update;
6010 PyObject *__pyx_n_s_VariantHeaderRecord_values;
6011 PyObject *__pyx_n_s_VariantHeaderRecords;
6012 PyObject *__pyx_n_u_VariantHeaderRecords;
6013 PyObject *__pyx_n_s_VariantHeaderRecords___iter;
6014 PyObject *__pyx_n_s_VariantHeaderRecords___reduce_cy;
6015 PyObject *__pyx_n_s_VariantHeaderRecords___setstate;
6016 PyObject *__pyx_n_s_VariantHeaderSamples;
6017 PyObject *__pyx_n_u_VariantHeaderSamples;
6018 PyObject *__pyx_n_s_VariantHeaderSamples___iter;
6019 PyObject *__pyx_n_s_VariantHeaderSamples___reduce_cy;
6020 PyObject *__pyx_n_s_VariantHeaderSamples___setstate;
6021 PyObject *__pyx_n_s_VariantHeaderSamples_add;
6022 PyObject *__pyx_n_s_VariantHeader___reduce_cython;
6023 PyObject *__pyx_n_s_VariantHeader___setstate_cython;
6024 PyObject *__pyx_n_s_VariantHeader_add_line;
6025 PyObject *__pyx_n_s_VariantHeader_add_meta;
6026 PyObject *__pyx_n_s_VariantHeader_add_record;
6027 PyObject *__pyx_n_s_VariantHeader_add_sample;
6028 PyObject *__pyx_n_s_VariantHeader_add_samples;
6029 PyObject *__pyx_n_s_VariantHeader_copy;
6030 PyObject *__pyx_n_s_VariantHeader_merge;
6031 PyObject *__pyx_n_s_VariantHeader_new_record;
6032 PyObject *__pyx_n_s_VariantMetadata;
6033 PyObject *__pyx_n_u_VariantMetadata;
6034 PyObject *__pyx_n_s_VariantMetadata___reduce_cython;
6035 PyObject *__pyx_n_s_VariantMetadata___setstate_cytho;
6036 PyObject *__pyx_n_s_VariantMetadata_remove_header;
6037 PyObject *__pyx_n_s_VariantRecord;
6038 PyObject *__pyx_n_u_VariantRecord;
6039 PyObject *__pyx_n_s_VariantRecordFilter;
6040 PyObject *__pyx_n_u_VariantRecordFilter;
6041 PyObject *__pyx_n_s_VariantRecordFilter___iter;
6042 PyObject *__pyx_n_s_VariantRecordFilter___reduce_cyt;
6043 PyObject *__pyx_n_s_VariantRecordFilter___setstate_c;
6044 PyObject *__pyx_n_s_VariantRecordFilter_add;
6045 PyObject *__pyx_n_s_VariantRecordFilter_clear;
6046 PyObject *__pyx_n_s_VariantRecordFilter_get;
6047 PyObject *__pyx_n_s_VariantRecordFilter_items;
6048 PyObject *__pyx_n_s_VariantRecordFilter_iteritems;
6049 PyObject *__pyx_n_s_VariantRecordFilter_iterkeys;
6050 PyObject *__pyx_n_s_VariantRecordFilter_itervalues;
6051 PyObject *__pyx_n_s_VariantRecordFilter_keys;
6052 PyObject *__pyx_n_s_VariantRecordFilter_values;
6053 PyObject *__pyx_n_s_VariantRecordFormat;
6054 PyObject *__pyx_n_u_VariantRecordFormat;
6055 PyObject *__pyx_n_s_VariantRecordFormat___iter;
6056 PyObject *__pyx_n_s_VariantRecordFormat___reduce_cyt;
6057 PyObject *__pyx_n_s_VariantRecordFormat___setstate_c;
6058 PyObject *__pyx_n_s_VariantRecordFormat_clear;
6059 PyObject *__pyx_n_s_VariantRecordFormat_get;
6060 PyObject *__pyx_n_s_VariantRecordFormat_items;
6061 PyObject *__pyx_n_s_VariantRecordFormat_iteritems;
6062 PyObject *__pyx_n_s_VariantRecordFormat_iterkeys;
6063 PyObject *__pyx_n_s_VariantRecordFormat_itervalues;
6064 PyObject *__pyx_n_s_VariantRecordFormat_keys;
6065 PyObject *__pyx_n_s_VariantRecordFormat_values;
6066 PyObject *__pyx_n_s_VariantRecordInfo;
6067 PyObject *__pyx_n_u_VariantRecordInfo;
6068 PyObject *__pyx_n_s_VariantRecordInfo___iter;
6069 PyObject *__pyx_n_s_VariantRecordInfo___reduce_cytho;
6070 PyObject *__pyx_n_s_VariantRecordInfo___setstate_cyt;
6071 PyObject *__pyx_n_s_VariantRecordInfo_clear;
6072 PyObject *__pyx_n_s_VariantRecordInfo_get;
6073 PyObject *__pyx_n_s_VariantRecordInfo_items;
6074 PyObject *__pyx_n_s_VariantRecordInfo_iteritems;
6075 PyObject *__pyx_n_s_VariantRecordInfo_iterkeys;
6076 PyObject *__pyx_n_s_VariantRecordInfo_itervalues;
6077 PyObject *__pyx_n_s_VariantRecordInfo_keys;
6078 PyObject *__pyx_n_s_VariantRecordInfo_pop;
6079 PyObject *__pyx_n_s_VariantRecordInfo_update;
6080 PyObject *__pyx_n_s_VariantRecordInfo_values;
6081 PyObject *__pyx_n_s_VariantRecordSample;
6082 PyObject *__pyx_n_u_VariantRecordSample;
6083 PyObject *__pyx_n_s_VariantRecordSample___iter;
6084 PyObject *__pyx_n_s_VariantRecordSample___reduce_cyt;
6085 PyObject *__pyx_n_s_VariantRecordSample___set___loca;
6086 PyObject *__pyx_n_s_VariantRecordSample___setstate_c;
6087 PyObject *__pyx_n_s_VariantRecordSample_clear;
6088 PyObject *__pyx_n_s_VariantRecordSample_get;
6089 PyObject *__pyx_n_s_VariantRecordSample_items;
6090 PyObject *__pyx_n_s_VariantRecordSample_iteritems;
6091 PyObject *__pyx_n_s_VariantRecordSample_iterkeys;
6092 PyObject *__pyx_n_s_VariantRecordSample_itervalues;
6093 PyObject *__pyx_n_s_VariantRecordSample_keys;
6094 PyObject *__pyx_n_s_VariantRecordSample_pop;
6095 PyObject *__pyx_n_s_VariantRecordSample_update;
6096 PyObject *__pyx_n_s_VariantRecordSample_values;
6097 PyObject *__pyx_n_s_VariantRecordSamples;
6098 PyObject *__pyx_n_u_VariantRecordSamples;
6099 PyObject *__pyx_n_s_VariantRecordSamples___iter;
6100 PyObject *__pyx_n_s_VariantRecordSamples___reduce_cy;
6101 PyObject *__pyx_n_s_VariantRecordSamples___setstate;
6102 PyObject *__pyx_n_s_VariantRecordSamples_get;
6103 PyObject *__pyx_n_s_VariantRecordSamples_items;
6104 PyObject *__pyx_n_s_VariantRecordSamples_iteritems;
6105 PyObject *__pyx_n_s_VariantRecordSamples_iterkeys;
6106 PyObject *__pyx_n_s_VariantRecordSamples_itervalues;
6107 PyObject *__pyx_n_s_VariantRecordSamples_keys;
6108 PyObject *__pyx_n_s_VariantRecordSamples_pop;
6109 PyObject *__pyx_n_s_VariantRecordSamples_update;
6110 PyObject *__pyx_n_s_VariantRecordSamples_values;
6111 PyObject *__pyx_n_s_VariantRecord___reduce_cython;
6112 PyObject *__pyx_n_s_VariantRecord___setstate_cython;
6113 PyObject *__pyx_n_s_VariantRecord_copy;
6114 PyObject *__pyx_n_s_VariantRecord_translate;
6115 PyObject *__pyx_kp_b__12;
6116 PyObject *__pyx_kp_u__12;
6117 PyObject *__pyx_kp_u__181;
6118 PyObject *__pyx_kp_b__2;
6119 PyObject *__pyx_kp_u__2;
6120 PyObject *__pyx_kp_b__241;
6121 PyObject *__pyx_n_s__278;
6122 PyObject *__pyx_n_s__323;
6123 PyObject *__pyx_n_s__330;
6124 PyObject *__pyx_kp_b__52;
6125 PyObject *__pyx_kp_u__52;
6126 PyObject *__pyx_kp_u__53;
6127 PyObject *__pyx_n_s_add;
6128 PyObject *__pyx_n_s_add_line;
6129 PyObject *__pyx_n_s_add_meta;
6130 PyObject *__pyx_n_s_add_record;
6131 PyObject *__pyx_n_s_add_sample;
6132 PyObject *__pyx_n_s_add_samples;
6133 PyObject *__pyx_n_s_all;
6134 PyObject *__pyx_n_s_alleles;
6135 PyObject *__pyx_n_s_append;
6136 PyObject *__pyx_n_s_arg;
6137 PyObject *__pyx_n_s_args;
6138 PyObject *__pyx_n_s_asyncio_coroutines;
6139 PyObject *__pyx_n_s_bcf;
6140 PyObject *__pyx_kp_u_bcf_2;
6141 PyObject *__pyx_n_s_bcf_array_to_object_locals_genex;
6142 PyObject *__pyx_n_s_bcf_check_values_locals_genexpr;
6143 PyObject *__pyx_kp_u_bcf_hdr_format_failed;
6144 PyObject *__pyx_kp_u_bcf_hdr_set_samples_failed_ret;
6145 PyObject *__pyx_kp_u_bcf_index_required;
6146 PyObject *__pyx_kp_u_bcf_must_not_be_None;
6147 PyObject *__pyx_n_s_bcf_object_to_array_locals_genex;
6148 PyObject *__pyx_n_u_bcguz;
6149 PyObject *__pyx_n_u_bcguz0123456789ex;
6150 PyObject *__pyx_n_s_bgzfp;
6151 PyObject *__pyx_n_s_bkey;
6152 PyObject *__pyx_n_s_bline;
6153 PyObject *__pyx_kp_u_cannot_convert_deleted_record_to;
6154 PyObject *__pyx_kp_u_cannot_create_VariantHeader;
6155 PyObject *__pyx_kp_u_cannot_create_VariantRecord;
6156 PyObject *__pyx_kp_u_cannot_create_VariantRecordSampl;
6157 PyObject *__pyx_kp_u_cannot_fetch_from_Variantfile_op;
6158 PyObject *__pyx_kp_u_cannot_find_metadata_key;
6159 PyObject *__pyx_kp_u_cannot_iterate_over_Variantfile;
6160 PyObject *__pyx_kp_u_cannot_set_null_allele;
6161 PyObject *__pyx_kp_u_cannot_set_null_alt_allele;
6162 PyObject *__pyx_kp_u_cannot_subset_samples_after_fetc;
6163 PyObject *__pyx_kp_u_cannot_subset_samples_from_Varia;
6164 PyObject *__pyx_kp_u_cannot_write_to_a_Variantfile_op;
6165 PyObject *__pyx_n_s_cfilename;
6166 PyObject *__pyx_n_s_char_array_to_tuple_locals_genex;
6167 PyObject *__pyx_n_s_check_truncation;
6168 PyObject *__pyx_n_s_chr;
6169 PyObject *__pyx_n_s_cindex_filename;
6170 PyObject *__pyx_n_s_ckey;
6171 PyObject *__pyx_n_s_class_getitem;
6172 PyObject *__pyx_n_s_clear;
6173 PyObject *__pyx_n_s_clear_header;
6174 PyObject *__pyx_n_s_cline_in_traceback;
6175 PyObject *__pyx_n_s_close;
6176 PyObject *__pyx_n_s_cmode;
6177 PyObject *__pyx_n_s_contig;
6178 PyObject *__pyx_n_u_contig;
6179 PyObject *__pyx_kp_u_contig_must_be_specified;
6180 PyObject *__pyx_n_s_copy;
6181 PyObject *__pyx_kp_u_could_not_open_file_mode;
6182 PyObject *__pyx_kp_u_could_not_open_variant_file;
6183 PyObject *__pyx_kp_u_could_not_open_variant_file_2;
6184 PyObject *__pyx_n_s_d;
6185 PyObject *__pyx_n_s_default;
6186 PyObject *__pyx_n_s_description;
6187 PyObject *__pyx_n_s_dict;
6188 PyObject *__pyx_n_s_dict_2;
6189 PyObject *__pyx_kp_u_disable;
6190 PyObject *__pyx_n_s_drop_samples;
6191 PyObject *__pyx_n_s_dst_hdr;
6192 PyObject *__pyx_n_s_dst_header;
6193 PyObject *__pyx_kp_u_dst_header_must_not_be_None;
6194 PyObject *__pyx_n_s_duplicate_filehandle;
6195 PyObject *__pyx_kp_u_either_value_or_items_must_be_sp;
6196 PyObject *__pyx_kp_u_enable;
6197 PyObject *__pyx_n_s_end;
6198 PyObject *__pyx_n_s_endswith;
6199 PyObject *__pyx_n_s_enumerate;
6200 PyObject *__pyx_kp_u_error_in_bcf_subset_format;
6201 PyObject *__pyx_kp_u_error_in_vcf_parse;
6202 PyObject *__pyx_n_s_f;
6203 PyObject *__pyx_n_s_fetch;
6204 PyObject *__pyx_kp_u_fetch_requires_an_index;
6205 PyObject *__pyx_kp_u_file_does_not_have_valid_header;
6206 PyObject *__pyx_n_s_filename;
6207 PyObject *__pyx_n_s_filter;
6208 PyObject *__pyx_n_s_fmt;
6209 PyObject *__pyx_n_s_format;
6210 PyObject *__pyx_n_s_format_modes;
6211 PyObject *__pyx_kp_u_gc;
6212 PyObject *__pyx_n_s_genexpr;
6213 PyObject *__pyx_kp_u_genotype_is_only_valid_as_a_form;
6214 PyObject *__pyx_n_s_get;
6215 PyObject *__pyx_n_s_get_reference_name;
6216 PyObject *__pyx_n_s_get_tid;
6217 PyObject *__pyx_n_s_getstate;
6218 PyObject *__pyx_kp_u_gz;
6219 PyObject *__pyx_n_s_hash;
6220 PyObject *__pyx_n_s_hdr;
6221 PyObject *__pyx_n_s_header;
6222 PyObject *__pyx_kp_u_header_must_not_be_None;
6223 PyObject *__pyx_n_s_hrec;
6224 PyObject *__pyx_n_s_i;
6225 PyObject *__pyx_n_s_id;
6226 PyObject *__pyx_n_s_idx;
6227 PyObject *__pyx_n_s_ignore_truncation;
6228 PyObject *__pyx_n_s_import;
6229 PyObject *__pyx_n_s_include_samples;
6230 PyObject *__pyx_n_s_index;
6231 PyObject *__pyx_n_s_index_filename;
6232 PyObject *__pyx_n_s_info;
6233 PyObject *__pyx_n_s_info_id;
6234 PyObject *__pyx_n_s_init;
6235 PyObject *__pyx_n_s_initializing;
6236 PyObject *__pyx_kp_u_invalid_FORMAT;
6237 PyObject *__pyx_kp_u_invalid_VariantHeader;
6238 PyObject *__pyx_kp_u_invalid_VariantRecord;
6239 PyObject *__pyx_kp_u_invalid_character_found;
6240 PyObject *__pyx_kp_u_invalid_contig;
6241 PyObject *__pyx_kp_u_invalid_contig_2;
6242 PyObject *__pyx_kp_u_invalid_contig_id;
6243 PyObject *__pyx_kp_u_invalid_contig_index;
6244 PyObject *__pyx_kp_u_invalid_file_mode_is_it_VCF_BCF;
6245 PyObject *__pyx_kp_u_invalid_filter_index;
6246 PyObject *__pyx_kp_u_invalid_header_line;
6247 PyObject *__pyx_kp_u_invalid_header_record_index;
6248 PyObject *__pyx_kp_u_invalid_key;
6249 PyObject *__pyx_kp_u_invalid_metadata_id;
6250 PyObject *__pyx_kp_u_invalid_metadata_type;
6251 PyObject *__pyx_kp_u_invalid_mode_options;
6252 PyObject *__pyx_n_s_invalid_modes;
6253 PyObject *__pyx_kp_u_invalid_number_of_columns;
6254 PyObject *__pyx_kp_u_invalid_reference_id;
6255 PyObject *__pyx_kp_u_invalid_sample_index;
6256 PyObject *__pyx_kp_u_invalid_sample_name;
6257 PyObject *__pyx_kp_u_invalid_tag;
6258 PyObject *__pyx_kp_u_invalid_value_for_Float_format;
6259 PyObject *__pyx_kp_u_invalid_value_for_Integer_format;
6260 PyObject *__pyx_n_s_is_coroutine;
6261 PyObject *__pyx_n_s_is_open;
6262 PyObject *__pyx_n_s_is_valid_tid;
6263 PyObject *__pyx_kp_u_isenabled;
6264 PyObject *__pyx_n_s_items;
6265 PyObject *__pyx_n_s_iter;
6266 PyObject *__pyx_n_s_iteritems;
6267 PyObject *__pyx_n_s_iterkeys;
6268 PyObject *__pyx_n_s_itervalues;
6269 PyObject *__pyx_n_s_join;
6270 PyObject *__pyx_n_s_k;
6271 PyObject *__pyx_n_s_key;
6272 PyObject *__pyx_n_s_keys;
6273 PyObject *__pyx_n_s_kwargs;
6274 PyObject *__pyx_n_s_length;
6275 PyObject *__pyx_n_u_length;
6276 PyObject *__pyx_kp_u_limits_violated;
6277 PyObject *__pyx_n_s_line;
6278 PyObject *__pyx_n_s_m;
6279 PyObject *__pyx_n_s_main;
6280 PyObject *__pyx_n_s_merge;
6281 PyObject *__pyx_kp_u_missing_d_requested_samples;
6282 PyObject *__pyx_n_s_mode;
6283 PyObject *__pyx_kp_u_mode_contains_conflicting_format;
6284 PyObject *__pyx_kp_u_mode_must_begin_with_r_w_or_a;
6285 PyObject *__pyx_n_s_msg;
6286 PyObject *__pyx_kp_u_must_set_at_least_2_alleles;
6287 PyObject *__pyx_n_s_n;
6288 PyObject *__pyx_n_s_name;
6289 PyObject *__pyx_n_s_name_2;
6290 PyObject *__pyx_n_s_new;
6291 PyObject *__pyx_n_s_new_record;
6292 PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
6293 PyObject *__pyx_n_s_number;
6294 PyObject *__pyx_n_s_object;
6295 PyObject *__pyx_n_s_open;
6296 PyObject *__pyx_n_s_os;
6297 PyObject *__pyx_n_s_parse_region;
6298 PyObject *__pyx_n_s_phased;
6299 PyObject *__pyx_n_u_phased;
6300 PyObject *__pyx_n_s_pickle;
6301 PyObject *__pyx_n_s_pop;
6302 PyObject *__pyx_n_s_pysam_libcbcf;
6303 PyObject *__pyx_kp_s_pysam_libcbcf_pyx;
6304 PyObject *__pyx_n_s_pysam_utils;
6305 PyObject *__pyx_n_s_pyx_PickleError;
6306 PyObject *__pyx_n_s_pyx_checksum;
6307 PyObject *__pyx_n_s_pyx_result;
6308 PyObject *__pyx_n_s_pyx_state;
6309 PyObject *__pyx_n_s_pyx_type;
6310 PyObject *__pyx_n_s_pyx_unpickle_BaseIndex;
6311 PyObject *__pyx_n_s_pyx_unpickle_VariantContig;
6312 PyObject *__pyx_n_s_pyx_unpickle_VariantHeaderCont;
6313 PyObject *__pyx_n_s_pyx_unpickle_VariantHeaderMeta;
6314 PyObject *__pyx_n_s_pyx_unpickle_VariantHeaderReco;
6315 PyObject *__pyx_n_s_pyx_unpickle_VariantHeaderSamp;
6316 PyObject *__pyx_n_s_pyx_unpickle_VariantMetadata;
6317 PyObject *__pyx_n_s_pyx_unpickle_VariantRecordFilt;
6318 PyObject *__pyx_n_s_pyx_unpickle_VariantRecordForm;
6319 PyObject *__pyx_n_s_pyx_unpickle_VariantRecordInfo;
6320 PyObject *__pyx_n_s_pyx_unpickle_VariantRecordSamp;
6321 PyObject *__pyx_n_s_pyx_unpickle_VariantRecordSamp_2;
6322 PyObject *__pyx_n_s_pyx_vtable;
6323 PyObject *__pyx_n_s_qual;
6324 PyObject *__pyx_n_s_quoted;
6325 PyObject *__pyx_n_b_r;
6326 PyObject *__pyx_n_s_r;
6327 PyObject *__pyx_n_u_r;
6328 PyObject *__pyx_n_s_range;
6329 PyObject *__pyx_n_s_rec;
6330 PyObject *__pyx_n_s_record;
6331 PyObject *__pyx_kp_u_record_must_not_be_None;
6332 PyObject *__pyx_n_s_records;
6333 PyObject *__pyx_n_s_reduce;
6334 PyObject *__pyx_n_s_reduce_cython;
6335 PyObject *__pyx_n_s_reduce_ex;
6336 PyObject *__pyx_n_s_ref;
6337 PyObject *__pyx_kp_u_ref_allele_must_not_be_null;
6338 PyObject *__pyx_n_s_reference;
6339 PyObject *__pyx_n_s_region;
6340 PyObject *__pyx_n_s_remap;
6341 PyObject *__pyx_n_s_remove;
6342 PyObject *__pyx_n_s_remove_header;
6343 PyObject *__pyx_n_s_reopen;
6344 PyObject *__pyx_n_s_reset;
6345 PyObject *__pyx_n_s_ret;
6346 PyObject *__pyx_n_s_reversed;
6347 PyObject *__pyx_n_s_rid;
6348 PyObject *__pyx_n_u_rwa;
6349 PyObject *__pyx_n_s_sample;
6350 PyObject *__pyx_kp_u_sample_must_not_be_None;
6351 PyObject *__pyx_n_s_samples;
6352 PyObject *__pyx_n_s_seek;
6353 PyObject *__pyx_n_s_self;
6354 PyObject *__pyx_kp_s_self_iter_cannot_be_converted_to;
6355 PyObject *__pyx_kp_s_self_ptr_cannot_be_converted_to;
6356 PyObject *__pyx_n_s_send;
6357 PyObject *__pyx_n_s_setstate;
6358 PyObject *__pyx_n_s_setstate_cython;
6359 PyObject *__pyx_n_s_spec;
6360 PyObject *__pyx_n_s_split;
6361 PyObject *__pyx_n_s_src_hdr;
6362 PyObject *__pyx_n_s_start;
6363 PyObject *__pyx_n_s_startswith;
6364 PyObject *__pyx_n_s_state;
6365 PyObject *__pyx_n_s_stop;
6366 PyObject *__pyx_kp_s_stringsource;
6367 PyObject *__pyx_n_s_strip;
6368 PyObject *__pyx_n_s_subset_samples;
6369 PyObject *__pyx_n_s_sys;
6370 PyObject *__pyx_kp_u_tabix_index_required;
6371 PyObject *__pyx_n_s_tell;
6372 PyObject *__pyx_n_s_test;
6373 PyObject *__pyx_kp_u_this_class_cannot_be_instantiate;
6374 PyObject *__pyx_n_s_threads;
6375 PyObject *__pyx_n_s_throw;
6376 PyObject *__pyx_n_s_tid;
6377 PyObject *__pyx_n_s_tidx;
6378 PyObject *__pyx_n_s_translate;
6379 PyObject *__pyx_kp_u_truncated_file;
6380 PyObject *__pyx_n_s_type;
6381 PyObject *__pyx_kp_u_unable_to_allocate_BCF_record;
6382 PyObject *__pyx_kp_u_unable_to_fetch;
6383 PyObject *__pyx_kp_u_unable_to_fetch_next_record;
6384 PyObject *__pyx_kp_u_unable_to_parse_next_record;
6385 PyObject *__pyx_kp_u_unable_to_reallocate_VariantHead;
6386 PyObject *__pyx_kp_u_unknown_INFO;
6387 PyObject *__pyx_kp_u_unknown_format;
6388 PyObject *__pyx_kp_u_unknown_mode;
6389 PyObject *__pyx_kp_u_unknown_type_specified;
6390 PyObject *__pyx_n_s_unquoted_str;
6391 PyObject *__pyx_kp_u_unsupported_header_type_code;
6392 PyObject *__pyx_kp_u_unsupported_info_type_code;
6393 PyObject *__pyx_kp_u_unsupported_type;
6394 PyObject *__pyx_kp_u_unsupported_types;
6395 PyObject *__pyx_n_s_update;
6396 PyObject *__pyx_n_s_upper;
6397 PyObject *__pyx_n_s_use_setstate;
6398 PyObject *__pyx_kp_u_utf_8;
6399 PyObject *__pyx_n_s_v;
6400 PyObject *__pyx_n_s_value;
6401 PyObject *__pyx_kp_u_value_expected_to_be_scalar_give;
6402 PyObject *__pyx_n_s_values;
6403 PyObject *__pyx_kp_u_values_expected_to_be_tuple_give;
6404 PyObject *__pyx_n_s_vars;
6405 PyObject *__pyx_kp_u_vcf_format_failed;
6406 PyObject *__pyx_n_b_w;
6407 PyObject *__pyx_n_u_w;
6408 PyObject *__pyx_n_u_wb;
6409 PyObject *__pyx_n_u_wb0;
6410 PyObject *__pyx_n_u_wbu;
6411 PyObject *__pyx_n_s_write;
6412 PyObject *__pyx_n_u_wz;
6413 PyObject *__pyx_int_0;
6414 PyObject *__pyx_int_1;
6415 PyObject *__pyx_int_2;
6416 PyObject *__pyx_int_10091417;
6417 PyObject *__pyx_int_10698032;
6418 PyObject *__pyx_int_31479882;
6419 PyObject *__pyx_int_33440904;
6420 PyObject *__pyx_int_39264352;
6421 PyObject *__pyx_int_41264896;
6422 PyObject *__pyx_int_93650198;
6423 PyObject *__pyx_int_94171383;
6424 PyObject *__pyx_int_97976187;
6425 PyObject *__pyx_int_118286449;
6426 PyObject *__pyx_int_126454353;
6427 PyObject *__pyx_int_135711299;
6428 PyObject *__pyx_int_145625440;
6429 PyObject *__pyx_int_164668780;
6430 PyObject *__pyx_int_168021462;
6431 PyObject *__pyx_int_199651019;
6432 PyObject *__pyx_int_215036767;
6433 PyObject *__pyx_int_227765731;
6434 PyObject *__pyx_int_232881935;
6435 PyObject *__pyx_int_248899179;
6436 PyObject *__pyx_int_250317299;
6437 PyObject *__pyx_int_4294967294;
6438 PyObject *__pyx_int_neg_1;
6439 PyObject *__pyx_k__41;
6440 PyObject *__pyx_k__146;
6441 PyObject *__pyx_k__158;
6442 PyObject *__pyx_k__193;
6443 PyObject *__pyx_k__206;
6444 PyObject *__pyx_tuple_;
6445 PyObject *__pyx_tuple__3;
6446 PyObject *__pyx_tuple__4;
6447 PyObject *__pyx_tuple__5;
6448 PyObject *__pyx_tuple__6;
6449 PyObject *__pyx_tuple__7;
6450 PyObject *__pyx_tuple__8;
6451 PyObject *__pyx_tuple__9;
6452 PyObject *__pyx_tuple__10;
6453 PyObject *__pyx_tuple__11;
6454 PyObject *__pyx_tuple__13;
6455 PyObject *__pyx_tuple__14;
6456 PyObject *__pyx_tuple__15;
6457 PyObject *__pyx_tuple__16;
6458 PyObject *__pyx_tuple__17;
6459 PyObject *__pyx_tuple__18;
6460 PyObject *__pyx_tuple__19;
6461 PyObject *__pyx_tuple__20;
6462 PyObject *__pyx_tuple__21;
6463 PyObject *__pyx_tuple__22;
6464 PyObject *__pyx_tuple__23;
6465 PyObject *__pyx_tuple__24;
6466 PyObject *__pyx_tuple__25;
6467 PyObject *__pyx_tuple__26;
6468 PyObject *__pyx_tuple__27;
6469 PyObject *__pyx_tuple__28;
6470 PyObject *__pyx_tuple__29;
6471 PyObject *__pyx_tuple__30;
6472 PyObject *__pyx_tuple__31;
6473 PyObject *__pyx_tuple__32;
6474 PyObject *__pyx_tuple__43;
6475 PyObject *__pyx_tuple__47;
6476 PyObject *__pyx_tuple__48;
6477 PyObject *__pyx_tuple__51;
6478 PyObject *__pyx_tuple__57;
6479 PyObject *__pyx_tuple__58;
6480 PyObject *__pyx_tuple__60;
6481 PyObject *__pyx_tuple__61;
6482 PyObject *__pyx_tuple__76;
6483 PyObject *__pyx_tuple__77;
6484 PyObject *__pyx_tuple__88;
6485 PyObject *__pyx_tuple__91;
6486 PyObject *__pyx_tuple__95;
6487 PyObject *__pyx_tuple__98;
6488 PyObject *__pyx_slice__240;
6489 PyObject *__pyx_tuple__100;
6490 PyObject *__pyx_tuple__103;
6491 PyObject *__pyx_tuple__105;
6492 PyObject *__pyx_tuple__106;
6493 PyObject *__pyx_tuple__111;
6494 PyObject *__pyx_tuple__123;
6495 PyObject *__pyx_tuple__124;
6496 PyObject *__pyx_tuple__135;
6497 PyObject *__pyx_tuple__136;
6498 PyObject *__pyx_tuple__164;
6499 PyObject *__pyx_tuple__165;
6500 PyObject *__pyx_tuple__166;
6501 PyObject *__pyx_tuple__167;
6502 PyObject *__pyx_tuple__168;
6503 PyObject *__pyx_tuple__169;
6504 PyObject *__pyx_tuple__170;
6505 PyObject *__pyx_tuple__171;
6506 PyObject *__pyx_tuple__172;
6507 PyObject *__pyx_tuple__173;
6508 PyObject *__pyx_tuple__174;
6509 PyObject *__pyx_tuple__175;
6510 PyObject *__pyx_tuple__176;
6511 PyObject *__pyx_tuple__177;
6512 PyObject *__pyx_tuple__180;
6513 PyObject *__pyx_tuple__182;
6514 PyObject *__pyx_tuple__183;
6515 PyObject *__pyx_tuple__197;
6516 PyObject *__pyx_tuple__210;
6517 PyObject *__pyx_tuple__219;
6518 PyObject *__pyx_tuple__220;
6519 PyObject *__pyx_tuple__221;
6520 PyObject *__pyx_tuple__222;
6521 PyObject *__pyx_tuple__223;
6522 PyObject *__pyx_tuple__224;
6523 PyObject *__pyx_tuple__227;
6524 PyObject *__pyx_tuple__228;
6525 PyObject *__pyx_tuple__232;
6526 PyObject *__pyx_tuple__233;
6527 PyObject *__pyx_tuple__234;
6528 PyObject *__pyx_tuple__236;
6529 PyObject *__pyx_tuple__238;
6530 PyObject *__pyx_tuple__239;
6531 PyObject *__pyx_tuple__242;
6532 PyObject *__pyx_tuple__247;
6533 PyObject *__pyx_tuple__249;
6534 PyObject *__pyx_tuple__250;
6535 PyObject *__pyx_tuple__253;
6536 PyObject *__pyx_tuple__255;
6537 PyObject *__pyx_tuple__256;
6538 PyObject *__pyx_tuple__260;
6539 PyObject *__pyx_tuple__262;
6540 PyObject *__pyx_tuple__264;
6541 PyObject *__pyx_tuple__266;
6542 PyObject *__pyx_tuple__270;
6543 PyObject *__pyx_tuple__275;
6544 PyObject *__pyx_tuple__277;
6545 PyObject *__pyx_tuple__279;
6546 PyObject *__pyx_tuple__280;
6547 PyObject *__pyx_tuple__281;
6548 PyObject *__pyx_tuple__282;
6549 PyObject *__pyx_tuple__283;
6550 PyObject *__pyx_tuple__284;
6551 PyObject *__pyx_tuple__285;
6552 PyObject *__pyx_tuple__286;
6553 PyObject *__pyx_tuple__287;
6554 PyObject *__pyx_tuple__288;
6555 PyObject *__pyx_tuple__289;
6556 PyObject *__pyx_tuple__290;
6557 PyObject *__pyx_tuple__291;
6558 PyObject *__pyx_tuple__292;
6559 PyObject *__pyx_tuple__293;
6560 PyObject *__pyx_tuple__294;
6561 PyObject *__pyx_tuple__295;
6562 PyObject *__pyx_tuple__296;
6563 PyObject *__pyx_tuple__297;
6564 PyObject *__pyx_tuple__298;
6565 PyObject *__pyx_tuple__299;
6566 PyObject *__pyx_tuple__300;
6567 PyObject *__pyx_tuple__301;
6568 PyObject *__pyx_tuple__302;
6569 PyObject *__pyx_tuple__303;
6570 PyObject *__pyx_tuple__304;
6571 PyObject *__pyx_tuple__305;
6572 PyObject *__pyx_tuple__306;
6573 PyObject *__pyx_tuple__307;
6574 PyObject *__pyx_tuple__308;
6575 PyObject *__pyx_tuple__309;
6576 PyObject *__pyx_tuple__310;
6577 PyObject *__pyx_tuple__311;
6578 PyObject *__pyx_tuple__312;
6579 PyObject *__pyx_tuple__313;
6580 PyObject *__pyx_tuple__314;
6581 PyObject *__pyx_tuple__315;
6582 PyObject *__pyx_tuple__316;
6583 PyObject *__pyx_tuple__317;
6584 PyObject *__pyx_tuple__318;
6585 PyObject *__pyx_tuple__319;
6586 PyObject *__pyx_tuple__320;
6587 PyObject *__pyx_tuple__321;
6588 PyObject *__pyx_tuple__322;
6589 PyObject *__pyx_tuple__324;
6590 PyObject *__pyx_tuple__325;
6591 PyObject *__pyx_tuple__326;
6592 PyObject *__pyx_tuple__327;
6593 PyObject *__pyx_tuple__328;
6594 PyObject *__pyx_tuple__329;
6595 PyObject *__pyx_codeobj__33;
6596 PyObject *__pyx_codeobj__34;
6597 PyObject *__pyx_codeobj__35;
6598 PyObject *__pyx_codeobj__36;
6599 PyObject *__pyx_codeobj__37;
6600 PyObject *__pyx_codeobj__38;
6601 PyObject *__pyx_codeobj__39;
6602 PyObject *__pyx_codeobj__40;
6603 PyObject *__pyx_codeobj__42;
6604 PyObject *__pyx_codeobj__44;
6605 PyObject *__pyx_codeobj__45;
6606 PyObject *__pyx_codeobj__46;
6607 PyObject *__pyx_codeobj__49;
6608 PyObject *__pyx_codeobj__50;
6609 PyObject *__pyx_codeobj__54;
6610 PyObject *__pyx_codeobj__55;
6611 PyObject *__pyx_codeobj__56;
6612 PyObject *__pyx_codeobj__59;
6613 PyObject *__pyx_codeobj__62;
6614 PyObject *__pyx_codeobj__63;
6615 PyObject *__pyx_codeobj__64;
6616 PyObject *__pyx_codeobj__65;
6617 PyObject *__pyx_codeobj__66;
6618 PyObject *__pyx_codeobj__67;
6619 PyObject *__pyx_codeobj__68;
6620 PyObject *__pyx_codeobj__69;
6621 PyObject *__pyx_codeobj__70;
6622 PyObject *__pyx_codeobj__71;
6623 PyObject *__pyx_codeobj__72;
6624 PyObject *__pyx_codeobj__73;
6625 PyObject *__pyx_codeobj__74;
6626 PyObject *__pyx_codeobj__75;
6627 PyObject *__pyx_codeobj__78;
6628 PyObject *__pyx_codeobj__79;
6629 PyObject *__pyx_codeobj__80;
6630 PyObject *__pyx_codeobj__81;
6631 PyObject *__pyx_codeobj__82;
6632 PyObject *__pyx_codeobj__83;
6633 PyObject *__pyx_codeobj__84;
6634 PyObject *__pyx_codeobj__85;
6635 PyObject *__pyx_codeobj__86;
6636 PyObject *__pyx_codeobj__87;
6637 PyObject *__pyx_codeobj__89;
6638 PyObject *__pyx_codeobj__90;
6639 PyObject *__pyx_codeobj__92;
6640 PyObject *__pyx_codeobj__93;
6641 PyObject *__pyx_codeobj__94;
6642 PyObject *__pyx_codeobj__96;
6643 PyObject *__pyx_codeobj__97;
6644 PyObject *__pyx_codeobj__99;
6645 PyObject *__pyx_codeobj__101;
6646 PyObject *__pyx_codeobj__102;
6647 PyObject *__pyx_codeobj__104;
6648 PyObject *__pyx_codeobj__107;
6649 PyObject *__pyx_codeobj__108;
6650 PyObject *__pyx_codeobj__109;
6651 PyObject *__pyx_codeobj__110;
6652 PyObject *__pyx_codeobj__112;
6653 PyObject *__pyx_codeobj__113;
6654 PyObject *__pyx_codeobj__114;
6655 PyObject *__pyx_codeobj__115;
6656 PyObject *__pyx_codeobj__116;
6657 PyObject *__pyx_codeobj__117;
6658 PyObject *__pyx_codeobj__118;
6659 PyObject *__pyx_codeobj__119;
6660 PyObject *__pyx_codeobj__120;
6661 PyObject *__pyx_codeobj__121;
6662 PyObject *__pyx_codeobj__122;
6663 PyObject *__pyx_codeobj__125;
6664 PyObject *__pyx_codeobj__126;
6665 PyObject *__pyx_codeobj__127;
6666 PyObject *__pyx_codeobj__128;
6667 PyObject *__pyx_codeobj__129;
6668 PyObject *__pyx_codeobj__130;
6669 PyObject *__pyx_codeobj__131;
6670 PyObject *__pyx_codeobj__132;
6671 PyObject *__pyx_codeobj__133;
6672 PyObject *__pyx_codeobj__134;
6673 PyObject *__pyx_codeobj__137;
6674 PyObject *__pyx_codeobj__138;
6675 PyObject *__pyx_codeobj__139;
6676 PyObject *__pyx_codeobj__140;
6677 PyObject *__pyx_codeobj__141;
6678 PyObject *__pyx_codeobj__142;
6679 PyObject *__pyx_codeobj__143;
6680 PyObject *__pyx_codeobj__144;
6681 PyObject *__pyx_codeobj__145;
6682 PyObject *__pyx_codeobj__147;
6683 PyObject *__pyx_codeobj__148;
6684 PyObject *__pyx_codeobj__149;
6685 PyObject *__pyx_codeobj__150;
6686 PyObject *__pyx_codeobj__151;
6687 PyObject *__pyx_codeobj__152;
6688 PyObject *__pyx_codeobj__153;
6689 PyObject *__pyx_codeobj__154;
6690 PyObject *__pyx_codeobj__155;
6691 PyObject *__pyx_codeobj__156;
6692 PyObject *__pyx_codeobj__157;
6693 PyObject *__pyx_codeobj__159;
6694 PyObject *__pyx_codeobj__160;
6695 PyObject *__pyx_codeobj__161;
6696 PyObject *__pyx_codeobj__162;
6697 PyObject *__pyx_codeobj__163;
6698 PyObject *__pyx_codeobj__178;
6699 PyObject *__pyx_codeobj__179;
6700 PyObject *__pyx_codeobj__184;
6701 PyObject *__pyx_codeobj__185;
6702 PyObject *__pyx_codeobj__186;
6703 PyObject *__pyx_codeobj__187;
6704 PyObject *__pyx_codeobj__188;
6705 PyObject *__pyx_codeobj__189;
6706 PyObject *__pyx_codeobj__190;
6707 PyObject *__pyx_codeobj__191;
6708 PyObject *__pyx_codeobj__192;
6709 PyObject *__pyx_codeobj__194;
6710 PyObject *__pyx_codeobj__195;
6711 PyObject *__pyx_codeobj__196;
6712 PyObject *__pyx_codeobj__198;
6713 PyObject *__pyx_codeobj__199;
6714 PyObject *__pyx_codeobj__200;
6715 PyObject *__pyx_codeobj__201;
6716 PyObject *__pyx_codeobj__202;
6717 PyObject *__pyx_codeobj__203;
6718 PyObject *__pyx_codeobj__204;
6719 PyObject *__pyx_codeobj__205;
6720 PyObject *__pyx_codeobj__207;
6721 PyObject *__pyx_codeobj__208;
6722 PyObject *__pyx_codeobj__209;
6723 PyObject *__pyx_codeobj__211;
6724 PyObject *__pyx_codeobj__212;
6725 PyObject *__pyx_codeobj__213;
6726 PyObject *__pyx_codeobj__214;
6727 PyObject *__pyx_codeobj__215;
6728 PyObject *__pyx_codeobj__216;
6729 PyObject *__pyx_codeobj__217;
6730 PyObject *__pyx_codeobj__218;
6731 PyObject *__pyx_codeobj__225;
6732 PyObject *__pyx_codeobj__226;
6733 PyObject *__pyx_codeobj__229;
6734 PyObject *__pyx_codeobj__230;
6735 PyObject *__pyx_codeobj__231;
6736 PyObject *__pyx_codeobj__235;
6737 PyObject *__pyx_codeobj__237;
6738 PyObject *__pyx_codeobj__243;
6739 PyObject *__pyx_codeobj__244;
6740 PyObject *__pyx_codeobj__245;
6741 PyObject *__pyx_codeobj__246;
6742 PyObject *__pyx_codeobj__248;
6743 PyObject *__pyx_codeobj__251;
6744 PyObject *__pyx_codeobj__252;
6745 PyObject *__pyx_codeobj__254;
6746 PyObject *__pyx_codeobj__257;
6747 PyObject *__pyx_codeobj__258;
6748 PyObject *__pyx_codeobj__259;
6749 PyObject *__pyx_codeobj__261;
6750 PyObject *__pyx_codeobj__263;
6751 PyObject *__pyx_codeobj__265;
6752 PyObject *__pyx_codeobj__267;
6753 PyObject *__pyx_codeobj__268;
6754 PyObject *__pyx_codeobj__269;
6755 PyObject *__pyx_codeobj__271;
6756 PyObject *__pyx_codeobj__272;
6757 PyObject *__pyx_codeobj__273;
6758 PyObject *__pyx_codeobj__274;
6759 PyObject *__pyx_codeobj__276;
6760 } __pyx_mstate;
6761
6762 #if CYTHON_USE_MODULE_STATE
6763 #ifdef __cplusplus
6764 namespace {
6765 extern struct PyModuleDef __pyx_moduledef;
6766 } /* anonymous namespace */
6767 #else
6768 static struct PyModuleDef __pyx_moduledef;
6769 #endif
6770
6771 #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
6772
6773 #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
6774
6775 #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
6776 #else
6777 static __pyx_mstate __pyx_mstate_global_static =
6778 #ifdef __cplusplus
6779 {};
6780 #else
6781 {0};
6782 #endif
6783 static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
6784 #endif
6785 /* #### Code section: module_state_clear ### */
6786 #if CYTHON_USE_MODULE_STATE
6787 static int __pyx_m_clear(PyObject *m) {
6788 __pyx_mstate *clear_module_state = __pyx_mstate(m);
6789 if (!clear_module_state) return 0;
6790 Py_CLEAR(clear_module_state->__pyx_d);
6791 Py_CLEAR(clear_module_state->__pyx_b);
6792 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
6793 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
6794 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
6795 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
6796 #ifdef __Pyx_CyFunction_USED
6797 Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
6798 #endif
6799 #ifdef __Pyx_FusedFunction_USED
6800 Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
6801 #endif
6802 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile);
6803 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
6804 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
6805 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
6806 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_5array_array);
6807 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeader);
6808 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantHeader);
6809 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
6810 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderRecord);
6811 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords);
6812 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderRecords);
6813 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
6814 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderContigs);
6815 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples);
6816 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderSamples);
6817 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantContig);
6818 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantContig);
6819 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantMetadata);
6820 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantMetadata);
6821 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
6822 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderMetadata);
6823 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecord);
6824 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantRecord);
6825 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
6826 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordFilter);
6827 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
6828 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordFormat);
6829 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
6830 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordInfo);
6831 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
6832 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordSamples);
6833 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
6834 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordSample);
6835 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_BaseIndex);
6836 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_BaseIndex);
6837 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_BCFIndex);
6838 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_BCFIndex);
6839 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_TabixIndex);
6840 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_TabixIndex);
6841 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_BaseIterator);
6842 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_BaseIterator);
6843 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_BCFIterator);
6844 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_BCFIterator);
6845 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_TabixIterator);
6846 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_TabixIterator);
6847 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf_VariantFile);
6848 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf_VariantFile);
6849 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple);
6850 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple);
6851 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr);
6852 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr);
6853 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr);
6854 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr);
6855 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr);
6856 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr);
6857 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr);
6858 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr);
6859 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__);
6860 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get__);
6861 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr);
6862 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr);
6863 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__);
6864 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter__);
6865 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues);
6866 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues);
6867 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems);
6868 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems);
6869 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__);
6870 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter__);
6871 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__);
6872 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter__);
6873 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues);
6874 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues);
6875 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems);
6876 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems);
6877 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__);
6878 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter__);
6879 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues);
6880 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues);
6881 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems);
6882 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems);
6883 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__);
6884 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter__);
6885 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__);
6886 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter__);
6887 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues);
6888 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues);
6889 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems);
6890 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems);
6891 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__);
6892 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter__);
6893 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues);
6894 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues);
6895 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems);
6896 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems);
6897 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__);
6898 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter__);
6899 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues);
6900 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues);
6901 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems);
6902 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems);
6903 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__);
6904 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter__);
6905 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues);
6906 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues);
6907 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems);
6908 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems);
6909 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__);
6910 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set__);
6911 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr);
6912 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr);
6913 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr);
6914 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr);
6915 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__);
6916 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter__);
6917 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues);
6918 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues);
6919 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems);
6920 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems);
6921 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues);
6922 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues);
6923 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems);
6924 Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems);
6925 Py_CLEAR(clear_module_state->__pyx_n_u_A);
6926 Py_CLEAR(clear_module_state->__pyx_n_u_ALT);
6927 Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
6928 Py_CLEAR(clear_module_state->__pyx_n_s_BCFIndex);
6929 Py_CLEAR(clear_module_state->__pyx_n_u_BCFIndex);
6930 Py_CLEAR(clear_module_state->__pyx_n_s_BCFIndex___reduce_cython);
6931 Py_CLEAR(clear_module_state->__pyx_n_s_BCFIndex___setstate_cython);
6932 Py_CLEAR(clear_module_state->__pyx_n_s_BCFIndex_fetch);
6933 Py_CLEAR(clear_module_state->__pyx_n_s_BCFIterator);
6934 Py_CLEAR(clear_module_state->__pyx_n_u_BCFIterator);
6935 Py_CLEAR(clear_module_state->__pyx_n_s_BCFIterator___reduce_cython);
6936 Py_CLEAR(clear_module_state->__pyx_n_s_BCFIterator___setstate_cython);
6937 Py_CLEAR(clear_module_state->__pyx_n_u_BND);
6938 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex);
6939 Py_CLEAR(clear_module_state->__pyx_n_u_BaseIndex);
6940 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex___reduce_cython);
6941 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex___setstate_cython);
6942 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_get);
6943 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_items);
6944 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_iteritems);
6945 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_iterkeys);
6946 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_itervalues);
6947 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_keys);
6948 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_pop);
6949 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_update);
6950 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIndex_values);
6951 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIterator);
6952 Py_CLEAR(clear_module_state->__pyx_n_u_BaseIterator);
6953 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIterator___reduce_cython);
6954 Py_CLEAR(clear_module_state->__pyx_n_s_BaseIterator___setstate_cython);
6955 Py_CLEAR(clear_module_state->__pyx_n_u_CONTIG);
6956 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_add_extra_threads_when_ig);
6957 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_copy_arrays_with_src_valu);
6958 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_create_empty_array);
6959 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_re_open_htsfile);
6960 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_set_phased_before_genotyp);
6961 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_specify_an_index_filename);
6962 Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_translate_record_Number_o);
6963 Py_CLEAR(clear_module_state->__pyx_n_u_Description);
6964 Py_CLEAR(clear_module_state->__pyx_kp_u_Duplicated_sample_name);
6965 Py_CLEAR(clear_module_state->__pyx_n_b_END);
6966 Py_CLEAR(clear_module_state->__pyx_n_u_END);
6967 Py_CLEAR(clear_module_state->__pyx_kp_u_END_is_a_reserved_attribute_acce);
6968 Py_CLEAR(clear_module_state->__pyx_kp_u_Error_extracting_ID);
6969 Py_CLEAR(clear_module_state->__pyx_kp_u_Error_s_reading_record);
6970 Py_CLEAR(clear_module_state->__pyx_kp_u_Error_unpacking_VariantRecord);
6971 Py_CLEAR(clear_module_state->__pyx_kp_u_Error_updating_alleles);
6972 Py_CLEAR(clear_module_state->__pyx_kp_u_Error_updating_id);
6973 Py_CLEAR(clear_module_state->__pyx_n_u_FILTER);
6974 Py_CLEAR(clear_module_state->__pyx_n_u_FIXED);
6975 Py_CLEAR(clear_module_state->__pyx_n_u_FORMAT);
6976 Py_CLEAR(clear_module_state->__pyx_n_u_Flag);
6977 Py_CLEAR(clear_module_state->__pyx_kp_u_Flag_types_are_not_allowed_on_FO);
6978 Py_CLEAR(clear_module_state->__pyx_kp_u_Flag_values_must_be_True_False_N);
6979 Py_CLEAR(clear_module_state->__pyx_n_u_Float);
6980 Py_CLEAR(clear_module_state->__pyx_n_u_G);
6981 Py_CLEAR(clear_module_state->__pyx_n_u_GENERIC);
6982 Py_CLEAR(clear_module_state->__pyx_n_u_GT);
6983 Py_CLEAR(clear_module_state->__pyx_kp_u_Header_already_exists_for_contig);
6984 Py_CLEAR(clear_module_state->__pyx_kp_u_Header_already_exists_for_id);
6985 Py_CLEAR(clear_module_state->__pyx_n_u_ID);
6986 Py_CLEAR(clear_module_state->__pyx_n_u_INDEL);
6987 Py_CLEAR(clear_module_state->__pyx_n_u_INFO);
6988 Py_CLEAR(clear_module_state->__pyx_n_s_IOError);
6989 Py_CLEAR(clear_module_state->__pyx_kp_u_I_O_operation_on_closed_file);
6990 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
6991 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2);
6992 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3);
6993 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4);
6994 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5);
6995 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6);
6996 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7);
6997 Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
6998 Py_CLEAR(clear_module_state->__pyx_n_u_Integer);
6999 Py_CLEAR(clear_module_state->__pyx_kp_u_Integer_value_too_small_large_to);
7000 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_INFO_field);
7001 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_VariantRecord_Number_of);
7002 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_allele_index);
7003 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_chromosome_contig);
7004 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_filter);
7005 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_header);
7006 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_header_id);
7007 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_header_record_index);
7008 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_index_object);
7009 Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_tid);
7010 Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
7011 Py_CLEAR(clear_module_state->__pyx_n_u_MNP);
7012 Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
7013 Py_CLEAR(clear_module_state->__pyx_kp_u_NON_REF);
7014 Py_CLEAR(clear_module_state->__pyx_n_s_NotImplemented);
7015 Py_CLEAR(clear_module_state->__pyx_n_u_Number);
7016 Py_CLEAR(clear_module_state->__pyx_kp_u_Number_must_be_None_when_adding);
7017 Py_CLEAR(clear_module_state->__pyx_n_u_OTHER);
7018 Py_CLEAR(clear_module_state->__pyx_n_u_OVERLAP);
7019 Py_CLEAR(clear_module_state->__pyx_kp_u_One_or_more_of_the_supplied_samp);
7020 Py_CLEAR(clear_module_state->__pyx_n_u_PASS);
7021 Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
7022 Py_CLEAR(clear_module_state->__pyx_kp_u_Position_must_be_positive);
7023 Py_CLEAR(clear_module_state->__pyx_n_u_R);
7024 Py_CLEAR(clear_module_state->__pyx_n_u_REF);
7025 Py_CLEAR(clear_module_state->__pyx_n_u_SNP);
7026 Py_CLEAR(clear_module_state->__pyx_n_u_STRUCTURED);
7027 Py_CLEAR(clear_module_state->__pyx_kp_u_Start_coordinate_must_be_non_neg);
7028 Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration);
7029 Py_CLEAR(clear_module_state->__pyx_kp_u_Stop_coordinate_must_be_non_nega);
7030 Py_CLEAR(clear_module_state->__pyx_kp_u_Stop_position_of_the_interval);
7031 Py_CLEAR(clear_module_state->__pyx_n_u_String);
7032 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIndex);
7033 Py_CLEAR(clear_module_state->__pyx_n_u_TabixIndex);
7034 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIndex___reduce_cython);
7035 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIndex___setstate_cython);
7036 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIndex_fetch);
7037 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator);
7038 Py_CLEAR(clear_module_state->__pyx_n_u_TabixIterator);
7039 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator___reduce_cython);
7040 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator___setstate_cython);
7041 Py_CLEAR(clear_module_state->__pyx_n_u_Type);
7042 Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
7043 Py_CLEAR(clear_module_state->__pyx_kp_u_Type_must_be_None_when_adding_a);
7044 Py_CLEAR(clear_module_state->__pyx_kp_u_Unable_to_delete_END);
7045 Py_CLEAR(clear_module_state->__pyx_kp_u_Unable_to_delete_FORMAT);
7046 Py_CLEAR(clear_module_state->__pyx_kp_u_Unable_to_delete_INFO);
7047 Py_CLEAR(clear_module_state->__pyx_kp_u_Unable_to_update_INFO_values);
7048 Py_CLEAR(clear_module_state->__pyx_kp_u_Unable_to_update_format_values);
7049 Py_CLEAR(clear_module_state->__pyx_kp_u_Unknown_INFO_field);
7050 Py_CLEAR(clear_module_state->__pyx_kp_u_Unknown_allele);
7051 Py_CLEAR(clear_module_state->__pyx_kp_u_Unknown_format_length);
7052 Py_CLEAR(clear_module_state->__pyx_kp_u_Unsupported_FORMAT_type);
7053 Py_CLEAR(clear_module_state->__pyx_kp_u_Unsupported_INFO_type);
7054 Py_CLEAR(clear_module_state->__pyx_kp_u_Use_allele_indices_to_set_intege);
7055 Py_CLEAR(clear_module_state->__pyx_n_u_VARIABLE);
7056 Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
7057 Py_CLEAR(clear_module_state->__pyx_n_s_VariantContig);
7058 Py_CLEAR(clear_module_state->__pyx_n_u_VariantContig);
7059 Py_CLEAR(clear_module_state->__pyx_n_s_VariantContig___reduce_cython);
7060 Py_CLEAR(clear_module_state->__pyx_n_s_VariantContig___setstate_cython);
7061 Py_CLEAR(clear_module_state->__pyx_n_s_VariantContig_remove_header);
7062 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile);
7063 Py_CLEAR(clear_module_state->__pyx_n_u_VariantFile);
7064 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile___reduce_cython);
7065 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile___setstate_cython);
7066 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_close);
7067 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_copy);
7068 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_fetch);
7069 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_get_reference_name);
7070 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_get_tid);
7071 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_is_valid_tid);
7072 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_new_record);
7073 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_open);
7074 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_reset);
7075 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_subset_samples);
7076 Py_CLEAR(clear_module_state->__pyx_n_s_VariantFile_write);
7077 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader);
7078 Py_CLEAR(clear_module_state->__pyx_n_u_VariantHeader);
7079 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs);
7080 Py_CLEAR(clear_module_state->__pyx_n_u_VariantHeaderContigs);
7081 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs___iter);
7082 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs___reduce_cy);
7083 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs___setstate);
7084 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_add);
7085 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_clear_heade);
7086 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_get);
7087 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_items);
7088 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_iteritems);
7089 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_iterkeys);
7090 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_itervalues);
7091 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_keys);
7092 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_remove_head);
7093 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderContigs_values);
7094 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata);
7095 Py_CLEAR(clear_module_state->__pyx_n_u_VariantHeaderMetadata);
7096 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata___iter);
7097 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata___reduce_c);
7098 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata___setstate);
7099 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_add);
7100 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_clear_head);
7101 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_get);
7102 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_items);
7103 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_iteritems);
7104 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_iterkeys);
7105 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_itervalues);
7106 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_keys);
7107 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_remove_hea);
7108 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderMetadata_values);
7109 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord);
7110 Py_CLEAR(clear_module_state->__pyx_n_u_VariantHeaderRecord);
7111 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord___get___loca);
7112 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord___iter);
7113 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord___reduce_cyt);
7114 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord___setstate_c);
7115 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_get);
7116 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_items);
7117 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_iteritems);
7118 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_iterkeys);
7119 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_itervalues);
7120 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_keys);
7121 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_pop);
7122 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_remove);
7123 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_update);
7124 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecord_values);
7125 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecords);
7126 Py_CLEAR(clear_module_state->__pyx_n_u_VariantHeaderRecords);
7127 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecords___iter);
7128 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecords___reduce_cy);
7129 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderRecords___setstate);
7130 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderSamples);
7131 Py_CLEAR(clear_module_state->__pyx_n_u_VariantHeaderSamples);
7132 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderSamples___iter);
7133 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderSamples___reduce_cy);
7134 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderSamples___setstate);
7135 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeaderSamples_add);
7136 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader___reduce_cython);
7137 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader___setstate_cython);
7138 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader_add_line);
7139 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader_add_meta);
7140 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader_add_record);
7141 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader_add_sample);
7142 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader_add_samples);
7143 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader_copy);
7144 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader_merge);
7145 Py_CLEAR(clear_module_state->__pyx_n_s_VariantHeader_new_record);
7146 Py_CLEAR(clear_module_state->__pyx_n_s_VariantMetadata);
7147 Py_CLEAR(clear_module_state->__pyx_n_u_VariantMetadata);
7148 Py_CLEAR(clear_module_state->__pyx_n_s_VariantMetadata___reduce_cython);
7149 Py_CLEAR(clear_module_state->__pyx_n_s_VariantMetadata___setstate_cytho);
7150 Py_CLEAR(clear_module_state->__pyx_n_s_VariantMetadata_remove_header);
7151 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecord);
7152 Py_CLEAR(clear_module_state->__pyx_n_u_VariantRecord);
7153 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter);
7154 Py_CLEAR(clear_module_state->__pyx_n_u_VariantRecordFilter);
7155 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter___iter);
7156 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter___reduce_cyt);
7157 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter___setstate_c);
7158 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_add);
7159 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_clear);
7160 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_get);
7161 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_items);
7162 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_iteritems);
7163 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_iterkeys);
7164 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_itervalues);
7165 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_keys);
7166 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFilter_values);
7167 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat);
7168 Py_CLEAR(clear_module_state->__pyx_n_u_VariantRecordFormat);
7169 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat___iter);
7170 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat___reduce_cyt);
7171 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat___setstate_c);
7172 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat_clear);
7173 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat_get);
7174 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat_items);
7175 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat_iteritems);
7176 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat_iterkeys);
7177 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat_itervalues);
7178 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat_keys);
7179 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordFormat_values);
7180 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo);
7181 Py_CLEAR(clear_module_state->__pyx_n_u_VariantRecordInfo);
7182 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo___iter);
7183 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo___reduce_cytho);
7184 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo___setstate_cyt);
7185 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_clear);
7186 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_get);
7187 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_items);
7188 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_iteritems);
7189 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_iterkeys);
7190 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_itervalues);
7191 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_keys);
7192 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_pop);
7193 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_update);
7194 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordInfo_values);
7195 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample);
7196 Py_CLEAR(clear_module_state->__pyx_n_u_VariantRecordSample);
7197 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample___iter);
7198 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample___reduce_cyt);
7199 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample___set___loca);
7200 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample___setstate_c);
7201 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_clear);
7202 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_get);
7203 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_items);
7204 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_iteritems);
7205 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_iterkeys);
7206 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_itervalues);
7207 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_keys);
7208 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_pop);
7209 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_update);
7210 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSample_values);
7211 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples);
7212 Py_CLEAR(clear_module_state->__pyx_n_u_VariantRecordSamples);
7213 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples___iter);
7214 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples___reduce_cy);
7215 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples___setstate);
7216 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_get);
7217 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_items);
7218 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_iteritems);
7219 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_iterkeys);
7220 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_itervalues);
7221 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_keys);
7222 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_pop);
7223 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_update);
7224 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecordSamples_values);
7225 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecord___reduce_cython);
7226 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecord___setstate_cython);
7227 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecord_copy);
7228 Py_CLEAR(clear_module_state->__pyx_n_s_VariantRecord_translate);
7229 Py_CLEAR(clear_module_state->__pyx_kp_b__12);
7230 Py_CLEAR(clear_module_state->__pyx_kp_u__12);
7231 Py_CLEAR(clear_module_state->__pyx_kp_u__181);
7232 Py_CLEAR(clear_module_state->__pyx_kp_b__2);
7233 Py_CLEAR(clear_module_state->__pyx_kp_u__2);
7234 Py_CLEAR(clear_module_state->__pyx_kp_b__241);
7235 Py_CLEAR(clear_module_state->__pyx_n_s__278);
7236 Py_CLEAR(clear_module_state->__pyx_n_s__323);
7237 Py_CLEAR(clear_module_state->__pyx_n_s__330);
7238 Py_CLEAR(clear_module_state->__pyx_kp_b__52);
7239 Py_CLEAR(clear_module_state->__pyx_kp_u__52);
7240 Py_CLEAR(clear_module_state->__pyx_kp_u__53);
7241 Py_CLEAR(clear_module_state->__pyx_n_s_add);
7242 Py_CLEAR(clear_module_state->__pyx_n_s_add_line);
7243 Py_CLEAR(clear_module_state->__pyx_n_s_add_meta);
7244 Py_CLEAR(clear_module_state->__pyx_n_s_add_record);
7245 Py_CLEAR(clear_module_state->__pyx_n_s_add_sample);
7246 Py_CLEAR(clear_module_state->__pyx_n_s_add_samples);
7247 Py_CLEAR(clear_module_state->__pyx_n_s_all);
7248 Py_CLEAR(clear_module_state->__pyx_n_s_alleles);
7249 Py_CLEAR(clear_module_state->__pyx_n_s_append);
7250 Py_CLEAR(clear_module_state->__pyx_n_s_arg);
7251 Py_CLEAR(clear_module_state->__pyx_n_s_args);
7252 Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
7253 Py_CLEAR(clear_module_state->__pyx_n_s_bcf);
7254 Py_CLEAR(clear_module_state->__pyx_kp_u_bcf_2);
7255 Py_CLEAR(clear_module_state->__pyx_n_s_bcf_array_to_object_locals_genex);
7256 Py_CLEAR(clear_module_state->__pyx_n_s_bcf_check_values_locals_genexpr);
7257 Py_CLEAR(clear_module_state->__pyx_kp_u_bcf_hdr_format_failed);
7258 Py_CLEAR(clear_module_state->__pyx_kp_u_bcf_hdr_set_samples_failed_ret);
7259 Py_CLEAR(clear_module_state->__pyx_kp_u_bcf_index_required);
7260 Py_CLEAR(clear_module_state->__pyx_kp_u_bcf_must_not_be_None);
7261 Py_CLEAR(clear_module_state->__pyx_n_s_bcf_object_to_array_locals_genex);
7262 Py_CLEAR(clear_module_state->__pyx_n_u_bcguz);
7263 Py_CLEAR(clear_module_state->__pyx_n_u_bcguz0123456789ex);
7264 Py_CLEAR(clear_module_state->__pyx_n_s_bgzfp);
7265 Py_CLEAR(clear_module_state->__pyx_n_s_bkey);
7266 Py_CLEAR(clear_module_state->__pyx_n_s_bline);
7267 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_convert_deleted_record_to);
7268 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_create_VariantHeader);
7269 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_create_VariantRecord);
7270 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_create_VariantRecordSampl);
7271 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_fetch_from_Variantfile_op);
7272 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_find_metadata_key);
7273 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_iterate_over_Variantfile);
7274 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_set_null_allele);
7275 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_set_null_alt_allele);
7276 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_subset_samples_after_fetc);
7277 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_subset_samples_from_Varia);
7278 Py_CLEAR(clear_module_state->__pyx_kp_u_cannot_write_to_a_Variantfile_op);
7279 Py_CLEAR(clear_module_state->__pyx_n_s_cfilename);
7280 Py_CLEAR(clear_module_state->__pyx_n_s_char_array_to_tuple_locals_genex);
7281 Py_CLEAR(clear_module_state->__pyx_n_s_check_truncation);
7282 Py_CLEAR(clear_module_state->__pyx_n_s_chr);
7283 Py_CLEAR(clear_module_state->__pyx_n_s_cindex_filename);
7284 Py_CLEAR(clear_module_state->__pyx_n_s_ckey);
7285 Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
7286 Py_CLEAR(clear_module_state->__pyx_n_s_clear);
7287 Py_CLEAR(clear_module_state->__pyx_n_s_clear_header);
7288 Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
7289 Py_CLEAR(clear_module_state->__pyx_n_s_close);
7290 Py_CLEAR(clear_module_state->__pyx_n_s_cmode);
7291 Py_CLEAR(clear_module_state->__pyx_n_s_contig);
7292 Py_CLEAR(clear_module_state->__pyx_n_u_contig);
7293 Py_CLEAR(clear_module_state->__pyx_kp_u_contig_must_be_specified);
7294 Py_CLEAR(clear_module_state->__pyx_n_s_copy);
7295 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_file_mode);
7296 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_variant_file);
7297 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_variant_file_2);
7298 Py_CLEAR(clear_module_state->__pyx_n_s_d);
7299 Py_CLEAR(clear_module_state->__pyx_n_s_default);
7300 Py_CLEAR(clear_module_state->__pyx_n_s_description);
7301 Py_CLEAR(clear_module_state->__pyx_n_s_dict);
7302 Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
7303 Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
7304 Py_CLEAR(clear_module_state->__pyx_n_s_drop_samples);
7305 Py_CLEAR(clear_module_state->__pyx_n_s_dst_hdr);
7306 Py_CLEAR(clear_module_state->__pyx_n_s_dst_header);
7307 Py_CLEAR(clear_module_state->__pyx_kp_u_dst_header_must_not_be_None);
7308 Py_CLEAR(clear_module_state->__pyx_n_s_duplicate_filehandle);
7309 Py_CLEAR(clear_module_state->__pyx_kp_u_either_value_or_items_must_be_sp);
7310 Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
7311 Py_CLEAR(clear_module_state->__pyx_n_s_end);
7312 Py_CLEAR(clear_module_state->__pyx_n_s_endswith);
7313 Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
7314 Py_CLEAR(clear_module_state->__pyx_kp_u_error_in_bcf_subset_format);
7315 Py_CLEAR(clear_module_state->__pyx_kp_u_error_in_vcf_parse);
7316 Py_CLEAR(clear_module_state->__pyx_n_s_f);
7317 Py_CLEAR(clear_module_state->__pyx_n_s_fetch);
7318 Py_CLEAR(clear_module_state->__pyx_kp_u_fetch_requires_an_index);
7319 Py_CLEAR(clear_module_state->__pyx_kp_u_file_does_not_have_valid_header);
7320 Py_CLEAR(clear_module_state->__pyx_n_s_filename);
7321 Py_CLEAR(clear_module_state->__pyx_n_s_filter);
7322 Py_CLEAR(clear_module_state->__pyx_n_s_fmt);
7323 Py_CLEAR(clear_module_state->__pyx_n_s_format);
7324 Py_CLEAR(clear_module_state->__pyx_n_s_format_modes);
7325 Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
7326 Py_CLEAR(clear_module_state->__pyx_n_s_genexpr);
7327 Py_CLEAR(clear_module_state->__pyx_kp_u_genotype_is_only_valid_as_a_form);
7328 Py_CLEAR(clear_module_state->__pyx_n_s_get);
7329 Py_CLEAR(clear_module_state->__pyx_n_s_get_reference_name);
7330 Py_CLEAR(clear_module_state->__pyx_n_s_get_tid);
7331 Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
7332 Py_CLEAR(clear_module_state->__pyx_kp_u_gz);
7333 Py_CLEAR(clear_module_state->__pyx_n_s_hash);
7334 Py_CLEAR(clear_module_state->__pyx_n_s_hdr);
7335 Py_CLEAR(clear_module_state->__pyx_n_s_header);
7336 Py_CLEAR(clear_module_state->__pyx_kp_u_header_must_not_be_None);
7337 Py_CLEAR(clear_module_state->__pyx_n_s_hrec);
7338 Py_CLEAR(clear_module_state->__pyx_n_s_i);
7339 Py_CLEAR(clear_module_state->__pyx_n_s_id);
7340 Py_CLEAR(clear_module_state->__pyx_n_s_idx);
7341 Py_CLEAR(clear_module_state->__pyx_n_s_ignore_truncation);
7342 Py_CLEAR(clear_module_state->__pyx_n_s_import);
7343 Py_CLEAR(clear_module_state->__pyx_n_s_include_samples);
7344 Py_CLEAR(clear_module_state->__pyx_n_s_index);
7345 Py_CLEAR(clear_module_state->__pyx_n_s_index_filename);
7346 Py_CLEAR(clear_module_state->__pyx_n_s_info);
7347 Py_CLEAR(clear_module_state->__pyx_n_s_info_id);
7348 Py_CLEAR(clear_module_state->__pyx_n_s_init);
7349 Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
7350 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_FORMAT);
7351 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_VariantHeader);
7352 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_VariantRecord);
7353 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_character_found);
7354 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_contig);
7355 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_contig_2);
7356 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_contig_id);
7357 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_contig_index);
7358 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_file_mode_is_it_VCF_BCF);
7359 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_filter_index);
7360 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_header_line);
7361 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_header_record_index);
7362 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_key);
7363 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_metadata_id);
7364 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_metadata_type);
7365 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_mode_options);
7366 Py_CLEAR(clear_module_state->__pyx_n_s_invalid_modes);
7367 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_number_of_columns);
7368 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_reference_id);
7369 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_sample_index);
7370 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_sample_name);
7371 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_tag);
7372 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_value_for_Float_format);
7373 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_value_for_Integer_format);
7374 Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
7375 Py_CLEAR(clear_module_state->__pyx_n_s_is_open);
7376 Py_CLEAR(clear_module_state->__pyx_n_s_is_valid_tid);
7377 Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
7378 Py_CLEAR(clear_module_state->__pyx_n_s_items);
7379 Py_CLEAR(clear_module_state->__pyx_n_s_iter);
7380 Py_CLEAR(clear_module_state->__pyx_n_s_iteritems);
7381 Py_CLEAR(clear_module_state->__pyx_n_s_iterkeys);
7382 Py_CLEAR(clear_module_state->__pyx_n_s_itervalues);
7383 Py_CLEAR(clear_module_state->__pyx_n_s_join);
7384 Py_CLEAR(clear_module_state->__pyx_n_s_k);
7385 Py_CLEAR(clear_module_state->__pyx_n_s_key);
7386 Py_CLEAR(clear_module_state->__pyx_n_s_keys);
7387 Py_CLEAR(clear_module_state->__pyx_n_s_kwargs);
7388 Py_CLEAR(clear_module_state->__pyx_n_s_length);
7389 Py_CLEAR(clear_module_state->__pyx_n_u_length);
7390 Py_CLEAR(clear_module_state->__pyx_kp_u_limits_violated);
7391 Py_CLEAR(clear_module_state->__pyx_n_s_line);
7392 Py_CLEAR(clear_module_state->__pyx_n_s_m);
7393 Py_CLEAR(clear_module_state->__pyx_n_s_main);
7394 Py_CLEAR(clear_module_state->__pyx_n_s_merge);
7395 Py_CLEAR(clear_module_state->__pyx_kp_u_missing_d_requested_samples);
7396 Py_CLEAR(clear_module_state->__pyx_n_s_mode);
7397 Py_CLEAR(clear_module_state->__pyx_kp_u_mode_contains_conflicting_format);
7398 Py_CLEAR(clear_module_state->__pyx_kp_u_mode_must_begin_with_r_w_or_a);
7399 Py_CLEAR(clear_module_state->__pyx_n_s_msg);
7400 Py_CLEAR(clear_module_state->__pyx_kp_u_must_set_at_least_2_alleles);
7401 Py_CLEAR(clear_module_state->__pyx_n_s_n);
7402 Py_CLEAR(clear_module_state->__pyx_n_s_name);
7403 Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
7404 Py_CLEAR(clear_module_state->__pyx_n_s_new);
7405 Py_CLEAR(clear_module_state->__pyx_n_s_new_record);
7406 Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
7407 Py_CLEAR(clear_module_state->__pyx_n_s_number);
7408 Py_CLEAR(clear_module_state->__pyx_n_s_object);
7409 Py_CLEAR(clear_module_state->__pyx_n_s_open);
7410 Py_CLEAR(clear_module_state->__pyx_n_s_os);
7411 Py_CLEAR(clear_module_state->__pyx_n_s_parse_region);
7412 Py_CLEAR(clear_module_state->__pyx_n_s_phased);
7413 Py_CLEAR(clear_module_state->__pyx_n_u_phased);
7414 Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
7415 Py_CLEAR(clear_module_state->__pyx_n_s_pop);
7416 Py_CLEAR(clear_module_state->__pyx_n_s_pysam_libcbcf);
7417 Py_CLEAR(clear_module_state->__pyx_kp_s_pysam_libcbcf_pyx);
7418 Py_CLEAR(clear_module_state->__pyx_n_s_pysam_utils);
7419 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
7420 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
7421 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
7422 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
7423 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
7424 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_BaseIndex);
7425 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantContig);
7426 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantHeaderCont);
7427 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantHeaderMeta);
7428 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantHeaderReco);
7429 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantHeaderSamp);
7430 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantMetadata);
7431 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantRecordFilt);
7432 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantRecordForm);
7433 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantRecordInfo);
7434 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantRecordSamp);
7435 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_VariantRecordSamp_2);
7436 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
7437 Py_CLEAR(clear_module_state->__pyx_n_s_qual);
7438 Py_CLEAR(clear_module_state->__pyx_n_s_quoted);
7439 Py_CLEAR(clear_module_state->__pyx_n_b_r);
7440 Py_CLEAR(clear_module_state->__pyx_n_s_r);
7441 Py_CLEAR(clear_module_state->__pyx_n_u_r);
7442 Py_CLEAR(clear_module_state->__pyx_n_s_range);
7443 Py_CLEAR(clear_module_state->__pyx_n_s_rec);
7444 Py_CLEAR(clear_module_state->__pyx_n_s_record);
7445 Py_CLEAR(clear_module_state->__pyx_kp_u_record_must_not_be_None);
7446 Py_CLEAR(clear_module_state->__pyx_n_s_records);
7447 Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
7448 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
7449 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
7450 Py_CLEAR(clear_module_state->__pyx_n_s_ref);
7451 Py_CLEAR(clear_module_state->__pyx_kp_u_ref_allele_must_not_be_null);
7452 Py_CLEAR(clear_module_state->__pyx_n_s_reference);
7453 Py_CLEAR(clear_module_state->__pyx_n_s_region);
7454 Py_CLEAR(clear_module_state->__pyx_n_s_remap);
7455 Py_CLEAR(clear_module_state->__pyx_n_s_remove);
7456 Py_CLEAR(clear_module_state->__pyx_n_s_remove_header);
7457 Py_CLEAR(clear_module_state->__pyx_n_s_reopen);
7458 Py_CLEAR(clear_module_state->__pyx_n_s_reset);
7459 Py_CLEAR(clear_module_state->__pyx_n_s_ret);
7460 Py_CLEAR(clear_module_state->__pyx_n_s_reversed);
7461 Py_CLEAR(clear_module_state->__pyx_n_s_rid);
7462 Py_CLEAR(clear_module_state->__pyx_n_u_rwa);
7463 Py_CLEAR(clear_module_state->__pyx_n_s_sample);
7464 Py_CLEAR(clear_module_state->__pyx_kp_u_sample_must_not_be_None);
7465 Py_CLEAR(clear_module_state->__pyx_n_s_samples);
7466 Py_CLEAR(clear_module_state->__pyx_n_s_seek);
7467 Py_CLEAR(clear_module_state->__pyx_n_s_self);
7468 Py_CLEAR(clear_module_state->__pyx_kp_s_self_iter_cannot_be_converted_to);
7469 Py_CLEAR(clear_module_state->__pyx_kp_s_self_ptr_cannot_be_converted_to);
7470 Py_CLEAR(clear_module_state->__pyx_n_s_send);
7471 Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
7472 Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
7473 Py_CLEAR(clear_module_state->__pyx_n_s_spec);
7474 Py_CLEAR(clear_module_state->__pyx_n_s_split);
7475 Py_CLEAR(clear_module_state->__pyx_n_s_src_hdr);
7476 Py_CLEAR(clear_module_state->__pyx_n_s_start);
7477 Py_CLEAR(clear_module_state->__pyx_n_s_startswith);
7478 Py_CLEAR(clear_module_state->__pyx_n_s_state);
7479 Py_CLEAR(clear_module_state->__pyx_n_s_stop);
7480 Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
7481 Py_CLEAR(clear_module_state->__pyx_n_s_strip);
7482 Py_CLEAR(clear_module_state->__pyx_n_s_subset_samples);
7483 Py_CLEAR(clear_module_state->__pyx_n_s_sys);
7484 Py_CLEAR(clear_module_state->__pyx_kp_u_tabix_index_required);
7485 Py_CLEAR(clear_module_state->__pyx_n_s_tell);
7486 Py_CLEAR(clear_module_state->__pyx_n_s_test);
7487 Py_CLEAR(clear_module_state->__pyx_kp_u_this_class_cannot_be_instantiate);
7488 Py_CLEAR(clear_module_state->__pyx_n_s_threads);
7489 Py_CLEAR(clear_module_state->__pyx_n_s_throw);
7490 Py_CLEAR(clear_module_state->__pyx_n_s_tid);
7491 Py_CLEAR(clear_module_state->__pyx_n_s_tidx);
7492 Py_CLEAR(clear_module_state->__pyx_n_s_translate);
7493 Py_CLEAR(clear_module_state->__pyx_kp_u_truncated_file);
7494 Py_CLEAR(clear_module_state->__pyx_n_s_type);
7495 Py_CLEAR(clear_module_state->__pyx_kp_u_unable_to_allocate_BCF_record);
7496 Py_CLEAR(clear_module_state->__pyx_kp_u_unable_to_fetch);
7497 Py_CLEAR(clear_module_state->__pyx_kp_u_unable_to_fetch_next_record);
7498 Py_CLEAR(clear_module_state->__pyx_kp_u_unable_to_parse_next_record);
7499 Py_CLEAR(clear_module_state->__pyx_kp_u_unable_to_reallocate_VariantHead);
7500 Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_INFO);
7501 Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_format);
7502 Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_mode);
7503 Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_type_specified);
7504 Py_CLEAR(clear_module_state->__pyx_n_s_unquoted_str);
7505 Py_CLEAR(clear_module_state->__pyx_kp_u_unsupported_header_type_code);
7506 Py_CLEAR(clear_module_state->__pyx_kp_u_unsupported_info_type_code);
7507 Py_CLEAR(clear_module_state->__pyx_kp_u_unsupported_type);
7508 Py_CLEAR(clear_module_state->__pyx_kp_u_unsupported_types);
7509 Py_CLEAR(clear_module_state->__pyx_n_s_update);
7510 Py_CLEAR(clear_module_state->__pyx_n_s_upper);
7511 Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
7512 Py_CLEAR(clear_module_state->__pyx_kp_u_utf_8);
7513 Py_CLEAR(clear_module_state->__pyx_n_s_v);
7514 Py_CLEAR(clear_module_state->__pyx_n_s_value);
7515 Py_CLEAR(clear_module_state->__pyx_kp_u_value_expected_to_be_scalar_give);
7516 Py_CLEAR(clear_module_state->__pyx_n_s_values);
7517 Py_CLEAR(clear_module_state->__pyx_kp_u_values_expected_to_be_tuple_give);
7518 Py_CLEAR(clear_module_state->__pyx_n_s_vars);
7519 Py_CLEAR(clear_module_state->__pyx_kp_u_vcf_format_failed);
7520 Py_CLEAR(clear_module_state->__pyx_n_b_w);
7521 Py_CLEAR(clear_module_state->__pyx_n_u_w);
7522 Py_CLEAR(clear_module_state->__pyx_n_u_wb);
7523 Py_CLEAR(clear_module_state->__pyx_n_u_wb0);
7524 Py_CLEAR(clear_module_state->__pyx_n_u_wbu);
7525 Py_CLEAR(clear_module_state->__pyx_n_s_write);
7526 Py_CLEAR(clear_module_state->__pyx_n_u_wz);
7527 Py_CLEAR(clear_module_state->__pyx_int_0);
7528 Py_CLEAR(clear_module_state->__pyx_int_1);
7529 Py_CLEAR(clear_module_state->__pyx_int_2);
7530 Py_CLEAR(clear_module_state->__pyx_int_10091417);
7531 Py_CLEAR(clear_module_state->__pyx_int_10698032);
7532 Py_CLEAR(clear_module_state->__pyx_int_31479882);
7533 Py_CLEAR(clear_module_state->__pyx_int_33440904);
7534 Py_CLEAR(clear_module_state->__pyx_int_39264352);
7535 Py_CLEAR(clear_module_state->__pyx_int_41264896);
7536 Py_CLEAR(clear_module_state->__pyx_int_93650198);
7537 Py_CLEAR(clear_module_state->__pyx_int_94171383);
7538 Py_CLEAR(clear_module_state->__pyx_int_97976187);
7539 Py_CLEAR(clear_module_state->__pyx_int_118286449);
7540 Py_CLEAR(clear_module_state->__pyx_int_126454353);
7541 Py_CLEAR(clear_module_state->__pyx_int_135711299);
7542 Py_CLEAR(clear_module_state->__pyx_int_145625440);
7543 Py_CLEAR(clear_module_state->__pyx_int_164668780);
7544 Py_CLEAR(clear_module_state->__pyx_int_168021462);
7545 Py_CLEAR(clear_module_state->__pyx_int_199651019);
7546 Py_CLEAR(clear_module_state->__pyx_int_215036767);
7547 Py_CLEAR(clear_module_state->__pyx_int_227765731);
7548 Py_CLEAR(clear_module_state->__pyx_int_232881935);
7549 Py_CLEAR(clear_module_state->__pyx_int_248899179);
7550 Py_CLEAR(clear_module_state->__pyx_int_250317299);
7551 Py_CLEAR(clear_module_state->__pyx_int_4294967294);
7552 Py_CLEAR(clear_module_state->__pyx_int_neg_1);
7553 Py_CLEAR(clear_module_state->__pyx_k__41);
7554 Py_CLEAR(clear_module_state->__pyx_k__146);
7555 Py_CLEAR(clear_module_state->__pyx_k__158);
7556 Py_CLEAR(clear_module_state->__pyx_k__193);
7557 Py_CLEAR(clear_module_state->__pyx_k__206);
7558 Py_CLEAR(clear_module_state->__pyx_tuple_);
7559 Py_CLEAR(clear_module_state->__pyx_tuple__3);
7560 Py_CLEAR(clear_module_state->__pyx_tuple__4);
7561 Py_CLEAR(clear_module_state->__pyx_tuple__5);
7562 Py_CLEAR(clear_module_state->__pyx_tuple__6);
7563 Py_CLEAR(clear_module_state->__pyx_tuple__7);
7564 Py_CLEAR(clear_module_state->__pyx_tuple__8);
7565 Py_CLEAR(clear_module_state->__pyx_tuple__9);
7566 Py_CLEAR(clear_module_state->__pyx_tuple__10);
7567 Py_CLEAR(clear_module_state->__pyx_tuple__11);
7568 Py_CLEAR(clear_module_state->__pyx_tuple__13);
7569 Py_CLEAR(clear_module_state->__pyx_tuple__14);
7570 Py_CLEAR(clear_module_state->__pyx_tuple__15);
7571 Py_CLEAR(clear_module_state->__pyx_tuple__16);
7572 Py_CLEAR(clear_module_state->__pyx_tuple__17);
7573 Py_CLEAR(clear_module_state->__pyx_tuple__18);
7574 Py_CLEAR(clear_module_state->__pyx_tuple__19);
7575 Py_CLEAR(clear_module_state->__pyx_tuple__20);
7576 Py_CLEAR(clear_module_state->__pyx_tuple__21);
7577 Py_CLEAR(clear_module_state->__pyx_tuple__22);
7578 Py_CLEAR(clear_module_state->__pyx_tuple__23);
7579 Py_CLEAR(clear_module_state->__pyx_tuple__24);
7580 Py_CLEAR(clear_module_state->__pyx_tuple__25);
7581 Py_CLEAR(clear_module_state->__pyx_tuple__26);
7582 Py_CLEAR(clear_module_state->__pyx_tuple__27);
7583 Py_CLEAR(clear_module_state->__pyx_tuple__28);
7584 Py_CLEAR(clear_module_state->__pyx_tuple__29);
7585 Py_CLEAR(clear_module_state->__pyx_tuple__30);
7586 Py_CLEAR(clear_module_state->__pyx_tuple__31);
7587 Py_CLEAR(clear_module_state->__pyx_tuple__32);
7588 Py_CLEAR(clear_module_state->__pyx_tuple__43);
7589 Py_CLEAR(clear_module_state->__pyx_tuple__47);
7590 Py_CLEAR(clear_module_state->__pyx_tuple__48);
7591 Py_CLEAR(clear_module_state->__pyx_tuple__51);
7592 Py_CLEAR(clear_module_state->__pyx_tuple__57);
7593 Py_CLEAR(clear_module_state->__pyx_tuple__58);
7594 Py_CLEAR(clear_module_state->__pyx_tuple__60);
7595 Py_CLEAR(clear_module_state->__pyx_tuple__61);
7596 Py_CLEAR(clear_module_state->__pyx_tuple__76);
7597 Py_CLEAR(clear_module_state->__pyx_tuple__77);
7598 Py_CLEAR(clear_module_state->__pyx_tuple__88);
7599 Py_CLEAR(clear_module_state->__pyx_tuple__91);
7600 Py_CLEAR(clear_module_state->__pyx_tuple__95);
7601 Py_CLEAR(clear_module_state->__pyx_tuple__98);
7602 Py_CLEAR(clear_module_state->__pyx_slice__240);
7603 Py_CLEAR(clear_module_state->__pyx_tuple__100);
7604 Py_CLEAR(clear_module_state->__pyx_tuple__103);
7605 Py_CLEAR(clear_module_state->__pyx_tuple__105);
7606 Py_CLEAR(clear_module_state->__pyx_tuple__106);
7607 Py_CLEAR(clear_module_state->__pyx_tuple__111);
7608 Py_CLEAR(clear_module_state->__pyx_tuple__123);
7609 Py_CLEAR(clear_module_state->__pyx_tuple__124);
7610 Py_CLEAR(clear_module_state->__pyx_tuple__135);
7611 Py_CLEAR(clear_module_state->__pyx_tuple__136);
7612 Py_CLEAR(clear_module_state->__pyx_tuple__164);
7613 Py_CLEAR(clear_module_state->__pyx_tuple__165);
7614 Py_CLEAR(clear_module_state->__pyx_tuple__166);
7615 Py_CLEAR(clear_module_state->__pyx_tuple__167);
7616 Py_CLEAR(clear_module_state->__pyx_tuple__168);
7617 Py_CLEAR(clear_module_state->__pyx_tuple__169);
7618 Py_CLEAR(clear_module_state->__pyx_tuple__170);
7619 Py_CLEAR(clear_module_state->__pyx_tuple__171);
7620 Py_CLEAR(clear_module_state->__pyx_tuple__172);
7621 Py_CLEAR(clear_module_state->__pyx_tuple__173);
7622 Py_CLEAR(clear_module_state->__pyx_tuple__174);
7623 Py_CLEAR(clear_module_state->__pyx_tuple__175);
7624 Py_CLEAR(clear_module_state->__pyx_tuple__176);
7625 Py_CLEAR(clear_module_state->__pyx_tuple__177);
7626 Py_CLEAR(clear_module_state->__pyx_tuple__180);
7627 Py_CLEAR(clear_module_state->__pyx_tuple__182);
7628 Py_CLEAR(clear_module_state->__pyx_tuple__183);
7629 Py_CLEAR(clear_module_state->__pyx_tuple__197);
7630 Py_CLEAR(clear_module_state->__pyx_tuple__210);
7631 Py_CLEAR(clear_module_state->__pyx_tuple__219);
7632 Py_CLEAR(clear_module_state->__pyx_tuple__220);
7633 Py_CLEAR(clear_module_state->__pyx_tuple__221);
7634 Py_CLEAR(clear_module_state->__pyx_tuple__222);
7635 Py_CLEAR(clear_module_state->__pyx_tuple__223);
7636 Py_CLEAR(clear_module_state->__pyx_tuple__224);
7637 Py_CLEAR(clear_module_state->__pyx_tuple__227);
7638 Py_CLEAR(clear_module_state->__pyx_tuple__228);
7639 Py_CLEAR(clear_module_state->__pyx_tuple__232);
7640 Py_CLEAR(clear_module_state->__pyx_tuple__233);
7641 Py_CLEAR(clear_module_state->__pyx_tuple__234);
7642 Py_CLEAR(clear_module_state->__pyx_tuple__236);
7643 Py_CLEAR(clear_module_state->__pyx_tuple__238);
7644 Py_CLEAR(clear_module_state->__pyx_tuple__239);
7645 Py_CLEAR(clear_module_state->__pyx_tuple__242);
7646 Py_CLEAR(clear_module_state->__pyx_tuple__247);
7647 Py_CLEAR(clear_module_state->__pyx_tuple__249);
7648 Py_CLEAR(clear_module_state->__pyx_tuple__250);
7649 Py_CLEAR(clear_module_state->__pyx_tuple__253);
7650 Py_CLEAR(clear_module_state->__pyx_tuple__255);
7651 Py_CLEAR(clear_module_state->__pyx_tuple__256);
7652 Py_CLEAR(clear_module_state->__pyx_tuple__260);
7653 Py_CLEAR(clear_module_state->__pyx_tuple__262);
7654 Py_CLEAR(clear_module_state->__pyx_tuple__264);
7655 Py_CLEAR(clear_module_state->__pyx_tuple__266);
7656 Py_CLEAR(clear_module_state->__pyx_tuple__270);
7657 Py_CLEAR(clear_module_state->__pyx_tuple__275);
7658 Py_CLEAR(clear_module_state->__pyx_tuple__277);
7659 Py_CLEAR(clear_module_state->__pyx_tuple__279);
7660 Py_CLEAR(clear_module_state->__pyx_tuple__280);
7661 Py_CLEAR(clear_module_state->__pyx_tuple__281);
7662 Py_CLEAR(clear_module_state->__pyx_tuple__282);
7663 Py_CLEAR(clear_module_state->__pyx_tuple__283);
7664 Py_CLEAR(clear_module_state->__pyx_tuple__284);
7665 Py_CLEAR(clear_module_state->__pyx_tuple__285);
7666 Py_CLEAR(clear_module_state->__pyx_tuple__286);
7667 Py_CLEAR(clear_module_state->__pyx_tuple__287);
7668 Py_CLEAR(clear_module_state->__pyx_tuple__288);
7669 Py_CLEAR(clear_module_state->__pyx_tuple__289);
7670 Py_CLEAR(clear_module_state->__pyx_tuple__290);
7671 Py_CLEAR(clear_module_state->__pyx_tuple__291);
7672 Py_CLEAR(clear_module_state->__pyx_tuple__292);
7673 Py_CLEAR(clear_module_state->__pyx_tuple__293);
7674 Py_CLEAR(clear_module_state->__pyx_tuple__294);
7675 Py_CLEAR(clear_module_state->__pyx_tuple__295);
7676 Py_CLEAR(clear_module_state->__pyx_tuple__296);
7677 Py_CLEAR(clear_module_state->__pyx_tuple__297);
7678 Py_CLEAR(clear_module_state->__pyx_tuple__298);
7679 Py_CLEAR(clear_module_state->__pyx_tuple__299);
7680 Py_CLEAR(clear_module_state->__pyx_tuple__300);
7681 Py_CLEAR(clear_module_state->__pyx_tuple__301);
7682 Py_CLEAR(clear_module_state->__pyx_tuple__302);
7683 Py_CLEAR(clear_module_state->__pyx_tuple__303);
7684 Py_CLEAR(clear_module_state->__pyx_tuple__304);
7685 Py_CLEAR(clear_module_state->__pyx_tuple__305);
7686 Py_CLEAR(clear_module_state->__pyx_tuple__306);
7687 Py_CLEAR(clear_module_state->__pyx_tuple__307);
7688 Py_CLEAR(clear_module_state->__pyx_tuple__308);
7689 Py_CLEAR(clear_module_state->__pyx_tuple__309);
7690 Py_CLEAR(clear_module_state->__pyx_tuple__310);
7691 Py_CLEAR(clear_module_state->__pyx_tuple__311);
7692 Py_CLEAR(clear_module_state->__pyx_tuple__312);
7693 Py_CLEAR(clear_module_state->__pyx_tuple__313);
7694 Py_CLEAR(clear_module_state->__pyx_tuple__314);
7695 Py_CLEAR(clear_module_state->__pyx_tuple__315);
7696 Py_CLEAR(clear_module_state->__pyx_tuple__316);
7697 Py_CLEAR(clear_module_state->__pyx_tuple__317);
7698 Py_CLEAR(clear_module_state->__pyx_tuple__318);
7699 Py_CLEAR(clear_module_state->__pyx_tuple__319);
7700 Py_CLEAR(clear_module_state->__pyx_tuple__320);
7701 Py_CLEAR(clear_module_state->__pyx_tuple__321);
7702 Py_CLEAR(clear_module_state->__pyx_tuple__322);
7703 Py_CLEAR(clear_module_state->__pyx_tuple__324);
7704 Py_CLEAR(clear_module_state->__pyx_tuple__325);
7705 Py_CLEAR(clear_module_state->__pyx_tuple__326);
7706 Py_CLEAR(clear_module_state->__pyx_tuple__327);
7707 Py_CLEAR(clear_module_state->__pyx_tuple__328);
7708 Py_CLEAR(clear_module_state->__pyx_tuple__329);
7709 Py_CLEAR(clear_module_state->__pyx_codeobj__33);
7710 Py_CLEAR(clear_module_state->__pyx_codeobj__34);
7711 Py_CLEAR(clear_module_state->__pyx_codeobj__35);
7712 Py_CLEAR(clear_module_state->__pyx_codeobj__36);
7713 Py_CLEAR(clear_module_state->__pyx_codeobj__37);
7714 Py_CLEAR(clear_module_state->__pyx_codeobj__38);
7715 Py_CLEAR(clear_module_state->__pyx_codeobj__39);
7716 Py_CLEAR(clear_module_state->__pyx_codeobj__40);
7717 Py_CLEAR(clear_module_state->__pyx_codeobj__42);
7718 Py_CLEAR(clear_module_state->__pyx_codeobj__44);
7719 Py_CLEAR(clear_module_state->__pyx_codeobj__45);
7720 Py_CLEAR(clear_module_state->__pyx_codeobj__46);
7721 Py_CLEAR(clear_module_state->__pyx_codeobj__49);
7722 Py_CLEAR(clear_module_state->__pyx_codeobj__50);
7723 Py_CLEAR(clear_module_state->__pyx_codeobj__54);
7724 Py_CLEAR(clear_module_state->__pyx_codeobj__55);
7725 Py_CLEAR(clear_module_state->__pyx_codeobj__56);
7726 Py_CLEAR(clear_module_state->__pyx_codeobj__59);
7727 Py_CLEAR(clear_module_state->__pyx_codeobj__62);
7728 Py_CLEAR(clear_module_state->__pyx_codeobj__63);
7729 Py_CLEAR(clear_module_state->__pyx_codeobj__64);
7730 Py_CLEAR(clear_module_state->__pyx_codeobj__65);
7731 Py_CLEAR(clear_module_state->__pyx_codeobj__66);
7732 Py_CLEAR(clear_module_state->__pyx_codeobj__67);
7733 Py_CLEAR(clear_module_state->__pyx_codeobj__68);
7734 Py_CLEAR(clear_module_state->__pyx_codeobj__69);
7735 Py_CLEAR(clear_module_state->__pyx_codeobj__70);
7736 Py_CLEAR(clear_module_state->__pyx_codeobj__71);
7737 Py_CLEAR(clear_module_state->__pyx_codeobj__72);
7738 Py_CLEAR(clear_module_state->__pyx_codeobj__73);
7739 Py_CLEAR(clear_module_state->__pyx_codeobj__74);
7740 Py_CLEAR(clear_module_state->__pyx_codeobj__75);
7741 Py_CLEAR(clear_module_state->__pyx_codeobj__78);
7742 Py_CLEAR(clear_module_state->__pyx_codeobj__79);
7743 Py_CLEAR(clear_module_state->__pyx_codeobj__80);
7744 Py_CLEAR(clear_module_state->__pyx_codeobj__81);
7745 Py_CLEAR(clear_module_state->__pyx_codeobj__82);
7746 Py_CLEAR(clear_module_state->__pyx_codeobj__83);
7747 Py_CLEAR(clear_module_state->__pyx_codeobj__84);
7748 Py_CLEAR(clear_module_state->__pyx_codeobj__85);
7749 Py_CLEAR(clear_module_state->__pyx_codeobj__86);
7750 Py_CLEAR(clear_module_state->__pyx_codeobj__87);
7751 Py_CLEAR(clear_module_state->__pyx_codeobj__89);
7752 Py_CLEAR(clear_module_state->__pyx_codeobj__90);
7753 Py_CLEAR(clear_module_state->__pyx_codeobj__92);
7754 Py_CLEAR(clear_module_state->__pyx_codeobj__93);
7755 Py_CLEAR(clear_module_state->__pyx_codeobj__94);
7756 Py_CLEAR(clear_module_state->__pyx_codeobj__96);
7757 Py_CLEAR(clear_module_state->__pyx_codeobj__97);
7758 Py_CLEAR(clear_module_state->__pyx_codeobj__99);
7759 Py_CLEAR(clear_module_state->__pyx_codeobj__101);
7760 Py_CLEAR(clear_module_state->__pyx_codeobj__102);
7761 Py_CLEAR(clear_module_state->__pyx_codeobj__104);
7762 Py_CLEAR(clear_module_state->__pyx_codeobj__107);
7763 Py_CLEAR(clear_module_state->__pyx_codeobj__108);
7764 Py_CLEAR(clear_module_state->__pyx_codeobj__109);
7765 Py_CLEAR(clear_module_state->__pyx_codeobj__110);
7766 Py_CLEAR(clear_module_state->__pyx_codeobj__112);
7767 Py_CLEAR(clear_module_state->__pyx_codeobj__113);
7768 Py_CLEAR(clear_module_state->__pyx_codeobj__114);
7769 Py_CLEAR(clear_module_state->__pyx_codeobj__115);
7770 Py_CLEAR(clear_module_state->__pyx_codeobj__116);
7771 Py_CLEAR(clear_module_state->__pyx_codeobj__117);
7772 Py_CLEAR(clear_module_state->__pyx_codeobj__118);
7773 Py_CLEAR(clear_module_state->__pyx_codeobj__119);
7774 Py_CLEAR(clear_module_state->__pyx_codeobj__120);
7775 Py_CLEAR(clear_module_state->__pyx_codeobj__121);
7776 Py_CLEAR(clear_module_state->__pyx_codeobj__122);
7777 Py_CLEAR(clear_module_state->__pyx_codeobj__125);
7778 Py_CLEAR(clear_module_state->__pyx_codeobj__126);
7779 Py_CLEAR(clear_module_state->__pyx_codeobj__127);
7780 Py_CLEAR(clear_module_state->__pyx_codeobj__128);
7781 Py_CLEAR(clear_module_state->__pyx_codeobj__129);
7782 Py_CLEAR(clear_module_state->__pyx_codeobj__130);
7783 Py_CLEAR(clear_module_state->__pyx_codeobj__131);
7784 Py_CLEAR(clear_module_state->__pyx_codeobj__132);
7785 Py_CLEAR(clear_module_state->__pyx_codeobj__133);
7786 Py_CLEAR(clear_module_state->__pyx_codeobj__134);
7787 Py_CLEAR(clear_module_state->__pyx_codeobj__137);
7788 Py_CLEAR(clear_module_state->__pyx_codeobj__138);
7789 Py_CLEAR(clear_module_state->__pyx_codeobj__139);
7790 Py_CLEAR(clear_module_state->__pyx_codeobj__140);
7791 Py_CLEAR(clear_module_state->__pyx_codeobj__141);
7792 Py_CLEAR(clear_module_state->__pyx_codeobj__142);
7793 Py_CLEAR(clear_module_state->__pyx_codeobj__143);
7794 Py_CLEAR(clear_module_state->__pyx_codeobj__144);
7795 Py_CLEAR(clear_module_state->__pyx_codeobj__145);
7796 Py_CLEAR(clear_module_state->__pyx_codeobj__147);
7797 Py_CLEAR(clear_module_state->__pyx_codeobj__148);
7798 Py_CLEAR(clear_module_state->__pyx_codeobj__149);
7799 Py_CLEAR(clear_module_state->__pyx_codeobj__150);
7800 Py_CLEAR(clear_module_state->__pyx_codeobj__151);
7801 Py_CLEAR(clear_module_state->__pyx_codeobj__152);
7802 Py_CLEAR(clear_module_state->__pyx_codeobj__153);
7803 Py_CLEAR(clear_module_state->__pyx_codeobj__154);
7804 Py_CLEAR(clear_module_state->__pyx_codeobj__155);
7805 Py_CLEAR(clear_module_state->__pyx_codeobj__156);
7806 Py_CLEAR(clear_module_state->__pyx_codeobj__157);
7807 Py_CLEAR(clear_module_state->__pyx_codeobj__159);
7808 Py_CLEAR(clear_module_state->__pyx_codeobj__160);
7809 Py_CLEAR(clear_module_state->__pyx_codeobj__161);
7810 Py_CLEAR(clear_module_state->__pyx_codeobj__162);
7811 Py_CLEAR(clear_module_state->__pyx_codeobj__163);
7812 Py_CLEAR(clear_module_state->__pyx_codeobj__178);
7813 Py_CLEAR(clear_module_state->__pyx_codeobj__179);
7814 Py_CLEAR(clear_module_state->__pyx_codeobj__184);
7815 Py_CLEAR(clear_module_state->__pyx_codeobj__185);
7816 Py_CLEAR(clear_module_state->__pyx_codeobj__186);
7817 Py_CLEAR(clear_module_state->__pyx_codeobj__187);
7818 Py_CLEAR(clear_module_state->__pyx_codeobj__188);
7819 Py_CLEAR(clear_module_state->__pyx_codeobj__189);
7820 Py_CLEAR(clear_module_state->__pyx_codeobj__190);
7821 Py_CLEAR(clear_module_state->__pyx_codeobj__191);
7822 Py_CLEAR(clear_module_state->__pyx_codeobj__192);
7823 Py_CLEAR(clear_module_state->__pyx_codeobj__194);
7824 Py_CLEAR(clear_module_state->__pyx_codeobj__195);
7825 Py_CLEAR(clear_module_state->__pyx_codeobj__196);
7826 Py_CLEAR(clear_module_state->__pyx_codeobj__198);
7827 Py_CLEAR(clear_module_state->__pyx_codeobj__199);
7828 Py_CLEAR(clear_module_state->__pyx_codeobj__200);
7829 Py_CLEAR(clear_module_state->__pyx_codeobj__201);
7830 Py_CLEAR(clear_module_state->__pyx_codeobj__202);
7831 Py_CLEAR(clear_module_state->__pyx_codeobj__203);
7832 Py_CLEAR(clear_module_state->__pyx_codeobj__204);
7833 Py_CLEAR(clear_module_state->__pyx_codeobj__205);
7834 Py_CLEAR(clear_module_state->__pyx_codeobj__207);
7835 Py_CLEAR(clear_module_state->__pyx_codeobj__208);
7836 Py_CLEAR(clear_module_state->__pyx_codeobj__209);
7837 Py_CLEAR(clear_module_state->__pyx_codeobj__211);
7838 Py_CLEAR(clear_module_state->__pyx_codeobj__212);
7839 Py_CLEAR(clear_module_state->__pyx_codeobj__213);
7840 Py_CLEAR(clear_module_state->__pyx_codeobj__214);
7841 Py_CLEAR(clear_module_state->__pyx_codeobj__215);
7842 Py_CLEAR(clear_module_state->__pyx_codeobj__216);
7843 Py_CLEAR(clear_module_state->__pyx_codeobj__217);
7844 Py_CLEAR(clear_module_state->__pyx_codeobj__218);
7845 Py_CLEAR(clear_module_state->__pyx_codeobj__225);
7846 Py_CLEAR(clear_module_state->__pyx_codeobj__226);
7847 Py_CLEAR(clear_module_state->__pyx_codeobj__229);
7848 Py_CLEAR(clear_module_state->__pyx_codeobj__230);
7849 Py_CLEAR(clear_module_state->__pyx_codeobj__231);
7850 Py_CLEAR(clear_module_state->__pyx_codeobj__235);
7851 Py_CLEAR(clear_module_state->__pyx_codeobj__237);
7852 Py_CLEAR(clear_module_state->__pyx_codeobj__243);
7853 Py_CLEAR(clear_module_state->__pyx_codeobj__244);
7854 Py_CLEAR(clear_module_state->__pyx_codeobj__245);
7855 Py_CLEAR(clear_module_state->__pyx_codeobj__246);
7856 Py_CLEAR(clear_module_state->__pyx_codeobj__248);
7857 Py_CLEAR(clear_module_state->__pyx_codeobj__251);
7858 Py_CLEAR(clear_module_state->__pyx_codeobj__252);
7859 Py_CLEAR(clear_module_state->__pyx_codeobj__254);
7860 Py_CLEAR(clear_module_state->__pyx_codeobj__257);
7861 Py_CLEAR(clear_module_state->__pyx_codeobj__258);
7862 Py_CLEAR(clear_module_state->__pyx_codeobj__259);
7863 Py_CLEAR(clear_module_state->__pyx_codeobj__261);
7864 Py_CLEAR(clear_module_state->__pyx_codeobj__263);
7865 Py_CLEAR(clear_module_state->__pyx_codeobj__265);
7866 Py_CLEAR(clear_module_state->__pyx_codeobj__267);
7867 Py_CLEAR(clear_module_state->__pyx_codeobj__268);
7868 Py_CLEAR(clear_module_state->__pyx_codeobj__269);
7869 Py_CLEAR(clear_module_state->__pyx_codeobj__271);
7870 Py_CLEAR(clear_module_state->__pyx_codeobj__272);
7871 Py_CLEAR(clear_module_state->__pyx_codeobj__273);
7872 Py_CLEAR(clear_module_state->__pyx_codeobj__274);
7873 Py_CLEAR(clear_module_state->__pyx_codeobj__276);
7874 return 0;
7875 }
7876 #endif
7877 /* #### Code section: module_state_traverse ### */
7878 #if CYTHON_USE_MODULE_STATE
7879 static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
7880 __pyx_mstate *traverse_module_state = __pyx_mstate(m);
7881 if (!traverse_module_state) return 0;
7882 Py_VISIT(traverse_module_state->__pyx_d);
7883 Py_VISIT(traverse_module_state->__pyx_b);
7884 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
7885 Py_VISIT(traverse_module_state->__pyx_empty_tuple);
7886 Py_VISIT(traverse_module_state->__pyx_empty_bytes);
7887 Py_VISIT(traverse_module_state->__pyx_empty_unicode);
7888 #ifdef __Pyx_CyFunction_USED
7889 Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
7890 #endif
7891 #ifdef __Pyx_FusedFunction_USED
7892 Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
7893 #endif
7894 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile);
7895 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
7896 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
7897 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
7898 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_5array_array);
7899 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeader);
7900 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantHeader);
7901 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
7902 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderRecord);
7903 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords);
7904 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderRecords);
7905 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
7906 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderContigs);
7907 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples);
7908 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderSamples);
7909 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantContig);
7910 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantContig);
7911 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantMetadata);
7912 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantMetadata);
7913 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
7914 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantHeaderMetadata);
7915 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecord);
7916 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantRecord);
7917 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
7918 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordFilter);
7919 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
7920 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordFormat);
7921 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
7922 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordInfo);
7923 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
7924 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordSamples);
7925 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
7926 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantRecordSample);
7927 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_BaseIndex);
7928 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_BaseIndex);
7929 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_BCFIndex);
7930 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_BCFIndex);
7931 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_TabixIndex);
7932 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_TabixIndex);
7933 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_BaseIterator);
7934 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_BaseIterator);
7935 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_BCFIterator);
7936 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_BCFIterator);
7937 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_TabixIterator);
7938 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_TabixIterator);
7939 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf_VariantFile);
7940 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf_VariantFile);
7941 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple);
7942 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple);
7943 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr);
7944 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr);
7945 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr);
7946 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr);
7947 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr);
7948 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr);
7949 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr);
7950 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr);
7951 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__);
7952 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get__);
7953 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr);
7954 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr);
7955 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__);
7956 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter__);
7957 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues);
7958 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues);
7959 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems);
7960 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems);
7961 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__);
7962 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter__);
7963 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__);
7964 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter__);
7965 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues);
7966 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues);
7967 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems);
7968 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems);
7969 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__);
7970 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter__);
7971 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues);
7972 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues);
7973 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems);
7974 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems);
7975 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__);
7976 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter__);
7977 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__);
7978 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter__);
7979 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues);
7980 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues);
7981 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems);
7982 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems);
7983 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__);
7984 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter__);
7985 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues);
7986 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues);
7987 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems);
7988 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems);
7989 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__);
7990 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter__);
7991 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues);
7992 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues);
7993 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems);
7994 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems);
7995 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__);
7996 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter__);
7997 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues);
7998 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues);
7999 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems);
8000 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems);
8001 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__);
8002 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set__);
8003 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr);
8004 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr);
8005 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr);
8006 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr);
8007 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__);
8008 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter__);
8009 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues);
8010 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues);
8011 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems);
8012 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems);
8013 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues);
8014 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues);
8015 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems);
8016 Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems);
8017 Py_VISIT(traverse_module_state->__pyx_n_u_A);
8018 Py_VISIT(traverse_module_state->__pyx_n_u_ALT);
8019 Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
8020 Py_VISIT(traverse_module_state->__pyx_n_s_BCFIndex);
8021 Py_VISIT(traverse_module_state->__pyx_n_u_BCFIndex);
8022 Py_VISIT(traverse_module_state->__pyx_n_s_BCFIndex___reduce_cython);
8023 Py_VISIT(traverse_module_state->__pyx_n_s_BCFIndex___setstate_cython);
8024 Py_VISIT(traverse_module_state->__pyx_n_s_BCFIndex_fetch);
8025 Py_VISIT(traverse_module_state->__pyx_n_s_BCFIterator);
8026 Py_VISIT(traverse_module_state->__pyx_n_u_BCFIterator);
8027 Py_VISIT(traverse_module_state->__pyx_n_s_BCFIterator___reduce_cython);
8028 Py_VISIT(traverse_module_state->__pyx_n_s_BCFIterator___setstate_cython);
8029 Py_VISIT(traverse_module_state->__pyx_n_u_BND);
8030 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex);
8031 Py_VISIT(traverse_module_state->__pyx_n_u_BaseIndex);
8032 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex___reduce_cython);
8033 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex___setstate_cython);
8034 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_get);
8035 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_items);
8036 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_iteritems);
8037 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_iterkeys);
8038 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_itervalues);
8039 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_keys);
8040 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_pop);
8041 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_update);
8042 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIndex_values);
8043 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIterator);
8044 Py_VISIT(traverse_module_state->__pyx_n_u_BaseIterator);
8045 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIterator___reduce_cython);
8046 Py_VISIT(traverse_module_state->__pyx_n_s_BaseIterator___setstate_cython);
8047 Py_VISIT(traverse_module_state->__pyx_n_u_CONTIG);
8048 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_add_extra_threads_when_ig);
8049 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_copy_arrays_with_src_valu);
8050 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_create_empty_array);
8051 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_re_open_htsfile);
8052 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_set_phased_before_genotyp);
8053 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_specify_an_index_filename);
8054 Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_translate_record_Number_o);
8055 Py_VISIT(traverse_module_state->__pyx_n_u_Description);
8056 Py_VISIT(traverse_module_state->__pyx_kp_u_Duplicated_sample_name);
8057 Py_VISIT(traverse_module_state->__pyx_n_b_END);
8058 Py_VISIT(traverse_module_state->__pyx_n_u_END);
8059 Py_VISIT(traverse_module_state->__pyx_kp_u_END_is_a_reserved_attribute_acce);
8060 Py_VISIT(traverse_module_state->__pyx_kp_u_Error_extracting_ID);
8061 Py_VISIT(traverse_module_state->__pyx_kp_u_Error_s_reading_record);
8062 Py_VISIT(traverse_module_state->__pyx_kp_u_Error_unpacking_VariantRecord);
8063 Py_VISIT(traverse_module_state->__pyx_kp_u_Error_updating_alleles);
8064 Py_VISIT(traverse_module_state->__pyx_kp_u_Error_updating_id);
8065 Py_VISIT(traverse_module_state->__pyx_n_u_FILTER);
8066 Py_VISIT(traverse_module_state->__pyx_n_u_FIXED);
8067 Py_VISIT(traverse_module_state->__pyx_n_u_FORMAT);
8068 Py_VISIT(traverse_module_state->__pyx_n_u_Flag);
8069 Py_VISIT(traverse_module_state->__pyx_kp_u_Flag_types_are_not_allowed_on_FO);
8070 Py_VISIT(traverse_module_state->__pyx_kp_u_Flag_values_must_be_True_False_N);
8071 Py_VISIT(traverse_module_state->__pyx_n_u_Float);
8072 Py_VISIT(traverse_module_state->__pyx_n_u_G);
8073 Py_VISIT(traverse_module_state->__pyx_n_u_GENERIC);
8074 Py_VISIT(traverse_module_state->__pyx_n_u_GT);
8075 Py_VISIT(traverse_module_state->__pyx_kp_u_Header_already_exists_for_contig);
8076 Py_VISIT(traverse_module_state->__pyx_kp_u_Header_already_exists_for_id);
8077 Py_VISIT(traverse_module_state->__pyx_n_u_ID);
8078 Py_VISIT(traverse_module_state->__pyx_n_u_INDEL);
8079 Py_VISIT(traverse_module_state->__pyx_n_u_INFO);
8080 Py_VISIT(traverse_module_state->__pyx_n_s_IOError);
8081 Py_VISIT(traverse_module_state->__pyx_kp_u_I_O_operation_on_closed_file);
8082 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
8083 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2);
8084 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3);
8085 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4);
8086 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5);
8087 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6);
8088 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7);
8089 Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
8090 Py_VISIT(traverse_module_state->__pyx_n_u_Integer);
8091 Py_VISIT(traverse_module_state->__pyx_kp_u_Integer_value_too_small_large_to);
8092 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_INFO_field);
8093 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_VariantRecord_Number_of);
8094 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_allele_index);
8095 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_chromosome_contig);
8096 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_filter);
8097 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_header);
8098 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_header_id);
8099 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_header_record_index);
8100 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_index_object);
8101 Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_tid);
8102 Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
8103 Py_VISIT(traverse_module_state->__pyx_n_u_MNP);
8104 Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
8105 Py_VISIT(traverse_module_state->__pyx_kp_u_NON_REF);
8106 Py_VISIT(traverse_module_state->__pyx_n_s_NotImplemented);
8107 Py_VISIT(traverse_module_state->__pyx_n_u_Number);
8108 Py_VISIT(traverse_module_state->__pyx_kp_u_Number_must_be_None_when_adding);
8109 Py_VISIT(traverse_module_state->__pyx_n_u_OTHER);
8110 Py_VISIT(traverse_module_state->__pyx_n_u_OVERLAP);
8111 Py_VISIT(traverse_module_state->__pyx_kp_u_One_or_more_of_the_supplied_samp);
8112 Py_VISIT(traverse_module_state->__pyx_n_u_PASS);
8113 Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
8114 Py_VISIT(traverse_module_state->__pyx_kp_u_Position_must_be_positive);
8115 Py_VISIT(traverse_module_state->__pyx_n_u_R);
8116 Py_VISIT(traverse_module_state->__pyx_n_u_REF);
8117 Py_VISIT(traverse_module_state->__pyx_n_u_SNP);
8118 Py_VISIT(traverse_module_state->__pyx_n_u_STRUCTURED);
8119 Py_VISIT(traverse_module_state->__pyx_kp_u_Start_coordinate_must_be_non_neg);
8120 Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration);
8121 Py_VISIT(traverse_module_state->__pyx_kp_u_Stop_coordinate_must_be_non_nega);
8122 Py_VISIT(traverse_module_state->__pyx_kp_u_Stop_position_of_the_interval);
8123 Py_VISIT(traverse_module_state->__pyx_n_u_String);
8124 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIndex);
8125 Py_VISIT(traverse_module_state->__pyx_n_u_TabixIndex);
8126 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIndex___reduce_cython);
8127 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIndex___setstate_cython);
8128 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIndex_fetch);
8129 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator);
8130 Py_VISIT(traverse_module_state->__pyx_n_u_TabixIterator);
8131 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator___reduce_cython);
8132 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator___setstate_cython);
8133 Py_VISIT(traverse_module_state->__pyx_n_u_Type);
8134 Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
8135 Py_VISIT(traverse_module_state->__pyx_kp_u_Type_must_be_None_when_adding_a);
8136 Py_VISIT(traverse_module_state->__pyx_kp_u_Unable_to_delete_END);
8137 Py_VISIT(traverse_module_state->__pyx_kp_u_Unable_to_delete_FORMAT);
8138 Py_VISIT(traverse_module_state->__pyx_kp_u_Unable_to_delete_INFO);
8139 Py_VISIT(traverse_module_state->__pyx_kp_u_Unable_to_update_INFO_values);
8140 Py_VISIT(traverse_module_state->__pyx_kp_u_Unable_to_update_format_values);
8141 Py_VISIT(traverse_module_state->__pyx_kp_u_Unknown_INFO_field);
8142 Py_VISIT(traverse_module_state->__pyx_kp_u_Unknown_allele);
8143 Py_VISIT(traverse_module_state->__pyx_kp_u_Unknown_format_length);
8144 Py_VISIT(traverse_module_state->__pyx_kp_u_Unsupported_FORMAT_type);
8145 Py_VISIT(traverse_module_state->__pyx_kp_u_Unsupported_INFO_type);
8146 Py_VISIT(traverse_module_state->__pyx_kp_u_Use_allele_indices_to_set_intege);
8147 Py_VISIT(traverse_module_state->__pyx_n_u_VARIABLE);
8148 Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
8149 Py_VISIT(traverse_module_state->__pyx_n_s_VariantContig);
8150 Py_VISIT(traverse_module_state->__pyx_n_u_VariantContig);
8151 Py_VISIT(traverse_module_state->__pyx_n_s_VariantContig___reduce_cython);
8152 Py_VISIT(traverse_module_state->__pyx_n_s_VariantContig___setstate_cython);
8153 Py_VISIT(traverse_module_state->__pyx_n_s_VariantContig_remove_header);
8154 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile);
8155 Py_VISIT(traverse_module_state->__pyx_n_u_VariantFile);
8156 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile___reduce_cython);
8157 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile___setstate_cython);
8158 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_close);
8159 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_copy);
8160 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_fetch);
8161 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_get_reference_name);
8162 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_get_tid);
8163 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_is_valid_tid);
8164 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_new_record);
8165 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_open);
8166 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_reset);
8167 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_subset_samples);
8168 Py_VISIT(traverse_module_state->__pyx_n_s_VariantFile_write);
8169 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader);
8170 Py_VISIT(traverse_module_state->__pyx_n_u_VariantHeader);
8171 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs);
8172 Py_VISIT(traverse_module_state->__pyx_n_u_VariantHeaderContigs);
8173 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs___iter);
8174 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs___reduce_cy);
8175 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs___setstate);
8176 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_add);
8177 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_clear_heade);
8178 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_get);
8179 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_items);
8180 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_iteritems);
8181 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_iterkeys);
8182 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_itervalues);
8183 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_keys);
8184 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_remove_head);
8185 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderContigs_values);
8186 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata);
8187 Py_VISIT(traverse_module_state->__pyx_n_u_VariantHeaderMetadata);
8188 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata___iter);
8189 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata___reduce_c);
8190 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata___setstate);
8191 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_add);
8192 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_clear_head);
8193 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_get);
8194 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_items);
8195 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_iteritems);
8196 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_iterkeys);
8197 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_itervalues);
8198 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_keys);
8199 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_remove_hea);
8200 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderMetadata_values);
8201 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord);
8202 Py_VISIT(traverse_module_state->__pyx_n_u_VariantHeaderRecord);
8203 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord___get___loca);
8204 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord___iter);
8205 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord___reduce_cyt);
8206 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord___setstate_c);
8207 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_get);
8208 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_items);
8209 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_iteritems);
8210 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_iterkeys);
8211 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_itervalues);
8212 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_keys);
8213 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_pop);
8214 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_remove);
8215 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_update);
8216 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecord_values);
8217 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecords);
8218 Py_VISIT(traverse_module_state->__pyx_n_u_VariantHeaderRecords);
8219 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecords___iter);
8220 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecords___reduce_cy);
8221 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderRecords___setstate);
8222 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderSamples);
8223 Py_VISIT(traverse_module_state->__pyx_n_u_VariantHeaderSamples);
8224 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderSamples___iter);
8225 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderSamples___reduce_cy);
8226 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderSamples___setstate);
8227 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeaderSamples_add);
8228 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader___reduce_cython);
8229 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader___setstate_cython);
8230 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader_add_line);
8231 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader_add_meta);
8232 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader_add_record);
8233 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader_add_sample);
8234 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader_add_samples);
8235 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader_copy);
8236 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader_merge);
8237 Py_VISIT(traverse_module_state->__pyx_n_s_VariantHeader_new_record);
8238 Py_VISIT(traverse_module_state->__pyx_n_s_VariantMetadata);
8239 Py_VISIT(traverse_module_state->__pyx_n_u_VariantMetadata);
8240 Py_VISIT(traverse_module_state->__pyx_n_s_VariantMetadata___reduce_cython);
8241 Py_VISIT(traverse_module_state->__pyx_n_s_VariantMetadata___setstate_cytho);
8242 Py_VISIT(traverse_module_state->__pyx_n_s_VariantMetadata_remove_header);
8243 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecord);
8244 Py_VISIT(traverse_module_state->__pyx_n_u_VariantRecord);
8245 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter);
8246 Py_VISIT(traverse_module_state->__pyx_n_u_VariantRecordFilter);
8247 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter___iter);
8248 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter___reduce_cyt);
8249 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter___setstate_c);
8250 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_add);
8251 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_clear);
8252 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_get);
8253 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_items);
8254 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_iteritems);
8255 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_iterkeys);
8256 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_itervalues);
8257 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_keys);
8258 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFilter_values);
8259 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat);
8260 Py_VISIT(traverse_module_state->__pyx_n_u_VariantRecordFormat);
8261 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat___iter);
8262 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat___reduce_cyt);
8263 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat___setstate_c);
8264 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat_clear);
8265 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat_get);
8266 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat_items);
8267 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat_iteritems);
8268 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat_iterkeys);
8269 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat_itervalues);
8270 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat_keys);
8271 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordFormat_values);
8272 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo);
8273 Py_VISIT(traverse_module_state->__pyx_n_u_VariantRecordInfo);
8274 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo___iter);
8275 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo___reduce_cytho);
8276 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo___setstate_cyt);
8277 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_clear);
8278 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_get);
8279 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_items);
8280 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_iteritems);
8281 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_iterkeys);
8282 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_itervalues);
8283 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_keys);
8284 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_pop);
8285 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_update);
8286 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordInfo_values);
8287 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample);
8288 Py_VISIT(traverse_module_state->__pyx_n_u_VariantRecordSample);
8289 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample___iter);
8290 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample___reduce_cyt);
8291 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample___set___loca);
8292 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample___setstate_c);
8293 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_clear);
8294 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_get);
8295 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_items);
8296 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_iteritems);
8297 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_iterkeys);
8298 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_itervalues);
8299 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_keys);
8300 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_pop);
8301 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_update);
8302 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSample_values);
8303 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples);
8304 Py_VISIT(traverse_module_state->__pyx_n_u_VariantRecordSamples);
8305 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples___iter);
8306 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples___reduce_cy);
8307 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples___setstate);
8308 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_get);
8309 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_items);
8310 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_iteritems);
8311 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_iterkeys);
8312 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_itervalues);
8313 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_keys);
8314 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_pop);
8315 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_update);
8316 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecordSamples_values);
8317 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecord___reduce_cython);
8318 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecord___setstate_cython);
8319 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecord_copy);
8320 Py_VISIT(traverse_module_state->__pyx_n_s_VariantRecord_translate);
8321 Py_VISIT(traverse_module_state->__pyx_kp_b__12);
8322 Py_VISIT(traverse_module_state->__pyx_kp_u__12);
8323 Py_VISIT(traverse_module_state->__pyx_kp_u__181);
8324 Py_VISIT(traverse_module_state->__pyx_kp_b__2);
8325 Py_VISIT(traverse_module_state->__pyx_kp_u__2);
8326 Py_VISIT(traverse_module_state->__pyx_kp_b__241);
8327 Py_VISIT(traverse_module_state->__pyx_n_s__278);
8328 Py_VISIT(traverse_module_state->__pyx_n_s__323);
8329 Py_VISIT(traverse_module_state->__pyx_n_s__330);
8330 Py_VISIT(traverse_module_state->__pyx_kp_b__52);
8331 Py_VISIT(traverse_module_state->__pyx_kp_u__52);
8332 Py_VISIT(traverse_module_state->__pyx_kp_u__53);
8333 Py_VISIT(traverse_module_state->__pyx_n_s_add);
8334 Py_VISIT(traverse_module_state->__pyx_n_s_add_line);
8335 Py_VISIT(traverse_module_state->__pyx_n_s_add_meta);
8336 Py_VISIT(traverse_module_state->__pyx_n_s_add_record);
8337 Py_VISIT(traverse_module_state->__pyx_n_s_add_sample);
8338 Py_VISIT(traverse_module_state->__pyx_n_s_add_samples);
8339 Py_VISIT(traverse_module_state->__pyx_n_s_all);
8340 Py_VISIT(traverse_module_state->__pyx_n_s_alleles);
8341 Py_VISIT(traverse_module_state->__pyx_n_s_append);
8342 Py_VISIT(traverse_module_state->__pyx_n_s_arg);
8343 Py_VISIT(traverse_module_state->__pyx_n_s_args);
8344 Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
8345 Py_VISIT(traverse_module_state->__pyx_n_s_bcf);
8346 Py_VISIT(traverse_module_state->__pyx_kp_u_bcf_2);
8347 Py_VISIT(traverse_module_state->__pyx_n_s_bcf_array_to_object_locals_genex);
8348 Py_VISIT(traverse_module_state->__pyx_n_s_bcf_check_values_locals_genexpr);
8349 Py_VISIT(traverse_module_state->__pyx_kp_u_bcf_hdr_format_failed);
8350 Py_VISIT(traverse_module_state->__pyx_kp_u_bcf_hdr_set_samples_failed_ret);
8351 Py_VISIT(traverse_module_state->__pyx_kp_u_bcf_index_required);
8352 Py_VISIT(traverse_module_state->__pyx_kp_u_bcf_must_not_be_None);
8353 Py_VISIT(traverse_module_state->__pyx_n_s_bcf_object_to_array_locals_genex);
8354 Py_VISIT(traverse_module_state->__pyx_n_u_bcguz);
8355 Py_VISIT(traverse_module_state->__pyx_n_u_bcguz0123456789ex);
8356 Py_VISIT(traverse_module_state->__pyx_n_s_bgzfp);
8357 Py_VISIT(traverse_module_state->__pyx_n_s_bkey);
8358 Py_VISIT(traverse_module_state->__pyx_n_s_bline);
8359 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_convert_deleted_record_to);
8360 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_create_VariantHeader);
8361 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_create_VariantRecord);
8362 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_create_VariantRecordSampl);
8363 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_fetch_from_Variantfile_op);
8364 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_find_metadata_key);
8365 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_iterate_over_Variantfile);
8366 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_set_null_allele);
8367 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_set_null_alt_allele);
8368 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_subset_samples_after_fetc);
8369 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_subset_samples_from_Varia);
8370 Py_VISIT(traverse_module_state->__pyx_kp_u_cannot_write_to_a_Variantfile_op);
8371 Py_VISIT(traverse_module_state->__pyx_n_s_cfilename);
8372 Py_VISIT(traverse_module_state->__pyx_n_s_char_array_to_tuple_locals_genex);
8373 Py_VISIT(traverse_module_state->__pyx_n_s_check_truncation);
8374 Py_VISIT(traverse_module_state->__pyx_n_s_chr);
8375 Py_VISIT(traverse_module_state->__pyx_n_s_cindex_filename);
8376 Py_VISIT(traverse_module_state->__pyx_n_s_ckey);
8377 Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
8378 Py_VISIT(traverse_module_state->__pyx_n_s_clear);
8379 Py_VISIT(traverse_module_state->__pyx_n_s_clear_header);
8380 Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
8381 Py_VISIT(traverse_module_state->__pyx_n_s_close);
8382 Py_VISIT(traverse_module_state->__pyx_n_s_cmode);
8383 Py_VISIT(traverse_module_state->__pyx_n_s_contig);
8384 Py_VISIT(traverse_module_state->__pyx_n_u_contig);
8385 Py_VISIT(traverse_module_state->__pyx_kp_u_contig_must_be_specified);
8386 Py_VISIT(traverse_module_state->__pyx_n_s_copy);
8387 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_file_mode);
8388 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_variant_file);
8389 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_variant_file_2);
8390 Py_VISIT(traverse_module_state->__pyx_n_s_d);
8391 Py_VISIT(traverse_module_state->__pyx_n_s_default);
8392 Py_VISIT(traverse_module_state->__pyx_n_s_description);
8393 Py_VISIT(traverse_module_state->__pyx_n_s_dict);
8394 Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
8395 Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
8396 Py_VISIT(traverse_module_state->__pyx_n_s_drop_samples);
8397 Py_VISIT(traverse_module_state->__pyx_n_s_dst_hdr);
8398 Py_VISIT(traverse_module_state->__pyx_n_s_dst_header);
8399 Py_VISIT(traverse_module_state->__pyx_kp_u_dst_header_must_not_be_None);
8400 Py_VISIT(traverse_module_state->__pyx_n_s_duplicate_filehandle);
8401 Py_VISIT(traverse_module_state->__pyx_kp_u_either_value_or_items_must_be_sp);
8402 Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
8403 Py_VISIT(traverse_module_state->__pyx_n_s_end);
8404 Py_VISIT(traverse_module_state->__pyx_n_s_endswith);
8405 Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
8406 Py_VISIT(traverse_module_state->__pyx_kp_u_error_in_bcf_subset_format);
8407 Py_VISIT(traverse_module_state->__pyx_kp_u_error_in_vcf_parse);
8408 Py_VISIT(traverse_module_state->__pyx_n_s_f);
8409 Py_VISIT(traverse_module_state->__pyx_n_s_fetch);
8410 Py_VISIT(traverse_module_state->__pyx_kp_u_fetch_requires_an_index);
8411 Py_VISIT(traverse_module_state->__pyx_kp_u_file_does_not_have_valid_header);
8412 Py_VISIT(traverse_module_state->__pyx_n_s_filename);
8413 Py_VISIT(traverse_module_state->__pyx_n_s_filter);
8414 Py_VISIT(traverse_module_state->__pyx_n_s_fmt);
8415 Py_VISIT(traverse_module_state->__pyx_n_s_format);
8416 Py_VISIT(traverse_module_state->__pyx_n_s_format_modes);
8417 Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
8418 Py_VISIT(traverse_module_state->__pyx_n_s_genexpr);
8419 Py_VISIT(traverse_module_state->__pyx_kp_u_genotype_is_only_valid_as_a_form);
8420 Py_VISIT(traverse_module_state->__pyx_n_s_get);
8421 Py_VISIT(traverse_module_state->__pyx_n_s_get_reference_name);
8422 Py_VISIT(traverse_module_state->__pyx_n_s_get_tid);
8423 Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
8424 Py_VISIT(traverse_module_state->__pyx_kp_u_gz);
8425 Py_VISIT(traverse_module_state->__pyx_n_s_hash);
8426 Py_VISIT(traverse_module_state->__pyx_n_s_hdr);
8427 Py_VISIT(traverse_module_state->__pyx_n_s_header);
8428 Py_VISIT(traverse_module_state->__pyx_kp_u_header_must_not_be_None);
8429 Py_VISIT(traverse_module_state->__pyx_n_s_hrec);
8430 Py_VISIT(traverse_module_state->__pyx_n_s_i);
8431 Py_VISIT(traverse_module_state->__pyx_n_s_id);
8432 Py_VISIT(traverse_module_state->__pyx_n_s_idx);
8433 Py_VISIT(traverse_module_state->__pyx_n_s_ignore_truncation);
8434 Py_VISIT(traverse_module_state->__pyx_n_s_import);
8435 Py_VISIT(traverse_module_state->__pyx_n_s_include_samples);
8436 Py_VISIT(traverse_module_state->__pyx_n_s_index);
8437 Py_VISIT(traverse_module_state->__pyx_n_s_index_filename);
8438 Py_VISIT(traverse_module_state->__pyx_n_s_info);
8439 Py_VISIT(traverse_module_state->__pyx_n_s_info_id);
8440 Py_VISIT(traverse_module_state->__pyx_n_s_init);
8441 Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
8442 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_FORMAT);
8443 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_VariantHeader);
8444 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_VariantRecord);
8445 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_character_found);
8446 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_contig);
8447 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_contig_2);
8448 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_contig_id);
8449 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_contig_index);
8450 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_file_mode_is_it_VCF_BCF);
8451 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_filter_index);
8452 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_header_line);
8453 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_header_record_index);
8454 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_key);
8455 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_metadata_id);
8456 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_metadata_type);
8457 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_mode_options);
8458 Py_VISIT(traverse_module_state->__pyx_n_s_invalid_modes);
8459 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_number_of_columns);
8460 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_reference_id);
8461 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_sample_index);
8462 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_sample_name);
8463 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_tag);
8464 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_value_for_Float_format);
8465 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_value_for_Integer_format);
8466 Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
8467 Py_VISIT(traverse_module_state->__pyx_n_s_is_open);
8468 Py_VISIT(traverse_module_state->__pyx_n_s_is_valid_tid);
8469 Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
8470 Py_VISIT(traverse_module_state->__pyx_n_s_items);
8471 Py_VISIT(traverse_module_state->__pyx_n_s_iter);
8472 Py_VISIT(traverse_module_state->__pyx_n_s_iteritems);
8473 Py_VISIT(traverse_module_state->__pyx_n_s_iterkeys);
8474 Py_VISIT(traverse_module_state->__pyx_n_s_itervalues);
8475 Py_VISIT(traverse_module_state->__pyx_n_s_join);
8476 Py_VISIT(traverse_module_state->__pyx_n_s_k);
8477 Py_VISIT(traverse_module_state->__pyx_n_s_key);
8478 Py_VISIT(traverse_module_state->__pyx_n_s_keys);
8479 Py_VISIT(traverse_module_state->__pyx_n_s_kwargs);
8480 Py_VISIT(traverse_module_state->__pyx_n_s_length);
8481 Py_VISIT(traverse_module_state->__pyx_n_u_length);
8482 Py_VISIT(traverse_module_state->__pyx_kp_u_limits_violated);
8483 Py_VISIT(traverse_module_state->__pyx_n_s_line);
8484 Py_VISIT(traverse_module_state->__pyx_n_s_m);
8485 Py_VISIT(traverse_module_state->__pyx_n_s_main);
8486 Py_VISIT(traverse_module_state->__pyx_n_s_merge);
8487 Py_VISIT(traverse_module_state->__pyx_kp_u_missing_d_requested_samples);
8488 Py_VISIT(traverse_module_state->__pyx_n_s_mode);
8489 Py_VISIT(traverse_module_state->__pyx_kp_u_mode_contains_conflicting_format);
8490 Py_VISIT(traverse_module_state->__pyx_kp_u_mode_must_begin_with_r_w_or_a);
8491 Py_VISIT(traverse_module_state->__pyx_n_s_msg);
8492 Py_VISIT(traverse_module_state->__pyx_kp_u_must_set_at_least_2_alleles);
8493 Py_VISIT(traverse_module_state->__pyx_n_s_n);
8494 Py_VISIT(traverse_module_state->__pyx_n_s_name);
8495 Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
8496 Py_VISIT(traverse_module_state->__pyx_n_s_new);
8497 Py_VISIT(traverse_module_state->__pyx_n_s_new_record);
8498 Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
8499 Py_VISIT(traverse_module_state->__pyx_n_s_number);
8500 Py_VISIT(traverse_module_state->__pyx_n_s_object);
8501 Py_VISIT(traverse_module_state->__pyx_n_s_open);
8502 Py_VISIT(traverse_module_state->__pyx_n_s_os);
8503 Py_VISIT(traverse_module_state->__pyx_n_s_parse_region);
8504 Py_VISIT(traverse_module_state->__pyx_n_s_phased);
8505 Py_VISIT(traverse_module_state->__pyx_n_u_phased);
8506 Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
8507 Py_VISIT(traverse_module_state->__pyx_n_s_pop);
8508 Py_VISIT(traverse_module_state->__pyx_n_s_pysam_libcbcf);
8509 Py_VISIT(traverse_module_state->__pyx_kp_s_pysam_libcbcf_pyx);
8510 Py_VISIT(traverse_module_state->__pyx_n_s_pysam_utils);
8511 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
8512 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
8513 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
8514 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
8515 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
8516 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_BaseIndex);
8517 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantContig);
8518 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantHeaderCont);
8519 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantHeaderMeta);
8520 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantHeaderReco);
8521 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantHeaderSamp);
8522 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantMetadata);
8523 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantRecordFilt);
8524 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantRecordForm);
8525 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantRecordInfo);
8526 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantRecordSamp);
8527 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_VariantRecordSamp_2);
8528 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
8529 Py_VISIT(traverse_module_state->__pyx_n_s_qual);
8530 Py_VISIT(traverse_module_state->__pyx_n_s_quoted);
8531 Py_VISIT(traverse_module_state->__pyx_n_b_r);
8532 Py_VISIT(traverse_module_state->__pyx_n_s_r);
8533 Py_VISIT(traverse_module_state->__pyx_n_u_r);
8534 Py_VISIT(traverse_module_state->__pyx_n_s_range);
8535 Py_VISIT(traverse_module_state->__pyx_n_s_rec);
8536 Py_VISIT(traverse_module_state->__pyx_n_s_record);
8537 Py_VISIT(traverse_module_state->__pyx_kp_u_record_must_not_be_None);
8538 Py_VISIT(traverse_module_state->__pyx_n_s_records);
8539 Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
8540 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
8541 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
8542 Py_VISIT(traverse_module_state->__pyx_n_s_ref);
8543 Py_VISIT(traverse_module_state->__pyx_kp_u_ref_allele_must_not_be_null);
8544 Py_VISIT(traverse_module_state->__pyx_n_s_reference);
8545 Py_VISIT(traverse_module_state->__pyx_n_s_region);
8546 Py_VISIT(traverse_module_state->__pyx_n_s_remap);
8547 Py_VISIT(traverse_module_state->__pyx_n_s_remove);
8548 Py_VISIT(traverse_module_state->__pyx_n_s_remove_header);
8549 Py_VISIT(traverse_module_state->__pyx_n_s_reopen);
8550 Py_VISIT(traverse_module_state->__pyx_n_s_reset);
8551 Py_VISIT(traverse_module_state->__pyx_n_s_ret);
8552 Py_VISIT(traverse_module_state->__pyx_n_s_reversed);
8553 Py_VISIT(traverse_module_state->__pyx_n_s_rid);
8554 Py_VISIT(traverse_module_state->__pyx_n_u_rwa);
8555 Py_VISIT(traverse_module_state->__pyx_n_s_sample);
8556 Py_VISIT(traverse_module_state->__pyx_kp_u_sample_must_not_be_None);
8557 Py_VISIT(traverse_module_state->__pyx_n_s_samples);
8558 Py_VISIT(traverse_module_state->__pyx_n_s_seek);
8559 Py_VISIT(traverse_module_state->__pyx_n_s_self);
8560 Py_VISIT(traverse_module_state->__pyx_kp_s_self_iter_cannot_be_converted_to);
8561 Py_VISIT(traverse_module_state->__pyx_kp_s_self_ptr_cannot_be_converted_to);
8562 Py_VISIT(traverse_module_state->__pyx_n_s_send);
8563 Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
8564 Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
8565 Py_VISIT(traverse_module_state->__pyx_n_s_spec);
8566 Py_VISIT(traverse_module_state->__pyx_n_s_split);
8567 Py_VISIT(traverse_module_state->__pyx_n_s_src_hdr);
8568 Py_VISIT(traverse_module_state->__pyx_n_s_start);
8569 Py_VISIT(traverse_module_state->__pyx_n_s_startswith);
8570 Py_VISIT(traverse_module_state->__pyx_n_s_state);
8571 Py_VISIT(traverse_module_state->__pyx_n_s_stop);
8572 Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
8573 Py_VISIT(traverse_module_state->__pyx_n_s_strip);
8574 Py_VISIT(traverse_module_state->__pyx_n_s_subset_samples);
8575 Py_VISIT(traverse_module_state->__pyx_n_s_sys);
8576 Py_VISIT(traverse_module_state->__pyx_kp_u_tabix_index_required);
8577 Py_VISIT(traverse_module_state->__pyx_n_s_tell);
8578 Py_VISIT(traverse_module_state->__pyx_n_s_test);
8579 Py_VISIT(traverse_module_state->__pyx_kp_u_this_class_cannot_be_instantiate);
8580 Py_VISIT(traverse_module_state->__pyx_n_s_threads);
8581 Py_VISIT(traverse_module_state->__pyx_n_s_throw);
8582 Py_VISIT(traverse_module_state->__pyx_n_s_tid);
8583 Py_VISIT(traverse_module_state->__pyx_n_s_tidx);
8584 Py_VISIT(traverse_module_state->__pyx_n_s_translate);
8585 Py_VISIT(traverse_module_state->__pyx_kp_u_truncated_file);
8586 Py_VISIT(traverse_module_state->__pyx_n_s_type);
8587 Py_VISIT(traverse_module_state->__pyx_kp_u_unable_to_allocate_BCF_record);
8588 Py_VISIT(traverse_module_state->__pyx_kp_u_unable_to_fetch);
8589 Py_VISIT(traverse_module_state->__pyx_kp_u_unable_to_fetch_next_record);
8590 Py_VISIT(traverse_module_state->__pyx_kp_u_unable_to_parse_next_record);
8591 Py_VISIT(traverse_module_state->__pyx_kp_u_unable_to_reallocate_VariantHead);
8592 Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_INFO);
8593 Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_format);
8594 Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_mode);
8595 Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_type_specified);
8596 Py_VISIT(traverse_module_state->__pyx_n_s_unquoted_str);
8597 Py_VISIT(traverse_module_state->__pyx_kp_u_unsupported_header_type_code);
8598 Py_VISIT(traverse_module_state->__pyx_kp_u_unsupported_info_type_code);
8599 Py_VISIT(traverse_module_state->__pyx_kp_u_unsupported_type);
8600 Py_VISIT(traverse_module_state->__pyx_kp_u_unsupported_types);
8601 Py_VISIT(traverse_module_state->__pyx_n_s_update);
8602 Py_VISIT(traverse_module_state->__pyx_n_s_upper);
8603 Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
8604 Py_VISIT(traverse_module_state->__pyx_kp_u_utf_8);
8605 Py_VISIT(traverse_module_state->__pyx_n_s_v);
8606 Py_VISIT(traverse_module_state->__pyx_n_s_value);
8607 Py_VISIT(traverse_module_state->__pyx_kp_u_value_expected_to_be_scalar_give);
8608 Py_VISIT(traverse_module_state->__pyx_n_s_values);
8609 Py_VISIT(traverse_module_state->__pyx_kp_u_values_expected_to_be_tuple_give);
8610 Py_VISIT(traverse_module_state->__pyx_n_s_vars);
8611 Py_VISIT(traverse_module_state->__pyx_kp_u_vcf_format_failed);
8612 Py_VISIT(traverse_module_state->__pyx_n_b_w);
8613 Py_VISIT(traverse_module_state->__pyx_n_u_w);
8614 Py_VISIT(traverse_module_state->__pyx_n_u_wb);
8615 Py_VISIT(traverse_module_state->__pyx_n_u_wb0);
8616 Py_VISIT(traverse_module_state->__pyx_n_u_wbu);
8617 Py_VISIT(traverse_module_state->__pyx_n_s_write);
8618 Py_VISIT(traverse_module_state->__pyx_n_u_wz);
8619 Py_VISIT(traverse_module_state->__pyx_int_0);
8620 Py_VISIT(traverse_module_state->__pyx_int_1);
8621 Py_VISIT(traverse_module_state->__pyx_int_2);
8622 Py_VISIT(traverse_module_state->__pyx_int_10091417);
8623 Py_VISIT(traverse_module_state->__pyx_int_10698032);
8624 Py_VISIT(traverse_module_state->__pyx_int_31479882);
8625 Py_VISIT(traverse_module_state->__pyx_int_33440904);
8626 Py_VISIT(traverse_module_state->__pyx_int_39264352);
8627 Py_VISIT(traverse_module_state->__pyx_int_41264896);
8628 Py_VISIT(traverse_module_state->__pyx_int_93650198);
8629 Py_VISIT(traverse_module_state->__pyx_int_94171383);
8630 Py_VISIT(traverse_module_state->__pyx_int_97976187);
8631 Py_VISIT(traverse_module_state->__pyx_int_118286449);
8632 Py_VISIT(traverse_module_state->__pyx_int_126454353);
8633 Py_VISIT(traverse_module_state->__pyx_int_135711299);
8634 Py_VISIT(traverse_module_state->__pyx_int_145625440);
8635 Py_VISIT(traverse_module_state->__pyx_int_164668780);
8636 Py_VISIT(traverse_module_state->__pyx_int_168021462);
8637 Py_VISIT(traverse_module_state->__pyx_int_199651019);
8638 Py_VISIT(traverse_module_state->__pyx_int_215036767);
8639 Py_VISIT(traverse_module_state->__pyx_int_227765731);
8640 Py_VISIT(traverse_module_state->__pyx_int_232881935);
8641 Py_VISIT(traverse_module_state->__pyx_int_248899179);
8642 Py_VISIT(traverse_module_state->__pyx_int_250317299);
8643 Py_VISIT(traverse_module_state->__pyx_int_4294967294);
8644 Py_VISIT(traverse_module_state->__pyx_int_neg_1);
8645 Py_VISIT(traverse_module_state->__pyx_k__41);
8646 Py_VISIT(traverse_module_state->__pyx_k__146);
8647 Py_VISIT(traverse_module_state->__pyx_k__158);
8648 Py_VISIT(traverse_module_state->__pyx_k__193);
8649 Py_VISIT(traverse_module_state->__pyx_k__206);
8650 Py_VISIT(traverse_module_state->__pyx_tuple_);
8651 Py_VISIT(traverse_module_state->__pyx_tuple__3);
8652 Py_VISIT(traverse_module_state->__pyx_tuple__4);
8653 Py_VISIT(traverse_module_state->__pyx_tuple__5);
8654 Py_VISIT(traverse_module_state->__pyx_tuple__6);
8655 Py_VISIT(traverse_module_state->__pyx_tuple__7);
8656 Py_VISIT(traverse_module_state->__pyx_tuple__8);
8657 Py_VISIT(traverse_module_state->__pyx_tuple__9);
8658 Py_VISIT(traverse_module_state->__pyx_tuple__10);
8659 Py_VISIT(traverse_module_state->__pyx_tuple__11);
8660 Py_VISIT(traverse_module_state->__pyx_tuple__13);
8661 Py_VISIT(traverse_module_state->__pyx_tuple__14);
8662 Py_VISIT(traverse_module_state->__pyx_tuple__15);
8663 Py_VISIT(traverse_module_state->__pyx_tuple__16);
8664 Py_VISIT(traverse_module_state->__pyx_tuple__17);
8665 Py_VISIT(traverse_module_state->__pyx_tuple__18);
8666 Py_VISIT(traverse_module_state->__pyx_tuple__19);
8667 Py_VISIT(traverse_module_state->__pyx_tuple__20);
8668 Py_VISIT(traverse_module_state->__pyx_tuple__21);
8669 Py_VISIT(traverse_module_state->__pyx_tuple__22);
8670 Py_VISIT(traverse_module_state->__pyx_tuple__23);
8671 Py_VISIT(traverse_module_state->__pyx_tuple__24);
8672 Py_VISIT(traverse_module_state->__pyx_tuple__25);
8673 Py_VISIT(traverse_module_state->__pyx_tuple__26);
8674 Py_VISIT(traverse_module_state->__pyx_tuple__27);
8675 Py_VISIT(traverse_module_state->__pyx_tuple__28);
8676 Py_VISIT(traverse_module_state->__pyx_tuple__29);
8677 Py_VISIT(traverse_module_state->__pyx_tuple__30);
8678 Py_VISIT(traverse_module_state->__pyx_tuple__31);
8679 Py_VISIT(traverse_module_state->__pyx_tuple__32);
8680 Py_VISIT(traverse_module_state->__pyx_tuple__43);
8681 Py_VISIT(traverse_module_state->__pyx_tuple__47);
8682 Py_VISIT(traverse_module_state->__pyx_tuple__48);
8683 Py_VISIT(traverse_module_state->__pyx_tuple__51);
8684 Py_VISIT(traverse_module_state->__pyx_tuple__57);
8685 Py_VISIT(traverse_module_state->__pyx_tuple__58);
8686 Py_VISIT(traverse_module_state->__pyx_tuple__60);
8687 Py_VISIT(traverse_module_state->__pyx_tuple__61);
8688 Py_VISIT(traverse_module_state->__pyx_tuple__76);
8689 Py_VISIT(traverse_module_state->__pyx_tuple__77);
8690 Py_VISIT(traverse_module_state->__pyx_tuple__88);
8691 Py_VISIT(traverse_module_state->__pyx_tuple__91);
8692 Py_VISIT(traverse_module_state->__pyx_tuple__95);
8693 Py_VISIT(traverse_module_state->__pyx_tuple__98);
8694 Py_VISIT(traverse_module_state->__pyx_slice__240);
8695 Py_VISIT(traverse_module_state->__pyx_tuple__100);
8696 Py_VISIT(traverse_module_state->__pyx_tuple__103);
8697 Py_VISIT(traverse_module_state->__pyx_tuple__105);
8698 Py_VISIT(traverse_module_state->__pyx_tuple__106);
8699 Py_VISIT(traverse_module_state->__pyx_tuple__111);
8700 Py_VISIT(traverse_module_state->__pyx_tuple__123);
8701 Py_VISIT(traverse_module_state->__pyx_tuple__124);
8702 Py_VISIT(traverse_module_state->__pyx_tuple__135);
8703 Py_VISIT(traverse_module_state->__pyx_tuple__136);
8704 Py_VISIT(traverse_module_state->__pyx_tuple__164);
8705 Py_VISIT(traverse_module_state->__pyx_tuple__165);
8706 Py_VISIT(traverse_module_state->__pyx_tuple__166);
8707 Py_VISIT(traverse_module_state->__pyx_tuple__167);
8708 Py_VISIT(traverse_module_state->__pyx_tuple__168);
8709 Py_VISIT(traverse_module_state->__pyx_tuple__169);
8710 Py_VISIT(traverse_module_state->__pyx_tuple__170);
8711 Py_VISIT(traverse_module_state->__pyx_tuple__171);
8712 Py_VISIT(traverse_module_state->__pyx_tuple__172);
8713 Py_VISIT(traverse_module_state->__pyx_tuple__173);
8714 Py_VISIT(traverse_module_state->__pyx_tuple__174);
8715 Py_VISIT(traverse_module_state->__pyx_tuple__175);
8716 Py_VISIT(traverse_module_state->__pyx_tuple__176);
8717 Py_VISIT(traverse_module_state->__pyx_tuple__177);
8718 Py_VISIT(traverse_module_state->__pyx_tuple__180);
8719 Py_VISIT(traverse_module_state->__pyx_tuple__182);
8720 Py_VISIT(traverse_module_state->__pyx_tuple__183);
8721 Py_VISIT(traverse_module_state->__pyx_tuple__197);
8722 Py_VISIT(traverse_module_state->__pyx_tuple__210);
8723 Py_VISIT(traverse_module_state->__pyx_tuple__219);
8724 Py_VISIT(traverse_module_state->__pyx_tuple__220);
8725 Py_VISIT(traverse_module_state->__pyx_tuple__221);
8726 Py_VISIT(traverse_module_state->__pyx_tuple__222);
8727 Py_VISIT(traverse_module_state->__pyx_tuple__223);
8728 Py_VISIT(traverse_module_state->__pyx_tuple__224);
8729 Py_VISIT(traverse_module_state->__pyx_tuple__227);
8730 Py_VISIT(traverse_module_state->__pyx_tuple__228);
8731 Py_VISIT(traverse_module_state->__pyx_tuple__232);
8732 Py_VISIT(traverse_module_state->__pyx_tuple__233);
8733 Py_VISIT(traverse_module_state->__pyx_tuple__234);
8734 Py_VISIT(traverse_module_state->__pyx_tuple__236);
8735 Py_VISIT(traverse_module_state->__pyx_tuple__238);
8736 Py_VISIT(traverse_module_state->__pyx_tuple__239);
8737 Py_VISIT(traverse_module_state->__pyx_tuple__242);
8738 Py_VISIT(traverse_module_state->__pyx_tuple__247);
8739 Py_VISIT(traverse_module_state->__pyx_tuple__249);
8740 Py_VISIT(traverse_module_state->__pyx_tuple__250);
8741 Py_VISIT(traverse_module_state->__pyx_tuple__253);
8742 Py_VISIT(traverse_module_state->__pyx_tuple__255);
8743 Py_VISIT(traverse_module_state->__pyx_tuple__256);
8744 Py_VISIT(traverse_module_state->__pyx_tuple__260);
8745 Py_VISIT(traverse_module_state->__pyx_tuple__262);
8746 Py_VISIT(traverse_module_state->__pyx_tuple__264);
8747 Py_VISIT(traverse_module_state->__pyx_tuple__266);
8748 Py_VISIT(traverse_module_state->__pyx_tuple__270);
8749 Py_VISIT(traverse_module_state->__pyx_tuple__275);
8750 Py_VISIT(traverse_module_state->__pyx_tuple__277);
8751 Py_VISIT(traverse_module_state->__pyx_tuple__279);
8752 Py_VISIT(traverse_module_state->__pyx_tuple__280);
8753 Py_VISIT(traverse_module_state->__pyx_tuple__281);
8754 Py_VISIT(traverse_module_state->__pyx_tuple__282);
8755 Py_VISIT(traverse_module_state->__pyx_tuple__283);
8756 Py_VISIT(traverse_module_state->__pyx_tuple__284);
8757 Py_VISIT(traverse_module_state->__pyx_tuple__285);
8758 Py_VISIT(traverse_module_state->__pyx_tuple__286);
8759 Py_VISIT(traverse_module_state->__pyx_tuple__287);
8760 Py_VISIT(traverse_module_state->__pyx_tuple__288);
8761 Py_VISIT(traverse_module_state->__pyx_tuple__289);
8762 Py_VISIT(traverse_module_state->__pyx_tuple__290);
8763 Py_VISIT(traverse_module_state->__pyx_tuple__291);
8764 Py_VISIT(traverse_module_state->__pyx_tuple__292);
8765 Py_VISIT(traverse_module_state->__pyx_tuple__293);
8766 Py_VISIT(traverse_module_state->__pyx_tuple__294);
8767 Py_VISIT(traverse_module_state->__pyx_tuple__295);
8768 Py_VISIT(traverse_module_state->__pyx_tuple__296);
8769 Py_VISIT(traverse_module_state->__pyx_tuple__297);
8770 Py_VISIT(traverse_module_state->__pyx_tuple__298);
8771 Py_VISIT(traverse_module_state->__pyx_tuple__299);
8772 Py_VISIT(traverse_module_state->__pyx_tuple__300);
8773 Py_VISIT(traverse_module_state->__pyx_tuple__301);
8774 Py_VISIT(traverse_module_state->__pyx_tuple__302);
8775 Py_VISIT(traverse_module_state->__pyx_tuple__303);
8776 Py_VISIT(traverse_module_state->__pyx_tuple__304);
8777 Py_VISIT(traverse_module_state->__pyx_tuple__305);
8778 Py_VISIT(traverse_module_state->__pyx_tuple__306);
8779 Py_VISIT(traverse_module_state->__pyx_tuple__307);
8780 Py_VISIT(traverse_module_state->__pyx_tuple__308);
8781 Py_VISIT(traverse_module_state->__pyx_tuple__309);
8782 Py_VISIT(traverse_module_state->__pyx_tuple__310);
8783 Py_VISIT(traverse_module_state->__pyx_tuple__311);
8784 Py_VISIT(traverse_module_state->__pyx_tuple__312);
8785 Py_VISIT(traverse_module_state->__pyx_tuple__313);
8786 Py_VISIT(traverse_module_state->__pyx_tuple__314);
8787 Py_VISIT(traverse_module_state->__pyx_tuple__315);
8788 Py_VISIT(traverse_module_state->__pyx_tuple__316);
8789 Py_VISIT(traverse_module_state->__pyx_tuple__317);
8790 Py_VISIT(traverse_module_state->__pyx_tuple__318);
8791 Py_VISIT(traverse_module_state->__pyx_tuple__319);
8792 Py_VISIT(traverse_module_state->__pyx_tuple__320);
8793 Py_VISIT(traverse_module_state->__pyx_tuple__321);
8794 Py_VISIT(traverse_module_state->__pyx_tuple__322);
8795 Py_VISIT(traverse_module_state->__pyx_tuple__324);
8796 Py_VISIT(traverse_module_state->__pyx_tuple__325);
8797 Py_VISIT(traverse_module_state->__pyx_tuple__326);
8798 Py_VISIT(traverse_module_state->__pyx_tuple__327);
8799 Py_VISIT(traverse_module_state->__pyx_tuple__328);
8800 Py_VISIT(traverse_module_state->__pyx_tuple__329);
8801 Py_VISIT(traverse_module_state->__pyx_codeobj__33);
8802 Py_VISIT(traverse_module_state->__pyx_codeobj__34);
8803 Py_VISIT(traverse_module_state->__pyx_codeobj__35);
8804 Py_VISIT(traverse_module_state->__pyx_codeobj__36);
8805 Py_VISIT(traverse_module_state->__pyx_codeobj__37);
8806 Py_VISIT(traverse_module_state->__pyx_codeobj__38);
8807 Py_VISIT(traverse_module_state->__pyx_codeobj__39);
8808 Py_VISIT(traverse_module_state->__pyx_codeobj__40);
8809 Py_VISIT(traverse_module_state->__pyx_codeobj__42);
8810 Py_VISIT(traverse_module_state->__pyx_codeobj__44);
8811 Py_VISIT(traverse_module_state->__pyx_codeobj__45);
8812 Py_VISIT(traverse_module_state->__pyx_codeobj__46);
8813 Py_VISIT(traverse_module_state->__pyx_codeobj__49);
8814 Py_VISIT(traverse_module_state->__pyx_codeobj__50);
8815 Py_VISIT(traverse_module_state->__pyx_codeobj__54);
8816 Py_VISIT(traverse_module_state->__pyx_codeobj__55);
8817 Py_VISIT(traverse_module_state->__pyx_codeobj__56);
8818 Py_VISIT(traverse_module_state->__pyx_codeobj__59);
8819 Py_VISIT(traverse_module_state->__pyx_codeobj__62);
8820 Py_VISIT(traverse_module_state->__pyx_codeobj__63);
8821 Py_VISIT(traverse_module_state->__pyx_codeobj__64);
8822 Py_VISIT(traverse_module_state->__pyx_codeobj__65);
8823 Py_VISIT(traverse_module_state->__pyx_codeobj__66);
8824 Py_VISIT(traverse_module_state->__pyx_codeobj__67);
8825 Py_VISIT(traverse_module_state->__pyx_codeobj__68);
8826 Py_VISIT(traverse_module_state->__pyx_codeobj__69);
8827 Py_VISIT(traverse_module_state->__pyx_codeobj__70);
8828 Py_VISIT(traverse_module_state->__pyx_codeobj__71);
8829 Py_VISIT(traverse_module_state->__pyx_codeobj__72);
8830 Py_VISIT(traverse_module_state->__pyx_codeobj__73);
8831 Py_VISIT(traverse_module_state->__pyx_codeobj__74);
8832 Py_VISIT(traverse_module_state->__pyx_codeobj__75);
8833 Py_VISIT(traverse_module_state->__pyx_codeobj__78);
8834 Py_VISIT(traverse_module_state->__pyx_codeobj__79);
8835 Py_VISIT(traverse_module_state->__pyx_codeobj__80);
8836 Py_VISIT(traverse_module_state->__pyx_codeobj__81);
8837 Py_VISIT(traverse_module_state->__pyx_codeobj__82);
8838 Py_VISIT(traverse_module_state->__pyx_codeobj__83);
8839 Py_VISIT(traverse_module_state->__pyx_codeobj__84);
8840 Py_VISIT(traverse_module_state->__pyx_codeobj__85);
8841 Py_VISIT(traverse_module_state->__pyx_codeobj__86);
8842 Py_VISIT(traverse_module_state->__pyx_codeobj__87);
8843 Py_VISIT(traverse_module_state->__pyx_codeobj__89);
8844 Py_VISIT(traverse_module_state->__pyx_codeobj__90);
8845 Py_VISIT(traverse_module_state->__pyx_codeobj__92);
8846 Py_VISIT(traverse_module_state->__pyx_codeobj__93);
8847 Py_VISIT(traverse_module_state->__pyx_codeobj__94);
8848 Py_VISIT(traverse_module_state->__pyx_codeobj__96);
8849 Py_VISIT(traverse_module_state->__pyx_codeobj__97);
8850 Py_VISIT(traverse_module_state->__pyx_codeobj__99);
8851 Py_VISIT(traverse_module_state->__pyx_codeobj__101);
8852 Py_VISIT(traverse_module_state->__pyx_codeobj__102);
8853 Py_VISIT(traverse_module_state->__pyx_codeobj__104);
8854 Py_VISIT(traverse_module_state->__pyx_codeobj__107);
8855 Py_VISIT(traverse_module_state->__pyx_codeobj__108);
8856 Py_VISIT(traverse_module_state->__pyx_codeobj__109);
8857 Py_VISIT(traverse_module_state->__pyx_codeobj__110);
8858 Py_VISIT(traverse_module_state->__pyx_codeobj__112);
8859 Py_VISIT(traverse_module_state->__pyx_codeobj__113);
8860 Py_VISIT(traverse_module_state->__pyx_codeobj__114);
8861 Py_VISIT(traverse_module_state->__pyx_codeobj__115);
8862 Py_VISIT(traverse_module_state->__pyx_codeobj__116);
8863 Py_VISIT(traverse_module_state->__pyx_codeobj__117);
8864 Py_VISIT(traverse_module_state->__pyx_codeobj__118);
8865 Py_VISIT(traverse_module_state->__pyx_codeobj__119);
8866 Py_VISIT(traverse_module_state->__pyx_codeobj__120);
8867 Py_VISIT(traverse_module_state->__pyx_codeobj__121);
8868 Py_VISIT(traverse_module_state->__pyx_codeobj__122);
8869 Py_VISIT(traverse_module_state->__pyx_codeobj__125);
8870 Py_VISIT(traverse_module_state->__pyx_codeobj__126);
8871 Py_VISIT(traverse_module_state->__pyx_codeobj__127);
8872 Py_VISIT(traverse_module_state->__pyx_codeobj__128);
8873 Py_VISIT(traverse_module_state->__pyx_codeobj__129);
8874 Py_VISIT(traverse_module_state->__pyx_codeobj__130);
8875 Py_VISIT(traverse_module_state->__pyx_codeobj__131);
8876 Py_VISIT(traverse_module_state->__pyx_codeobj__132);
8877 Py_VISIT(traverse_module_state->__pyx_codeobj__133);
8878 Py_VISIT(traverse_module_state->__pyx_codeobj__134);
8879 Py_VISIT(traverse_module_state->__pyx_codeobj__137);
8880 Py_VISIT(traverse_module_state->__pyx_codeobj__138);
8881 Py_VISIT(traverse_module_state->__pyx_codeobj__139);
8882 Py_VISIT(traverse_module_state->__pyx_codeobj__140);
8883 Py_VISIT(traverse_module_state->__pyx_codeobj__141);
8884 Py_VISIT(traverse_module_state->__pyx_codeobj__142);
8885 Py_VISIT(traverse_module_state->__pyx_codeobj__143);
8886 Py_VISIT(traverse_module_state->__pyx_codeobj__144);
8887 Py_VISIT(traverse_module_state->__pyx_codeobj__145);
8888 Py_VISIT(traverse_module_state->__pyx_codeobj__147);
8889 Py_VISIT(traverse_module_state->__pyx_codeobj__148);
8890 Py_VISIT(traverse_module_state->__pyx_codeobj__149);
8891 Py_VISIT(traverse_module_state->__pyx_codeobj__150);
8892 Py_VISIT(traverse_module_state->__pyx_codeobj__151);
8893 Py_VISIT(traverse_module_state->__pyx_codeobj__152);
8894 Py_VISIT(traverse_module_state->__pyx_codeobj__153);
8895 Py_VISIT(traverse_module_state->__pyx_codeobj__154);
8896 Py_VISIT(traverse_module_state->__pyx_codeobj__155);
8897 Py_VISIT(traverse_module_state->__pyx_codeobj__156);
8898 Py_VISIT(traverse_module_state->__pyx_codeobj__157);
8899 Py_VISIT(traverse_module_state->__pyx_codeobj__159);
8900 Py_VISIT(traverse_module_state->__pyx_codeobj__160);
8901 Py_VISIT(traverse_module_state->__pyx_codeobj__161);
8902 Py_VISIT(traverse_module_state->__pyx_codeobj__162);
8903 Py_VISIT(traverse_module_state->__pyx_codeobj__163);
8904 Py_VISIT(traverse_module_state->__pyx_codeobj__178);
8905 Py_VISIT(traverse_module_state->__pyx_codeobj__179);
8906 Py_VISIT(traverse_module_state->__pyx_codeobj__184);
8907 Py_VISIT(traverse_module_state->__pyx_codeobj__185);
8908 Py_VISIT(traverse_module_state->__pyx_codeobj__186);
8909 Py_VISIT(traverse_module_state->__pyx_codeobj__187);
8910 Py_VISIT(traverse_module_state->__pyx_codeobj__188);
8911 Py_VISIT(traverse_module_state->__pyx_codeobj__189);
8912 Py_VISIT(traverse_module_state->__pyx_codeobj__190);
8913 Py_VISIT(traverse_module_state->__pyx_codeobj__191);
8914 Py_VISIT(traverse_module_state->__pyx_codeobj__192);
8915 Py_VISIT(traverse_module_state->__pyx_codeobj__194);
8916 Py_VISIT(traverse_module_state->__pyx_codeobj__195);
8917 Py_VISIT(traverse_module_state->__pyx_codeobj__196);
8918 Py_VISIT(traverse_module_state->__pyx_codeobj__198);
8919 Py_VISIT(traverse_module_state->__pyx_codeobj__199);
8920 Py_VISIT(traverse_module_state->__pyx_codeobj__200);
8921 Py_VISIT(traverse_module_state->__pyx_codeobj__201);
8922 Py_VISIT(traverse_module_state->__pyx_codeobj__202);
8923 Py_VISIT(traverse_module_state->__pyx_codeobj__203);
8924 Py_VISIT(traverse_module_state->__pyx_codeobj__204);
8925 Py_VISIT(traverse_module_state->__pyx_codeobj__205);
8926 Py_VISIT(traverse_module_state->__pyx_codeobj__207);
8927 Py_VISIT(traverse_module_state->__pyx_codeobj__208);
8928 Py_VISIT(traverse_module_state->__pyx_codeobj__209);
8929 Py_VISIT(traverse_module_state->__pyx_codeobj__211);
8930 Py_VISIT(traverse_module_state->__pyx_codeobj__212);
8931 Py_VISIT(traverse_module_state->__pyx_codeobj__213);
8932 Py_VISIT(traverse_module_state->__pyx_codeobj__214);
8933 Py_VISIT(traverse_module_state->__pyx_codeobj__215);
8934 Py_VISIT(traverse_module_state->__pyx_codeobj__216);
8935 Py_VISIT(traverse_module_state->__pyx_codeobj__217);
8936 Py_VISIT(traverse_module_state->__pyx_codeobj__218);
8937 Py_VISIT(traverse_module_state->__pyx_codeobj__225);
8938 Py_VISIT(traverse_module_state->__pyx_codeobj__226);
8939 Py_VISIT(traverse_module_state->__pyx_codeobj__229);
8940 Py_VISIT(traverse_module_state->__pyx_codeobj__230);
8941 Py_VISIT(traverse_module_state->__pyx_codeobj__231);
8942 Py_VISIT(traverse_module_state->__pyx_codeobj__235);
8943 Py_VISIT(traverse_module_state->__pyx_codeobj__237);
8944 Py_VISIT(traverse_module_state->__pyx_codeobj__243);
8945 Py_VISIT(traverse_module_state->__pyx_codeobj__244);
8946 Py_VISIT(traverse_module_state->__pyx_codeobj__245);
8947 Py_VISIT(traverse_module_state->__pyx_codeobj__246);
8948 Py_VISIT(traverse_module_state->__pyx_codeobj__248);
8949 Py_VISIT(traverse_module_state->__pyx_codeobj__251);
8950 Py_VISIT(traverse_module_state->__pyx_codeobj__252);
8951 Py_VISIT(traverse_module_state->__pyx_codeobj__254);
8952 Py_VISIT(traverse_module_state->__pyx_codeobj__257);
8953 Py_VISIT(traverse_module_state->__pyx_codeobj__258);
8954 Py_VISIT(traverse_module_state->__pyx_codeobj__259);
8955 Py_VISIT(traverse_module_state->__pyx_codeobj__261);
8956 Py_VISIT(traverse_module_state->__pyx_codeobj__263);
8957 Py_VISIT(traverse_module_state->__pyx_codeobj__265);
8958 Py_VISIT(traverse_module_state->__pyx_codeobj__267);
8959 Py_VISIT(traverse_module_state->__pyx_codeobj__268);
8960 Py_VISIT(traverse_module_state->__pyx_codeobj__269);
8961 Py_VISIT(traverse_module_state->__pyx_codeobj__271);
8962 Py_VISIT(traverse_module_state->__pyx_codeobj__272);
8963 Py_VISIT(traverse_module_state->__pyx_codeobj__273);
8964 Py_VISIT(traverse_module_state->__pyx_codeobj__274);
8965 Py_VISIT(traverse_module_state->__pyx_codeobj__276);
8966 return 0;
8967 }
8968 #endif
8969 /* #### Code section: module_state_defines ### */
8970 #define __pyx_d __pyx_mstate_global->__pyx_d
8971 #define __pyx_b __pyx_mstate_global->__pyx_b
8972 #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
8973 #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
8974 #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
8975 #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
8976 #ifdef __Pyx_CyFunction_USED
8977 #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
8978 #endif
8979 #ifdef __Pyx_FusedFunction_USED
8980 #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
8981 #endif
8982 #ifdef __Pyx_Generator_USED
8983 #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
8984 #endif
8985 #ifdef __Pyx_IterableCoroutine_USED
8986 #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
8987 #endif
8988 #ifdef __Pyx_Coroutine_USED
8989 #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
8990 #endif
8991 #ifdef __Pyx_Coroutine_USED
8992 #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
8993 #endif
8994 #if CYTHON_USE_MODULE_STATE
8995 #endif
8996 #if CYTHON_USE_MODULE_STATE
8997 #endif
8998 #if CYTHON_USE_MODULE_STATE
8999 #endif
9000 #if CYTHON_USE_MODULE_STATE
9001 #endif
9002 #if CYTHON_USE_MODULE_STATE
9003 #endif
9004 #if CYTHON_USE_MODULE_STATE
9005 #endif
9006 #define __pyx_ptype_5pysam_10libchtslib_HTSFile __pyx_mstate_global->__pyx_ptype_5pysam_10libchtslib_HTSFile
9007 #if CYTHON_USE_MODULE_STATE
9008 #endif
9009 #if CYTHON_USE_MODULE_STATE
9010 #endif
9011 #if CYTHON_USE_MODULE_STATE
9012 #endif
9013 #if CYTHON_USE_MODULE_STATE
9014 #endif
9015 #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
9016 #if CYTHON_USE_MODULE_STATE
9017 #endif
9018 #if CYTHON_USE_MODULE_STATE
9019 #endif
9020 #if CYTHON_USE_MODULE_STATE
9021 #endif
9022 #if CYTHON_USE_MODULE_STATE
9023 #endif
9024 #if CYTHON_USE_MODULE_STATE
9025 #endif
9026 #if CYTHON_USE_MODULE_STATE
9027 #endif
9028 #if CYTHON_USE_MODULE_STATE
9029 #endif
9030 #if CYTHON_USE_MODULE_STATE
9031 #endif
9032 #if CYTHON_USE_MODULE_STATE
9033 #endif
9034 #if CYTHON_USE_MODULE_STATE
9035 #endif
9036 #if CYTHON_USE_MODULE_STATE
9037 #endif
9038 #if CYTHON_USE_MODULE_STATE
9039 #endif
9040 #if CYTHON_USE_MODULE_STATE
9041 #endif
9042 #if CYTHON_USE_MODULE_STATE
9043 #endif
9044 #define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool
9045 #if CYTHON_USE_MODULE_STATE
9046 #endif
9047 #if CYTHON_USE_MODULE_STATE
9048 #endif
9049 #if CYTHON_USE_MODULE_STATE
9050 #endif
9051 #if CYTHON_USE_MODULE_STATE
9052 #endif
9053 #define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex
9054 #if CYTHON_USE_MODULE_STATE
9055 #endif
9056 #if CYTHON_USE_MODULE_STATE
9057 #endif
9058 #if CYTHON_USE_MODULE_STATE
9059 #endif
9060 #if CYTHON_USE_MODULE_STATE
9061 #endif
9062 #if CYTHON_USE_MODULE_STATE
9063 #endif
9064 #if CYTHON_USE_MODULE_STATE
9065 #endif
9066 #if CYTHON_USE_MODULE_STATE
9067 #endif
9068 #if CYTHON_USE_MODULE_STATE
9069 #endif
9070 #if CYTHON_USE_MODULE_STATE
9071 #endif
9072 #if CYTHON_USE_MODULE_STATE
9073 #endif
9074 #if CYTHON_USE_MODULE_STATE
9075 #endif
9076 #if CYTHON_USE_MODULE_STATE
9077 #endif
9078 #if CYTHON_USE_MODULE_STATE
9079 #endif
9080 #if CYTHON_USE_MODULE_STATE
9081 #endif
9082 #if CYTHON_USE_MODULE_STATE
9083 #endif
9084 #if CYTHON_USE_MODULE_STATE
9085 #endif
9086 #if CYTHON_USE_MODULE_STATE
9087 #endif
9088 #if CYTHON_USE_MODULE_STATE
9089 #endif
9090 #if CYTHON_USE_MODULE_STATE
9091 #endif
9092 #if CYTHON_USE_MODULE_STATE
9093 #endif
9094 #if CYTHON_USE_MODULE_STATE
9095 #endif
9096 #if CYTHON_USE_MODULE_STATE
9097 #endif
9098 #if CYTHON_USE_MODULE_STATE
9099 #endif
9100 #define __pyx_ptype_7cpython_5array_array __pyx_mstate_global->__pyx_ptype_7cpython_5array_array
9101 #if CYTHON_USE_MODULE_STATE
9102 #endif
9103 #if CYTHON_USE_MODULE_STATE
9104 #define __pyx_type_5pysam_7libcbcf_VariantHeader __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantHeader
9105 #define __pyx_type_5pysam_7libcbcf_VariantHeaderRecord __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantHeaderRecord
9106 #define __pyx_type_5pysam_7libcbcf_VariantHeaderRecords __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantHeaderRecords
9107 #define __pyx_type_5pysam_7libcbcf_VariantHeaderContigs __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantHeaderContigs
9108 #define __pyx_type_5pysam_7libcbcf_VariantHeaderSamples __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantHeaderSamples
9109 #define __pyx_type_5pysam_7libcbcf_VariantContig __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantContig
9110 #define __pyx_type_5pysam_7libcbcf_VariantMetadata __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantMetadata
9111 #define __pyx_type_5pysam_7libcbcf_VariantHeaderMetadata __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantHeaderMetadata
9112 #define __pyx_type_5pysam_7libcbcf_VariantRecord __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantRecord
9113 #define __pyx_type_5pysam_7libcbcf_VariantRecordFilter __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantRecordFilter
9114 #define __pyx_type_5pysam_7libcbcf_VariantRecordFormat __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantRecordFormat
9115 #define __pyx_type_5pysam_7libcbcf_VariantRecordInfo __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantRecordInfo
9116 #define __pyx_type_5pysam_7libcbcf_VariantRecordSamples __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantRecordSamples
9117 #define __pyx_type_5pysam_7libcbcf_VariantRecordSample __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantRecordSample
9118 #define __pyx_type_5pysam_7libcbcf_BaseIndex __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_BaseIndex
9119 #define __pyx_type_5pysam_7libcbcf_BCFIndex __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_BCFIndex
9120 #define __pyx_type_5pysam_7libcbcf_TabixIndex __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_TabixIndex
9121 #define __pyx_type_5pysam_7libcbcf_BaseIterator __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_BaseIterator
9122 #define __pyx_type_5pysam_7libcbcf_BCFIterator __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_BCFIterator
9123 #define __pyx_type_5pysam_7libcbcf_TabixIterator __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_TabixIterator
9124 #define __pyx_type_5pysam_7libcbcf_VariantFile __pyx_mstate_global->__pyx_type_5pysam_7libcbcf_VariantFile
9125 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple
9126 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr
9127 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr
9128 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr
9129 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr
9130 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get__
9131 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr
9132 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter__
9133 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues
9134 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems
9135 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter__
9136 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter__
9137 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues
9138 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems
9139 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter__
9140 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues
9141 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems
9142 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter__
9143 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter__
9144 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues
9145 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems
9146 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter__
9147 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues
9148 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems
9149 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter__
9150 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues
9151 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems
9152 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter__
9153 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues
9154 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems
9155 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set__
9156 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr
9157 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr
9158 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter__ __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter__
9159 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues
9160 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems
9161 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues
9162 #define __pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems __pyx_mstate_global->__pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems
9163 #endif
9164 #define __pyx_ptype_5pysam_7libcbcf_VariantHeader __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantHeader
9165 #define __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord
9166 #define __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords
9167 #define __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs
9168 #define __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples
9169 #define __pyx_ptype_5pysam_7libcbcf_VariantContig __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantContig
9170 #define __pyx_ptype_5pysam_7libcbcf_VariantMetadata __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantMetadata
9171 #define __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata
9172 #define __pyx_ptype_5pysam_7libcbcf_VariantRecord __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantRecord
9173 #define __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter
9174 #define __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat
9175 #define __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo
9176 #define __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples
9177 #define __pyx_ptype_5pysam_7libcbcf_VariantRecordSample __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantRecordSample
9178 #define __pyx_ptype_5pysam_7libcbcf_BaseIndex __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_BaseIndex
9179 #define __pyx_ptype_5pysam_7libcbcf_BCFIndex __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_BCFIndex
9180 #define __pyx_ptype_5pysam_7libcbcf_TabixIndex __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_TabixIndex
9181 #define __pyx_ptype_5pysam_7libcbcf_BaseIterator __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_BaseIterator
9182 #define __pyx_ptype_5pysam_7libcbcf_BCFIterator __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_BCFIterator
9183 #define __pyx_ptype_5pysam_7libcbcf_TabixIterator __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_TabixIterator
9184 #define __pyx_ptype_5pysam_7libcbcf_VariantFile __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf_VariantFile
9185 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple
9186 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr
9187 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr
9188 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr
9189 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr
9190 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__
9191 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr
9192 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__
9193 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues
9194 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems
9195 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__
9196 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__
9197 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues
9198 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems
9199 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__
9200 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues
9201 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems
9202 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__
9203 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__
9204 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues
9205 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems
9206 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__
9207 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues
9208 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems
9209 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__
9210 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues
9211 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems
9212 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__
9213 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues
9214 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems
9215 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__
9216 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr
9217 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr
9218 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__ __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__
9219 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues
9220 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems
9221 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues
9222 #define __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems __pyx_mstate_global->__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems
9223 #define __pyx_n_u_A __pyx_mstate_global->__pyx_n_u_A
9224 #define __pyx_n_u_ALT __pyx_mstate_global->__pyx_n_u_ALT
9225 #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
9226 #define __pyx_n_s_BCFIndex __pyx_mstate_global->__pyx_n_s_BCFIndex
9227 #define __pyx_n_u_BCFIndex __pyx_mstate_global->__pyx_n_u_BCFIndex
9228 #define __pyx_n_s_BCFIndex___reduce_cython __pyx_mstate_global->__pyx_n_s_BCFIndex___reduce_cython
9229 #define __pyx_n_s_BCFIndex___setstate_cython __pyx_mstate_global->__pyx_n_s_BCFIndex___setstate_cython
9230 #define __pyx_n_s_BCFIndex_fetch __pyx_mstate_global->__pyx_n_s_BCFIndex_fetch
9231 #define __pyx_n_s_BCFIterator __pyx_mstate_global->__pyx_n_s_BCFIterator
9232 #define __pyx_n_u_BCFIterator __pyx_mstate_global->__pyx_n_u_BCFIterator
9233 #define __pyx_n_s_BCFIterator___reduce_cython __pyx_mstate_global->__pyx_n_s_BCFIterator___reduce_cython
9234 #define __pyx_n_s_BCFIterator___setstate_cython __pyx_mstate_global->__pyx_n_s_BCFIterator___setstate_cython
9235 #define __pyx_n_u_BND __pyx_mstate_global->__pyx_n_u_BND
9236 #define __pyx_n_s_BaseIndex __pyx_mstate_global->__pyx_n_s_BaseIndex
9237 #define __pyx_n_u_BaseIndex __pyx_mstate_global->__pyx_n_u_BaseIndex
9238 #define __pyx_n_s_BaseIndex___reduce_cython __pyx_mstate_global->__pyx_n_s_BaseIndex___reduce_cython
9239 #define __pyx_n_s_BaseIndex___setstate_cython __pyx_mstate_global->__pyx_n_s_BaseIndex___setstate_cython
9240 #define __pyx_n_s_BaseIndex_get __pyx_mstate_global->__pyx_n_s_BaseIndex_get
9241 #define __pyx_n_s_BaseIndex_items __pyx_mstate_global->__pyx_n_s_BaseIndex_items
9242 #define __pyx_n_s_BaseIndex_iteritems __pyx_mstate_global->__pyx_n_s_BaseIndex_iteritems
9243 #define __pyx_n_s_BaseIndex_iterkeys __pyx_mstate_global->__pyx_n_s_BaseIndex_iterkeys
9244 #define __pyx_n_s_BaseIndex_itervalues __pyx_mstate_global->__pyx_n_s_BaseIndex_itervalues
9245 #define __pyx_n_s_BaseIndex_keys __pyx_mstate_global->__pyx_n_s_BaseIndex_keys
9246 #define __pyx_n_s_BaseIndex_pop __pyx_mstate_global->__pyx_n_s_BaseIndex_pop
9247 #define __pyx_n_s_BaseIndex_update __pyx_mstate_global->__pyx_n_s_BaseIndex_update
9248 #define __pyx_n_s_BaseIndex_values __pyx_mstate_global->__pyx_n_s_BaseIndex_values
9249 #define __pyx_n_s_BaseIterator __pyx_mstate_global->__pyx_n_s_BaseIterator
9250 #define __pyx_n_u_BaseIterator __pyx_mstate_global->__pyx_n_u_BaseIterator
9251 #define __pyx_n_s_BaseIterator___reduce_cython __pyx_mstate_global->__pyx_n_s_BaseIterator___reduce_cython
9252 #define __pyx_n_s_BaseIterator___setstate_cython __pyx_mstate_global->__pyx_n_s_BaseIterator___setstate_cython
9253 #define __pyx_n_u_CONTIG __pyx_mstate_global->__pyx_n_u_CONTIG
9254 #define __pyx_kp_u_Cannot_add_extra_threads_when_ig __pyx_mstate_global->__pyx_kp_u_Cannot_add_extra_threads_when_ig
9255 #define __pyx_kp_u_Cannot_copy_arrays_with_src_valu __pyx_mstate_global->__pyx_kp_u_Cannot_copy_arrays_with_src_valu
9256 #define __pyx_kp_u_Cannot_create_empty_array __pyx_mstate_global->__pyx_kp_u_Cannot_create_empty_array
9257 #define __pyx_kp_u_Cannot_re_open_htsfile __pyx_mstate_global->__pyx_kp_u_Cannot_re_open_htsfile
9258 #define __pyx_kp_u_Cannot_set_phased_before_genotyp __pyx_mstate_global->__pyx_kp_u_Cannot_set_phased_before_genotyp
9259 #define __pyx_kp_u_Cannot_specify_an_index_filename __pyx_mstate_global->__pyx_kp_u_Cannot_specify_an_index_filename
9260 #define __pyx_kp_u_Cannot_translate_record_Number_o __pyx_mstate_global->__pyx_kp_u_Cannot_translate_record_Number_o
9261 #define __pyx_n_u_Description __pyx_mstate_global->__pyx_n_u_Description
9262 #define __pyx_kp_u_Duplicated_sample_name __pyx_mstate_global->__pyx_kp_u_Duplicated_sample_name
9263 #define __pyx_n_b_END __pyx_mstate_global->__pyx_n_b_END
9264 #define __pyx_n_u_END __pyx_mstate_global->__pyx_n_u_END
9265 #define __pyx_kp_u_END_is_a_reserved_attribute_acce __pyx_mstate_global->__pyx_kp_u_END_is_a_reserved_attribute_acce
9266 #define __pyx_kp_u_Error_extracting_ID __pyx_mstate_global->__pyx_kp_u_Error_extracting_ID
9267 #define __pyx_kp_u_Error_s_reading_record __pyx_mstate_global->__pyx_kp_u_Error_s_reading_record
9268 #define __pyx_kp_u_Error_unpacking_VariantRecord __pyx_mstate_global->__pyx_kp_u_Error_unpacking_VariantRecord
9269 #define __pyx_kp_u_Error_updating_alleles __pyx_mstate_global->__pyx_kp_u_Error_updating_alleles
9270 #define __pyx_kp_u_Error_updating_id __pyx_mstate_global->__pyx_kp_u_Error_updating_id
9271 #define __pyx_n_u_FILTER __pyx_mstate_global->__pyx_n_u_FILTER
9272 #define __pyx_n_u_FIXED __pyx_mstate_global->__pyx_n_u_FIXED
9273 #define __pyx_n_u_FORMAT __pyx_mstate_global->__pyx_n_u_FORMAT
9274 #define __pyx_n_u_Flag __pyx_mstate_global->__pyx_n_u_Flag
9275 #define __pyx_kp_u_Flag_types_are_not_allowed_on_FO __pyx_mstate_global->__pyx_kp_u_Flag_types_are_not_allowed_on_FO
9276 #define __pyx_kp_u_Flag_values_must_be_True_False_N __pyx_mstate_global->__pyx_kp_u_Flag_values_must_be_True_False_N
9277 #define __pyx_n_u_Float __pyx_mstate_global->__pyx_n_u_Float
9278 #define __pyx_n_u_G __pyx_mstate_global->__pyx_n_u_G
9279 #define __pyx_n_u_GENERIC __pyx_mstate_global->__pyx_n_u_GENERIC
9280 #define __pyx_n_u_GT __pyx_mstate_global->__pyx_n_u_GT
9281 #define __pyx_kp_u_Header_already_exists_for_contig __pyx_mstate_global->__pyx_kp_u_Header_already_exists_for_contig
9282 #define __pyx_kp_u_Header_already_exists_for_id __pyx_mstate_global->__pyx_kp_u_Header_already_exists_for_id
9283 #define __pyx_n_u_ID __pyx_mstate_global->__pyx_n_u_ID
9284 #define __pyx_n_u_INDEL __pyx_mstate_global->__pyx_n_u_INDEL
9285 #define __pyx_n_u_INFO __pyx_mstate_global->__pyx_n_u_INFO
9286 #define __pyx_n_s_IOError __pyx_mstate_global->__pyx_n_s_IOError
9287 #define __pyx_kp_u_I_O_operation_on_closed_file __pyx_mstate_global->__pyx_kp_u_I_O_operation_on_closed_file
9288 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
9289 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2
9290 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3
9291 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4
9292 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5
9293 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6
9294 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7
9295 #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
9296 #define __pyx_n_u_Integer __pyx_mstate_global->__pyx_n_u_Integer
9297 #define __pyx_kp_u_Integer_value_too_small_large_to __pyx_mstate_global->__pyx_kp_u_Integer_value_too_small_large_to
9298 #define __pyx_kp_u_Invalid_INFO_field __pyx_mstate_global->__pyx_kp_u_Invalid_INFO_field
9299 #define __pyx_kp_u_Invalid_VariantRecord_Number_of __pyx_mstate_global->__pyx_kp_u_Invalid_VariantRecord_Number_of
9300 #define __pyx_kp_u_Invalid_allele_index __pyx_mstate_global->__pyx_kp_u_Invalid_allele_index
9301 #define __pyx_kp_u_Invalid_chromosome_contig __pyx_mstate_global->__pyx_kp_u_Invalid_chromosome_contig
9302 #define __pyx_kp_u_Invalid_filter __pyx_mstate_global->__pyx_kp_u_Invalid_filter
9303 #define __pyx_kp_u_Invalid_header __pyx_mstate_global->__pyx_kp_u_Invalid_header
9304 #define __pyx_kp_u_Invalid_header_id __pyx_mstate_global->__pyx_kp_u_Invalid_header_id
9305 #define __pyx_kp_u_Invalid_header_record_index __pyx_mstate_global->__pyx_kp_u_Invalid_header_record_index
9306 #define __pyx_kp_u_Invalid_index_object __pyx_mstate_global->__pyx_kp_u_Invalid_index_object
9307 #define __pyx_kp_u_Invalid_tid __pyx_mstate_global->__pyx_kp_u_Invalid_tid
9308 #define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
9309 #define __pyx_n_u_MNP __pyx_mstate_global->__pyx_n_u_MNP
9310 #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
9311 #define __pyx_kp_u_NON_REF __pyx_mstate_global->__pyx_kp_u_NON_REF
9312 #define __pyx_n_s_NotImplemented __pyx_mstate_global->__pyx_n_s_NotImplemented
9313 #define __pyx_n_u_Number __pyx_mstate_global->__pyx_n_u_Number
9314 #define __pyx_kp_u_Number_must_be_None_when_adding __pyx_mstate_global->__pyx_kp_u_Number_must_be_None_when_adding
9315 #define __pyx_n_u_OTHER __pyx_mstate_global->__pyx_n_u_OTHER
9316 #define __pyx_n_u_OVERLAP __pyx_mstate_global->__pyx_n_u_OVERLAP
9317 #define __pyx_kp_u_One_or_more_of_the_supplied_samp __pyx_mstate_global->__pyx_kp_u_One_or_more_of_the_supplied_samp
9318 #define __pyx_n_u_PASS __pyx_mstate_global->__pyx_n_u_PASS
9319 #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
9320 #define __pyx_kp_u_Position_must_be_positive __pyx_mstate_global->__pyx_kp_u_Position_must_be_positive
9321 #define __pyx_n_u_R __pyx_mstate_global->__pyx_n_u_R
9322 #define __pyx_n_u_REF __pyx_mstate_global->__pyx_n_u_REF
9323 #define __pyx_n_u_SNP __pyx_mstate_global->__pyx_n_u_SNP
9324 #define __pyx_n_u_STRUCTURED __pyx_mstate_global->__pyx_n_u_STRUCTURED
9325 #define __pyx_kp_u_Start_coordinate_must_be_non_neg __pyx_mstate_global->__pyx_kp_u_Start_coordinate_must_be_non_neg
9326 #define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration
9327 #define __pyx_kp_u_Stop_coordinate_must_be_non_nega __pyx_mstate_global->__pyx_kp_u_Stop_coordinate_must_be_non_nega
9328 #define __pyx_kp_u_Stop_position_of_the_interval __pyx_mstate_global->__pyx_kp_u_Stop_position_of_the_interval
9329 #define __pyx_n_u_String __pyx_mstate_global->__pyx_n_u_String
9330 #define __pyx_n_s_TabixIndex __pyx_mstate_global->__pyx_n_s_TabixIndex
9331 #define __pyx_n_u_TabixIndex __pyx_mstate_global->__pyx_n_u_TabixIndex
9332 #define __pyx_n_s_TabixIndex___reduce_cython __pyx_mstate_global->__pyx_n_s_TabixIndex___reduce_cython
9333 #define __pyx_n_s_TabixIndex___setstate_cython __pyx_mstate_global->__pyx_n_s_TabixIndex___setstate_cython
9334 #define __pyx_n_s_TabixIndex_fetch __pyx_mstate_global->__pyx_n_s_TabixIndex_fetch
9335 #define __pyx_n_s_TabixIterator __pyx_mstate_global->__pyx_n_s_TabixIterator
9336 #define __pyx_n_u_TabixIterator __pyx_mstate_global->__pyx_n_u_TabixIterator
9337 #define __pyx_n_s_TabixIterator___reduce_cython __pyx_mstate_global->__pyx_n_s_TabixIterator___reduce_cython
9338 #define __pyx_n_s_TabixIterator___setstate_cython __pyx_mstate_global->__pyx_n_s_TabixIterator___setstate_cython
9339 #define __pyx_n_u_Type __pyx_mstate_global->__pyx_n_u_Type
9340 #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
9341 #define __pyx_kp_u_Type_must_be_None_when_adding_a __pyx_mstate_global->__pyx_kp_u_Type_must_be_None_when_adding_a
9342 #define __pyx_kp_u_Unable_to_delete_END __pyx_mstate_global->__pyx_kp_u_Unable_to_delete_END
9343 #define __pyx_kp_u_Unable_to_delete_FORMAT __pyx_mstate_global->__pyx_kp_u_Unable_to_delete_FORMAT
9344 #define __pyx_kp_u_Unable_to_delete_INFO __pyx_mstate_global->__pyx_kp_u_Unable_to_delete_INFO
9345 #define __pyx_kp_u_Unable_to_update_INFO_values __pyx_mstate_global->__pyx_kp_u_Unable_to_update_INFO_values
9346 #define __pyx_kp_u_Unable_to_update_format_values __pyx_mstate_global->__pyx_kp_u_Unable_to_update_format_values
9347 #define __pyx_kp_u_Unknown_INFO_field __pyx_mstate_global->__pyx_kp_u_Unknown_INFO_field
9348 #define __pyx_kp_u_Unknown_allele __pyx_mstate_global->__pyx_kp_u_Unknown_allele
9349 #define __pyx_kp_u_Unknown_format_length __pyx_mstate_global->__pyx_kp_u_Unknown_format_length
9350 #define __pyx_kp_u_Unsupported_FORMAT_type __pyx_mstate_global->__pyx_kp_u_Unsupported_FORMAT_type
9351 #define __pyx_kp_u_Unsupported_INFO_type __pyx_mstate_global->__pyx_kp_u_Unsupported_INFO_type
9352 #define __pyx_kp_u_Use_allele_indices_to_set_intege __pyx_mstate_global->__pyx_kp_u_Use_allele_indices_to_set_intege
9353 #define __pyx_n_u_VARIABLE __pyx_mstate_global->__pyx_n_u_VARIABLE
9354 #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
9355 #define __pyx_n_s_VariantContig __pyx_mstate_global->__pyx_n_s_VariantContig
9356 #define __pyx_n_u_VariantContig __pyx_mstate_global->__pyx_n_u_VariantContig
9357 #define __pyx_n_s_VariantContig___reduce_cython __pyx_mstate_global->__pyx_n_s_VariantContig___reduce_cython
9358 #define __pyx_n_s_VariantContig___setstate_cython __pyx_mstate_global->__pyx_n_s_VariantContig___setstate_cython
9359 #define __pyx_n_s_VariantContig_remove_header __pyx_mstate_global->__pyx_n_s_VariantContig_remove_header
9360 #define __pyx_n_s_VariantFile __pyx_mstate_global->__pyx_n_s_VariantFile
9361 #define __pyx_n_u_VariantFile __pyx_mstate_global->__pyx_n_u_VariantFile
9362 #define __pyx_n_s_VariantFile___reduce_cython __pyx_mstate_global->__pyx_n_s_VariantFile___reduce_cython
9363 #define __pyx_n_s_VariantFile___setstate_cython __pyx_mstate_global->__pyx_n_s_VariantFile___setstate_cython
9364 #define __pyx_n_s_VariantFile_close __pyx_mstate_global->__pyx_n_s_VariantFile_close
9365 #define __pyx_n_s_VariantFile_copy __pyx_mstate_global->__pyx_n_s_VariantFile_copy
9366 #define __pyx_n_s_VariantFile_fetch __pyx_mstate_global->__pyx_n_s_VariantFile_fetch
9367 #define __pyx_n_s_VariantFile_get_reference_name __pyx_mstate_global->__pyx_n_s_VariantFile_get_reference_name
9368 #define __pyx_n_s_VariantFile_get_tid __pyx_mstate_global->__pyx_n_s_VariantFile_get_tid
9369 #define __pyx_n_s_VariantFile_is_valid_tid __pyx_mstate_global->__pyx_n_s_VariantFile_is_valid_tid
9370 #define __pyx_n_s_VariantFile_new_record __pyx_mstate_global->__pyx_n_s_VariantFile_new_record
9371 #define __pyx_n_s_VariantFile_open __pyx_mstate_global->__pyx_n_s_VariantFile_open
9372 #define __pyx_n_s_VariantFile_reset __pyx_mstate_global->__pyx_n_s_VariantFile_reset
9373 #define __pyx_n_s_VariantFile_subset_samples __pyx_mstate_global->__pyx_n_s_VariantFile_subset_samples
9374 #define __pyx_n_s_VariantFile_write __pyx_mstate_global->__pyx_n_s_VariantFile_write
9375 #define __pyx_n_s_VariantHeader __pyx_mstate_global->__pyx_n_s_VariantHeader
9376 #define __pyx_n_u_VariantHeader __pyx_mstate_global->__pyx_n_u_VariantHeader
9377 #define __pyx_n_s_VariantHeaderContigs __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs
9378 #define __pyx_n_u_VariantHeaderContigs __pyx_mstate_global->__pyx_n_u_VariantHeaderContigs
9379 #define __pyx_n_s_VariantHeaderContigs___iter __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs___iter
9380 #define __pyx_n_s_VariantHeaderContigs___reduce_cy __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs___reduce_cy
9381 #define __pyx_n_s_VariantHeaderContigs___setstate __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs___setstate
9382 #define __pyx_n_s_VariantHeaderContigs_add __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_add
9383 #define __pyx_n_s_VariantHeaderContigs_clear_heade __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_clear_heade
9384 #define __pyx_n_s_VariantHeaderContigs_get __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_get
9385 #define __pyx_n_s_VariantHeaderContigs_items __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_items
9386 #define __pyx_n_s_VariantHeaderContigs_iteritems __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_iteritems
9387 #define __pyx_n_s_VariantHeaderContigs_iterkeys __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_iterkeys
9388 #define __pyx_n_s_VariantHeaderContigs_itervalues __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_itervalues
9389 #define __pyx_n_s_VariantHeaderContigs_keys __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_keys
9390 #define __pyx_n_s_VariantHeaderContigs_remove_head __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_remove_head
9391 #define __pyx_n_s_VariantHeaderContigs_values __pyx_mstate_global->__pyx_n_s_VariantHeaderContigs_values
9392 #define __pyx_n_s_VariantHeaderMetadata __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata
9393 #define __pyx_n_u_VariantHeaderMetadata __pyx_mstate_global->__pyx_n_u_VariantHeaderMetadata
9394 #define __pyx_n_s_VariantHeaderMetadata___iter __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata___iter
9395 #define __pyx_n_s_VariantHeaderMetadata___reduce_c __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata___reduce_c
9396 #define __pyx_n_s_VariantHeaderMetadata___setstate __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata___setstate
9397 #define __pyx_n_s_VariantHeaderMetadata_add __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_add
9398 #define __pyx_n_s_VariantHeaderMetadata_clear_head __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_clear_head
9399 #define __pyx_n_s_VariantHeaderMetadata_get __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_get
9400 #define __pyx_n_s_VariantHeaderMetadata_items __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_items
9401 #define __pyx_n_s_VariantHeaderMetadata_iteritems __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_iteritems
9402 #define __pyx_n_s_VariantHeaderMetadata_iterkeys __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_iterkeys
9403 #define __pyx_n_s_VariantHeaderMetadata_itervalues __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_itervalues
9404 #define __pyx_n_s_VariantHeaderMetadata_keys __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_keys
9405 #define __pyx_n_s_VariantHeaderMetadata_remove_hea __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_remove_hea
9406 #define __pyx_n_s_VariantHeaderMetadata_values __pyx_mstate_global->__pyx_n_s_VariantHeaderMetadata_values
9407 #define __pyx_n_s_VariantHeaderRecord __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord
9408 #define __pyx_n_u_VariantHeaderRecord __pyx_mstate_global->__pyx_n_u_VariantHeaderRecord
9409 #define __pyx_n_s_VariantHeaderRecord___get___loca __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord___get___loca
9410 #define __pyx_n_s_VariantHeaderRecord___iter __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord___iter
9411 #define __pyx_n_s_VariantHeaderRecord___reduce_cyt __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord___reduce_cyt
9412 #define __pyx_n_s_VariantHeaderRecord___setstate_c __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord___setstate_c
9413 #define __pyx_n_s_VariantHeaderRecord_get __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_get
9414 #define __pyx_n_s_VariantHeaderRecord_items __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_items
9415 #define __pyx_n_s_VariantHeaderRecord_iteritems __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_iteritems
9416 #define __pyx_n_s_VariantHeaderRecord_iterkeys __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_iterkeys
9417 #define __pyx_n_s_VariantHeaderRecord_itervalues __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_itervalues
9418 #define __pyx_n_s_VariantHeaderRecord_keys __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_keys
9419 #define __pyx_n_s_VariantHeaderRecord_pop __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_pop
9420 #define __pyx_n_s_VariantHeaderRecord_remove __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_remove
9421 #define __pyx_n_s_VariantHeaderRecord_update __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_update
9422 #define __pyx_n_s_VariantHeaderRecord_values __pyx_mstate_global->__pyx_n_s_VariantHeaderRecord_values
9423 #define __pyx_n_s_VariantHeaderRecords __pyx_mstate_global->__pyx_n_s_VariantHeaderRecords
9424 #define __pyx_n_u_VariantHeaderRecords __pyx_mstate_global->__pyx_n_u_VariantHeaderRecords
9425 #define __pyx_n_s_VariantHeaderRecords___iter __pyx_mstate_global->__pyx_n_s_VariantHeaderRecords___iter
9426 #define __pyx_n_s_VariantHeaderRecords___reduce_cy __pyx_mstate_global->__pyx_n_s_VariantHeaderRecords___reduce_cy
9427 #define __pyx_n_s_VariantHeaderRecords___setstate __pyx_mstate_global->__pyx_n_s_VariantHeaderRecords___setstate
9428 #define __pyx_n_s_VariantHeaderSamples __pyx_mstate_global->__pyx_n_s_VariantHeaderSamples
9429 #define __pyx_n_u_VariantHeaderSamples __pyx_mstate_global->__pyx_n_u_VariantHeaderSamples
9430 #define __pyx_n_s_VariantHeaderSamples___iter __pyx_mstate_global->__pyx_n_s_VariantHeaderSamples___iter
9431 #define __pyx_n_s_VariantHeaderSamples___reduce_cy __pyx_mstate_global->__pyx_n_s_VariantHeaderSamples___reduce_cy
9432 #define __pyx_n_s_VariantHeaderSamples___setstate __pyx_mstate_global->__pyx_n_s_VariantHeaderSamples___setstate
9433 #define __pyx_n_s_VariantHeaderSamples_add __pyx_mstate_global->__pyx_n_s_VariantHeaderSamples_add
9434 #define __pyx_n_s_VariantHeader___reduce_cython __pyx_mstate_global->__pyx_n_s_VariantHeader___reduce_cython
9435 #define __pyx_n_s_VariantHeader___setstate_cython __pyx_mstate_global->__pyx_n_s_VariantHeader___setstate_cython
9436 #define __pyx_n_s_VariantHeader_add_line __pyx_mstate_global->__pyx_n_s_VariantHeader_add_line
9437 #define __pyx_n_s_VariantHeader_add_meta __pyx_mstate_global->__pyx_n_s_VariantHeader_add_meta
9438 #define __pyx_n_s_VariantHeader_add_record __pyx_mstate_global->__pyx_n_s_VariantHeader_add_record
9439 #define __pyx_n_s_VariantHeader_add_sample __pyx_mstate_global->__pyx_n_s_VariantHeader_add_sample
9440 #define __pyx_n_s_VariantHeader_add_samples __pyx_mstate_global->__pyx_n_s_VariantHeader_add_samples
9441 #define __pyx_n_s_VariantHeader_copy __pyx_mstate_global->__pyx_n_s_VariantHeader_copy
9442 #define __pyx_n_s_VariantHeader_merge __pyx_mstate_global->__pyx_n_s_VariantHeader_merge
9443 #define __pyx_n_s_VariantHeader_new_record __pyx_mstate_global->__pyx_n_s_VariantHeader_new_record
9444 #define __pyx_n_s_VariantMetadata __pyx_mstate_global->__pyx_n_s_VariantMetadata
9445 #define __pyx_n_u_VariantMetadata __pyx_mstate_global->__pyx_n_u_VariantMetadata
9446 #define __pyx_n_s_VariantMetadata___reduce_cython __pyx_mstate_global->__pyx_n_s_VariantMetadata___reduce_cython
9447 #define __pyx_n_s_VariantMetadata___setstate_cytho __pyx_mstate_global->__pyx_n_s_VariantMetadata___setstate_cytho
9448 #define __pyx_n_s_VariantMetadata_remove_header __pyx_mstate_global->__pyx_n_s_VariantMetadata_remove_header
9449 #define __pyx_n_s_VariantRecord __pyx_mstate_global->__pyx_n_s_VariantRecord
9450 #define __pyx_n_u_VariantRecord __pyx_mstate_global->__pyx_n_u_VariantRecord
9451 #define __pyx_n_s_VariantRecordFilter __pyx_mstate_global->__pyx_n_s_VariantRecordFilter
9452 #define __pyx_n_u_VariantRecordFilter __pyx_mstate_global->__pyx_n_u_VariantRecordFilter
9453 #define __pyx_n_s_VariantRecordFilter___iter __pyx_mstate_global->__pyx_n_s_VariantRecordFilter___iter
9454 #define __pyx_n_s_VariantRecordFilter___reduce_cyt __pyx_mstate_global->__pyx_n_s_VariantRecordFilter___reduce_cyt
9455 #define __pyx_n_s_VariantRecordFilter___setstate_c __pyx_mstate_global->__pyx_n_s_VariantRecordFilter___setstate_c
9456 #define __pyx_n_s_VariantRecordFilter_add __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_add
9457 #define __pyx_n_s_VariantRecordFilter_clear __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_clear
9458 #define __pyx_n_s_VariantRecordFilter_get __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_get
9459 #define __pyx_n_s_VariantRecordFilter_items __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_items
9460 #define __pyx_n_s_VariantRecordFilter_iteritems __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_iteritems
9461 #define __pyx_n_s_VariantRecordFilter_iterkeys __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_iterkeys
9462 #define __pyx_n_s_VariantRecordFilter_itervalues __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_itervalues
9463 #define __pyx_n_s_VariantRecordFilter_keys __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_keys
9464 #define __pyx_n_s_VariantRecordFilter_values __pyx_mstate_global->__pyx_n_s_VariantRecordFilter_values
9465 #define __pyx_n_s_VariantRecordFormat __pyx_mstate_global->__pyx_n_s_VariantRecordFormat
9466 #define __pyx_n_u_VariantRecordFormat __pyx_mstate_global->__pyx_n_u_VariantRecordFormat
9467 #define __pyx_n_s_VariantRecordFormat___iter __pyx_mstate_global->__pyx_n_s_VariantRecordFormat___iter
9468 #define __pyx_n_s_VariantRecordFormat___reduce_cyt __pyx_mstate_global->__pyx_n_s_VariantRecordFormat___reduce_cyt
9469 #define __pyx_n_s_VariantRecordFormat___setstate_c __pyx_mstate_global->__pyx_n_s_VariantRecordFormat___setstate_c
9470 #define __pyx_n_s_VariantRecordFormat_clear __pyx_mstate_global->__pyx_n_s_VariantRecordFormat_clear
9471 #define __pyx_n_s_VariantRecordFormat_get __pyx_mstate_global->__pyx_n_s_VariantRecordFormat_get
9472 #define __pyx_n_s_VariantRecordFormat_items __pyx_mstate_global->__pyx_n_s_VariantRecordFormat_items
9473 #define __pyx_n_s_VariantRecordFormat_iteritems __pyx_mstate_global->__pyx_n_s_VariantRecordFormat_iteritems
9474 #define __pyx_n_s_VariantRecordFormat_iterkeys __pyx_mstate_global->__pyx_n_s_VariantRecordFormat_iterkeys
9475 #define __pyx_n_s_VariantRecordFormat_itervalues __pyx_mstate_global->__pyx_n_s_VariantRecordFormat_itervalues
9476 #define __pyx_n_s_VariantRecordFormat_keys __pyx_mstate_global->__pyx_n_s_VariantRecordFormat_keys
9477 #define __pyx_n_s_VariantRecordFormat_values __pyx_mstate_global->__pyx_n_s_VariantRecordFormat_values
9478 #define __pyx_n_s_VariantRecordInfo __pyx_mstate_global->__pyx_n_s_VariantRecordInfo
9479 #define __pyx_n_u_VariantRecordInfo __pyx_mstate_global->__pyx_n_u_VariantRecordInfo
9480 #define __pyx_n_s_VariantRecordInfo___iter __pyx_mstate_global->__pyx_n_s_VariantRecordInfo___iter
9481 #define __pyx_n_s_VariantRecordInfo___reduce_cytho __pyx_mstate_global->__pyx_n_s_VariantRecordInfo___reduce_cytho
9482 #define __pyx_n_s_VariantRecordInfo___setstate_cyt __pyx_mstate_global->__pyx_n_s_VariantRecordInfo___setstate_cyt
9483 #define __pyx_n_s_VariantRecordInfo_clear __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_clear
9484 #define __pyx_n_s_VariantRecordInfo_get __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_get
9485 #define __pyx_n_s_VariantRecordInfo_items __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_items
9486 #define __pyx_n_s_VariantRecordInfo_iteritems __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_iteritems
9487 #define __pyx_n_s_VariantRecordInfo_iterkeys __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_iterkeys
9488 #define __pyx_n_s_VariantRecordInfo_itervalues __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_itervalues
9489 #define __pyx_n_s_VariantRecordInfo_keys __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_keys
9490 #define __pyx_n_s_VariantRecordInfo_pop __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_pop
9491 #define __pyx_n_s_VariantRecordInfo_update __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_update
9492 #define __pyx_n_s_VariantRecordInfo_values __pyx_mstate_global->__pyx_n_s_VariantRecordInfo_values
9493 #define __pyx_n_s_VariantRecordSample __pyx_mstate_global->__pyx_n_s_VariantRecordSample
9494 #define __pyx_n_u_VariantRecordSample __pyx_mstate_global->__pyx_n_u_VariantRecordSample
9495 #define __pyx_n_s_VariantRecordSample___iter __pyx_mstate_global->__pyx_n_s_VariantRecordSample___iter
9496 #define __pyx_n_s_VariantRecordSample___reduce_cyt __pyx_mstate_global->__pyx_n_s_VariantRecordSample___reduce_cyt
9497 #define __pyx_n_s_VariantRecordSample___set___loca __pyx_mstate_global->__pyx_n_s_VariantRecordSample___set___loca
9498 #define __pyx_n_s_VariantRecordSample___setstate_c __pyx_mstate_global->__pyx_n_s_VariantRecordSample___setstate_c
9499 #define __pyx_n_s_VariantRecordSample_clear __pyx_mstate_global->__pyx_n_s_VariantRecordSample_clear
9500 #define __pyx_n_s_VariantRecordSample_get __pyx_mstate_global->__pyx_n_s_VariantRecordSample_get
9501 #define __pyx_n_s_VariantRecordSample_items __pyx_mstate_global->__pyx_n_s_VariantRecordSample_items
9502 #define __pyx_n_s_VariantRecordSample_iteritems __pyx_mstate_global->__pyx_n_s_VariantRecordSample_iteritems
9503 #define __pyx_n_s_VariantRecordSample_iterkeys __pyx_mstate_global->__pyx_n_s_VariantRecordSample_iterkeys
9504 #define __pyx_n_s_VariantRecordSample_itervalues __pyx_mstate_global->__pyx_n_s_VariantRecordSample_itervalues
9505 #define __pyx_n_s_VariantRecordSample_keys __pyx_mstate_global->__pyx_n_s_VariantRecordSample_keys
9506 #define __pyx_n_s_VariantRecordSample_pop __pyx_mstate_global->__pyx_n_s_VariantRecordSample_pop
9507 #define __pyx_n_s_VariantRecordSample_update __pyx_mstate_global->__pyx_n_s_VariantRecordSample_update
9508 #define __pyx_n_s_VariantRecordSample_values __pyx_mstate_global->__pyx_n_s_VariantRecordSample_values
9509 #define __pyx_n_s_VariantRecordSamples __pyx_mstate_global->__pyx_n_s_VariantRecordSamples
9510 #define __pyx_n_u_VariantRecordSamples __pyx_mstate_global->__pyx_n_u_VariantRecordSamples
9511 #define __pyx_n_s_VariantRecordSamples___iter __pyx_mstate_global->__pyx_n_s_VariantRecordSamples___iter
9512 #define __pyx_n_s_VariantRecordSamples___reduce_cy __pyx_mstate_global->__pyx_n_s_VariantRecordSamples___reduce_cy
9513 #define __pyx_n_s_VariantRecordSamples___setstate __pyx_mstate_global->__pyx_n_s_VariantRecordSamples___setstate
9514 #define __pyx_n_s_VariantRecordSamples_get __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_get
9515 #define __pyx_n_s_VariantRecordSamples_items __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_items
9516 #define __pyx_n_s_VariantRecordSamples_iteritems __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_iteritems
9517 #define __pyx_n_s_VariantRecordSamples_iterkeys __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_iterkeys
9518 #define __pyx_n_s_VariantRecordSamples_itervalues __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_itervalues
9519 #define __pyx_n_s_VariantRecordSamples_keys __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_keys
9520 #define __pyx_n_s_VariantRecordSamples_pop __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_pop
9521 #define __pyx_n_s_VariantRecordSamples_update __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_update
9522 #define __pyx_n_s_VariantRecordSamples_values __pyx_mstate_global->__pyx_n_s_VariantRecordSamples_values
9523 #define __pyx_n_s_VariantRecord___reduce_cython __pyx_mstate_global->__pyx_n_s_VariantRecord___reduce_cython
9524 #define __pyx_n_s_VariantRecord___setstate_cython __pyx_mstate_global->__pyx_n_s_VariantRecord___setstate_cython
9525 #define __pyx_n_s_VariantRecord_copy __pyx_mstate_global->__pyx_n_s_VariantRecord_copy
9526 #define __pyx_n_s_VariantRecord_translate __pyx_mstate_global->__pyx_n_s_VariantRecord_translate
9527 #define __pyx_kp_b__12 __pyx_mstate_global->__pyx_kp_b__12
9528 #define __pyx_kp_u__12 __pyx_mstate_global->__pyx_kp_u__12
9529 #define __pyx_kp_u__181 __pyx_mstate_global->__pyx_kp_u__181
9530 #define __pyx_kp_b__2 __pyx_mstate_global->__pyx_kp_b__2
9531 #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2
9532 #define __pyx_kp_b__241 __pyx_mstate_global->__pyx_kp_b__241
9533 #define __pyx_n_s__278 __pyx_mstate_global->__pyx_n_s__278
9534 #define __pyx_n_s__323 __pyx_mstate_global->__pyx_n_s__323
9535 #define __pyx_n_s__330 __pyx_mstate_global->__pyx_n_s__330
9536 #define __pyx_kp_b__52 __pyx_mstate_global->__pyx_kp_b__52
9537 #define __pyx_kp_u__52 __pyx_mstate_global->__pyx_kp_u__52
9538 #define __pyx_kp_u__53 __pyx_mstate_global->__pyx_kp_u__53
9539 #define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add
9540 #define __pyx_n_s_add_line __pyx_mstate_global->__pyx_n_s_add_line
9541 #define __pyx_n_s_add_meta __pyx_mstate_global->__pyx_n_s_add_meta
9542 #define __pyx_n_s_add_record __pyx_mstate_global->__pyx_n_s_add_record
9543 #define __pyx_n_s_add_sample __pyx_mstate_global->__pyx_n_s_add_sample
9544 #define __pyx_n_s_add_samples __pyx_mstate_global->__pyx_n_s_add_samples
9545 #define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
9546 #define __pyx_n_s_alleles __pyx_mstate_global->__pyx_n_s_alleles
9547 #define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append
9548 #define __pyx_n_s_arg __pyx_mstate_global->__pyx_n_s_arg
9549 #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
9550 #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
9551 #define __pyx_n_s_bcf __pyx_mstate_global->__pyx_n_s_bcf
9552 #define __pyx_kp_u_bcf_2 __pyx_mstate_global->__pyx_kp_u_bcf_2
9553 #define __pyx_n_s_bcf_array_to_object_locals_genex __pyx_mstate_global->__pyx_n_s_bcf_array_to_object_locals_genex
9554 #define __pyx_n_s_bcf_check_values_locals_genexpr __pyx_mstate_global->__pyx_n_s_bcf_check_values_locals_genexpr
9555 #define __pyx_kp_u_bcf_hdr_format_failed __pyx_mstate_global->__pyx_kp_u_bcf_hdr_format_failed
9556 #define __pyx_kp_u_bcf_hdr_set_samples_failed_ret __pyx_mstate_global->__pyx_kp_u_bcf_hdr_set_samples_failed_ret
9557 #define __pyx_kp_u_bcf_index_required __pyx_mstate_global->__pyx_kp_u_bcf_index_required
9558 #define __pyx_kp_u_bcf_must_not_be_None __pyx_mstate_global->__pyx_kp_u_bcf_must_not_be_None
9559 #define __pyx_n_s_bcf_object_to_array_locals_genex __pyx_mstate_global->__pyx_n_s_bcf_object_to_array_locals_genex
9560 #define __pyx_n_u_bcguz __pyx_mstate_global->__pyx_n_u_bcguz
9561 #define __pyx_n_u_bcguz0123456789ex __pyx_mstate_global->__pyx_n_u_bcguz0123456789ex
9562 #define __pyx_n_s_bgzfp __pyx_mstate_global->__pyx_n_s_bgzfp
9563 #define __pyx_n_s_bkey __pyx_mstate_global->__pyx_n_s_bkey
9564 #define __pyx_n_s_bline __pyx_mstate_global->__pyx_n_s_bline
9565 #define __pyx_kp_u_cannot_convert_deleted_record_to __pyx_mstate_global->__pyx_kp_u_cannot_convert_deleted_record_to
9566 #define __pyx_kp_u_cannot_create_VariantHeader __pyx_mstate_global->__pyx_kp_u_cannot_create_VariantHeader
9567 #define __pyx_kp_u_cannot_create_VariantRecord __pyx_mstate_global->__pyx_kp_u_cannot_create_VariantRecord
9568 #define __pyx_kp_u_cannot_create_VariantRecordSampl __pyx_mstate_global->__pyx_kp_u_cannot_create_VariantRecordSampl
9569 #define __pyx_kp_u_cannot_fetch_from_Variantfile_op __pyx_mstate_global->__pyx_kp_u_cannot_fetch_from_Variantfile_op
9570 #define __pyx_kp_u_cannot_find_metadata_key __pyx_mstate_global->__pyx_kp_u_cannot_find_metadata_key
9571 #define __pyx_kp_u_cannot_iterate_over_Variantfile __pyx_mstate_global->__pyx_kp_u_cannot_iterate_over_Variantfile
9572 #define __pyx_kp_u_cannot_set_null_allele __pyx_mstate_global->__pyx_kp_u_cannot_set_null_allele
9573 #define __pyx_kp_u_cannot_set_null_alt_allele __pyx_mstate_global->__pyx_kp_u_cannot_set_null_alt_allele
9574 #define __pyx_kp_u_cannot_subset_samples_after_fetc __pyx_mstate_global->__pyx_kp_u_cannot_subset_samples_after_fetc
9575 #define __pyx_kp_u_cannot_subset_samples_from_Varia __pyx_mstate_global->__pyx_kp_u_cannot_subset_samples_from_Varia
9576 #define __pyx_kp_u_cannot_write_to_a_Variantfile_op __pyx_mstate_global->__pyx_kp_u_cannot_write_to_a_Variantfile_op
9577 #define __pyx_n_s_cfilename __pyx_mstate_global->__pyx_n_s_cfilename
9578 #define __pyx_n_s_char_array_to_tuple_locals_genex __pyx_mstate_global->__pyx_n_s_char_array_to_tuple_locals_genex
9579 #define __pyx_n_s_check_truncation __pyx_mstate_global->__pyx_n_s_check_truncation
9580 #define __pyx_n_s_chr __pyx_mstate_global->__pyx_n_s_chr
9581 #define __pyx_n_s_cindex_filename __pyx_mstate_global->__pyx_n_s_cindex_filename
9582 #define __pyx_n_s_ckey __pyx_mstate_global->__pyx_n_s_ckey
9583 #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
9584 #define __pyx_n_s_clear __pyx_mstate_global->__pyx_n_s_clear
9585 #define __pyx_n_s_clear_header __pyx_mstate_global->__pyx_n_s_clear_header
9586 #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
9587 #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
9588 #define __pyx_n_s_cmode __pyx_mstate_global->__pyx_n_s_cmode
9589 #define __pyx_n_s_contig __pyx_mstate_global->__pyx_n_s_contig
9590 #define __pyx_n_u_contig __pyx_mstate_global->__pyx_n_u_contig
9591 #define __pyx_kp_u_contig_must_be_specified __pyx_mstate_global->__pyx_kp_u_contig_must_be_specified
9592 #define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
9593 #define __pyx_kp_u_could_not_open_file_mode __pyx_mstate_global->__pyx_kp_u_could_not_open_file_mode
9594 #define __pyx_kp_u_could_not_open_variant_file __pyx_mstate_global->__pyx_kp_u_could_not_open_variant_file
9595 #define __pyx_kp_u_could_not_open_variant_file_2 __pyx_mstate_global->__pyx_kp_u_could_not_open_variant_file_2
9596 #define __pyx_n_s_d __pyx_mstate_global->__pyx_n_s_d
9597 #define __pyx_n_s_default __pyx_mstate_global->__pyx_n_s_default
9598 #define __pyx_n_s_description __pyx_mstate_global->__pyx_n_s_description
9599 #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
9600 #define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
9601 #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
9602 #define __pyx_n_s_drop_samples __pyx_mstate_global->__pyx_n_s_drop_samples
9603 #define __pyx_n_s_dst_hdr __pyx_mstate_global->__pyx_n_s_dst_hdr
9604 #define __pyx_n_s_dst_header __pyx_mstate_global->__pyx_n_s_dst_header
9605 #define __pyx_kp_u_dst_header_must_not_be_None __pyx_mstate_global->__pyx_kp_u_dst_header_must_not_be_None
9606 #define __pyx_n_s_duplicate_filehandle __pyx_mstate_global->__pyx_n_s_duplicate_filehandle
9607 #define __pyx_kp_u_either_value_or_items_must_be_sp __pyx_mstate_global->__pyx_kp_u_either_value_or_items_must_be_sp
9608 #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
9609 #define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end
9610 #define __pyx_n_s_endswith __pyx_mstate_global->__pyx_n_s_endswith
9611 #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
9612 #define __pyx_kp_u_error_in_bcf_subset_format __pyx_mstate_global->__pyx_kp_u_error_in_bcf_subset_format
9613 #define __pyx_kp_u_error_in_vcf_parse __pyx_mstate_global->__pyx_kp_u_error_in_vcf_parse
9614 #define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f
9615 #define __pyx_n_s_fetch __pyx_mstate_global->__pyx_n_s_fetch
9616 #define __pyx_kp_u_fetch_requires_an_index __pyx_mstate_global->__pyx_kp_u_fetch_requires_an_index
9617 #define __pyx_kp_u_file_does_not_have_valid_header __pyx_mstate_global->__pyx_kp_u_file_does_not_have_valid_header
9618 #define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename
9619 #define __pyx_n_s_filter __pyx_mstate_global->__pyx_n_s_filter
9620 #define __pyx_n_s_fmt __pyx_mstate_global->__pyx_n_s_fmt
9621 #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
9622 #define __pyx_n_s_format_modes __pyx_mstate_global->__pyx_n_s_format_modes
9623 #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
9624 #define __pyx_n_s_genexpr __pyx_mstate_global->__pyx_n_s_genexpr
9625 #define __pyx_kp_u_genotype_is_only_valid_as_a_form __pyx_mstate_global->__pyx_kp_u_genotype_is_only_valid_as_a_form
9626 #define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
9627 #define __pyx_n_s_get_reference_name __pyx_mstate_global->__pyx_n_s_get_reference_name
9628 #define __pyx_n_s_get_tid __pyx_mstate_global->__pyx_n_s_get_tid
9629 #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
9630 #define __pyx_kp_u_gz __pyx_mstate_global->__pyx_kp_u_gz
9631 #define __pyx_n_s_hash __pyx_mstate_global->__pyx_n_s_hash
9632 #define __pyx_n_s_hdr __pyx_mstate_global->__pyx_n_s_hdr
9633 #define __pyx_n_s_header __pyx_mstate_global->__pyx_n_s_header
9634 #define __pyx_kp_u_header_must_not_be_None __pyx_mstate_global->__pyx_kp_u_header_must_not_be_None
9635 #define __pyx_n_s_hrec __pyx_mstate_global->__pyx_n_s_hrec
9636 #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
9637 #define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
9638 #define __pyx_n_s_idx __pyx_mstate_global->__pyx_n_s_idx
9639 #define __pyx_n_s_ignore_truncation __pyx_mstate_global->__pyx_n_s_ignore_truncation
9640 #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
9641 #define __pyx_n_s_include_samples __pyx_mstate_global->__pyx_n_s_include_samples
9642 #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
9643 #define __pyx_n_s_index_filename __pyx_mstate_global->__pyx_n_s_index_filename
9644 #define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info
9645 #define __pyx_n_s_info_id __pyx_mstate_global->__pyx_n_s_info_id
9646 #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
9647 #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
9648 #define __pyx_kp_u_invalid_FORMAT __pyx_mstate_global->__pyx_kp_u_invalid_FORMAT
9649 #define __pyx_kp_u_invalid_VariantHeader __pyx_mstate_global->__pyx_kp_u_invalid_VariantHeader
9650 #define __pyx_kp_u_invalid_VariantRecord __pyx_mstate_global->__pyx_kp_u_invalid_VariantRecord
9651 #define __pyx_kp_u_invalid_character_found __pyx_mstate_global->__pyx_kp_u_invalid_character_found
9652 #define __pyx_kp_u_invalid_contig __pyx_mstate_global->__pyx_kp_u_invalid_contig
9653 #define __pyx_kp_u_invalid_contig_2 __pyx_mstate_global->__pyx_kp_u_invalid_contig_2
9654 #define __pyx_kp_u_invalid_contig_id __pyx_mstate_global->__pyx_kp_u_invalid_contig_id
9655 #define __pyx_kp_u_invalid_contig_index __pyx_mstate_global->__pyx_kp_u_invalid_contig_index
9656 #define __pyx_kp_u_invalid_file_mode_is_it_VCF_BCF __pyx_mstate_global->__pyx_kp_u_invalid_file_mode_is_it_VCF_BCF
9657 #define __pyx_kp_u_invalid_filter_index __pyx_mstate_global->__pyx_kp_u_invalid_filter_index
9658 #define __pyx_kp_u_invalid_header_line __pyx_mstate_global->__pyx_kp_u_invalid_header_line
9659 #define __pyx_kp_u_invalid_header_record_index __pyx_mstate_global->__pyx_kp_u_invalid_header_record_index
9660 #define __pyx_kp_u_invalid_key __pyx_mstate_global->__pyx_kp_u_invalid_key
9661 #define __pyx_kp_u_invalid_metadata_id __pyx_mstate_global->__pyx_kp_u_invalid_metadata_id
9662 #define __pyx_kp_u_invalid_metadata_type __pyx_mstate_global->__pyx_kp_u_invalid_metadata_type
9663 #define __pyx_kp_u_invalid_mode_options __pyx_mstate_global->__pyx_kp_u_invalid_mode_options
9664 #define __pyx_n_s_invalid_modes __pyx_mstate_global->__pyx_n_s_invalid_modes
9665 #define __pyx_kp_u_invalid_number_of_columns __pyx_mstate_global->__pyx_kp_u_invalid_number_of_columns
9666 #define __pyx_kp_u_invalid_reference_id __pyx_mstate_global->__pyx_kp_u_invalid_reference_id
9667 #define __pyx_kp_u_invalid_sample_index __pyx_mstate_global->__pyx_kp_u_invalid_sample_index
9668 #define __pyx_kp_u_invalid_sample_name __pyx_mstate_global->__pyx_kp_u_invalid_sample_name
9669 #define __pyx_kp_u_invalid_tag __pyx_mstate_global->__pyx_kp_u_invalid_tag
9670 #define __pyx_kp_u_invalid_value_for_Float_format __pyx_mstate_global->__pyx_kp_u_invalid_value_for_Float_format
9671 #define __pyx_kp_u_invalid_value_for_Integer_format __pyx_mstate_global->__pyx_kp_u_invalid_value_for_Integer_format
9672 #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
9673 #define __pyx_n_s_is_open __pyx_mstate_global->__pyx_n_s_is_open
9674 #define __pyx_n_s_is_valid_tid __pyx_mstate_global->__pyx_n_s_is_valid_tid
9675 #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
9676 #define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items
9677 #define __pyx_n_s_iter __pyx_mstate_global->__pyx_n_s_iter
9678 #define __pyx_n_s_iteritems __pyx_mstate_global->__pyx_n_s_iteritems
9679 #define __pyx_n_s_iterkeys __pyx_mstate_global->__pyx_n_s_iterkeys
9680 #define __pyx_n_s_itervalues __pyx_mstate_global->__pyx_n_s_itervalues
9681 #define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join
9682 #define __pyx_n_s_k __pyx_mstate_global->__pyx_n_s_k
9683 #define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key
9684 #define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys
9685 #define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs
9686 #define __pyx_n_s_length __pyx_mstate_global->__pyx_n_s_length
9687 #define __pyx_n_u_length __pyx_mstate_global->__pyx_n_u_length
9688 #define __pyx_kp_u_limits_violated __pyx_mstate_global->__pyx_kp_u_limits_violated
9689 #define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line
9690 #define __pyx_n_s_m __pyx_mstate_global->__pyx_n_s_m
9691 #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
9692 #define __pyx_n_s_merge __pyx_mstate_global->__pyx_n_s_merge
9693 #define __pyx_kp_u_missing_d_requested_samples __pyx_mstate_global->__pyx_kp_u_missing_d_requested_samples
9694 #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
9695 #define __pyx_kp_u_mode_contains_conflicting_format __pyx_mstate_global->__pyx_kp_u_mode_contains_conflicting_format
9696 #define __pyx_kp_u_mode_must_begin_with_r_w_or_a __pyx_mstate_global->__pyx_kp_u_mode_must_begin_with_r_w_or_a
9697 #define __pyx_n_s_msg __pyx_mstate_global->__pyx_n_s_msg
9698 #define __pyx_kp_u_must_set_at_least_2_alleles __pyx_mstate_global->__pyx_kp_u_must_set_at_least_2_alleles
9699 #define __pyx_n_s_n __pyx_mstate_global->__pyx_n_s_n
9700 #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
9701 #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
9702 #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
9703 #define __pyx_n_s_new_record __pyx_mstate_global->__pyx_n_s_new_record
9704 #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
9705 #define __pyx_n_s_number __pyx_mstate_global->__pyx_n_s_number
9706 #define __pyx_n_s_object __pyx_mstate_global->__pyx_n_s_object
9707 #define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open
9708 #define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
9709 #define __pyx_n_s_parse_region __pyx_mstate_global->__pyx_n_s_parse_region
9710 #define __pyx_n_s_phased __pyx_mstate_global->__pyx_n_s_phased
9711 #define __pyx_n_u_phased __pyx_mstate_global->__pyx_n_u_phased
9712 #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
9713 #define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop
9714 #define __pyx_n_s_pysam_libcbcf __pyx_mstate_global->__pyx_n_s_pysam_libcbcf
9715 #define __pyx_kp_s_pysam_libcbcf_pyx __pyx_mstate_global->__pyx_kp_s_pysam_libcbcf_pyx
9716 #define __pyx_n_s_pysam_utils __pyx_mstate_global->__pyx_n_s_pysam_utils
9717 #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
9718 #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
9719 #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
9720 #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
9721 #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
9722 #define __pyx_n_s_pyx_unpickle_BaseIndex __pyx_mstate_global->__pyx_n_s_pyx_unpickle_BaseIndex
9723 #define __pyx_n_s_pyx_unpickle_VariantContig __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantContig
9724 #define __pyx_n_s_pyx_unpickle_VariantHeaderCont __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantHeaderCont
9725 #define __pyx_n_s_pyx_unpickle_VariantHeaderMeta __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantHeaderMeta
9726 #define __pyx_n_s_pyx_unpickle_VariantHeaderReco __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantHeaderReco
9727 #define __pyx_n_s_pyx_unpickle_VariantHeaderSamp __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantHeaderSamp
9728 #define __pyx_n_s_pyx_unpickle_VariantMetadata __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantMetadata
9729 #define __pyx_n_s_pyx_unpickle_VariantRecordFilt __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantRecordFilt
9730 #define __pyx_n_s_pyx_unpickle_VariantRecordForm __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantRecordForm
9731 #define __pyx_n_s_pyx_unpickle_VariantRecordInfo __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantRecordInfo
9732 #define __pyx_n_s_pyx_unpickle_VariantRecordSamp __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantRecordSamp
9733 #define __pyx_n_s_pyx_unpickle_VariantRecordSamp_2 __pyx_mstate_global->__pyx_n_s_pyx_unpickle_VariantRecordSamp_2
9734 #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
9735 #define __pyx_n_s_qual __pyx_mstate_global->__pyx_n_s_qual
9736 #define __pyx_n_s_quoted __pyx_mstate_global->__pyx_n_s_quoted
9737 #define __pyx_n_b_r __pyx_mstate_global->__pyx_n_b_r
9738 #define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r
9739 #define __pyx_n_u_r __pyx_mstate_global->__pyx_n_u_r
9740 #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
9741 #define __pyx_n_s_rec __pyx_mstate_global->__pyx_n_s_rec
9742 #define __pyx_n_s_record __pyx_mstate_global->__pyx_n_s_record
9743 #define __pyx_kp_u_record_must_not_be_None __pyx_mstate_global->__pyx_kp_u_record_must_not_be_None
9744 #define __pyx_n_s_records __pyx_mstate_global->__pyx_n_s_records
9745 #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
9746 #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
9747 #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
9748 #define __pyx_n_s_ref __pyx_mstate_global->__pyx_n_s_ref
9749 #define __pyx_kp_u_ref_allele_must_not_be_null __pyx_mstate_global->__pyx_kp_u_ref_allele_must_not_be_null
9750 #define __pyx_n_s_reference __pyx_mstate_global->__pyx_n_s_reference
9751 #define __pyx_n_s_region __pyx_mstate_global->__pyx_n_s_region
9752 #define __pyx_n_s_remap __pyx_mstate_global->__pyx_n_s_remap
9753 #define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove
9754 #define __pyx_n_s_remove_header __pyx_mstate_global->__pyx_n_s_remove_header
9755 #define __pyx_n_s_reopen __pyx_mstate_global->__pyx_n_s_reopen
9756 #define __pyx_n_s_reset __pyx_mstate_global->__pyx_n_s_reset
9757 #define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret
9758 #define __pyx_n_s_reversed __pyx_mstate_global->__pyx_n_s_reversed
9759 #define __pyx_n_s_rid __pyx_mstate_global->__pyx_n_s_rid
9760 #define __pyx_n_u_rwa __pyx_mstate_global->__pyx_n_u_rwa
9761 #define __pyx_n_s_sample __pyx_mstate_global->__pyx_n_s_sample
9762 #define __pyx_kp_u_sample_must_not_be_None __pyx_mstate_global->__pyx_kp_u_sample_must_not_be_None
9763 #define __pyx_n_s_samples __pyx_mstate_global->__pyx_n_s_samples
9764 #define __pyx_n_s_seek __pyx_mstate_global->__pyx_n_s_seek
9765 #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
9766 #define __pyx_kp_s_self_iter_cannot_be_converted_to __pyx_mstate_global->__pyx_kp_s_self_iter_cannot_be_converted_to
9767 #define __pyx_kp_s_self_ptr_cannot_be_converted_to __pyx_mstate_global->__pyx_kp_s_self_ptr_cannot_be_converted_to
9768 #define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send
9769 #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
9770 #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
9771 #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
9772 #define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
9773 #define __pyx_n_s_src_hdr __pyx_mstate_global->__pyx_n_s_src_hdr
9774 #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
9775 #define __pyx_n_s_startswith __pyx_mstate_global->__pyx_n_s_startswith
9776 #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
9777 #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
9778 #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
9779 #define __pyx_n_s_strip __pyx_mstate_global->__pyx_n_s_strip
9780 #define __pyx_n_s_subset_samples __pyx_mstate_global->__pyx_n_s_subset_samples
9781 #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
9782 #define __pyx_kp_u_tabix_index_required __pyx_mstate_global->__pyx_kp_u_tabix_index_required
9783 #define __pyx_n_s_tell __pyx_mstate_global->__pyx_n_s_tell
9784 #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
9785 #define __pyx_kp_u_this_class_cannot_be_instantiate __pyx_mstate_global->__pyx_kp_u_this_class_cannot_be_instantiate
9786 #define __pyx_n_s_threads __pyx_mstate_global->__pyx_n_s_threads
9787 #define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw
9788 #define __pyx_n_s_tid __pyx_mstate_global->__pyx_n_s_tid
9789 #define __pyx_n_s_tidx __pyx_mstate_global->__pyx_n_s_tidx
9790 #define __pyx_n_s_translate __pyx_mstate_global->__pyx_n_s_translate
9791 #define __pyx_kp_u_truncated_file __pyx_mstate_global->__pyx_kp_u_truncated_file
9792 #define __pyx_n_s_type __pyx_mstate_global->__pyx_n_s_type
9793 #define __pyx_kp_u_unable_to_allocate_BCF_record __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_BCF_record
9794 #define __pyx_kp_u_unable_to_fetch __pyx_mstate_global->__pyx_kp_u_unable_to_fetch
9795 #define __pyx_kp_u_unable_to_fetch_next_record __pyx_mstate_global->__pyx_kp_u_unable_to_fetch_next_record
9796 #define __pyx_kp_u_unable_to_parse_next_record __pyx_mstate_global->__pyx_kp_u_unable_to_parse_next_record
9797 #define __pyx_kp_u_unable_to_reallocate_VariantHead __pyx_mstate_global->__pyx_kp_u_unable_to_reallocate_VariantHead
9798 #define __pyx_kp_u_unknown_INFO __pyx_mstate_global->__pyx_kp_u_unknown_INFO
9799 #define __pyx_kp_u_unknown_format __pyx_mstate_global->__pyx_kp_u_unknown_format
9800 #define __pyx_kp_u_unknown_mode __pyx_mstate_global->__pyx_kp_u_unknown_mode
9801 #define __pyx_kp_u_unknown_type_specified __pyx_mstate_global->__pyx_kp_u_unknown_type_specified
9802 #define __pyx_n_s_unquoted_str __pyx_mstate_global->__pyx_n_s_unquoted_str
9803 #define __pyx_kp_u_unsupported_header_type_code __pyx_mstate_global->__pyx_kp_u_unsupported_header_type_code
9804 #define __pyx_kp_u_unsupported_info_type_code __pyx_mstate_global->__pyx_kp_u_unsupported_info_type_code
9805 #define __pyx_kp_u_unsupported_type __pyx_mstate_global->__pyx_kp_u_unsupported_type
9806 #define __pyx_kp_u_unsupported_types __pyx_mstate_global->__pyx_kp_u_unsupported_types
9807 #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
9808 #define __pyx_n_s_upper __pyx_mstate_global->__pyx_n_s_upper
9809 #define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
9810 #define __pyx_kp_u_utf_8 __pyx_mstate_global->__pyx_kp_u_utf_8
9811 #define __pyx_n_s_v __pyx_mstate_global->__pyx_n_s_v
9812 #define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
9813 #define __pyx_kp_u_value_expected_to_be_scalar_give __pyx_mstate_global->__pyx_kp_u_value_expected_to_be_scalar_give
9814 #define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values
9815 #define __pyx_kp_u_values_expected_to_be_tuple_give __pyx_mstate_global->__pyx_kp_u_values_expected_to_be_tuple_give
9816 #define __pyx_n_s_vars __pyx_mstate_global->__pyx_n_s_vars
9817 #define __pyx_kp_u_vcf_format_failed __pyx_mstate_global->__pyx_kp_u_vcf_format_failed
9818 #define __pyx_n_b_w __pyx_mstate_global->__pyx_n_b_w
9819 #define __pyx_n_u_w __pyx_mstate_global->__pyx_n_u_w
9820 #define __pyx_n_u_wb __pyx_mstate_global->__pyx_n_u_wb
9821 #define __pyx_n_u_wb0 __pyx_mstate_global->__pyx_n_u_wb0
9822 #define __pyx_n_u_wbu __pyx_mstate_global->__pyx_n_u_wbu
9823 #define __pyx_n_s_write __pyx_mstate_global->__pyx_n_s_write
9824 #define __pyx_n_u_wz __pyx_mstate_global->__pyx_n_u_wz
9825 #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
9826 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
9827 #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
9828 #define __pyx_int_10091417 __pyx_mstate_global->__pyx_int_10091417
9829 #define __pyx_int_10698032 __pyx_mstate_global->__pyx_int_10698032
9830 #define __pyx_int_31479882 __pyx_mstate_global->__pyx_int_31479882
9831 #define __pyx_int_33440904 __pyx_mstate_global->__pyx_int_33440904
9832 #define __pyx_int_39264352 __pyx_mstate_global->__pyx_int_39264352
9833 #define __pyx_int_41264896 __pyx_mstate_global->__pyx_int_41264896
9834 #define __pyx_int_93650198 __pyx_mstate_global->__pyx_int_93650198
9835 #define __pyx_int_94171383 __pyx_mstate_global->__pyx_int_94171383
9836 #define __pyx_int_97976187 __pyx_mstate_global->__pyx_int_97976187
9837 #define __pyx_int_118286449 __pyx_mstate_global->__pyx_int_118286449
9838 #define __pyx_int_126454353 __pyx_mstate_global->__pyx_int_126454353
9839 #define __pyx_int_135711299 __pyx_mstate_global->__pyx_int_135711299
9840 #define __pyx_int_145625440 __pyx_mstate_global->__pyx_int_145625440
9841 #define __pyx_int_164668780 __pyx_mstate_global->__pyx_int_164668780
9842 #define __pyx_int_168021462 __pyx_mstate_global->__pyx_int_168021462
9843 #define __pyx_int_199651019 __pyx_mstate_global->__pyx_int_199651019
9844 #define __pyx_int_215036767 __pyx_mstate_global->__pyx_int_215036767
9845 #define __pyx_int_227765731 __pyx_mstate_global->__pyx_int_227765731
9846 #define __pyx_int_232881935 __pyx_mstate_global->__pyx_int_232881935
9847 #define __pyx_int_248899179 __pyx_mstate_global->__pyx_int_248899179
9848 #define __pyx_int_250317299 __pyx_mstate_global->__pyx_int_250317299
9849 #define __pyx_int_4294967294 __pyx_mstate_global->__pyx_int_4294967294
9850 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
9851 #define __pyx_k__41 __pyx_mstate_global->__pyx_k__41
9852 #define __pyx_k__146 __pyx_mstate_global->__pyx_k__146
9853 #define __pyx_k__158 __pyx_mstate_global->__pyx_k__158
9854 #define __pyx_k__193 __pyx_mstate_global->__pyx_k__193
9855 #define __pyx_k__206 __pyx_mstate_global->__pyx_k__206
9856 #define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_
9857 #define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3
9858 #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
9859 #define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5
9860 #define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6
9861 #define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7
9862 #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
9863 #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
9864 #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
9865 #define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
9866 #define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
9867 #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
9868 #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
9869 #define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
9870 #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
9871 #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18
9872 #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
9873 #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
9874 #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
9875 #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
9876 #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
9877 #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
9878 #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
9879 #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
9880 #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
9881 #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
9882 #define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
9883 #define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
9884 #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31
9885 #define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
9886 #define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43
9887 #define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47
9888 #define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48
9889 #define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51
9890 #define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57
9891 #define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
9892 #define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60
9893 #define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61
9894 #define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76
9895 #define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
9896 #define __pyx_tuple__88 __pyx_mstate_global->__pyx_tuple__88
9897 #define __pyx_tuple__91 __pyx_mstate_global->__pyx_tuple__91
9898 #define __pyx_tuple__95 __pyx_mstate_global->__pyx_tuple__95
9899 #define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98
9900 #define __pyx_slice__240 __pyx_mstate_global->__pyx_slice__240
9901 #define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100
9902 #define __pyx_tuple__103 __pyx_mstate_global->__pyx_tuple__103
9903 #define __pyx_tuple__105 __pyx_mstate_global->__pyx_tuple__105
9904 #define __pyx_tuple__106 __pyx_mstate_global->__pyx_tuple__106
9905 #define __pyx_tuple__111 __pyx_mstate_global->__pyx_tuple__111
9906 #define __pyx_tuple__123 __pyx_mstate_global->__pyx_tuple__123
9907 #define __pyx_tuple__124 __pyx_mstate_global->__pyx_tuple__124
9908 #define __pyx_tuple__135 __pyx_mstate_global->__pyx_tuple__135
9909 #define __pyx_tuple__136 __pyx_mstate_global->__pyx_tuple__136
9910 #define __pyx_tuple__164 __pyx_mstate_global->__pyx_tuple__164
9911 #define __pyx_tuple__165 __pyx_mstate_global->__pyx_tuple__165
9912 #define __pyx_tuple__166 __pyx_mstate_global->__pyx_tuple__166
9913 #define __pyx_tuple__167 __pyx_mstate_global->__pyx_tuple__167
9914 #define __pyx_tuple__168 __pyx_mstate_global->__pyx_tuple__168
9915 #define __pyx_tuple__169 __pyx_mstate_global->__pyx_tuple__169
9916 #define __pyx_tuple__170 __pyx_mstate_global->__pyx_tuple__170
9917 #define __pyx_tuple__171 __pyx_mstate_global->__pyx_tuple__171
9918 #define __pyx_tuple__172 __pyx_mstate_global->__pyx_tuple__172
9919 #define __pyx_tuple__173 __pyx_mstate_global->__pyx_tuple__173
9920 #define __pyx_tuple__174 __pyx_mstate_global->__pyx_tuple__174
9921 #define __pyx_tuple__175 __pyx_mstate_global->__pyx_tuple__175
9922 #define __pyx_tuple__176 __pyx_mstate_global->__pyx_tuple__176
9923 #define __pyx_tuple__177 __pyx_mstate_global->__pyx_tuple__177
9924 #define __pyx_tuple__180 __pyx_mstate_global->__pyx_tuple__180
9925 #define __pyx_tuple__182 __pyx_mstate_global->__pyx_tuple__182
9926 #define __pyx_tuple__183 __pyx_mstate_global->__pyx_tuple__183
9927 #define __pyx_tuple__197 __pyx_mstate_global->__pyx_tuple__197
9928 #define __pyx_tuple__210 __pyx_mstate_global->__pyx_tuple__210
9929 #define __pyx_tuple__219 __pyx_mstate_global->__pyx_tuple__219
9930 #define __pyx_tuple__220 __pyx_mstate_global->__pyx_tuple__220
9931 #define __pyx_tuple__221 __pyx_mstate_global->__pyx_tuple__221
9932 #define __pyx_tuple__222 __pyx_mstate_global->__pyx_tuple__222
9933 #define __pyx_tuple__223 __pyx_mstate_global->__pyx_tuple__223
9934 #define __pyx_tuple__224 __pyx_mstate_global->__pyx_tuple__224
9935 #define __pyx_tuple__227 __pyx_mstate_global->__pyx_tuple__227
9936 #define __pyx_tuple__228 __pyx_mstate_global->__pyx_tuple__228
9937 #define __pyx_tuple__232 __pyx_mstate_global->__pyx_tuple__232
9938 #define __pyx_tuple__233 __pyx_mstate_global->__pyx_tuple__233
9939 #define __pyx_tuple__234 __pyx_mstate_global->__pyx_tuple__234
9940 #define __pyx_tuple__236 __pyx_mstate_global->__pyx_tuple__236
9941 #define __pyx_tuple__238 __pyx_mstate_global->__pyx_tuple__238
9942 #define __pyx_tuple__239 __pyx_mstate_global->__pyx_tuple__239
9943 #define __pyx_tuple__242 __pyx_mstate_global->__pyx_tuple__242
9944 #define __pyx_tuple__247 __pyx_mstate_global->__pyx_tuple__247
9945 #define __pyx_tuple__249 __pyx_mstate_global->__pyx_tuple__249
9946 #define __pyx_tuple__250 __pyx_mstate_global->__pyx_tuple__250
9947 #define __pyx_tuple__253 __pyx_mstate_global->__pyx_tuple__253
9948 #define __pyx_tuple__255 __pyx_mstate_global->__pyx_tuple__255
9949 #define __pyx_tuple__256 __pyx_mstate_global->__pyx_tuple__256
9950 #define __pyx_tuple__260 __pyx_mstate_global->__pyx_tuple__260
9951 #define __pyx_tuple__262 __pyx_mstate_global->__pyx_tuple__262
9952 #define __pyx_tuple__264 __pyx_mstate_global->__pyx_tuple__264
9953 #define __pyx_tuple__266 __pyx_mstate_global->__pyx_tuple__266
9954 #define __pyx_tuple__270 __pyx_mstate_global->__pyx_tuple__270
9955 #define __pyx_tuple__275 __pyx_mstate_global->__pyx_tuple__275
9956 #define __pyx_tuple__277 __pyx_mstate_global->__pyx_tuple__277
9957 #define __pyx_tuple__279 __pyx_mstate_global->__pyx_tuple__279
9958 #define __pyx_tuple__280 __pyx_mstate_global->__pyx_tuple__280
9959 #define __pyx_tuple__281 __pyx_mstate_global->__pyx_tuple__281
9960 #define __pyx_tuple__282 __pyx_mstate_global->__pyx_tuple__282
9961 #define __pyx_tuple__283 __pyx_mstate_global->__pyx_tuple__283
9962 #define __pyx_tuple__284 __pyx_mstate_global->__pyx_tuple__284
9963 #define __pyx_tuple__285 __pyx_mstate_global->__pyx_tuple__285
9964 #define __pyx_tuple__286 __pyx_mstate_global->__pyx_tuple__286
9965 #define __pyx_tuple__287 __pyx_mstate_global->__pyx_tuple__287
9966 #define __pyx_tuple__288 __pyx_mstate_global->__pyx_tuple__288
9967 #define __pyx_tuple__289 __pyx_mstate_global->__pyx_tuple__289
9968 #define __pyx_tuple__290 __pyx_mstate_global->__pyx_tuple__290
9969 #define __pyx_tuple__291 __pyx_mstate_global->__pyx_tuple__291
9970 #define __pyx_tuple__292 __pyx_mstate_global->__pyx_tuple__292
9971 #define __pyx_tuple__293 __pyx_mstate_global->__pyx_tuple__293
9972 #define __pyx_tuple__294 __pyx_mstate_global->__pyx_tuple__294
9973 #define __pyx_tuple__295 __pyx_mstate_global->__pyx_tuple__295
9974 #define __pyx_tuple__296 __pyx_mstate_global->__pyx_tuple__296
9975 #define __pyx_tuple__297 __pyx_mstate_global->__pyx_tuple__297
9976 #define __pyx_tuple__298 __pyx_mstate_global->__pyx_tuple__298
9977 #define __pyx_tuple__299 __pyx_mstate_global->__pyx_tuple__299
9978 #define __pyx_tuple__300 __pyx_mstate_global->__pyx_tuple__300
9979 #define __pyx_tuple__301 __pyx_mstate_global->__pyx_tuple__301
9980 #define __pyx_tuple__302 __pyx_mstate_global->__pyx_tuple__302
9981 #define __pyx_tuple__303 __pyx_mstate_global->__pyx_tuple__303
9982 #define __pyx_tuple__304 __pyx_mstate_global->__pyx_tuple__304
9983 #define __pyx_tuple__305 __pyx_mstate_global->__pyx_tuple__305
9984 #define __pyx_tuple__306 __pyx_mstate_global->__pyx_tuple__306
9985 #define __pyx_tuple__307 __pyx_mstate_global->__pyx_tuple__307
9986 #define __pyx_tuple__308 __pyx_mstate_global->__pyx_tuple__308
9987 #define __pyx_tuple__309 __pyx_mstate_global->__pyx_tuple__309
9988 #define __pyx_tuple__310 __pyx_mstate_global->__pyx_tuple__310
9989 #define __pyx_tuple__311 __pyx_mstate_global->__pyx_tuple__311
9990 #define __pyx_tuple__312 __pyx_mstate_global->__pyx_tuple__312
9991 #define __pyx_tuple__313 __pyx_mstate_global->__pyx_tuple__313
9992 #define __pyx_tuple__314 __pyx_mstate_global->__pyx_tuple__314
9993 #define __pyx_tuple__315 __pyx_mstate_global->__pyx_tuple__315
9994 #define __pyx_tuple__316 __pyx_mstate_global->__pyx_tuple__316
9995 #define __pyx_tuple__317 __pyx_mstate_global->__pyx_tuple__317
9996 #define __pyx_tuple__318 __pyx_mstate_global->__pyx_tuple__318
9997 #define __pyx_tuple__319 __pyx_mstate_global->__pyx_tuple__319
9998 #define __pyx_tuple__320 __pyx_mstate_global->__pyx_tuple__320
9999 #define __pyx_tuple__321 __pyx_mstate_global->__pyx_tuple__321
10000 #define __pyx_tuple__322 __pyx_mstate_global->__pyx_tuple__322
10001 #define __pyx_tuple__324 __pyx_mstate_global->__pyx_tuple__324
10002 #define __pyx_tuple__325 __pyx_mstate_global->__pyx_tuple__325
10003 #define __pyx_tuple__326 __pyx_mstate_global->__pyx_tuple__326
10004 #define __pyx_tuple__327 __pyx_mstate_global->__pyx_tuple__327
10005 #define __pyx_tuple__328 __pyx_mstate_global->__pyx_tuple__328
10006 #define __pyx_tuple__329 __pyx_mstate_global->__pyx_tuple__329
10007 #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
10008 #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34
10009 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
10010 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36
10011 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
10012 #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38
10013 #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
10014 #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40
10015 #define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42
10016 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44
10017 #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45
10018 #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46
10019 #define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49
10020 #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50
10021 #define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54
10022 #define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55
10023 #define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56
10024 #define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59
10025 #define __pyx_codeobj__62 __pyx_mstate_global->__pyx_codeobj__62
10026 #define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63
10027 #define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64
10028 #define __pyx_codeobj__65 __pyx_mstate_global->__pyx_codeobj__65
10029 #define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66
10030 #define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67
10031 #define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68
10032 #define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69
10033 #define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70
10034 #define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71
10035 #define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72
10036 #define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73
10037 #define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74
10038 #define __pyx_codeobj__75 __pyx_mstate_global->__pyx_codeobj__75
10039 #define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78
10040 #define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79
10041 #define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80
10042 #define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81
10043 #define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82
10044 #define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83
10045 #define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84
10046 #define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85
10047 #define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86
10048 #define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87
10049 #define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89
10050 #define __pyx_codeobj__90 __pyx_mstate_global->__pyx_codeobj__90
10051 #define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92
10052 #define __pyx_codeobj__93 __pyx_mstate_global->__pyx_codeobj__93
10053 #define __pyx_codeobj__94 __pyx_mstate_global->__pyx_codeobj__94
10054 #define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96
10055 #define __pyx_codeobj__97 __pyx_mstate_global->__pyx_codeobj__97
10056 #define __pyx_codeobj__99 __pyx_mstate_global->__pyx_codeobj__99
10057 #define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101
10058 #define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102
10059 #define __pyx_codeobj__104 __pyx_mstate_global->__pyx_codeobj__104
10060 #define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107
10061 #define __pyx_codeobj__108 __pyx_mstate_global->__pyx_codeobj__108
10062 #define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109
10063 #define __pyx_codeobj__110 __pyx_mstate_global->__pyx_codeobj__110
10064 #define __pyx_codeobj__112 __pyx_mstate_global->__pyx_codeobj__112
10065 #define __pyx_codeobj__113 __pyx_mstate_global->__pyx_codeobj__113
10066 #define __pyx_codeobj__114 __pyx_mstate_global->__pyx_codeobj__114
10067 #define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115
10068 #define __pyx_codeobj__116 __pyx_mstate_global->__pyx_codeobj__116
10069 #define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117
10070 #define __pyx_codeobj__118 __pyx_mstate_global->__pyx_codeobj__118
10071 #define __pyx_codeobj__119 __pyx_mstate_global->__pyx_codeobj__119
10072 #define __pyx_codeobj__120 __pyx_mstate_global->__pyx_codeobj__120
10073 #define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121
10074 #define __pyx_codeobj__122 __pyx_mstate_global->__pyx_codeobj__122
10075 #define __pyx_codeobj__125 __pyx_mstate_global->__pyx_codeobj__125
10076 #define __pyx_codeobj__126 __pyx_mstate_global->__pyx_codeobj__126
10077 #define __pyx_codeobj__127 __pyx_mstate_global->__pyx_codeobj__127
10078 #define __pyx_codeobj__128 __pyx_mstate_global->__pyx_codeobj__128
10079 #define __pyx_codeobj__129 __pyx_mstate_global->__pyx_codeobj__129
10080 #define __pyx_codeobj__130 __pyx_mstate_global->__pyx_codeobj__130
10081 #define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131
10082 #define __pyx_codeobj__132 __pyx_mstate_global->__pyx_codeobj__132
10083 #define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133
10084 #define __pyx_codeobj__134 __pyx_mstate_global->__pyx_codeobj__134
10085 #define __pyx_codeobj__137 __pyx_mstate_global->__pyx_codeobj__137
10086 #define __pyx_codeobj__138 __pyx_mstate_global->__pyx_codeobj__138
10087 #define __pyx_codeobj__139 __pyx_mstate_global->__pyx_codeobj__139
10088 #define __pyx_codeobj__140 __pyx_mstate_global->__pyx_codeobj__140
10089 #define __pyx_codeobj__141 __pyx_mstate_global->__pyx_codeobj__141
10090 #define __pyx_codeobj__142 __pyx_mstate_global->__pyx_codeobj__142
10091 #define __pyx_codeobj__143 __pyx_mstate_global->__pyx_codeobj__143
10092 #define __pyx_codeobj__144 __pyx_mstate_global->__pyx_codeobj__144
10093 #define __pyx_codeobj__145 __pyx_mstate_global->__pyx_codeobj__145
10094 #define __pyx_codeobj__147 __pyx_mstate_global->__pyx_codeobj__147
10095 #define __pyx_codeobj__148 __pyx_mstate_global->__pyx_codeobj__148
10096 #define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149
10097 #define __pyx_codeobj__150 __pyx_mstate_global->__pyx_codeobj__150
10098 #define __pyx_codeobj__151 __pyx_mstate_global->__pyx_codeobj__151
10099 #define __pyx_codeobj__152 __pyx_mstate_global->__pyx_codeobj__152
10100 #define __pyx_codeobj__153 __pyx_mstate_global->__pyx_codeobj__153
10101 #define __pyx_codeobj__154 __pyx_mstate_global->__pyx_codeobj__154
10102 #define __pyx_codeobj__155 __pyx_mstate_global->__pyx_codeobj__155
10103 #define __pyx_codeobj__156 __pyx_mstate_global->__pyx_codeobj__156
10104 #define __pyx_codeobj__157 __pyx_mstate_global->__pyx_codeobj__157
10105 #define __pyx_codeobj__159 __pyx_mstate_global->__pyx_codeobj__159
10106 #define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160
10107 #define __pyx_codeobj__161 __pyx_mstate_global->__pyx_codeobj__161
10108 #define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162
10109 #define __pyx_codeobj__163 __pyx_mstate_global->__pyx_codeobj__163
10110 #define __pyx_codeobj__178 __pyx_mstate_global->__pyx_codeobj__178
10111 #define __pyx_codeobj__179 __pyx_mstate_global->__pyx_codeobj__179
10112 #define __pyx_codeobj__184 __pyx_mstate_global->__pyx_codeobj__184
10113 #define __pyx_codeobj__185 __pyx_mstate_global->__pyx_codeobj__185
10114 #define __pyx_codeobj__186 __pyx_mstate_global->__pyx_codeobj__186
10115 #define __pyx_codeobj__187 __pyx_mstate_global->__pyx_codeobj__187
10116 #define __pyx_codeobj__188 __pyx_mstate_global->__pyx_codeobj__188
10117 #define __pyx_codeobj__189 __pyx_mstate_global->__pyx_codeobj__189
10118 #define __pyx_codeobj__190 __pyx_mstate_global->__pyx_codeobj__190
10119 #define __pyx_codeobj__191 __pyx_mstate_global->__pyx_codeobj__191
10120 #define __pyx_codeobj__192 __pyx_mstate_global->__pyx_codeobj__192
10121 #define __pyx_codeobj__194 __pyx_mstate_global->__pyx_codeobj__194
10122 #define __pyx_codeobj__195 __pyx_mstate_global->__pyx_codeobj__195
10123 #define __pyx_codeobj__196 __pyx_mstate_global->__pyx_codeobj__196
10124 #define __pyx_codeobj__198 __pyx_mstate_global->__pyx_codeobj__198
10125 #define __pyx_codeobj__199 __pyx_mstate_global->__pyx_codeobj__199
10126 #define __pyx_codeobj__200 __pyx_mstate_global->__pyx_codeobj__200
10127 #define __pyx_codeobj__201 __pyx_mstate_global->__pyx_codeobj__201
10128 #define __pyx_codeobj__202 __pyx_mstate_global->__pyx_codeobj__202
10129 #define __pyx_codeobj__203 __pyx_mstate_global->__pyx_codeobj__203
10130 #define __pyx_codeobj__204 __pyx_mstate_global->__pyx_codeobj__204
10131 #define __pyx_codeobj__205 __pyx_mstate_global->__pyx_codeobj__205
10132 #define __pyx_codeobj__207 __pyx_mstate_global->__pyx_codeobj__207
10133 #define __pyx_codeobj__208 __pyx_mstate_global->__pyx_codeobj__208
10134 #define __pyx_codeobj__209 __pyx_mstate_global->__pyx_codeobj__209
10135 #define __pyx_codeobj__211 __pyx_mstate_global->__pyx_codeobj__211
10136 #define __pyx_codeobj__212 __pyx_mstate_global->__pyx_codeobj__212
10137 #define __pyx_codeobj__213 __pyx_mstate_global->__pyx_codeobj__213
10138 #define __pyx_codeobj__214 __pyx_mstate_global->__pyx_codeobj__214
10139 #define __pyx_codeobj__215 __pyx_mstate_global->__pyx_codeobj__215
10140 #define __pyx_codeobj__216 __pyx_mstate_global->__pyx_codeobj__216
10141 #define __pyx_codeobj__217 __pyx_mstate_global->__pyx_codeobj__217
10142 #define __pyx_codeobj__218 __pyx_mstate_global->__pyx_codeobj__218
10143 #define __pyx_codeobj__225 __pyx_mstate_global->__pyx_codeobj__225
10144 #define __pyx_codeobj__226 __pyx_mstate_global->__pyx_codeobj__226
10145 #define __pyx_codeobj__229 __pyx_mstate_global->__pyx_codeobj__229
10146 #define __pyx_codeobj__230 __pyx_mstate_global->__pyx_codeobj__230
10147 #define __pyx_codeobj__231 __pyx_mstate_global->__pyx_codeobj__231
10148 #define __pyx_codeobj__235 __pyx_mstate_global->__pyx_codeobj__235
10149 #define __pyx_codeobj__237 __pyx_mstate_global->__pyx_codeobj__237
10150 #define __pyx_codeobj__243 __pyx_mstate_global->__pyx_codeobj__243
10151 #define __pyx_codeobj__244 __pyx_mstate_global->__pyx_codeobj__244
10152 #define __pyx_codeobj__245 __pyx_mstate_global->__pyx_codeobj__245
10153 #define __pyx_codeobj__246 __pyx_mstate_global->__pyx_codeobj__246
10154 #define __pyx_codeobj__248 __pyx_mstate_global->__pyx_codeobj__248
10155 #define __pyx_codeobj__251 __pyx_mstate_global->__pyx_codeobj__251
10156 #define __pyx_codeobj__252 __pyx_mstate_global->__pyx_codeobj__252
10157 #define __pyx_codeobj__254 __pyx_mstate_global->__pyx_codeobj__254
10158 #define __pyx_codeobj__257 __pyx_mstate_global->__pyx_codeobj__257
10159 #define __pyx_codeobj__258 __pyx_mstate_global->__pyx_codeobj__258
10160 #define __pyx_codeobj__259 __pyx_mstate_global->__pyx_codeobj__259
10161 #define __pyx_codeobj__261 __pyx_mstate_global->__pyx_codeobj__261
10162 #define __pyx_codeobj__263 __pyx_mstate_global->__pyx_codeobj__263
10163 #define __pyx_codeobj__265 __pyx_mstate_global->__pyx_codeobj__265
10164 #define __pyx_codeobj__267 __pyx_mstate_global->__pyx_codeobj__267
10165 #define __pyx_codeobj__268 __pyx_mstate_global->__pyx_codeobj__268
10166 #define __pyx_codeobj__269 __pyx_mstate_global->__pyx_codeobj__269
10167 #define __pyx_codeobj__271 __pyx_mstate_global->__pyx_codeobj__271
10168 #define __pyx_codeobj__272 __pyx_mstate_global->__pyx_codeobj__272
10169 #define __pyx_codeobj__273 __pyx_mstate_global->__pyx_codeobj__273
10170 #define __pyx_codeobj__274 __pyx_mstate_global->__pyx_codeobj__274
10171 #define __pyx_codeobj__276 __pyx_mstate_global->__pyx_codeobj__276
10172 /* #### Code section: module_code ### */
10173
10174 /* "cpython/complex.pxd":19
10175 *
10176 * @property
10177 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<<
10178 * return self.cval.real
10179 *
10180 */
10181
10182 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
10183 double __pyx_r;
10184
10185 /* "cpython/complex.pxd":20
10186 * @property
10187 * cdef inline double real(self) noexcept:
10188 * return self.cval.real # <<<<<<<<<<<<<<
10189 *
10190 * @property
10191 */
10192 __pyx_r = __pyx_v_self->cval.real;
10193 goto __pyx_L0;
10194
10195 /* "cpython/complex.pxd":19
10196 *
10197 * @property
10198 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<<
10199 * return self.cval.real
10200 *
10201 */
10202
10203 /* function exit code */
10204 __pyx_L0:;
10205 return __pyx_r;
10206 }
10207
10208 /* "cpython/complex.pxd":23
10209 *
10210 * @property
10211 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<<
10212 * return self.cval.imag
10213 *
10214 */
10215
10216 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
10217 double __pyx_r;
10218
10219 /* "cpython/complex.pxd":24
10220 * @property
10221 * cdef inline double imag(self) noexcept:
10222 * return self.cval.imag # <<<<<<<<<<<<<<
10223 *
10224 * # PyTypeObject PyComplex_Type
10225 */
10226 __pyx_r = __pyx_v_self->cval.imag;
10227 goto __pyx_L0;
10228
10229 /* "cpython/complex.pxd":23
10230 *
10231 * @property
10232 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<<
10233 * return self.cval.imag
10234 *
10235 */
10236
10237 /* function exit code */
10238 __pyx_L0:;
10239 return __pyx_r;
10240 }
10241
10242 /* "cpython/contextvars.pxd":112
10243 *
10244 *
10245 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
10246 * """Return a new reference to the value of the context variable,
10247 * or the default value of the context variable,
10248 */
10249
10250 static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {
10251 PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
10252 PyObject *__pyx_v_value;
10253 PyObject *__pyx_v_pyvalue = NULL;
10254 PyObject *__pyx_r = NULL;
10255 __Pyx_RefNannyDeclarations
10256 int __pyx_t_1;
10257 int __pyx_t_2;
10258 PyObject *__pyx_t_3 = NULL;
10259 int __pyx_lineno = 0;
10260 const char *__pyx_filename = NULL;
10261 int __pyx_clineno = 0;
10262 __Pyx_RefNannySetupContext("get_value", 1);
10263 if (__pyx_optional_args) {
10264 if (__pyx_optional_args->__pyx_n > 0) {
10265 __pyx_v_default_value = __pyx_optional_args->default_value;
10266 }
10267 }
10268
10269 /* "cpython/contextvars.pxd":117
10270 * or None if no such value or default was found.
10271 * """
10272 * cdef PyObject *value = NULL # <<<<<<<<<<<<<<
10273 * PyContextVar_Get(var, NULL, &value)
10274 * if value is NULL:
10275 */
10276 __pyx_v_value = NULL;
10277
10278 /* "cpython/contextvars.pxd":118
10279 * """
10280 * cdef PyObject *value = NULL
10281 * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<<
10282 * if value is NULL:
10283 * # context variable does not have a default
10284 */
10285 __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 118, __pyx_L1_error)
10286
10287 /* "cpython/contextvars.pxd":119
10288 * cdef PyObject *value = NULL
10289 * PyContextVar_Get(var, NULL, &value)
10290 * if value is NULL: # <<<<<<<<<<<<<<
10291 * # context variable does not have a default
10292 * pyvalue = default_value
10293 */
10294 __pyx_t_2 = (__pyx_v_value == NULL);
10295 if (__pyx_t_2) {
10296
10297 /* "cpython/contextvars.pxd":121
10298 * if value is NULL:
10299 * # context variable does not have a default
10300 * pyvalue = default_value # <<<<<<<<<<<<<<
10301 * else:
10302 * # value or default value of context variable
10303 */
10304 __Pyx_INCREF(__pyx_v_default_value);
10305 __pyx_v_pyvalue = __pyx_v_default_value;
10306
10307 /* "cpython/contextvars.pxd":119
10308 * cdef PyObject *value = NULL
10309 * PyContextVar_Get(var, NULL, &value)
10310 * if value is NULL: # <<<<<<<<<<<<<<
10311 * # context variable does not have a default
10312 * pyvalue = default_value
10313 */
10314 goto __pyx_L3;
10315 }
10316
10317 /* "cpython/contextvars.pxd":124
10318 * else:
10319 * # value or default value of context variable
10320 * pyvalue = <object>value # <<<<<<<<<<<<<<
10321 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
10322 * return pyvalue
10323 */
10324 /*else*/ {
10325 __pyx_t_3 = ((PyObject *)__pyx_v_value);
10326 __Pyx_INCREF(__pyx_t_3);
10327 __pyx_v_pyvalue = __pyx_t_3;
10328 __pyx_t_3 = 0;
10329
10330 /* "cpython/contextvars.pxd":125
10331 * # value or default value of context variable
10332 * pyvalue = <object>value
10333 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<<
10334 * return pyvalue
10335 *
10336 */
10337 Py_XDECREF(__pyx_v_value);
10338 }
10339 __pyx_L3:;
10340
10341 /* "cpython/contextvars.pxd":126
10342 * pyvalue = <object>value
10343 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
10344 * return pyvalue # <<<<<<<<<<<<<<
10345 *
10346 *
10347 */
10348 __Pyx_XDECREF(__pyx_r);
10349 __Pyx_INCREF(__pyx_v_pyvalue);
10350 __pyx_r = __pyx_v_pyvalue;
10351 goto __pyx_L0;
10352
10353 /* "cpython/contextvars.pxd":112
10354 *
10355 *
10356 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
10357 * """Return a new reference to the value of the context variable,
10358 * or the default value of the context variable,
10359 */
10360
10361 /* function exit code */
10362 __pyx_L1_error:;
10363 __Pyx_XDECREF(__pyx_t_3);
10364 __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
10365 __pyx_r = 0;
10366 __pyx_L0:;
10367 __Pyx_XDECREF(__pyx_v_pyvalue);
10368 __Pyx_XGIVEREF(__pyx_r);
10369 __Pyx_RefNannyFinishContext();
10370 return __pyx_r;
10371 }
10372
10373 /* "cpython/contextvars.pxd":129
10374 *
10375 *
10376 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
10377 * """Return a new reference to the value of the context variable,
10378 * or the provided default value if no such value was found.
10379 */
10380
10381 static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {
10382 PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
10383 PyObject *__pyx_v_value;
10384 PyObject *__pyx_v_pyvalue = NULL;
10385 PyObject *__pyx_r = NULL;
10386 __Pyx_RefNannyDeclarations
10387 int __pyx_t_1;
10388 PyObject *__pyx_t_2 = NULL;
10389 int __pyx_lineno = 0;
10390 const char *__pyx_filename = NULL;
10391 int __pyx_clineno = 0;
10392 __Pyx_RefNannySetupContext("get_value_no_default", 1);
10393 if (__pyx_optional_args) {
10394 if (__pyx_optional_args->__pyx_n > 0) {
10395 __pyx_v_default_value = __pyx_optional_args->default_value;
10396 }
10397 }
10398
10399 /* "cpython/contextvars.pxd":135
10400 * Ignores the default value of the context variable, if any.
10401 * """
10402 * cdef PyObject *value = NULL # <<<<<<<<<<<<<<
10403 * PyContextVar_Get(var, <PyObject*>default_value, &value)
10404 * # value of context variable or 'default_value'
10405 */
10406 __pyx_v_value = NULL;
10407
10408 /* "cpython/contextvars.pxd":136
10409 * """
10410 * cdef PyObject *value = NULL
10411 * PyContextVar_Get(var, <PyObject*>default_value, &value) # <<<<<<<<<<<<<<
10412 * # value of context variable or 'default_value'
10413 * pyvalue = <object>value
10414 */
10415 __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 136, __pyx_L1_error)
10416
10417 /* "cpython/contextvars.pxd":138
10418 * PyContextVar_Get(var, <PyObject*>default_value, &value)
10419 * # value of context variable or 'default_value'
10420 * pyvalue = <object>value # <<<<<<<<<<<<<<
10421 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
10422 * return pyvalue
10423 */
10424 __pyx_t_2 = ((PyObject *)__pyx_v_value);
10425 __Pyx_INCREF(__pyx_t_2);
10426 __pyx_v_pyvalue = __pyx_t_2;
10427 __pyx_t_2 = 0;
10428
10429 /* "cpython/contextvars.pxd":139
10430 * # value of context variable or 'default_value'
10431 * pyvalue = <object>value
10432 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<<
10433 * return pyvalue
10434 */
10435 Py_XDECREF(__pyx_v_value);
10436
10437 /* "cpython/contextvars.pxd":140
10438 * pyvalue = <object>value
10439 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
10440 * return pyvalue # <<<<<<<<<<<<<<
10441 */
10442 __Pyx_XDECREF(__pyx_r);
10443 __Pyx_INCREF(__pyx_v_pyvalue);
10444 __pyx_r = __pyx_v_pyvalue;
10445 goto __pyx_L0;
10446
10447 /* "cpython/contextvars.pxd":129
10448 *
10449 *
10450 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
10451 * """Return a new reference to the value of the context variable,
10452 * or the provided default value if no such value was found.
10453 */
10454
10455 /* function exit code */
10456 __pyx_L1_error:;
10457 __Pyx_XDECREF(__pyx_t_2);
10458 __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
10459 __pyx_r = 0;
10460 __pyx_L0:;
10461 __Pyx_XDECREF(__pyx_v_pyvalue);
10462 __Pyx_XGIVEREF(__pyx_r);
10463 __Pyx_RefNannyFinishContext();
10464 return __pyx_r;
10465 }
10466
10467 /* "array.pxd":104
10468 * __data_union data
10469 *
10470 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
10471 * # This implementation of getbuffer is geared towards Cython
10472 * # requirements, and does not yet fulfill the PEP.
10473 */
10474
10475 /* Python wrapper */
10476 CYTHON_UNUSED static int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
10477 CYTHON_UNUSED static int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
10478 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10479 int __pyx_r;
10480 __Pyx_RefNannyDeclarations
10481 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
10482 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10483 __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
10484
10485 /* function exit code */
10486 __Pyx_RefNannyFinishContext();
10487 return __pyx_r;
10488 }
10489
10490 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) {
10491 PyObject *__pyx_v_item_count = NULL;
10492 int __pyx_r;
10493 __Pyx_RefNannyDeclarations
10494 PyObject *__pyx_t_1 = NULL;
10495 char *__pyx_t_2;
10496 int __pyx_t_3;
10497 PyObject *__pyx_t_4 = NULL;
10498 Py_ssize_t __pyx_t_5;
10499 int __pyx_t_6;
10500 char __pyx_t_7;
10501 int __pyx_lineno = 0;
10502 const char *__pyx_filename = NULL;
10503 int __pyx_clineno = 0;
10504 if (unlikely(__pyx_v_info == NULL)) {
10505 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
10506 return -1;
10507 }
10508 __Pyx_RefNannySetupContext("__getbuffer__", 0);
10509 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
10510 __Pyx_GIVEREF(__pyx_v_info->obj);
10511
10512 /* "array.pxd":109
10513 * # In particular strided access is always provided regardless
10514 * # of flags
10515 * item_count = Py_SIZE(self) # <<<<<<<<<<<<<<
10516 *
10517 * info.suboffsets = NULL
10518 */
10519 __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 109, __pyx_L1_error)
10520 __Pyx_GOTREF(__pyx_t_1);
10521 __pyx_v_item_count = __pyx_t_1;
10522 __pyx_t_1 = 0;
10523
10524 /* "array.pxd":111
10525 * item_count = Py_SIZE(self)
10526 *
10527 * info.suboffsets = NULL # <<<<<<<<<<<<<<
10528 * info.buf = self.data.as_chars
10529 * info.readonly = 0
10530 */
10531 __pyx_v_info->suboffsets = NULL;
10532
10533 /* "array.pxd":112
10534 *
10535 * info.suboffsets = NULL
10536 * info.buf = self.data.as_chars # <<<<<<<<<<<<<<
10537 * info.readonly = 0
10538 * info.ndim = 1
10539 */
10540 __pyx_t_2 = __pyx_v_self->data.as_chars;
10541 __pyx_v_info->buf = __pyx_t_2;
10542
10543 /* "array.pxd":113
10544 * info.suboffsets = NULL
10545 * info.buf = self.data.as_chars
10546 * info.readonly = 0 # <<<<<<<<<<<<<<
10547 * info.ndim = 1
10548 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
10549 */
10550 __pyx_v_info->readonly = 0;
10551
10552 /* "array.pxd":114
10553 * info.buf = self.data.as_chars
10554 * info.readonly = 0
10555 * info.ndim = 1 # <<<<<<<<<<<<<<
10556 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
10557 * info.len = info.itemsize * item_count
10558 */
10559 __pyx_v_info->ndim = 1;
10560
10561 /* "array.pxd":115
10562 * info.readonly = 0
10563 * info.ndim = 1
10564 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<<
10565 * info.len = info.itemsize * item_count
10566 *
10567 */
10568 __pyx_t_3 = __pyx_v_self->ob_descr->itemsize;
10569 __pyx_v_info->itemsize = __pyx_t_3;
10570
10571 /* "array.pxd":116
10572 * info.ndim = 1
10573 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
10574 * info.len = info.itemsize * item_count # <<<<<<<<<<<<<<
10575 *
10576 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
10577 */
10578 __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 116, __pyx_L1_error)
10579 __Pyx_GOTREF(__pyx_t_1);
10580 __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 116, __pyx_L1_error)
10581 __Pyx_GOTREF(__pyx_t_4);
10582 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10583 __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 116, __pyx_L1_error)
10584 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10585 __pyx_v_info->len = __pyx_t_5;
10586
10587 /* "array.pxd":118
10588 * info.len = info.itemsize * item_count
10589 *
10590 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<<
10591 * if not info.shape:
10592 * raise MemoryError()
10593 */
10594 __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2)));
10595
10596 /* "array.pxd":119
10597 *
10598 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
10599 * if not info.shape: # <<<<<<<<<<<<<<
10600 * raise MemoryError()
10601 * info.shape[0] = item_count # constant regardless of resizing
10602 */
10603 __pyx_t_6 = (!(__pyx_v_info->shape != 0));
10604 if (unlikely(__pyx_t_6)) {
10605
10606 /* "array.pxd":120
10607 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
10608 * if not info.shape:
10609 * raise MemoryError() # <<<<<<<<<<<<<<
10610 * info.shape[0] = item_count # constant regardless of resizing
10611 * info.strides = &info.itemsize
10612 */
10613 PyErr_NoMemory(); __PYX_ERR(2, 120, __pyx_L1_error)
10614
10615 /* "array.pxd":119
10616 *
10617 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
10618 * if not info.shape: # <<<<<<<<<<<<<<
10619 * raise MemoryError()
10620 * info.shape[0] = item_count # constant regardless of resizing
10621 */
10622 }
10623
10624 /* "array.pxd":121
10625 * if not info.shape:
10626 * raise MemoryError()
10627 * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<<
10628 * info.strides = &info.itemsize
10629 *
10630 */
10631 __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 121, __pyx_L1_error)
10632 (__pyx_v_info->shape[0]) = __pyx_t_5;
10633
10634 /* "array.pxd":122
10635 * raise MemoryError()
10636 * info.shape[0] = item_count # constant regardless of resizing
10637 * info.strides = &info.itemsize # <<<<<<<<<<<<<<
10638 *
10639 * info.format = <char*> (info.shape + 1)
10640 */
10641 __pyx_v_info->strides = (&__pyx_v_info->itemsize);
10642
10643 /* "array.pxd":124
10644 * info.strides = &info.itemsize
10645 *
10646 * info.format = <char*> (info.shape + 1) # <<<<<<<<<<<<<<
10647 * info.format[0] = self.ob_descr.typecode
10648 * info.format[1] = 0
10649 */
10650 __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1));
10651
10652 /* "array.pxd":125
10653 *
10654 * info.format = <char*> (info.shape + 1)
10655 * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<<
10656 * info.format[1] = 0
10657 * info.obj = self
10658 */
10659 __pyx_t_7 = __pyx_v_self->ob_descr->typecode;
10660 (__pyx_v_info->format[0]) = __pyx_t_7;
10661
10662 /* "array.pxd":126
10663 * info.format = <char*> (info.shape + 1)
10664 * info.format[0] = self.ob_descr.typecode
10665 * info.format[1] = 0 # <<<<<<<<<<<<<<
10666 * info.obj = self
10667 *
10668 */
10669 (__pyx_v_info->format[1]) = 0;
10670
10671 /* "array.pxd":127
10672 * info.format[0] = self.ob_descr.typecode
10673 * info.format[1] = 0
10674 * info.obj = self # <<<<<<<<<<<<<<
10675 *
10676 * def __releasebuffer__(self, Py_buffer* info):
10677 */
10678 __Pyx_INCREF((PyObject *)__pyx_v_self);
10679 __Pyx_GIVEREF((PyObject *)__pyx_v_self);
10680 __Pyx_GOTREF(__pyx_v_info->obj);
10681 __Pyx_DECREF(__pyx_v_info->obj);
10682 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
10683
10684 /* "array.pxd":104
10685 * __data_union data
10686 *
10687 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
10688 * # This implementation of getbuffer is geared towards Cython
10689 * # requirements, and does not yet fulfill the PEP.
10690 */
10691
10692 /* function exit code */
10693 __pyx_r = 0;
10694 goto __pyx_L0;
10695 __pyx_L1_error:;
10696 __Pyx_XDECREF(__pyx_t_1);
10697 __Pyx_XDECREF(__pyx_t_4);
10698 __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10699 __pyx_r = -1;
10700 if (__pyx_v_info->obj != NULL) {
10701 __Pyx_GOTREF(__pyx_v_info->obj);
10702 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
10703 }
10704 goto __pyx_L2;
10705 __pyx_L0:;
10706 if (__pyx_v_info->obj == Py_None) {
10707 __Pyx_GOTREF(__pyx_v_info->obj);
10708 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
10709 }
10710 __pyx_L2:;
10711 __Pyx_XDECREF(__pyx_v_item_count);
10712 __Pyx_RefNannyFinishContext();
10713 return __pyx_r;
10714 }
10715
10716 /* "array.pxd":129
10717 * info.obj = self
10718 *
10719 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<<
10720 * PyObject_Free(info.shape)
10721 *
10722 */
10723
10724 /* Python wrapper */
10725 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
10726 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
10727 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10728 __Pyx_RefNannyDeclarations
10729 __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
10730 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10731 __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
10732
10733 /* function exit code */
10734 __Pyx_RefNannyFinishContext();
10735 }
10736
10737 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) {
10738
10739 /* "array.pxd":130
10740 *
10741 * def __releasebuffer__(self, Py_buffer* info):
10742 * PyObject_Free(info.shape) # <<<<<<<<<<<<<<
10743 *
10744 * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr)
10745 */
10746 PyObject_Free(__pyx_v_info->shape);
10747
10748 /* "array.pxd":129
10749 * info.obj = self
10750 *
10751 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<<
10752 * PyObject_Free(info.shape)
10753 *
10754 */
10755
10756 /* function exit code */
10757 }
10758
10759 /* "array.pxd":141
10760 *
10761 *
10762 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<<
10763 * """ fast creation of a new array, given a template array.
10764 * type will be same as template.
10765 */
10766
10767 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) {
10768 arrayobject *__pyx_v_op = 0;
10769 arrayobject *__pyx_r = NULL;
10770 __Pyx_RefNannyDeclarations
10771 PyObject *__pyx_t_1 = NULL;
10772 int __pyx_t_2;
10773 int __pyx_t_3;
10774 int __pyx_lineno = 0;
10775 const char *__pyx_filename = NULL;
10776 int __pyx_clineno = 0;
10777 __Pyx_RefNannySetupContext("clone", 1);
10778
10779 /* "array.pxd":145
10780 * type will be same as template.
10781 * if zero is true, new array will be initialized with zeroes."""
10782 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<<
10783 * if zero and op is not None:
10784 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
10785 */
10786 __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 145, __pyx_L1_error)
10787 __Pyx_GOTREF(__pyx_t_1);
10788 __pyx_v_op = ((arrayobject *)__pyx_t_1);
10789 __pyx_t_1 = 0;
10790
10791 /* "array.pxd":146
10792 * if zero is true, new array will be initialized with zeroes."""
10793 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
10794 * if zero and op is not None: # <<<<<<<<<<<<<<
10795 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
10796 * return op
10797 */
10798 if (__pyx_v_zero) {
10799 } else {
10800 __pyx_t_2 = __pyx_v_zero;
10801 goto __pyx_L4_bool_binop_done;
10802 }
10803 __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None);
10804 __pyx_t_2 = __pyx_t_3;
10805 __pyx_L4_bool_binop_done:;
10806 if (__pyx_t_2) {
10807
10808 /* "array.pxd":147
10809 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
10810 * if zero and op is not None:
10811 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<<
10812 * return op
10813 *
10814 */
10815 (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize)));
10816
10817 /* "array.pxd":146
10818 * if zero is true, new array will be initialized with zeroes."""
10819 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
10820 * if zero and op is not None: # <<<<<<<<<<<<<<
10821 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
10822 * return op
10823 */
10824 }
10825
10826 /* "array.pxd":148
10827 * if zero and op is not None:
10828 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
10829 * return op # <<<<<<<<<<<<<<
10830 *
10831 * cdef inline array copy(array self):
10832 */
10833 __Pyx_XDECREF((PyObject *)__pyx_r);
10834 __Pyx_INCREF((PyObject *)__pyx_v_op);
10835 __pyx_r = __pyx_v_op;
10836 goto __pyx_L0;
10837
10838 /* "array.pxd":141
10839 *
10840 *
10841 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<<
10842 * """ fast creation of a new array, given a template array.
10843 * type will be same as template.
10844 */
10845
10846 /* function exit code */
10847 __pyx_L1_error:;
10848 __Pyx_XDECREF(__pyx_t_1);
10849 __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
10850 __pyx_r = 0;
10851 __pyx_L0:;
10852 __Pyx_XDECREF((PyObject *)__pyx_v_op);
10853 __Pyx_XGIVEREF((PyObject *)__pyx_r);
10854 __Pyx_RefNannyFinishContext();
10855 return __pyx_r;
10856 }
10857
10858 /* "array.pxd":150
10859 * return op
10860 *
10861 * cdef inline array copy(array self): # <<<<<<<<<<<<<<
10862 * """ make a copy of an array. """
10863 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
10864 */
10865
10866 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
10867 arrayobject *__pyx_v_op = 0;
10868 arrayobject *__pyx_r = NULL;
10869 __Pyx_RefNannyDeclarations
10870 PyObject *__pyx_t_1 = NULL;
10871 int __pyx_lineno = 0;
10872 const char *__pyx_filename = NULL;
10873 int __pyx_clineno = 0;
10874 __Pyx_RefNannySetupContext("copy", 1);
10875
10876 /* "array.pxd":152
10877 * cdef inline array copy(array self):
10878 * """ make a copy of an array. """
10879 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<<
10880 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
10881 * return op
10882 */
10883 __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 152, __pyx_L1_error)
10884 __Pyx_GOTREF(__pyx_t_1);
10885 __pyx_v_op = ((arrayobject *)__pyx_t_1);
10886 __pyx_t_1 = 0;
10887
10888 /* "array.pxd":153
10889 * """ make a copy of an array. """
10890 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
10891 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<<
10892 * return op
10893 *
10894 */
10895 (void)(memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize)));
10896
10897 /* "array.pxd":154
10898 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
10899 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
10900 * return op # <<<<<<<<<<<<<<
10901 *
10902 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:
10903 */
10904 __Pyx_XDECREF((PyObject *)__pyx_r);
10905 __Pyx_INCREF((PyObject *)__pyx_v_op);
10906 __pyx_r = __pyx_v_op;
10907 goto __pyx_L0;
10908
10909 /* "array.pxd":150
10910 * return op
10911 *
10912 * cdef inline array copy(array self): # <<<<<<<<<<<<<<
10913 * """ make a copy of an array. """
10914 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
10915 */
10916
10917 /* function exit code */
10918 __pyx_L1_error:;
10919 __Pyx_XDECREF(__pyx_t_1);
10920 __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
10921 __pyx_r = 0;
10922 __pyx_L0:;
10923 __Pyx_XDECREF((PyObject *)__pyx_v_op);
10924 __Pyx_XGIVEREF((PyObject *)__pyx_r);
10925 __Pyx_RefNannyFinishContext();
10926 return __pyx_r;
10927 }
10928
10929 /* "array.pxd":156
10930 * return op
10931 *
10932 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<<
10933 * """ efficient appending of new stuff of same type
10934 * (e.g. of same array type)
10935 */
10936
10937 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) {
10938 Py_ssize_t __pyx_v_itemsize;
10939 Py_ssize_t __pyx_v_origsize;
10940 int __pyx_r;
10941 int __pyx_t_1;
10942 int __pyx_lineno = 0;
10943 const char *__pyx_filename = NULL;
10944 int __pyx_clineno = 0;
10945
10946 /* "array.pxd":160
10947 * (e.g. of same array type)
10948 * n: number of elements (not number of bytes!) """
10949 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<<
10950 * cdef Py_ssize_t origsize = Py_SIZE(self)
10951 * resize_smart(self, origsize + n)
10952 */
10953 __pyx_t_1 = __pyx_v_self->ob_descr->itemsize;
10954 __pyx_v_itemsize = __pyx_t_1;
10955
10956 /* "array.pxd":161
10957 * n: number of elements (not number of bytes!) """
10958 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize
10959 * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<<
10960 * resize_smart(self, origsize + n)
10961 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
10962 */
10963 __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self));
10964
10965 /* "array.pxd":162
10966 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize
10967 * cdef Py_ssize_t origsize = Py_SIZE(self)
10968 * resize_smart(self, origsize + n) # <<<<<<<<<<<<<<
10969 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
10970 * return 0
10971 */
10972 __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 162, __pyx_L1_error)
10973
10974 /* "array.pxd":163
10975 * cdef Py_ssize_t origsize = Py_SIZE(self)
10976 * resize_smart(self, origsize + n)
10977 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<<
10978 * return 0
10979 *
10980 */
10981 (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize)));
10982
10983 /* "array.pxd":164
10984 * resize_smart(self, origsize + n)
10985 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
10986 * return 0 # <<<<<<<<<<<<<<
10987 *
10988 * cdef inline int extend(array self, array other) except -1:
10989 */
10990 __pyx_r = 0;
10991 goto __pyx_L0;
10992
10993 /* "array.pxd":156
10994 * return op
10995 *
10996 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<<
10997 * """ efficient appending of new stuff of same type
10998 * (e.g. of same array type)
10999 */
11000
11001 /* function exit code */
11002 __pyx_L1_error:;
11003 __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
11004 __pyx_r = -1;
11005 __pyx_L0:;
11006 return __pyx_r;
11007 }
11008
11009 /* "array.pxd":166
11010 * return 0
11011 *
11012 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<<
11013 * """ extend array with data from another array; types must match. """
11014 * if self.ob_descr.typecode != other.ob_descr.typecode:
11015 */
11016
11017 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
11018 int __pyx_r;
11019 int __pyx_t_1;
11020 int __pyx_t_2;
11021 int __pyx_lineno = 0;
11022 const char *__pyx_filename = NULL;
11023 int __pyx_clineno = 0;
11024
11025 /* "array.pxd":168
11026 * cdef inline int extend(array self, array other) except -1:
11027 * """ extend array with data from another array; types must match. """
11028 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<<
11029 * PyErr_BadArgument()
11030 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
11031 */
11032 __pyx_t_1 = (__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode);
11033 if (__pyx_t_1) {
11034
11035 /* "array.pxd":169
11036 * """ extend array with data from another array; types must match. """
11037 * if self.ob_descr.typecode != other.ob_descr.typecode:
11038 * PyErr_BadArgument() # <<<<<<<<<<<<<<
11039 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
11040 *
11041 */
11042 __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(2, 169, __pyx_L1_error)
11043
11044 /* "array.pxd":168
11045 * cdef inline int extend(array self, array other) except -1:
11046 * """ extend array with data from another array; types must match. """
11047 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<<
11048 * PyErr_BadArgument()
11049 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
11050 */
11051 }
11052
11053 /* "array.pxd":170
11054 * if self.ob_descr.typecode != other.ob_descr.typecode:
11055 * PyErr_BadArgument()
11056 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<<
11057 *
11058 * cdef inline void zero(array self) noexcept:
11059 */
11060 __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 170, __pyx_L1_error)
11061 __pyx_r = __pyx_t_2;
11062 goto __pyx_L0;
11063
11064 /* "array.pxd":166
11065 * return 0
11066 *
11067 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<<
11068 * """ extend array with data from another array; types must match. """
11069 * if self.ob_descr.typecode != other.ob_descr.typecode:
11070 */
11071
11072 /* function exit code */
11073 __pyx_L1_error:;
11074 __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
11075 __pyx_r = -1;
11076 __pyx_L0:;
11077 return __pyx_r;
11078 }
11079
11080 /* "array.pxd":172
11081 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
11082 *
11083 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<<
11084 * """ set all elements of array to zero. """
11085 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
11086 */
11087
11088 static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
11089
11090 /* "array.pxd":174
11091 * cdef inline void zero(array self) noexcept:
11092 * """ set all elements of array to zero. """
11093 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<<
11094 */
11095 (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize)));
11096
11097 /* "array.pxd":172
11098 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
11099 *
11100 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<<
11101 * """ set all elements of array to zero. """
11102 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
11103 */
11104
11105 /* function exit code */
11106 }
11107
11108 /* "pysam/libcbcf.pyx":163
11109 * cdef dict bcf_str_cache = {}
11110 *
11111 * cdef inline bcf_str_cache_get_charptr(const char* s): # <<<<<<<<<<<<<<
11112 * if s == NULL:
11113 * return None
11114 */
11115
11116 static CYTHON_INLINE PyObject *__pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(char const *__pyx_v_s) {
11117 PyObject *__pyx_v_pystr;
11118 PyObject *__pyx_v_val = NULL;
11119 PyObject *__pyx_r = NULL;
11120 __Pyx_TraceDeclarations
11121 __Pyx_RefNannyDeclarations
11122 int __pyx_t_1;
11123 PyObject *__pyx_t_2 = NULL;
11124 int __pyx_t_3;
11125 int __pyx_lineno = 0;
11126 const char *__pyx_filename = NULL;
11127 int __pyx_clineno = 0;
11128 __Pyx_RefNannySetupContext("bcf_str_cache_get_charptr", 1);
11129 __Pyx_TraceCall("bcf_str_cache_get_charptr", __pyx_f[0], 163, 0, __PYX_ERR(0, 163, __pyx_L1_error));
11130
11131 /* "pysam/libcbcf.pyx":164
11132 *
11133 * cdef inline bcf_str_cache_get_charptr(const char* s):
11134 * if s == NULL: # <<<<<<<<<<<<<<
11135 * return None
11136 *
11137 */
11138 __pyx_t_1 = (__pyx_v_s == NULL);
11139 if (__pyx_t_1) {
11140
11141 /* "pysam/libcbcf.pyx":165
11142 * cdef inline bcf_str_cache_get_charptr(const char* s):
11143 * if s == NULL:
11144 * return None # <<<<<<<<<<<<<<
11145 *
11146 * cdef PyObject *pystr = PyDict_GetItemString(bcf_str_cache, s)
11147 */
11148 __Pyx_XDECREF(__pyx_r);
11149 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11150 goto __pyx_L0;
11151
11152 /* "pysam/libcbcf.pyx":164
11153 *
11154 * cdef inline bcf_str_cache_get_charptr(const char* s):
11155 * if s == NULL: # <<<<<<<<<<<<<<
11156 * return None
11157 *
11158 */
11159 }
11160
11161 /* "pysam/libcbcf.pyx":167
11162 * return None
11163 *
11164 * cdef PyObject *pystr = PyDict_GetItemString(bcf_str_cache, s) # <<<<<<<<<<<<<<
11165 * if pystr:
11166 * return <object>pystr
11167 */
11168 __pyx_t_2 = __pyx_v_5pysam_7libcbcf_bcf_str_cache;
11169 __Pyx_INCREF(__pyx_t_2);
11170 __pyx_v_pystr = PyDict_GetItemString(__pyx_t_2, __pyx_v_s);
11171 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11172
11173 /* "pysam/libcbcf.pyx":168
11174 *
11175 * cdef PyObject *pystr = PyDict_GetItemString(bcf_str_cache, s)
11176 * if pystr: # <<<<<<<<<<<<<<
11177 * return <object>pystr
11178 *
11179 */
11180 __pyx_t_1 = (__pyx_v_pystr != 0);
11181 if (__pyx_t_1) {
11182
11183 /* "pysam/libcbcf.pyx":169
11184 * cdef PyObject *pystr = PyDict_GetItemString(bcf_str_cache, s)
11185 * if pystr:
11186 * return <object>pystr # <<<<<<<<<<<<<<
11187 *
11188 * val = PyUnicode_DecodeUTF8(s, strlen(s), NULL)
11189 */
11190 __Pyx_XDECREF(__pyx_r);
11191 __Pyx_INCREF(((PyObject *)__pyx_v_pystr));
11192 __pyx_r = ((PyObject *)__pyx_v_pystr);
11193 goto __pyx_L0;
11194
11195 /* "pysam/libcbcf.pyx":168
11196 *
11197 * cdef PyObject *pystr = PyDict_GetItemString(bcf_str_cache, s)
11198 * if pystr: # <<<<<<<<<<<<<<
11199 * return <object>pystr
11200 *
11201 */
11202 }
11203
11204 /* "pysam/libcbcf.pyx":171
11205 * return <object>pystr
11206 *
11207 * val = PyUnicode_DecodeUTF8(s, strlen(s), NULL) # <<<<<<<<<<<<<<
11208 *
11209 * PyDict_SetItemString(bcf_str_cache, s, val)
11210 */
11211 __pyx_t_2 = PyUnicode_DecodeUTF8(__pyx_v_s, strlen(__pyx_v_s), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
11212 __Pyx_GOTREF(__pyx_t_2);
11213 __pyx_v_val = ((PyObject*)__pyx_t_2);
11214 __pyx_t_2 = 0;
11215
11216 /* "pysam/libcbcf.pyx":173
11217 * val = PyUnicode_DecodeUTF8(s, strlen(s), NULL)
11218 *
11219 * PyDict_SetItemString(bcf_str_cache, s, val) # <<<<<<<<<<<<<<
11220 *
11221 * return val
11222 */
11223 __pyx_t_2 = __pyx_v_5pysam_7libcbcf_bcf_str_cache;
11224 __Pyx_INCREF(__pyx_t_2);
11225 __pyx_t_3 = PyDict_SetItemString(__pyx_t_2, __pyx_v_s, __pyx_v_val); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 173, __pyx_L1_error)
11226 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11227
11228 /* "pysam/libcbcf.pyx":175
11229 * PyDict_SetItemString(bcf_str_cache, s, val)
11230 *
11231 * return val # <<<<<<<<<<<<<<
11232 *
11233 *
11234 */
11235 __Pyx_XDECREF(__pyx_r);
11236 __Pyx_INCREF(__pyx_v_val);
11237 __pyx_r = __pyx_v_val;
11238 goto __pyx_L0;
11239
11240 /* "pysam/libcbcf.pyx":163
11241 * cdef dict bcf_str_cache = {}
11242 *
11243 * cdef inline bcf_str_cache_get_charptr(const char* s): # <<<<<<<<<<<<<<
11244 * if s == NULL:
11245 * return None
11246 */
11247
11248 /* function exit code */
11249 __pyx_L1_error:;
11250 __Pyx_XDECREF(__pyx_t_2);
11251 __Pyx_AddTraceback("pysam.libcbcf.bcf_str_cache_get_charptr", __pyx_clineno, __pyx_lineno, __pyx_filename);
11252 __pyx_r = 0;
11253 __pyx_L0:;
11254 __Pyx_XDECREF(__pyx_v_val);
11255 __Pyx_XGIVEREF(__pyx_r);
11256 __Pyx_TraceReturn(__pyx_r, 0);
11257 __Pyx_RefNannyFinishContext();
11258 return __pyx_r;
11259 }
11260
11261 /* "pysam/libcbcf.pyx":183
11262 * ########################################################################
11263 *
11264 * cdef int comb(int n, int k) except -1: # <<<<<<<<<<<<<<
11265 * """Return binomial coefficient: n choose k
11266 *
11267 */
11268
11269 static int __pyx_f_5pysam_7libcbcf_comb(int __pyx_v_n, int __pyx_v_k) {
11270 PyObject *__pyx_v_d = 0;
11271 PyObject *__pyx_v_result = 0;
11272 PyObject *__pyx_v_i = NULL;
11273 int __pyx_r;
11274 __Pyx_TraceDeclarations
11275 __Pyx_RefNannyDeclarations
11276 int __pyx_t_1;
11277 PyObject *__pyx_t_2 = NULL;
11278 PyObject *__pyx_t_3 = NULL;
11279 Py_ssize_t __pyx_t_4;
11280 PyObject *(*__pyx_t_5)(PyObject *);
11281 int __pyx_t_6;
11282 int __pyx_lineno = 0;
11283 const char *__pyx_filename = NULL;
11284 int __pyx_clineno = 0;
11285 __Pyx_RefNannySetupContext("comb", 1);
11286 __Pyx_TraceCall("comb", __pyx_f[0], 183, 0, __PYX_ERR(0, 183, __pyx_L1_error));
11287
11288 /* "pysam/libcbcf.pyx":195
11289 * 4950
11290 * """
11291 * if k > n: # <<<<<<<<<<<<<<
11292 * return 0
11293 * elif k == n:
11294 */
11295 __pyx_t_1 = (__pyx_v_k > __pyx_v_n);
11296 if (__pyx_t_1) {
11297
11298 /* "pysam/libcbcf.pyx":196
11299 * """
11300 * if k > n:
11301 * return 0 # <<<<<<<<<<<<<<
11302 * elif k == n:
11303 * return 1
11304 */
11305 __pyx_r = 0;
11306 goto __pyx_L0;
11307
11308 /* "pysam/libcbcf.pyx":195
11309 * 4950
11310 * """
11311 * if k > n: # <<<<<<<<<<<<<<
11312 * return 0
11313 * elif k == n:
11314 */
11315 }
11316
11317 /* "pysam/libcbcf.pyx":197
11318 * if k > n:
11319 * return 0
11320 * elif k == n: # <<<<<<<<<<<<<<
11321 * return 1
11322 * elif k > n // 2:
11323 */
11324 __pyx_t_1 = (__pyx_v_k == __pyx_v_n);
11325 if (__pyx_t_1) {
11326
11327 /* "pysam/libcbcf.pyx":198
11328 * return 0
11329 * elif k == n:
11330 * return 1 # <<<<<<<<<<<<<<
11331 * elif k > n // 2:
11332 * k = n - k
11333 */
11334 __pyx_r = 1;
11335 goto __pyx_L0;
11336
11337 /* "pysam/libcbcf.pyx":197
11338 * if k > n:
11339 * return 0
11340 * elif k == n: # <<<<<<<<<<<<<<
11341 * return 1
11342 * elif k > n // 2:
11343 */
11344 }
11345
11346 /* "pysam/libcbcf.pyx":199
11347 * elif k == n:
11348 * return 1
11349 * elif k > n // 2: # <<<<<<<<<<<<<<
11350 * k = n - k
11351 *
11352 */
11353 __pyx_t_1 = (__pyx_v_k > __Pyx_div_long(__pyx_v_n, 2));
11354 if (__pyx_t_1) {
11355
11356 /* "pysam/libcbcf.pyx":200
11357 * return 1
11358 * elif k > n // 2:
11359 * k = n - k # <<<<<<<<<<<<<<
11360 *
11361 * cdef d, result
11362 */
11363 __pyx_v_k = (__pyx_v_n - __pyx_v_k);
11364
11365 /* "pysam/libcbcf.pyx":199
11366 * elif k == n:
11367 * return 1
11368 * elif k > n // 2: # <<<<<<<<<<<<<<
11369 * k = n - k
11370 *
11371 */
11372 }
11373
11374 /* "pysam/libcbcf.pyx":204
11375 * cdef d, result
11376 *
11377 * d = result = n - k + 1 # <<<<<<<<<<<<<<
11378 * for i in range(2, k + 1):
11379 * d += 1
11380 */
11381 __pyx_t_2 = __Pyx_PyInt_From_long(((__pyx_v_n - __pyx_v_k) + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
11382 __Pyx_GOTREF(__pyx_t_2);
11383 __Pyx_INCREF(__pyx_t_2);
11384 __pyx_v_d = __pyx_t_2;
11385 __Pyx_INCREF(__pyx_t_2);
11386 __pyx_v_result = __pyx_t_2;
11387 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11388
11389 /* "pysam/libcbcf.pyx":205
11390 *
11391 * d = result = n - k + 1
11392 * for i in range(2, k + 1): # <<<<<<<<<<<<<<
11393 * d += 1
11394 * result *= d
11395 */
11396 __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_k + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
11397 __Pyx_GOTREF(__pyx_t_2);
11398 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
11399 __Pyx_GOTREF(__pyx_t_3);
11400 __Pyx_INCREF(__pyx_int_2);
11401 __Pyx_GIVEREF(__pyx_int_2);
11402 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_2)) __PYX_ERR(0, 205, __pyx_L1_error);
11403 __Pyx_GIVEREF(__pyx_t_2);
11404 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error);
11405 __pyx_t_2 = 0;
11406 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
11407 __Pyx_GOTREF(__pyx_t_2);
11408 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11409 if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
11410 __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
11411 __pyx_t_4 = 0;
11412 __pyx_t_5 = NULL;
11413 } else {
11414 __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
11415 __Pyx_GOTREF(__pyx_t_3);
11416 __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
11417 }
11418 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11419 for (;;) {
11420 if (likely(!__pyx_t_5)) {
11421 if (likely(PyList_CheckExact(__pyx_t_3))) {
11422 {
11423 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
11424 #if !CYTHON_ASSUME_SAFE_MACROS
11425 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 205, __pyx_L1_error)
11426 #endif
11427 if (__pyx_t_4 >= __pyx_temp) break;
11428 }
11429 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11430 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 205, __pyx_L1_error)
11431 #else
11432 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
11433 __Pyx_GOTREF(__pyx_t_2);
11434 #endif
11435 } else {
11436 {
11437 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
11438 #if !CYTHON_ASSUME_SAFE_MACROS
11439 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 205, __pyx_L1_error)
11440 #endif
11441 if (__pyx_t_4 >= __pyx_temp) break;
11442 }
11443 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11444 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 205, __pyx_L1_error)
11445 #else
11446 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
11447 __Pyx_GOTREF(__pyx_t_2);
11448 #endif
11449 }
11450 } else {
11451 __pyx_t_2 = __pyx_t_5(__pyx_t_3);
11452 if (unlikely(!__pyx_t_2)) {
11453 PyObject* exc_type = PyErr_Occurred();
11454 if (exc_type) {
11455 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11456 else __PYX_ERR(0, 205, __pyx_L1_error)
11457 }
11458 break;
11459 }
11460 __Pyx_GOTREF(__pyx_t_2);
11461 }
11462 __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
11463 __pyx_t_2 = 0;
11464
11465 /* "pysam/libcbcf.pyx":206
11466 * d = result = n - k + 1
11467 * for i in range(2, k + 1):
11468 * d += 1 # <<<<<<<<<<<<<<
11469 * result *= d
11470 * result //= i
11471 */
11472 __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_d, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
11473 __Pyx_GOTREF(__pyx_t_2);
11474 __Pyx_DECREF_SET(__pyx_v_d, __pyx_t_2);
11475 __pyx_t_2 = 0;
11476
11477 /* "pysam/libcbcf.pyx":207
11478 * for i in range(2, k + 1):
11479 * d += 1
11480 * result *= d # <<<<<<<<<<<<<<
11481 * result //= i
11482 * return result
11483 */
11484 __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
11485 __Pyx_GOTREF(__pyx_t_2);
11486 __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
11487 __pyx_t_2 = 0;
11488
11489 /* "pysam/libcbcf.pyx":208
11490 * d += 1
11491 * result *= d
11492 * result //= i # <<<<<<<<<<<<<<
11493 * return result
11494 *
11495 */
11496 __pyx_t_2 = PyNumber_InPlaceFloorDivide(__pyx_v_result, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
11497 __Pyx_GOTREF(__pyx_t_2);
11498 __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
11499 __pyx_t_2 = 0;
11500
11501 /* "pysam/libcbcf.pyx":205
11502 *
11503 * d = result = n - k + 1
11504 * for i in range(2, k + 1): # <<<<<<<<<<<<<<
11505 * d += 1
11506 * result *= d
11507 */
11508 }
11509 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11510
11511 /* "pysam/libcbcf.pyx":209
11512 * result *= d
11513 * result //= i
11514 * return result # <<<<<<<<<<<<<<
11515 *
11516 *
11517 */
11518 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_result); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 209, __pyx_L1_error)
11519 __pyx_r = __pyx_t_6;
11520 goto __pyx_L0;
11521
11522 /* "pysam/libcbcf.pyx":183
11523 * ########################################################################
11524 *
11525 * cdef int comb(int n, int k) except -1: # <<<<<<<<<<<<<<
11526 * """Return binomial coefficient: n choose k
11527 *
11528 */
11529
11530 /* function exit code */
11531 __pyx_L1_error:;
11532 __Pyx_XDECREF(__pyx_t_2);
11533 __Pyx_XDECREF(__pyx_t_3);
11534 __Pyx_AddTraceback("pysam.libcbcf.comb", __pyx_clineno, __pyx_lineno, __pyx_filename);
11535 __pyx_r = -1;
11536 __pyx_L0:;
11537 __Pyx_XDECREF(__pyx_v_d);
11538 __Pyx_XDECREF(__pyx_v_result);
11539 __Pyx_XDECREF(__pyx_v_i);
11540 __Pyx_TraceReturn(Py_None, 0);
11541 __Pyx_RefNannyFinishContext();
11542 return __pyx_r;
11543 }
11544
11545 /* "pysam/libcbcf.pyx":212
11546 *
11547 *
11548 * cdef inline int bcf_geno_combinations(int ploidy, int alleles) except -1: # <<<<<<<<<<<<<<
11549 * """Return the count of genotypes expected for the given ploidy and number of alleles.
11550 *
11551 */
11552
11553 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_bcf_geno_combinations(int __pyx_v_ploidy, int __pyx_v_alleles) {
11554 int __pyx_r;
11555 __Pyx_TraceDeclarations
11556 int __pyx_t_1;
11557 int __pyx_lineno = 0;
11558 const char *__pyx_filename = NULL;
11559 int __pyx_clineno = 0;
11560 __Pyx_TraceCall("bcf_geno_combinations", __pyx_f[0], 212, 0, __PYX_ERR(0, 212, __pyx_L1_error));
11561
11562 /* "pysam/libcbcf.pyx":224
11563 * 4
11564 * """
11565 * return comb(alleles + ploidy - 1, ploidy) # <<<<<<<<<<<<<<
11566 *
11567 *
11568 */
11569 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_comb(((__pyx_v_alleles + __pyx_v_ploidy) - 1), __pyx_v_ploidy); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 224, __pyx_L1_error)
11570 __pyx_r = __pyx_t_1;
11571 goto __pyx_L0;
11572
11573 /* "pysam/libcbcf.pyx":212
11574 *
11575 *
11576 * cdef inline int bcf_geno_combinations(int ploidy, int alleles) except -1: # <<<<<<<<<<<<<<
11577 * """Return the count of genotypes expected for the given ploidy and number of alleles.
11578 *
11579 */
11580
11581 /* function exit code */
11582 __pyx_L1_error:;
11583 __Pyx_AddTraceback("pysam.libcbcf.bcf_geno_combinations", __pyx_clineno, __pyx_lineno, __pyx_filename);
11584 __pyx_r = -1;
11585 __pyx_L0:;
11586 __Pyx_TraceReturn(Py_None, 0);
11587 return __pyx_r;
11588 }
11589
11590 /* "pysam/libcbcf.pyx":233
11591 *
11592 *
11593 * cdef inline bint check_header_id(bcf_hdr_t *hdr, int hl_type, int id): # <<<<<<<<<<<<<<
11594 * return id >= 0 and id < hdr.n[BCF_DT_ID] and bcf_hdr_idinfo_exists(hdr, hl_type, id)
11595 *
11596 */
11597
11598 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_check_header_id(bcf_hdr_t *__pyx_v_hdr, int __pyx_v_hl_type, int __pyx_v_id) {
11599 int __pyx_r;
11600 __Pyx_TraceDeclarations
11601 int __pyx_t_1;
11602 int __pyx_t_2;
11603 int __pyx_lineno = 0;
11604 const char *__pyx_filename = NULL;
11605 int __pyx_clineno = 0;
11606 __Pyx_TraceCall("check_header_id", __pyx_f[0], 233, 0, __PYX_ERR(0, 233, __pyx_L1_error));
11607
11608 /* "pysam/libcbcf.pyx":234
11609 *
11610 * cdef inline bint check_header_id(bcf_hdr_t *hdr, int hl_type, int id):
11611 * return id >= 0 and id < hdr.n[BCF_DT_ID] and bcf_hdr_idinfo_exists(hdr, hl_type, id) # <<<<<<<<<<<<<<
11612 *
11613 *
11614 */
11615 __pyx_t_2 = (__pyx_v_id >= 0);
11616 if (__pyx_t_2) {
11617 } else {
11618 __pyx_t_1 = __pyx_t_2;
11619 goto __pyx_L3_bool_binop_done;
11620 }
11621 __pyx_t_2 = (__pyx_v_id < (__pyx_v_hdr->n[BCF_DT_ID]));
11622 if (__pyx_t_2) {
11623 } else {
11624 __pyx_t_1 = __pyx_t_2;
11625 goto __pyx_L3_bool_binop_done;
11626 }
11627 __pyx_t_2 = (bcf_hdr_idinfo_exists(__pyx_v_hdr, __pyx_v_hl_type, __pyx_v_id) != 0);
11628 __pyx_t_1 = __pyx_t_2;
11629 __pyx_L3_bool_binop_done:;
11630 __pyx_r = __pyx_t_1;
11631 goto __pyx_L0;
11632
11633 /* "pysam/libcbcf.pyx":233
11634 *
11635 *
11636 * cdef inline bint check_header_id(bcf_hdr_t *hdr, int hl_type, int id): # <<<<<<<<<<<<<<
11637 * return id >= 0 and id < hdr.n[BCF_DT_ID] and bcf_hdr_idinfo_exists(hdr, hl_type, id)
11638 *
11639 */
11640
11641 /* function exit code */
11642 __pyx_L1_error:;
11643 __Pyx_AddTraceback("pysam.libcbcf.check_header_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
11644 __pyx_r = -1;
11645 __pyx_L0:;
11646 __Pyx_TraceReturn(Py_None, 0);
11647 return __pyx_r;
11648 }
11649
11650 /* "pysam/libcbcf.pyx":237
11651 *
11652 *
11653 * cdef inline int is_gt_fmt(bcf_hdr_t *hdr, int fmt_id): # <<<<<<<<<<<<<<
11654 * return strcmp(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt_id), 'GT') == 0
11655 *
11656 */
11657
11658 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_is_gt_fmt(bcf_hdr_t *__pyx_v_hdr, int __pyx_v_fmt_id) {
11659 int __pyx_r;
11660 __Pyx_TraceDeclarations
11661 int __pyx_lineno = 0;
11662 const char *__pyx_filename = NULL;
11663 int __pyx_clineno = 0;
11664 __Pyx_TraceCall("is_gt_fmt", __pyx_f[0], 237, 0, __PYX_ERR(0, 237, __pyx_L1_error));
11665
11666 /* "pysam/libcbcf.pyx":238
11667 *
11668 * cdef inline int is_gt_fmt(bcf_hdr_t *hdr, int fmt_id):
11669 * return strcmp(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt_id), 'GT') == 0 # <<<<<<<<<<<<<<
11670 *
11671 *
11672 */
11673 __pyx_r = (strcmp(bcf_hdr_int2id(__pyx_v_hdr, BCF_DT_ID, __pyx_v_fmt_id), ((char const *)"GT")) == 0);
11674 goto __pyx_L0;
11675
11676 /* "pysam/libcbcf.pyx":237
11677 *
11678 *
11679 * cdef inline int is_gt_fmt(bcf_hdr_t *hdr, int fmt_id): # <<<<<<<<<<<<<<
11680 * return strcmp(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt_id), 'GT') == 0
11681 *
11682 */
11683
11684 /* function exit code */
11685 __pyx_L1_error:;
11686 __Pyx_AddTraceback("pysam.libcbcf.is_gt_fmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
11687 __pyx_r = -1;
11688 __pyx_L0:;
11689 __Pyx_TraceReturn(Py_None, 0);
11690 return __pyx_r;
11691 }
11692
11693 /* "pysam/libcbcf.pyx":241
11694 *
11695 *
11696 * cdef inline int bcf_genotype_count(bcf_hdr_t *hdr, bcf1_t *rec, int sample) except -1: # <<<<<<<<<<<<<<
11697 *
11698 * if sample < 0:
11699 */
11700
11701 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_bcf_genotype_count(bcf_hdr_t *__pyx_v_hdr, bcf1_t *__pyx_v_rec, int __pyx_v_sample) {
11702 int32_t *__pyx_v_gt_arr;
11703 int __pyx_v_ngt;
11704 int __pyx_v_max_ploidy;
11705 int32_t *__pyx_v_gt;
11706 int __pyx_v_ploidy;
11707 int __pyx_r;
11708 __Pyx_TraceDeclarations
11709 __Pyx_RefNannyDeclarations
11710 int __pyx_t_1;
11711 PyObject *__pyx_t_2 = NULL;
11712 int __pyx_t_3;
11713 int __pyx_t_4;
11714 int __pyx_lineno = 0;
11715 const char *__pyx_filename = NULL;
11716 int __pyx_clineno = 0;
11717 __Pyx_RefNannySetupContext("bcf_genotype_count", 1);
11718 __Pyx_TraceCall("bcf_genotype_count", __pyx_f[0], 241, 0, __PYX_ERR(0, 241, __pyx_L1_error));
11719
11720 /* "pysam/libcbcf.pyx":243
11721 * cdef inline int bcf_genotype_count(bcf_hdr_t *hdr, bcf1_t *rec, int sample) except -1:
11722 *
11723 * if sample < 0: # <<<<<<<<<<<<<<
11724 * raise ValueError('genotype is only valid as a format field')
11725 *
11726 */
11727 __pyx_t_1 = (__pyx_v_sample < 0);
11728 if (unlikely(__pyx_t_1)) {
11729
11730 /* "pysam/libcbcf.pyx":244
11731 *
11732 * if sample < 0:
11733 * raise ValueError('genotype is only valid as a format field') # <<<<<<<<<<<<<<
11734 *
11735 * cdef int32_t *gt_arr = NULL
11736 */
11737 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
11738 __Pyx_GOTREF(__pyx_t_2);
11739 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
11740 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11741 __PYX_ERR(0, 244, __pyx_L1_error)
11742
11743 /* "pysam/libcbcf.pyx":243
11744 * cdef inline int bcf_genotype_count(bcf_hdr_t *hdr, bcf1_t *rec, int sample) except -1:
11745 *
11746 * if sample < 0: # <<<<<<<<<<<<<<
11747 * raise ValueError('genotype is only valid as a format field')
11748 *
11749 */
11750 }
11751
11752 /* "pysam/libcbcf.pyx":246
11753 * raise ValueError('genotype is only valid as a format field')
11754 *
11755 * cdef int32_t *gt_arr = NULL # <<<<<<<<<<<<<<
11756 * cdef int ngt = 0
11757 * ngt = bcf_get_genotypes(hdr, rec, &gt_arr, &ngt)
11758 */
11759 __pyx_v_gt_arr = NULL;
11760
11761 /* "pysam/libcbcf.pyx":247
11762 *
11763 * cdef int32_t *gt_arr = NULL
11764 * cdef int ngt = 0 # <<<<<<<<<<<<<<
11765 * ngt = bcf_get_genotypes(hdr, rec, &gt_arr, &ngt)
11766 *
11767 */
11768 __pyx_v_ngt = 0;
11769
11770 /* "pysam/libcbcf.pyx":248
11771 * cdef int32_t *gt_arr = NULL
11772 * cdef int ngt = 0
11773 * ngt = bcf_get_genotypes(hdr, rec, &gt_arr, &ngt) # <<<<<<<<<<<<<<
11774 *
11775 * if ngt <= 0 or not gt_arr:
11776 */
11777 __pyx_v_ngt = bcf_get_genotypes(__pyx_v_hdr, __pyx_v_rec, (&__pyx_v_gt_arr), (&__pyx_v_ngt));
11778
11779 /* "pysam/libcbcf.pyx":250
11780 * ngt = bcf_get_genotypes(hdr, rec, &gt_arr, &ngt)
11781 *
11782 * if ngt <= 0 or not gt_arr: # <<<<<<<<<<<<<<
11783 * return 0
11784 *
11785 */
11786 __pyx_t_3 = (__pyx_v_ngt <= 0);
11787 if (!__pyx_t_3) {
11788 } else {
11789 __pyx_t_1 = __pyx_t_3;
11790 goto __pyx_L5_bool_binop_done;
11791 }
11792 __pyx_t_3 = (!(__pyx_v_gt_arr != 0));
11793 __pyx_t_1 = __pyx_t_3;
11794 __pyx_L5_bool_binop_done:;
11795 if (__pyx_t_1) {
11796
11797 /* "pysam/libcbcf.pyx":251
11798 *
11799 * if ngt <= 0 or not gt_arr:
11800 * return 0 # <<<<<<<<<<<<<<
11801 *
11802 * assert ngt % rec.n_sample == 0
11803 */
11804 __pyx_r = 0;
11805 goto __pyx_L0;
11806
11807 /* "pysam/libcbcf.pyx":250
11808 * ngt = bcf_get_genotypes(hdr, rec, &gt_arr, &ngt)
11809 *
11810 * if ngt <= 0 or not gt_arr: # <<<<<<<<<<<<<<
11811 * return 0
11812 *
11813 */
11814 }
11815
11816 /* "pysam/libcbcf.pyx":253
11817 * return 0
11818 *
11819 * assert ngt % rec.n_sample == 0 # <<<<<<<<<<<<<<
11820 * cdef int max_ploidy = ngt // rec.n_sample
11821 * cdef int32_t *gt = gt_arr + sample * max_ploidy
11822 */
11823 #ifndef CYTHON_WITHOUT_ASSERTIONS
11824 if (unlikely(__pyx_assertions_enabled())) {
11825 if (unlikely(__pyx_v_rec->n_sample == 0)) {
11826 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
11827 __PYX_ERR(0, 253, __pyx_L1_error)
11828 }
11829 __pyx_t_1 = ((__pyx_v_ngt % __pyx_v_rec->n_sample) == 0);
11830 if (unlikely(!__pyx_t_1)) {
11831 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
11832 __PYX_ERR(0, 253, __pyx_L1_error)
11833 }
11834 }
11835 #else
11836 if ((1)); else __PYX_ERR(0, 253, __pyx_L1_error)
11837 #endif
11838
11839 /* "pysam/libcbcf.pyx":254
11840 *
11841 * assert ngt % rec.n_sample == 0
11842 * cdef int max_ploidy = ngt // rec.n_sample # <<<<<<<<<<<<<<
11843 * cdef int32_t *gt = gt_arr + sample * max_ploidy
11844 * cdef int ploidy = 0
11845 */
11846 if (unlikely(__pyx_v_rec->n_sample == 0)) {
11847 PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
11848 __PYX_ERR(0, 254, __pyx_L1_error)
11849 }
11850 __pyx_v_max_ploidy = (__pyx_v_ngt / __pyx_v_rec->n_sample);
11851
11852 /* "pysam/libcbcf.pyx":255
11853 * assert ngt % rec.n_sample == 0
11854 * cdef int max_ploidy = ngt // rec.n_sample
11855 * cdef int32_t *gt = gt_arr + sample * max_ploidy # <<<<<<<<<<<<<<
11856 * cdef int ploidy = 0
11857 *
11858 */
11859 __pyx_v_gt = (__pyx_v_gt_arr + (__pyx_v_sample * __pyx_v_max_ploidy));
11860
11861 /* "pysam/libcbcf.pyx":256
11862 * cdef int max_ploidy = ngt // rec.n_sample
11863 * cdef int32_t *gt = gt_arr + sample * max_ploidy
11864 * cdef int ploidy = 0 # <<<<<<<<<<<<<<
11865 *
11866 * while ploidy < max_ploidy and gt[0] != bcf_int32_vector_end:
11867 */
11868 __pyx_v_ploidy = 0;
11869
11870 /* "pysam/libcbcf.pyx":258
11871 * cdef int ploidy = 0
11872 *
11873 * while ploidy < max_ploidy and gt[0] != bcf_int32_vector_end: # <<<<<<<<<<<<<<
11874 * gt += 1
11875 * ploidy += 1
11876 */
11877 while (1) {
11878 __pyx_t_3 = (__pyx_v_ploidy < __pyx_v_max_ploidy);
11879 if (__pyx_t_3) {
11880 } else {
11881 __pyx_t_1 = __pyx_t_3;
11882 goto __pyx_L9_bool_binop_done;
11883 }
11884 __pyx_t_3 = ((__pyx_v_gt[0]) != bcf_int32_vector_end);
11885 __pyx_t_1 = __pyx_t_3;
11886 __pyx_L9_bool_binop_done:;
11887 if (!__pyx_t_1) break;
11888
11889 /* "pysam/libcbcf.pyx":259
11890 *
11891 * while ploidy < max_ploidy and gt[0] != bcf_int32_vector_end:
11892 * gt += 1 # <<<<<<<<<<<<<<
11893 * ploidy += 1
11894 *
11895 */
11896 __pyx_v_gt = (__pyx_v_gt + 1);
11897
11898 /* "pysam/libcbcf.pyx":260
11899 * while ploidy < max_ploidy and gt[0] != bcf_int32_vector_end:
11900 * gt += 1
11901 * ploidy += 1 # <<<<<<<<<<<<<<
11902 *
11903 * free(<void*>gt_arr)
11904 */
11905 __pyx_v_ploidy = (__pyx_v_ploidy + 1);
11906 }
11907
11908 /* "pysam/libcbcf.pyx":262
11909 * ploidy += 1
11910 *
11911 * free(<void*>gt_arr) # <<<<<<<<<<<<<<
11912 *
11913 * return bcf_geno_combinations(ploidy, rec.n_allele)
11914 */
11915 free(((void *)__pyx_v_gt_arr));
11916
11917 /* "pysam/libcbcf.pyx":264
11918 * free(<void*>gt_arr)
11919 *
11920 * return bcf_geno_combinations(ploidy, rec.n_allele) # <<<<<<<<<<<<<<
11921 *
11922 *
11923 */
11924 __pyx_t_4 = __pyx_f_5pysam_7libcbcf_bcf_geno_combinations(__pyx_v_ploidy, __pyx_v_rec->n_allele); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 264, __pyx_L1_error)
11925 __pyx_r = __pyx_t_4;
11926 goto __pyx_L0;
11927
11928 /* "pysam/libcbcf.pyx":241
11929 *
11930 *
11931 * cdef inline int bcf_genotype_count(bcf_hdr_t *hdr, bcf1_t *rec, int sample) except -1: # <<<<<<<<<<<<<<
11932 *
11933 * if sample < 0:
11934 */
11935
11936 /* function exit code */
11937 __pyx_L1_error:;
11938 __Pyx_XDECREF(__pyx_t_2);
11939 __Pyx_AddTraceback("pysam.libcbcf.bcf_genotype_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
11940 __pyx_r = -1;
11941 __pyx_L0:;
11942 __Pyx_TraceReturn(Py_None, 0);
11943 __Pyx_RefNannyFinishContext();
11944 return __pyx_r;
11945 }
11946 static PyObject *__pyx_gb_5pysam_7libcbcf_19char_array_to_tuple_2generator28(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
11947
11948 /* "pysam/libcbcf.pyx":271
11949 * return None
11950 * try:
11951 * return tuple(charptr_to_str(a[i]) for i in range(n)) # <<<<<<<<<<<<<<
11952 * finally:
11953 * if free_after and a:
11954 */
11955
11956 static PyObject *__pyx_pf_5pysam_7libcbcf_19char_array_to_tuple_genexpr(PyObject *__pyx_self, Py_ssize_t __pyx_genexpr_arg_0) {
11957 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
11958 PyObject *__pyx_r = NULL;
11959 __Pyx_RefNannyDeclarations
11960 int __pyx_lineno = 0;
11961 const char *__pyx_filename = NULL;
11962 int __pyx_clineno = 0;
11963 __Pyx_RefNannySetupContext("genexpr", 0);
11964 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_1_genexpr(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
11965 if (unlikely(!__pyx_cur_scope)) {
11966 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *)Py_None);
11967 __Pyx_INCREF(Py_None);
11968 __PYX_ERR(0, 271, __pyx_L1_error)
11969 } else {
11970 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
11971 }
11972 __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple *) __pyx_self;
11973 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
11974 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
11975 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
11976 {
11977 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19char_array_to_tuple_2generator28, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_char_array_to_tuple_locals_genex, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 271, __pyx_L1_error)
11978 __Pyx_DECREF(__pyx_cur_scope);
11979 __Pyx_RefNannyFinishContext();
11980 return (PyObject *) gen;
11981 }
11982
11983 /* function exit code */
11984 __pyx_L1_error:;
11985 __Pyx_AddTraceback("pysam.libcbcf.char_array_to_tuple.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
11986 __pyx_r = NULL;
11987 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
11988 __Pyx_XGIVEREF(__pyx_r);
11989 __Pyx_RefNannyFinishContext();
11990 return __pyx_r;
11991 }
11992
11993 static PyObject *__pyx_gb_5pysam_7libcbcf_19char_array_to_tuple_2generator28(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
11994 {
11995 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
11996 PyObject *__pyx_r = NULL;
11997 __Pyx_TraceDeclarations
11998 Py_ssize_t __pyx_t_1;
11999 Py_ssize_t __pyx_t_2;
12000 Py_ssize_t __pyx_t_3;
12001 PyObject *__pyx_t_4 = NULL;
12002 int __pyx_lineno = 0;
12003 const char *__pyx_filename = NULL;
12004 int __pyx_clineno = 0;
12005 __Pyx_RefNannyDeclarations
12006 __Pyx_RefNannySetupContext("genexpr", 0);
12007 __Pyx_TraceCall("genexpr", __pyx_f[0], 271, 0, __PYX_ERR(0, 271, __pyx_L1_error));
12008 switch (__pyx_generator->resume_label) {
12009 case 0: goto __pyx_L3_first_run;
12010 case 1: goto __pyx_L6_resume_from_yield;
12011 default: /* CPython raises the right error here */
12012 __Pyx_TraceReturn(Py_None, 0);
12013 __Pyx_RefNannyFinishContext();
12014 return NULL;
12015 }
12016 __pyx_L3_first_run:;
12017 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 271, __pyx_L1_error)
12018 __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0;
12019 __pyx_t_2 = __pyx_t_1;
12020 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
12021 __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
12022 __pyx_t_4 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a[__pyx_cur_scope->__pyx_v_i]), NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error)
12023 __Pyx_GOTREF(__pyx_t_4);
12024 __pyx_r = __pyx_t_4;
12025 __pyx_t_4 = 0;
12026 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
12027 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
12028 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
12029 __Pyx_XGIVEREF(__pyx_r);
12030 __Pyx_TraceReturn(__pyx_r, 0);
12031 __Pyx_RefNannyFinishContext();
12032 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
12033 /* return from generator, yielding value */
12034 __pyx_generator->resume_label = 1;
12035 return __pyx_r;
12036 __pyx_L6_resume_from_yield:;
12037 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
12038 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
12039 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
12040 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 271, __pyx_L1_error)
12041 }
12042 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
12043
12044 /* function exit code */
12045 PyErr_SetNone(PyExc_StopIteration);
12046 goto __pyx_L0;
12047 __pyx_L1_error:;
12048 __Pyx_Generator_Replace_StopIteration(0);
12049 __Pyx_XDECREF(__pyx_t_4);
12050 __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
12051 __pyx_L0:;
12052 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
12053 #if !CYTHON_USE_EXC_INFO_STACK
12054 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
12055 #endif
12056 __pyx_generator->resume_label = -1;
12057 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
12058 __Pyx_TraceReturn(__pyx_r, 0);
12059 __Pyx_RefNannyFinishContext();
12060 return __pyx_r;
12061 }
12062
12063 /* "pysam/libcbcf.pyx":267
12064 *
12065 *
12066 * cdef tuple char_array_to_tuple(const char **a, ssize_t n, int free_after=0): # <<<<<<<<<<<<<<
12067 * if not a:
12068 * return None
12069 */
12070
12071 static PyObject *__pyx_f_5pysam_7libcbcf_char_array_to_tuple(char const **__pyx_v_a, Py_ssize_t __pyx_v_n, struct __pyx_opt_args_5pysam_7libcbcf_char_array_to_tuple *__pyx_optional_args) {
12072 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple *__pyx_cur_scope;
12073 int __pyx_v_free_after = ((int)0);
12074 PyObject *__pyx_gb_5pysam_7libcbcf_19char_array_to_tuple_2generator28 = 0;
12075 PyObject *__pyx_r = NULL;
12076 __Pyx_TraceDeclarations
12077 __Pyx_RefNannyDeclarations
12078 int __pyx_t_1;
12079 PyObject *__pyx_t_2 = NULL;
12080 PyObject *__pyx_t_3 = NULL;
12081 int __pyx_t_4;
12082 int __pyx_t_5;
12083 char const *__pyx_t_6;
12084 PyObject *__pyx_t_7 = NULL;
12085 PyObject *__pyx_t_8 = NULL;
12086 PyObject *__pyx_t_9 = NULL;
12087 PyObject *__pyx_t_10 = NULL;
12088 PyObject *__pyx_t_11 = NULL;
12089 PyObject *__pyx_t_12 = NULL;
12090 int __pyx_t_13;
12091 PyObject *__pyx_t_14 = NULL;
12092 int __pyx_lineno = 0;
12093 const char *__pyx_filename = NULL;
12094 int __pyx_clineno = 0;
12095 __Pyx_RefNannySetupContext("char_array_to_tuple", 0);
12096 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple, __pyx_empty_tuple, NULL);
12097 if (unlikely(!__pyx_cur_scope)) {
12098 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple *)Py_None);
12099 __Pyx_INCREF(Py_None);
12100 __PYX_ERR(0, 267, __pyx_L1_error)
12101 } else {
12102 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
12103 }
12104 __Pyx_TraceCall("char_array_to_tuple", __pyx_f[0], 267, 0, __PYX_ERR(0, 267, __pyx_L1_error));
12105 if (__pyx_optional_args) {
12106 if (__pyx_optional_args->__pyx_n > 0) {
12107 __pyx_v_free_after = __pyx_optional_args->free_after;
12108 }
12109 }
12110 __pyx_cur_scope->__pyx_v_a = __pyx_v_a;
12111
12112 /* "pysam/libcbcf.pyx":268
12113 *
12114 * cdef tuple char_array_to_tuple(const char **a, ssize_t n, int free_after=0):
12115 * if not a: # <<<<<<<<<<<<<<
12116 * return None
12117 * try:
12118 */
12119 __pyx_t_1 = (!(__pyx_cur_scope->__pyx_v_a != 0));
12120 if (__pyx_t_1) {
12121
12122 /* "pysam/libcbcf.pyx":269
12123 * cdef tuple char_array_to_tuple(const char **a, ssize_t n, int free_after=0):
12124 * if not a:
12125 * return None # <<<<<<<<<<<<<<
12126 * try:
12127 * return tuple(charptr_to_str(a[i]) for i in range(n))
12128 */
12129 __Pyx_XDECREF(__pyx_r);
12130 __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
12131 goto __pyx_L0;
12132
12133 /* "pysam/libcbcf.pyx":268
12134 *
12135 * cdef tuple char_array_to_tuple(const char **a, ssize_t n, int free_after=0):
12136 * if not a: # <<<<<<<<<<<<<<
12137 * return None
12138 * try:
12139 */
12140 }
12141
12142 /* "pysam/libcbcf.pyx":270
12143 * if not a:
12144 * return None
12145 * try: # <<<<<<<<<<<<<<
12146 * return tuple(charptr_to_str(a[i]) for i in range(n))
12147 * finally:
12148 */
12149 /*try:*/ {
12150
12151 /* "pysam/libcbcf.pyx":271
12152 * return None
12153 * try:
12154 * return tuple(charptr_to_str(a[i]) for i in range(n)) # <<<<<<<<<<<<<<
12155 * finally:
12156 * if free_after and a:
12157 */
12158 __Pyx_XDECREF(__pyx_r);
12159 __pyx_t_2 = __pyx_pf_5pysam_7libcbcf_19char_array_to_tuple_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L5_error)
12160 __Pyx_GOTREF(__pyx_t_2);
12161 __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L5_error)
12162 __Pyx_GOTREF(__pyx_t_3);
12163 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12164 __pyx_r = ((PyObject*)__pyx_t_3);
12165 __pyx_t_3 = 0;
12166 goto __pyx_L4_return;
12167 }
12168
12169 /* "pysam/libcbcf.pyx":273
12170 * return tuple(charptr_to_str(a[i]) for i in range(n))
12171 * finally:
12172 * if free_after and a: # <<<<<<<<<<<<<<
12173 * free(a)
12174 *
12175 */
12176 /*finally:*/ {
12177 __pyx_L5_error:;
12178 /*exception exit:*/{
12179 __Pyx_PyThreadState_declare
12180 __Pyx_PyThreadState_assign
12181 __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
12182 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12183 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12184 if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
12185 if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
12186 __Pyx_XGOTREF(__pyx_t_7);
12187 __Pyx_XGOTREF(__pyx_t_8);
12188 __Pyx_XGOTREF(__pyx_t_9);
12189 __Pyx_XGOTREF(__pyx_t_10);
12190 __Pyx_XGOTREF(__pyx_t_11);
12191 __Pyx_XGOTREF(__pyx_t_12);
12192 __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
12193 {
12194 __pyx_t_13 = (__pyx_v_free_after != 0);
12195 if (__pyx_t_13) {
12196 } else {
12197 __pyx_t_1 = __pyx_t_13;
12198 goto __pyx_L10_bool_binop_done;
12199 }
12200 __pyx_t_13 = (__pyx_cur_scope->__pyx_v_a != 0);
12201 __pyx_t_1 = __pyx_t_13;
12202 __pyx_L10_bool_binop_done:;
12203 if (__pyx_t_1) {
12204
12205 /* "pysam/libcbcf.pyx":274
12206 * finally:
12207 * if free_after and a:
12208 * free(a) # <<<<<<<<<<<<<<
12209 *
12210 *
12211 */
12212 free(__pyx_cur_scope->__pyx_v_a);
12213
12214 /* "pysam/libcbcf.pyx":273
12215 * return tuple(charptr_to_str(a[i]) for i in range(n))
12216 * finally:
12217 * if free_after and a: # <<<<<<<<<<<<<<
12218 * free(a)
12219 *
12220 */
12221 }
12222 }
12223 if (PY_MAJOR_VERSION >= 3) {
12224 __Pyx_XGIVEREF(__pyx_t_10);
12225 __Pyx_XGIVEREF(__pyx_t_11);
12226 __Pyx_XGIVEREF(__pyx_t_12);
12227 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
12228 }
12229 __Pyx_XGIVEREF(__pyx_t_7);
12230 __Pyx_XGIVEREF(__pyx_t_8);
12231 __Pyx_XGIVEREF(__pyx_t_9);
12232 __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
12233 __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
12234 __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
12235 goto __pyx_L1_error;
12236 }
12237 __pyx_L4_return: {
12238 __pyx_t_14 = __pyx_r;
12239 __pyx_r = 0;
12240 __pyx_t_13 = (__pyx_v_free_after != 0);
12241 if (__pyx_t_13) {
12242 } else {
12243 __pyx_t_1 = __pyx_t_13;
12244 goto __pyx_L13_bool_binop_done;
12245 }
12246 __pyx_t_13 = (__pyx_cur_scope->__pyx_v_a != 0);
12247 __pyx_t_1 = __pyx_t_13;
12248 __pyx_L13_bool_binop_done:;
12249 if (__pyx_t_1) {
12250
12251 /* "pysam/libcbcf.pyx":274
12252 * finally:
12253 * if free_after and a:
12254 * free(a) # <<<<<<<<<<<<<<
12255 *
12256 *
12257 */
12258 free(__pyx_cur_scope->__pyx_v_a);
12259
12260 /* "pysam/libcbcf.pyx":273
12261 * return tuple(charptr_to_str(a[i]) for i in range(n))
12262 * finally:
12263 * if free_after and a: # <<<<<<<<<<<<<<
12264 * free(a)
12265 *
12266 */
12267 }
12268 __pyx_r = __pyx_t_14;
12269 __pyx_t_14 = 0;
12270 goto __pyx_L0;
12271 }
12272 }
12273
12274 /* "pysam/libcbcf.pyx":267
12275 *
12276 *
12277 * cdef tuple char_array_to_tuple(const char **a, ssize_t n, int free_after=0): # <<<<<<<<<<<<<<
12278 * if not a:
12279 * return None
12280 */
12281
12282 /* function exit code */
12283 __pyx_L1_error:;
12284 __Pyx_XDECREF(__pyx_t_2);
12285 __Pyx_XDECREF(__pyx_t_3);
12286 __Pyx_AddTraceback("pysam.libcbcf.char_array_to_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
12287 __pyx_r = 0;
12288 __pyx_L0:;
12289 __Pyx_XDECREF(__pyx_gb_5pysam_7libcbcf_19char_array_to_tuple_2generator28);
12290 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
12291 __Pyx_XGIVEREF(__pyx_r);
12292 __Pyx_TraceReturn(__pyx_r, 0);
12293 __Pyx_RefNannyFinishContext();
12294 return __pyx_r;
12295 }
12296 static PyObject *__pyx_gb_5pysam_7libcbcf_19bcf_array_to_object_2generator29(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
12297
12298 /* "pysam/libcbcf.pyx":302
12299 * # Otherwise, copy the entire block
12300 * b = datac[:n]
12301 * value = tuple(decode_bytes(v, 'utf-8') if v and v != bcf_str_missing else None for v in b.split(b',')) # <<<<<<<<<<<<<<
12302 * else:
12303 * value = []
12304 */
12305
12306 static PyObject *__pyx_pf_5pysam_7libcbcf_19bcf_array_to_object_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
12307 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
12308 PyObject *__pyx_r = NULL;
12309 __Pyx_RefNannyDeclarations
12310 int __pyx_lineno = 0;
12311 const char *__pyx_filename = NULL;
12312 int __pyx_clineno = 0;
12313 __Pyx_RefNannySetupContext("genexpr", 0);
12314 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_2_genexpr(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
12315 if (unlikely(!__pyx_cur_scope)) {
12316 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *)Py_None);
12317 __Pyx_INCREF(Py_None);
12318 __PYX_ERR(0, 302, __pyx_L1_error)
12319 } else {
12320 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
12321 }
12322 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
12323 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
12324 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
12325 {
12326 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19bcf_array_to_object_2generator29, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_bcf_array_to_object_locals_genex, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 302, __pyx_L1_error)
12327 __Pyx_DECREF(__pyx_cur_scope);
12328 __Pyx_RefNannyFinishContext();
12329 return (PyObject *) gen;
12330 }
12331
12332 /* function exit code */
12333 __pyx_L1_error:;
12334 __Pyx_AddTraceback("pysam.libcbcf.bcf_array_to_object.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
12335 __pyx_r = NULL;
12336 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
12337 __Pyx_XGIVEREF(__pyx_r);
12338 __Pyx_RefNannyFinishContext();
12339 return __pyx_r;
12340 }
12341
12342 static PyObject *__pyx_gb_5pysam_7libcbcf_19bcf_array_to_object_2generator29(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
12343 {
12344 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
12345 PyObject *__pyx_r = NULL;
12346 __Pyx_TraceDeclarations
12347 PyObject *__pyx_t_1 = NULL;
12348 PyObject *__pyx_t_2 = NULL;
12349 Py_ssize_t __pyx_t_3;
12350 PyObject *(*__pyx_t_4)(PyObject *);
12351 int __pyx_t_5;
12352 int __pyx_t_6;
12353 PyObject *__pyx_t_7 = NULL;
12354 PyObject *__pyx_t_8 = NULL;
12355 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes __pyx_t_9;
12356 int __pyx_lineno = 0;
12357 const char *__pyx_filename = NULL;
12358 int __pyx_clineno = 0;
12359 __Pyx_RefNannyDeclarations
12360 __Pyx_RefNannySetupContext("genexpr", 0);
12361 __Pyx_TraceCall("genexpr", __pyx_f[0], 302, 0, __PYX_ERR(0, 302, __pyx_L1_error));
12362 switch (__pyx_generator->resume_label) {
12363 case 0: goto __pyx_L3_first_run;
12364 case 1: goto __pyx_L8_resume_from_yield;
12365 default: /* CPython raises the right error here */
12366 __Pyx_TraceReturn(Py_None, 0);
12367 __Pyx_RefNannyFinishContext();
12368 return NULL;
12369 }
12370 __pyx_L3_first_run:;
12371 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 302, __pyx_L1_error)
12372 if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 302, __pyx_L1_error) }
12373 __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyBytes_Type_split, __pyx_cur_scope->__pyx_genexpr_arg_0, __pyx_kp_b__2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
12374 __Pyx_GOTREF(__pyx_t_1);
12375 if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
12376 __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
12377 __pyx_t_3 = 0;
12378 __pyx_t_4 = NULL;
12379 } else {
12380 __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
12381 __Pyx_GOTREF(__pyx_t_2);
12382 __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
12383 }
12384 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12385 for (;;) {
12386 if (likely(!__pyx_t_4)) {
12387 if (likely(PyList_CheckExact(__pyx_t_2))) {
12388 {
12389 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
12390 #if !CYTHON_ASSUME_SAFE_MACROS
12391 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 302, __pyx_L1_error)
12392 #endif
12393 if (__pyx_t_3 >= __pyx_temp) break;
12394 }
12395 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12396 __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 302, __pyx_L1_error)
12397 #else
12398 __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
12399 __Pyx_GOTREF(__pyx_t_1);
12400 #endif
12401 } else {
12402 {
12403 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
12404 #if !CYTHON_ASSUME_SAFE_MACROS
12405 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 302, __pyx_L1_error)
12406 #endif
12407 if (__pyx_t_3 >= __pyx_temp) break;
12408 }
12409 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12410 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 302, __pyx_L1_error)
12411 #else
12412 __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
12413 __Pyx_GOTREF(__pyx_t_1);
12414 #endif
12415 }
12416 } else {
12417 __pyx_t_1 = __pyx_t_4(__pyx_t_2);
12418 if (unlikely(!__pyx_t_1)) {
12419 PyObject* exc_type = PyErr_Occurred();
12420 if (exc_type) {
12421 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12422 else __PYX_ERR(0, 302, __pyx_L1_error)
12423 }
12424 break;
12425 }
12426 __Pyx_GOTREF(__pyx_t_1);
12427 }
12428 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
12429 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1);
12430 __Pyx_GIVEREF(__pyx_t_1);
12431 __pyx_t_1 = 0;
12432 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_v); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 302, __pyx_L1_error)
12433 if (__pyx_t_6) {
12434 } else {
12435 __pyx_t_5 = __pyx_t_6;
12436 goto __pyx_L6_bool_binop_done;
12437 }
12438 __pyx_t_7 = __Pyx_PyInt_From_int32_t(bcf_str_missing); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error)
12439 __Pyx_GOTREF(__pyx_t_7);
12440 __pyx_t_8 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 302, __pyx_L1_error)
12441 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12442 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 302, __pyx_L1_error)
12443 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12444 __pyx_t_5 = __pyx_t_6;
12445 __pyx_L6_bool_binop_done:;
12446 if (__pyx_t_5) {
12447 if (!(likely(PyBytes_CheckExact(__pyx_cur_scope->__pyx_v_v))||((__pyx_cur_scope->__pyx_v_v) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_cur_scope->__pyx_v_v))) __PYX_ERR(0, 302, __pyx_L1_error)
12448 __pyx_t_9.__pyx_n = 1;
12449 __pyx_t_9.encoding = __pyx_kp_u_utf_8;
12450 __pyx_t_8 = __pyx_f_5pysam_9libcutils_decode_bytes(((PyObject*)__pyx_cur_scope->__pyx_v_v), &__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 302, __pyx_L1_error)
12451 __Pyx_GOTREF(__pyx_t_8);
12452 __pyx_t_1 = __pyx_t_8;
12453 __pyx_t_8 = 0;
12454 } else {
12455 __Pyx_INCREF(Py_None);
12456 __pyx_t_1 = Py_None;
12457 }
12458 __pyx_r = __pyx_t_1;
12459 __pyx_t_1 = 0;
12460 __Pyx_XGIVEREF(__pyx_t_2);
12461 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
12462 __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
12463 __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
12464 __Pyx_XGIVEREF(__pyx_r);
12465 __Pyx_TraceReturn(__pyx_r, 0);
12466 __Pyx_RefNannyFinishContext();
12467 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
12468 /* return from generator, yielding value */
12469 __pyx_generator->resume_label = 1;
12470 return __pyx_r;
12471 __pyx_L8_resume_from_yield:;
12472 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
12473 __pyx_cur_scope->__pyx_t_0 = 0;
12474 __Pyx_XGOTREF(__pyx_t_2);
12475 __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
12476 __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
12477 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 302, __pyx_L1_error)
12478 }
12479 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12480 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
12481
12482 /* function exit code */
12483 PyErr_SetNone(PyExc_StopIteration);
12484 goto __pyx_L0;
12485 __pyx_L1_error:;
12486 __Pyx_Generator_Replace_StopIteration(0);
12487 __Pyx_XDECREF(__pyx_t_1);
12488 __Pyx_XDECREF(__pyx_t_2);
12489 __Pyx_XDECREF(__pyx_t_7);
12490 __Pyx_XDECREF(__pyx_t_8);
12491 __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
12492 __pyx_L0:;
12493 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
12494 #if !CYTHON_USE_EXC_INFO_STACK
12495 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
12496 #endif
12497 __pyx_generator->resume_label = -1;
12498 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
12499 __Pyx_TraceReturn(__pyx_r, 0);
12500 __Pyx_RefNannyFinishContext();
12501 return __pyx_r;
12502 }
12503
12504 /* "pysam/libcbcf.pyx":277
12505 *
12506 *
12507 * cdef bcf_array_to_object(void *data, int type, ssize_t n, ssize_t count, int scalar): # <<<<<<<<<<<<<<
12508 * cdef char *datac
12509 * cdef int8_t *data8
12510 */
12511
12512 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_array_to_object(void *__pyx_v_data, int __pyx_v_type, Py_ssize_t __pyx_v_n, Py_ssize_t __pyx_v_count, int __pyx_v_scalar) {
12513 char *__pyx_v_datac;
12514 int8_t *__pyx_v_data8;
12515 int16_t *__pyx_v_data16;
12516 int32_t *__pyx_v_data32;
12517 float *__pyx_v_dataf;
12518 int __pyx_v_i;
12519 PyObject *__pyx_v_b = 0;
12520 PyObject *__pyx_v_value = NULL;
12521 PyObject *__pyx_gb_5pysam_7libcbcf_19bcf_array_to_object_2generator29 = 0;
12522 PyObject *__pyx_r = NULL;
12523 __Pyx_TraceDeclarations
12524 __Pyx_RefNannyDeclarations
12525 int __pyx_t_1;
12526 int __pyx_t_2;
12527 PyObject *__pyx_t_3 = NULL;
12528 PyObject *__pyx_t_4 = NULL;
12529 Py_ssize_t __pyx_t_5;
12530 Py_ssize_t __pyx_t_6;
12531 int __pyx_t_7;
12532 int __pyx_t_8;
12533 Py_ssize_t __pyx_t_9;
12534 int __pyx_lineno = 0;
12535 const char *__pyx_filename = NULL;
12536 int __pyx_clineno = 0;
12537 __Pyx_RefNannySetupContext("bcf_array_to_object", 1);
12538 __Pyx_TraceCall("bcf_array_to_object", __pyx_f[0], 277, 0, __PYX_ERR(0, 277, __pyx_L1_error));
12539
12540 /* "pysam/libcbcf.pyx":286
12541 * cdef bytes b
12542 *
12543 * if not data or n <= 0: # <<<<<<<<<<<<<<
12544 * return None
12545 *
12546 */
12547 __pyx_t_2 = (!(__pyx_v_data != 0));
12548 if (!__pyx_t_2) {
12549 } else {
12550 __pyx_t_1 = __pyx_t_2;
12551 goto __pyx_L4_bool_binop_done;
12552 }
12553 __pyx_t_2 = (__pyx_v_n <= 0);
12554 __pyx_t_1 = __pyx_t_2;
12555 __pyx_L4_bool_binop_done:;
12556 if (__pyx_t_1) {
12557
12558 /* "pysam/libcbcf.pyx":287
12559 *
12560 * if not data or n <= 0:
12561 * return None # <<<<<<<<<<<<<<
12562 *
12563 * if type == BCF_BT_CHAR:
12564 */
12565 __Pyx_XDECREF(__pyx_r);
12566 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12567 goto __pyx_L0;
12568
12569 /* "pysam/libcbcf.pyx":286
12570 * cdef bytes b
12571 *
12572 * if not data or n <= 0: # <<<<<<<<<<<<<<
12573 * return None
12574 *
12575 */
12576 }
12577
12578 /* "pysam/libcbcf.pyx":289
12579 * return None
12580 *
12581 * if type == BCF_BT_CHAR: # <<<<<<<<<<<<<<
12582 * datac = <char *>data
12583 *
12584 */
12585 __pyx_t_1 = (__pyx_v_type == BCF_BT_CHAR);
12586 if (__pyx_t_1) {
12587
12588 /* "pysam/libcbcf.pyx":290
12589 *
12590 * if type == BCF_BT_CHAR:
12591 * datac = <char *>data # <<<<<<<<<<<<<<
12592 *
12593 * if not n:
12594 */
12595 __pyx_v_datac = ((char *)__pyx_v_data);
12596
12597 /* "pysam/libcbcf.pyx":292
12598 * datac = <char *>data
12599 *
12600 * if not n: # <<<<<<<<<<<<<<
12601 * value = ()
12602 * else:
12603 */
12604 __pyx_t_1 = (!(__pyx_v_n != 0));
12605 if (__pyx_t_1) {
12606
12607 /* "pysam/libcbcf.pyx":293
12608 *
12609 * if not n:
12610 * value = () # <<<<<<<<<<<<<<
12611 * else:
12612 * # Check if at least one null terminator is present
12613 */
12614 __Pyx_INCREF(__pyx_empty_tuple);
12615 __pyx_v_value = __pyx_empty_tuple;
12616
12617 /* "pysam/libcbcf.pyx":292
12618 * datac = <char *>data
12619 *
12620 * if not n: # <<<<<<<<<<<<<<
12621 * value = ()
12622 * else:
12623 */
12624 goto __pyx_L7;
12625 }
12626
12627 /* "pysam/libcbcf.pyx":296
12628 * else:
12629 * # Check if at least one null terminator is present
12630 * if datac[n-1] == bcf_str_vector_end: # <<<<<<<<<<<<<<
12631 * # If so, create a string up to the first null terminator
12632 * b = datac
12633 */
12634 /*else*/ {
12635 __pyx_t_1 = ((__pyx_v_datac[(__pyx_v_n - 1)]) == bcf_str_vector_end);
12636 if (__pyx_t_1) {
12637
12638 /* "pysam/libcbcf.pyx":298
12639 * if datac[n-1] == bcf_str_vector_end:
12640 * # If so, create a string up to the first null terminator
12641 * b = datac # <<<<<<<<<<<<<<
12642 * else:
12643 * # Otherwise, copy the entire block
12644 */
12645 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_datac); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)
12646 __Pyx_GOTREF(__pyx_t_3);
12647 __pyx_v_b = ((PyObject*)__pyx_t_3);
12648 __pyx_t_3 = 0;
12649
12650 /* "pysam/libcbcf.pyx":296
12651 * else:
12652 * # Check if at least one null terminator is present
12653 * if datac[n-1] == bcf_str_vector_end: # <<<<<<<<<<<<<<
12654 * # If so, create a string up to the first null terminator
12655 * b = datac
12656 */
12657 goto __pyx_L8;
12658 }
12659
12660 /* "pysam/libcbcf.pyx":301
12661 * else:
12662 * # Otherwise, copy the entire block
12663 * b = datac[:n] # <<<<<<<<<<<<<<
12664 * value = tuple(decode_bytes(v, 'utf-8') if v and v != bcf_str_missing else None for v in b.split(b','))
12665 * else:
12666 */
12667 /*else*/ {
12668 __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_datac + 0, __pyx_v_n - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
12669 __Pyx_GOTREF(__pyx_t_3);
12670 __pyx_v_b = ((PyObject*)__pyx_t_3);
12671 __pyx_t_3 = 0;
12672 }
12673 __pyx_L8:;
12674
12675 /* "pysam/libcbcf.pyx":302
12676 * # Otherwise, copy the entire block
12677 * b = datac[:n]
12678 * value = tuple(decode_bytes(v, 'utf-8') if v and v != bcf_str_missing else None for v in b.split(b',')) # <<<<<<<<<<<<<<
12679 * else:
12680 * value = []
12681 */
12682 __pyx_t_3 = __pyx_pf_5pysam_7libcbcf_19bcf_array_to_object_genexpr(NULL, __pyx_v_b); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
12683 __Pyx_GOTREF(__pyx_t_3);
12684 __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
12685 __Pyx_GOTREF(__pyx_t_4);
12686 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12687 __pyx_v_value = __pyx_t_4;
12688 __pyx_t_4 = 0;
12689 }
12690 __pyx_L7:;
12691
12692 /* "pysam/libcbcf.pyx":289
12693 * return None
12694 *
12695 * if type == BCF_BT_CHAR: # <<<<<<<<<<<<<<
12696 * datac = <char *>data
12697 *
12698 */
12699 goto __pyx_L6;
12700 }
12701
12702 /* "pysam/libcbcf.pyx":304
12703 * value = tuple(decode_bytes(v, 'utf-8') if v and v != bcf_str_missing else None for v in b.split(b','))
12704 * else:
12705 * value = [] # <<<<<<<<<<<<<<
12706 * if type == BCF_BT_INT8:
12707 * data8 = <int8_t *>data
12708 */
12709 /*else*/ {
12710 __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error)
12711 __Pyx_GOTREF(__pyx_t_4);
12712 __pyx_v_value = __pyx_t_4;
12713 __pyx_t_4 = 0;
12714
12715 /* "pysam/libcbcf.pyx":305
12716 * else:
12717 * value = []
12718 * if type == BCF_BT_INT8: # <<<<<<<<<<<<<<
12719 * data8 = <int8_t *>data
12720 * for i in range(n):
12721 */
12722 __pyx_t_1 = (__pyx_v_type == BCF_BT_INT8);
12723 if (__pyx_t_1) {
12724
12725 /* "pysam/libcbcf.pyx":306
12726 * value = []
12727 * if type == BCF_BT_INT8:
12728 * data8 = <int8_t *>data # <<<<<<<<<<<<<<
12729 * for i in range(n):
12730 * if data8[i] == bcf_int8_vector_end:
12731 */
12732 __pyx_v_data8 = ((int8_t *)__pyx_v_data);
12733
12734 /* "pysam/libcbcf.pyx":307
12735 * if type == BCF_BT_INT8:
12736 * data8 = <int8_t *>data
12737 * for i in range(n): # <<<<<<<<<<<<<<
12738 * if data8[i] == bcf_int8_vector_end:
12739 * break
12740 */
12741 __pyx_t_5 = __pyx_v_n;
12742 __pyx_t_6 = __pyx_t_5;
12743 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
12744 __pyx_v_i = __pyx_t_7;
12745
12746 /* "pysam/libcbcf.pyx":308
12747 * data8 = <int8_t *>data
12748 * for i in range(n):
12749 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
12750 * break
12751 * value.append(data8[i] if data8[i] != bcf_int8_missing else None)
12752 */
12753 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) == bcf_int8_vector_end);
12754 if (__pyx_t_1) {
12755
12756 /* "pysam/libcbcf.pyx":309
12757 * for i in range(n):
12758 * if data8[i] == bcf_int8_vector_end:
12759 * break # <<<<<<<<<<<<<<
12760 * value.append(data8[i] if data8[i] != bcf_int8_missing else None)
12761 * elif type == BCF_BT_INT16:
12762 */
12763 goto __pyx_L11_break;
12764
12765 /* "pysam/libcbcf.pyx":308
12766 * data8 = <int8_t *>data
12767 * for i in range(n):
12768 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
12769 * break
12770 * value.append(data8[i] if data8[i] != bcf_int8_missing else None)
12771 */
12772 }
12773
12774 /* "pysam/libcbcf.pyx":310
12775 * if data8[i] == bcf_int8_vector_end:
12776 * break
12777 * value.append(data8[i] if data8[i] != bcf_int8_missing else None) # <<<<<<<<<<<<<<
12778 * elif type == BCF_BT_INT16:
12779 * data16 = <int16_t *>data
12780 */
12781 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) != bcf_int8_missing);
12782 if (__pyx_t_1) {
12783 __pyx_t_3 = __Pyx_PyInt_From_int8_t((__pyx_v_data8[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
12784 __Pyx_GOTREF(__pyx_t_3);
12785 __pyx_t_4 = __pyx_t_3;
12786 __pyx_t_3 = 0;
12787 } else {
12788 __Pyx_INCREF(Py_None);
12789 __pyx_t_4 = Py_None;
12790 }
12791 __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 310, __pyx_L1_error)
12792 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12793 }
12794 __pyx_L11_break:;
12795
12796 /* "pysam/libcbcf.pyx":305
12797 * else:
12798 * value = []
12799 * if type == BCF_BT_INT8: # <<<<<<<<<<<<<<
12800 * data8 = <int8_t *>data
12801 * for i in range(n):
12802 */
12803 goto __pyx_L9;
12804 }
12805
12806 /* "pysam/libcbcf.pyx":311
12807 * break
12808 * value.append(data8[i] if data8[i] != bcf_int8_missing else None)
12809 * elif type == BCF_BT_INT16: # <<<<<<<<<<<<<<
12810 * data16 = <int16_t *>data
12811 * for i in range(n):
12812 */
12813 __pyx_t_1 = (__pyx_v_type == BCF_BT_INT16);
12814 if (__pyx_t_1) {
12815
12816 /* "pysam/libcbcf.pyx":312
12817 * value.append(data8[i] if data8[i] != bcf_int8_missing else None)
12818 * elif type == BCF_BT_INT16:
12819 * data16 = <int16_t *>data # <<<<<<<<<<<<<<
12820 * for i in range(n):
12821 * if data16[i] == bcf_int16_vector_end:
12822 */
12823 __pyx_v_data16 = ((int16_t *)__pyx_v_data);
12824
12825 /* "pysam/libcbcf.pyx":313
12826 * elif type == BCF_BT_INT16:
12827 * data16 = <int16_t *>data
12828 * for i in range(n): # <<<<<<<<<<<<<<
12829 * if data16[i] == bcf_int16_vector_end:
12830 * break
12831 */
12832 __pyx_t_5 = __pyx_v_n;
12833 __pyx_t_6 = __pyx_t_5;
12834 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
12835 __pyx_v_i = __pyx_t_7;
12836
12837 /* "pysam/libcbcf.pyx":314
12838 * data16 = <int16_t *>data
12839 * for i in range(n):
12840 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
12841 * break
12842 * value.append(data16[i] if data16[i] != bcf_int16_missing else None)
12843 */
12844 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) == bcf_int16_vector_end);
12845 if (__pyx_t_1) {
12846
12847 /* "pysam/libcbcf.pyx":315
12848 * for i in range(n):
12849 * if data16[i] == bcf_int16_vector_end:
12850 * break # <<<<<<<<<<<<<<
12851 * value.append(data16[i] if data16[i] != bcf_int16_missing else None)
12852 * elif type == BCF_BT_INT32:
12853 */
12854 goto __pyx_L14_break;
12855
12856 /* "pysam/libcbcf.pyx":314
12857 * data16 = <int16_t *>data
12858 * for i in range(n):
12859 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
12860 * break
12861 * value.append(data16[i] if data16[i] != bcf_int16_missing else None)
12862 */
12863 }
12864
12865 /* "pysam/libcbcf.pyx":316
12866 * if data16[i] == bcf_int16_vector_end:
12867 * break
12868 * value.append(data16[i] if data16[i] != bcf_int16_missing else None) # <<<<<<<<<<<<<<
12869 * elif type == BCF_BT_INT32:
12870 * data32 = <int32_t *>data
12871 */
12872 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) != bcf_int16_missing);
12873 if (__pyx_t_1) {
12874 __pyx_t_3 = __Pyx_PyInt_From_int16_t((__pyx_v_data16[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error)
12875 __Pyx_GOTREF(__pyx_t_3);
12876 __pyx_t_4 = __pyx_t_3;
12877 __pyx_t_3 = 0;
12878 } else {
12879 __Pyx_INCREF(Py_None);
12880 __pyx_t_4 = Py_None;
12881 }
12882 __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 316, __pyx_L1_error)
12883 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12884 }
12885 __pyx_L14_break:;
12886
12887 /* "pysam/libcbcf.pyx":311
12888 * break
12889 * value.append(data8[i] if data8[i] != bcf_int8_missing else None)
12890 * elif type == BCF_BT_INT16: # <<<<<<<<<<<<<<
12891 * data16 = <int16_t *>data
12892 * for i in range(n):
12893 */
12894 goto __pyx_L9;
12895 }
12896
12897 /* "pysam/libcbcf.pyx":317
12898 * break
12899 * value.append(data16[i] if data16[i] != bcf_int16_missing else None)
12900 * elif type == BCF_BT_INT32: # <<<<<<<<<<<<<<
12901 * data32 = <int32_t *>data
12902 * for i in range(n):
12903 */
12904 __pyx_t_1 = (__pyx_v_type == BCF_BT_INT32);
12905 if (__pyx_t_1) {
12906
12907 /* "pysam/libcbcf.pyx":318
12908 * value.append(data16[i] if data16[i] != bcf_int16_missing else None)
12909 * elif type == BCF_BT_INT32:
12910 * data32 = <int32_t *>data # <<<<<<<<<<<<<<
12911 * for i in range(n):
12912 * if data32[i] == bcf_int32_vector_end:
12913 */
12914 __pyx_v_data32 = ((int32_t *)__pyx_v_data);
12915
12916 /* "pysam/libcbcf.pyx":319
12917 * elif type == BCF_BT_INT32:
12918 * data32 = <int32_t *>data
12919 * for i in range(n): # <<<<<<<<<<<<<<
12920 * if data32[i] == bcf_int32_vector_end:
12921 * break
12922 */
12923 __pyx_t_5 = __pyx_v_n;
12924 __pyx_t_6 = __pyx_t_5;
12925 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
12926 __pyx_v_i = __pyx_t_7;
12927
12928 /* "pysam/libcbcf.pyx":320
12929 * data32 = <int32_t *>data
12930 * for i in range(n):
12931 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
12932 * break
12933 * value.append(data32[i] if data32[i] != bcf_int32_missing else None)
12934 */
12935 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) == bcf_int32_vector_end);
12936 if (__pyx_t_1) {
12937
12938 /* "pysam/libcbcf.pyx":321
12939 * for i in range(n):
12940 * if data32[i] == bcf_int32_vector_end:
12941 * break # <<<<<<<<<<<<<<
12942 * value.append(data32[i] if data32[i] != bcf_int32_missing else None)
12943 * elif type == BCF_BT_FLOAT:
12944 */
12945 goto __pyx_L17_break;
12946
12947 /* "pysam/libcbcf.pyx":320
12948 * data32 = <int32_t *>data
12949 * for i in range(n):
12950 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
12951 * break
12952 * value.append(data32[i] if data32[i] != bcf_int32_missing else None)
12953 */
12954 }
12955
12956 /* "pysam/libcbcf.pyx":322
12957 * if data32[i] == bcf_int32_vector_end:
12958 * break
12959 * value.append(data32[i] if data32[i] != bcf_int32_missing else None) # <<<<<<<<<<<<<<
12960 * elif type == BCF_BT_FLOAT:
12961 * dataf = <float *>data
12962 */
12963 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) != bcf_int32_missing);
12964 if (__pyx_t_1) {
12965 __pyx_t_3 = __Pyx_PyInt_From_int32_t((__pyx_v_data32[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
12966 __Pyx_GOTREF(__pyx_t_3);
12967 __pyx_t_4 = __pyx_t_3;
12968 __pyx_t_3 = 0;
12969 } else {
12970 __Pyx_INCREF(Py_None);
12971 __pyx_t_4 = Py_None;
12972 }
12973 __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 322, __pyx_L1_error)
12974 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12975 }
12976 __pyx_L17_break:;
12977
12978 /* "pysam/libcbcf.pyx":317
12979 * break
12980 * value.append(data16[i] if data16[i] != bcf_int16_missing else None)
12981 * elif type == BCF_BT_INT32: # <<<<<<<<<<<<<<
12982 * data32 = <int32_t *>data
12983 * for i in range(n):
12984 */
12985 goto __pyx_L9;
12986 }
12987
12988 /* "pysam/libcbcf.pyx":323
12989 * break
12990 * value.append(data32[i] if data32[i] != bcf_int32_missing else None)
12991 * elif type == BCF_BT_FLOAT: # <<<<<<<<<<<<<<
12992 * dataf = <float *>data
12993 * for i in range(n):
12994 */
12995 __pyx_t_1 = (__pyx_v_type == BCF_BT_FLOAT);
12996 if (likely(__pyx_t_1)) {
12997
12998 /* "pysam/libcbcf.pyx":324
12999 * value.append(data32[i] if data32[i] != bcf_int32_missing else None)
13000 * elif type == BCF_BT_FLOAT:
13001 * dataf = <float *>data # <<<<<<<<<<<<<<
13002 * for i in range(n):
13003 * if bcf_float_is_vector_end(dataf[i]):
13004 */
13005 __pyx_v_dataf = ((float *)__pyx_v_data);
13006
13007 /* "pysam/libcbcf.pyx":325
13008 * elif type == BCF_BT_FLOAT:
13009 * dataf = <float *>data
13010 * for i in range(n): # <<<<<<<<<<<<<<
13011 * if bcf_float_is_vector_end(dataf[i]):
13012 * break
13013 */
13014 __pyx_t_5 = __pyx_v_n;
13015 __pyx_t_6 = __pyx_t_5;
13016 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
13017 __pyx_v_i = __pyx_t_7;
13018
13019 /* "pysam/libcbcf.pyx":326
13020 * dataf = <float *>data
13021 * for i in range(n):
13022 * if bcf_float_is_vector_end(dataf[i]): # <<<<<<<<<<<<<<
13023 * break
13024 * value.append(dataf[i] if not bcf_float_is_missing(dataf[i]) else None)
13025 */
13026 __pyx_t_1 = (bcf_float_is_vector_end((__pyx_v_dataf[__pyx_v_i])) != 0);
13027 if (__pyx_t_1) {
13028
13029 /* "pysam/libcbcf.pyx":327
13030 * for i in range(n):
13031 * if bcf_float_is_vector_end(dataf[i]):
13032 * break # <<<<<<<<<<<<<<
13033 * value.append(dataf[i] if not bcf_float_is_missing(dataf[i]) else None)
13034 * else:
13035 */
13036 goto __pyx_L20_break;
13037
13038 /* "pysam/libcbcf.pyx":326
13039 * dataf = <float *>data
13040 * for i in range(n):
13041 * if bcf_float_is_vector_end(dataf[i]): # <<<<<<<<<<<<<<
13042 * break
13043 * value.append(dataf[i] if not bcf_float_is_missing(dataf[i]) else None)
13044 */
13045 }
13046
13047 /* "pysam/libcbcf.pyx":328
13048 * if bcf_float_is_vector_end(dataf[i]):
13049 * break
13050 * value.append(dataf[i] if not bcf_float_is_missing(dataf[i]) else None) # <<<<<<<<<<<<<<
13051 * else:
13052 * raise TypeError('unsupported info type code')
13053 */
13054 __pyx_t_1 = (!(bcf_float_is_missing((__pyx_v_dataf[__pyx_v_i])) != 0));
13055 if (__pyx_t_1) {
13056 __pyx_t_3 = PyFloat_FromDouble((__pyx_v_dataf[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error)
13057 __Pyx_GOTREF(__pyx_t_3);
13058 __pyx_t_4 = __pyx_t_3;
13059 __pyx_t_3 = 0;
13060 } else {
13061 __Pyx_INCREF(Py_None);
13062 __pyx_t_4 = Py_None;
13063 }
13064 __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 328, __pyx_L1_error)
13065 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13066 }
13067 __pyx_L20_break:;
13068
13069 /* "pysam/libcbcf.pyx":323
13070 * break
13071 * value.append(data32[i] if data32[i] != bcf_int32_missing else None)
13072 * elif type == BCF_BT_FLOAT: # <<<<<<<<<<<<<<
13073 * dataf = <float *>data
13074 * for i in range(n):
13075 */
13076 goto __pyx_L9;
13077 }
13078
13079 /* "pysam/libcbcf.pyx":330
13080 * value.append(dataf[i] if not bcf_float_is_missing(dataf[i]) else None)
13081 * else:
13082 * raise TypeError('unsupported info type code') # <<<<<<<<<<<<<<
13083 *
13084 * # FIXME: Need to know length? Report errors? Pad with missing values? Not clear what to do.
13085 */
13086 /*else*/ {
13087 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 330, __pyx_L1_error)
13088 __Pyx_GOTREF(__pyx_t_4);
13089 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
13090 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13091 __PYX_ERR(0, 330, __pyx_L1_error)
13092 }
13093 __pyx_L9:;
13094 }
13095 __pyx_L6:;
13096
13097 /* "pysam/libcbcf.pyx":333
13098 *
13099 * # FIXME: Need to know length? Report errors? Pad with missing values? Not clear what to do.
13100 * if not value: # <<<<<<<<<<<<<<
13101 * if scalar:
13102 * value = None
13103 */
13104 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 333, __pyx_L1_error)
13105 __pyx_t_2 = (!__pyx_t_1);
13106 if (__pyx_t_2) {
13107
13108 /* "pysam/libcbcf.pyx":334
13109 * # FIXME: Need to know length? Report errors? Pad with missing values? Not clear what to do.
13110 * if not value:
13111 * if scalar: # <<<<<<<<<<<<<<
13112 * value = None
13113 * elif count <= 0:
13114 */
13115 __pyx_t_2 = (__pyx_v_scalar != 0);
13116 if (__pyx_t_2) {
13117
13118 /* "pysam/libcbcf.pyx":335
13119 * if not value:
13120 * if scalar:
13121 * value = None # <<<<<<<<<<<<<<
13122 * elif count <= 0:
13123 * value = ()
13124 */
13125 __Pyx_INCREF(Py_None);
13126 __Pyx_DECREF_SET(__pyx_v_value, Py_None);
13127
13128 /* "pysam/libcbcf.pyx":334
13129 * # FIXME: Need to know length? Report errors? Pad with missing values? Not clear what to do.
13130 * if not value:
13131 * if scalar: # <<<<<<<<<<<<<<
13132 * value = None
13133 * elif count <= 0:
13134 */
13135 goto __pyx_L23;
13136 }
13137
13138 /* "pysam/libcbcf.pyx":336
13139 * if scalar:
13140 * value = None
13141 * elif count <= 0: # <<<<<<<<<<<<<<
13142 * value = ()
13143 * else:
13144 */
13145 __pyx_t_2 = (__pyx_v_count <= 0);
13146 if (__pyx_t_2) {
13147
13148 /* "pysam/libcbcf.pyx":337
13149 * value = None
13150 * elif count <= 0:
13151 * value = () # <<<<<<<<<<<<<<
13152 * else:
13153 * value = (None,)*count
13154 */
13155 __Pyx_INCREF(__pyx_empty_tuple);
13156 __Pyx_DECREF_SET(__pyx_v_value, __pyx_empty_tuple);
13157
13158 /* "pysam/libcbcf.pyx":336
13159 * if scalar:
13160 * value = None
13161 * elif count <= 0: # <<<<<<<<<<<<<<
13162 * value = ()
13163 * else:
13164 */
13165 goto __pyx_L23;
13166 }
13167
13168 /* "pysam/libcbcf.pyx":339
13169 * value = ()
13170 * else:
13171 * value = (None,)*count # <<<<<<<<<<<<<<
13172 * elif scalar and len(value) == 1:
13173 * value = value[0]
13174 */
13175 /*else*/ {
13176 __pyx_t_4 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
13177 __Pyx_GOTREF(__pyx_t_4);
13178 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
13179 __pyx_t_4 = 0;
13180 }
13181 __pyx_L23:;
13182
13183 /* "pysam/libcbcf.pyx":333
13184 *
13185 * # FIXME: Need to know length? Report errors? Pad with missing values? Not clear what to do.
13186 * if not value: # <<<<<<<<<<<<<<
13187 * if scalar:
13188 * value = None
13189 */
13190 goto __pyx_L22;
13191 }
13192
13193 /* "pysam/libcbcf.pyx":340
13194 * else:
13195 * value = (None,)*count
13196 * elif scalar and len(value) == 1: # <<<<<<<<<<<<<<
13197 * value = value[0]
13198 * else:
13199 */
13200 __pyx_t_1 = (__pyx_v_scalar != 0);
13201 if (__pyx_t_1) {
13202 } else {
13203 __pyx_t_2 = __pyx_t_1;
13204 goto __pyx_L24_bool_binop_done;
13205 }
13206 __pyx_t_9 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 340, __pyx_L1_error)
13207 __pyx_t_1 = (__pyx_t_9 == 1);
13208 __pyx_t_2 = __pyx_t_1;
13209 __pyx_L24_bool_binop_done:;
13210 if (__pyx_t_2) {
13211
13212 /* "pysam/libcbcf.pyx":341
13213 * value = (None,)*count
13214 * elif scalar and len(value) == 1:
13215 * value = value[0] # <<<<<<<<<<<<<<
13216 * else:
13217 * value = tuple(value)
13218 */
13219 __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L1_error)
13220 __Pyx_GOTREF(__pyx_t_4);
13221 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
13222 __pyx_t_4 = 0;
13223
13224 /* "pysam/libcbcf.pyx":340
13225 * else:
13226 * value = (None,)*count
13227 * elif scalar and len(value) == 1: # <<<<<<<<<<<<<<
13228 * value = value[0]
13229 * else:
13230 */
13231 goto __pyx_L22;
13232 }
13233
13234 /* "pysam/libcbcf.pyx":343
13235 * value = value[0]
13236 * else:
13237 * value = tuple(value) # <<<<<<<<<<<<<<
13238 *
13239 * return value
13240 */
13241 /*else*/ {
13242 __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error)
13243 __Pyx_GOTREF(__pyx_t_4);
13244 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
13245 __pyx_t_4 = 0;
13246 }
13247 __pyx_L22:;
13248
13249 /* "pysam/libcbcf.pyx":345
13250 * value = tuple(value)
13251 *
13252 * return value # <<<<<<<<<<<<<<
13253 *
13254 *
13255 */
13256 __Pyx_XDECREF(__pyx_r);
13257 __Pyx_INCREF(__pyx_v_value);
13258 __pyx_r = __pyx_v_value;
13259 goto __pyx_L0;
13260
13261 /* "pysam/libcbcf.pyx":277
13262 *
13263 *
13264 * cdef bcf_array_to_object(void *data, int type, ssize_t n, ssize_t count, int scalar): # <<<<<<<<<<<<<<
13265 * cdef char *datac
13266 * cdef int8_t *data8
13267 */
13268
13269 /* function exit code */
13270 __pyx_L1_error:;
13271 __Pyx_XDECREF(__pyx_t_3);
13272 __Pyx_XDECREF(__pyx_t_4);
13273 __Pyx_AddTraceback("pysam.libcbcf.bcf_array_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
13274 __pyx_r = 0;
13275 __pyx_L0:;
13276 __Pyx_XDECREF(__pyx_v_b);
13277 __Pyx_XDECREF(__pyx_v_value);
13278 __Pyx_XDECREF(__pyx_gb_5pysam_7libcbcf_19bcf_array_to_object_2generator29);
13279 __Pyx_XGIVEREF(__pyx_r);
13280 __Pyx_TraceReturn(__pyx_r, 0);
13281 __Pyx_RefNannyFinishContext();
13282 return __pyx_r;
13283 }
13284 static PyObject *__pyx_gb_5pysam_7libcbcf_19bcf_object_to_array_2generator30(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
13285
13286 /* "pysam/libcbcf.pyx":360
13287 * if bt_type == BCF_BT_CHAR:
13288 * if not isinstance(values, (str, bytes)):
13289 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values) # <<<<<<<<<<<<<<
13290 * value_count = len(values)
13291 * assert value_count <= n
13292 */
13293
13294 static PyObject *__pyx_pf_5pysam_7libcbcf_19bcf_object_to_array_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
13295 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
13296 PyObject *__pyx_r = NULL;
13297 __Pyx_RefNannyDeclarations
13298 int __pyx_lineno = 0;
13299 const char *__pyx_filename = NULL;
13300 int __pyx_clineno = 0;
13301 __Pyx_RefNannySetupContext("genexpr", 0);
13302 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_3_genexpr(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
13303 if (unlikely(!__pyx_cur_scope)) {
13304 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *)Py_None);
13305 __Pyx_INCREF(Py_None);
13306 __PYX_ERR(0, 360, __pyx_L1_error)
13307 } else {
13308 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
13309 }
13310 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
13311 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
13312 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
13313 {
13314 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19bcf_object_to_array_2generator30, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_bcf_object_to_array_locals_genex, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 360, __pyx_L1_error)
13315 __Pyx_DECREF(__pyx_cur_scope);
13316 __Pyx_RefNannyFinishContext();
13317 return (PyObject *) gen;
13318 }
13319
13320 /* function exit code */
13321 __pyx_L1_error:;
13322 __Pyx_AddTraceback("pysam.libcbcf.bcf_object_to_array.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
13323 __pyx_r = NULL;
13324 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
13325 __Pyx_XGIVEREF(__pyx_r);
13326 __Pyx_RefNannyFinishContext();
13327 return __pyx_r;
13328 }
13329
13330 static PyObject *__pyx_gb_5pysam_7libcbcf_19bcf_object_to_array_2generator30(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
13331 {
13332 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
13333 PyObject *__pyx_r = NULL;
13334 __Pyx_TraceDeclarations
13335 PyObject *__pyx_t_1 = NULL;
13336 Py_ssize_t __pyx_t_2;
13337 PyObject *(*__pyx_t_3)(PyObject *);
13338 PyObject *__pyx_t_4 = NULL;
13339 int __pyx_t_5;
13340 PyObject *__pyx_t_6 = NULL;
13341 int __pyx_lineno = 0;
13342 const char *__pyx_filename = NULL;
13343 int __pyx_clineno = 0;
13344 __Pyx_RefNannyDeclarations
13345 __Pyx_RefNannySetupContext("genexpr", 0);
13346 __Pyx_TraceCall("genexpr", __pyx_f[0], 360, 0, __PYX_ERR(0, 360, __pyx_L1_error));
13347 switch (__pyx_generator->resume_label) {
13348 case 0: goto __pyx_L3_first_run;
13349 case 1: goto __pyx_L6_resume_from_yield;
13350 default: /* CPython raises the right error here */
13351 __Pyx_TraceReturn(Py_None, 0);
13352 __Pyx_RefNannyFinishContext();
13353 return NULL;
13354 }
13355 __pyx_L3_first_run:;
13356 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 360, __pyx_L1_error)
13357 if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 360, __pyx_L1_error) }
13358 if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
13359 __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
13360 __pyx_t_2 = 0;
13361 __pyx_t_3 = NULL;
13362 } else {
13363 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
13364 __Pyx_GOTREF(__pyx_t_1);
13365 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
13366 }
13367 for (;;) {
13368 if (likely(!__pyx_t_3)) {
13369 if (likely(PyList_CheckExact(__pyx_t_1))) {
13370 {
13371 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
13372 #if !CYTHON_ASSUME_SAFE_MACROS
13373 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
13374 #endif
13375 if (__pyx_t_2 >= __pyx_temp) break;
13376 }
13377 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13378 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
13379 #else
13380 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error)
13381 __Pyx_GOTREF(__pyx_t_4);
13382 #endif
13383 } else {
13384 {
13385 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
13386 #if !CYTHON_ASSUME_SAFE_MACROS
13387 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
13388 #endif
13389 if (__pyx_t_2 >= __pyx_temp) break;
13390 }
13391 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13392 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
13393 #else
13394 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error)
13395 __Pyx_GOTREF(__pyx_t_4);
13396 #endif
13397 }
13398 } else {
13399 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
13400 if (unlikely(!__pyx_t_4)) {
13401 PyObject* exc_type = PyErr_Occurred();
13402 if (exc_type) {
13403 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13404 else __PYX_ERR(0, 360, __pyx_L1_error)
13405 }
13406 break;
13407 }
13408 __Pyx_GOTREF(__pyx_t_4);
13409 }
13410 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
13411 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4);
13412 __Pyx_GIVEREF(__pyx_t_4);
13413 __pyx_t_4 = 0;
13414 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_v); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
13415 if (__pyx_t_5) {
13416 __pyx_t_6 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_cur_scope->__pyx_v_v, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 360, __pyx_L1_error)
13417 __Pyx_GOTREF(__pyx_t_6);
13418 __pyx_t_4 = __pyx_t_6;
13419 __pyx_t_6 = 0;
13420 } else {
13421 __pyx_t_6 = __Pyx_PyInt_From_int32_t(bcf_str_missing); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 360, __pyx_L1_error)
13422 __Pyx_GOTREF(__pyx_t_6);
13423 __pyx_t_4 = __pyx_t_6;
13424 __pyx_t_6 = 0;
13425 }
13426 __pyx_r = __pyx_t_4;
13427 __pyx_t_4 = 0;
13428 __Pyx_XGIVEREF(__pyx_t_1);
13429 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
13430 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
13431 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
13432 __Pyx_XGIVEREF(__pyx_r);
13433 __Pyx_TraceReturn(__pyx_r, 0);
13434 __Pyx_RefNannyFinishContext();
13435 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
13436 /* return from generator, yielding value */
13437 __pyx_generator->resume_label = 1;
13438 return __pyx_r;
13439 __pyx_L6_resume_from_yield:;
13440 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
13441 __pyx_cur_scope->__pyx_t_0 = 0;
13442 __Pyx_XGOTREF(__pyx_t_1);
13443 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
13444 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
13445 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 360, __pyx_L1_error)
13446 }
13447 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13448 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
13449
13450 /* function exit code */
13451 PyErr_SetNone(PyExc_StopIteration);
13452 goto __pyx_L0;
13453 __pyx_L1_error:;
13454 __Pyx_Generator_Replace_StopIteration(0);
13455 __Pyx_XDECREF(__pyx_t_1);
13456 __Pyx_XDECREF(__pyx_t_4);
13457 __Pyx_XDECREF(__pyx_t_6);
13458 __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
13459 __pyx_L0:;
13460 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
13461 #if !CYTHON_USE_EXC_INFO_STACK
13462 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
13463 #endif
13464 __pyx_generator->resume_label = -1;
13465 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
13466 __Pyx_TraceReturn(__pyx_r, 0);
13467 __Pyx_RefNannyFinishContext();
13468 return __pyx_r;
13469 }
13470
13471 /* "pysam/libcbcf.pyx":348
13472 *
13473 *
13474 * cdef bcf_object_to_array(values, void *data, int bt_type, ssize_t n, int vlen): # <<<<<<<<<<<<<<
13475 * cdef char *datac
13476 * cdef int8_t *data8
13477 */
13478
13479 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_object_to_array(PyObject *__pyx_v_values, void *__pyx_v_data, int __pyx_v_bt_type, Py_ssize_t __pyx_v_n, CYTHON_UNUSED int __pyx_v_vlen) {
13480 char *__pyx_v_datac;
13481 float *__pyx_v_dataf;
13482 Py_ssize_t __pyx_v_i;
13483 Py_ssize_t __pyx_v_value_count;
13484 int8_t *__pyx_v_datai8;
13485 PyObject *__pyx_v_val = NULL;
13486 int16_t *__pyx_v_datai16;
13487 int32_t *__pyx_v_datai32;
13488 PyObject *__pyx_gb_5pysam_7libcbcf_19bcf_object_to_array_2generator30 = 0;
13489 PyObject *__pyx_r = NULL;
13490 __Pyx_TraceDeclarations
13491 __Pyx_RefNannyDeclarations
13492 Py_ssize_t __pyx_t_1;
13493 int __pyx_t_2;
13494 int __pyx_t_3;
13495 PyObject *__pyx_t_4 = NULL;
13496 PyObject *__pyx_t_5 = NULL;
13497 char *__pyx_t_6;
13498 Py_ssize_t __pyx_t_7;
13499 Py_ssize_t __pyx_t_8;
13500 Py_ssize_t __pyx_t_9;
13501 int8_t __pyx_t_10;
13502 int8_t __pyx_t_11;
13503 int16_t __pyx_t_12;
13504 int16_t __pyx_t_13;
13505 int32_t __pyx_t_14;
13506 int32_t __pyx_t_15;
13507 float __pyx_t_16;
13508 int __pyx_lineno = 0;
13509 const char *__pyx_filename = NULL;
13510 int __pyx_clineno = 0;
13511 __Pyx_RefNannySetupContext("bcf_object_to_array", 0);
13512 __Pyx_TraceCall("bcf_object_to_array", __pyx_f[0], 348, 0, __PYX_ERR(0, 348, __pyx_L1_error));
13513 __Pyx_INCREF(__pyx_v_values);
13514
13515 /* "pysam/libcbcf.pyx":354
13516 * cdef int32_t *data32
13517 * cdef float *dataf
13518 * cdef ssize_t i, value_count = len(values) # <<<<<<<<<<<<<<
13519 *
13520 * assert value_count <= n
13521 */
13522 __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 354, __pyx_L1_error)
13523 __pyx_v_value_count = __pyx_t_1;
13524
13525 /* "pysam/libcbcf.pyx":356
13526 * cdef ssize_t i, value_count = len(values)
13527 *
13528 * assert value_count <= n # <<<<<<<<<<<<<<
13529 *
13530 * if bt_type == BCF_BT_CHAR:
13531 */
13532 #ifndef CYTHON_WITHOUT_ASSERTIONS
13533 if (unlikely(__pyx_assertions_enabled())) {
13534 __pyx_t_2 = (__pyx_v_value_count <= __pyx_v_n);
13535 if (unlikely(!__pyx_t_2)) {
13536 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
13537 __PYX_ERR(0, 356, __pyx_L1_error)
13538 }
13539 }
13540 #else
13541 if ((1)); else __PYX_ERR(0, 356, __pyx_L1_error)
13542 #endif
13543
13544 /* "pysam/libcbcf.pyx":358
13545 * assert value_count <= n
13546 *
13547 * if bt_type == BCF_BT_CHAR: # <<<<<<<<<<<<<<
13548 * if not isinstance(values, (str, bytes)):
13549 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values)
13550 */
13551 __pyx_t_2 = (__pyx_v_bt_type == BCF_BT_CHAR);
13552 if (__pyx_t_2) {
13553
13554 /* "pysam/libcbcf.pyx":359
13555 *
13556 * if bt_type == BCF_BT_CHAR:
13557 * if not isinstance(values, (str, bytes)): # <<<<<<<<<<<<<<
13558 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values)
13559 * value_count = len(values)
13560 */
13561 __pyx_t_3 = PyUnicode_Check(__pyx_v_values);
13562 if (!__pyx_t_3) {
13563 } else {
13564 __pyx_t_2 = __pyx_t_3;
13565 goto __pyx_L5_bool_binop_done;
13566 }
13567 __pyx_t_3 = PyBytes_Check(__pyx_v_values);
13568 __pyx_t_2 = __pyx_t_3;
13569 __pyx_L5_bool_binop_done:;
13570 __pyx_t_3 = (!__pyx_t_2);
13571 if (__pyx_t_3) {
13572
13573 /* "pysam/libcbcf.pyx":360
13574 * if bt_type == BCF_BT_CHAR:
13575 * if not isinstance(values, (str, bytes)):
13576 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values) # <<<<<<<<<<<<<<
13577 * value_count = len(values)
13578 * assert value_count <= n
13579 */
13580 __pyx_t_4 = __pyx_pf_5pysam_7libcbcf_19bcf_object_to_array_genexpr(NULL, __pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error)
13581 __Pyx_GOTREF(__pyx_t_4);
13582 __pyx_t_5 = __Pyx_PyBytes_Join(__pyx_kp_b__2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 360, __pyx_L1_error)
13583 __Pyx_GOTREF(__pyx_t_5);
13584 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13585 __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_5);
13586 __pyx_t_5 = 0;
13587
13588 /* "pysam/libcbcf.pyx":361
13589 * if not isinstance(values, (str, bytes)):
13590 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values)
13591 * value_count = len(values) # <<<<<<<<<<<<<<
13592 * assert value_count <= n
13593 * datac = <char *>data
13594 */
13595 __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
13596 __pyx_v_value_count = __pyx_t_1;
13597
13598 /* "pysam/libcbcf.pyx":359
13599 *
13600 * if bt_type == BCF_BT_CHAR:
13601 * if not isinstance(values, (str, bytes)): # <<<<<<<<<<<<<<
13602 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values)
13603 * value_count = len(values)
13604 */
13605 }
13606
13607 /* "pysam/libcbcf.pyx":362
13608 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values)
13609 * value_count = len(values)
13610 * assert value_count <= n # <<<<<<<<<<<<<<
13611 * datac = <char *>data
13612 * memcpy(datac, <char *>values, value_count)
13613 */
13614 #ifndef CYTHON_WITHOUT_ASSERTIONS
13615 if (unlikely(__pyx_assertions_enabled())) {
13616 __pyx_t_3 = (__pyx_v_value_count <= __pyx_v_n);
13617 if (unlikely(!__pyx_t_3)) {
13618 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
13619 __PYX_ERR(0, 362, __pyx_L1_error)
13620 }
13621 }
13622 #else
13623 if ((1)); else __PYX_ERR(0, 362, __pyx_L1_error)
13624 #endif
13625
13626 /* "pysam/libcbcf.pyx":363
13627 * value_count = len(values)
13628 * assert value_count <= n
13629 * datac = <char *>data # <<<<<<<<<<<<<<
13630 * memcpy(datac, <char *>values, value_count)
13631 * for i in range(value_count, n):
13632 */
13633 __pyx_v_datac = ((char *)__pyx_v_data);
13634
13635 /* "pysam/libcbcf.pyx":364
13636 * assert value_count <= n
13637 * datac = <char *>data
13638 * memcpy(datac, <char *>values, value_count) # <<<<<<<<<<<<<<
13639 * for i in range(value_count, n):
13640 * datac[i] = 0
13641 */
13642 __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_values); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L1_error)
13643 (void)(memcpy(__pyx_v_datac, ((char *)__pyx_t_6), __pyx_v_value_count));
13644
13645 /* "pysam/libcbcf.pyx":365
13646 * datac = <char *>data
13647 * memcpy(datac, <char *>values, value_count)
13648 * for i in range(value_count, n): # <<<<<<<<<<<<<<
13649 * datac[i] = 0
13650 * elif bt_type == BCF_BT_INT8:
13651 */
13652 __pyx_t_7 = __pyx_v_n;
13653 __pyx_t_8 = __pyx_t_7;
13654 for (__pyx_t_9 = __pyx_v_value_count; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
13655 __pyx_v_i = __pyx_t_9;
13656
13657 /* "pysam/libcbcf.pyx":366
13658 * memcpy(datac, <char *>values, value_count)
13659 * for i in range(value_count, n):
13660 * datac[i] = 0 # <<<<<<<<<<<<<<
13661 * elif bt_type == BCF_BT_INT8:
13662 * datai8 = <int8_t *>data
13663 */
13664 (__pyx_v_datac[__pyx_v_i]) = 0;
13665 }
13666
13667 /* "pysam/libcbcf.pyx":358
13668 * assert value_count <= n
13669 *
13670 * if bt_type == BCF_BT_CHAR: # <<<<<<<<<<<<<<
13671 * if not isinstance(values, (str, bytes)):
13672 * values = b','.join(force_bytes(v) if v else bcf_str_missing for v in values)
13673 */
13674 goto __pyx_L3;
13675 }
13676
13677 /* "pysam/libcbcf.pyx":367
13678 * for i in range(value_count, n):
13679 * datac[i] = 0
13680 * elif bt_type == BCF_BT_INT8: # <<<<<<<<<<<<<<
13681 * datai8 = <int8_t *>data
13682 * for i in range(value_count):
13683 */
13684 __pyx_t_3 = (__pyx_v_bt_type == BCF_BT_INT8);
13685 if (__pyx_t_3) {
13686
13687 /* "pysam/libcbcf.pyx":368
13688 * datac[i] = 0
13689 * elif bt_type == BCF_BT_INT8:
13690 * datai8 = <int8_t *>data # <<<<<<<<<<<<<<
13691 * for i in range(value_count):
13692 * val = values[i]
13693 */
13694 __pyx_v_datai8 = ((int8_t *)__pyx_v_data);
13695
13696 /* "pysam/libcbcf.pyx":369
13697 * elif bt_type == BCF_BT_INT8:
13698 * datai8 = <int8_t *>data
13699 * for i in range(value_count): # <<<<<<<<<<<<<<
13700 * val = values[i]
13701 * datai8[i] = val if val is not None else bcf_int8_missing
13702 */
13703 __pyx_t_7 = __pyx_v_value_count;
13704 __pyx_t_8 = __pyx_t_7;
13705 for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
13706 __pyx_v_i = __pyx_t_9;
13707
13708 /* "pysam/libcbcf.pyx":370
13709 * datai8 = <int8_t *>data
13710 * for i in range(value_count):
13711 * val = values[i] # <<<<<<<<<<<<<<
13712 * datai8[i] = val if val is not None else bcf_int8_missing
13713 * for i in range(value_count, n):
13714 */
13715 __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error)
13716 __Pyx_GOTREF(__pyx_t_5);
13717 __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
13718 __pyx_t_5 = 0;
13719
13720 /* "pysam/libcbcf.pyx":371
13721 * for i in range(value_count):
13722 * val = values[i]
13723 * datai8[i] = val if val is not None else bcf_int8_missing # <<<<<<<<<<<<<<
13724 * for i in range(value_count, n):
13725 * datai8[i] = bcf_int8_vector_end
13726 */
13727 __pyx_t_3 = (__pyx_v_val != Py_None);
13728 if (__pyx_t_3) {
13729 __pyx_t_11 = __Pyx_PyInt_As_int8_t(__pyx_v_val); if (unlikely((__pyx_t_11 == ((int8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 371, __pyx_L1_error)
13730 __pyx_t_10 = __pyx_t_11;
13731 } else {
13732 __pyx_t_10 = bcf_int8_missing;
13733 }
13734 (__pyx_v_datai8[__pyx_v_i]) = __pyx_t_10;
13735 }
13736
13737 /* "pysam/libcbcf.pyx":372
13738 * val = values[i]
13739 * datai8[i] = val if val is not None else bcf_int8_missing
13740 * for i in range(value_count, n): # <<<<<<<<<<<<<<
13741 * datai8[i] = bcf_int8_vector_end
13742 * elif bt_type == BCF_BT_INT16:
13743 */
13744 __pyx_t_7 = __pyx_v_n;
13745 __pyx_t_8 = __pyx_t_7;
13746 for (__pyx_t_9 = __pyx_v_value_count; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
13747 __pyx_v_i = __pyx_t_9;
13748
13749 /* "pysam/libcbcf.pyx":373
13750 * datai8[i] = val if val is not None else bcf_int8_missing
13751 * for i in range(value_count, n):
13752 * datai8[i] = bcf_int8_vector_end # <<<<<<<<<<<<<<
13753 * elif bt_type == BCF_BT_INT16:
13754 * datai16 = <int16_t *>data
13755 */
13756 (__pyx_v_datai8[__pyx_v_i]) = bcf_int8_vector_end;
13757 }
13758
13759 /* "pysam/libcbcf.pyx":367
13760 * for i in range(value_count, n):
13761 * datac[i] = 0
13762 * elif bt_type == BCF_BT_INT8: # <<<<<<<<<<<<<<
13763 * datai8 = <int8_t *>data
13764 * for i in range(value_count):
13765 */
13766 goto __pyx_L3;
13767 }
13768
13769 /* "pysam/libcbcf.pyx":374
13770 * for i in range(value_count, n):
13771 * datai8[i] = bcf_int8_vector_end
13772 * elif bt_type == BCF_BT_INT16: # <<<<<<<<<<<<<<
13773 * datai16 = <int16_t *>data
13774 * for i in range(value_count):
13775 */
13776 __pyx_t_3 = (__pyx_v_bt_type == BCF_BT_INT16);
13777 if (__pyx_t_3) {
13778
13779 /* "pysam/libcbcf.pyx":375
13780 * datai8[i] = bcf_int8_vector_end
13781 * elif bt_type == BCF_BT_INT16:
13782 * datai16 = <int16_t *>data # <<<<<<<<<<<<<<
13783 * for i in range(value_count):
13784 * val = values[i]
13785 */
13786 __pyx_v_datai16 = ((int16_t *)__pyx_v_data);
13787
13788 /* "pysam/libcbcf.pyx":376
13789 * elif bt_type == BCF_BT_INT16:
13790 * datai16 = <int16_t *>data
13791 * for i in range(value_count): # <<<<<<<<<<<<<<
13792 * val = values[i]
13793 * datai16[i] = val if val is not None else bcf_int16_missing
13794 */
13795 __pyx_t_7 = __pyx_v_value_count;
13796 __pyx_t_8 = __pyx_t_7;
13797 for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
13798 __pyx_v_i = __pyx_t_9;
13799
13800 /* "pysam/libcbcf.pyx":377
13801 * datai16 = <int16_t *>data
13802 * for i in range(value_count):
13803 * val = values[i] # <<<<<<<<<<<<<<
13804 * datai16[i] = val if val is not None else bcf_int16_missing
13805 * for i in range(value_count, n):
13806 */
13807 __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
13808 __Pyx_GOTREF(__pyx_t_5);
13809 __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
13810 __pyx_t_5 = 0;
13811
13812 /* "pysam/libcbcf.pyx":378
13813 * for i in range(value_count):
13814 * val = values[i]
13815 * datai16[i] = val if val is not None else bcf_int16_missing # <<<<<<<<<<<<<<
13816 * for i in range(value_count, n):
13817 * datai16[i] = bcf_int16_vector_end
13818 */
13819 __pyx_t_3 = (__pyx_v_val != Py_None);
13820 if (__pyx_t_3) {
13821 __pyx_t_13 = __Pyx_PyInt_As_int16_t(__pyx_v_val); if (unlikely((__pyx_t_13 == ((int16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
13822 __pyx_t_12 = __pyx_t_13;
13823 } else {
13824 __pyx_t_12 = bcf_int16_missing;
13825 }
13826 (__pyx_v_datai16[__pyx_v_i]) = __pyx_t_12;
13827 }
13828
13829 /* "pysam/libcbcf.pyx":379
13830 * val = values[i]
13831 * datai16[i] = val if val is not None else bcf_int16_missing
13832 * for i in range(value_count, n): # <<<<<<<<<<<<<<
13833 * datai16[i] = bcf_int16_vector_end
13834 * elif bt_type == BCF_BT_INT32:
13835 */
13836 __pyx_t_7 = __pyx_v_n;
13837 __pyx_t_8 = __pyx_t_7;
13838 for (__pyx_t_9 = __pyx_v_value_count; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
13839 __pyx_v_i = __pyx_t_9;
13840
13841 /* "pysam/libcbcf.pyx":380
13842 * datai16[i] = val if val is not None else bcf_int16_missing
13843 * for i in range(value_count, n):
13844 * datai16[i] = bcf_int16_vector_end # <<<<<<<<<<<<<<
13845 * elif bt_type == BCF_BT_INT32:
13846 * datai32 = <int32_t *>data
13847 */
13848 (__pyx_v_datai16[__pyx_v_i]) = bcf_int16_vector_end;
13849 }
13850
13851 /* "pysam/libcbcf.pyx":374
13852 * for i in range(value_count, n):
13853 * datai8[i] = bcf_int8_vector_end
13854 * elif bt_type == BCF_BT_INT16: # <<<<<<<<<<<<<<
13855 * datai16 = <int16_t *>data
13856 * for i in range(value_count):
13857 */
13858 goto __pyx_L3;
13859 }
13860
13861 /* "pysam/libcbcf.pyx":381
13862 * for i in range(value_count, n):
13863 * datai16[i] = bcf_int16_vector_end
13864 * elif bt_type == BCF_BT_INT32: # <<<<<<<<<<<<<<
13865 * datai32 = <int32_t *>data
13866 * for i in range(value_count):
13867 */
13868 __pyx_t_3 = (__pyx_v_bt_type == BCF_BT_INT32);
13869 if (__pyx_t_3) {
13870
13871 /* "pysam/libcbcf.pyx":382
13872 * datai16[i] = bcf_int16_vector_end
13873 * elif bt_type == BCF_BT_INT32:
13874 * datai32 = <int32_t *>data # <<<<<<<<<<<<<<
13875 * for i in range(value_count):
13876 * val = values[i]
13877 */
13878 __pyx_v_datai32 = ((int32_t *)__pyx_v_data);
13879
13880 /* "pysam/libcbcf.pyx":383
13881 * elif bt_type == BCF_BT_INT32:
13882 * datai32 = <int32_t *>data
13883 * for i in range(value_count): # <<<<<<<<<<<<<<
13884 * val = values[i]
13885 * datai32[i] = val if val is not None else bcf_int32_missing
13886 */
13887 __pyx_t_7 = __pyx_v_value_count;
13888 __pyx_t_8 = __pyx_t_7;
13889 for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
13890 __pyx_v_i = __pyx_t_9;
13891
13892 /* "pysam/libcbcf.pyx":384
13893 * datai32 = <int32_t *>data
13894 * for i in range(value_count):
13895 * val = values[i] # <<<<<<<<<<<<<<
13896 * datai32[i] = val if val is not None else bcf_int32_missing
13897 * for i in range(value_count, n):
13898 */
13899 __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error)
13900 __Pyx_GOTREF(__pyx_t_5);
13901 __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
13902 __pyx_t_5 = 0;
13903
13904 /* "pysam/libcbcf.pyx":385
13905 * for i in range(value_count):
13906 * val = values[i]
13907 * datai32[i] = val if val is not None else bcf_int32_missing # <<<<<<<<<<<<<<
13908 * for i in range(value_count, n):
13909 * datai32[i] = bcf_int32_vector_end
13910 */
13911 __pyx_t_3 = (__pyx_v_val != Py_None);
13912 if (__pyx_t_3) {
13913 __pyx_t_15 = __Pyx_PyInt_As_int32_t(__pyx_v_val); if (unlikely((__pyx_t_15 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error)
13914 __pyx_t_14 = __pyx_t_15;
13915 } else {
13916 __pyx_t_14 = bcf_int32_missing;
13917 }
13918 (__pyx_v_datai32[__pyx_v_i]) = __pyx_t_14;
13919 }
13920
13921 /* "pysam/libcbcf.pyx":386
13922 * val = values[i]
13923 * datai32[i] = val if val is not None else bcf_int32_missing
13924 * for i in range(value_count, n): # <<<<<<<<<<<<<<
13925 * datai32[i] = bcf_int32_vector_end
13926 * elif bt_type == BCF_BT_FLOAT:
13927 */
13928 __pyx_t_7 = __pyx_v_n;
13929 __pyx_t_8 = __pyx_t_7;
13930 for (__pyx_t_9 = __pyx_v_value_count; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
13931 __pyx_v_i = __pyx_t_9;
13932
13933 /* "pysam/libcbcf.pyx":387
13934 * datai32[i] = val if val is not None else bcf_int32_missing
13935 * for i in range(value_count, n):
13936 * datai32[i] = bcf_int32_vector_end # <<<<<<<<<<<<<<
13937 * elif bt_type == BCF_BT_FLOAT:
13938 * dataf = <float *>data
13939 */
13940 (__pyx_v_datai32[__pyx_v_i]) = bcf_int32_vector_end;
13941 }
13942
13943 /* "pysam/libcbcf.pyx":381
13944 * for i in range(value_count, n):
13945 * datai16[i] = bcf_int16_vector_end
13946 * elif bt_type == BCF_BT_INT32: # <<<<<<<<<<<<<<
13947 * datai32 = <int32_t *>data
13948 * for i in range(value_count):
13949 */
13950 goto __pyx_L3;
13951 }
13952
13953 /* "pysam/libcbcf.pyx":388
13954 * for i in range(value_count, n):
13955 * datai32[i] = bcf_int32_vector_end
13956 * elif bt_type == BCF_BT_FLOAT: # <<<<<<<<<<<<<<
13957 * dataf = <float *>data
13958 * for i in range(value_count):
13959 */
13960 __pyx_t_3 = (__pyx_v_bt_type == BCF_BT_FLOAT);
13961 if (likely(__pyx_t_3)) {
13962
13963 /* "pysam/libcbcf.pyx":389
13964 * datai32[i] = bcf_int32_vector_end
13965 * elif bt_type == BCF_BT_FLOAT:
13966 * dataf = <float *>data # <<<<<<<<<<<<<<
13967 * for i in range(value_count):
13968 * val = values[i]
13969 */
13970 __pyx_v_dataf = ((float *)__pyx_v_data);
13971
13972 /* "pysam/libcbcf.pyx":390
13973 * elif bt_type == BCF_BT_FLOAT:
13974 * dataf = <float *>data
13975 * for i in range(value_count): # <<<<<<<<<<<<<<
13976 * val = values[i]
13977 * if val is None:
13978 */
13979 __pyx_t_7 = __pyx_v_value_count;
13980 __pyx_t_8 = __pyx_t_7;
13981 for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
13982 __pyx_v_i = __pyx_t_9;
13983
13984 /* "pysam/libcbcf.pyx":391
13985 * dataf = <float *>data
13986 * for i in range(value_count):
13987 * val = values[i] # <<<<<<<<<<<<<<
13988 * if val is None:
13989 * bcf_float_set(dataf + i, bcf_float_missing)
13990 */
13991 __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 391, __pyx_L1_error)
13992 __Pyx_GOTREF(__pyx_t_5);
13993 __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
13994 __pyx_t_5 = 0;
13995
13996 /* "pysam/libcbcf.pyx":392
13997 * for i in range(value_count):
13998 * val = values[i]
13999 * if val is None: # <<<<<<<<<<<<<<
14000 * bcf_float_set(dataf + i, bcf_float_missing)
14001 * else:
14002 */
14003 __pyx_t_3 = (__pyx_v_val == Py_None);
14004 if (__pyx_t_3) {
14005
14006 /* "pysam/libcbcf.pyx":393
14007 * val = values[i]
14008 * if val is None:
14009 * bcf_float_set(dataf + i, bcf_float_missing) # <<<<<<<<<<<<<<
14010 * else:
14011 * dataf[i] = val
14012 */
14013 bcf_float_set((__pyx_v_dataf + __pyx_v_i), bcf_float_missing);
14014
14015 /* "pysam/libcbcf.pyx":392
14016 * for i in range(value_count):
14017 * val = values[i]
14018 * if val is None: # <<<<<<<<<<<<<<
14019 * bcf_float_set(dataf + i, bcf_float_missing)
14020 * else:
14021 */
14022 goto __pyx_L23;
14023 }
14024
14025 /* "pysam/libcbcf.pyx":395
14026 * bcf_float_set(dataf + i, bcf_float_missing)
14027 * else:
14028 * dataf[i] = val # <<<<<<<<<<<<<<
14029 * for i in range(value_count, n):
14030 * bcf_float_set(dataf + i, bcf_float_vector_end)
14031 */
14032 /*else*/ {
14033 __pyx_t_16 = __pyx_PyFloat_AsFloat(__pyx_v_val); if (unlikely((__pyx_t_16 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L1_error)
14034 (__pyx_v_dataf[__pyx_v_i]) = __pyx_t_16;
14035 }
14036 __pyx_L23:;
14037 }
14038
14039 /* "pysam/libcbcf.pyx":396
14040 * else:
14041 * dataf[i] = val
14042 * for i in range(value_count, n): # <<<<<<<<<<<<<<
14043 * bcf_float_set(dataf + i, bcf_float_vector_end)
14044 * else:
14045 */
14046 __pyx_t_7 = __pyx_v_n;
14047 __pyx_t_8 = __pyx_t_7;
14048 for (__pyx_t_9 = __pyx_v_value_count; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
14049 __pyx_v_i = __pyx_t_9;
14050
14051 /* "pysam/libcbcf.pyx":397
14052 * dataf[i] = val
14053 * for i in range(value_count, n):
14054 * bcf_float_set(dataf + i, bcf_float_vector_end) # <<<<<<<<<<<<<<
14055 * else:
14056 * raise TypeError('unsupported type')
14057 */
14058 bcf_float_set((__pyx_v_dataf + __pyx_v_i), bcf_float_vector_end);
14059 }
14060
14061 /* "pysam/libcbcf.pyx":388
14062 * for i in range(value_count, n):
14063 * datai32[i] = bcf_int32_vector_end
14064 * elif bt_type == BCF_BT_FLOAT: # <<<<<<<<<<<<<<
14065 * dataf = <float *>data
14066 * for i in range(value_count):
14067 */
14068 goto __pyx_L3;
14069 }
14070
14071 /* "pysam/libcbcf.pyx":399
14072 * bcf_float_set(dataf + i, bcf_float_vector_end)
14073 * else:
14074 * raise TypeError('unsupported type') # <<<<<<<<<<<<<<
14075 *
14076 *
14077 */
14078 /*else*/ {
14079 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 399, __pyx_L1_error)
14080 __Pyx_GOTREF(__pyx_t_5);
14081 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
14082 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14083 __PYX_ERR(0, 399, __pyx_L1_error)
14084 }
14085 __pyx_L3:;
14086
14087 /* "pysam/libcbcf.pyx":348
14088 *
14089 *
14090 * cdef bcf_object_to_array(values, void *data, int bt_type, ssize_t n, int vlen): # <<<<<<<<<<<<<<
14091 * cdef char *datac
14092 * cdef int8_t *data8
14093 */
14094
14095 /* function exit code */
14096 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14097 goto __pyx_L0;
14098 __pyx_L1_error:;
14099 __Pyx_XDECREF(__pyx_t_4);
14100 __Pyx_XDECREF(__pyx_t_5);
14101 __Pyx_AddTraceback("pysam.libcbcf.bcf_object_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
14102 __pyx_r = 0;
14103 __pyx_L0:;
14104 __Pyx_XDECREF(__pyx_v_val);
14105 __Pyx_XDECREF(__pyx_gb_5pysam_7libcbcf_19bcf_object_to_array_2generator30);
14106 __Pyx_XDECREF(__pyx_v_values);
14107 __Pyx_XGIVEREF(__pyx_r);
14108 __Pyx_TraceReturn(__pyx_r, 0);
14109 __Pyx_RefNannyFinishContext();
14110 return __pyx_r;
14111 }
14112
14113 /* "pysam/libcbcf.pyx":402
14114 *
14115 *
14116 * cdef bcf_empty_array(int type, ssize_t n, int vlen): # <<<<<<<<<<<<<<
14117 * cdef char *datac
14118 * cdef int32_t *data32
14119 */
14120
14121 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_empty_array(int __pyx_v_type, Py_ssize_t __pyx_v_n, int __pyx_v_vlen) {
14122 char *__pyx_v_datac;
14123 int32_t *__pyx_v_data32;
14124 float *__pyx_v_dataf;
14125 int __pyx_v_i;
14126 PyObject *__pyx_v_value = NULL;
14127 PyObject *__pyx_r = NULL;
14128 __Pyx_TraceDeclarations
14129 __Pyx_RefNannyDeclarations
14130 int __pyx_t_1;
14131 PyObject *__pyx_t_2 = NULL;
14132 char *__pyx_t_3;
14133 Py_ssize_t __pyx_t_4;
14134 Py_ssize_t __pyx_t_5;
14135 int __pyx_t_6;
14136 int32_t __pyx_t_7;
14137 uint32_t __pyx_t_8;
14138 int __pyx_lineno = 0;
14139 const char *__pyx_filename = NULL;
14140 int __pyx_clineno = 0;
14141 __Pyx_RefNannySetupContext("bcf_empty_array", 1);
14142 __Pyx_TraceCall("bcf_empty_array", __pyx_f[0], 402, 0, __PYX_ERR(0, 402, __pyx_L1_error));
14143
14144 /* "pysam/libcbcf.pyx":408
14145 * cdef int i
14146 *
14147 * if n <= 0: # <<<<<<<<<<<<<<
14148 * raise ValueError('Cannot create empty array')
14149 *
14150 */
14151 __pyx_t_1 = (__pyx_v_n <= 0);
14152 if (unlikely(__pyx_t_1)) {
14153
14154 /* "pysam/libcbcf.pyx":409
14155 *
14156 * if n <= 0:
14157 * raise ValueError('Cannot create empty array') # <<<<<<<<<<<<<<
14158 *
14159 * if type == BCF_HT_STR:
14160 */
14161 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error)
14162 __Pyx_GOTREF(__pyx_t_2);
14163 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
14164 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14165 __PYX_ERR(0, 409, __pyx_L1_error)
14166
14167 /* "pysam/libcbcf.pyx":408
14168 * cdef int i
14169 *
14170 * if n <= 0: # <<<<<<<<<<<<<<
14171 * raise ValueError('Cannot create empty array')
14172 *
14173 */
14174 }
14175
14176 /* "pysam/libcbcf.pyx":411
14177 * raise ValueError('Cannot create empty array')
14178 *
14179 * if type == BCF_HT_STR: # <<<<<<<<<<<<<<
14180 * value = PyBytes_FromStringAndSize(NULL, sizeof(char)*n)
14181 * datac = <char *>value
14182 */
14183 __pyx_t_1 = (__pyx_v_type == BCF_HT_STR);
14184 if (__pyx_t_1) {
14185
14186 /* "pysam/libcbcf.pyx":412
14187 *
14188 * if type == BCF_HT_STR:
14189 * value = PyBytes_FromStringAndSize(NULL, sizeof(char)*n) # <<<<<<<<<<<<<<
14190 * datac = <char *>value
14191 * for i in range(n):
14192 */
14193 __pyx_t_2 = PyBytes_FromStringAndSize(NULL, ((sizeof(char)) * __pyx_v_n)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)
14194 __Pyx_GOTREF(__pyx_t_2);
14195 __pyx_v_value = ((PyObject*)__pyx_t_2);
14196 __pyx_t_2 = 0;
14197
14198 /* "pysam/libcbcf.pyx":413
14199 * if type == BCF_HT_STR:
14200 * value = PyBytes_FromStringAndSize(NULL, sizeof(char)*n)
14201 * datac = <char *>value # <<<<<<<<<<<<<<
14202 * for i in range(n):
14203 * datac[i] = bcf_str_missing if not vlen else bcf_str_vector_end
14204 */
14205 if (unlikely(__pyx_v_value == Py_None)) {
14206 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
14207 __PYX_ERR(0, 413, __pyx_L1_error)
14208 }
14209 __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 413, __pyx_L1_error)
14210 __pyx_v_datac = ((char *)__pyx_t_3);
14211
14212 /* "pysam/libcbcf.pyx":414
14213 * value = PyBytes_FromStringAndSize(NULL, sizeof(char)*n)
14214 * datac = <char *>value
14215 * for i in range(n): # <<<<<<<<<<<<<<
14216 * datac[i] = bcf_str_missing if not vlen else bcf_str_vector_end
14217 * elif type == BCF_HT_INT:
14218 */
14219 __pyx_t_4 = __pyx_v_n;
14220 __pyx_t_5 = __pyx_t_4;
14221 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
14222 __pyx_v_i = __pyx_t_6;
14223
14224 /* "pysam/libcbcf.pyx":415
14225 * datac = <char *>value
14226 * for i in range(n):
14227 * datac[i] = bcf_str_missing if not vlen else bcf_str_vector_end # <<<<<<<<<<<<<<
14228 * elif type == BCF_HT_INT:
14229 * value = PyBytes_FromStringAndSize(NULL, sizeof(int32_t)*n)
14230 */
14231 __pyx_t_1 = (!(__pyx_v_vlen != 0));
14232 if (__pyx_t_1) {
14233 __pyx_t_7 = bcf_str_missing;
14234 } else {
14235 __pyx_t_7 = bcf_str_vector_end;
14236 }
14237 (__pyx_v_datac[__pyx_v_i]) = __pyx_t_7;
14238 }
14239
14240 /* "pysam/libcbcf.pyx":411
14241 * raise ValueError('Cannot create empty array')
14242 *
14243 * if type == BCF_HT_STR: # <<<<<<<<<<<<<<
14244 * value = PyBytes_FromStringAndSize(NULL, sizeof(char)*n)
14245 * datac = <char *>value
14246 */
14247 goto __pyx_L4;
14248 }
14249
14250 /* "pysam/libcbcf.pyx":416
14251 * for i in range(n):
14252 * datac[i] = bcf_str_missing if not vlen else bcf_str_vector_end
14253 * elif type == BCF_HT_INT: # <<<<<<<<<<<<<<
14254 * value = PyBytes_FromStringAndSize(NULL, sizeof(int32_t)*n)
14255 * data32 = <int32_t *><char *>value
14256 */
14257 __pyx_t_1 = (__pyx_v_type == BCF_HT_INT);
14258 if (__pyx_t_1) {
14259
14260 /* "pysam/libcbcf.pyx":417
14261 * datac[i] = bcf_str_missing if not vlen else bcf_str_vector_end
14262 * elif type == BCF_HT_INT:
14263 * value = PyBytes_FromStringAndSize(NULL, sizeof(int32_t)*n) # <<<<<<<<<<<<<<
14264 * data32 = <int32_t *><char *>value
14265 * for i in range(n):
14266 */
14267 __pyx_t_2 = PyBytes_FromStringAndSize(NULL, ((sizeof(int32_t)) * __pyx_v_n)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
14268 __Pyx_GOTREF(__pyx_t_2);
14269 __pyx_v_value = ((PyObject*)__pyx_t_2);
14270 __pyx_t_2 = 0;
14271
14272 /* "pysam/libcbcf.pyx":418
14273 * elif type == BCF_HT_INT:
14274 * value = PyBytes_FromStringAndSize(NULL, sizeof(int32_t)*n)
14275 * data32 = <int32_t *><char *>value # <<<<<<<<<<<<<<
14276 * for i in range(n):
14277 * data32[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14278 */
14279 if (unlikely(__pyx_v_value == Py_None)) {
14280 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
14281 __PYX_ERR(0, 418, __pyx_L1_error)
14282 }
14283 __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L1_error)
14284 __pyx_v_data32 = ((int32_t *)((char *)__pyx_t_3));
14285
14286 /* "pysam/libcbcf.pyx":419
14287 * value = PyBytes_FromStringAndSize(NULL, sizeof(int32_t)*n)
14288 * data32 = <int32_t *><char *>value
14289 * for i in range(n): # <<<<<<<<<<<<<<
14290 * data32[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14291 * elif type == BCF_HT_REAL:
14292 */
14293 __pyx_t_4 = __pyx_v_n;
14294 __pyx_t_5 = __pyx_t_4;
14295 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
14296 __pyx_v_i = __pyx_t_6;
14297
14298 /* "pysam/libcbcf.pyx":420
14299 * data32 = <int32_t *><char *>value
14300 * for i in range(n):
14301 * data32[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end # <<<<<<<<<<<<<<
14302 * elif type == BCF_HT_REAL:
14303 * value = PyBytes_FromStringAndSize(NULL, sizeof(float)*n)
14304 */
14305 __pyx_t_1 = (!(__pyx_v_vlen != 0));
14306 if (__pyx_t_1) {
14307 __pyx_t_7 = bcf_int32_missing;
14308 } else {
14309 __pyx_t_7 = bcf_int32_vector_end;
14310 }
14311 (__pyx_v_data32[__pyx_v_i]) = __pyx_t_7;
14312 }
14313
14314 /* "pysam/libcbcf.pyx":416
14315 * for i in range(n):
14316 * datac[i] = bcf_str_missing if not vlen else bcf_str_vector_end
14317 * elif type == BCF_HT_INT: # <<<<<<<<<<<<<<
14318 * value = PyBytes_FromStringAndSize(NULL, sizeof(int32_t)*n)
14319 * data32 = <int32_t *><char *>value
14320 */
14321 goto __pyx_L4;
14322 }
14323
14324 /* "pysam/libcbcf.pyx":421
14325 * for i in range(n):
14326 * data32[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14327 * elif type == BCF_HT_REAL: # <<<<<<<<<<<<<<
14328 * value = PyBytes_FromStringAndSize(NULL, sizeof(float)*n)
14329 * dataf = <float *><char *>value
14330 */
14331 __pyx_t_1 = (__pyx_v_type == BCF_HT_REAL);
14332 if (likely(__pyx_t_1)) {
14333
14334 /* "pysam/libcbcf.pyx":422
14335 * data32[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14336 * elif type == BCF_HT_REAL:
14337 * value = PyBytes_FromStringAndSize(NULL, sizeof(float)*n) # <<<<<<<<<<<<<<
14338 * dataf = <float *><char *>value
14339 * for i in range(n):
14340 */
14341 __pyx_t_2 = PyBytes_FromStringAndSize(NULL, ((sizeof(float)) * __pyx_v_n)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
14342 __Pyx_GOTREF(__pyx_t_2);
14343 __pyx_v_value = ((PyObject*)__pyx_t_2);
14344 __pyx_t_2 = 0;
14345
14346 /* "pysam/libcbcf.pyx":423
14347 * elif type == BCF_HT_REAL:
14348 * value = PyBytes_FromStringAndSize(NULL, sizeof(float)*n)
14349 * dataf = <float *><char *>value # <<<<<<<<<<<<<<
14350 * for i in range(n):
14351 * bcf_float_set(dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end)
14352 */
14353 if (unlikely(__pyx_v_value == Py_None)) {
14354 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
14355 __PYX_ERR(0, 423, __pyx_L1_error)
14356 }
14357 __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 423, __pyx_L1_error)
14358 __pyx_v_dataf = ((float *)((char *)__pyx_t_3));
14359
14360 /* "pysam/libcbcf.pyx":424
14361 * value = PyBytes_FromStringAndSize(NULL, sizeof(float)*n)
14362 * dataf = <float *><char *>value
14363 * for i in range(n): # <<<<<<<<<<<<<<
14364 * bcf_float_set(dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end)
14365 * else:
14366 */
14367 __pyx_t_4 = __pyx_v_n;
14368 __pyx_t_5 = __pyx_t_4;
14369 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
14370 __pyx_v_i = __pyx_t_6;
14371
14372 /* "pysam/libcbcf.pyx":425
14373 * dataf = <float *><char *>value
14374 * for i in range(n):
14375 * bcf_float_set(dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end) # <<<<<<<<<<<<<<
14376 * else:
14377 * raise TypeError('unsupported header type code')
14378 */
14379 __pyx_t_1 = (!(__pyx_v_vlen != 0));
14380 if (__pyx_t_1) {
14381 __pyx_t_8 = bcf_float_missing;
14382 } else {
14383 __pyx_t_8 = bcf_float_vector_end;
14384 }
14385 bcf_float_set((__pyx_v_dataf + __pyx_v_i), __pyx_t_8);
14386 }
14387
14388 /* "pysam/libcbcf.pyx":421
14389 * for i in range(n):
14390 * data32[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14391 * elif type == BCF_HT_REAL: # <<<<<<<<<<<<<<
14392 * value = PyBytes_FromStringAndSize(NULL, sizeof(float)*n)
14393 * dataf = <float *><char *>value
14394 */
14395 goto __pyx_L4;
14396 }
14397
14398 /* "pysam/libcbcf.pyx":427
14399 * bcf_float_set(dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end)
14400 * else:
14401 * raise TypeError('unsupported header type code') # <<<<<<<<<<<<<<
14402 *
14403 * return value
14404 */
14405 /*else*/ {
14406 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
14407 __Pyx_GOTREF(__pyx_t_2);
14408 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
14409 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14410 __PYX_ERR(0, 427, __pyx_L1_error)
14411 }
14412 __pyx_L4:;
14413
14414 /* "pysam/libcbcf.pyx":429
14415 * raise TypeError('unsupported header type code')
14416 *
14417 * return value # <<<<<<<<<<<<<<
14418 *
14419 *
14420 */
14421 __Pyx_XDECREF(__pyx_r);
14422 __Pyx_INCREF(__pyx_v_value);
14423 __pyx_r = __pyx_v_value;
14424 goto __pyx_L0;
14425
14426 /* "pysam/libcbcf.pyx":402
14427 *
14428 *
14429 * cdef bcf_empty_array(int type, ssize_t n, int vlen): # <<<<<<<<<<<<<<
14430 * cdef char *datac
14431 * cdef int32_t *data32
14432 */
14433
14434 /* function exit code */
14435 __pyx_L1_error:;
14436 __Pyx_XDECREF(__pyx_t_2);
14437 __Pyx_AddTraceback("pysam.libcbcf.bcf_empty_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
14438 __pyx_r = 0;
14439 __pyx_L0:;
14440 __Pyx_XDECREF(__pyx_v_value);
14441 __Pyx_XGIVEREF(__pyx_r);
14442 __Pyx_TraceReturn(__pyx_r, 0);
14443 __Pyx_RefNannyFinishContext();
14444 return __pyx_r;
14445 }
14446
14447 /* "pysam/libcbcf.pyx":432
14448 *
14449 *
14450 * cdef bcf_copy_expand_array(void *src_data, int src_type, size_t src_values, # <<<<<<<<<<<<<<
14451 * void *dst_data, int dst_type, size_t dst_values,
14452 * int vlen):
14453 */
14454
14455 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_copy_expand_array(void *__pyx_v_src_data, int __pyx_v_src_type, size_t __pyx_v_src_values, void *__pyx_v_dst_data, int __pyx_v_dst_type, size_t __pyx_v_dst_values, int __pyx_v_vlen) {
14456 char *__pyx_v_src_datac;
14457 char *__pyx_v_dst_datac;
14458 int8_t *__pyx_v_src_datai8;
14459 int16_t *__pyx_v_src_datai16;
14460 int32_t *__pyx_v_src_datai32;
14461 int32_t *__pyx_v_dst_datai;
14462 float *__pyx_v_src_dataf;
14463 float *__pyx_v_dst_dataf;
14464 Py_ssize_t __pyx_v_i;
14465 int __pyx_v_val;
14466 PyObject *__pyx_r = NULL;
14467 __Pyx_TraceDeclarations
14468 __Pyx_RefNannyDeclarations
14469 int __pyx_t_1;
14470 PyObject *__pyx_t_2 = NULL;
14471 PyObject *__pyx_t_3 = NULL;
14472 PyObject *__pyx_t_4 = NULL;
14473 PyObject *__pyx_t_5 = NULL;
14474 PyObject *__pyx_t_6 = NULL;
14475 unsigned int __pyx_t_7;
14476 size_t __pyx_t_8;
14477 size_t __pyx_t_9;
14478 Py_ssize_t __pyx_t_10;
14479 int __pyx_t_11;
14480 int32_t __pyx_t_12;
14481 uint32_t __pyx_t_13;
14482 int __pyx_lineno = 0;
14483 const char *__pyx_filename = NULL;
14484 int __pyx_clineno = 0;
14485 __Pyx_RefNannySetupContext("bcf_copy_expand_array", 1);
14486 __Pyx_TraceCall("bcf_copy_expand_array", __pyx_f[0], 432, 0, __PYX_ERR(0, 432, __pyx_L1_error));
14487
14488 /* "pysam/libcbcf.pyx":450
14489 * cdef int val
14490 *
14491 * if src_values > dst_values: # <<<<<<<<<<<<<<
14492 * raise ValueError('Cannot copy arrays with src_values={} > dst_values={}'.format(src_values, dst_values))
14493 *
14494 */
14495 __pyx_t_1 = (__pyx_v_src_values > __pyx_v_dst_values);
14496 if (unlikely(__pyx_t_1)) {
14497
14498 /* "pysam/libcbcf.pyx":451
14499 *
14500 * if src_values > dst_values:
14501 * raise ValueError('Cannot copy arrays with src_values={} > dst_values={}'.format(src_values, dst_values)) # <<<<<<<<<<<<<<
14502 *
14503 * if src_type == dst_type == BCF_BT_CHAR:
14504 */
14505 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_copy_arrays_with_src_valu, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error)
14506 __Pyx_GOTREF(__pyx_t_3);
14507 __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_src_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
14508 __Pyx_GOTREF(__pyx_t_4);
14509 __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_dst_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error)
14510 __Pyx_GOTREF(__pyx_t_5);
14511 __pyx_t_6 = NULL;
14512 __pyx_t_7 = 0;
14513 #if CYTHON_UNPACK_METHODS
14514 if (likely(PyMethod_Check(__pyx_t_3))) {
14515 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
14516 if (likely(__pyx_t_6)) {
14517 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
14518 __Pyx_INCREF(__pyx_t_6);
14519 __Pyx_INCREF(function);
14520 __Pyx_DECREF_SET(__pyx_t_3, function);
14521 __pyx_t_7 = 1;
14522 }
14523 }
14524 #endif
14525 {
14526 PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
14527 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
14528 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14529 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14530 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14531 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
14532 __Pyx_GOTREF(__pyx_t_2);
14533 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14534 }
14535 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error)
14536 __Pyx_GOTREF(__pyx_t_3);
14537 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14538 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
14539 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14540 __PYX_ERR(0, 451, __pyx_L1_error)
14541
14542 /* "pysam/libcbcf.pyx":450
14543 * cdef int val
14544 *
14545 * if src_values > dst_values: # <<<<<<<<<<<<<<
14546 * raise ValueError('Cannot copy arrays with src_values={} > dst_values={}'.format(src_values, dst_values))
14547 *
14548 */
14549 }
14550
14551 /* "pysam/libcbcf.pyx":453
14552 * raise ValueError('Cannot copy arrays with src_values={} > dst_values={}'.format(src_values, dst_values))
14553 *
14554 * if src_type == dst_type == BCF_BT_CHAR: # <<<<<<<<<<<<<<
14555 * src_datac = <char *>src_data
14556 * dst_datac = <char *>dst_data
14557 */
14558 __pyx_t_1 = (__pyx_v_src_type == __pyx_v_dst_type);
14559 if (__pyx_t_1) {
14560 __pyx_t_1 = (__pyx_v_dst_type == BCF_BT_CHAR);
14561 }
14562 if (__pyx_t_1) {
14563
14564 /* "pysam/libcbcf.pyx":454
14565 *
14566 * if src_type == dst_type == BCF_BT_CHAR:
14567 * src_datac = <char *>src_data # <<<<<<<<<<<<<<
14568 * dst_datac = <char *>dst_data
14569 * memcpy(dst_datac, src_datac, src_values)
14570 */
14571 __pyx_v_src_datac = ((char *)__pyx_v_src_data);
14572
14573 /* "pysam/libcbcf.pyx":455
14574 * if src_type == dst_type == BCF_BT_CHAR:
14575 * src_datac = <char *>src_data
14576 * dst_datac = <char *>dst_data # <<<<<<<<<<<<<<
14577 * memcpy(dst_datac, src_datac, src_values)
14578 * for i in range(src_values, dst_values):
14579 */
14580 __pyx_v_dst_datac = ((char *)__pyx_v_dst_data);
14581
14582 /* "pysam/libcbcf.pyx":456
14583 * src_datac = <char *>src_data
14584 * dst_datac = <char *>dst_data
14585 * memcpy(dst_datac, src_datac, src_values) # <<<<<<<<<<<<<<
14586 * for i in range(src_values, dst_values):
14587 * dst_datac[i] = 0
14588 */
14589 (void)(memcpy(__pyx_v_dst_datac, __pyx_v_src_datac, __pyx_v_src_values));
14590
14591 /* "pysam/libcbcf.pyx":457
14592 * dst_datac = <char *>dst_data
14593 * memcpy(dst_datac, src_datac, src_values)
14594 * for i in range(src_values, dst_values): # <<<<<<<<<<<<<<
14595 * dst_datac[i] = 0
14596 * elif src_type == BCF_BT_INT8 and dst_type == BCF_BT_INT32:
14597 */
14598 __pyx_t_8 = __pyx_v_dst_values;
14599 __pyx_t_9 = __pyx_t_8;
14600 for (__pyx_t_10 = __pyx_v_src_values; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
14601 __pyx_v_i = __pyx_t_10;
14602
14603 /* "pysam/libcbcf.pyx":458
14604 * memcpy(dst_datac, src_datac, src_values)
14605 * for i in range(src_values, dst_values):
14606 * dst_datac[i] = 0 # <<<<<<<<<<<<<<
14607 * elif src_type == BCF_BT_INT8 and dst_type == BCF_BT_INT32:
14608 * src_datai8 = <int8_t *>src_data
14609 */
14610 (__pyx_v_dst_datac[__pyx_v_i]) = 0;
14611 }
14612
14613 /* "pysam/libcbcf.pyx":453
14614 * raise ValueError('Cannot copy arrays with src_values={} > dst_values={}'.format(src_values, dst_values))
14615 *
14616 * if src_type == dst_type == BCF_BT_CHAR: # <<<<<<<<<<<<<<
14617 * src_datac = <char *>src_data
14618 * dst_datac = <char *>dst_data
14619 */
14620 goto __pyx_L4;
14621 }
14622
14623 /* "pysam/libcbcf.pyx":459
14624 * for i in range(src_values, dst_values):
14625 * dst_datac[i] = 0
14626 * elif src_type == BCF_BT_INT8 and dst_type == BCF_BT_INT32: # <<<<<<<<<<<<<<
14627 * src_datai8 = <int8_t *>src_data
14628 * dst_datai = <int32_t *>dst_data
14629 */
14630 __pyx_t_11 = (__pyx_v_src_type == BCF_BT_INT8);
14631 if (__pyx_t_11) {
14632 } else {
14633 __pyx_t_1 = __pyx_t_11;
14634 goto __pyx_L7_bool_binop_done;
14635 }
14636 __pyx_t_11 = (__pyx_v_dst_type == BCF_BT_INT32);
14637 __pyx_t_1 = __pyx_t_11;
14638 __pyx_L7_bool_binop_done:;
14639 if (__pyx_t_1) {
14640
14641 /* "pysam/libcbcf.pyx":460
14642 * dst_datac[i] = 0
14643 * elif src_type == BCF_BT_INT8 and dst_type == BCF_BT_INT32:
14644 * src_datai8 = <int8_t *>src_data # <<<<<<<<<<<<<<
14645 * dst_datai = <int32_t *>dst_data
14646 * for i in range(src_values):
14647 */
14648 __pyx_v_src_datai8 = ((int8_t *)__pyx_v_src_data);
14649
14650 /* "pysam/libcbcf.pyx":461
14651 * elif src_type == BCF_BT_INT8 and dst_type == BCF_BT_INT32:
14652 * src_datai8 = <int8_t *>src_data
14653 * dst_datai = <int32_t *>dst_data # <<<<<<<<<<<<<<
14654 * for i in range(src_values):
14655 * val = src_datai8[i]
14656 */
14657 __pyx_v_dst_datai = ((int32_t *)__pyx_v_dst_data);
14658
14659 /* "pysam/libcbcf.pyx":462
14660 * src_datai8 = <int8_t *>src_data
14661 * dst_datai = <int32_t *>dst_data
14662 * for i in range(src_values): # <<<<<<<<<<<<<<
14663 * val = src_datai8[i]
14664 * if val == bcf_int8_missing:
14665 */
14666 __pyx_t_8 = __pyx_v_src_values;
14667 __pyx_t_9 = __pyx_t_8;
14668 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
14669 __pyx_v_i = __pyx_t_10;
14670
14671 /* "pysam/libcbcf.pyx":463
14672 * dst_datai = <int32_t *>dst_data
14673 * for i in range(src_values):
14674 * val = src_datai8[i] # <<<<<<<<<<<<<<
14675 * if val == bcf_int8_missing:
14676 * val = bcf_int32_missing
14677 */
14678 __pyx_v_val = (__pyx_v_src_datai8[__pyx_v_i]);
14679
14680 /* "pysam/libcbcf.pyx":464
14681 * for i in range(src_values):
14682 * val = src_datai8[i]
14683 * if val == bcf_int8_missing: # <<<<<<<<<<<<<<
14684 * val = bcf_int32_missing
14685 * elif val == bcf_int8_vector_end:
14686 */
14687 __pyx_t_1 = (__pyx_v_val == bcf_int8_missing);
14688 if (__pyx_t_1) {
14689
14690 /* "pysam/libcbcf.pyx":465
14691 * val = src_datai8[i]
14692 * if val == bcf_int8_missing:
14693 * val = bcf_int32_missing # <<<<<<<<<<<<<<
14694 * elif val == bcf_int8_vector_end:
14695 * val = bcf_int32_vector_end
14696 */
14697 __pyx_v_val = bcf_int32_missing;
14698
14699 /* "pysam/libcbcf.pyx":464
14700 * for i in range(src_values):
14701 * val = src_datai8[i]
14702 * if val == bcf_int8_missing: # <<<<<<<<<<<<<<
14703 * val = bcf_int32_missing
14704 * elif val == bcf_int8_vector_end:
14705 */
14706 goto __pyx_L11;
14707 }
14708
14709 /* "pysam/libcbcf.pyx":466
14710 * if val == bcf_int8_missing:
14711 * val = bcf_int32_missing
14712 * elif val == bcf_int8_vector_end: # <<<<<<<<<<<<<<
14713 * val = bcf_int32_vector_end
14714 * dst_datai[i] = val
14715 */
14716 __pyx_t_1 = (__pyx_v_val == bcf_int8_vector_end);
14717 if (__pyx_t_1) {
14718
14719 /* "pysam/libcbcf.pyx":467
14720 * val = bcf_int32_missing
14721 * elif val == bcf_int8_vector_end:
14722 * val = bcf_int32_vector_end # <<<<<<<<<<<<<<
14723 * dst_datai[i] = val
14724 * for i in range(src_values, dst_values):
14725 */
14726 __pyx_v_val = bcf_int32_vector_end;
14727
14728 /* "pysam/libcbcf.pyx":466
14729 * if val == bcf_int8_missing:
14730 * val = bcf_int32_missing
14731 * elif val == bcf_int8_vector_end: # <<<<<<<<<<<<<<
14732 * val = bcf_int32_vector_end
14733 * dst_datai[i] = val
14734 */
14735 }
14736 __pyx_L11:;
14737
14738 /* "pysam/libcbcf.pyx":468
14739 * elif val == bcf_int8_vector_end:
14740 * val = bcf_int32_vector_end
14741 * dst_datai[i] = val # <<<<<<<<<<<<<<
14742 * for i in range(src_values, dst_values):
14743 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14744 */
14745 (__pyx_v_dst_datai[__pyx_v_i]) = __pyx_v_val;
14746 }
14747
14748 /* "pysam/libcbcf.pyx":469
14749 * val = bcf_int32_vector_end
14750 * dst_datai[i] = val
14751 * for i in range(src_values, dst_values): # <<<<<<<<<<<<<<
14752 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14753 * elif src_type == BCF_BT_INT16 and dst_type == BCF_BT_INT32:
14754 */
14755 __pyx_t_8 = __pyx_v_dst_values;
14756 __pyx_t_9 = __pyx_t_8;
14757 for (__pyx_t_10 = __pyx_v_src_values; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
14758 __pyx_v_i = __pyx_t_10;
14759
14760 /* "pysam/libcbcf.pyx":470
14761 * dst_datai[i] = val
14762 * for i in range(src_values, dst_values):
14763 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end # <<<<<<<<<<<<<<
14764 * elif src_type == BCF_BT_INT16 and dst_type == BCF_BT_INT32:
14765 * src_datai16 = <int16_t *>src_data
14766 */
14767 __pyx_t_1 = (!(__pyx_v_vlen != 0));
14768 if (__pyx_t_1) {
14769 __pyx_t_12 = bcf_int32_missing;
14770 } else {
14771 __pyx_t_12 = bcf_int32_vector_end;
14772 }
14773 (__pyx_v_dst_datai[__pyx_v_i]) = __pyx_t_12;
14774 }
14775
14776 /* "pysam/libcbcf.pyx":459
14777 * for i in range(src_values, dst_values):
14778 * dst_datac[i] = 0
14779 * elif src_type == BCF_BT_INT8 and dst_type == BCF_BT_INT32: # <<<<<<<<<<<<<<
14780 * src_datai8 = <int8_t *>src_data
14781 * dst_datai = <int32_t *>dst_data
14782 */
14783 goto __pyx_L4;
14784 }
14785
14786 /* "pysam/libcbcf.pyx":471
14787 * for i in range(src_values, dst_values):
14788 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14789 * elif src_type == BCF_BT_INT16 and dst_type == BCF_BT_INT32: # <<<<<<<<<<<<<<
14790 * src_datai16 = <int16_t *>src_data
14791 * dst_datai = <int32_t *>dst_data
14792 */
14793 __pyx_t_11 = (__pyx_v_src_type == BCF_BT_INT16);
14794 if (__pyx_t_11) {
14795 } else {
14796 __pyx_t_1 = __pyx_t_11;
14797 goto __pyx_L14_bool_binop_done;
14798 }
14799 __pyx_t_11 = (__pyx_v_dst_type == BCF_BT_INT32);
14800 __pyx_t_1 = __pyx_t_11;
14801 __pyx_L14_bool_binop_done:;
14802 if (__pyx_t_1) {
14803
14804 /* "pysam/libcbcf.pyx":472
14805 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14806 * elif src_type == BCF_BT_INT16 and dst_type == BCF_BT_INT32:
14807 * src_datai16 = <int16_t *>src_data # <<<<<<<<<<<<<<
14808 * dst_datai = <int32_t *>dst_data
14809 * for i in range(src_values):
14810 */
14811 __pyx_v_src_datai16 = ((int16_t *)__pyx_v_src_data);
14812
14813 /* "pysam/libcbcf.pyx":473
14814 * elif src_type == BCF_BT_INT16 and dst_type == BCF_BT_INT32:
14815 * src_datai16 = <int16_t *>src_data
14816 * dst_datai = <int32_t *>dst_data # <<<<<<<<<<<<<<
14817 * for i in range(src_values):
14818 * val = src_datai16[i]
14819 */
14820 __pyx_v_dst_datai = ((int32_t *)__pyx_v_dst_data);
14821
14822 /* "pysam/libcbcf.pyx":474
14823 * src_datai16 = <int16_t *>src_data
14824 * dst_datai = <int32_t *>dst_data
14825 * for i in range(src_values): # <<<<<<<<<<<<<<
14826 * val = src_datai16[i]
14827 * if val == bcf_int16_missing:
14828 */
14829 __pyx_t_8 = __pyx_v_src_values;
14830 __pyx_t_9 = __pyx_t_8;
14831 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
14832 __pyx_v_i = __pyx_t_10;
14833
14834 /* "pysam/libcbcf.pyx":475
14835 * dst_datai = <int32_t *>dst_data
14836 * for i in range(src_values):
14837 * val = src_datai16[i] # <<<<<<<<<<<<<<
14838 * if val == bcf_int16_missing:
14839 * val = bcf_int32_missing
14840 */
14841 __pyx_v_val = (__pyx_v_src_datai16[__pyx_v_i]);
14842
14843 /* "pysam/libcbcf.pyx":476
14844 * for i in range(src_values):
14845 * val = src_datai16[i]
14846 * if val == bcf_int16_missing: # <<<<<<<<<<<<<<
14847 * val = bcf_int32_missing
14848 * elif val == bcf_int16_vector_end:
14849 */
14850 __pyx_t_1 = (__pyx_v_val == bcf_int16_missing);
14851 if (__pyx_t_1) {
14852
14853 /* "pysam/libcbcf.pyx":477
14854 * val = src_datai16[i]
14855 * if val == bcf_int16_missing:
14856 * val = bcf_int32_missing # <<<<<<<<<<<<<<
14857 * elif val == bcf_int16_vector_end:
14858 * val = bcf_int32_vector_end
14859 */
14860 __pyx_v_val = bcf_int32_missing;
14861
14862 /* "pysam/libcbcf.pyx":476
14863 * for i in range(src_values):
14864 * val = src_datai16[i]
14865 * if val == bcf_int16_missing: # <<<<<<<<<<<<<<
14866 * val = bcf_int32_missing
14867 * elif val == bcf_int16_vector_end:
14868 */
14869 goto __pyx_L18;
14870 }
14871
14872 /* "pysam/libcbcf.pyx":478
14873 * if val == bcf_int16_missing:
14874 * val = bcf_int32_missing
14875 * elif val == bcf_int16_vector_end: # <<<<<<<<<<<<<<
14876 * val = bcf_int32_vector_end
14877 * dst_datai[i] = val
14878 */
14879 __pyx_t_1 = (__pyx_v_val == bcf_int16_vector_end);
14880 if (__pyx_t_1) {
14881
14882 /* "pysam/libcbcf.pyx":479
14883 * val = bcf_int32_missing
14884 * elif val == bcf_int16_vector_end:
14885 * val = bcf_int32_vector_end # <<<<<<<<<<<<<<
14886 * dst_datai[i] = val
14887 * for i in range(src_values, dst_values):
14888 */
14889 __pyx_v_val = bcf_int32_vector_end;
14890
14891 /* "pysam/libcbcf.pyx":478
14892 * if val == bcf_int16_missing:
14893 * val = bcf_int32_missing
14894 * elif val == bcf_int16_vector_end: # <<<<<<<<<<<<<<
14895 * val = bcf_int32_vector_end
14896 * dst_datai[i] = val
14897 */
14898 }
14899 __pyx_L18:;
14900
14901 /* "pysam/libcbcf.pyx":480
14902 * elif val == bcf_int16_vector_end:
14903 * val = bcf_int32_vector_end
14904 * dst_datai[i] = val # <<<<<<<<<<<<<<
14905 * for i in range(src_values, dst_values):
14906 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14907 */
14908 (__pyx_v_dst_datai[__pyx_v_i]) = __pyx_v_val;
14909 }
14910
14911 /* "pysam/libcbcf.pyx":481
14912 * val = bcf_int32_vector_end
14913 * dst_datai[i] = val
14914 * for i in range(src_values, dst_values): # <<<<<<<<<<<<<<
14915 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14916 * elif src_type == BCF_BT_INT32 and dst_type == BCF_BT_INT32:
14917 */
14918 __pyx_t_8 = __pyx_v_dst_values;
14919 __pyx_t_9 = __pyx_t_8;
14920 for (__pyx_t_10 = __pyx_v_src_values; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
14921 __pyx_v_i = __pyx_t_10;
14922
14923 /* "pysam/libcbcf.pyx":482
14924 * dst_datai[i] = val
14925 * for i in range(src_values, dst_values):
14926 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end # <<<<<<<<<<<<<<
14927 * elif src_type == BCF_BT_INT32 and dst_type == BCF_BT_INT32:
14928 * src_datai32 = <int32_t *>src_data
14929 */
14930 __pyx_t_1 = (!(__pyx_v_vlen != 0));
14931 if (__pyx_t_1) {
14932 __pyx_t_12 = bcf_int32_missing;
14933 } else {
14934 __pyx_t_12 = bcf_int32_vector_end;
14935 }
14936 (__pyx_v_dst_datai[__pyx_v_i]) = __pyx_t_12;
14937 }
14938
14939 /* "pysam/libcbcf.pyx":471
14940 * for i in range(src_values, dst_values):
14941 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14942 * elif src_type == BCF_BT_INT16 and dst_type == BCF_BT_INT32: # <<<<<<<<<<<<<<
14943 * src_datai16 = <int16_t *>src_data
14944 * dst_datai = <int32_t *>dst_data
14945 */
14946 goto __pyx_L4;
14947 }
14948
14949 /* "pysam/libcbcf.pyx":483
14950 * for i in range(src_values, dst_values):
14951 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14952 * elif src_type == BCF_BT_INT32 and dst_type == BCF_BT_INT32: # <<<<<<<<<<<<<<
14953 * src_datai32 = <int32_t *>src_data
14954 * dst_datai = <int32_t *>dst_data
14955 */
14956 __pyx_t_11 = (__pyx_v_src_type == BCF_BT_INT32);
14957 if (__pyx_t_11) {
14958 } else {
14959 __pyx_t_1 = __pyx_t_11;
14960 goto __pyx_L21_bool_binop_done;
14961 }
14962 __pyx_t_11 = (__pyx_v_dst_type == BCF_BT_INT32);
14963 __pyx_t_1 = __pyx_t_11;
14964 __pyx_L21_bool_binop_done:;
14965 if (__pyx_t_1) {
14966
14967 /* "pysam/libcbcf.pyx":484
14968 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
14969 * elif src_type == BCF_BT_INT32 and dst_type == BCF_BT_INT32:
14970 * src_datai32 = <int32_t *>src_data # <<<<<<<<<<<<<<
14971 * dst_datai = <int32_t *>dst_data
14972 * for i in range(src_values):
14973 */
14974 __pyx_v_src_datai32 = ((int32_t *)__pyx_v_src_data);
14975
14976 /* "pysam/libcbcf.pyx":485
14977 * elif src_type == BCF_BT_INT32 and dst_type == BCF_BT_INT32:
14978 * src_datai32 = <int32_t *>src_data
14979 * dst_datai = <int32_t *>dst_data # <<<<<<<<<<<<<<
14980 * for i in range(src_values):
14981 * dst_datai[i] = src_datai32[i]
14982 */
14983 __pyx_v_dst_datai = ((int32_t *)__pyx_v_dst_data);
14984
14985 /* "pysam/libcbcf.pyx":486
14986 * src_datai32 = <int32_t *>src_data
14987 * dst_datai = <int32_t *>dst_data
14988 * for i in range(src_values): # <<<<<<<<<<<<<<
14989 * dst_datai[i] = src_datai32[i]
14990 * for i in range(src_values, dst_values):
14991 */
14992 __pyx_t_8 = __pyx_v_src_values;
14993 __pyx_t_9 = __pyx_t_8;
14994 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
14995 __pyx_v_i = __pyx_t_10;
14996
14997 /* "pysam/libcbcf.pyx":487
14998 * dst_datai = <int32_t *>dst_data
14999 * for i in range(src_values):
15000 * dst_datai[i] = src_datai32[i] # <<<<<<<<<<<<<<
15001 * for i in range(src_values, dst_values):
15002 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
15003 */
15004 (__pyx_v_dst_datai[__pyx_v_i]) = (__pyx_v_src_datai32[__pyx_v_i]);
15005 }
15006
15007 /* "pysam/libcbcf.pyx":488
15008 * for i in range(src_values):
15009 * dst_datai[i] = src_datai32[i]
15010 * for i in range(src_values, dst_values): # <<<<<<<<<<<<<<
15011 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
15012 * elif src_type == BCF_BT_FLOAT and dst_type == BCF_BT_FLOAT:
15013 */
15014 __pyx_t_8 = __pyx_v_dst_values;
15015 __pyx_t_9 = __pyx_t_8;
15016 for (__pyx_t_10 = __pyx_v_src_values; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
15017 __pyx_v_i = __pyx_t_10;
15018
15019 /* "pysam/libcbcf.pyx":489
15020 * dst_datai[i] = src_datai32[i]
15021 * for i in range(src_values, dst_values):
15022 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end # <<<<<<<<<<<<<<
15023 * elif src_type == BCF_BT_FLOAT and dst_type == BCF_BT_FLOAT:
15024 * src_dataf = <float *>src_data
15025 */
15026 __pyx_t_1 = (!(__pyx_v_vlen != 0));
15027 if (__pyx_t_1) {
15028 __pyx_t_12 = bcf_int32_missing;
15029 } else {
15030 __pyx_t_12 = bcf_int32_vector_end;
15031 }
15032 (__pyx_v_dst_datai[__pyx_v_i]) = __pyx_t_12;
15033 }
15034
15035 /* "pysam/libcbcf.pyx":483
15036 * for i in range(src_values, dst_values):
15037 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
15038 * elif src_type == BCF_BT_INT32 and dst_type == BCF_BT_INT32: # <<<<<<<<<<<<<<
15039 * src_datai32 = <int32_t *>src_data
15040 * dst_datai = <int32_t *>dst_data
15041 */
15042 goto __pyx_L4;
15043 }
15044
15045 /* "pysam/libcbcf.pyx":490
15046 * for i in range(src_values, dst_values):
15047 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
15048 * elif src_type == BCF_BT_FLOAT and dst_type == BCF_BT_FLOAT: # <<<<<<<<<<<<<<
15049 * src_dataf = <float *>src_data
15050 * dst_dataf = <float *>dst_data
15051 */
15052 __pyx_t_11 = (__pyx_v_src_type == BCF_BT_FLOAT);
15053 if (__pyx_t_11) {
15054 } else {
15055 __pyx_t_1 = __pyx_t_11;
15056 goto __pyx_L27_bool_binop_done;
15057 }
15058 __pyx_t_11 = (__pyx_v_dst_type == BCF_BT_FLOAT);
15059 __pyx_t_1 = __pyx_t_11;
15060 __pyx_L27_bool_binop_done:;
15061 if (likely(__pyx_t_1)) {
15062
15063 /* "pysam/libcbcf.pyx":491
15064 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
15065 * elif src_type == BCF_BT_FLOAT and dst_type == BCF_BT_FLOAT:
15066 * src_dataf = <float *>src_data # <<<<<<<<<<<<<<
15067 * dst_dataf = <float *>dst_data
15068 * for i in range(src_values):
15069 */
15070 __pyx_v_src_dataf = ((float *)__pyx_v_src_data);
15071
15072 /* "pysam/libcbcf.pyx":492
15073 * elif src_type == BCF_BT_FLOAT and dst_type == BCF_BT_FLOAT:
15074 * src_dataf = <float *>src_data
15075 * dst_dataf = <float *>dst_data # <<<<<<<<<<<<<<
15076 * for i in range(src_values):
15077 * dst_dataf[i] = src_dataf[i]
15078 */
15079 __pyx_v_dst_dataf = ((float *)__pyx_v_dst_data);
15080
15081 /* "pysam/libcbcf.pyx":493
15082 * src_dataf = <float *>src_data
15083 * dst_dataf = <float *>dst_data
15084 * for i in range(src_values): # <<<<<<<<<<<<<<
15085 * dst_dataf[i] = src_dataf[i]
15086 * for i in range(src_values, dst_values):
15087 */
15088 __pyx_t_8 = __pyx_v_src_values;
15089 __pyx_t_9 = __pyx_t_8;
15090 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
15091 __pyx_v_i = __pyx_t_10;
15092
15093 /* "pysam/libcbcf.pyx":494
15094 * dst_dataf = <float *>dst_data
15095 * for i in range(src_values):
15096 * dst_dataf[i] = src_dataf[i] # <<<<<<<<<<<<<<
15097 * for i in range(src_values, dst_values):
15098 * bcf_float_set(dst_dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end)
15099 */
15100 (__pyx_v_dst_dataf[__pyx_v_i]) = (__pyx_v_src_dataf[__pyx_v_i]);
15101 }
15102
15103 /* "pysam/libcbcf.pyx":495
15104 * for i in range(src_values):
15105 * dst_dataf[i] = src_dataf[i]
15106 * for i in range(src_values, dst_values): # <<<<<<<<<<<<<<
15107 * bcf_float_set(dst_dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end)
15108 * else:
15109 */
15110 __pyx_t_8 = __pyx_v_dst_values;
15111 __pyx_t_9 = __pyx_t_8;
15112 for (__pyx_t_10 = __pyx_v_src_values; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
15113 __pyx_v_i = __pyx_t_10;
15114
15115 /* "pysam/libcbcf.pyx":496
15116 * dst_dataf[i] = src_dataf[i]
15117 * for i in range(src_values, dst_values):
15118 * bcf_float_set(dst_dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end) # <<<<<<<<<<<<<<
15119 * else:
15120 * raise TypeError('unsupported types')
15121 */
15122 __pyx_t_1 = (!(__pyx_v_vlen != 0));
15123 if (__pyx_t_1) {
15124 __pyx_t_13 = bcf_float_missing;
15125 } else {
15126 __pyx_t_13 = bcf_float_vector_end;
15127 }
15128 bcf_float_set((__pyx_v_dst_dataf + __pyx_v_i), __pyx_t_13);
15129 }
15130
15131 /* "pysam/libcbcf.pyx":490
15132 * for i in range(src_values, dst_values):
15133 * dst_datai[i] = bcf_int32_missing if not vlen else bcf_int32_vector_end
15134 * elif src_type == BCF_BT_FLOAT and dst_type == BCF_BT_FLOAT: # <<<<<<<<<<<<<<
15135 * src_dataf = <float *>src_data
15136 * dst_dataf = <float *>dst_data
15137 */
15138 goto __pyx_L4;
15139 }
15140
15141 /* "pysam/libcbcf.pyx":498
15142 * bcf_float_set(dst_dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end)
15143 * else:
15144 * raise TypeError('unsupported types') # <<<<<<<<<<<<<<
15145 *
15146 *
15147 */
15148 /*else*/ {
15149 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error)
15150 __Pyx_GOTREF(__pyx_t_3);
15151 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
15152 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15153 __PYX_ERR(0, 498, __pyx_L1_error)
15154 }
15155 __pyx_L4:;
15156
15157 /* "pysam/libcbcf.pyx":432
15158 *
15159 *
15160 * cdef bcf_copy_expand_array(void *src_data, int src_type, size_t src_values, # <<<<<<<<<<<<<<
15161 * void *dst_data, int dst_type, size_t dst_values,
15162 * int vlen):
15163 */
15164
15165 /* function exit code */
15166 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15167 goto __pyx_L0;
15168 __pyx_L1_error:;
15169 __Pyx_XDECREF(__pyx_t_2);
15170 __Pyx_XDECREF(__pyx_t_3);
15171 __Pyx_XDECREF(__pyx_t_4);
15172 __Pyx_XDECREF(__pyx_t_5);
15173 __Pyx_XDECREF(__pyx_t_6);
15174 __Pyx_AddTraceback("pysam.libcbcf.bcf_copy_expand_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
15175 __pyx_r = 0;
15176 __pyx_L0:;
15177 __Pyx_XGIVEREF(__pyx_r);
15178 __Pyx_TraceReturn(__pyx_r, 0);
15179 __Pyx_RefNannyFinishContext();
15180 return __pyx_r;
15181 }
15182
15183 /* "pysam/libcbcf.pyx":501
15184 *
15185 *
15186 * cdef bcf_get_value_count(VariantRecord record, int hl_type, int id, ssize_t *count, int *scalar, int sample): # <<<<<<<<<<<<<<
15187 * if record is None:
15188 * raise ValueError('record must not be None')
15189 */
15190
15191 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_get_value_count(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, int __pyx_v_hl_type, int __pyx_v_id, Py_ssize_t *__pyx_v_count, int *__pyx_v_scalar, int __pyx_v_sample) {
15192 bcf_hdr_t *__pyx_v_hdr;
15193 bcf1_t *__pyx_v_r;
15194 int __pyx_v_length;
15195 int __pyx_v_number;
15196 PyObject *__pyx_r = NULL;
15197 __Pyx_TraceDeclarations
15198 __Pyx_RefNannyDeclarations
15199 int __pyx_t_1;
15200 PyObject *__pyx_t_2 = NULL;
15201 bcf_hdr_t *__pyx_t_3;
15202 bcf1_t *__pyx_t_4;
15203 int __pyx_t_5;
15204 int __pyx_t_6;
15205 uint32_t __pyx_t_7;
15206 int __pyx_lineno = 0;
15207 const char *__pyx_filename = NULL;
15208 int __pyx_clineno = 0;
15209 __Pyx_RefNannySetupContext("bcf_get_value_count", 1);
15210 __Pyx_TraceCall("bcf_get_value_count", __pyx_f[0], 501, 0, __PYX_ERR(0, 501, __pyx_L1_error));
15211
15212 /* "pysam/libcbcf.pyx":502
15213 *
15214 * cdef bcf_get_value_count(VariantRecord record, int hl_type, int id, ssize_t *count, int *scalar, int sample):
15215 * if record is None: # <<<<<<<<<<<<<<
15216 * raise ValueError('record must not be None')
15217 *
15218 */
15219 __pyx_t_1 = (((PyObject *)__pyx_v_record) == Py_None);
15220 if (unlikely(__pyx_t_1)) {
15221
15222 /* "pysam/libcbcf.pyx":503
15223 * cdef bcf_get_value_count(VariantRecord record, int hl_type, int id, ssize_t *count, int *scalar, int sample):
15224 * if record is None:
15225 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
15226 *
15227 * cdef bcf_hdr_t *hdr = record.header.ptr
15228 */
15229 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
15230 __Pyx_GOTREF(__pyx_t_2);
15231 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15232 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15233 __PYX_ERR(0, 503, __pyx_L1_error)
15234
15235 /* "pysam/libcbcf.pyx":502
15236 *
15237 * cdef bcf_get_value_count(VariantRecord record, int hl_type, int id, ssize_t *count, int *scalar, int sample):
15238 * if record is None: # <<<<<<<<<<<<<<
15239 * raise ValueError('record must not be None')
15240 *
15241 */
15242 }
15243
15244 /* "pysam/libcbcf.pyx":505
15245 * raise ValueError('record must not be None')
15246 *
15247 * cdef bcf_hdr_t *hdr = record.header.ptr # <<<<<<<<<<<<<<
15248 * cdef bcf1_t *r = record.ptr
15249 *
15250 */
15251 __pyx_t_3 = __pyx_v_record->header->ptr;
15252 __pyx_v_hdr = __pyx_t_3;
15253
15254 /* "pysam/libcbcf.pyx":506
15255 *
15256 * cdef bcf_hdr_t *hdr = record.header.ptr
15257 * cdef bcf1_t *r = record.ptr # <<<<<<<<<<<<<<
15258 *
15259 * if not check_header_id(hdr, hl_type, id):
15260 */
15261 __pyx_t_4 = __pyx_v_record->ptr;
15262 __pyx_v_r = __pyx_t_4;
15263
15264 /* "pysam/libcbcf.pyx":508
15265 * cdef bcf1_t *r = record.ptr
15266 *
15267 * if not check_header_id(hdr, hl_type, id): # <<<<<<<<<<<<<<
15268 * raise ValueError('Invalid header')
15269 *
15270 */
15271 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, __pyx_v_hl_type, __pyx_v_id); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
15272 __pyx_t_5 = (!__pyx_t_1);
15273 if (unlikely(__pyx_t_5)) {
15274
15275 /* "pysam/libcbcf.pyx":509
15276 *
15277 * if not check_header_id(hdr, hl_type, id):
15278 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
15279 *
15280 * cdef int length = bcf_hdr_id2length(hdr, hl_type, id)
15281 */
15282 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
15283 __Pyx_GOTREF(__pyx_t_2);
15284 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15285 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15286 __PYX_ERR(0, 509, __pyx_L1_error)
15287
15288 /* "pysam/libcbcf.pyx":508
15289 * cdef bcf1_t *r = record.ptr
15290 *
15291 * if not check_header_id(hdr, hl_type, id): # <<<<<<<<<<<<<<
15292 * raise ValueError('Invalid header')
15293 *
15294 */
15295 }
15296
15297 /* "pysam/libcbcf.pyx":511
15298 * raise ValueError('Invalid header')
15299 *
15300 * cdef int length = bcf_hdr_id2length(hdr, hl_type, id) # <<<<<<<<<<<<<<
15301 * cdef int number = bcf_hdr_id2number(hdr, hl_type, id)
15302 *
15303 */
15304 __pyx_v_length = bcf_hdr_id2length(__pyx_v_hdr, __pyx_v_hl_type, __pyx_v_id);
15305
15306 /* "pysam/libcbcf.pyx":512
15307 *
15308 * cdef int length = bcf_hdr_id2length(hdr, hl_type, id)
15309 * cdef int number = bcf_hdr_id2number(hdr, hl_type, id) # <<<<<<<<<<<<<<
15310 *
15311 * scalar[0] = 0
15312 */
15313 __pyx_v_number = bcf_hdr_id2number(__pyx_v_hdr, __pyx_v_hl_type, __pyx_v_id);
15314
15315 /* "pysam/libcbcf.pyx":514
15316 * cdef int number = bcf_hdr_id2number(hdr, hl_type, id)
15317 *
15318 * scalar[0] = 0 # <<<<<<<<<<<<<<
15319 *
15320 * if hl_type == BCF_HL_FMT and is_gt_fmt(hdr, id):
15321 */
15322 (__pyx_v_scalar[0]) = 0;
15323
15324 /* "pysam/libcbcf.pyx":516
15325 * scalar[0] = 0
15326 *
15327 * if hl_type == BCF_HL_FMT and is_gt_fmt(hdr, id): # <<<<<<<<<<<<<<
15328 * count[0] = number
15329 * elif length == BCF_VL_FIXED:
15330 */
15331 __pyx_t_1 = (__pyx_v_hl_type == BCF_HL_FMT);
15332 if (__pyx_t_1) {
15333 } else {
15334 __pyx_t_5 = __pyx_t_1;
15335 goto __pyx_L6_bool_binop_done;
15336 }
15337 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_is_gt_fmt(__pyx_v_hdr, __pyx_v_id); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 516, __pyx_L1_error)
15338 __pyx_t_1 = (__pyx_t_6 != 0);
15339 __pyx_t_5 = __pyx_t_1;
15340 __pyx_L6_bool_binop_done:;
15341 if (__pyx_t_5) {
15342
15343 /* "pysam/libcbcf.pyx":517
15344 *
15345 * if hl_type == BCF_HL_FMT and is_gt_fmt(hdr, id):
15346 * count[0] = number # <<<<<<<<<<<<<<
15347 * elif length == BCF_VL_FIXED:
15348 * if number == 1:
15349 */
15350 (__pyx_v_count[0]) = __pyx_v_number;
15351
15352 /* "pysam/libcbcf.pyx":516
15353 * scalar[0] = 0
15354 *
15355 * if hl_type == BCF_HL_FMT and is_gt_fmt(hdr, id): # <<<<<<<<<<<<<<
15356 * count[0] = number
15357 * elif length == BCF_VL_FIXED:
15358 */
15359 goto __pyx_L5;
15360 }
15361
15362 /* "pysam/libcbcf.pyx":518
15363 * if hl_type == BCF_HL_FMT and is_gt_fmt(hdr, id):
15364 * count[0] = number
15365 * elif length == BCF_VL_FIXED: # <<<<<<<<<<<<<<
15366 * if number == 1:
15367 * scalar[0] = 1
15368 */
15369 __pyx_t_5 = (__pyx_v_length == BCF_VL_FIXED);
15370 if (__pyx_t_5) {
15371
15372 /* "pysam/libcbcf.pyx":519
15373 * count[0] = number
15374 * elif length == BCF_VL_FIXED:
15375 * if number == 1: # <<<<<<<<<<<<<<
15376 * scalar[0] = 1
15377 * count[0] = number
15378 */
15379 __pyx_t_5 = (__pyx_v_number == 1);
15380 if (__pyx_t_5) {
15381
15382 /* "pysam/libcbcf.pyx":520
15383 * elif length == BCF_VL_FIXED:
15384 * if number == 1:
15385 * scalar[0] = 1 # <<<<<<<<<<<<<<
15386 * count[0] = number
15387 * elif length == BCF_VL_R:
15388 */
15389 (__pyx_v_scalar[0]) = 1;
15390
15391 /* "pysam/libcbcf.pyx":519
15392 * count[0] = number
15393 * elif length == BCF_VL_FIXED:
15394 * if number == 1: # <<<<<<<<<<<<<<
15395 * scalar[0] = 1
15396 * count[0] = number
15397 */
15398 }
15399
15400 /* "pysam/libcbcf.pyx":521
15401 * if number == 1:
15402 * scalar[0] = 1
15403 * count[0] = number # <<<<<<<<<<<<<<
15404 * elif length == BCF_VL_R:
15405 * count[0] = r.n_allele
15406 */
15407 (__pyx_v_count[0]) = __pyx_v_number;
15408
15409 /* "pysam/libcbcf.pyx":518
15410 * if hl_type == BCF_HL_FMT and is_gt_fmt(hdr, id):
15411 * count[0] = number
15412 * elif length == BCF_VL_FIXED: # <<<<<<<<<<<<<<
15413 * if number == 1:
15414 * scalar[0] = 1
15415 */
15416 goto __pyx_L5;
15417 }
15418
15419 /* "pysam/libcbcf.pyx":522
15420 * scalar[0] = 1
15421 * count[0] = number
15422 * elif length == BCF_VL_R: # <<<<<<<<<<<<<<
15423 * count[0] = r.n_allele
15424 * elif length == BCF_VL_A:
15425 */
15426 __pyx_t_5 = (__pyx_v_length == BCF_VL_R);
15427 if (__pyx_t_5) {
15428
15429 /* "pysam/libcbcf.pyx":523
15430 * count[0] = number
15431 * elif length == BCF_VL_R:
15432 * count[0] = r.n_allele # <<<<<<<<<<<<<<
15433 * elif length == BCF_VL_A:
15434 * count[0] = r.n_allele - 1
15435 */
15436 __pyx_t_7 = __pyx_v_r->n_allele;
15437 (__pyx_v_count[0]) = __pyx_t_7;
15438
15439 /* "pysam/libcbcf.pyx":522
15440 * scalar[0] = 1
15441 * count[0] = number
15442 * elif length == BCF_VL_R: # <<<<<<<<<<<<<<
15443 * count[0] = r.n_allele
15444 * elif length == BCF_VL_A:
15445 */
15446 goto __pyx_L5;
15447 }
15448
15449 /* "pysam/libcbcf.pyx":524
15450 * elif length == BCF_VL_R:
15451 * count[0] = r.n_allele
15452 * elif length == BCF_VL_A: # <<<<<<<<<<<<<<
15453 * count[0] = r.n_allele - 1
15454 * elif length == BCF_VL_G:
15455 */
15456 __pyx_t_5 = (__pyx_v_length == BCF_VL_A);
15457 if (__pyx_t_5) {
15458
15459 /* "pysam/libcbcf.pyx":525
15460 * count[0] = r.n_allele
15461 * elif length == BCF_VL_A:
15462 * count[0] = r.n_allele - 1 # <<<<<<<<<<<<<<
15463 * elif length == BCF_VL_G:
15464 * count[0] = bcf_genotype_count(hdr, r, sample)
15465 */
15466 (__pyx_v_count[0]) = (__pyx_v_r->n_allele - 1);
15467
15468 /* "pysam/libcbcf.pyx":524
15469 * elif length == BCF_VL_R:
15470 * count[0] = r.n_allele
15471 * elif length == BCF_VL_A: # <<<<<<<<<<<<<<
15472 * count[0] = r.n_allele - 1
15473 * elif length == BCF_VL_G:
15474 */
15475 goto __pyx_L5;
15476 }
15477
15478 /* "pysam/libcbcf.pyx":526
15479 * elif length == BCF_VL_A:
15480 * count[0] = r.n_allele - 1
15481 * elif length == BCF_VL_G: # <<<<<<<<<<<<<<
15482 * count[0] = bcf_genotype_count(hdr, r, sample)
15483 * elif length == BCF_VL_VAR:
15484 */
15485 __pyx_t_5 = (__pyx_v_length == BCF_VL_G);
15486 if (__pyx_t_5) {
15487
15488 /* "pysam/libcbcf.pyx":527
15489 * count[0] = r.n_allele - 1
15490 * elif length == BCF_VL_G:
15491 * count[0] = bcf_genotype_count(hdr, r, sample) # <<<<<<<<<<<<<<
15492 * elif length == BCF_VL_VAR:
15493 * count[0] = -1
15494 */
15495 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_bcf_genotype_count(__pyx_v_hdr, __pyx_v_r, __pyx_v_sample); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 527, __pyx_L1_error)
15496 (__pyx_v_count[0]) = __pyx_t_6;
15497
15498 /* "pysam/libcbcf.pyx":526
15499 * elif length == BCF_VL_A:
15500 * count[0] = r.n_allele - 1
15501 * elif length == BCF_VL_G: # <<<<<<<<<<<<<<
15502 * count[0] = bcf_genotype_count(hdr, r, sample)
15503 * elif length == BCF_VL_VAR:
15504 */
15505 goto __pyx_L5;
15506 }
15507
15508 /* "pysam/libcbcf.pyx":528
15509 * elif length == BCF_VL_G:
15510 * count[0] = bcf_genotype_count(hdr, r, sample)
15511 * elif length == BCF_VL_VAR: # <<<<<<<<<<<<<<
15512 * count[0] = -1
15513 * else:
15514 */
15515 __pyx_t_5 = (__pyx_v_length == BCF_VL_VAR);
15516 if (likely(__pyx_t_5)) {
15517
15518 /* "pysam/libcbcf.pyx":529
15519 * count[0] = bcf_genotype_count(hdr, r, sample)
15520 * elif length == BCF_VL_VAR:
15521 * count[0] = -1 # <<<<<<<<<<<<<<
15522 * else:
15523 * raise ValueError('Unknown format length')
15524 */
15525 (__pyx_v_count[0]) = -1L;
15526
15527 /* "pysam/libcbcf.pyx":528
15528 * elif length == BCF_VL_G:
15529 * count[0] = bcf_genotype_count(hdr, r, sample)
15530 * elif length == BCF_VL_VAR: # <<<<<<<<<<<<<<
15531 * count[0] = -1
15532 * else:
15533 */
15534 goto __pyx_L5;
15535 }
15536
15537 /* "pysam/libcbcf.pyx":531
15538 * count[0] = -1
15539 * else:
15540 * raise ValueError('Unknown format length') # <<<<<<<<<<<<<<
15541 *
15542 *
15543 */
15544 /*else*/ {
15545 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
15546 __Pyx_GOTREF(__pyx_t_2);
15547 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15548 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15549 __PYX_ERR(0, 531, __pyx_L1_error)
15550 }
15551 __pyx_L5:;
15552
15553 /* "pysam/libcbcf.pyx":501
15554 *
15555 *
15556 * cdef bcf_get_value_count(VariantRecord record, int hl_type, int id, ssize_t *count, int *scalar, int sample): # <<<<<<<<<<<<<<
15557 * if record is None:
15558 * raise ValueError('record must not be None')
15559 */
15560
15561 /* function exit code */
15562 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15563 goto __pyx_L0;
15564 __pyx_L1_error:;
15565 __Pyx_XDECREF(__pyx_t_2);
15566 __Pyx_AddTraceback("pysam.libcbcf.bcf_get_value_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
15567 __pyx_r = 0;
15568 __pyx_L0:;
15569 __Pyx_XGIVEREF(__pyx_r);
15570 __Pyx_TraceReturn(__pyx_r, 0);
15571 __Pyx_RefNannyFinishContext();
15572 return __pyx_r;
15573 }
15574
15575 /* "pysam/libcbcf.pyx":534
15576 *
15577 *
15578 * cdef object bcf_info_get_value(VariantRecord record, const bcf_info_t *z): # <<<<<<<<<<<<<<
15579 * if record is None:
15580 * raise ValueError('record must not be None')
15581 */
15582
15583 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_info_get_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, bcf_info_t const *__pyx_v_z) {
15584 bcf_hdr_t *__pyx_v_hdr;
15585 Py_ssize_t __pyx_v_count;
15586 int __pyx_v_scalar;
15587 PyObject *__pyx_v_value = NULL;
15588 PyObject *__pyx_r = NULL;
15589 __Pyx_TraceDeclarations
15590 __Pyx_RefNannyDeclarations
15591 int __pyx_t_1;
15592 PyObject *__pyx_t_2 = NULL;
15593 bcf_hdr_t *__pyx_t_3;
15594 PyObject *__pyx_t_4 = NULL;
15595 int __pyx_t_5;
15596 int __pyx_lineno = 0;
15597 const char *__pyx_filename = NULL;
15598 int __pyx_clineno = 0;
15599 __Pyx_RefNannySetupContext("bcf_info_get_value", 1);
15600 __Pyx_TraceCall("bcf_info_get_value", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
15601
15602 /* "pysam/libcbcf.pyx":535
15603 *
15604 * cdef object bcf_info_get_value(VariantRecord record, const bcf_info_t *z):
15605 * if record is None: # <<<<<<<<<<<<<<
15606 * raise ValueError('record must not be None')
15607 *
15608 */
15609 __pyx_t_1 = (((PyObject *)__pyx_v_record) == Py_None);
15610 if (unlikely(__pyx_t_1)) {
15611
15612 /* "pysam/libcbcf.pyx":536
15613 * cdef object bcf_info_get_value(VariantRecord record, const bcf_info_t *z):
15614 * if record is None:
15615 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
15616 *
15617 * cdef bcf_hdr_t *hdr = record.header.ptr
15618 */
15619 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error)
15620 __Pyx_GOTREF(__pyx_t_2);
15621 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15622 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15623 __PYX_ERR(0, 536, __pyx_L1_error)
15624
15625 /* "pysam/libcbcf.pyx":535
15626 *
15627 * cdef object bcf_info_get_value(VariantRecord record, const bcf_info_t *z):
15628 * if record is None: # <<<<<<<<<<<<<<
15629 * raise ValueError('record must not be None')
15630 *
15631 */
15632 }
15633
15634 /* "pysam/libcbcf.pyx":538
15635 * raise ValueError('record must not be None')
15636 *
15637 * cdef bcf_hdr_t *hdr = record.header.ptr # <<<<<<<<<<<<<<
15638 *
15639 * cdef char *s
15640 */
15641 __pyx_t_3 = __pyx_v_record->header->ptr;
15642 __pyx_v_hdr = __pyx_t_3;
15643
15644 /* "pysam/libcbcf.pyx":544
15645 * cdef int scalar
15646 *
15647 * bcf_get_value_count(record, BCF_HL_INFO, z.key, &count, &scalar, -1) # <<<<<<<<<<<<<<
15648 *
15649 * if z.len == 0:
15650 */
15651 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_get_value_count(__pyx_v_record, BCF_HL_INFO, __pyx_v_z->key, (&__pyx_v_count), (&__pyx_v_scalar), -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
15652 __Pyx_GOTREF(__pyx_t_2);
15653 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15654
15655 /* "pysam/libcbcf.pyx":546
15656 * bcf_get_value_count(record, BCF_HL_INFO, z.key, &count, &scalar, -1)
15657 *
15658 * if z.len == 0: # <<<<<<<<<<<<<<
15659 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, z.key) == BCF_HT_FLAG:
15660 * value = True
15661 */
15662 switch (__pyx_v_z->len) {
15663 case 0:
15664
15665 /* "pysam/libcbcf.pyx":547
15666 *
15667 * if z.len == 0:
15668 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, z.key) == BCF_HT_FLAG: # <<<<<<<<<<<<<<
15669 * value = True
15670 * elif scalar:
15671 */
15672 __pyx_t_1 = (bcf_hdr_id2type(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_z->key) == BCF_HT_FLAG);
15673 if (__pyx_t_1) {
15674
15675 /* "pysam/libcbcf.pyx":548
15676 * if z.len == 0:
15677 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, z.key) == BCF_HT_FLAG:
15678 * value = True # <<<<<<<<<<<<<<
15679 * elif scalar:
15680 * value = None
15681 */
15682 __Pyx_INCREF(Py_True);
15683 __pyx_v_value = Py_True;
15684
15685 /* "pysam/libcbcf.pyx":547
15686 *
15687 * if z.len == 0:
15688 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, z.key) == BCF_HT_FLAG: # <<<<<<<<<<<<<<
15689 * value = True
15690 * elif scalar:
15691 */
15692 goto __pyx_L4;
15693 }
15694
15695 /* "pysam/libcbcf.pyx":549
15696 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, z.key) == BCF_HT_FLAG:
15697 * value = True
15698 * elif scalar: # <<<<<<<<<<<<<<
15699 * value = None
15700 * else:
15701 */
15702 __pyx_t_1 = (__pyx_v_scalar != 0);
15703 if (__pyx_t_1) {
15704
15705 /* "pysam/libcbcf.pyx":550
15706 * value = True
15707 * elif scalar:
15708 * value = None # <<<<<<<<<<<<<<
15709 * else:
15710 * value = ()
15711 */
15712 __Pyx_INCREF(Py_None);
15713 __pyx_v_value = Py_None;
15714
15715 /* "pysam/libcbcf.pyx":549
15716 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, z.key) == BCF_HT_FLAG:
15717 * value = True
15718 * elif scalar: # <<<<<<<<<<<<<<
15719 * value = None
15720 * else:
15721 */
15722 goto __pyx_L4;
15723 }
15724
15725 /* "pysam/libcbcf.pyx":552
15726 * value = None
15727 * else:
15728 * value = () # <<<<<<<<<<<<<<
15729 * elif z.len == 1:
15730 * if z.type == BCF_BT_INT8:
15731 */
15732 /*else*/ {
15733 __Pyx_INCREF(__pyx_empty_tuple);
15734 __pyx_v_value = __pyx_empty_tuple;
15735 }
15736 __pyx_L4:;
15737
15738 /* "pysam/libcbcf.pyx":546
15739 * bcf_get_value_count(record, BCF_HL_INFO, z.key, &count, &scalar, -1)
15740 *
15741 * if z.len == 0: # <<<<<<<<<<<<<<
15742 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, z.key) == BCF_HT_FLAG:
15743 * value = True
15744 */
15745 break;
15746 case 1:
15747
15748 /* "pysam/libcbcf.pyx":554
15749 * value = ()
15750 * elif z.len == 1:
15751 * if z.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
15752 * value = z.v1.i if z.v1.i != bcf_int8_missing else None
15753 * elif z.type == BCF_BT_INT16:
15754 */
15755 __pyx_t_1 = (__pyx_v_z->type == BCF_BT_INT8);
15756 if (__pyx_t_1) {
15757
15758 /* "pysam/libcbcf.pyx":555
15759 * elif z.len == 1:
15760 * if z.type == BCF_BT_INT8:
15761 * value = z.v1.i if z.v1.i != bcf_int8_missing else None # <<<<<<<<<<<<<<
15762 * elif z.type == BCF_BT_INT16:
15763 * value = z.v1.i if z.v1.i != bcf_int16_missing else None
15764 */
15765 __pyx_t_1 = (__pyx_v_z->v1.i != bcf_int8_missing);
15766 if (__pyx_t_1) {
15767 __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_z->v1.i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error)
15768 __Pyx_GOTREF(__pyx_t_4);
15769 __pyx_t_2 = __pyx_t_4;
15770 __pyx_t_4 = 0;
15771 } else {
15772 __Pyx_INCREF(Py_None);
15773 __pyx_t_2 = Py_None;
15774 }
15775 __pyx_v_value = __pyx_t_2;
15776 __pyx_t_2 = 0;
15777
15778 /* "pysam/libcbcf.pyx":554
15779 * value = ()
15780 * elif z.len == 1:
15781 * if z.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
15782 * value = z.v1.i if z.v1.i != bcf_int8_missing else None
15783 * elif z.type == BCF_BT_INT16:
15784 */
15785 goto __pyx_L5;
15786 }
15787
15788 /* "pysam/libcbcf.pyx":556
15789 * if z.type == BCF_BT_INT8:
15790 * value = z.v1.i if z.v1.i != bcf_int8_missing else None
15791 * elif z.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
15792 * value = z.v1.i if z.v1.i != bcf_int16_missing else None
15793 * elif z.type == BCF_BT_INT32:
15794 */
15795 __pyx_t_1 = (__pyx_v_z->type == BCF_BT_INT16);
15796 if (__pyx_t_1) {
15797
15798 /* "pysam/libcbcf.pyx":557
15799 * value = z.v1.i if z.v1.i != bcf_int8_missing else None
15800 * elif z.type == BCF_BT_INT16:
15801 * value = z.v1.i if z.v1.i != bcf_int16_missing else None # <<<<<<<<<<<<<<
15802 * elif z.type == BCF_BT_INT32:
15803 * value = z.v1.i if z.v1.i != bcf_int32_missing else None
15804 */
15805 __pyx_t_1 = (__pyx_v_z->v1.i != bcf_int16_missing);
15806 if (__pyx_t_1) {
15807 __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_z->v1.i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 557, __pyx_L1_error)
15808 __Pyx_GOTREF(__pyx_t_4);
15809 __pyx_t_2 = __pyx_t_4;
15810 __pyx_t_4 = 0;
15811 } else {
15812 __Pyx_INCREF(Py_None);
15813 __pyx_t_2 = Py_None;
15814 }
15815 __pyx_v_value = __pyx_t_2;
15816 __pyx_t_2 = 0;
15817
15818 /* "pysam/libcbcf.pyx":556
15819 * if z.type == BCF_BT_INT8:
15820 * value = z.v1.i if z.v1.i != bcf_int8_missing else None
15821 * elif z.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
15822 * value = z.v1.i if z.v1.i != bcf_int16_missing else None
15823 * elif z.type == BCF_BT_INT32:
15824 */
15825 goto __pyx_L5;
15826 }
15827
15828 /* "pysam/libcbcf.pyx":558
15829 * elif z.type == BCF_BT_INT16:
15830 * value = z.v1.i if z.v1.i != bcf_int16_missing else None
15831 * elif z.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
15832 * value = z.v1.i if z.v1.i != bcf_int32_missing else None
15833 * elif z.type == BCF_BT_FLOAT:
15834 */
15835 __pyx_t_1 = (__pyx_v_z->type == BCF_BT_INT32);
15836 if (__pyx_t_1) {
15837
15838 /* "pysam/libcbcf.pyx":559
15839 * value = z.v1.i if z.v1.i != bcf_int16_missing else None
15840 * elif z.type == BCF_BT_INT32:
15841 * value = z.v1.i if z.v1.i != bcf_int32_missing else None # <<<<<<<<<<<<<<
15842 * elif z.type == BCF_BT_FLOAT:
15843 * value = z.v1.f if not bcf_float_is_missing(z.v1.f) else None
15844 */
15845 __pyx_t_1 = (__pyx_v_z->v1.i != bcf_int32_missing);
15846 if (__pyx_t_1) {
15847 __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_z->v1.i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
15848 __Pyx_GOTREF(__pyx_t_4);
15849 __pyx_t_2 = __pyx_t_4;
15850 __pyx_t_4 = 0;
15851 } else {
15852 __Pyx_INCREF(Py_None);
15853 __pyx_t_2 = Py_None;
15854 }
15855 __pyx_v_value = __pyx_t_2;
15856 __pyx_t_2 = 0;
15857
15858 /* "pysam/libcbcf.pyx":558
15859 * elif z.type == BCF_BT_INT16:
15860 * value = z.v1.i if z.v1.i != bcf_int16_missing else None
15861 * elif z.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
15862 * value = z.v1.i if z.v1.i != bcf_int32_missing else None
15863 * elif z.type == BCF_BT_FLOAT:
15864 */
15865 goto __pyx_L5;
15866 }
15867
15868 /* "pysam/libcbcf.pyx":560
15869 * elif z.type == BCF_BT_INT32:
15870 * value = z.v1.i if z.v1.i != bcf_int32_missing else None
15871 * elif z.type == BCF_BT_FLOAT: # <<<<<<<<<<<<<<
15872 * value = z.v1.f if not bcf_float_is_missing(z.v1.f) else None
15873 * elif z.type == BCF_BT_CHAR:
15874 */
15875 __pyx_t_1 = (__pyx_v_z->type == BCF_BT_FLOAT);
15876 if (__pyx_t_1) {
15877
15878 /* "pysam/libcbcf.pyx":561
15879 * value = z.v1.i if z.v1.i != bcf_int32_missing else None
15880 * elif z.type == BCF_BT_FLOAT:
15881 * value = z.v1.f if not bcf_float_is_missing(z.v1.f) else None # <<<<<<<<<<<<<<
15882 * elif z.type == BCF_BT_CHAR:
15883 * value = force_str(chr(z.v1.i))
15884 */
15885 __pyx_t_1 = (!(bcf_float_is_missing(__pyx_v_z->v1.f) != 0));
15886 if (__pyx_t_1) {
15887 __pyx_t_4 = PyFloat_FromDouble(__pyx_v_z->v1.f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
15888 __Pyx_GOTREF(__pyx_t_4);
15889 __pyx_t_2 = __pyx_t_4;
15890 __pyx_t_4 = 0;
15891 } else {
15892 __Pyx_INCREF(Py_None);
15893 __pyx_t_2 = Py_None;
15894 }
15895 __pyx_v_value = __pyx_t_2;
15896 __pyx_t_2 = 0;
15897
15898 /* "pysam/libcbcf.pyx":560
15899 * elif z.type == BCF_BT_INT32:
15900 * value = z.v1.i if z.v1.i != bcf_int32_missing else None
15901 * elif z.type == BCF_BT_FLOAT: # <<<<<<<<<<<<<<
15902 * value = z.v1.f if not bcf_float_is_missing(z.v1.f) else None
15903 * elif z.type == BCF_BT_CHAR:
15904 */
15905 goto __pyx_L5;
15906 }
15907
15908 /* "pysam/libcbcf.pyx":562
15909 * elif z.type == BCF_BT_FLOAT:
15910 * value = z.v1.f if not bcf_float_is_missing(z.v1.f) else None
15911 * elif z.type == BCF_BT_CHAR: # <<<<<<<<<<<<<<
15912 * value = force_str(chr(z.v1.i))
15913 * else:
15914 */
15915 __pyx_t_1 = (__pyx_v_z->type == BCF_BT_CHAR);
15916 if (likely(__pyx_t_1)) {
15917
15918 /* "pysam/libcbcf.pyx":563
15919 * value = z.v1.f if not bcf_float_is_missing(z.v1.f) else None
15920 * elif z.type == BCF_BT_CHAR:
15921 * value = force_str(chr(z.v1.i)) # <<<<<<<<<<<<<<
15922 * else:
15923 * raise TypeError('unsupported info type code')
15924 */
15925 __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_z->v1.i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
15926 __Pyx_GOTREF(__pyx_t_2);
15927 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
15928 __Pyx_GOTREF(__pyx_t_4);
15929 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15930 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
15931 __Pyx_GOTREF(__pyx_t_2);
15932 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15933 __pyx_v_value = __pyx_t_2;
15934 __pyx_t_2 = 0;
15935
15936 /* "pysam/libcbcf.pyx":562
15937 * elif z.type == BCF_BT_FLOAT:
15938 * value = z.v1.f if not bcf_float_is_missing(z.v1.f) else None
15939 * elif z.type == BCF_BT_CHAR: # <<<<<<<<<<<<<<
15940 * value = force_str(chr(z.v1.i))
15941 * else:
15942 */
15943 goto __pyx_L5;
15944 }
15945
15946 /* "pysam/libcbcf.pyx":565
15947 * value = force_str(chr(z.v1.i))
15948 * else:
15949 * raise TypeError('unsupported info type code') # <<<<<<<<<<<<<<
15950 *
15951 * if not scalar and value != ():
15952 */
15953 /*else*/ {
15954 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
15955 __Pyx_GOTREF(__pyx_t_2);
15956 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15957 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15958 __PYX_ERR(0, 565, __pyx_L1_error)
15959 }
15960 __pyx_L5:;
15961
15962 /* "pysam/libcbcf.pyx":567
15963 * raise TypeError('unsupported info type code')
15964 *
15965 * if not scalar and value != (): # <<<<<<<<<<<<<<
15966 * value = (value,)
15967 * else:
15968 */
15969 __pyx_t_5 = (!(__pyx_v_scalar != 0));
15970 if (__pyx_t_5) {
15971 } else {
15972 __pyx_t_1 = __pyx_t_5;
15973 goto __pyx_L7_bool_binop_done;
15974 }
15975 __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
15976 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 567, __pyx_L1_error)
15977 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15978 __pyx_t_1 = __pyx_t_5;
15979 __pyx_L7_bool_binop_done:;
15980 if (__pyx_t_1) {
15981
15982 /* "pysam/libcbcf.pyx":568
15983 *
15984 * if not scalar and value != ():
15985 * value = (value,) # <<<<<<<<<<<<<<
15986 * else:
15987 * value = bcf_array_to_object(z.vptr, z.type, z.len, count, scalar)
15988 */
15989 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
15990 __Pyx_GOTREF(__pyx_t_2);
15991 __Pyx_INCREF(__pyx_v_value);
15992 __Pyx_GIVEREF(__pyx_v_value);
15993 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value)) __PYX_ERR(0, 568, __pyx_L1_error);
15994 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
15995 __pyx_t_2 = 0;
15996
15997 /* "pysam/libcbcf.pyx":567
15998 * raise TypeError('unsupported info type code')
15999 *
16000 * if not scalar and value != (): # <<<<<<<<<<<<<<
16001 * value = (value,)
16002 * else:
16003 */
16004 }
16005
16006 /* "pysam/libcbcf.pyx":553
16007 * else:
16008 * value = ()
16009 * elif z.len == 1: # <<<<<<<<<<<<<<
16010 * if z.type == BCF_BT_INT8:
16011 * value = z.v1.i if z.v1.i != bcf_int8_missing else None
16012 */
16013 break;
16014 default:
16015
16016 /* "pysam/libcbcf.pyx":570
16017 * value = (value,)
16018 * else:
16019 * value = bcf_array_to_object(z.vptr, z.type, z.len, count, scalar) # <<<<<<<<<<<<<<
16020 *
16021 * return value
16022 */
16023 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_array_to_object(__pyx_v_z->vptr, __pyx_v_z->type, __pyx_v_z->len, __pyx_v_count, __pyx_v_scalar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
16024 __Pyx_GOTREF(__pyx_t_2);
16025 __pyx_v_value = __pyx_t_2;
16026 __pyx_t_2 = 0;
16027 break;
16028 }
16029
16030 /* "pysam/libcbcf.pyx":572
16031 * value = bcf_array_to_object(z.vptr, z.type, z.len, count, scalar)
16032 *
16033 * return value # <<<<<<<<<<<<<<
16034 *
16035 *
16036 */
16037 __Pyx_XDECREF(__pyx_r);
16038 __Pyx_INCREF(__pyx_v_value);
16039 __pyx_r = __pyx_v_value;
16040 goto __pyx_L0;
16041
16042 /* "pysam/libcbcf.pyx":534
16043 *
16044 *
16045 * cdef object bcf_info_get_value(VariantRecord record, const bcf_info_t *z): # <<<<<<<<<<<<<<
16046 * if record is None:
16047 * raise ValueError('record must not be None')
16048 */
16049
16050 /* function exit code */
16051 __pyx_L1_error:;
16052 __Pyx_XDECREF(__pyx_t_2);
16053 __Pyx_XDECREF(__pyx_t_4);
16054 __Pyx_AddTraceback("pysam.libcbcf.bcf_info_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
16055 __pyx_r = 0;
16056 __pyx_L0:;
16057 __Pyx_XDECREF(__pyx_v_value);
16058 __Pyx_XGIVEREF(__pyx_r);
16059 __Pyx_TraceReturn(__pyx_r, 0);
16060 __Pyx_RefNannyFinishContext();
16061 return __pyx_r;
16062 }
16063 static PyObject *__pyx_gb_5pysam_7libcbcf_16bcf_check_values_2generator31(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
16064
16065 /* "pysam/libcbcf.pyx":614
16066 * raise ValueError('Integer value too small/large to store in VCF/BCF')
16067 * elif ht_type == BCF_HT_STR:
16068 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values) # <<<<<<<<<<<<<<
16069 * elif ht_type == BCF_HT_FLAG:
16070 * if values[0] not in (True, False, None, 1, 0):
16071 */
16072
16073 static PyObject *__pyx_pf_5pysam_7libcbcf_16bcf_check_values_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
16074 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
16075 PyObject *__pyx_r = NULL;
16076 __Pyx_RefNannyDeclarations
16077 int __pyx_lineno = 0;
16078 const char *__pyx_filename = NULL;
16079 int __pyx_clineno = 0;
16080 __Pyx_RefNannySetupContext("genexpr", 0);
16081 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_4_genexpr(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
16082 if (unlikely(!__pyx_cur_scope)) {
16083 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *)Py_None);
16084 __Pyx_INCREF(Py_None);
16085 __PYX_ERR(0, 614, __pyx_L1_error)
16086 } else {
16087 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
16088 }
16089 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
16090 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
16091 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
16092 {
16093 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_16bcf_check_values_2generator31, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_bcf_check_values_locals_genexpr, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 614, __pyx_L1_error)
16094 __Pyx_DECREF(__pyx_cur_scope);
16095 __Pyx_RefNannyFinishContext();
16096 return (PyObject *) gen;
16097 }
16098
16099 /* function exit code */
16100 __pyx_L1_error:;
16101 __Pyx_AddTraceback("pysam.libcbcf.bcf_check_values.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
16102 __pyx_r = NULL;
16103 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
16104 __Pyx_XGIVEREF(__pyx_r);
16105 __Pyx_RefNannyFinishContext();
16106 return __pyx_r;
16107 }
16108
16109 static PyObject *__pyx_gb_5pysam_7libcbcf_16bcf_check_values_2generator31(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
16110 {
16111 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
16112 PyObject *__pyx_r = NULL;
16113 __Pyx_TraceDeclarations
16114 PyObject *__pyx_t_1 = NULL;
16115 Py_ssize_t __pyx_t_2;
16116 PyObject *(*__pyx_t_3)(PyObject *);
16117 PyObject *__pyx_t_4 = NULL;
16118 int __pyx_t_5;
16119 PyObject *__pyx_t_6 = NULL;
16120 int __pyx_lineno = 0;
16121 const char *__pyx_filename = NULL;
16122 int __pyx_clineno = 0;
16123 __Pyx_RefNannyDeclarations
16124 __Pyx_RefNannySetupContext("genexpr", 0);
16125 __Pyx_TraceCall("genexpr", __pyx_f[0], 614, 0, __PYX_ERR(0, 614, __pyx_L1_error));
16126 switch (__pyx_generator->resume_label) {
16127 case 0: goto __pyx_L3_first_run;
16128 case 1: goto __pyx_L6_resume_from_yield;
16129 default: /* CPython raises the right error here */
16130 __Pyx_TraceReturn(Py_None, 0);
16131 __Pyx_RefNannyFinishContext();
16132 return NULL;
16133 }
16134 __pyx_L3_first_run:;
16135 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 614, __pyx_L1_error)
16136 if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 614, __pyx_L1_error) }
16137 if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
16138 __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
16139 __pyx_t_2 = 0;
16140 __pyx_t_3 = NULL;
16141 } else {
16142 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error)
16143 __Pyx_GOTREF(__pyx_t_1);
16144 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
16145 }
16146 for (;;) {
16147 if (likely(!__pyx_t_3)) {
16148 if (likely(PyList_CheckExact(__pyx_t_1))) {
16149 {
16150 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
16151 #if !CYTHON_ASSUME_SAFE_MACROS
16152 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 614, __pyx_L1_error)
16153 #endif
16154 if (__pyx_t_2 >= __pyx_temp) break;
16155 }
16156 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16157 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 614, __pyx_L1_error)
16158 #else
16159 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
16160 __Pyx_GOTREF(__pyx_t_4);
16161 #endif
16162 } else {
16163 {
16164 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
16165 #if !CYTHON_ASSUME_SAFE_MACROS
16166 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 614, __pyx_L1_error)
16167 #endif
16168 if (__pyx_t_2 >= __pyx_temp) break;
16169 }
16170 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16171 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 614, __pyx_L1_error)
16172 #else
16173 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
16174 __Pyx_GOTREF(__pyx_t_4);
16175 #endif
16176 }
16177 } else {
16178 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
16179 if (unlikely(!__pyx_t_4)) {
16180 PyObject* exc_type = PyErr_Occurred();
16181 if (exc_type) {
16182 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
16183 else __PYX_ERR(0, 614, __pyx_L1_error)
16184 }
16185 break;
16186 }
16187 __Pyx_GOTREF(__pyx_t_4);
16188 }
16189 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
16190 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4);
16191 __Pyx_GIVEREF(__pyx_t_4);
16192 __pyx_t_4 = 0;
16193 __pyx_t_5 = (__pyx_cur_scope->__pyx_v_v != Py_None);
16194 if (__pyx_t_5) {
16195 __pyx_t_6 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_cur_scope->__pyx_v_v, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L1_error)
16196 __Pyx_GOTREF(__pyx_t_6);
16197 __pyx_t_4 = __pyx_t_6;
16198 __pyx_t_6 = 0;
16199 } else {
16200 __Pyx_INCREF(__pyx_kp_b__12);
16201 __pyx_t_4 = __pyx_kp_b__12;
16202 }
16203 __pyx_r = __pyx_t_4;
16204 __pyx_t_4 = 0;
16205 __Pyx_XGIVEREF(__pyx_t_1);
16206 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
16207 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
16208 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
16209 __Pyx_XGIVEREF(__pyx_r);
16210 __Pyx_TraceReturn(__pyx_r, 0);
16211 __Pyx_RefNannyFinishContext();
16212 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
16213 /* return from generator, yielding value */
16214 __pyx_generator->resume_label = 1;
16215 return __pyx_r;
16216 __pyx_L6_resume_from_yield:;
16217 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
16218 __pyx_cur_scope->__pyx_t_0 = 0;
16219 __Pyx_XGOTREF(__pyx_t_1);
16220 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
16221 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
16222 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 614, __pyx_L1_error)
16223 }
16224 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16225 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
16226
16227 /* function exit code */
16228 PyErr_SetNone(PyExc_StopIteration);
16229 goto __pyx_L0;
16230 __pyx_L1_error:;
16231 __Pyx_Generator_Replace_StopIteration(0);
16232 __Pyx_XDECREF(__pyx_t_1);
16233 __Pyx_XDECREF(__pyx_t_4);
16234 __Pyx_XDECREF(__pyx_t_6);
16235 __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
16236 __pyx_L0:;
16237 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
16238 #if !CYTHON_USE_EXC_INFO_STACK
16239 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
16240 #endif
16241 __pyx_generator->resume_label = -1;
16242 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
16243 __Pyx_TraceReturn(__pyx_r, 0);
16244 __Pyx_RefNannyFinishContext();
16245 return __pyx_r;
16246 }
16247
16248 /* "pysam/libcbcf.pyx":575
16249 *
16250 *
16251 * cdef object bcf_check_values(VariantRecord record, value, int sample, # <<<<<<<<<<<<<<
16252 * int hl_type, int ht_type,
16253 * int id, int bt_type, ssize_t bt_len,
16254 */
16255
16256 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_check_values(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, PyObject *__pyx_v_value, int __pyx_v_sample, int __pyx_v_hl_type, int __pyx_v_ht_type, int __pyx_v_id, int __pyx_v_bt_type, Py_ssize_t __pyx_v_bt_len, Py_ssize_t *__pyx_v_value_count, int *__pyx_v_scalar, int *__pyx_v_realloc) {
16257 PyObject *__pyx_v_values = NULL;
16258 int __pyx_v_given;
16259 PyObject *__pyx_v_v = NULL;
16260 PyObject *__pyx_gb_5pysam_7libcbcf_16bcf_check_values_2generator31 = 0;
16261 PyObject *__pyx_r = NULL;
16262 __Pyx_TraceDeclarations
16263 __Pyx_RefNannyDeclarations
16264 int __pyx_t_1;
16265 PyObject *__pyx_t_2 = NULL;
16266 int __pyx_t_3;
16267 PyObject *__pyx_t_4 = NULL;
16268 int __pyx_t_5;
16269 Py_ssize_t __pyx_t_6;
16270 PyObject *__pyx_t_7 = NULL;
16271 PyObject *__pyx_t_8 = NULL;
16272 unsigned int __pyx_t_9;
16273 PyObject *__pyx_t_10 = NULL;
16274 PyObject *(*__pyx_t_11)(PyObject *);
16275 int __pyx_t_12;
16276 int __pyx_lineno = 0;
16277 const char *__pyx_filename = NULL;
16278 int __pyx_clineno = 0;
16279 __Pyx_RefNannySetupContext("bcf_check_values", 1);
16280 __Pyx_TraceCall("bcf_check_values", __pyx_f[0], 575, 0, __PYX_ERR(0, 575, __pyx_L1_error));
16281
16282 /* "pysam/libcbcf.pyx":580
16283 * ssize_t *value_count, int *scalar, int *realloc):
16284 *
16285 * if record is None: # <<<<<<<<<<<<<<
16286 * raise ValueError('record must not be None')
16287 *
16288 */
16289 __pyx_t_1 = (((PyObject *)__pyx_v_record) == Py_None);
16290 if (unlikely(__pyx_t_1)) {
16291
16292 /* "pysam/libcbcf.pyx":581
16293 *
16294 * if record is None:
16295 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
16296 *
16297 * bcf_get_value_count(record, hl_type, id, value_count, scalar, sample)
16298 */
16299 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
16300 __Pyx_GOTREF(__pyx_t_2);
16301 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
16302 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16303 __PYX_ERR(0, 581, __pyx_L1_error)
16304
16305 /* "pysam/libcbcf.pyx":580
16306 * ssize_t *value_count, int *scalar, int *realloc):
16307 *
16308 * if record is None: # <<<<<<<<<<<<<<
16309 * raise ValueError('record must not be None')
16310 *
16311 */
16312 }
16313
16314 /* "pysam/libcbcf.pyx":583
16315 * raise ValueError('record must not be None')
16316 *
16317 * bcf_get_value_count(record, hl_type, id, value_count, scalar, sample) # <<<<<<<<<<<<<<
16318 *
16319 * # Validate values now that we know the type and size
16320 */
16321 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_get_value_count(__pyx_v_record, __pyx_v_hl_type, __pyx_v_id, __pyx_v_value_count, __pyx_v_scalar, __pyx_v_sample); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
16322 __Pyx_GOTREF(__pyx_t_2);
16323 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16324
16325 /* "pysam/libcbcf.pyx":586
16326 *
16327 * # Validate values now that we know the type and size
16328 * values = (value,) if not isinstance(value, (list, tuple)) else value # <<<<<<<<<<<<<<
16329 *
16330 * # Validate values now that we know the type and size
16331 */
16332 __pyx_t_3 = PyList_Check(__pyx_v_value);
16333 if (!__pyx_t_3) {
16334 } else {
16335 __pyx_t_1 = __pyx_t_3;
16336 goto __pyx_L4_bool_binop_done;
16337 }
16338 __pyx_t_3 = PyTuple_Check(__pyx_v_value);
16339 __pyx_t_1 = __pyx_t_3;
16340 __pyx_L4_bool_binop_done:;
16341 __pyx_t_3 = (!__pyx_t_1);
16342 if (__pyx_t_3) {
16343 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
16344 __Pyx_GOTREF(__pyx_t_4);
16345 __Pyx_INCREF(__pyx_v_value);
16346 __Pyx_GIVEREF(__pyx_v_value);
16347 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value)) __PYX_ERR(0, 586, __pyx_L1_error);
16348 __pyx_t_2 = __pyx_t_4;
16349 __pyx_t_4 = 0;
16350 } else {
16351 __Pyx_INCREF(__pyx_v_value);
16352 __pyx_t_2 = __pyx_v_value;
16353 }
16354 __pyx_v_values = __pyx_t_2;
16355 __pyx_t_2 = 0;
16356
16357 /* "pysam/libcbcf.pyx":589
16358 *
16359 * # Validate values now that we know the type and size
16360 * if ht_type == BCF_HT_FLAG: # <<<<<<<<<<<<<<
16361 * value_count[0] = 1
16362 * elif hl_type == BCF_HL_FMT and is_gt_fmt(record.header.ptr, id):
16363 */
16364 __pyx_t_3 = (__pyx_v_ht_type == BCF_HT_FLAG);
16365 if (__pyx_t_3) {
16366
16367 /* "pysam/libcbcf.pyx":590
16368 * # Validate values now that we know the type and size
16369 * if ht_type == BCF_HT_FLAG:
16370 * value_count[0] = 1 # <<<<<<<<<<<<<<
16371 * elif hl_type == BCF_HL_FMT and is_gt_fmt(record.header.ptr, id):
16372 * # KBJ: htslib lies about the cardinality of GT fields-- they're really VLEN (-1)
16373 */
16374 (__pyx_v_value_count[0]) = 1;
16375
16376 /* "pysam/libcbcf.pyx":589
16377 *
16378 * # Validate values now that we know the type and size
16379 * if ht_type == BCF_HT_FLAG: # <<<<<<<<<<<<<<
16380 * value_count[0] = 1
16381 * elif hl_type == BCF_HL_FMT and is_gt_fmt(record.header.ptr, id):
16382 */
16383 goto __pyx_L6;
16384 }
16385
16386 /* "pysam/libcbcf.pyx":591
16387 * if ht_type == BCF_HT_FLAG:
16388 * value_count[0] = 1
16389 * elif hl_type == BCF_HL_FMT and is_gt_fmt(record.header.ptr, id): # <<<<<<<<<<<<<<
16390 * # KBJ: htslib lies about the cardinality of GT fields-- they're really VLEN (-1)
16391 * value_count[0] = -1
16392 */
16393 __pyx_t_1 = (__pyx_v_hl_type == BCF_HL_FMT);
16394 if (__pyx_t_1) {
16395 } else {
16396 __pyx_t_3 = __pyx_t_1;
16397 goto __pyx_L7_bool_binop_done;
16398 }
16399 __pyx_t_5 = __pyx_f_5pysam_7libcbcf_is_gt_fmt(__pyx_v_record->header->ptr, __pyx_v_id); if (unlikely(__pyx_t_5 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 591, __pyx_L1_error)
16400 __pyx_t_1 = (__pyx_t_5 != 0);
16401 __pyx_t_3 = __pyx_t_1;
16402 __pyx_L7_bool_binop_done:;
16403 if (__pyx_t_3) {
16404
16405 /* "pysam/libcbcf.pyx":593
16406 * elif hl_type == BCF_HL_FMT and is_gt_fmt(record.header.ptr, id):
16407 * # KBJ: htslib lies about the cardinality of GT fields-- they're really VLEN (-1)
16408 * value_count[0] = -1 # <<<<<<<<<<<<<<
16409 *
16410 * cdef int given = len(values)
16411 */
16412 (__pyx_v_value_count[0]) = -1L;
16413
16414 /* "pysam/libcbcf.pyx":591
16415 * if ht_type == BCF_HT_FLAG:
16416 * value_count[0] = 1
16417 * elif hl_type == BCF_HL_FMT and is_gt_fmt(record.header.ptr, id): # <<<<<<<<<<<<<<
16418 * # KBJ: htslib lies about the cardinality of GT fields-- they're really VLEN (-1)
16419 * value_count[0] = -1
16420 */
16421 }
16422 __pyx_L6:;
16423
16424 /* "pysam/libcbcf.pyx":595
16425 * value_count[0] = -1
16426 *
16427 * cdef int given = len(values) # <<<<<<<<<<<<<<
16428 * if value_count[0] != -1 and value_count[0] != given:
16429 * if scalar[0]:
16430 */
16431 __pyx_t_6 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 595, __pyx_L1_error)
16432 __pyx_v_given = __pyx_t_6;
16433
16434 /* "pysam/libcbcf.pyx":596
16435 *
16436 * cdef int given = len(values)
16437 * if value_count[0] != -1 and value_count[0] != given: # <<<<<<<<<<<<<<
16438 * if scalar[0]:
16439 * raise TypeError('value expected to be scalar, given len={}'.format(given))
16440 */
16441 __pyx_t_1 = ((__pyx_v_value_count[0]) != -1L);
16442 if (__pyx_t_1) {
16443 } else {
16444 __pyx_t_3 = __pyx_t_1;
16445 goto __pyx_L10_bool_binop_done;
16446 }
16447 __pyx_t_1 = ((__pyx_v_value_count[0]) != __pyx_v_given);
16448 __pyx_t_3 = __pyx_t_1;
16449 __pyx_L10_bool_binop_done:;
16450 if (__pyx_t_3) {
16451
16452 /* "pysam/libcbcf.pyx":597
16453 * cdef int given = len(values)
16454 * if value_count[0] != -1 and value_count[0] != given:
16455 * if scalar[0]: # <<<<<<<<<<<<<<
16456 * raise TypeError('value expected to be scalar, given len={}'.format(given))
16457 * else:
16458 */
16459 __pyx_t_3 = ((__pyx_v_scalar[0]) != 0);
16460 if (unlikely(__pyx_t_3)) {
16461
16462 /* "pysam/libcbcf.pyx":598
16463 * if value_count[0] != -1 and value_count[0] != given:
16464 * if scalar[0]:
16465 * raise TypeError('value expected to be scalar, given len={}'.format(given)) # <<<<<<<<<<<<<<
16466 * else:
16467 * raise TypeError('values expected to be {}-tuple, given len={}'.format(value_count[0], given))
16468 */
16469 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_value_expected_to_be_scalar_give, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error)
16470 __Pyx_GOTREF(__pyx_t_4);
16471 __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_given); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 598, __pyx_L1_error)
16472 __Pyx_GOTREF(__pyx_t_7);
16473 __pyx_t_8 = NULL;
16474 __pyx_t_9 = 0;
16475 #if CYTHON_UNPACK_METHODS
16476 if (likely(PyMethod_Check(__pyx_t_4))) {
16477 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
16478 if (likely(__pyx_t_8)) {
16479 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
16480 __Pyx_INCREF(__pyx_t_8);
16481 __Pyx_INCREF(function);
16482 __Pyx_DECREF_SET(__pyx_t_4, function);
16483 __pyx_t_9 = 1;
16484 }
16485 }
16486 #endif
16487 {
16488 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
16489 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
16490 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
16491 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16492 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
16493 __Pyx_GOTREF(__pyx_t_2);
16494 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16495 }
16496 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error)
16497 __Pyx_GOTREF(__pyx_t_4);
16498 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16499 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
16500 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16501 __PYX_ERR(0, 598, __pyx_L1_error)
16502
16503 /* "pysam/libcbcf.pyx":597
16504 * cdef int given = len(values)
16505 * if value_count[0] != -1 and value_count[0] != given:
16506 * if scalar[0]: # <<<<<<<<<<<<<<
16507 * raise TypeError('value expected to be scalar, given len={}'.format(given))
16508 * else:
16509 */
16510 }
16511
16512 /* "pysam/libcbcf.pyx":600
16513 * raise TypeError('value expected to be scalar, given len={}'.format(given))
16514 * else:
16515 * raise TypeError('values expected to be {}-tuple, given len={}'.format(value_count[0], given)) # <<<<<<<<<<<<<<
16516 *
16517 * if ht_type == BCF_HT_REAL:
16518 */
16519 /*else*/ {
16520 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_values_expected_to_be_tuple_give, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error)
16521 __Pyx_GOTREF(__pyx_t_2);
16522 __pyx_t_7 = PyInt_FromSsize_t((__pyx_v_value_count[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error)
16523 __Pyx_GOTREF(__pyx_t_7);
16524 __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_given); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L1_error)
16525 __Pyx_GOTREF(__pyx_t_8);
16526 __pyx_t_10 = NULL;
16527 __pyx_t_9 = 0;
16528 #if CYTHON_UNPACK_METHODS
16529 if (likely(PyMethod_Check(__pyx_t_2))) {
16530 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
16531 if (likely(__pyx_t_10)) {
16532 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
16533 __Pyx_INCREF(__pyx_t_10);
16534 __Pyx_INCREF(function);
16535 __Pyx_DECREF_SET(__pyx_t_2, function);
16536 __pyx_t_9 = 1;
16537 }
16538 }
16539 #endif
16540 {
16541 PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_7, __pyx_t_8};
16542 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9);
16543 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16544 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16545 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16546 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
16547 __Pyx_GOTREF(__pyx_t_4);
16548 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16549 }
16550 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error)
16551 __Pyx_GOTREF(__pyx_t_2);
16552 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16553 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
16554 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16555 __PYX_ERR(0, 600, __pyx_L1_error)
16556 }
16557
16558 /* "pysam/libcbcf.pyx":596
16559 *
16560 * cdef int given = len(values)
16561 * if value_count[0] != -1 and value_count[0] != given: # <<<<<<<<<<<<<<
16562 * if scalar[0]:
16563 * raise TypeError('value expected to be scalar, given len={}'.format(given))
16564 */
16565 }
16566
16567 /* "pysam/libcbcf.pyx":602
16568 * raise TypeError('values expected to be {}-tuple, given len={}'.format(value_count[0], given))
16569 *
16570 * if ht_type == BCF_HT_REAL: # <<<<<<<<<<<<<<
16571 * for v in values:
16572 * if not(v is None or isinstance(v, (float, int))):
16573 */
16574 __pyx_t_3 = (__pyx_v_ht_type == BCF_HT_REAL);
16575 if (__pyx_t_3) {
16576
16577 /* "pysam/libcbcf.pyx":603
16578 *
16579 * if ht_type == BCF_HT_REAL:
16580 * for v in values: # <<<<<<<<<<<<<<
16581 * if not(v is None or isinstance(v, (float, int))):
16582 * raise TypeError('invalid value for Float format')
16583 */
16584 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
16585 __pyx_t_2 = __pyx_v_values; __Pyx_INCREF(__pyx_t_2);
16586 __pyx_t_6 = 0;
16587 __pyx_t_11 = NULL;
16588 } else {
16589 __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
16590 __Pyx_GOTREF(__pyx_t_2);
16591 __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 603, __pyx_L1_error)
16592 }
16593 for (;;) {
16594 if (likely(!__pyx_t_11)) {
16595 if (likely(PyList_CheckExact(__pyx_t_2))) {
16596 {
16597 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
16598 #if !CYTHON_ASSUME_SAFE_MACROS
16599 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 603, __pyx_L1_error)
16600 #endif
16601 if (__pyx_t_6 >= __pyx_temp) break;
16602 }
16603 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16604 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 603, __pyx_L1_error)
16605 #else
16606 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error)
16607 __Pyx_GOTREF(__pyx_t_4);
16608 #endif
16609 } else {
16610 {
16611 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
16612 #if !CYTHON_ASSUME_SAFE_MACROS
16613 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 603, __pyx_L1_error)
16614 #endif
16615 if (__pyx_t_6 >= __pyx_temp) break;
16616 }
16617 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16618 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 603, __pyx_L1_error)
16619 #else
16620 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error)
16621 __Pyx_GOTREF(__pyx_t_4);
16622 #endif
16623 }
16624 } else {
16625 __pyx_t_4 = __pyx_t_11(__pyx_t_2);
16626 if (unlikely(!__pyx_t_4)) {
16627 PyObject* exc_type = PyErr_Occurred();
16628 if (exc_type) {
16629 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
16630 else __PYX_ERR(0, 603, __pyx_L1_error)
16631 }
16632 break;
16633 }
16634 __Pyx_GOTREF(__pyx_t_4);
16635 }
16636 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
16637 __pyx_t_4 = 0;
16638
16639 /* "pysam/libcbcf.pyx":604
16640 * if ht_type == BCF_HT_REAL:
16641 * for v in values:
16642 * if not(v is None or isinstance(v, (float, int))): # <<<<<<<<<<<<<<
16643 * raise TypeError('invalid value for Float format')
16644 * elif ht_type == BCF_HT_INT:
16645 */
16646 __pyx_t_1 = (__pyx_v_v == Py_None);
16647 if (!__pyx_t_1) {
16648 } else {
16649 __pyx_t_3 = __pyx_t_1;
16650 goto __pyx_L17_bool_binop_done;
16651 }
16652 __pyx_t_12 = PyFloat_Check(__pyx_v_v);
16653 if (!__pyx_t_12) {
16654 } else {
16655 __pyx_t_1 = __pyx_t_12;
16656 goto __pyx_L19_bool_binop_done;
16657 }
16658 __pyx_t_12 = PyInt_Check(__pyx_v_v);
16659 __pyx_t_1 = __pyx_t_12;
16660 __pyx_L19_bool_binop_done:;
16661 __pyx_t_3 = __pyx_t_1;
16662 __pyx_L17_bool_binop_done:;
16663 __pyx_t_1 = (!__pyx_t_3);
16664 if (unlikely(__pyx_t_1)) {
16665
16666 /* "pysam/libcbcf.pyx":605
16667 * for v in values:
16668 * if not(v is None or isinstance(v, (float, int))):
16669 * raise TypeError('invalid value for Float format') # <<<<<<<<<<<<<<
16670 * elif ht_type == BCF_HT_INT:
16671 * for v in values:
16672 */
16673 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 605, __pyx_L1_error)
16674 __Pyx_GOTREF(__pyx_t_4);
16675 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
16676 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16677 __PYX_ERR(0, 605, __pyx_L1_error)
16678
16679 /* "pysam/libcbcf.pyx":604
16680 * if ht_type == BCF_HT_REAL:
16681 * for v in values:
16682 * if not(v is None or isinstance(v, (float, int))): # <<<<<<<<<<<<<<
16683 * raise TypeError('invalid value for Float format')
16684 * elif ht_type == BCF_HT_INT:
16685 */
16686 }
16687
16688 /* "pysam/libcbcf.pyx":603
16689 *
16690 * if ht_type == BCF_HT_REAL:
16691 * for v in values: # <<<<<<<<<<<<<<
16692 * if not(v is None or isinstance(v, (float, int))):
16693 * raise TypeError('invalid value for Float format')
16694 */
16695 }
16696 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16697
16698 /* "pysam/libcbcf.pyx":602
16699 * raise TypeError('values expected to be {}-tuple, given len={}'.format(value_count[0], given))
16700 *
16701 * if ht_type == BCF_HT_REAL: # <<<<<<<<<<<<<<
16702 * for v in values:
16703 * if not(v is None or isinstance(v, (float, int))):
16704 */
16705 goto __pyx_L13;
16706 }
16707
16708 /* "pysam/libcbcf.pyx":606
16709 * if not(v is None or isinstance(v, (float, int))):
16710 * raise TypeError('invalid value for Float format')
16711 * elif ht_type == BCF_HT_INT: # <<<<<<<<<<<<<<
16712 * for v in values:
16713 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)):
16714 */
16715 __pyx_t_1 = (__pyx_v_ht_type == BCF_HT_INT);
16716 if (__pyx_t_1) {
16717
16718 /* "pysam/libcbcf.pyx":607
16719 * raise TypeError('invalid value for Float format')
16720 * elif ht_type == BCF_HT_INT:
16721 * for v in values: # <<<<<<<<<<<<<<
16722 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)):
16723 * raise TypeError('invalid value for Integer format')
16724 */
16725 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
16726 __pyx_t_2 = __pyx_v_values; __Pyx_INCREF(__pyx_t_2);
16727 __pyx_t_6 = 0;
16728 __pyx_t_11 = NULL;
16729 } else {
16730 __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
16731 __Pyx_GOTREF(__pyx_t_2);
16732 __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 607, __pyx_L1_error)
16733 }
16734 for (;;) {
16735 if (likely(!__pyx_t_11)) {
16736 if (likely(PyList_CheckExact(__pyx_t_2))) {
16737 {
16738 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
16739 #if !CYTHON_ASSUME_SAFE_MACROS
16740 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 607, __pyx_L1_error)
16741 #endif
16742 if (__pyx_t_6 >= __pyx_temp) break;
16743 }
16744 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16745 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 607, __pyx_L1_error)
16746 #else
16747 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 607, __pyx_L1_error)
16748 __Pyx_GOTREF(__pyx_t_4);
16749 #endif
16750 } else {
16751 {
16752 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
16753 #if !CYTHON_ASSUME_SAFE_MACROS
16754 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 607, __pyx_L1_error)
16755 #endif
16756 if (__pyx_t_6 >= __pyx_temp) break;
16757 }
16758 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16759 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 607, __pyx_L1_error)
16760 #else
16761 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 607, __pyx_L1_error)
16762 __Pyx_GOTREF(__pyx_t_4);
16763 #endif
16764 }
16765 } else {
16766 __pyx_t_4 = __pyx_t_11(__pyx_t_2);
16767 if (unlikely(!__pyx_t_4)) {
16768 PyObject* exc_type = PyErr_Occurred();
16769 if (exc_type) {
16770 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
16771 else __PYX_ERR(0, 607, __pyx_L1_error)
16772 }
16773 break;
16774 }
16775 __Pyx_GOTREF(__pyx_t_4);
16776 }
16777 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
16778 __pyx_t_4 = 0;
16779
16780 /* "pysam/libcbcf.pyx":608
16781 * elif ht_type == BCF_HT_INT:
16782 * for v in values:
16783 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)): # <<<<<<<<<<<<<<
16784 * raise TypeError('invalid value for Integer format')
16785 * for v in values:
16786 */
16787 __pyx_t_3 = (__pyx_v_v == Py_None);
16788 if (!__pyx_t_3) {
16789 } else {
16790 __pyx_t_1 = __pyx_t_3;
16791 goto __pyx_L25_bool_binop_done;
16792 }
16793 __pyx_t_12 = PyFloat_Check(__pyx_v_v);
16794 if (!__pyx_t_12) {
16795 } else {
16796 __pyx_t_3 = __pyx_t_12;
16797 goto __pyx_L28_bool_binop_done;
16798 }
16799 __pyx_t_12 = PyInt_Check(__pyx_v_v);
16800 __pyx_t_3 = __pyx_t_12;
16801 __pyx_L28_bool_binop_done:;
16802 if (__pyx_t_3) {
16803 } else {
16804 __pyx_t_1 = __pyx_t_3;
16805 goto __pyx_L25_bool_binop_done;
16806 }
16807 __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
16808 __Pyx_GOTREF(__pyx_t_4);
16809 __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 608, __pyx_L1_error)
16810 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16811 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 608, __pyx_L1_error)
16812 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16813 __pyx_t_1 = __pyx_t_3;
16814 __pyx_L25_bool_binop_done:;
16815 __pyx_t_3 = (!__pyx_t_1);
16816 if (unlikely(__pyx_t_3)) {
16817
16818 /* "pysam/libcbcf.pyx":609
16819 * for v in values:
16820 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)):
16821 * raise TypeError('invalid value for Integer format') # <<<<<<<<<<<<<<
16822 * for v in values:
16823 * if not(v is None or bcf_int32_missing < v <= INT32_MAX):
16824 */
16825 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 609, __pyx_L1_error)
16826 __Pyx_GOTREF(__pyx_t_8);
16827 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
16828 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16829 __PYX_ERR(0, 609, __pyx_L1_error)
16830
16831 /* "pysam/libcbcf.pyx":608
16832 * elif ht_type == BCF_HT_INT:
16833 * for v in values:
16834 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)): # <<<<<<<<<<<<<<
16835 * raise TypeError('invalid value for Integer format')
16836 * for v in values:
16837 */
16838 }
16839
16840 /* "pysam/libcbcf.pyx":607
16841 * raise TypeError('invalid value for Float format')
16842 * elif ht_type == BCF_HT_INT:
16843 * for v in values: # <<<<<<<<<<<<<<
16844 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)):
16845 * raise TypeError('invalid value for Integer format')
16846 */
16847 }
16848 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16849
16850 /* "pysam/libcbcf.pyx":610
16851 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)):
16852 * raise TypeError('invalid value for Integer format')
16853 * for v in values: # <<<<<<<<<<<<<<
16854 * if not(v is None or bcf_int32_missing < v <= INT32_MAX):
16855 * raise ValueError('Integer value too small/large to store in VCF/BCF')
16856 */
16857 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
16858 __pyx_t_2 = __pyx_v_values; __Pyx_INCREF(__pyx_t_2);
16859 __pyx_t_6 = 0;
16860 __pyx_t_11 = NULL;
16861 } else {
16862 __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
16863 __Pyx_GOTREF(__pyx_t_2);
16864 __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 610, __pyx_L1_error)
16865 }
16866 for (;;) {
16867 if (likely(!__pyx_t_11)) {
16868 if (likely(PyList_CheckExact(__pyx_t_2))) {
16869 {
16870 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
16871 #if !CYTHON_ASSUME_SAFE_MACROS
16872 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 610, __pyx_L1_error)
16873 #endif
16874 if (__pyx_t_6 >= __pyx_temp) break;
16875 }
16876 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16877 __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 610, __pyx_L1_error)
16878 #else
16879 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 610, __pyx_L1_error)
16880 __Pyx_GOTREF(__pyx_t_8);
16881 #endif
16882 } else {
16883 {
16884 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
16885 #if !CYTHON_ASSUME_SAFE_MACROS
16886 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 610, __pyx_L1_error)
16887 #endif
16888 if (__pyx_t_6 >= __pyx_temp) break;
16889 }
16890 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16891 __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 610, __pyx_L1_error)
16892 #else
16893 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 610, __pyx_L1_error)
16894 __Pyx_GOTREF(__pyx_t_8);
16895 #endif
16896 }
16897 } else {
16898 __pyx_t_8 = __pyx_t_11(__pyx_t_2);
16899 if (unlikely(!__pyx_t_8)) {
16900 PyObject* exc_type = PyErr_Occurred();
16901 if (exc_type) {
16902 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
16903 else __PYX_ERR(0, 610, __pyx_L1_error)
16904 }
16905 break;
16906 }
16907 __Pyx_GOTREF(__pyx_t_8);
16908 }
16909 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8);
16910 __pyx_t_8 = 0;
16911
16912 /* "pysam/libcbcf.pyx":611
16913 * raise TypeError('invalid value for Integer format')
16914 * for v in values:
16915 * if not(v is None or bcf_int32_missing < v <= INT32_MAX): # <<<<<<<<<<<<<<
16916 * raise ValueError('Integer value too small/large to store in VCF/BCF')
16917 * elif ht_type == BCF_HT_STR:
16918 */
16919 __pyx_t_1 = (__pyx_v_v == Py_None);
16920 if (!__pyx_t_1) {
16921 } else {
16922 __pyx_t_3 = __pyx_t_1;
16923 goto __pyx_L34_bool_binop_done;
16924 }
16925 __pyx_t_8 = __Pyx_PyInt_From_int32_t(bcf_int32_missing); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 611, __pyx_L1_error)
16926 __Pyx_GOTREF(__pyx_t_8);
16927 __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_v_v, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error)
16928 if (__Pyx_PyObject_IsTrue(__pyx_t_4)) {
16929 __Pyx_DECREF(__pyx_t_4);
16930 __pyx_t_7 = __Pyx_PyInt_From_int32_t(INT32_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
16931 __Pyx_GOTREF(__pyx_t_7);
16932 __pyx_t_4 = PyObject_RichCompare(__pyx_v_v, __pyx_t_7, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error)
16933 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16934 }
16935 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16936 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 611, __pyx_L1_error)
16937 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16938 __pyx_t_3 = __pyx_t_1;
16939 __pyx_L34_bool_binop_done:;
16940 __pyx_t_1 = (!__pyx_t_3);
16941 if (unlikely(__pyx_t_1)) {
16942
16943 /* "pysam/libcbcf.pyx":612
16944 * for v in values:
16945 * if not(v is None or bcf_int32_missing < v <= INT32_MAX):
16946 * raise ValueError('Integer value too small/large to store in VCF/BCF') # <<<<<<<<<<<<<<
16947 * elif ht_type == BCF_HT_STR:
16948 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values)
16949 */
16950 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
16951 __Pyx_GOTREF(__pyx_t_4);
16952 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
16953 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16954 __PYX_ERR(0, 612, __pyx_L1_error)
16955
16956 /* "pysam/libcbcf.pyx":611
16957 * raise TypeError('invalid value for Integer format')
16958 * for v in values:
16959 * if not(v is None or bcf_int32_missing < v <= INT32_MAX): # <<<<<<<<<<<<<<
16960 * raise ValueError('Integer value too small/large to store in VCF/BCF')
16961 * elif ht_type == BCF_HT_STR:
16962 */
16963 }
16964
16965 /* "pysam/libcbcf.pyx":610
16966 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)):
16967 * raise TypeError('invalid value for Integer format')
16968 * for v in values: # <<<<<<<<<<<<<<
16969 * if not(v is None or bcf_int32_missing < v <= INT32_MAX):
16970 * raise ValueError('Integer value too small/large to store in VCF/BCF')
16971 */
16972 }
16973 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16974
16975 /* "pysam/libcbcf.pyx":606
16976 * if not(v is None or isinstance(v, (float, int))):
16977 * raise TypeError('invalid value for Float format')
16978 * elif ht_type == BCF_HT_INT: # <<<<<<<<<<<<<<
16979 * for v in values:
16980 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)):
16981 */
16982 goto __pyx_L13;
16983 }
16984
16985 /* "pysam/libcbcf.pyx":613
16986 * if not(v is None or bcf_int32_missing < v <= INT32_MAX):
16987 * raise ValueError('Integer value too small/large to store in VCF/BCF')
16988 * elif ht_type == BCF_HT_STR: # <<<<<<<<<<<<<<
16989 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values)
16990 * elif ht_type == BCF_HT_FLAG:
16991 */
16992 __pyx_t_1 = (__pyx_v_ht_type == BCF_HT_STR);
16993 if (__pyx_t_1) {
16994
16995 /* "pysam/libcbcf.pyx":614
16996 * raise ValueError('Integer value too small/large to store in VCF/BCF')
16997 * elif ht_type == BCF_HT_STR:
16998 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values) # <<<<<<<<<<<<<<
16999 * elif ht_type == BCF_HT_FLAG:
17000 * if values[0] not in (True, False, None, 1, 0):
17001 */
17002 __pyx_t_2 = __pyx_pf_5pysam_7libcbcf_16bcf_check_values_genexpr(NULL, __pyx_v_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L1_error)
17003 __Pyx_GOTREF(__pyx_t_2);
17004 __pyx_t_4 = __Pyx_PyBytes_Join(__pyx_kp_b__2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
17005 __Pyx_GOTREF(__pyx_t_4);
17006 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17007 __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4);
17008 __pyx_t_4 = 0;
17009
17010 /* "pysam/libcbcf.pyx":613
17011 * if not(v is None or bcf_int32_missing < v <= INT32_MAX):
17012 * raise ValueError('Integer value too small/large to store in VCF/BCF')
17013 * elif ht_type == BCF_HT_STR: # <<<<<<<<<<<<<<
17014 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values)
17015 * elif ht_type == BCF_HT_FLAG:
17016 */
17017 goto __pyx_L13;
17018 }
17019
17020 /* "pysam/libcbcf.pyx":615
17021 * elif ht_type == BCF_HT_STR:
17022 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values)
17023 * elif ht_type == BCF_HT_FLAG: # <<<<<<<<<<<<<<
17024 * if values[0] not in (True, False, None, 1, 0):
17025 * raise ValueError('Flag values must be: True, False, None, 1, 0')
17026 */
17027 __pyx_t_1 = (__pyx_v_ht_type == BCF_HT_FLAG);
17028 if (likely(__pyx_t_1)) {
17029
17030 /* "pysam/libcbcf.pyx":616
17031 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values)
17032 * elif ht_type == BCF_HT_FLAG:
17033 * if values[0] not in (True, False, None, 1, 0): # <<<<<<<<<<<<<<
17034 * raise ValueError('Flag values must be: True, False, None, 1, 0')
17035 * else:
17036 */
17037 __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 616, __pyx_L1_error)
17038 __Pyx_GOTREF(__pyx_t_4);
17039 __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, Py_True, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
17040 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 616, __pyx_L1_error)
17041 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17042 if (__pyx_t_3) {
17043 } else {
17044 __pyx_t_1 = __pyx_t_3;
17045 goto __pyx_L38_bool_binop_done;
17046 }
17047 __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, Py_False, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
17048 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 616, __pyx_L1_error)
17049 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17050 if (__pyx_t_3) {
17051 } else {
17052 __pyx_t_1 = __pyx_t_3;
17053 goto __pyx_L38_bool_binop_done;
17054 }
17055 __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
17056 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 616, __pyx_L1_error)
17057 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17058 if (__pyx_t_3) {
17059 } else {
17060 __pyx_t_1 = __pyx_t_3;
17061 goto __pyx_L38_bool_binop_done;
17062 }
17063 __pyx_t_3 = (__Pyx_PyInt_BoolNeObjC(__pyx_t_4, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 616, __pyx_L1_error)
17064 if (__pyx_t_3) {
17065 } else {
17066 __pyx_t_1 = __pyx_t_3;
17067 goto __pyx_L38_bool_binop_done;
17068 }
17069 __pyx_t_3 = (__Pyx_PyInt_BoolNeObjC(__pyx_t_4, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 616, __pyx_L1_error)
17070 __pyx_t_1 = __pyx_t_3;
17071 __pyx_L38_bool_binop_done:;
17072 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17073 __pyx_t_3 = __pyx_t_1;
17074 if (unlikely(__pyx_t_3)) {
17075
17076 /* "pysam/libcbcf.pyx":617
17077 * elif ht_type == BCF_HT_FLAG:
17078 * if values[0] not in (True, False, None, 1, 0):
17079 * raise ValueError('Flag values must be: True, False, None, 1, 0') # <<<<<<<<<<<<<<
17080 * else:
17081 * raise TypeError('unsupported type')
17082 */
17083 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 617, __pyx_L1_error)
17084 __Pyx_GOTREF(__pyx_t_4);
17085 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
17086 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17087 __PYX_ERR(0, 617, __pyx_L1_error)
17088
17089 /* "pysam/libcbcf.pyx":616
17090 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values)
17091 * elif ht_type == BCF_HT_FLAG:
17092 * if values[0] not in (True, False, None, 1, 0): # <<<<<<<<<<<<<<
17093 * raise ValueError('Flag values must be: True, False, None, 1, 0')
17094 * else:
17095 */
17096 }
17097
17098 /* "pysam/libcbcf.pyx":615
17099 * elif ht_type == BCF_HT_STR:
17100 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values)
17101 * elif ht_type == BCF_HT_FLAG: # <<<<<<<<<<<<<<
17102 * if values[0] not in (True, False, None, 1, 0):
17103 * raise ValueError('Flag values must be: True, False, None, 1, 0')
17104 */
17105 goto __pyx_L13;
17106 }
17107
17108 /* "pysam/libcbcf.pyx":619
17109 * raise ValueError('Flag values must be: True, False, None, 1, 0')
17110 * else:
17111 * raise TypeError('unsupported type') # <<<<<<<<<<<<<<
17112 *
17113 * realloc[0] = 0
17114 */
17115 /*else*/ {
17116 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error)
17117 __Pyx_GOTREF(__pyx_t_4);
17118 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
17119 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17120 __PYX_ERR(0, 619, __pyx_L1_error)
17121 }
17122 __pyx_L13:;
17123
17124 /* "pysam/libcbcf.pyx":621
17125 * raise TypeError('unsupported type')
17126 *
17127 * realloc[0] = 0 # <<<<<<<<<<<<<<
17128 * if len(values) <= 1 and hl_type == BCF_HL_INFO:
17129 * realloc[0] = 0
17130 */
17131 (__pyx_v_realloc[0]) = 0;
17132
17133 /* "pysam/libcbcf.pyx":622
17134 *
17135 * realloc[0] = 0
17136 * if len(values) <= 1 and hl_type == BCF_HL_INFO: # <<<<<<<<<<<<<<
17137 * realloc[0] = 0
17138 * elif len(values) > bt_len:
17139 */
17140 __pyx_t_6 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 622, __pyx_L1_error)
17141 __pyx_t_1 = (__pyx_t_6 <= 1);
17142 if (__pyx_t_1) {
17143 } else {
17144 __pyx_t_3 = __pyx_t_1;
17145 goto __pyx_L44_bool_binop_done;
17146 }
17147 __pyx_t_1 = (__pyx_v_hl_type == BCF_HL_INFO);
17148 __pyx_t_3 = __pyx_t_1;
17149 __pyx_L44_bool_binop_done:;
17150 if (__pyx_t_3) {
17151
17152 /* "pysam/libcbcf.pyx":623
17153 * realloc[0] = 0
17154 * if len(values) <= 1 and hl_type == BCF_HL_INFO:
17155 * realloc[0] = 0 # <<<<<<<<<<<<<<
17156 * elif len(values) > bt_len:
17157 * realloc[0] = 1
17158 */
17159 (__pyx_v_realloc[0]) = 0;
17160
17161 /* "pysam/libcbcf.pyx":622
17162 *
17163 * realloc[0] = 0
17164 * if len(values) <= 1 and hl_type == BCF_HL_INFO: # <<<<<<<<<<<<<<
17165 * realloc[0] = 0
17166 * elif len(values) > bt_len:
17167 */
17168 goto __pyx_L43;
17169 }
17170
17171 /* "pysam/libcbcf.pyx":624
17172 * if len(values) <= 1 and hl_type == BCF_HL_INFO:
17173 * realloc[0] = 0
17174 * elif len(values) > bt_len: # <<<<<<<<<<<<<<
17175 * realloc[0] = 1
17176 * elif bt_type == BCF_BT_INT8:
17177 */
17178 __pyx_t_6 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 624, __pyx_L1_error)
17179 __pyx_t_3 = (__pyx_t_6 > __pyx_v_bt_len);
17180 if (__pyx_t_3) {
17181
17182 /* "pysam/libcbcf.pyx":625
17183 * realloc[0] = 0
17184 * elif len(values) > bt_len:
17185 * realloc[0] = 1 # <<<<<<<<<<<<<<
17186 * elif bt_type == BCF_BT_INT8:
17187 * for v in values:
17188 */
17189 (__pyx_v_realloc[0]) = 1;
17190
17191 /* "pysam/libcbcf.pyx":624
17192 * if len(values) <= 1 and hl_type == BCF_HL_INFO:
17193 * realloc[0] = 0
17194 * elif len(values) > bt_len: # <<<<<<<<<<<<<<
17195 * realloc[0] = 1
17196 * elif bt_type == BCF_BT_INT8:
17197 */
17198 goto __pyx_L43;
17199 }
17200
17201 /* "pysam/libcbcf.pyx":626
17202 * elif len(values) > bt_len:
17203 * realloc[0] = 1
17204 * elif bt_type == BCF_BT_INT8: # <<<<<<<<<<<<<<
17205 * for v in values:
17206 * if v is not None and not(bcf_int8_missing < v <= INT8_MAX):
17207 */
17208 __pyx_t_3 = (__pyx_v_bt_type == BCF_BT_INT8);
17209 if (__pyx_t_3) {
17210
17211 /* "pysam/libcbcf.pyx":627
17212 * realloc[0] = 1
17213 * elif bt_type == BCF_BT_INT8:
17214 * for v in values: # <<<<<<<<<<<<<<
17215 * if v is not None and not(bcf_int8_missing < v <= INT8_MAX):
17216 * realloc[0] = 1
17217 */
17218 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
17219 __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4);
17220 __pyx_t_6 = 0;
17221 __pyx_t_11 = NULL;
17222 } else {
17223 __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error)
17224 __Pyx_GOTREF(__pyx_t_4);
17225 __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 627, __pyx_L1_error)
17226 }
17227 for (;;) {
17228 if (likely(!__pyx_t_11)) {
17229 if (likely(PyList_CheckExact(__pyx_t_4))) {
17230 {
17231 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
17232 #if !CYTHON_ASSUME_SAFE_MACROS
17233 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 627, __pyx_L1_error)
17234 #endif
17235 if (__pyx_t_6 >= __pyx_temp) break;
17236 }
17237 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17238 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 627, __pyx_L1_error)
17239 #else
17240 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
17241 __Pyx_GOTREF(__pyx_t_2);
17242 #endif
17243 } else {
17244 {
17245 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
17246 #if !CYTHON_ASSUME_SAFE_MACROS
17247 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 627, __pyx_L1_error)
17248 #endif
17249 if (__pyx_t_6 >= __pyx_temp) break;
17250 }
17251 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17252 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 627, __pyx_L1_error)
17253 #else
17254 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
17255 __Pyx_GOTREF(__pyx_t_2);
17256 #endif
17257 }
17258 } else {
17259 __pyx_t_2 = __pyx_t_11(__pyx_t_4);
17260 if (unlikely(!__pyx_t_2)) {
17261 PyObject* exc_type = PyErr_Occurred();
17262 if (exc_type) {
17263 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17264 else __PYX_ERR(0, 627, __pyx_L1_error)
17265 }
17266 break;
17267 }
17268 __Pyx_GOTREF(__pyx_t_2);
17269 }
17270 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2);
17271 __pyx_t_2 = 0;
17272
17273 /* "pysam/libcbcf.pyx":628
17274 * elif bt_type == BCF_BT_INT8:
17275 * for v in values:
17276 * if v is not None and not(bcf_int8_missing < v <= INT8_MAX): # <<<<<<<<<<<<<<
17277 * realloc[0] = 1
17278 * break
17279 */
17280 __pyx_t_1 = (__pyx_v_v != Py_None);
17281 if (__pyx_t_1) {
17282 } else {
17283 __pyx_t_3 = __pyx_t_1;
17284 goto __pyx_L49_bool_binop_done;
17285 }
17286 __pyx_t_2 = __Pyx_PyInt_From_int32_t(bcf_int8_missing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
17287 __Pyx_GOTREF(__pyx_t_2);
17288 __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_v_v, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 628, __pyx_L1_error)
17289 if (__Pyx_PyObject_IsTrue(__pyx_t_8)) {
17290 __Pyx_DECREF(__pyx_t_8);
17291 __pyx_t_7 = __Pyx_PyInt_From_int8_t(INT8_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
17292 __Pyx_GOTREF(__pyx_t_7);
17293 __pyx_t_8 = PyObject_RichCompare(__pyx_v_v, __pyx_t_7, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 628, __pyx_L1_error)
17294 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17295 }
17296 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17297 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 628, __pyx_L1_error)
17298 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17299 __pyx_t_12 = (!__pyx_t_1);
17300 __pyx_t_3 = __pyx_t_12;
17301 __pyx_L49_bool_binop_done:;
17302 if (__pyx_t_3) {
17303
17304 /* "pysam/libcbcf.pyx":629
17305 * for v in values:
17306 * if v is not None and not(bcf_int8_missing < v <= INT8_MAX):
17307 * realloc[0] = 1 # <<<<<<<<<<<<<<
17308 * break
17309 * elif bt_type == BCF_BT_INT16:
17310 */
17311 (__pyx_v_realloc[0]) = 1;
17312
17313 /* "pysam/libcbcf.pyx":630
17314 * if v is not None and not(bcf_int8_missing < v <= INT8_MAX):
17315 * realloc[0] = 1
17316 * break # <<<<<<<<<<<<<<
17317 * elif bt_type == BCF_BT_INT16:
17318 * for v in values:
17319 */
17320 goto __pyx_L47_break;
17321
17322 /* "pysam/libcbcf.pyx":628
17323 * elif bt_type == BCF_BT_INT8:
17324 * for v in values:
17325 * if v is not None and not(bcf_int8_missing < v <= INT8_MAX): # <<<<<<<<<<<<<<
17326 * realloc[0] = 1
17327 * break
17328 */
17329 }
17330
17331 /* "pysam/libcbcf.pyx":627
17332 * realloc[0] = 1
17333 * elif bt_type == BCF_BT_INT8:
17334 * for v in values: # <<<<<<<<<<<<<<
17335 * if v is not None and not(bcf_int8_missing < v <= INT8_MAX):
17336 * realloc[0] = 1
17337 */
17338 }
17339 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17340 goto __pyx_L51_for_end;
17341 __pyx_L47_break:;
17342 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17343 goto __pyx_L51_for_end;
17344 __pyx_L51_for_end:;
17345
17346 /* "pysam/libcbcf.pyx":626
17347 * elif len(values) > bt_len:
17348 * realloc[0] = 1
17349 * elif bt_type == BCF_BT_INT8: # <<<<<<<<<<<<<<
17350 * for v in values:
17351 * if v is not None and not(bcf_int8_missing < v <= INT8_MAX):
17352 */
17353 goto __pyx_L43;
17354 }
17355
17356 /* "pysam/libcbcf.pyx":631
17357 * realloc[0] = 1
17358 * break
17359 * elif bt_type == BCF_BT_INT16: # <<<<<<<<<<<<<<
17360 * for v in values:
17361 * if v is not None and not(bcf_int16_missing < v <= INT16_MAX):
17362 */
17363 __pyx_t_3 = (__pyx_v_bt_type == BCF_BT_INT16);
17364 if (__pyx_t_3) {
17365
17366 /* "pysam/libcbcf.pyx":632
17367 * break
17368 * elif bt_type == BCF_BT_INT16:
17369 * for v in values: # <<<<<<<<<<<<<<
17370 * if v is not None and not(bcf_int16_missing < v <= INT16_MAX):
17371 * realloc[0] = 1
17372 */
17373 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
17374 __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4);
17375 __pyx_t_6 = 0;
17376 __pyx_t_11 = NULL;
17377 } else {
17378 __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 632, __pyx_L1_error)
17379 __Pyx_GOTREF(__pyx_t_4);
17380 __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 632, __pyx_L1_error)
17381 }
17382 for (;;) {
17383 if (likely(!__pyx_t_11)) {
17384 if (likely(PyList_CheckExact(__pyx_t_4))) {
17385 {
17386 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
17387 #if !CYTHON_ASSUME_SAFE_MACROS
17388 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 632, __pyx_L1_error)
17389 #endif
17390 if (__pyx_t_6 >= __pyx_temp) break;
17391 }
17392 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17393 __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 632, __pyx_L1_error)
17394 #else
17395 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 632, __pyx_L1_error)
17396 __Pyx_GOTREF(__pyx_t_8);
17397 #endif
17398 } else {
17399 {
17400 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
17401 #if !CYTHON_ASSUME_SAFE_MACROS
17402 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 632, __pyx_L1_error)
17403 #endif
17404 if (__pyx_t_6 >= __pyx_temp) break;
17405 }
17406 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17407 __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 632, __pyx_L1_error)
17408 #else
17409 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 632, __pyx_L1_error)
17410 __Pyx_GOTREF(__pyx_t_8);
17411 #endif
17412 }
17413 } else {
17414 __pyx_t_8 = __pyx_t_11(__pyx_t_4);
17415 if (unlikely(!__pyx_t_8)) {
17416 PyObject* exc_type = PyErr_Occurred();
17417 if (exc_type) {
17418 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17419 else __PYX_ERR(0, 632, __pyx_L1_error)
17420 }
17421 break;
17422 }
17423 __Pyx_GOTREF(__pyx_t_8);
17424 }
17425 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8);
17426 __pyx_t_8 = 0;
17427
17428 /* "pysam/libcbcf.pyx":633
17429 * elif bt_type == BCF_BT_INT16:
17430 * for v in values:
17431 * if v is not None and not(bcf_int16_missing < v <= INT16_MAX): # <<<<<<<<<<<<<<
17432 * realloc[0] = 1
17433 * break
17434 */
17435 __pyx_t_12 = (__pyx_v_v != Py_None);
17436 if (__pyx_t_12) {
17437 } else {
17438 __pyx_t_3 = __pyx_t_12;
17439 goto __pyx_L55_bool_binop_done;
17440 }
17441 __pyx_t_8 = __Pyx_PyInt_From_int32_t(bcf_int16_missing); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 633, __pyx_L1_error)
17442 __Pyx_GOTREF(__pyx_t_8);
17443 __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_v_v, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
17444 if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
17445 __Pyx_DECREF(__pyx_t_2);
17446 __pyx_t_7 = __Pyx_PyInt_From_int16_t(INT16_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 633, __pyx_L1_error)
17447 __Pyx_GOTREF(__pyx_t_7);
17448 __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_t_7, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
17449 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17450 }
17451 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17452 __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 633, __pyx_L1_error)
17453 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17454 __pyx_t_1 = (!__pyx_t_12);
17455 __pyx_t_3 = __pyx_t_1;
17456 __pyx_L55_bool_binop_done:;
17457 if (__pyx_t_3) {
17458
17459 /* "pysam/libcbcf.pyx":634
17460 * for v in values:
17461 * if v is not None and not(bcf_int16_missing < v <= INT16_MAX):
17462 * realloc[0] = 1 # <<<<<<<<<<<<<<
17463 * break
17464 *
17465 */
17466 (__pyx_v_realloc[0]) = 1;
17467
17468 /* "pysam/libcbcf.pyx":635
17469 * if v is not None and not(bcf_int16_missing < v <= INT16_MAX):
17470 * realloc[0] = 1
17471 * break # <<<<<<<<<<<<<<
17472 *
17473 * return values
17474 */
17475 goto __pyx_L53_break;
17476
17477 /* "pysam/libcbcf.pyx":633
17478 * elif bt_type == BCF_BT_INT16:
17479 * for v in values:
17480 * if v is not None and not(bcf_int16_missing < v <= INT16_MAX): # <<<<<<<<<<<<<<
17481 * realloc[0] = 1
17482 * break
17483 */
17484 }
17485
17486 /* "pysam/libcbcf.pyx":632
17487 * break
17488 * elif bt_type == BCF_BT_INT16:
17489 * for v in values: # <<<<<<<<<<<<<<
17490 * if v is not None and not(bcf_int16_missing < v <= INT16_MAX):
17491 * realloc[0] = 1
17492 */
17493 }
17494 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17495 goto __pyx_L57_for_end;
17496 __pyx_L53_break:;
17497 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17498 goto __pyx_L57_for_end;
17499 __pyx_L57_for_end:;
17500
17501 /* "pysam/libcbcf.pyx":631
17502 * realloc[0] = 1
17503 * break
17504 * elif bt_type == BCF_BT_INT16: # <<<<<<<<<<<<<<
17505 * for v in values:
17506 * if v is not None and not(bcf_int16_missing < v <= INT16_MAX):
17507 */
17508 }
17509 __pyx_L43:;
17510
17511 /* "pysam/libcbcf.pyx":637
17512 * break
17513 *
17514 * return values # <<<<<<<<<<<<<<
17515 *
17516 *
17517 */
17518 __Pyx_XDECREF(__pyx_r);
17519 __Pyx_INCREF(__pyx_v_values);
17520 __pyx_r = __pyx_v_values;
17521 goto __pyx_L0;
17522
17523 /* "pysam/libcbcf.pyx":575
17524 *
17525 *
17526 * cdef object bcf_check_values(VariantRecord record, value, int sample, # <<<<<<<<<<<<<<
17527 * int hl_type, int ht_type,
17528 * int id, int bt_type, ssize_t bt_len,
17529 */
17530
17531 /* function exit code */
17532 __pyx_L1_error:;
17533 __Pyx_XDECREF(__pyx_t_2);
17534 __Pyx_XDECREF(__pyx_t_4);
17535 __Pyx_XDECREF(__pyx_t_7);
17536 __Pyx_XDECREF(__pyx_t_8);
17537 __Pyx_XDECREF(__pyx_t_10);
17538 __Pyx_AddTraceback("pysam.libcbcf.bcf_check_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
17539 __pyx_r = 0;
17540 __pyx_L0:;
17541 __Pyx_XDECREF(__pyx_v_values);
17542 __Pyx_XDECREF(__pyx_v_v);
17543 __Pyx_XDECREF(__pyx_gb_5pysam_7libcbcf_16bcf_check_values_2generator31);
17544 __Pyx_XGIVEREF(__pyx_r);
17545 __Pyx_TraceReturn(__pyx_r, 0);
17546 __Pyx_RefNannyFinishContext();
17547 return __pyx_r;
17548 }
17549
17550 /* "pysam/libcbcf.pyx":640
17551 *
17552 *
17553 * cdef bcf_encode_alleles(VariantRecord record, values): # <<<<<<<<<<<<<<
17554 * if record is None:
17555 * raise ValueError('record must not be None')
17556 */
17557
17558 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_encode_alleles(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, PyObject *__pyx_v_values) {
17559 bcf1_t *__pyx_v_r;
17560 int32_t __pyx_v_nalleles;
17561 PyObject *__pyx_v_gt_values = 0;
17562 char *__pyx_v_s;
17563 int __pyx_v_i;
17564 PyObject *__pyx_v_value = NULL;
17565 PyObject *__pyx_v_bvalue = NULL;
17566 PyObject *__pyx_r = NULL;
17567 __Pyx_TraceDeclarations
17568 __Pyx_RefNannyDeclarations
17569 int __pyx_t_1;
17570 PyObject *__pyx_t_2 = NULL;
17571 bcf1_t *__pyx_t_3;
17572 uint32_t __pyx_t_4;
17573 int __pyx_t_5;
17574 Py_ssize_t __pyx_t_6;
17575 PyObject *(*__pyx_t_7)(PyObject *);
17576 PyObject *__pyx_t_8 = NULL;
17577 int __pyx_t_9;
17578 char *__pyx_t_10;
17579 uint32_t __pyx_t_11;
17580 int __pyx_t_12;
17581 int __pyx_lineno = 0;
17582 const char *__pyx_filename = NULL;
17583 int __pyx_clineno = 0;
17584 __Pyx_RefNannySetupContext("bcf_encode_alleles", 0);
17585 __Pyx_TraceCall("bcf_encode_alleles", __pyx_f[0], 640, 0, __PYX_ERR(0, 640, __pyx_L1_error));
17586 __Pyx_INCREF(__pyx_v_values);
17587
17588 /* "pysam/libcbcf.pyx":641
17589 *
17590 * cdef bcf_encode_alleles(VariantRecord record, values):
17591 * if record is None: # <<<<<<<<<<<<<<
17592 * raise ValueError('record must not be None')
17593 *
17594 */
17595 __pyx_t_1 = (((PyObject *)__pyx_v_record) == Py_None);
17596 if (unlikely(__pyx_t_1)) {
17597
17598 /* "pysam/libcbcf.pyx":642
17599 * cdef bcf_encode_alleles(VariantRecord record, values):
17600 * if record is None:
17601 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
17602 *
17603 * cdef bcf1_t *r = record.ptr
17604 */
17605 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
17606 __Pyx_GOTREF(__pyx_t_2);
17607 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
17608 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17609 __PYX_ERR(0, 642, __pyx_L1_error)
17610
17611 /* "pysam/libcbcf.pyx":641
17612 *
17613 * cdef bcf_encode_alleles(VariantRecord record, values):
17614 * if record is None: # <<<<<<<<<<<<<<
17615 * raise ValueError('record must not be None')
17616 *
17617 */
17618 }
17619
17620 /* "pysam/libcbcf.pyx":644
17621 * raise ValueError('record must not be None')
17622 *
17623 * cdef bcf1_t *r = record.ptr # <<<<<<<<<<<<<<
17624 * cdef int32_t nalleles = r.n_allele
17625 * cdef list gt_values = []
17626 */
17627 __pyx_t_3 = __pyx_v_record->ptr;
17628 __pyx_v_r = __pyx_t_3;
17629
17630 /* "pysam/libcbcf.pyx":645
17631 *
17632 * cdef bcf1_t *r = record.ptr
17633 * cdef int32_t nalleles = r.n_allele # <<<<<<<<<<<<<<
17634 * cdef list gt_values = []
17635 * cdef char *s
17636 */
17637 __pyx_t_4 = __pyx_v_r->n_allele;
17638 __pyx_v_nalleles = __pyx_t_4;
17639
17640 /* "pysam/libcbcf.pyx":646
17641 * cdef bcf1_t *r = record.ptr
17642 * cdef int32_t nalleles = r.n_allele
17643 * cdef list gt_values = [] # <<<<<<<<<<<<<<
17644 * cdef char *s
17645 * cdef int i
17646 */
17647 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
17648 __Pyx_GOTREF(__pyx_t_2);
17649 __pyx_v_gt_values = ((PyObject*)__pyx_t_2);
17650 __pyx_t_2 = 0;
17651
17652 /* "pysam/libcbcf.pyx":650
17653 * cdef int i
17654 *
17655 * if values is None: # <<<<<<<<<<<<<<
17656 * return ()
17657 *
17658 */
17659 __pyx_t_1 = (__pyx_v_values == Py_None);
17660 if (__pyx_t_1) {
17661
17662 /* "pysam/libcbcf.pyx":651
17663 *
17664 * if values is None:
17665 * return () # <<<<<<<<<<<<<<
17666 *
17667 * if not isinstance(values, (list, tuple)):
17668 */
17669 __Pyx_XDECREF(__pyx_r);
17670 __Pyx_INCREF(__pyx_empty_tuple);
17671 __pyx_r = __pyx_empty_tuple;
17672 goto __pyx_L0;
17673
17674 /* "pysam/libcbcf.pyx":650
17675 * cdef int i
17676 *
17677 * if values is None: # <<<<<<<<<<<<<<
17678 * return ()
17679 *
17680 */
17681 }
17682
17683 /* "pysam/libcbcf.pyx":653
17684 * return ()
17685 *
17686 * if not isinstance(values, (list, tuple)): # <<<<<<<<<<<<<<
17687 * values = (values,)
17688 *
17689 */
17690 __pyx_t_5 = PyList_Check(__pyx_v_values);
17691 if (!__pyx_t_5) {
17692 } else {
17693 __pyx_t_1 = __pyx_t_5;
17694 goto __pyx_L6_bool_binop_done;
17695 }
17696 __pyx_t_5 = PyTuple_Check(__pyx_v_values);
17697 __pyx_t_1 = __pyx_t_5;
17698 __pyx_L6_bool_binop_done:;
17699 __pyx_t_5 = (!__pyx_t_1);
17700 if (__pyx_t_5) {
17701
17702 /* "pysam/libcbcf.pyx":654
17703 *
17704 * if not isinstance(values, (list, tuple)):
17705 * values = (values,) # <<<<<<<<<<<<<<
17706 *
17707 * for value in values:
17708 */
17709 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
17710 __Pyx_GOTREF(__pyx_t_2);
17711 __Pyx_INCREF(__pyx_v_values);
17712 __Pyx_GIVEREF(__pyx_v_values);
17713 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values)) __PYX_ERR(0, 654, __pyx_L1_error);
17714 __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_2);
17715 __pyx_t_2 = 0;
17716
17717 /* "pysam/libcbcf.pyx":653
17718 * return ()
17719 *
17720 * if not isinstance(values, (list, tuple)): # <<<<<<<<<<<<<<
17721 * values = (values,)
17722 *
17723 */
17724 }
17725
17726 /* "pysam/libcbcf.pyx":656
17727 * values = (values,)
17728 *
17729 * for value in values: # <<<<<<<<<<<<<<
17730 * if value is None:
17731 * gt_values.append(bcf_gt_missing)
17732 */
17733 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
17734 __pyx_t_2 = __pyx_v_values; __Pyx_INCREF(__pyx_t_2);
17735 __pyx_t_6 = 0;
17736 __pyx_t_7 = NULL;
17737 } else {
17738 __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
17739 __Pyx_GOTREF(__pyx_t_2);
17740 __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 656, __pyx_L1_error)
17741 }
17742 for (;;) {
17743 if (likely(!__pyx_t_7)) {
17744 if (likely(PyList_CheckExact(__pyx_t_2))) {
17745 {
17746 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
17747 #if !CYTHON_ASSUME_SAFE_MACROS
17748 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 656, __pyx_L1_error)
17749 #endif
17750 if (__pyx_t_6 >= __pyx_temp) break;
17751 }
17752 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17753 __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 656, __pyx_L1_error)
17754 #else
17755 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 656, __pyx_L1_error)
17756 __Pyx_GOTREF(__pyx_t_8);
17757 #endif
17758 } else {
17759 {
17760 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
17761 #if !CYTHON_ASSUME_SAFE_MACROS
17762 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 656, __pyx_L1_error)
17763 #endif
17764 if (__pyx_t_6 >= __pyx_temp) break;
17765 }
17766 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17767 __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 656, __pyx_L1_error)
17768 #else
17769 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 656, __pyx_L1_error)
17770 __Pyx_GOTREF(__pyx_t_8);
17771 #endif
17772 }
17773 } else {
17774 __pyx_t_8 = __pyx_t_7(__pyx_t_2);
17775 if (unlikely(!__pyx_t_8)) {
17776 PyObject* exc_type = PyErr_Occurred();
17777 if (exc_type) {
17778 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17779 else __PYX_ERR(0, 656, __pyx_L1_error)
17780 }
17781 break;
17782 }
17783 __Pyx_GOTREF(__pyx_t_8);
17784 }
17785 __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8);
17786 __pyx_t_8 = 0;
17787
17788 /* "pysam/libcbcf.pyx":657
17789 *
17790 * for value in values:
17791 * if value is None: # <<<<<<<<<<<<<<
17792 * gt_values.append(bcf_gt_missing)
17793 * elif isinstance(value, (str, bytes)):
17794 */
17795 __pyx_t_5 = (__pyx_v_value == Py_None);
17796 if (__pyx_t_5) {
17797
17798 /* "pysam/libcbcf.pyx":658
17799 * for value in values:
17800 * if value is None:
17801 * gt_values.append(bcf_gt_missing) # <<<<<<<<<<<<<<
17802 * elif isinstance(value, (str, bytes)):
17803 * bvalue = force_bytes(value)
17804 */
17805 __pyx_t_8 = __Pyx_PyInt_From_uint32_t(bcf_gt_missing); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 658, __pyx_L1_error)
17806 __Pyx_GOTREF(__pyx_t_8);
17807 __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_gt_values, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 658, __pyx_L1_error)
17808 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17809
17810 /* "pysam/libcbcf.pyx":657
17811 *
17812 * for value in values:
17813 * if value is None: # <<<<<<<<<<<<<<
17814 * gt_values.append(bcf_gt_missing)
17815 * elif isinstance(value, (str, bytes)):
17816 */
17817 goto __pyx_L10;
17818 }
17819
17820 /* "pysam/libcbcf.pyx":659
17821 * if value is None:
17822 * gt_values.append(bcf_gt_missing)
17823 * elif isinstance(value, (str, bytes)): # <<<<<<<<<<<<<<
17824 * bvalue = force_bytes(value)
17825 * s = bvalue
17826 */
17827 __pyx_t_1 = PyUnicode_Check(__pyx_v_value);
17828 if (!__pyx_t_1) {
17829 } else {
17830 __pyx_t_5 = __pyx_t_1;
17831 goto __pyx_L11_bool_binop_done;
17832 }
17833 __pyx_t_1 = PyBytes_Check(__pyx_v_value);
17834 __pyx_t_5 = __pyx_t_1;
17835 __pyx_L11_bool_binop_done:;
17836 if (__pyx_t_5) {
17837
17838 /* "pysam/libcbcf.pyx":660
17839 * gt_values.append(bcf_gt_missing)
17840 * elif isinstance(value, (str, bytes)):
17841 * bvalue = force_bytes(value) # <<<<<<<<<<<<<<
17842 * s = bvalue
17843 * for i in range(r.n_allele):
17844 */
17845 __pyx_t_8 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_value, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 660, __pyx_L1_error)
17846 __Pyx_GOTREF(__pyx_t_8);
17847 __Pyx_XDECREF_SET(__pyx_v_bvalue, ((PyObject*)__pyx_t_8));
17848 __pyx_t_8 = 0;
17849
17850 /* "pysam/libcbcf.pyx":661
17851 * elif isinstance(value, (str, bytes)):
17852 * bvalue = force_bytes(value)
17853 * s = bvalue # <<<<<<<<<<<<<<
17854 * for i in range(r.n_allele):
17855 * if strcmp(r.d.allele[i], s) != 0:
17856 */
17857 if (unlikely(__pyx_v_bvalue == Py_None)) {
17858 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
17859 __PYX_ERR(0, 661, __pyx_L1_error)
17860 }
17861 __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_bvalue); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 661, __pyx_L1_error)
17862 __pyx_v_s = __pyx_t_10;
17863
17864 /* "pysam/libcbcf.pyx":662
17865 * bvalue = force_bytes(value)
17866 * s = bvalue
17867 * for i in range(r.n_allele): # <<<<<<<<<<<<<<
17868 * if strcmp(r.d.allele[i], s) != 0:
17869 * gt_values.append(bcf_gt_unphased(i))
17870 */
17871 __pyx_t_4 = __pyx_v_r->n_allele;
17872 __pyx_t_11 = __pyx_t_4;
17873 for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
17874 __pyx_v_i = __pyx_t_12;
17875
17876 /* "pysam/libcbcf.pyx":663
17877 * s = bvalue
17878 * for i in range(r.n_allele):
17879 * if strcmp(r.d.allele[i], s) != 0: # <<<<<<<<<<<<<<
17880 * gt_values.append(bcf_gt_unphased(i))
17881 * break
17882 */
17883 __pyx_t_5 = (strcmp((__pyx_v_r->d.allele[__pyx_v_i]), __pyx_v_s) != 0);
17884 if (__pyx_t_5) {
17885
17886 /* "pysam/libcbcf.pyx":664
17887 * for i in range(r.n_allele):
17888 * if strcmp(r.d.allele[i], s) != 0:
17889 * gt_values.append(bcf_gt_unphased(i)) # <<<<<<<<<<<<<<
17890 * break
17891 * else:
17892 */
17893 __pyx_t_8 = __Pyx_PyInt_From_uint32_t(bcf_gt_unphased(__pyx_v_i)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 664, __pyx_L1_error)
17894 __Pyx_GOTREF(__pyx_t_8);
17895 __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_gt_values, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 664, __pyx_L1_error)
17896 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17897
17898 /* "pysam/libcbcf.pyx":665
17899 * if strcmp(r.d.allele[i], s) != 0:
17900 * gt_values.append(bcf_gt_unphased(i))
17901 * break # <<<<<<<<<<<<<<
17902 * else:
17903 * raise ValueError('Unknown allele')
17904 */
17905 goto __pyx_L14_break;
17906
17907 /* "pysam/libcbcf.pyx":663
17908 * s = bvalue
17909 * for i in range(r.n_allele):
17910 * if strcmp(r.d.allele[i], s) != 0: # <<<<<<<<<<<<<<
17911 * gt_values.append(bcf_gt_unphased(i))
17912 * break
17913 */
17914 }
17915 }
17916 /*else*/ {
17917
17918 /* "pysam/libcbcf.pyx":667
17919 * break
17920 * else:
17921 * raise ValueError('Unknown allele') # <<<<<<<<<<<<<<
17922 * else:
17923 * i = value
17924 */
17925 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 667, __pyx_L1_error)
17926 __Pyx_GOTREF(__pyx_t_8);
17927 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
17928 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17929 __PYX_ERR(0, 667, __pyx_L1_error)
17930 }
17931 __pyx_L14_break:;
17932
17933 /* "pysam/libcbcf.pyx":659
17934 * if value is None:
17935 * gt_values.append(bcf_gt_missing)
17936 * elif isinstance(value, (str, bytes)): # <<<<<<<<<<<<<<
17937 * bvalue = force_bytes(value)
17938 * s = bvalue
17939 */
17940 goto __pyx_L10;
17941 }
17942
17943 /* "pysam/libcbcf.pyx":669
17944 * raise ValueError('Unknown allele')
17945 * else:
17946 * i = value # <<<<<<<<<<<<<<
17947 * if not (0 <= i < nalleles):
17948 * raise ValueError('Invalid allele index')
17949 */
17950 /*else*/ {
17951 __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 669, __pyx_L1_error)
17952 __pyx_v_i = __pyx_t_12;
17953
17954 /* "pysam/libcbcf.pyx":670
17955 * else:
17956 * i = value
17957 * if not (0 <= i < nalleles): # <<<<<<<<<<<<<<
17958 * raise ValueError('Invalid allele index')
17959 * gt_values.append(bcf_gt_unphased(i))
17960 */
17961 __pyx_t_5 = (0 <= __pyx_v_i);
17962 if (__pyx_t_5) {
17963 __pyx_t_5 = (__pyx_v_i < __pyx_v_nalleles);
17964 }
17965 __pyx_t_1 = (!__pyx_t_5);
17966 if (unlikely(__pyx_t_1)) {
17967
17968 /* "pysam/libcbcf.pyx":671
17969 * i = value
17970 * if not (0 <= i < nalleles):
17971 * raise ValueError('Invalid allele index') # <<<<<<<<<<<<<<
17972 * gt_values.append(bcf_gt_unphased(i))
17973 *
17974 */
17975 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 671, __pyx_L1_error)
17976 __Pyx_GOTREF(__pyx_t_8);
17977 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
17978 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17979 __PYX_ERR(0, 671, __pyx_L1_error)
17980
17981 /* "pysam/libcbcf.pyx":670
17982 * else:
17983 * i = value
17984 * if not (0 <= i < nalleles): # <<<<<<<<<<<<<<
17985 * raise ValueError('Invalid allele index')
17986 * gt_values.append(bcf_gt_unphased(i))
17987 */
17988 }
17989
17990 /* "pysam/libcbcf.pyx":672
17991 * if not (0 <= i < nalleles):
17992 * raise ValueError('Invalid allele index')
17993 * gt_values.append(bcf_gt_unphased(i)) # <<<<<<<<<<<<<<
17994 *
17995 * return gt_values
17996 */
17997 __pyx_t_8 = __Pyx_PyInt_From_uint32_t(bcf_gt_unphased(__pyx_v_i)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 672, __pyx_L1_error)
17998 __Pyx_GOTREF(__pyx_t_8);
17999 __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_gt_values, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 672, __pyx_L1_error)
18000 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18001 }
18002 __pyx_L10:;
18003
18004 /* "pysam/libcbcf.pyx":656
18005 * values = (values,)
18006 *
18007 * for value in values: # <<<<<<<<<<<<<<
18008 * if value is None:
18009 * gt_values.append(bcf_gt_missing)
18010 */
18011 }
18012 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18013
18014 /* "pysam/libcbcf.pyx":674
18015 * gt_values.append(bcf_gt_unphased(i))
18016 *
18017 * return gt_values # <<<<<<<<<<<<<<
18018 *
18019 *
18020 */
18021 __Pyx_XDECREF(__pyx_r);
18022 __Pyx_INCREF(__pyx_v_gt_values);
18023 __pyx_r = __pyx_v_gt_values;
18024 goto __pyx_L0;
18025
18026 /* "pysam/libcbcf.pyx":640
18027 *
18028 *
18029 * cdef bcf_encode_alleles(VariantRecord record, values): # <<<<<<<<<<<<<<
18030 * if record is None:
18031 * raise ValueError('record must not be None')
18032 */
18033
18034 /* function exit code */
18035 __pyx_L1_error:;
18036 __Pyx_XDECREF(__pyx_t_2);
18037 __Pyx_XDECREF(__pyx_t_8);
18038 __Pyx_AddTraceback("pysam.libcbcf.bcf_encode_alleles", __pyx_clineno, __pyx_lineno, __pyx_filename);
18039 __pyx_r = 0;
18040 __pyx_L0:;
18041 __Pyx_XDECREF(__pyx_v_gt_values);
18042 __Pyx_XDECREF(__pyx_v_value);
18043 __Pyx_XDECREF(__pyx_v_bvalue);
18044 __Pyx_XDECREF(__pyx_v_values);
18045 __Pyx_XGIVEREF(__pyx_r);
18046 __Pyx_TraceReturn(__pyx_r, 0);
18047 __Pyx_RefNannyFinishContext();
18048 return __pyx_r;
18049 }
18050
18051 /* "pysam/libcbcf.pyx":677
18052 *
18053 *
18054 * cdef bcf_info_set_value(VariantRecord record, key, value): # <<<<<<<<<<<<<<
18055 * if record is None:
18056 * raise ValueError('record must not be None')
18057 */
18058
18059 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_info_set_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
18060 bcf_hdr_t *__pyx_v_hdr;
18061 bcf1_t *__pyx_v_r;
18062 int __pyx_v_info_id;
18063 int __pyx_v_info_type;
18064 int __pyx_v_scalar;
18065 int __pyx_v_dst_type;
18066 int __pyx_v_realloc;
18067 int __pyx_v_vlen;
18068 Py_ssize_t __pyx_v_value_count;
18069 Py_ssize_t __pyx_v_alloc_len;
18070 PyObject *__pyx_v_bkey = 0;
18071 bcf_info_t *__pyx_v_info;
18072 PyObject *__pyx_v_values = NULL;
18073 PyObject *__pyx_v_new_values = NULL;
18074 char *__pyx_v_valp;
18075 PyObject *__pyx_r = NULL;
18076 __Pyx_TraceDeclarations
18077 __Pyx_RefNannyDeclarations
18078 int __pyx_t_1;
18079 PyObject *__pyx_t_2 = NULL;
18080 bcf_hdr_t *__pyx_t_3;
18081 bcf1_t *__pyx_t_4;
18082 char const *__pyx_t_5;
18083 int __pyx_t_6;
18084 PyObject *__pyx_t_7 = NULL;
18085 PyObject *__pyx_t_8 = NULL;
18086 unsigned int __pyx_t_9;
18087 int __pyx_t_10;
18088 Py_ssize_t __pyx_t_11;
18089 char const *__pyx_t_12;
18090 Py_ssize_t __pyx_t_13;
18091 long __pyx_t_14;
18092 Py_ssize_t __pyx_t_15;
18093 char *__pyx_t_16;
18094 int __pyx_lineno = 0;
18095 const char *__pyx_filename = NULL;
18096 int __pyx_clineno = 0;
18097 __Pyx_RefNannySetupContext("bcf_info_set_value", 1);
18098 __Pyx_TraceCall("bcf_info_set_value", __pyx_f[0], 677, 0, __PYX_ERR(0, 677, __pyx_L1_error));
18099
18100 /* "pysam/libcbcf.pyx":678
18101 *
18102 * cdef bcf_info_set_value(VariantRecord record, key, value):
18103 * if record is None: # <<<<<<<<<<<<<<
18104 * raise ValueError('record must not be None')
18105 *
18106 */
18107 __pyx_t_1 = (((PyObject *)__pyx_v_record) == Py_None);
18108 if (unlikely(__pyx_t_1)) {
18109
18110 /* "pysam/libcbcf.pyx":679
18111 * cdef bcf_info_set_value(VariantRecord record, key, value):
18112 * if record is None:
18113 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
18114 *
18115 * cdef bcf_hdr_t *hdr = record.header.ptr
18116 */
18117 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
18118 __Pyx_GOTREF(__pyx_t_2);
18119 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18120 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18121 __PYX_ERR(0, 679, __pyx_L1_error)
18122
18123 /* "pysam/libcbcf.pyx":678
18124 *
18125 * cdef bcf_info_set_value(VariantRecord record, key, value):
18126 * if record is None: # <<<<<<<<<<<<<<
18127 * raise ValueError('record must not be None')
18128 *
18129 */
18130 }
18131
18132 /* "pysam/libcbcf.pyx":681
18133 * raise ValueError('record must not be None')
18134 *
18135 * cdef bcf_hdr_t *hdr = record.header.ptr # <<<<<<<<<<<<<<
18136 * cdef bcf1_t *r = record.ptr
18137 * cdef int info_id, info_type, scalar, dst_type, realloc, vlen = 0
18138 */
18139 __pyx_t_3 = __pyx_v_record->header->ptr;
18140 __pyx_v_hdr = __pyx_t_3;
18141
18142 /* "pysam/libcbcf.pyx":682
18143 *
18144 * cdef bcf_hdr_t *hdr = record.header.ptr
18145 * cdef bcf1_t *r = record.ptr # <<<<<<<<<<<<<<
18146 * cdef int info_id, info_type, scalar, dst_type, realloc, vlen = 0
18147 * cdef ssize_t i, value_count, alloc_len, alloc_size, dst_size
18148 */
18149 __pyx_t_4 = __pyx_v_record->ptr;
18150 __pyx_v_r = __pyx_t_4;
18151
18152 /* "pysam/libcbcf.pyx":683
18153 * cdef bcf_hdr_t *hdr = record.header.ptr
18154 * cdef bcf1_t *r = record.ptr
18155 * cdef int info_id, info_type, scalar, dst_type, realloc, vlen = 0 # <<<<<<<<<<<<<<
18156 * cdef ssize_t i, value_count, alloc_len, alloc_size, dst_size
18157 *
18158 */
18159 __pyx_v_vlen = 0;
18160
18161 /* "pysam/libcbcf.pyx":686
18162 * cdef ssize_t i, value_count, alloc_len, alloc_size, dst_size
18163 *
18164 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
18165 * raise ValueError('Error unpacking VariantRecord')
18166 *
18167 */
18168 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
18169 if (unlikely(__pyx_t_1)) {
18170
18171 /* "pysam/libcbcf.pyx":687
18172 *
18173 * if bcf_unpack(r, BCF_UN_INFO) < 0:
18174 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
18175 *
18176 * cdef bytes bkey = force_bytes(key)
18177 */
18178 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
18179 __Pyx_GOTREF(__pyx_t_2);
18180 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18181 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18182 __PYX_ERR(0, 687, __pyx_L1_error)
18183
18184 /* "pysam/libcbcf.pyx":686
18185 * cdef ssize_t i, value_count, alloc_len, alloc_size, dst_size
18186 *
18187 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
18188 * raise ValueError('Error unpacking VariantRecord')
18189 *
18190 */
18191 }
18192
18193 /* "pysam/libcbcf.pyx":689
18194 * raise ValueError('Error unpacking VariantRecord')
18195 *
18196 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
18197 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
18198 *
18199 */
18200 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
18201 __Pyx_GOTREF(__pyx_t_2);
18202 __pyx_v_bkey = ((PyObject*)__pyx_t_2);
18203 __pyx_t_2 = 0;
18204
18205 /* "pysam/libcbcf.pyx":690
18206 *
18207 * cdef bytes bkey = force_bytes(key)
18208 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey) # <<<<<<<<<<<<<<
18209 *
18210 * if info:
18211 */
18212 if (unlikely(__pyx_v_bkey == Py_None)) {
18213 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
18214 __PYX_ERR(0, 690, __pyx_L1_error)
18215 }
18216 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 690, __pyx_L1_error)
18217 __pyx_v_info = bcf_get_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_5);
18218
18219 /* "pysam/libcbcf.pyx":692
18220 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
18221 *
18222 * if info: # <<<<<<<<<<<<<<
18223 * info_id = info.key
18224 * else:
18225 */
18226 __pyx_t_1 = (__pyx_v_info != 0);
18227 if (__pyx_t_1) {
18228
18229 /* "pysam/libcbcf.pyx":693
18230 *
18231 * if info:
18232 * info_id = info.key # <<<<<<<<<<<<<<
18233 * else:
18234 * info_id = bcf_header_get_info_id(hdr, bkey)
18235 */
18236 __pyx_t_6 = __pyx_v_info->key;
18237 __pyx_v_info_id = __pyx_t_6;
18238
18239 /* "pysam/libcbcf.pyx":692
18240 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
18241 *
18242 * if info: # <<<<<<<<<<<<<<
18243 * info_id = info.key
18244 * else:
18245 */
18246 goto __pyx_L5;
18247 }
18248
18249 /* "pysam/libcbcf.pyx":695
18250 * info_id = info.key
18251 * else:
18252 * info_id = bcf_header_get_info_id(hdr, bkey) # <<<<<<<<<<<<<<
18253 *
18254 * if info_id < 0:
18255 */
18256 /*else*/ {
18257 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_bcf_header_get_info_id(__pyx_v_hdr, __pyx_v_bkey); if (unlikely(__pyx_t_6 == ((int)-2) && PyErr_Occurred())) __PYX_ERR(0, 695, __pyx_L1_error)
18258 __pyx_v_info_id = __pyx_t_6;
18259 }
18260 __pyx_L5:;
18261
18262 /* "pysam/libcbcf.pyx":697
18263 * info_id = bcf_header_get_info_id(hdr, bkey)
18264 *
18265 * if info_id < 0: # <<<<<<<<<<<<<<
18266 * raise KeyError('unknown INFO: {}'.format(key))
18267 *
18268 */
18269 __pyx_t_1 = (__pyx_v_info_id < 0);
18270 if (unlikely(__pyx_t_1)) {
18271
18272 /* "pysam/libcbcf.pyx":698
18273 *
18274 * if info_id < 0:
18275 * raise KeyError('unknown INFO: {}'.format(key)) # <<<<<<<<<<<<<<
18276 *
18277 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
18278 */
18279 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unknown_INFO, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error)
18280 __Pyx_GOTREF(__pyx_t_7);
18281 __pyx_t_8 = NULL;
18282 __pyx_t_9 = 0;
18283 #if CYTHON_UNPACK_METHODS
18284 if (likely(PyMethod_Check(__pyx_t_7))) {
18285 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
18286 if (likely(__pyx_t_8)) {
18287 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
18288 __Pyx_INCREF(__pyx_t_8);
18289 __Pyx_INCREF(function);
18290 __Pyx_DECREF_SET(__pyx_t_7, function);
18291 __pyx_t_9 = 1;
18292 }
18293 }
18294 #endif
18295 {
18296 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_key};
18297 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
18298 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18299 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
18300 __Pyx_GOTREF(__pyx_t_2);
18301 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18302 }
18303 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error)
18304 __Pyx_GOTREF(__pyx_t_7);
18305 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18306 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
18307 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18308 __PYX_ERR(0, 698, __pyx_L1_error)
18309
18310 /* "pysam/libcbcf.pyx":697
18311 * info_id = bcf_header_get_info_id(hdr, bkey)
18312 *
18313 * if info_id < 0: # <<<<<<<<<<<<<<
18314 * raise KeyError('unknown INFO: {}'.format(key))
18315 *
18316 */
18317 }
18318
18319 /* "pysam/libcbcf.pyx":700
18320 * raise KeyError('unknown INFO: {}'.format(key))
18321 *
18322 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
18323 * raise ValueError('Invalid header')
18324 *
18325 */
18326 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error)
18327 __pyx_t_10 = (!__pyx_t_1);
18328 if (unlikely(__pyx_t_10)) {
18329
18330 /* "pysam/libcbcf.pyx":701
18331 *
18332 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
18333 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
18334 *
18335 * info_type = bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id)
18336 */
18337 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
18338 __Pyx_GOTREF(__pyx_t_7);
18339 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
18340 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18341 __PYX_ERR(0, 701, __pyx_L1_error)
18342
18343 /* "pysam/libcbcf.pyx":700
18344 * raise KeyError('unknown INFO: {}'.format(key))
18345 *
18346 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
18347 * raise ValueError('Invalid header')
18348 *
18349 */
18350 }
18351
18352 /* "pysam/libcbcf.pyx":703
18353 * raise ValueError('Invalid header')
18354 *
18355 * info_type = bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) # <<<<<<<<<<<<<<
18356 * values = bcf_check_values(record, value, -1,
18357 * BCF_HL_INFO, info_type, info_id,
18358 */
18359 __pyx_v_info_type = bcf_hdr_id2type(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id);
18360
18361 /* "pysam/libcbcf.pyx":706
18362 * values = bcf_check_values(record, value, -1,
18363 * BCF_HL_INFO, info_type, info_id,
18364 * info.type if info else -1, # <<<<<<<<<<<<<<
18365 * info.len if info else -1,
18366 * &value_count, &scalar, &realloc)
18367 */
18368 __pyx_t_10 = (__pyx_v_info != 0);
18369 if (__pyx_t_10) {
18370 __pyx_t_6 = __pyx_v_info->type;
18371 } else {
18372 __pyx_t_6 = -1;
18373 }
18374
18375 /* "pysam/libcbcf.pyx":707
18376 * BCF_HL_INFO, info_type, info_id,
18377 * info.type if info else -1,
18378 * info.len if info else -1, # <<<<<<<<<<<<<<
18379 * &value_count, &scalar, &realloc)
18380 *
18381 */
18382 __pyx_t_10 = (__pyx_v_info != 0);
18383 if (__pyx_t_10) {
18384 __pyx_t_11 = __pyx_v_info->len;
18385 } else {
18386 __pyx_t_11 = -1L;
18387 }
18388
18389 /* "pysam/libcbcf.pyx":704
18390 *
18391 * info_type = bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id)
18392 * values = bcf_check_values(record, value, -1, # <<<<<<<<<<<<<<
18393 * BCF_HL_INFO, info_type, info_id,
18394 * info.type if info else -1,
18395 */
18396 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_check_values(__pyx_v_record, __pyx_v_value, -1, BCF_HL_INFO, __pyx_v_info_type, __pyx_v_info_id, __pyx_t_6, __pyx_t_11, (&__pyx_v_value_count), (&__pyx_v_scalar), (&__pyx_v_realloc)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 704, __pyx_L1_error)
18397 __Pyx_GOTREF(__pyx_t_7);
18398 __pyx_v_values = __pyx_t_7;
18399 __pyx_t_7 = 0;
18400
18401 /* "pysam/libcbcf.pyx":710
18402 * &value_count, &scalar, &realloc)
18403 *
18404 * if info_type == BCF_HT_FLAG: # <<<<<<<<<<<<<<
18405 * if bcf_update_info(hdr, r, bkey, NULL, bool(values[0]), info_type) < 0:
18406 * raise ValueError('Unable to update INFO values')
18407 */
18408 __pyx_t_10 = (__pyx_v_info_type == BCF_HT_FLAG);
18409 if (__pyx_t_10) {
18410
18411 /* "pysam/libcbcf.pyx":711
18412 *
18413 * if info_type == BCF_HT_FLAG:
18414 * if bcf_update_info(hdr, r, bkey, NULL, bool(values[0]), info_type) < 0: # <<<<<<<<<<<<<<
18415 * raise ValueError('Unable to update INFO values')
18416 * return
18417 */
18418 if (unlikely(__pyx_v_bkey == Py_None)) {
18419 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
18420 __PYX_ERR(0, 711, __pyx_L1_error)
18421 }
18422 __pyx_t_12 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
18423 __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 711, __pyx_L1_error)
18424 __Pyx_GOTREF(__pyx_t_7);
18425 __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 711, __pyx_L1_error)
18426 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18427 __pyx_t_1 = (bcf_update_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_12, NULL, (!(!__pyx_t_10)), __pyx_v_info_type) < 0);
18428 if (unlikely(__pyx_t_1)) {
18429
18430 /* "pysam/libcbcf.pyx":712
18431 * if info_type == BCF_HT_FLAG:
18432 * if bcf_update_info(hdr, r, bkey, NULL, bool(values[0]), info_type) < 0:
18433 * raise ValueError('Unable to update INFO values') # <<<<<<<<<<<<<<
18434 * return
18435 *
18436 */
18437 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error)
18438 __Pyx_GOTREF(__pyx_t_7);
18439 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
18440 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18441 __PYX_ERR(0, 712, __pyx_L1_error)
18442
18443 /* "pysam/libcbcf.pyx":711
18444 *
18445 * if info_type == BCF_HT_FLAG:
18446 * if bcf_update_info(hdr, r, bkey, NULL, bool(values[0]), info_type) < 0: # <<<<<<<<<<<<<<
18447 * raise ValueError('Unable to update INFO values')
18448 * return
18449 */
18450 }
18451
18452 /* "pysam/libcbcf.pyx":713
18453 * if bcf_update_info(hdr, r, bkey, NULL, bool(values[0]), info_type) < 0:
18454 * raise ValueError('Unable to update INFO values')
18455 * return # <<<<<<<<<<<<<<
18456 *
18457 * vlen = value_count < 0
18458 */
18459 __Pyx_XDECREF(__pyx_r);
18460 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18461 goto __pyx_L0;
18462
18463 /* "pysam/libcbcf.pyx":710
18464 * &value_count, &scalar, &realloc)
18465 *
18466 * if info_type == BCF_HT_FLAG: # <<<<<<<<<<<<<<
18467 * if bcf_update_info(hdr, r, bkey, NULL, bool(values[0]), info_type) < 0:
18468 * raise ValueError('Unable to update INFO values')
18469 */
18470 }
18471
18472 /* "pysam/libcbcf.pyx":715
18473 * return
18474 *
18475 * vlen = value_count < 0 # <<<<<<<<<<<<<<
18476 * value_count = len(values)
18477 *
18478 */
18479 __pyx_v_vlen = (__pyx_v_value_count < 0);
18480
18481 /* "pysam/libcbcf.pyx":716
18482 *
18483 * vlen = value_count < 0
18484 * value_count = len(values) # <<<<<<<<<<<<<<
18485 *
18486 * # DISABLED DUE TO ISSUES WITH THE CRAZY POINTERS
18487 */
18488 __pyx_t_13 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 716, __pyx_L1_error)
18489 __pyx_v_value_count = __pyx_t_13;
18490
18491 /* "pysam/libcbcf.pyx":745
18492 * return
18493 *
18494 * alloc_len = max(1, value_count) # <<<<<<<<<<<<<<
18495 * if info and info.len > alloc_len:
18496 * alloc_len = info.len
18497 */
18498 __pyx_t_11 = __pyx_v_value_count;
18499 __pyx_t_14 = 1;
18500 __pyx_t_1 = (__pyx_t_11 > __pyx_t_14);
18501 if (__pyx_t_1) {
18502 __pyx_t_15 = __pyx_t_11;
18503 } else {
18504 __pyx_t_15 = __pyx_t_14;
18505 }
18506 __pyx_v_alloc_len = __pyx_t_15;
18507
18508 /* "pysam/libcbcf.pyx":746
18509 *
18510 * alloc_len = max(1, value_count)
18511 * if info and info.len > alloc_len: # <<<<<<<<<<<<<<
18512 * alloc_len = info.len
18513 *
18514 */
18515 __pyx_t_10 = (__pyx_v_info != 0);
18516 if (__pyx_t_10) {
18517 } else {
18518 __pyx_t_1 = __pyx_t_10;
18519 goto __pyx_L11_bool_binop_done;
18520 }
18521 __pyx_t_10 = (__pyx_v_info->len > __pyx_v_alloc_len);
18522 __pyx_t_1 = __pyx_t_10;
18523 __pyx_L11_bool_binop_done:;
18524 if (__pyx_t_1) {
18525
18526 /* "pysam/libcbcf.pyx":747
18527 * alloc_len = max(1, value_count)
18528 * if info and info.len > alloc_len:
18529 * alloc_len = info.len # <<<<<<<<<<<<<<
18530 *
18531 * new_values = bcf_empty_array(info_type, alloc_len, vlen)
18532 */
18533 __pyx_t_6 = __pyx_v_info->len;
18534 __pyx_v_alloc_len = __pyx_t_6;
18535
18536 /* "pysam/libcbcf.pyx":746
18537 *
18538 * alloc_len = max(1, value_count)
18539 * if info and info.len > alloc_len: # <<<<<<<<<<<<<<
18540 * alloc_len = info.len
18541 *
18542 */
18543 }
18544
18545 /* "pysam/libcbcf.pyx":749
18546 * alloc_len = info.len
18547 *
18548 * new_values = bcf_empty_array(info_type, alloc_len, vlen) # <<<<<<<<<<<<<<
18549 * cdef char *valp = <char *>new_values
18550 *
18551 */
18552 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_empty_array(__pyx_v_info_type, __pyx_v_alloc_len, __pyx_v_vlen); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 749, __pyx_L1_error)
18553 __Pyx_GOTREF(__pyx_t_7);
18554 __pyx_v_new_values = __pyx_t_7;
18555 __pyx_t_7 = 0;
18556
18557 /* "pysam/libcbcf.pyx":750
18558 *
18559 * new_values = bcf_empty_array(info_type, alloc_len, vlen)
18560 * cdef char *valp = <char *>new_values # <<<<<<<<<<<<<<
18561 *
18562 * if info_type == BCF_HT_INT:
18563 */
18564 __pyx_t_16 = __Pyx_PyObject_AsWritableString(__pyx_v_new_values); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error)
18565 __pyx_v_valp = ((char *)__pyx_t_16);
18566
18567 /* "pysam/libcbcf.pyx":752
18568 * cdef char *valp = <char *>new_values
18569 *
18570 * if info_type == BCF_HT_INT: # <<<<<<<<<<<<<<
18571 * dst_type = BCF_BT_INT32
18572 * elif info_type == BCF_HT_REAL:
18573 */
18574 __pyx_t_1 = (__pyx_v_info_type == BCF_HT_INT);
18575 if (__pyx_t_1) {
18576
18577 /* "pysam/libcbcf.pyx":753
18578 *
18579 * if info_type == BCF_HT_INT:
18580 * dst_type = BCF_BT_INT32 # <<<<<<<<<<<<<<
18581 * elif info_type == BCF_HT_REAL:
18582 * dst_type = BCF_BT_FLOAT
18583 */
18584 __pyx_v_dst_type = BCF_BT_INT32;
18585
18586 /* "pysam/libcbcf.pyx":752
18587 * cdef char *valp = <char *>new_values
18588 *
18589 * if info_type == BCF_HT_INT: # <<<<<<<<<<<<<<
18590 * dst_type = BCF_BT_INT32
18591 * elif info_type == BCF_HT_REAL:
18592 */
18593 goto __pyx_L13;
18594 }
18595
18596 /* "pysam/libcbcf.pyx":754
18597 * if info_type == BCF_HT_INT:
18598 * dst_type = BCF_BT_INT32
18599 * elif info_type == BCF_HT_REAL: # <<<<<<<<<<<<<<
18600 * dst_type = BCF_BT_FLOAT
18601 * elif info_type == BCF_HT_STR:
18602 */
18603 __pyx_t_1 = (__pyx_v_info_type == BCF_HT_REAL);
18604 if (__pyx_t_1) {
18605
18606 /* "pysam/libcbcf.pyx":755
18607 * dst_type = BCF_BT_INT32
18608 * elif info_type == BCF_HT_REAL:
18609 * dst_type = BCF_BT_FLOAT # <<<<<<<<<<<<<<
18610 * elif info_type == BCF_HT_STR:
18611 * dst_type = BCF_BT_CHAR
18612 */
18613 __pyx_v_dst_type = BCF_BT_FLOAT;
18614
18615 /* "pysam/libcbcf.pyx":754
18616 * if info_type == BCF_HT_INT:
18617 * dst_type = BCF_BT_INT32
18618 * elif info_type == BCF_HT_REAL: # <<<<<<<<<<<<<<
18619 * dst_type = BCF_BT_FLOAT
18620 * elif info_type == BCF_HT_STR:
18621 */
18622 goto __pyx_L13;
18623 }
18624
18625 /* "pysam/libcbcf.pyx":756
18626 * elif info_type == BCF_HT_REAL:
18627 * dst_type = BCF_BT_FLOAT
18628 * elif info_type == BCF_HT_STR: # <<<<<<<<<<<<<<
18629 * dst_type = BCF_BT_CHAR
18630 * else:
18631 */
18632 __pyx_t_1 = (__pyx_v_info_type == BCF_HT_STR);
18633 if (likely(__pyx_t_1)) {
18634
18635 /* "pysam/libcbcf.pyx":757
18636 * dst_type = BCF_BT_FLOAT
18637 * elif info_type == BCF_HT_STR:
18638 * dst_type = BCF_BT_CHAR # <<<<<<<<<<<<<<
18639 * else:
18640 * raise ValueError('Unsupported INFO type')
18641 */
18642 __pyx_v_dst_type = BCF_BT_CHAR;
18643
18644 /* "pysam/libcbcf.pyx":756
18645 * elif info_type == BCF_HT_REAL:
18646 * dst_type = BCF_BT_FLOAT
18647 * elif info_type == BCF_HT_STR: # <<<<<<<<<<<<<<
18648 * dst_type = BCF_BT_CHAR
18649 * else:
18650 */
18651 goto __pyx_L13;
18652 }
18653
18654 /* "pysam/libcbcf.pyx":759
18655 * dst_type = BCF_BT_CHAR
18656 * else:
18657 * raise ValueError('Unsupported INFO type') # <<<<<<<<<<<<<<
18658 *
18659 * bcf_object_to_array(values, valp, dst_type, alloc_len, vlen)
18660 */
18661 /*else*/ {
18662 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 759, __pyx_L1_error)
18663 __Pyx_GOTREF(__pyx_t_7);
18664 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
18665 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18666 __PYX_ERR(0, 759, __pyx_L1_error)
18667 }
18668 __pyx_L13:;
18669
18670 /* "pysam/libcbcf.pyx":761
18671 * raise ValueError('Unsupported INFO type')
18672 *
18673 * bcf_object_to_array(values, valp, dst_type, alloc_len, vlen) # <<<<<<<<<<<<<<
18674 *
18675 * if bcf_update_info(hdr, r, bkey, valp, <int>alloc_len, info_type) < 0:
18676 */
18677 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_object_to_array(__pyx_v_values, __pyx_v_valp, __pyx_v_dst_type, __pyx_v_alloc_len, __pyx_v_vlen); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 761, __pyx_L1_error)
18678 __Pyx_GOTREF(__pyx_t_7);
18679 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18680
18681 /* "pysam/libcbcf.pyx":763
18682 * bcf_object_to_array(values, valp, dst_type, alloc_len, vlen)
18683 *
18684 * if bcf_update_info(hdr, r, bkey, valp, <int>alloc_len, info_type) < 0: # <<<<<<<<<<<<<<
18685 * raise ValueError('Unable to update INFO values')
18686 *
18687 */
18688 if (unlikely(__pyx_v_bkey == Py_None)) {
18689 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
18690 __PYX_ERR(0, 763, __pyx_L1_error)
18691 }
18692 __pyx_t_12 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L1_error)
18693 __pyx_t_1 = (bcf_update_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_12, __pyx_v_valp, ((int)__pyx_v_alloc_len), __pyx_v_info_type) < 0);
18694 if (unlikely(__pyx_t_1)) {
18695
18696 /* "pysam/libcbcf.pyx":764
18697 *
18698 * if bcf_update_info(hdr, r, bkey, valp, <int>alloc_len, info_type) < 0:
18699 * raise ValueError('Unable to update INFO values') # <<<<<<<<<<<<<<
18700 *
18701 *
18702 */
18703 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 764, __pyx_L1_error)
18704 __Pyx_GOTREF(__pyx_t_7);
18705 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
18706 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18707 __PYX_ERR(0, 764, __pyx_L1_error)
18708
18709 /* "pysam/libcbcf.pyx":763
18710 * bcf_object_to_array(values, valp, dst_type, alloc_len, vlen)
18711 *
18712 * if bcf_update_info(hdr, r, bkey, valp, <int>alloc_len, info_type) < 0: # <<<<<<<<<<<<<<
18713 * raise ValueError('Unable to update INFO values')
18714 *
18715 */
18716 }
18717
18718 /* "pysam/libcbcf.pyx":677
18719 *
18720 *
18721 * cdef bcf_info_set_value(VariantRecord record, key, value): # <<<<<<<<<<<<<<
18722 * if record is None:
18723 * raise ValueError('record must not be None')
18724 */
18725
18726 /* function exit code */
18727 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18728 goto __pyx_L0;
18729 __pyx_L1_error:;
18730 __Pyx_XDECREF(__pyx_t_2);
18731 __Pyx_XDECREF(__pyx_t_7);
18732 __Pyx_XDECREF(__pyx_t_8);
18733 __Pyx_AddTraceback("pysam.libcbcf.bcf_info_set_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
18734 __pyx_r = 0;
18735 __pyx_L0:;
18736 __Pyx_XDECREF(__pyx_v_bkey);
18737 __Pyx_XDECREF(__pyx_v_values);
18738 __Pyx_XDECREF(__pyx_v_new_values);
18739 __Pyx_XGIVEREF(__pyx_r);
18740 __Pyx_TraceReturn(__pyx_r, 0);
18741 __Pyx_RefNannyFinishContext();
18742 return __pyx_r;
18743 }
18744
18745 /* "pysam/libcbcf.pyx":767
18746 *
18747 *
18748 * cdef bcf_info_del_value(VariantRecord record, key): # <<<<<<<<<<<<<<
18749 * if record is None:
18750 * raise ValueError('record must not be None')
18751 */
18752
18753 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_info_del_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, PyObject *__pyx_v_key) {
18754 bcf_hdr_t *__pyx_v_hdr;
18755 bcf1_t *__pyx_v_r;
18756 Py_ssize_t __pyx_v_value_count;
18757 int __pyx_v_scalar;
18758 PyObject *__pyx_v_bkey = 0;
18759 bcf_info_t *__pyx_v_info;
18760 PyObject *__pyx_v_null_value = NULL;
18761 PyObject *__pyx_r = NULL;
18762 __Pyx_TraceDeclarations
18763 __Pyx_RefNannyDeclarations
18764 int __pyx_t_1;
18765 PyObject *__pyx_t_2 = NULL;
18766 bcf_hdr_t *__pyx_t_3;
18767 bcf1_t *__pyx_t_4;
18768 char const *__pyx_t_5;
18769 int __pyx_lineno = 0;
18770 const char *__pyx_filename = NULL;
18771 int __pyx_clineno = 0;
18772 __Pyx_RefNannySetupContext("bcf_info_del_value", 1);
18773 __Pyx_TraceCall("bcf_info_del_value", __pyx_f[0], 767, 0, __PYX_ERR(0, 767, __pyx_L1_error));
18774
18775 /* "pysam/libcbcf.pyx":768
18776 *
18777 * cdef bcf_info_del_value(VariantRecord record, key):
18778 * if record is None: # <<<<<<<<<<<<<<
18779 * raise ValueError('record must not be None')
18780 *
18781 */
18782 __pyx_t_1 = (((PyObject *)__pyx_v_record) == Py_None);
18783 if (unlikely(__pyx_t_1)) {
18784
18785 /* "pysam/libcbcf.pyx":769
18786 * cdef bcf_info_del_value(VariantRecord record, key):
18787 * if record is None:
18788 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
18789 *
18790 * cdef bcf_hdr_t *hdr = record.header.ptr
18791 */
18792 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error)
18793 __Pyx_GOTREF(__pyx_t_2);
18794 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18795 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18796 __PYX_ERR(0, 769, __pyx_L1_error)
18797
18798 /* "pysam/libcbcf.pyx":768
18799 *
18800 * cdef bcf_info_del_value(VariantRecord record, key):
18801 * if record is None: # <<<<<<<<<<<<<<
18802 * raise ValueError('record must not be None')
18803 *
18804 */
18805 }
18806
18807 /* "pysam/libcbcf.pyx":771
18808 * raise ValueError('record must not be None')
18809 *
18810 * cdef bcf_hdr_t *hdr = record.header.ptr # <<<<<<<<<<<<<<
18811 * cdef bcf1_t *r = record.ptr
18812 * cdef ssize_t value_count
18813 */
18814 __pyx_t_3 = __pyx_v_record->header->ptr;
18815 __pyx_v_hdr = __pyx_t_3;
18816
18817 /* "pysam/libcbcf.pyx":772
18818 *
18819 * cdef bcf_hdr_t *hdr = record.header.ptr
18820 * cdef bcf1_t *r = record.ptr # <<<<<<<<<<<<<<
18821 * cdef ssize_t value_count
18822 * cdef int scalar
18823 */
18824 __pyx_t_4 = __pyx_v_record->ptr;
18825 __pyx_v_r = __pyx_t_4;
18826
18827 /* "pysam/libcbcf.pyx":776
18828 * cdef int scalar
18829 *
18830 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
18831 * raise ValueError('Error unpacking VariantRecord')
18832 *
18833 */
18834 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
18835 if (unlikely(__pyx_t_1)) {
18836
18837 /* "pysam/libcbcf.pyx":777
18838 *
18839 * if bcf_unpack(r, BCF_UN_INFO) < 0:
18840 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
18841 *
18842 * cdef bytes bkey = force_bytes(key)
18843 */
18844 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
18845 __Pyx_GOTREF(__pyx_t_2);
18846 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18847 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18848 __PYX_ERR(0, 777, __pyx_L1_error)
18849
18850 /* "pysam/libcbcf.pyx":776
18851 * cdef int scalar
18852 *
18853 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
18854 * raise ValueError('Error unpacking VariantRecord')
18855 *
18856 */
18857 }
18858
18859 /* "pysam/libcbcf.pyx":779
18860 * raise ValueError('Error unpacking VariantRecord')
18861 *
18862 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
18863 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
18864 *
18865 */
18866 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)
18867 __Pyx_GOTREF(__pyx_t_2);
18868 __pyx_v_bkey = ((PyObject*)__pyx_t_2);
18869 __pyx_t_2 = 0;
18870
18871 /* "pysam/libcbcf.pyx":780
18872 *
18873 * cdef bytes bkey = force_bytes(key)
18874 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey) # <<<<<<<<<<<<<<
18875 *
18876 * if not info:
18877 */
18878 if (unlikely(__pyx_v_bkey == Py_None)) {
18879 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
18880 __PYX_ERR(0, 780, __pyx_L1_error)
18881 }
18882 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L1_error)
18883 __pyx_v_info = bcf_get_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_5);
18884
18885 /* "pysam/libcbcf.pyx":782
18886 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
18887 *
18888 * if not info: # <<<<<<<<<<<<<<
18889 * raise KeyError(key)
18890 *
18891 */
18892 __pyx_t_1 = (!(__pyx_v_info != 0));
18893 if (unlikely(__pyx_t_1)) {
18894
18895 /* "pysam/libcbcf.pyx":783
18896 *
18897 * if not info:
18898 * raise KeyError(key) # <<<<<<<<<<<<<<
18899 *
18900 * bcf_get_value_count(record, BCF_HL_INFO, info.key, &value_count, &scalar, -1)
18901 */
18902 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
18903 __Pyx_GOTREF(__pyx_t_2);
18904 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18905 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18906 __PYX_ERR(0, 783, __pyx_L1_error)
18907
18908 /* "pysam/libcbcf.pyx":782
18909 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
18910 *
18911 * if not info: # <<<<<<<<<<<<<<
18912 * raise KeyError(key)
18913 *
18914 */
18915 }
18916
18917 /* "pysam/libcbcf.pyx":785
18918 * raise KeyError(key)
18919 *
18920 * bcf_get_value_count(record, BCF_HL_INFO, info.key, &value_count, &scalar, -1) # <<<<<<<<<<<<<<
18921 *
18922 * if value_count <= 0:
18923 */
18924 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_get_value_count(__pyx_v_record, BCF_HL_INFO, __pyx_v_info->key, (&__pyx_v_value_count), (&__pyx_v_scalar), -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
18925 __Pyx_GOTREF(__pyx_t_2);
18926 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18927
18928 /* "pysam/libcbcf.pyx":787
18929 * bcf_get_value_count(record, BCF_HL_INFO, info.key, &value_count, &scalar, -1)
18930 *
18931 * if value_count <= 0: # <<<<<<<<<<<<<<
18932 * null_value = ()
18933 * elif scalar:
18934 */
18935 __pyx_t_1 = (__pyx_v_value_count <= 0);
18936 if (__pyx_t_1) {
18937
18938 /* "pysam/libcbcf.pyx":788
18939 *
18940 * if value_count <= 0:
18941 * null_value = () # <<<<<<<<<<<<<<
18942 * elif scalar:
18943 * null_value = None
18944 */
18945 __Pyx_INCREF(__pyx_empty_tuple);
18946 __pyx_v_null_value = __pyx_empty_tuple;
18947
18948 /* "pysam/libcbcf.pyx":787
18949 * bcf_get_value_count(record, BCF_HL_INFO, info.key, &value_count, &scalar, -1)
18950 *
18951 * if value_count <= 0: # <<<<<<<<<<<<<<
18952 * null_value = ()
18953 * elif scalar:
18954 */
18955 goto __pyx_L6;
18956 }
18957
18958 /* "pysam/libcbcf.pyx":789
18959 * if value_count <= 0:
18960 * null_value = ()
18961 * elif scalar: # <<<<<<<<<<<<<<
18962 * null_value = None
18963 * else:
18964 */
18965 __pyx_t_1 = (__pyx_v_scalar != 0);
18966 if (__pyx_t_1) {
18967
18968 /* "pysam/libcbcf.pyx":790
18969 * null_value = ()
18970 * elif scalar:
18971 * null_value = None # <<<<<<<<<<<<<<
18972 * else:
18973 * null_value = (None,)*value_count
18974 */
18975 __Pyx_INCREF(Py_None);
18976 __pyx_v_null_value = ((PyObject*)Py_None);
18977
18978 /* "pysam/libcbcf.pyx":789
18979 * if value_count <= 0:
18980 * null_value = ()
18981 * elif scalar: # <<<<<<<<<<<<<<
18982 * null_value = None
18983 * else:
18984 */
18985 goto __pyx_L6;
18986 }
18987
18988 /* "pysam/libcbcf.pyx":792
18989 * null_value = None
18990 * else:
18991 * null_value = (None,)*value_count # <<<<<<<<<<<<<<
18992 *
18993 * bcf_info_set_value(record, bkey, null_value)
18994 */
18995 /*else*/ {
18996 __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_value_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
18997 __Pyx_GOTREF(__pyx_t_2);
18998 __pyx_v_null_value = ((PyObject*)__pyx_t_2);
18999 __pyx_t_2 = 0;
19000 }
19001 __pyx_L6:;
19002
19003 /* "pysam/libcbcf.pyx":794
19004 * null_value = (None,)*value_count
19005 *
19006 * bcf_info_set_value(record, bkey, null_value) # <<<<<<<<<<<<<<
19007 *
19008 *
19009 */
19010 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_info_set_value(__pyx_v_record, __pyx_v_bkey, __pyx_v_null_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
19011 __Pyx_GOTREF(__pyx_t_2);
19012 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19013
19014 /* "pysam/libcbcf.pyx":767
19015 *
19016 *
19017 * cdef bcf_info_del_value(VariantRecord record, key): # <<<<<<<<<<<<<<
19018 * if record is None:
19019 * raise ValueError('record must not be None')
19020 */
19021
19022 /* function exit code */
19023 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19024 goto __pyx_L0;
19025 __pyx_L1_error:;
19026 __Pyx_XDECREF(__pyx_t_2);
19027 __Pyx_AddTraceback("pysam.libcbcf.bcf_info_del_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
19028 __pyx_r = 0;
19029 __pyx_L0:;
19030 __Pyx_XDECREF(__pyx_v_bkey);
19031 __Pyx_XDECREF(__pyx_v_null_value);
19032 __Pyx_XGIVEREF(__pyx_r);
19033 __Pyx_TraceReturn(__pyx_r, 0);
19034 __Pyx_RefNannyFinishContext();
19035 return __pyx_r;
19036 }
19037
19038 /* "pysam/libcbcf.pyx":797
19039 *
19040 *
19041 * cdef bcf_format_get_value(VariantRecordSample sample, key): # <<<<<<<<<<<<<<
19042 * if sample is None:
19043 * raise ValueError('sample must not be None')
19044 */
19045
19046 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_get_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_sample, PyObject *__pyx_v_key) {
19047 bcf_hdr_t *__pyx_v_hdr;
19048 bcf1_t *__pyx_v_r;
19049 Py_ssize_t __pyx_v_count;
19050 int __pyx_v_scalar;
19051 PyObject *__pyx_v_bkey = 0;
19052 bcf_fmt_t *__pyx_v_fmt;
19053 PyObject *__pyx_r = NULL;
19054 __Pyx_TraceDeclarations
19055 __Pyx_RefNannyDeclarations
19056 int __pyx_t_1;
19057 PyObject *__pyx_t_2 = NULL;
19058 bcf_hdr_t *__pyx_t_3;
19059 bcf1_t *__pyx_t_4;
19060 char const *__pyx_t_5;
19061 int __pyx_t_6;
19062 PyObject *__pyx_t_7 = NULL;
19063 PyObject *__pyx_t_8 = NULL;
19064 unsigned int __pyx_t_9;
19065 int __pyx_t_10;
19066 int __pyx_lineno = 0;
19067 const char *__pyx_filename = NULL;
19068 int __pyx_clineno = 0;
19069 __Pyx_RefNannySetupContext("bcf_format_get_value", 1);
19070 __Pyx_TraceCall("bcf_format_get_value", __pyx_f[0], 797, 0, __PYX_ERR(0, 797, __pyx_L1_error));
19071
19072 /* "pysam/libcbcf.pyx":798
19073 *
19074 * cdef bcf_format_get_value(VariantRecordSample sample, key):
19075 * if sample is None: # <<<<<<<<<<<<<<
19076 * raise ValueError('sample must not be None')
19077 *
19078 */
19079 __pyx_t_1 = (((PyObject *)__pyx_v_sample) == Py_None);
19080 if (unlikely(__pyx_t_1)) {
19081
19082 /* "pysam/libcbcf.pyx":799
19083 * cdef bcf_format_get_value(VariantRecordSample sample, key):
19084 * if sample is None:
19085 * raise ValueError('sample must not be None') # <<<<<<<<<<<<<<
19086 *
19087 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
19088 */
19089 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
19090 __Pyx_GOTREF(__pyx_t_2);
19091 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
19092 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19093 __PYX_ERR(0, 799, __pyx_L1_error)
19094
19095 /* "pysam/libcbcf.pyx":798
19096 *
19097 * cdef bcf_format_get_value(VariantRecordSample sample, key):
19098 * if sample is None: # <<<<<<<<<<<<<<
19099 * raise ValueError('sample must not be None')
19100 *
19101 */
19102 }
19103
19104 /* "pysam/libcbcf.pyx":801
19105 * raise ValueError('sample must not be None')
19106 *
19107 * cdef bcf_hdr_t *hdr = sample.record.header.ptr # <<<<<<<<<<<<<<
19108 * cdef bcf1_t *r = sample.record.ptr
19109 * cdef ssize_t count
19110 */
19111 __pyx_t_3 = __pyx_v_sample->record->header->ptr;
19112 __pyx_v_hdr = __pyx_t_3;
19113
19114 /* "pysam/libcbcf.pyx":802
19115 *
19116 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
19117 * cdef bcf1_t *r = sample.record.ptr # <<<<<<<<<<<<<<
19118 * cdef ssize_t count
19119 * cdef int scalar
19120 */
19121 __pyx_t_4 = __pyx_v_sample->record->ptr;
19122 __pyx_v_r = __pyx_t_4;
19123
19124 /* "pysam/libcbcf.pyx":806
19125 * cdef int scalar
19126 *
19127 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
19128 * raise ValueError('Error unpacking VariantRecord')
19129 *
19130 */
19131 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_ALL) < 0);
19132 if (unlikely(__pyx_t_1)) {
19133
19134 /* "pysam/libcbcf.pyx":807
19135 *
19136 * if bcf_unpack(r, BCF_UN_ALL) < 0:
19137 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
19138 *
19139 * cdef bytes bkey = force_bytes(key)
19140 */
19141 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
19142 __Pyx_GOTREF(__pyx_t_2);
19143 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
19144 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19145 __PYX_ERR(0, 807, __pyx_L1_error)
19146
19147 /* "pysam/libcbcf.pyx":806
19148 * cdef int scalar
19149 *
19150 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
19151 * raise ValueError('Error unpacking VariantRecord')
19152 *
19153 */
19154 }
19155
19156 /* "pysam/libcbcf.pyx":809
19157 * raise ValueError('Error unpacking VariantRecord')
19158 *
19159 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
19160 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
19161 *
19162 */
19163 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 809, __pyx_L1_error)
19164 __Pyx_GOTREF(__pyx_t_2);
19165 __pyx_v_bkey = ((PyObject*)__pyx_t_2);
19166 __pyx_t_2 = 0;
19167
19168 /* "pysam/libcbcf.pyx":810
19169 *
19170 * cdef bytes bkey = force_bytes(key)
19171 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey) # <<<<<<<<<<<<<<
19172 *
19173 * if not fmt or not fmt.p:
19174 */
19175 if (unlikely(__pyx_v_bkey == Py_None)) {
19176 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
19177 __PYX_ERR(0, 810, __pyx_L1_error)
19178 }
19179 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error)
19180 __pyx_v_fmt = bcf_get_fmt(__pyx_v_hdr, __pyx_v_r, __pyx_t_5);
19181
19182 /* "pysam/libcbcf.pyx":812
19183 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
19184 *
19185 * if not fmt or not fmt.p: # <<<<<<<<<<<<<<
19186 * raise KeyError('invalid FORMAT: {}'.format(key))
19187 *
19188 */
19189 __pyx_t_6 = (!(__pyx_v_fmt != 0));
19190 if (!__pyx_t_6) {
19191 } else {
19192 __pyx_t_1 = __pyx_t_6;
19193 goto __pyx_L6_bool_binop_done;
19194 }
19195 __pyx_t_6 = (!(__pyx_v_fmt->p != 0));
19196 __pyx_t_1 = __pyx_t_6;
19197 __pyx_L6_bool_binop_done:;
19198 if (unlikely(__pyx_t_1)) {
19199
19200 /* "pysam/libcbcf.pyx":813
19201 *
19202 * if not fmt or not fmt.p:
19203 * raise KeyError('invalid FORMAT: {}'.format(key)) # <<<<<<<<<<<<<<
19204 *
19205 * if is_gt_fmt(hdr, fmt.id):
19206 */
19207 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_FORMAT, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 813, __pyx_L1_error)
19208 __Pyx_GOTREF(__pyx_t_7);
19209 __pyx_t_8 = NULL;
19210 __pyx_t_9 = 0;
19211 #if CYTHON_UNPACK_METHODS
19212 if (likely(PyMethod_Check(__pyx_t_7))) {
19213 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
19214 if (likely(__pyx_t_8)) {
19215 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19216 __Pyx_INCREF(__pyx_t_8);
19217 __Pyx_INCREF(function);
19218 __Pyx_DECREF_SET(__pyx_t_7, function);
19219 __pyx_t_9 = 1;
19220 }
19221 }
19222 #endif
19223 {
19224 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_key};
19225 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
19226 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
19227 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error)
19228 __Pyx_GOTREF(__pyx_t_2);
19229 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19230 }
19231 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 813, __pyx_L1_error)
19232 __Pyx_GOTREF(__pyx_t_7);
19233 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19234 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
19235 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19236 __PYX_ERR(0, 813, __pyx_L1_error)
19237
19238 /* "pysam/libcbcf.pyx":812
19239 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
19240 *
19241 * if not fmt or not fmt.p: # <<<<<<<<<<<<<<
19242 * raise KeyError('invalid FORMAT: {}'.format(key))
19243 *
19244 */
19245 }
19246
19247 /* "pysam/libcbcf.pyx":815
19248 * raise KeyError('invalid FORMAT: {}'.format(key))
19249 *
19250 * if is_gt_fmt(hdr, fmt.id): # <<<<<<<<<<<<<<
19251 * return bcf_format_get_allele_indices(sample)
19252 *
19253 */
19254 __pyx_t_10 = __pyx_f_5pysam_7libcbcf_is_gt_fmt(__pyx_v_hdr, __pyx_v_fmt->id); if (unlikely(__pyx_t_10 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 815, __pyx_L1_error)
19255 __pyx_t_1 = (__pyx_t_10 != 0);
19256 if (__pyx_t_1) {
19257
19258 /* "pysam/libcbcf.pyx":816
19259 *
19260 * if is_gt_fmt(hdr, fmt.id):
19261 * return bcf_format_get_allele_indices(sample) # <<<<<<<<<<<<<<
19262 *
19263 * bcf_get_value_count(sample.record, BCF_HL_FMT, fmt.id, &count, &scalar, sample.index)
19264 */
19265 __Pyx_XDECREF(__pyx_r);
19266 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_format_get_allele_indices(__pyx_v_sample); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 816, __pyx_L1_error)
19267 __Pyx_GOTREF(__pyx_t_7);
19268 __pyx_r = __pyx_t_7;
19269 __pyx_t_7 = 0;
19270 goto __pyx_L0;
19271
19272 /* "pysam/libcbcf.pyx":815
19273 * raise KeyError('invalid FORMAT: {}'.format(key))
19274 *
19275 * if is_gt_fmt(hdr, fmt.id): # <<<<<<<<<<<<<<
19276 * return bcf_format_get_allele_indices(sample)
19277 *
19278 */
19279 }
19280
19281 /* "pysam/libcbcf.pyx":818
19282 * return bcf_format_get_allele_indices(sample)
19283 *
19284 * bcf_get_value_count(sample.record, BCF_HL_FMT, fmt.id, &count, &scalar, sample.index) # <<<<<<<<<<<<<<
19285 *
19286 * if fmt.p and fmt.n and fmt.size:
19287 */
19288 __pyx_t_7 = ((PyObject *)__pyx_v_sample->record);
19289 __Pyx_INCREF(__pyx_t_7);
19290 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_get_value_count(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_7), BCF_HL_FMT, __pyx_v_fmt->id, (&__pyx_v_count), (&__pyx_v_scalar), __pyx_v_sample->index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
19291 __Pyx_GOTREF(__pyx_t_2);
19292 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19293 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19294
19295 /* "pysam/libcbcf.pyx":820
19296 * bcf_get_value_count(sample.record, BCF_HL_FMT, fmt.id, &count, &scalar, sample.index)
19297 *
19298 * if fmt.p and fmt.n and fmt.size: # <<<<<<<<<<<<<<
19299 * return bcf_array_to_object(fmt.p + sample.index * fmt.size, fmt.type, fmt.n, count, scalar)
19300 * elif scalar:
19301 */
19302 __pyx_t_6 = (__pyx_v_fmt->p != 0);
19303 if (__pyx_t_6) {
19304 } else {
19305 __pyx_t_1 = __pyx_t_6;
19306 goto __pyx_L10_bool_binop_done;
19307 }
19308 __pyx_t_6 = (__pyx_v_fmt->n != 0);
19309 if (__pyx_t_6) {
19310 } else {
19311 __pyx_t_1 = __pyx_t_6;
19312 goto __pyx_L10_bool_binop_done;
19313 }
19314 __pyx_t_6 = (__pyx_v_fmt->size != 0);
19315 __pyx_t_1 = __pyx_t_6;
19316 __pyx_L10_bool_binop_done:;
19317 if (__pyx_t_1) {
19318
19319 /* "pysam/libcbcf.pyx":821
19320 *
19321 * if fmt.p and fmt.n and fmt.size:
19322 * return bcf_array_to_object(fmt.p + sample.index * fmt.size, fmt.type, fmt.n, count, scalar) # <<<<<<<<<<<<<<
19323 * elif scalar:
19324 * return None
19325 */
19326 __Pyx_XDECREF(__pyx_r);
19327 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_array_to_object((__pyx_v_fmt->p + (__pyx_v_sample->index * __pyx_v_fmt->size)), __pyx_v_fmt->type, __pyx_v_fmt->n, __pyx_v_count, __pyx_v_scalar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
19328 __Pyx_GOTREF(__pyx_t_2);
19329 __pyx_r = __pyx_t_2;
19330 __pyx_t_2 = 0;
19331 goto __pyx_L0;
19332
19333 /* "pysam/libcbcf.pyx":820
19334 * bcf_get_value_count(sample.record, BCF_HL_FMT, fmt.id, &count, &scalar, sample.index)
19335 *
19336 * if fmt.p and fmt.n and fmt.size: # <<<<<<<<<<<<<<
19337 * return bcf_array_to_object(fmt.p + sample.index * fmt.size, fmt.type, fmt.n, count, scalar)
19338 * elif scalar:
19339 */
19340 }
19341
19342 /* "pysam/libcbcf.pyx":822
19343 * if fmt.p and fmt.n and fmt.size:
19344 * return bcf_array_to_object(fmt.p + sample.index * fmt.size, fmt.type, fmt.n, count, scalar)
19345 * elif scalar: # <<<<<<<<<<<<<<
19346 * return None
19347 * elif count <= 0:
19348 */
19349 __pyx_t_1 = (__pyx_v_scalar != 0);
19350 if (__pyx_t_1) {
19351
19352 /* "pysam/libcbcf.pyx":823
19353 * return bcf_array_to_object(fmt.p + sample.index * fmt.size, fmt.type, fmt.n, count, scalar)
19354 * elif scalar:
19355 * return None # <<<<<<<<<<<<<<
19356 * elif count <= 0:
19357 * return ()
19358 */
19359 __Pyx_XDECREF(__pyx_r);
19360 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19361 goto __pyx_L0;
19362
19363 /* "pysam/libcbcf.pyx":822
19364 * if fmt.p and fmt.n and fmt.size:
19365 * return bcf_array_to_object(fmt.p + sample.index * fmt.size, fmt.type, fmt.n, count, scalar)
19366 * elif scalar: # <<<<<<<<<<<<<<
19367 * return None
19368 * elif count <= 0:
19369 */
19370 }
19371
19372 /* "pysam/libcbcf.pyx":824
19373 * elif scalar:
19374 * return None
19375 * elif count <= 0: # <<<<<<<<<<<<<<
19376 * return ()
19377 * else:
19378 */
19379 __pyx_t_1 = (__pyx_v_count <= 0);
19380 if (__pyx_t_1) {
19381
19382 /* "pysam/libcbcf.pyx":825
19383 * return None
19384 * elif count <= 0:
19385 * return () # <<<<<<<<<<<<<<
19386 * else:
19387 * return (None,)*count
19388 */
19389 __Pyx_XDECREF(__pyx_r);
19390 __Pyx_INCREF(__pyx_empty_tuple);
19391 __pyx_r = __pyx_empty_tuple;
19392 goto __pyx_L0;
19393
19394 /* "pysam/libcbcf.pyx":824
19395 * elif scalar:
19396 * return None
19397 * elif count <= 0: # <<<<<<<<<<<<<<
19398 * return ()
19399 * else:
19400 */
19401 }
19402
19403 /* "pysam/libcbcf.pyx":827
19404 * return ()
19405 * else:
19406 * return (None,)*count # <<<<<<<<<<<<<<
19407 *
19408 *
19409 */
19410 /*else*/ {
19411 __Pyx_XDECREF(__pyx_r);
19412 __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
19413 __Pyx_GOTREF(__pyx_t_2);
19414 __pyx_r = __pyx_t_2;
19415 __pyx_t_2 = 0;
19416 goto __pyx_L0;
19417 }
19418
19419 /* "pysam/libcbcf.pyx":797
19420 *
19421 *
19422 * cdef bcf_format_get_value(VariantRecordSample sample, key): # <<<<<<<<<<<<<<
19423 * if sample is None:
19424 * raise ValueError('sample must not be None')
19425 */
19426
19427 /* function exit code */
19428 __pyx_L1_error:;
19429 __Pyx_XDECREF(__pyx_t_2);
19430 __Pyx_XDECREF(__pyx_t_7);
19431 __Pyx_XDECREF(__pyx_t_8);
19432 __Pyx_AddTraceback("pysam.libcbcf.bcf_format_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
19433 __pyx_r = 0;
19434 __pyx_L0:;
19435 __Pyx_XDECREF(__pyx_v_bkey);
19436 __Pyx_XGIVEREF(__pyx_r);
19437 __Pyx_TraceReturn(__pyx_r, 0);
19438 __Pyx_RefNannyFinishContext();
19439 return __pyx_r;
19440 }
19441
19442 /* "pysam/libcbcf.pyx":830
19443 *
19444 *
19445 * cdef bcf_format_set_value(VariantRecordSample sample, key, value): # <<<<<<<<<<<<<<
19446 * if sample is None:
19447 * raise ValueError('sample must not be None')
19448 */
19449
19450 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_set_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_sample, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
19451 bcf_hdr_t *__pyx_v_hdr;
19452 bcf1_t *__pyx_v_r;
19453 int __pyx_v_fmt_id;
19454 vdict_t *__pyx_v_d;
19455 khiter_t __pyx_v_k;
19456 int __pyx_v_fmt_type;
19457 int __pyx_v_scalar;
19458 int __pyx_v_realloc;
19459 int __pyx_v_dst_type;
19460 int __pyx_v_vlen;
19461 Py_ssize_t __pyx_v_i;
19462 Py_ssize_t __pyx_v_nsamples;
19463 Py_ssize_t __pyx_v_value_count;
19464 Py_ssize_t __pyx_v_alloc_len;
19465 Py_ssize_t __pyx_v_dst_size;
19466 PyObject *__pyx_v_bkey = 0;
19467 bcf_fmt_t *__pyx_v_fmt;
19468 PyObject *__pyx_v_values = NULL;
19469 PyObject *__pyx_v_new_values = NULL;
19470 char *__pyx_v_new_values_p;
19471 PyObject *__pyx_r = NULL;
19472 __Pyx_TraceDeclarations
19473 __Pyx_RefNannyDeclarations
19474 int __pyx_t_1;
19475 PyObject *__pyx_t_2 = NULL;
19476 bcf_hdr_t *__pyx_t_3;
19477 bcf1_t *__pyx_t_4;
19478 char const *__pyx_t_5;
19479 int __pyx_t_6;
19480 char const *__pyx_t_7;
19481 int __pyx_t_8;
19482 PyObject *__pyx_t_9 = NULL;
19483 PyObject *__pyx_t_10 = NULL;
19484 unsigned int __pyx_t_11;
19485 Py_ssize_t __pyx_t_12;
19486 Py_ssize_t __pyx_t_13;
19487 long __pyx_t_14;
19488 Py_ssize_t __pyx_t_15;
19489 uint32_t __pyx_t_16;
19490 char *__pyx_t_17;
19491 Py_ssize_t __pyx_t_18;
19492 char const *__pyx_t_19;
19493 int __pyx_lineno = 0;
19494 const char *__pyx_filename = NULL;
19495 int __pyx_clineno = 0;
19496 __Pyx_RefNannySetupContext("bcf_format_set_value", 0);
19497 __Pyx_TraceCall("bcf_format_set_value", __pyx_f[0], 830, 0, __PYX_ERR(0, 830, __pyx_L1_error));
19498 __Pyx_INCREF(__pyx_v_value);
19499
19500 /* "pysam/libcbcf.pyx":831
19501 *
19502 * cdef bcf_format_set_value(VariantRecordSample sample, key, value):
19503 * if sample is None: # <<<<<<<<<<<<<<
19504 * raise ValueError('sample must not be None')
19505 *
19506 */
19507 __pyx_t_1 = (((PyObject *)__pyx_v_sample) == Py_None);
19508 if (unlikely(__pyx_t_1)) {
19509
19510 /* "pysam/libcbcf.pyx":832
19511 * cdef bcf_format_set_value(VariantRecordSample sample, key, value):
19512 * if sample is None:
19513 * raise ValueError('sample must not be None') # <<<<<<<<<<<<<<
19514 *
19515 * if key == 'phased':
19516 */
19517 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
19518 __Pyx_GOTREF(__pyx_t_2);
19519 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
19520 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19521 __PYX_ERR(0, 832, __pyx_L1_error)
19522
19523 /* "pysam/libcbcf.pyx":831
19524 *
19525 * cdef bcf_format_set_value(VariantRecordSample sample, key, value):
19526 * if sample is None: # <<<<<<<<<<<<<<
19527 * raise ValueError('sample must not be None')
19528 *
19529 */
19530 }
19531
19532 /* "pysam/libcbcf.pyx":834
19533 * raise ValueError('sample must not be None')
19534 *
19535 * if key == 'phased': # <<<<<<<<<<<<<<
19536 * sample.phased = bool(value)
19537 * return
19538 */
19539 __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_phased, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 834, __pyx_L1_error)
19540 if (__pyx_t_1) {
19541
19542 /* "pysam/libcbcf.pyx":835
19543 *
19544 * if key == 'phased':
19545 * sample.phased = bool(value) # <<<<<<<<<<<<<<
19546 * return
19547 *
19548 */
19549 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 835, __pyx_L1_error)
19550 __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
19551 __Pyx_GOTREF(__pyx_t_2);
19552 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_sample), __pyx_n_s_phased, __pyx_t_2) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
19553 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19554
19555 /* "pysam/libcbcf.pyx":836
19556 * if key == 'phased':
19557 * sample.phased = bool(value)
19558 * return # <<<<<<<<<<<<<<
19559 *
19560 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
19561 */
19562 __Pyx_XDECREF(__pyx_r);
19563 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19564 goto __pyx_L0;
19565
19566 /* "pysam/libcbcf.pyx":834
19567 * raise ValueError('sample must not be None')
19568 *
19569 * if key == 'phased': # <<<<<<<<<<<<<<
19570 * sample.phased = bool(value)
19571 * return
19572 */
19573 }
19574
19575 /* "pysam/libcbcf.pyx":838
19576 * return
19577 *
19578 * cdef bcf_hdr_t *hdr = sample.record.header.ptr # <<<<<<<<<<<<<<
19579 * cdef bcf1_t *r = sample.record.ptr
19580 * cdef int fmt_id
19581 */
19582 __pyx_t_3 = __pyx_v_sample->record->header->ptr;
19583 __pyx_v_hdr = __pyx_t_3;
19584
19585 /* "pysam/libcbcf.pyx":839
19586 *
19587 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
19588 * cdef bcf1_t *r = sample.record.ptr # <<<<<<<<<<<<<<
19589 * cdef int fmt_id
19590 * cdef vdict_t *d
19591 */
19592 __pyx_t_4 = __pyx_v_sample->record->ptr;
19593 __pyx_v_r = __pyx_t_4;
19594
19595 /* "pysam/libcbcf.pyx":843
19596 * cdef vdict_t *d
19597 * cdef khiter_t k
19598 * cdef int fmt_type, scalar, realloc, dst_type, vlen = 0 # <<<<<<<<<<<<<<
19599 * cdef ssize_t i, nsamples, value_count, alloc_size, alloc_len, dst_size
19600 *
19601 */
19602 __pyx_v_vlen = 0;
19603
19604 /* "pysam/libcbcf.pyx":846
19605 * cdef ssize_t i, nsamples, value_count, alloc_size, alloc_len, dst_size
19606 *
19607 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
19608 * raise ValueError('Error unpacking VariantRecord')
19609 *
19610 */
19611 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_ALL) < 0);
19612 if (unlikely(__pyx_t_1)) {
19613
19614 /* "pysam/libcbcf.pyx":847
19615 *
19616 * if bcf_unpack(r, BCF_UN_ALL) < 0:
19617 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
19618 *
19619 * cdef bytes bkey = force_bytes(key)
19620 */
19621 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
19622 __Pyx_GOTREF(__pyx_t_2);
19623 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
19624 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19625 __PYX_ERR(0, 847, __pyx_L1_error)
19626
19627 /* "pysam/libcbcf.pyx":846
19628 * cdef ssize_t i, nsamples, value_count, alloc_size, alloc_len, dst_size
19629 *
19630 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
19631 * raise ValueError('Error unpacking VariantRecord')
19632 *
19633 */
19634 }
19635
19636 /* "pysam/libcbcf.pyx":849
19637 * raise ValueError('Error unpacking VariantRecord')
19638 *
19639 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
19640 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
19641 *
19642 */
19643 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error)
19644 __Pyx_GOTREF(__pyx_t_2);
19645 __pyx_v_bkey = ((PyObject*)__pyx_t_2);
19646 __pyx_t_2 = 0;
19647
19648 /* "pysam/libcbcf.pyx":850
19649 *
19650 * cdef bytes bkey = force_bytes(key)
19651 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey) # <<<<<<<<<<<<<<
19652 *
19653 * if fmt:
19654 */
19655 if (unlikely(__pyx_v_bkey == Py_None)) {
19656 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
19657 __PYX_ERR(0, 850, __pyx_L1_error)
19658 }
19659 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L1_error)
19660 __pyx_v_fmt = bcf_get_fmt(__pyx_v_hdr, __pyx_v_r, __pyx_t_5);
19661
19662 /* "pysam/libcbcf.pyx":852
19663 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
19664 *
19665 * if fmt: # <<<<<<<<<<<<<<
19666 * fmt_id = fmt.id
19667 * else:
19668 */
19669 __pyx_t_1 = (__pyx_v_fmt != 0);
19670 if (__pyx_t_1) {
19671
19672 /* "pysam/libcbcf.pyx":853
19673 *
19674 * if fmt:
19675 * fmt_id = fmt.id # <<<<<<<<<<<<<<
19676 * else:
19677 * d = <vdict_t *>hdr.dict[BCF_DT_ID]
19678 */
19679 __pyx_t_6 = __pyx_v_fmt->id;
19680 __pyx_v_fmt_id = __pyx_t_6;
19681
19682 /* "pysam/libcbcf.pyx":852
19683 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
19684 *
19685 * if fmt: # <<<<<<<<<<<<<<
19686 * fmt_id = fmt.id
19687 * else:
19688 */
19689 goto __pyx_L6;
19690 }
19691
19692 /* "pysam/libcbcf.pyx":855
19693 * fmt_id = fmt.id
19694 * else:
19695 * d = <vdict_t *>hdr.dict[BCF_DT_ID] # <<<<<<<<<<<<<<
19696 * k = kh_get_vdict(d, bkey)
19697 *
19698 */
19699 /*else*/ {
19700 __pyx_v_d = ((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_ID]));
19701
19702 /* "pysam/libcbcf.pyx":856
19703 * else:
19704 * d = <vdict_t *>hdr.dict[BCF_DT_ID]
19705 * k = kh_get_vdict(d, bkey) # <<<<<<<<<<<<<<
19706 *
19707 * if k == kh_end(d) or kh_val_vdict(d, k).info[BCF_HL_FMT] & 0xF == 0xF:
19708 */
19709 if (unlikely(__pyx_v_bkey == Py_None)) {
19710 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
19711 __PYX_ERR(0, 856, __pyx_L1_error)
19712 }
19713 __pyx_t_7 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 856, __pyx_L1_error)
19714 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_7);
19715
19716 /* "pysam/libcbcf.pyx":858
19717 * k = kh_get_vdict(d, bkey)
19718 *
19719 * if k == kh_end(d) or kh_val_vdict(d, k).info[BCF_HL_FMT] & 0xF == 0xF: # <<<<<<<<<<<<<<
19720 * raise KeyError('unknown format: {}'.format(key))
19721 *
19722 */
19723 __pyx_t_8 = (__pyx_v_k == kh_end(__pyx_v_d));
19724 if (!__pyx_t_8) {
19725 } else {
19726 __pyx_t_1 = __pyx_t_8;
19727 goto __pyx_L8_bool_binop_done;
19728 }
19729 __pyx_t_8 = (((kh_val(__pyx_v_d, __pyx_v_k).info[BCF_HL_FMT]) & 0xF) == 0xF);
19730 __pyx_t_1 = __pyx_t_8;
19731 __pyx_L8_bool_binop_done:;
19732 if (unlikely(__pyx_t_1)) {
19733
19734 /* "pysam/libcbcf.pyx":859
19735 *
19736 * if k == kh_end(d) or kh_val_vdict(d, k).info[BCF_HL_FMT] & 0xF == 0xF:
19737 * raise KeyError('unknown format: {}'.format(key)) # <<<<<<<<<<<<<<
19738 *
19739 * fmt_id = kh_val_vdict(d, k).id
19740 */
19741 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unknown_format, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 859, __pyx_L1_error)
19742 __Pyx_GOTREF(__pyx_t_9);
19743 __pyx_t_10 = NULL;
19744 __pyx_t_11 = 0;
19745 #if CYTHON_UNPACK_METHODS
19746 if (likely(PyMethod_Check(__pyx_t_9))) {
19747 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
19748 if (likely(__pyx_t_10)) {
19749 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
19750 __Pyx_INCREF(__pyx_t_10);
19751 __Pyx_INCREF(function);
19752 __Pyx_DECREF_SET(__pyx_t_9, function);
19753 __pyx_t_11 = 1;
19754 }
19755 }
19756 #endif
19757 {
19758 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_key};
19759 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
19760 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
19761 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
19762 __Pyx_GOTREF(__pyx_t_2);
19763 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19764 }
19765 __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 859, __pyx_L1_error)
19766 __Pyx_GOTREF(__pyx_t_9);
19767 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19768 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
19769 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19770 __PYX_ERR(0, 859, __pyx_L1_error)
19771
19772 /* "pysam/libcbcf.pyx":858
19773 * k = kh_get_vdict(d, bkey)
19774 *
19775 * if k == kh_end(d) or kh_val_vdict(d, k).info[BCF_HL_FMT] & 0xF == 0xF: # <<<<<<<<<<<<<<
19776 * raise KeyError('unknown format: {}'.format(key))
19777 *
19778 */
19779 }
19780
19781 /* "pysam/libcbcf.pyx":861
19782 * raise KeyError('unknown format: {}'.format(key))
19783 *
19784 * fmt_id = kh_val_vdict(d, k).id # <<<<<<<<<<<<<<
19785 *
19786 * if not check_header_id(hdr, BCF_HL_FMT, fmt_id):
19787 */
19788 __pyx_t_6 = kh_val(__pyx_v_d, __pyx_v_k).id;
19789 __pyx_v_fmt_id = __pyx_t_6;
19790 }
19791 __pyx_L6:;
19792
19793 /* "pysam/libcbcf.pyx":863
19794 * fmt_id = kh_val_vdict(d, k).id
19795 *
19796 * if not check_header_id(hdr, BCF_HL_FMT, fmt_id): # <<<<<<<<<<<<<<
19797 * raise ValueError('Invalid header')
19798 *
19799 */
19800 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_FMT, __pyx_v_fmt_id); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 863, __pyx_L1_error)
19801 __pyx_t_8 = (!__pyx_t_1);
19802 if (unlikely(__pyx_t_8)) {
19803
19804 /* "pysam/libcbcf.pyx":864
19805 *
19806 * if not check_header_id(hdr, BCF_HL_FMT, fmt_id):
19807 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
19808 *
19809 * fmt_type = bcf_hdr_id2type(hdr, BCF_HL_FMT, fmt_id)
19810 */
19811 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 864, __pyx_L1_error)
19812 __Pyx_GOTREF(__pyx_t_9);
19813 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
19814 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19815 __PYX_ERR(0, 864, __pyx_L1_error)
19816
19817 /* "pysam/libcbcf.pyx":863
19818 * fmt_id = kh_val_vdict(d, k).id
19819 *
19820 * if not check_header_id(hdr, BCF_HL_FMT, fmt_id): # <<<<<<<<<<<<<<
19821 * raise ValueError('Invalid header')
19822 *
19823 */
19824 }
19825
19826 /* "pysam/libcbcf.pyx":866
19827 * raise ValueError('Invalid header')
19828 *
19829 * fmt_type = bcf_hdr_id2type(hdr, BCF_HL_FMT, fmt_id) # <<<<<<<<<<<<<<
19830 *
19831 * if fmt_type == BCF_HT_FLAG:
19832 */
19833 __pyx_v_fmt_type = bcf_hdr_id2type(__pyx_v_hdr, BCF_HL_FMT, __pyx_v_fmt_id);
19834
19835 /* "pysam/libcbcf.pyx":868
19836 * fmt_type = bcf_hdr_id2type(hdr, BCF_HL_FMT, fmt_id)
19837 *
19838 * if fmt_type == BCF_HT_FLAG: # <<<<<<<<<<<<<<
19839 * raise ValueError('Flag types are not allowed on FORMATs')
19840 *
19841 */
19842 __pyx_t_8 = (__pyx_v_fmt_type == BCF_HT_FLAG);
19843 if (unlikely(__pyx_t_8)) {
19844
19845 /* "pysam/libcbcf.pyx":869
19846 *
19847 * if fmt_type == BCF_HT_FLAG:
19848 * raise ValueError('Flag types are not allowed on FORMATs') # <<<<<<<<<<<<<<
19849 *
19850 * if is_gt_fmt(hdr, fmt_id):
19851 */
19852 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L1_error)
19853 __Pyx_GOTREF(__pyx_t_9);
19854 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
19855 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19856 __PYX_ERR(0, 869, __pyx_L1_error)
19857
19858 /* "pysam/libcbcf.pyx":868
19859 * fmt_type = bcf_hdr_id2type(hdr, BCF_HL_FMT, fmt_id)
19860 *
19861 * if fmt_type == BCF_HT_FLAG: # <<<<<<<<<<<<<<
19862 * raise ValueError('Flag types are not allowed on FORMATs')
19863 *
19864 */
19865 }
19866
19867 /* "pysam/libcbcf.pyx":871
19868 * raise ValueError('Flag types are not allowed on FORMATs')
19869 *
19870 * if is_gt_fmt(hdr, fmt_id): # <<<<<<<<<<<<<<
19871 * value = bcf_encode_alleles(sample.record, value)
19872 * # KBJ: GT field is considered to be a string by the VCF header but BCF represents it as INT.
19873 */
19874 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_is_gt_fmt(__pyx_v_hdr, __pyx_v_fmt_id); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 871, __pyx_L1_error)
19875 __pyx_t_8 = (__pyx_t_6 != 0);
19876 if (__pyx_t_8) {
19877
19878 /* "pysam/libcbcf.pyx":872
19879 *
19880 * if is_gt_fmt(hdr, fmt_id):
19881 * value = bcf_encode_alleles(sample.record, value) # <<<<<<<<<<<<<<
19882 * # KBJ: GT field is considered to be a string by the VCF header but BCF represents it as INT.
19883 * fmt_type = BCF_HT_INT
19884 */
19885 __pyx_t_9 = ((PyObject *)__pyx_v_sample->record);
19886 __Pyx_INCREF(__pyx_t_9);
19887 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_encode_alleles(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_9), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
19888 __Pyx_GOTREF(__pyx_t_2);
19889 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19890 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
19891 __pyx_t_2 = 0;
19892
19893 /* "pysam/libcbcf.pyx":874
19894 * value = bcf_encode_alleles(sample.record, value)
19895 * # KBJ: GT field is considered to be a string by the VCF header but BCF represents it as INT.
19896 * fmt_type = BCF_HT_INT # <<<<<<<<<<<<<<
19897 *
19898 * values = bcf_check_values(sample.record, value, sample.index,
19899 */
19900 __pyx_v_fmt_type = BCF_HT_INT;
19901
19902 /* "pysam/libcbcf.pyx":871
19903 * raise ValueError('Flag types are not allowed on FORMATs')
19904 *
19905 * if is_gt_fmt(hdr, fmt_id): # <<<<<<<<<<<<<<
19906 * value = bcf_encode_alleles(sample.record, value)
19907 * # KBJ: GT field is considered to be a string by the VCF header but BCF represents it as INT.
19908 */
19909 }
19910
19911 /* "pysam/libcbcf.pyx":876
19912 * fmt_type = BCF_HT_INT
19913 *
19914 * values = bcf_check_values(sample.record, value, sample.index, # <<<<<<<<<<<<<<
19915 * BCF_HL_FMT, fmt_type, fmt_id,
19916 * fmt.type if fmt else -1,
19917 */
19918 __pyx_t_2 = ((PyObject *)__pyx_v_sample->record);
19919 __Pyx_INCREF(__pyx_t_2);
19920
19921 /* "pysam/libcbcf.pyx":878
19922 * values = bcf_check_values(sample.record, value, sample.index,
19923 * BCF_HL_FMT, fmt_type, fmt_id,
19924 * fmt.type if fmt else -1, # <<<<<<<<<<<<<<
19925 * fmt.n if fmt else -1,
19926 * &value_count, &scalar, &realloc)
19927 */
19928 __pyx_t_8 = (__pyx_v_fmt != 0);
19929 if (__pyx_t_8) {
19930 __pyx_t_6 = __pyx_v_fmt->type;
19931 } else {
19932 __pyx_t_6 = -1;
19933 }
19934
19935 /* "pysam/libcbcf.pyx":879
19936 * BCF_HL_FMT, fmt_type, fmt_id,
19937 * fmt.type if fmt else -1,
19938 * fmt.n if fmt else -1, # <<<<<<<<<<<<<<
19939 * &value_count, &scalar, &realloc)
19940 * vlen = value_count < 0
19941 */
19942 __pyx_t_8 = (__pyx_v_fmt != 0);
19943 if (__pyx_t_8) {
19944 __pyx_t_12 = __pyx_v_fmt->n;
19945 } else {
19946 __pyx_t_12 = -1L;
19947 }
19948
19949 /* "pysam/libcbcf.pyx":876
19950 * fmt_type = BCF_HT_INT
19951 *
19952 * values = bcf_check_values(sample.record, value, sample.index, # <<<<<<<<<<<<<<
19953 * BCF_HL_FMT, fmt_type, fmt_id,
19954 * fmt.type if fmt else -1,
19955 */
19956 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_check_values(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_2), __pyx_v_value, __pyx_v_sample->index, BCF_HL_FMT, __pyx_v_fmt_type, __pyx_v_fmt_id, __pyx_t_6, __pyx_t_12, (&__pyx_v_value_count), (&__pyx_v_scalar), (&__pyx_v_realloc)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 876, __pyx_L1_error)
19957 __Pyx_GOTREF(__pyx_t_9);
19958 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19959 __pyx_v_values = __pyx_t_9;
19960 __pyx_t_9 = 0;
19961
19962 /* "pysam/libcbcf.pyx":881
19963 * fmt.n if fmt else -1,
19964 * &value_count, &scalar, &realloc)
19965 * vlen = value_count < 0 # <<<<<<<<<<<<<<
19966 * value_count = len(values)
19967 *
19968 */
19969 __pyx_v_vlen = (__pyx_v_value_count < 0);
19970
19971 /* "pysam/libcbcf.pyx":882
19972 * &value_count, &scalar, &realloc)
19973 * vlen = value_count < 0
19974 * value_count = len(values) # <<<<<<<<<<<<<<
19975 *
19976 * # If we can, write updated values to existing allocated storage.
19977 */
19978 __pyx_t_13 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 882, __pyx_L1_error)
19979 __pyx_v_value_count = __pyx_t_13;
19980
19981 /* "pysam/libcbcf.pyx":885
19982 *
19983 * # If we can, write updated values to existing allocated storage.
19984 * if fmt and not realloc: # <<<<<<<<<<<<<<
19985 * r.d.indiv_dirty = 1
19986 * bcf_object_to_array(values, fmt.p + sample.index * fmt.size, fmt.type, fmt.n, vlen)
19987 */
19988 __pyx_t_1 = (__pyx_v_fmt != 0);
19989 if (__pyx_t_1) {
19990 } else {
19991 __pyx_t_8 = __pyx_t_1;
19992 goto __pyx_L14_bool_binop_done;
19993 }
19994 __pyx_t_1 = (!(__pyx_v_realloc != 0));
19995 __pyx_t_8 = __pyx_t_1;
19996 __pyx_L14_bool_binop_done:;
19997 if (__pyx_t_8) {
19998
19999 /* "pysam/libcbcf.pyx":886
20000 * # If we can, write updated values to existing allocated storage.
20001 * if fmt and not realloc:
20002 * r.d.indiv_dirty = 1 # <<<<<<<<<<<<<<
20003 * bcf_object_to_array(values, fmt.p + sample.index * fmt.size, fmt.type, fmt.n, vlen)
20004 * return
20005 */
20006 __pyx_v_r->d.indiv_dirty = 1;
20007
20008 /* "pysam/libcbcf.pyx":887
20009 * if fmt and not realloc:
20010 * r.d.indiv_dirty = 1
20011 * bcf_object_to_array(values, fmt.p + sample.index * fmt.size, fmt.type, fmt.n, vlen) # <<<<<<<<<<<<<<
20012 * return
20013 *
20014 */
20015 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_object_to_array(__pyx_v_values, (__pyx_v_fmt->p + (__pyx_v_sample->index * __pyx_v_fmt->size)), __pyx_v_fmt->type, __pyx_v_fmt->n, __pyx_v_vlen); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 887, __pyx_L1_error)
20016 __Pyx_GOTREF(__pyx_t_9);
20017 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20018
20019 /* "pysam/libcbcf.pyx":888
20020 * r.d.indiv_dirty = 1
20021 * bcf_object_to_array(values, fmt.p + sample.index * fmt.size, fmt.type, fmt.n, vlen)
20022 * return # <<<<<<<<<<<<<<
20023 *
20024 * alloc_len = max(1, value_count)
20025 */
20026 __Pyx_XDECREF(__pyx_r);
20027 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20028 goto __pyx_L0;
20029
20030 /* "pysam/libcbcf.pyx":885
20031 *
20032 * # If we can, write updated values to existing allocated storage.
20033 * if fmt and not realloc: # <<<<<<<<<<<<<<
20034 * r.d.indiv_dirty = 1
20035 * bcf_object_to_array(values, fmt.p + sample.index * fmt.size, fmt.type, fmt.n, vlen)
20036 */
20037 }
20038
20039 /* "pysam/libcbcf.pyx":890
20040 * return
20041 *
20042 * alloc_len = max(1, value_count) # <<<<<<<<<<<<<<
20043 * if fmt and fmt.n > alloc_len:
20044 * alloc_len = fmt.n
20045 */
20046 __pyx_t_12 = __pyx_v_value_count;
20047 __pyx_t_14 = 1;
20048 __pyx_t_8 = (__pyx_t_12 > __pyx_t_14);
20049 if (__pyx_t_8) {
20050 __pyx_t_15 = __pyx_t_12;
20051 } else {
20052 __pyx_t_15 = __pyx_t_14;
20053 }
20054 __pyx_v_alloc_len = __pyx_t_15;
20055
20056 /* "pysam/libcbcf.pyx":891
20057 *
20058 * alloc_len = max(1, value_count)
20059 * if fmt and fmt.n > alloc_len: # <<<<<<<<<<<<<<
20060 * alloc_len = fmt.n
20061 *
20062 */
20063 __pyx_t_1 = (__pyx_v_fmt != 0);
20064 if (__pyx_t_1) {
20065 } else {
20066 __pyx_t_8 = __pyx_t_1;
20067 goto __pyx_L17_bool_binop_done;
20068 }
20069 __pyx_t_1 = (__pyx_v_fmt->n > __pyx_v_alloc_len);
20070 __pyx_t_8 = __pyx_t_1;
20071 __pyx_L17_bool_binop_done:;
20072 if (__pyx_t_8) {
20073
20074 /* "pysam/libcbcf.pyx":892
20075 * alloc_len = max(1, value_count)
20076 * if fmt and fmt.n > alloc_len:
20077 * alloc_len = fmt.n # <<<<<<<<<<<<<<
20078 *
20079 * nsamples = r.n_sample
20080 */
20081 __pyx_t_6 = __pyx_v_fmt->n;
20082 __pyx_v_alloc_len = __pyx_t_6;
20083
20084 /* "pysam/libcbcf.pyx":891
20085 *
20086 * alloc_len = max(1, value_count)
20087 * if fmt and fmt.n > alloc_len: # <<<<<<<<<<<<<<
20088 * alloc_len = fmt.n
20089 *
20090 */
20091 }
20092
20093 /* "pysam/libcbcf.pyx":894
20094 * alloc_len = fmt.n
20095 *
20096 * nsamples = r.n_sample # <<<<<<<<<<<<<<
20097 * new_values = bcf_empty_array(fmt_type, nsamples * alloc_len, vlen)
20098 * cdef char *new_values_p = <char *>new_values
20099 */
20100 __pyx_t_16 = __pyx_v_r->n_sample;
20101 __pyx_v_nsamples = __pyx_t_16;
20102
20103 /* "pysam/libcbcf.pyx":895
20104 *
20105 * nsamples = r.n_sample
20106 * new_values = bcf_empty_array(fmt_type, nsamples * alloc_len, vlen) # <<<<<<<<<<<<<<
20107 * cdef char *new_values_p = <char *>new_values
20108 *
20109 */
20110 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_empty_array(__pyx_v_fmt_type, (__pyx_v_nsamples * __pyx_v_alloc_len), __pyx_v_vlen); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 895, __pyx_L1_error)
20111 __Pyx_GOTREF(__pyx_t_9);
20112 __pyx_v_new_values = __pyx_t_9;
20113 __pyx_t_9 = 0;
20114
20115 /* "pysam/libcbcf.pyx":896
20116 * nsamples = r.n_sample
20117 * new_values = bcf_empty_array(fmt_type, nsamples * alloc_len, vlen)
20118 * cdef char *new_values_p = <char *>new_values # <<<<<<<<<<<<<<
20119 *
20120 * if fmt_type == BCF_HT_INT:
20121 */
20122 __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_new_values); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error)
20123 __pyx_v_new_values_p = ((char *)__pyx_t_17);
20124
20125 /* "pysam/libcbcf.pyx":898
20126 * cdef char *new_values_p = <char *>new_values
20127 *
20128 * if fmt_type == BCF_HT_INT: # <<<<<<<<<<<<<<
20129 * dst_type = BCF_BT_INT32
20130 * dst_size = sizeof(int32_t) * alloc_len
20131 */
20132 __pyx_t_8 = (__pyx_v_fmt_type == BCF_HT_INT);
20133 if (__pyx_t_8) {
20134
20135 /* "pysam/libcbcf.pyx":899
20136 *
20137 * if fmt_type == BCF_HT_INT:
20138 * dst_type = BCF_BT_INT32 # <<<<<<<<<<<<<<
20139 * dst_size = sizeof(int32_t) * alloc_len
20140 * elif fmt_type == BCF_HT_REAL:
20141 */
20142 __pyx_v_dst_type = BCF_BT_INT32;
20143
20144 /* "pysam/libcbcf.pyx":900
20145 * if fmt_type == BCF_HT_INT:
20146 * dst_type = BCF_BT_INT32
20147 * dst_size = sizeof(int32_t) * alloc_len # <<<<<<<<<<<<<<
20148 * elif fmt_type == BCF_HT_REAL:
20149 * dst_type = BCF_BT_FLOAT
20150 */
20151 __pyx_v_dst_size = ((sizeof(int32_t)) * __pyx_v_alloc_len);
20152
20153 /* "pysam/libcbcf.pyx":898
20154 * cdef char *new_values_p = <char *>new_values
20155 *
20156 * if fmt_type == BCF_HT_INT: # <<<<<<<<<<<<<<
20157 * dst_type = BCF_BT_INT32
20158 * dst_size = sizeof(int32_t) * alloc_len
20159 */
20160 goto __pyx_L19;
20161 }
20162
20163 /* "pysam/libcbcf.pyx":901
20164 * dst_type = BCF_BT_INT32
20165 * dst_size = sizeof(int32_t) * alloc_len
20166 * elif fmt_type == BCF_HT_REAL: # <<<<<<<<<<<<<<
20167 * dst_type = BCF_BT_FLOAT
20168 * dst_size = sizeof(float) * alloc_len
20169 */
20170 __pyx_t_8 = (__pyx_v_fmt_type == BCF_HT_REAL);
20171 if (__pyx_t_8) {
20172
20173 /* "pysam/libcbcf.pyx":902
20174 * dst_size = sizeof(int32_t) * alloc_len
20175 * elif fmt_type == BCF_HT_REAL:
20176 * dst_type = BCF_BT_FLOAT # <<<<<<<<<<<<<<
20177 * dst_size = sizeof(float) * alloc_len
20178 * elif fmt_type == BCF_HT_STR:
20179 */
20180 __pyx_v_dst_type = BCF_BT_FLOAT;
20181
20182 /* "pysam/libcbcf.pyx":903
20183 * elif fmt_type == BCF_HT_REAL:
20184 * dst_type = BCF_BT_FLOAT
20185 * dst_size = sizeof(float) * alloc_len # <<<<<<<<<<<<<<
20186 * elif fmt_type == BCF_HT_STR:
20187 * dst_type = BCF_BT_CHAR
20188 */
20189 __pyx_v_dst_size = ((sizeof(float)) * __pyx_v_alloc_len);
20190
20191 /* "pysam/libcbcf.pyx":901
20192 * dst_type = BCF_BT_INT32
20193 * dst_size = sizeof(int32_t) * alloc_len
20194 * elif fmt_type == BCF_HT_REAL: # <<<<<<<<<<<<<<
20195 * dst_type = BCF_BT_FLOAT
20196 * dst_size = sizeof(float) * alloc_len
20197 */
20198 goto __pyx_L19;
20199 }
20200
20201 /* "pysam/libcbcf.pyx":904
20202 * dst_type = BCF_BT_FLOAT
20203 * dst_size = sizeof(float) * alloc_len
20204 * elif fmt_type == BCF_HT_STR: # <<<<<<<<<<<<<<
20205 * dst_type = BCF_BT_CHAR
20206 * dst_size = sizeof(char) * alloc_len
20207 */
20208 __pyx_t_8 = (__pyx_v_fmt_type == BCF_HT_STR);
20209 if (likely(__pyx_t_8)) {
20210
20211 /* "pysam/libcbcf.pyx":905
20212 * dst_size = sizeof(float) * alloc_len
20213 * elif fmt_type == BCF_HT_STR:
20214 * dst_type = BCF_BT_CHAR # <<<<<<<<<<<<<<
20215 * dst_size = sizeof(char) * alloc_len
20216 * else:
20217 */
20218 __pyx_v_dst_type = BCF_BT_CHAR;
20219
20220 /* "pysam/libcbcf.pyx":906
20221 * elif fmt_type == BCF_HT_STR:
20222 * dst_type = BCF_BT_CHAR
20223 * dst_size = sizeof(char) * alloc_len # <<<<<<<<<<<<<<
20224 * else:
20225 * raise ValueError('Unsupported FORMAT type')
20226 */
20227 __pyx_v_dst_size = ((sizeof(char)) * __pyx_v_alloc_len);
20228
20229 /* "pysam/libcbcf.pyx":904
20230 * dst_type = BCF_BT_FLOAT
20231 * dst_size = sizeof(float) * alloc_len
20232 * elif fmt_type == BCF_HT_STR: # <<<<<<<<<<<<<<
20233 * dst_type = BCF_BT_CHAR
20234 * dst_size = sizeof(char) * alloc_len
20235 */
20236 goto __pyx_L19;
20237 }
20238
20239 /* "pysam/libcbcf.pyx":908
20240 * dst_size = sizeof(char) * alloc_len
20241 * else:
20242 * raise ValueError('Unsupported FORMAT type') # <<<<<<<<<<<<<<
20243 *
20244 * if fmt and nsamples > 1:
20245 */
20246 /*else*/ {
20247 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 908, __pyx_L1_error)
20248 __Pyx_GOTREF(__pyx_t_9);
20249 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
20250 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20251 __PYX_ERR(0, 908, __pyx_L1_error)
20252 }
20253 __pyx_L19:;
20254
20255 /* "pysam/libcbcf.pyx":910
20256 * raise ValueError('Unsupported FORMAT type')
20257 *
20258 * if fmt and nsamples > 1: # <<<<<<<<<<<<<<
20259 * for i in range(nsamples):
20260 * bcf_copy_expand_array(fmt.p + i * fmt.size, fmt.type, fmt.n,
20261 */
20262 __pyx_t_1 = (__pyx_v_fmt != 0);
20263 if (__pyx_t_1) {
20264 } else {
20265 __pyx_t_8 = __pyx_t_1;
20266 goto __pyx_L21_bool_binop_done;
20267 }
20268 __pyx_t_1 = (__pyx_v_nsamples > 1);
20269 __pyx_t_8 = __pyx_t_1;
20270 __pyx_L21_bool_binop_done:;
20271 if (__pyx_t_8) {
20272
20273 /* "pysam/libcbcf.pyx":911
20274 *
20275 * if fmt and nsamples > 1:
20276 * for i in range(nsamples): # <<<<<<<<<<<<<<
20277 * bcf_copy_expand_array(fmt.p + i * fmt.size, fmt.type, fmt.n,
20278 * new_values_p + i * dst_size, dst_type, alloc_len,
20279 */
20280 __pyx_t_15 = __pyx_v_nsamples;
20281 __pyx_t_12 = __pyx_t_15;
20282 for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_12; __pyx_t_18+=1) {
20283 __pyx_v_i = __pyx_t_18;
20284
20285 /* "pysam/libcbcf.pyx":912
20286 * if fmt and nsamples > 1:
20287 * for i in range(nsamples):
20288 * bcf_copy_expand_array(fmt.p + i * fmt.size, fmt.type, fmt.n, # <<<<<<<<<<<<<<
20289 * new_values_p + i * dst_size, dst_type, alloc_len,
20290 * vlen)
20291 */
20292 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_copy_expand_array((__pyx_v_fmt->p + (__pyx_v_i * __pyx_v_fmt->size)), __pyx_v_fmt->type, __pyx_v_fmt->n, (__pyx_v_new_values_p + (__pyx_v_i * __pyx_v_dst_size)), __pyx_v_dst_type, __pyx_v_alloc_len, __pyx_v_vlen); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 912, __pyx_L1_error)
20293 __Pyx_GOTREF(__pyx_t_9);
20294 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20295 }
20296
20297 /* "pysam/libcbcf.pyx":910
20298 * raise ValueError('Unsupported FORMAT type')
20299 *
20300 * if fmt and nsamples > 1: # <<<<<<<<<<<<<<
20301 * for i in range(nsamples):
20302 * bcf_copy_expand_array(fmt.p + i * fmt.size, fmt.type, fmt.n,
20303 */
20304 }
20305
20306 /* "pysam/libcbcf.pyx":916
20307 * vlen)
20308 *
20309 * bcf_object_to_array(values, new_values_p + sample.index * dst_size, dst_type, alloc_len, vlen) # <<<<<<<<<<<<<<
20310 *
20311 * if bcf_update_format(hdr, r, bkey, new_values_p, <int>(nsamples * alloc_len), fmt_type) < 0:
20312 */
20313 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_object_to_array(__pyx_v_values, (__pyx_v_new_values_p + (__pyx_v_sample->index * __pyx_v_dst_size)), __pyx_v_dst_type, __pyx_v_alloc_len, __pyx_v_vlen); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 916, __pyx_L1_error)
20314 __Pyx_GOTREF(__pyx_t_9);
20315 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20316
20317 /* "pysam/libcbcf.pyx":918
20318 * bcf_object_to_array(values, new_values_p + sample.index * dst_size, dst_type, alloc_len, vlen)
20319 *
20320 * if bcf_update_format(hdr, r, bkey, new_values_p, <int>(nsamples * alloc_len), fmt_type) < 0: # <<<<<<<<<<<<<<
20321 * raise ValueError('Unable to update format values')
20322 *
20323 */
20324 if (unlikely(__pyx_v_bkey == Py_None)) {
20325 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
20326 __PYX_ERR(0, 918, __pyx_L1_error)
20327 }
20328 __pyx_t_19 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) __PYX_ERR(0, 918, __pyx_L1_error)
20329 __pyx_t_8 = (bcf_update_format(__pyx_v_hdr, __pyx_v_r, __pyx_t_19, __pyx_v_new_values_p, ((int)(__pyx_v_nsamples * __pyx_v_alloc_len)), __pyx_v_fmt_type) < 0);
20330 if (unlikely(__pyx_t_8)) {
20331
20332 /* "pysam/libcbcf.pyx":919
20333 *
20334 * if bcf_update_format(hdr, r, bkey, new_values_p, <int>(nsamples * alloc_len), fmt_type) < 0:
20335 * raise ValueError('Unable to update format values') # <<<<<<<<<<<<<<
20336 *
20337 *
20338 */
20339 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 919, __pyx_L1_error)
20340 __Pyx_GOTREF(__pyx_t_9);
20341 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
20342 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20343 __PYX_ERR(0, 919, __pyx_L1_error)
20344
20345 /* "pysam/libcbcf.pyx":918
20346 * bcf_object_to_array(values, new_values_p + sample.index * dst_size, dst_type, alloc_len, vlen)
20347 *
20348 * if bcf_update_format(hdr, r, bkey, new_values_p, <int>(nsamples * alloc_len), fmt_type) < 0: # <<<<<<<<<<<<<<
20349 * raise ValueError('Unable to update format values')
20350 *
20351 */
20352 }
20353
20354 /* "pysam/libcbcf.pyx":830
20355 *
20356 *
20357 * cdef bcf_format_set_value(VariantRecordSample sample, key, value): # <<<<<<<<<<<<<<
20358 * if sample is None:
20359 * raise ValueError('sample must not be None')
20360 */
20361
20362 /* function exit code */
20363 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20364 goto __pyx_L0;
20365 __pyx_L1_error:;
20366 __Pyx_XDECREF(__pyx_t_2);
20367 __Pyx_XDECREF(__pyx_t_9);
20368 __Pyx_XDECREF(__pyx_t_10);
20369 __Pyx_AddTraceback("pysam.libcbcf.bcf_format_set_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
20370 __pyx_r = 0;
20371 __pyx_L0:;
20372 __Pyx_XDECREF(__pyx_v_bkey);
20373 __Pyx_XDECREF(__pyx_v_values);
20374 __Pyx_XDECREF(__pyx_v_new_values);
20375 __Pyx_XDECREF(__pyx_v_value);
20376 __Pyx_XGIVEREF(__pyx_r);
20377 __Pyx_TraceReturn(__pyx_r, 0);
20378 __Pyx_RefNannyFinishContext();
20379 return __pyx_r;
20380 }
20381
20382 /* "pysam/libcbcf.pyx":922
20383 *
20384 *
20385 * cdef bcf_format_del_value(VariantRecordSample sample, key): # <<<<<<<<<<<<<<
20386 * if sample is None:
20387 * raise ValueError('sample must not be None')
20388 */
20389
20390 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_del_value(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_sample, PyObject *__pyx_v_key) {
20391 bcf_hdr_t *__pyx_v_hdr;
20392 bcf1_t *__pyx_v_r;
20393 Py_ssize_t __pyx_v_value_count;
20394 int __pyx_v_scalar;
20395 PyObject *__pyx_v_bkey = 0;
20396 bcf_fmt_t *__pyx_v_fmt;
20397 PyObject *__pyx_v_null_value = NULL;
20398 PyObject *__pyx_r = NULL;
20399 __Pyx_TraceDeclarations
20400 __Pyx_RefNannyDeclarations
20401 int __pyx_t_1;
20402 PyObject *__pyx_t_2 = NULL;
20403 bcf_hdr_t *__pyx_t_3;
20404 bcf1_t *__pyx_t_4;
20405 char const *__pyx_t_5;
20406 int __pyx_t_6;
20407 PyObject *__pyx_t_7 = NULL;
20408 int __pyx_lineno = 0;
20409 const char *__pyx_filename = NULL;
20410 int __pyx_clineno = 0;
20411 __Pyx_RefNannySetupContext("bcf_format_del_value", 1);
20412 __Pyx_TraceCall("bcf_format_del_value", __pyx_f[0], 922, 0, __PYX_ERR(0, 922, __pyx_L1_error));
20413
20414 /* "pysam/libcbcf.pyx":923
20415 *
20416 * cdef bcf_format_del_value(VariantRecordSample sample, key):
20417 * if sample is None: # <<<<<<<<<<<<<<
20418 * raise ValueError('sample must not be None')
20419 *
20420 */
20421 __pyx_t_1 = (((PyObject *)__pyx_v_sample) == Py_None);
20422 if (unlikely(__pyx_t_1)) {
20423
20424 /* "pysam/libcbcf.pyx":924
20425 * cdef bcf_format_del_value(VariantRecordSample sample, key):
20426 * if sample is None:
20427 * raise ValueError('sample must not be None') # <<<<<<<<<<<<<<
20428 *
20429 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
20430 */
20431 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
20432 __Pyx_GOTREF(__pyx_t_2);
20433 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
20434 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20435 __PYX_ERR(0, 924, __pyx_L1_error)
20436
20437 /* "pysam/libcbcf.pyx":923
20438 *
20439 * cdef bcf_format_del_value(VariantRecordSample sample, key):
20440 * if sample is None: # <<<<<<<<<<<<<<
20441 * raise ValueError('sample must not be None')
20442 *
20443 */
20444 }
20445
20446 /* "pysam/libcbcf.pyx":926
20447 * raise ValueError('sample must not be None')
20448 *
20449 * cdef bcf_hdr_t *hdr = sample.record.header.ptr # <<<<<<<<<<<<<<
20450 * cdef bcf1_t *r = sample.record.ptr
20451 * cdef ssize_t value_count
20452 */
20453 __pyx_t_3 = __pyx_v_sample->record->header->ptr;
20454 __pyx_v_hdr = __pyx_t_3;
20455
20456 /* "pysam/libcbcf.pyx":927
20457 *
20458 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
20459 * cdef bcf1_t *r = sample.record.ptr # <<<<<<<<<<<<<<
20460 * cdef ssize_t value_count
20461 * cdef int scalar
20462 */
20463 __pyx_t_4 = __pyx_v_sample->record->ptr;
20464 __pyx_v_r = __pyx_t_4;
20465
20466 /* "pysam/libcbcf.pyx":931
20467 * cdef int scalar
20468 *
20469 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
20470 * raise ValueError('Error unpacking VariantRecord')
20471 *
20472 */
20473 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_ALL) < 0);
20474 if (unlikely(__pyx_t_1)) {
20475
20476 /* "pysam/libcbcf.pyx":932
20477 *
20478 * if bcf_unpack(r, BCF_UN_ALL) < 0:
20479 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
20480 *
20481 * cdef bytes bkey = force_bytes(key)
20482 */
20483 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
20484 __Pyx_GOTREF(__pyx_t_2);
20485 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
20486 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20487 __PYX_ERR(0, 932, __pyx_L1_error)
20488
20489 /* "pysam/libcbcf.pyx":931
20490 * cdef int scalar
20491 *
20492 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
20493 * raise ValueError('Error unpacking VariantRecord')
20494 *
20495 */
20496 }
20497
20498 /* "pysam/libcbcf.pyx":934
20499 * raise ValueError('Error unpacking VariantRecord')
20500 *
20501 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
20502 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
20503 *
20504 */
20505 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
20506 __Pyx_GOTREF(__pyx_t_2);
20507 __pyx_v_bkey = ((PyObject*)__pyx_t_2);
20508 __pyx_t_2 = 0;
20509
20510 /* "pysam/libcbcf.pyx":935
20511 *
20512 * cdef bytes bkey = force_bytes(key)
20513 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey) # <<<<<<<<<<<<<<
20514 *
20515 * if not fmt or not fmt.p:
20516 */
20517 if (unlikely(__pyx_v_bkey == Py_None)) {
20518 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
20519 __PYX_ERR(0, 935, __pyx_L1_error)
20520 }
20521 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 935, __pyx_L1_error)
20522 __pyx_v_fmt = bcf_get_fmt(__pyx_v_hdr, __pyx_v_r, __pyx_t_5);
20523
20524 /* "pysam/libcbcf.pyx":937
20525 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
20526 *
20527 * if not fmt or not fmt.p: # <<<<<<<<<<<<<<
20528 * raise KeyError(key)
20529 *
20530 */
20531 __pyx_t_6 = (!(__pyx_v_fmt != 0));
20532 if (!__pyx_t_6) {
20533 } else {
20534 __pyx_t_1 = __pyx_t_6;
20535 goto __pyx_L6_bool_binop_done;
20536 }
20537 __pyx_t_6 = (!(__pyx_v_fmt->p != 0));
20538 __pyx_t_1 = __pyx_t_6;
20539 __pyx_L6_bool_binop_done:;
20540 if (unlikely(__pyx_t_1)) {
20541
20542 /* "pysam/libcbcf.pyx":938
20543 *
20544 * if not fmt or not fmt.p:
20545 * raise KeyError(key) # <<<<<<<<<<<<<<
20546 *
20547 * bcf_get_value_count(sample.record, BCF_HL_FMT, fmt.id, &value_count, &scalar, sample.index)
20548 */
20549 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
20550 __Pyx_GOTREF(__pyx_t_2);
20551 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
20552 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20553 __PYX_ERR(0, 938, __pyx_L1_error)
20554
20555 /* "pysam/libcbcf.pyx":937
20556 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
20557 *
20558 * if not fmt or not fmt.p: # <<<<<<<<<<<<<<
20559 * raise KeyError(key)
20560 *
20561 */
20562 }
20563
20564 /* "pysam/libcbcf.pyx":940
20565 * raise KeyError(key)
20566 *
20567 * bcf_get_value_count(sample.record, BCF_HL_FMT, fmt.id, &value_count, &scalar, sample.index) # <<<<<<<<<<<<<<
20568 *
20569 * if value_count <= 0:
20570 */
20571 __pyx_t_2 = ((PyObject *)__pyx_v_sample->record);
20572 __Pyx_INCREF(__pyx_t_2);
20573 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_get_value_count(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_2), BCF_HL_FMT, __pyx_v_fmt->id, (&__pyx_v_value_count), (&__pyx_v_scalar), __pyx_v_sample->index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 940, __pyx_L1_error)
20574 __Pyx_GOTREF(__pyx_t_7);
20575 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20576 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20577
20578 /* "pysam/libcbcf.pyx":942
20579 * bcf_get_value_count(sample.record, BCF_HL_FMT, fmt.id, &value_count, &scalar, sample.index)
20580 *
20581 * if value_count <= 0: # <<<<<<<<<<<<<<
20582 * null_value = ()
20583 * elif scalar:
20584 */
20585 __pyx_t_1 = (__pyx_v_value_count <= 0);
20586 if (__pyx_t_1) {
20587
20588 /* "pysam/libcbcf.pyx":943
20589 *
20590 * if value_count <= 0:
20591 * null_value = () # <<<<<<<<<<<<<<
20592 * elif scalar:
20593 * null_value = None
20594 */
20595 __Pyx_INCREF(__pyx_empty_tuple);
20596 __pyx_v_null_value = __pyx_empty_tuple;
20597
20598 /* "pysam/libcbcf.pyx":942
20599 * bcf_get_value_count(sample.record, BCF_HL_FMT, fmt.id, &value_count, &scalar, sample.index)
20600 *
20601 * if value_count <= 0: # <<<<<<<<<<<<<<
20602 * null_value = ()
20603 * elif scalar:
20604 */
20605 goto __pyx_L8;
20606 }
20607
20608 /* "pysam/libcbcf.pyx":944
20609 * if value_count <= 0:
20610 * null_value = ()
20611 * elif scalar: # <<<<<<<<<<<<<<
20612 * null_value = None
20613 * else:
20614 */
20615 __pyx_t_1 = (__pyx_v_scalar != 0);
20616 if (__pyx_t_1) {
20617
20618 /* "pysam/libcbcf.pyx":945
20619 * null_value = ()
20620 * elif scalar:
20621 * null_value = None # <<<<<<<<<<<<<<
20622 * else:
20623 * null_value = (None,)*value_count
20624 */
20625 __Pyx_INCREF(Py_None);
20626 __pyx_v_null_value = ((PyObject*)Py_None);
20627
20628 /* "pysam/libcbcf.pyx":944
20629 * if value_count <= 0:
20630 * null_value = ()
20631 * elif scalar: # <<<<<<<<<<<<<<
20632 * null_value = None
20633 * else:
20634 */
20635 goto __pyx_L8;
20636 }
20637
20638 /* "pysam/libcbcf.pyx":947
20639 * null_value = None
20640 * else:
20641 * null_value = (None,)*value_count # <<<<<<<<<<<<<<
20642 *
20643 * bcf_format_set_value(sample, bkey, null_value)
20644 */
20645 /*else*/ {
20646 __pyx_t_7 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_value_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 947, __pyx_L1_error)
20647 __Pyx_GOTREF(__pyx_t_7);
20648 __pyx_v_null_value = ((PyObject*)__pyx_t_7);
20649 __pyx_t_7 = 0;
20650 }
20651 __pyx_L8:;
20652
20653 /* "pysam/libcbcf.pyx":949
20654 * null_value = (None,)*value_count
20655 *
20656 * bcf_format_set_value(sample, bkey, null_value) # <<<<<<<<<<<<<<
20657 *
20658 *
20659 */
20660 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_format_set_value(__pyx_v_sample, __pyx_v_bkey, __pyx_v_null_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error)
20661 __Pyx_GOTREF(__pyx_t_7);
20662 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20663
20664 /* "pysam/libcbcf.pyx":922
20665 *
20666 *
20667 * cdef bcf_format_del_value(VariantRecordSample sample, key): # <<<<<<<<<<<<<<
20668 * if sample is None:
20669 * raise ValueError('sample must not be None')
20670 */
20671
20672 /* function exit code */
20673 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20674 goto __pyx_L0;
20675 __pyx_L1_error:;
20676 __Pyx_XDECREF(__pyx_t_2);
20677 __Pyx_XDECREF(__pyx_t_7);
20678 __Pyx_AddTraceback("pysam.libcbcf.bcf_format_del_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
20679 __pyx_r = 0;
20680 __pyx_L0:;
20681 __Pyx_XDECREF(__pyx_v_bkey);
20682 __Pyx_XDECREF(__pyx_v_null_value);
20683 __Pyx_XGIVEREF(__pyx_r);
20684 __Pyx_TraceReturn(__pyx_r, 0);
20685 __Pyx_RefNannyFinishContext();
20686 return __pyx_r;
20687 }
20688
20689 /* "pysam/libcbcf.pyx":952
20690 *
20691 *
20692 * cdef bcf_format_get_allele_indices(VariantRecordSample sample): # <<<<<<<<<<<<<<
20693 * if sample is None:
20694 * raise ValueError('sample must not be None')
20695 */
20696
20697 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_get_allele_indices(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_sample) {
20698 bcf_hdr_t *__pyx_v_hdr;
20699 bcf1_t *__pyx_v_r;
20700 int32_t __pyx_v_n;
20701 bcf_fmt_t *__pyx_v_fmt0;
20702 int __pyx_v_gt0;
20703 int8_t *__pyx_v_data8;
20704 int16_t *__pyx_v_data16;
20705 int32_t *__pyx_v_data32;
20706 int32_t __pyx_v_a;
20707 int32_t __pyx_v_nalleles;
20708 PyObject *__pyx_v_alleles = 0;
20709 int __pyx_v_i;
20710 PyObject *__pyx_r = NULL;
20711 __Pyx_TraceDeclarations
20712 __Pyx_RefNannyDeclarations
20713 int __pyx_t_1;
20714 PyObject *__pyx_t_2 = NULL;
20715 bcf_hdr_t *__pyx_t_3;
20716 bcf1_t *__pyx_t_4;
20717 uint32_t __pyx_t_5;
20718 int __pyx_t_6;
20719 bcf_fmt_t *__pyx_t_7;
20720 int __pyx_t_8;
20721 int __pyx_t_9;
20722 int __pyx_t_10;
20723 PyObject *__pyx_t_11 = NULL;
20724 int __pyx_t_12;
20725 int __pyx_lineno = 0;
20726 const char *__pyx_filename = NULL;
20727 int __pyx_clineno = 0;
20728 __Pyx_RefNannySetupContext("bcf_format_get_allele_indices", 1);
20729 __Pyx_TraceCall("bcf_format_get_allele_indices", __pyx_f[0], 952, 0, __PYX_ERR(0, 952, __pyx_L1_error));
20730
20731 /* "pysam/libcbcf.pyx":953
20732 *
20733 * cdef bcf_format_get_allele_indices(VariantRecordSample sample):
20734 * if sample is None: # <<<<<<<<<<<<<<
20735 * raise ValueError('sample must not be None')
20736 *
20737 */
20738 __pyx_t_1 = (((PyObject *)__pyx_v_sample) == Py_None);
20739 if (unlikely(__pyx_t_1)) {
20740
20741 /* "pysam/libcbcf.pyx":954
20742 * cdef bcf_format_get_allele_indices(VariantRecordSample sample):
20743 * if sample is None:
20744 * raise ValueError('sample must not be None') # <<<<<<<<<<<<<<
20745 *
20746 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
20747 */
20748 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 954, __pyx_L1_error)
20749 __Pyx_GOTREF(__pyx_t_2);
20750 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
20751 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20752 __PYX_ERR(0, 954, __pyx_L1_error)
20753
20754 /* "pysam/libcbcf.pyx":953
20755 *
20756 * cdef bcf_format_get_allele_indices(VariantRecordSample sample):
20757 * if sample is None: # <<<<<<<<<<<<<<
20758 * raise ValueError('sample must not be None')
20759 *
20760 */
20761 }
20762
20763 /* "pysam/libcbcf.pyx":956
20764 * raise ValueError('sample must not be None')
20765 *
20766 * cdef bcf_hdr_t *hdr = sample.record.header.ptr # <<<<<<<<<<<<<<
20767 * cdef bcf1_t *r = sample.record.ptr
20768 * cdef int32_t n = r.n_sample
20769 */
20770 __pyx_t_3 = __pyx_v_sample->record->header->ptr;
20771 __pyx_v_hdr = __pyx_t_3;
20772
20773 /* "pysam/libcbcf.pyx":957
20774 *
20775 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
20776 * cdef bcf1_t *r = sample.record.ptr # <<<<<<<<<<<<<<
20777 * cdef int32_t n = r.n_sample
20778 *
20779 */
20780 __pyx_t_4 = __pyx_v_sample->record->ptr;
20781 __pyx_v_r = __pyx_t_4;
20782
20783 /* "pysam/libcbcf.pyx":958
20784 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
20785 * cdef bcf1_t *r = sample.record.ptr
20786 * cdef int32_t n = r.n_sample # <<<<<<<<<<<<<<
20787 *
20788 * if bcf_unpack(r, BCF_UN_ALL) < 0:
20789 */
20790 __pyx_t_5 = __pyx_v_r->n_sample;
20791 __pyx_v_n = __pyx_t_5;
20792
20793 /* "pysam/libcbcf.pyx":960
20794 * cdef int32_t n = r.n_sample
20795 *
20796 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
20797 * raise ValueError('Error unpacking VariantRecord')
20798 *
20799 */
20800 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_ALL) < 0);
20801 if (unlikely(__pyx_t_1)) {
20802
20803 /* "pysam/libcbcf.pyx":961
20804 *
20805 * if bcf_unpack(r, BCF_UN_ALL) < 0:
20806 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
20807 *
20808 * if sample.index < 0 or sample.index >= n or not r.n_fmt:
20809 */
20810 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
20811 __Pyx_GOTREF(__pyx_t_2);
20812 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
20813 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20814 __PYX_ERR(0, 961, __pyx_L1_error)
20815
20816 /* "pysam/libcbcf.pyx":960
20817 * cdef int32_t n = r.n_sample
20818 *
20819 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
20820 * raise ValueError('Error unpacking VariantRecord')
20821 *
20822 */
20823 }
20824
20825 /* "pysam/libcbcf.pyx":963
20826 * raise ValueError('Error unpacking VariantRecord')
20827 *
20828 * if sample.index < 0 or sample.index >= n or not r.n_fmt: # <<<<<<<<<<<<<<
20829 * return ()
20830 *
20831 */
20832 __pyx_t_6 = (__pyx_v_sample->index < 0);
20833 if (!__pyx_t_6) {
20834 } else {
20835 __pyx_t_1 = __pyx_t_6;
20836 goto __pyx_L6_bool_binop_done;
20837 }
20838 __pyx_t_6 = (__pyx_v_sample->index >= __pyx_v_n);
20839 if (!__pyx_t_6) {
20840 } else {
20841 __pyx_t_1 = __pyx_t_6;
20842 goto __pyx_L6_bool_binop_done;
20843 }
20844 __pyx_t_6 = (!(__pyx_v_r->n_fmt != 0));
20845 __pyx_t_1 = __pyx_t_6;
20846 __pyx_L6_bool_binop_done:;
20847 if (__pyx_t_1) {
20848
20849 /* "pysam/libcbcf.pyx":964
20850 *
20851 * if sample.index < 0 or sample.index >= n or not r.n_fmt:
20852 * return () # <<<<<<<<<<<<<<
20853 *
20854 * cdef bcf_fmt_t *fmt0 = r.d.fmt
20855 */
20856 __Pyx_XDECREF(__pyx_r);
20857 __Pyx_INCREF(__pyx_empty_tuple);
20858 __pyx_r = __pyx_empty_tuple;
20859 goto __pyx_L0;
20860
20861 /* "pysam/libcbcf.pyx":963
20862 * raise ValueError('Error unpacking VariantRecord')
20863 *
20864 * if sample.index < 0 or sample.index >= n or not r.n_fmt: # <<<<<<<<<<<<<<
20865 * return ()
20866 *
20867 */
20868 }
20869
20870 /* "pysam/libcbcf.pyx":966
20871 * return ()
20872 *
20873 * cdef bcf_fmt_t *fmt0 = r.d.fmt # <<<<<<<<<<<<<<
20874 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
20875 *
20876 */
20877 __pyx_t_7 = __pyx_v_r->d.fmt;
20878 __pyx_v_fmt0 = __pyx_t_7;
20879
20880 /* "pysam/libcbcf.pyx":967
20881 *
20882 * cdef bcf_fmt_t *fmt0 = r.d.fmt
20883 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id) # <<<<<<<<<<<<<<
20884 *
20885 * if not gt0 or not fmt0.n:
20886 */
20887 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_is_gt_fmt(__pyx_v_hdr, __pyx_v_fmt0->id); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L1_error)
20888 __pyx_v_gt0 = __pyx_t_8;
20889
20890 /* "pysam/libcbcf.pyx":969
20891 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
20892 *
20893 * if not gt0 or not fmt0.n: # <<<<<<<<<<<<<<
20894 * return ()
20895 *
20896 */
20897 __pyx_t_6 = (!(__pyx_v_gt0 != 0));
20898 if (!__pyx_t_6) {
20899 } else {
20900 __pyx_t_1 = __pyx_t_6;
20901 goto __pyx_L10_bool_binop_done;
20902 }
20903 __pyx_t_6 = (!(__pyx_v_fmt0->n != 0));
20904 __pyx_t_1 = __pyx_t_6;
20905 __pyx_L10_bool_binop_done:;
20906 if (__pyx_t_1) {
20907
20908 /* "pysam/libcbcf.pyx":970
20909 *
20910 * if not gt0 or not fmt0.n:
20911 * return () # <<<<<<<<<<<<<<
20912 *
20913 * cdef int8_t *data8
20914 */
20915 __Pyx_XDECREF(__pyx_r);
20916 __Pyx_INCREF(__pyx_empty_tuple);
20917 __pyx_r = __pyx_empty_tuple;
20918 goto __pyx_L0;
20919
20920 /* "pysam/libcbcf.pyx":969
20921 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
20922 *
20923 * if not gt0 or not fmt0.n: # <<<<<<<<<<<<<<
20924 * return ()
20925 *
20926 */
20927 }
20928
20929 /* "pysam/libcbcf.pyx":975
20930 * cdef int16_t *data16
20931 * cdef int32_t *data32
20932 * cdef int32_t a, nalleles = r.n_allele # <<<<<<<<<<<<<<
20933 * cdef list alleles = []
20934 *
20935 */
20936 __pyx_t_5 = __pyx_v_r->n_allele;
20937 __pyx_v_nalleles = __pyx_t_5;
20938
20939 /* "pysam/libcbcf.pyx":976
20940 * cdef int32_t *data32
20941 * cdef int32_t a, nalleles = r.n_allele
20942 * cdef list alleles = [] # <<<<<<<<<<<<<<
20943 *
20944 * if fmt0.type == BCF_BT_INT8:
20945 */
20946 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
20947 __Pyx_GOTREF(__pyx_t_2);
20948 __pyx_v_alleles = ((PyObject*)__pyx_t_2);
20949 __pyx_t_2 = 0;
20950
20951 /* "pysam/libcbcf.pyx":978
20952 * cdef list alleles = []
20953 *
20954 * if fmt0.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
20955 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
20956 * for i in range(fmt0.n):
20957 */
20958 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT8);
20959 if (__pyx_t_1) {
20960
20961 /* "pysam/libcbcf.pyx":979
20962 *
20963 * if fmt0.type == BCF_BT_INT8:
20964 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
20965 * for i in range(fmt0.n):
20966 * if data8[i] == bcf_int8_vector_end:
20967 */
20968 __pyx_v_data8 = ((int8_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
20969
20970 /* "pysam/libcbcf.pyx":980
20971 * if fmt0.type == BCF_BT_INT8:
20972 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
20973 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
20974 * if data8[i] == bcf_int8_vector_end:
20975 * break
20976 */
20977 __pyx_t_8 = __pyx_v_fmt0->n;
20978 __pyx_t_9 = __pyx_t_8;
20979 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
20980 __pyx_v_i = __pyx_t_10;
20981
20982 /* "pysam/libcbcf.pyx":981
20983 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
20984 * for i in range(fmt0.n):
20985 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
20986 * break
20987 * elif data8[i] == bcf_gt_missing:
20988 */
20989 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) == bcf_int8_vector_end);
20990 if (__pyx_t_1) {
20991
20992 /* "pysam/libcbcf.pyx":982
20993 * for i in range(fmt0.n):
20994 * if data8[i] == bcf_int8_vector_end:
20995 * break # <<<<<<<<<<<<<<
20996 * elif data8[i] == bcf_gt_missing:
20997 * a = -1
20998 */
20999 goto __pyx_L14_break;
21000
21001 /* "pysam/libcbcf.pyx":981
21002 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
21003 * for i in range(fmt0.n):
21004 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
21005 * break
21006 * elif data8[i] == bcf_gt_missing:
21007 */
21008 }
21009
21010 /* "pysam/libcbcf.pyx":983
21011 * if data8[i] == bcf_int8_vector_end:
21012 * break
21013 * elif data8[i] == bcf_gt_missing: # <<<<<<<<<<<<<<
21014 * a = -1
21015 * else:
21016 */
21017 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) == bcf_gt_missing);
21018 if (__pyx_t_1) {
21019
21020 /* "pysam/libcbcf.pyx":984
21021 * break
21022 * elif data8[i] == bcf_gt_missing:
21023 * a = -1 # <<<<<<<<<<<<<<
21024 * else:
21025 * a = bcf_gt_allele(data8[i])
21026 */
21027 __pyx_v_a = -1;
21028
21029 /* "pysam/libcbcf.pyx":983
21030 * if data8[i] == bcf_int8_vector_end:
21031 * break
21032 * elif data8[i] == bcf_gt_missing: # <<<<<<<<<<<<<<
21033 * a = -1
21034 * else:
21035 */
21036 goto __pyx_L15;
21037 }
21038
21039 /* "pysam/libcbcf.pyx":986
21040 * a = -1
21041 * else:
21042 * a = bcf_gt_allele(data8[i]) # <<<<<<<<<<<<<<
21043 * alleles.append(a if 0 <= a < nalleles else None)
21044 * elif fmt0.type == BCF_BT_INT16:
21045 */
21046 /*else*/ {
21047 __pyx_v_a = bcf_gt_allele((__pyx_v_data8[__pyx_v_i]));
21048 }
21049 __pyx_L15:;
21050
21051 /* "pysam/libcbcf.pyx":987
21052 * else:
21053 * a = bcf_gt_allele(data8[i])
21054 * alleles.append(a if 0 <= a < nalleles else None) # <<<<<<<<<<<<<<
21055 * elif fmt0.type == BCF_BT_INT16:
21056 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21057 */
21058 __pyx_t_1 = (0 <= __pyx_v_a);
21059 if (__pyx_t_1) {
21060 __pyx_t_1 = (__pyx_v_a < __pyx_v_nalleles);
21061 }
21062 if (__pyx_t_1) {
21063 __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_a); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 987, __pyx_L1_error)
21064 __Pyx_GOTREF(__pyx_t_11);
21065 __pyx_t_2 = __pyx_t_11;
21066 __pyx_t_11 = 0;
21067 } else {
21068 __Pyx_INCREF(Py_None);
21069 __pyx_t_2 = Py_None;
21070 }
21071 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_alleles, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 987, __pyx_L1_error)
21072 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21073 }
21074 __pyx_L14_break:;
21075
21076 /* "pysam/libcbcf.pyx":978
21077 * cdef list alleles = []
21078 *
21079 * if fmt0.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
21080 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
21081 * for i in range(fmt0.n):
21082 */
21083 goto __pyx_L12;
21084 }
21085
21086 /* "pysam/libcbcf.pyx":988
21087 * a = bcf_gt_allele(data8[i])
21088 * alleles.append(a if 0 <= a < nalleles else None)
21089 * elif fmt0.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
21090 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21091 * for i in range(fmt0.n):
21092 */
21093 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT16);
21094 if (__pyx_t_1) {
21095
21096 /* "pysam/libcbcf.pyx":989
21097 * alleles.append(a if 0 <= a < nalleles else None)
21098 * elif fmt0.type == BCF_BT_INT16:
21099 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
21100 * for i in range(fmt0.n):
21101 * if data16[i] == bcf_int16_vector_end:
21102 */
21103 __pyx_v_data16 = ((int16_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
21104
21105 /* "pysam/libcbcf.pyx":990
21106 * elif fmt0.type == BCF_BT_INT16:
21107 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21108 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
21109 * if data16[i] == bcf_int16_vector_end:
21110 * break
21111 */
21112 __pyx_t_8 = __pyx_v_fmt0->n;
21113 __pyx_t_9 = __pyx_t_8;
21114 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
21115 __pyx_v_i = __pyx_t_10;
21116
21117 /* "pysam/libcbcf.pyx":991
21118 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21119 * for i in range(fmt0.n):
21120 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
21121 * break
21122 * elif data16[i] == bcf_gt_missing:
21123 */
21124 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) == bcf_int16_vector_end);
21125 if (__pyx_t_1) {
21126
21127 /* "pysam/libcbcf.pyx":992
21128 * for i in range(fmt0.n):
21129 * if data16[i] == bcf_int16_vector_end:
21130 * break # <<<<<<<<<<<<<<
21131 * elif data16[i] == bcf_gt_missing:
21132 * a = -1
21133 */
21134 goto __pyx_L17_break;
21135
21136 /* "pysam/libcbcf.pyx":991
21137 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21138 * for i in range(fmt0.n):
21139 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
21140 * break
21141 * elif data16[i] == bcf_gt_missing:
21142 */
21143 }
21144
21145 /* "pysam/libcbcf.pyx":993
21146 * if data16[i] == bcf_int16_vector_end:
21147 * break
21148 * elif data16[i] == bcf_gt_missing: # <<<<<<<<<<<<<<
21149 * a = -1
21150 * else:
21151 */
21152 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) == bcf_gt_missing);
21153 if (__pyx_t_1) {
21154
21155 /* "pysam/libcbcf.pyx":994
21156 * break
21157 * elif data16[i] == bcf_gt_missing:
21158 * a = -1 # <<<<<<<<<<<<<<
21159 * else:
21160 * a = bcf_gt_allele(data16[i])
21161 */
21162 __pyx_v_a = -1;
21163
21164 /* "pysam/libcbcf.pyx":993
21165 * if data16[i] == bcf_int16_vector_end:
21166 * break
21167 * elif data16[i] == bcf_gt_missing: # <<<<<<<<<<<<<<
21168 * a = -1
21169 * else:
21170 */
21171 goto __pyx_L18;
21172 }
21173
21174 /* "pysam/libcbcf.pyx":996
21175 * a = -1
21176 * else:
21177 * a = bcf_gt_allele(data16[i]) # <<<<<<<<<<<<<<
21178 * alleles.append(a if 0 <= a < nalleles else None)
21179 * elif fmt0.type == BCF_BT_INT32:
21180 */
21181 /*else*/ {
21182 __pyx_v_a = bcf_gt_allele((__pyx_v_data16[__pyx_v_i]));
21183 }
21184 __pyx_L18:;
21185
21186 /* "pysam/libcbcf.pyx":997
21187 * else:
21188 * a = bcf_gt_allele(data16[i])
21189 * alleles.append(a if 0 <= a < nalleles else None) # <<<<<<<<<<<<<<
21190 * elif fmt0.type == BCF_BT_INT32:
21191 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21192 */
21193 __pyx_t_1 = (0 <= __pyx_v_a);
21194 if (__pyx_t_1) {
21195 __pyx_t_1 = (__pyx_v_a < __pyx_v_nalleles);
21196 }
21197 if (__pyx_t_1) {
21198 __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_a); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 997, __pyx_L1_error)
21199 __Pyx_GOTREF(__pyx_t_11);
21200 __pyx_t_2 = __pyx_t_11;
21201 __pyx_t_11 = 0;
21202 } else {
21203 __Pyx_INCREF(Py_None);
21204 __pyx_t_2 = Py_None;
21205 }
21206 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_alleles, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 997, __pyx_L1_error)
21207 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21208 }
21209 __pyx_L17_break:;
21210
21211 /* "pysam/libcbcf.pyx":988
21212 * a = bcf_gt_allele(data8[i])
21213 * alleles.append(a if 0 <= a < nalleles else None)
21214 * elif fmt0.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
21215 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21216 * for i in range(fmt0.n):
21217 */
21218 goto __pyx_L12;
21219 }
21220
21221 /* "pysam/libcbcf.pyx":998
21222 * a = bcf_gt_allele(data16[i])
21223 * alleles.append(a if 0 <= a < nalleles else None)
21224 * elif fmt0.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
21225 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21226 * for i in range(fmt0.n):
21227 */
21228 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT32);
21229 if (__pyx_t_1) {
21230
21231 /* "pysam/libcbcf.pyx":999
21232 * alleles.append(a if 0 <= a < nalleles else None)
21233 * elif fmt0.type == BCF_BT_INT32:
21234 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
21235 * for i in range(fmt0.n):
21236 * if data32[i] == bcf_int32_vector_end:
21237 */
21238 __pyx_v_data32 = ((int32_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
21239
21240 /* "pysam/libcbcf.pyx":1000
21241 * elif fmt0.type == BCF_BT_INT32:
21242 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21243 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
21244 * if data32[i] == bcf_int32_vector_end:
21245 * break
21246 */
21247 __pyx_t_8 = __pyx_v_fmt0->n;
21248 __pyx_t_9 = __pyx_t_8;
21249 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
21250 __pyx_v_i = __pyx_t_10;
21251
21252 /* "pysam/libcbcf.pyx":1001
21253 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21254 * for i in range(fmt0.n):
21255 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
21256 * break
21257 * elif data32[i] == bcf_gt_missing:
21258 */
21259 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) == bcf_int32_vector_end);
21260 if (__pyx_t_1) {
21261
21262 /* "pysam/libcbcf.pyx":1002
21263 * for i in range(fmt0.n):
21264 * if data32[i] == bcf_int32_vector_end:
21265 * break # <<<<<<<<<<<<<<
21266 * elif data32[i] == bcf_gt_missing:
21267 * a = -1
21268 */
21269 goto __pyx_L20_break;
21270
21271 /* "pysam/libcbcf.pyx":1001
21272 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21273 * for i in range(fmt0.n):
21274 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
21275 * break
21276 * elif data32[i] == bcf_gt_missing:
21277 */
21278 }
21279
21280 /* "pysam/libcbcf.pyx":1003
21281 * if data32[i] == bcf_int32_vector_end:
21282 * break
21283 * elif data32[i] == bcf_gt_missing: # <<<<<<<<<<<<<<
21284 * a = -1
21285 * else:
21286 */
21287 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) == bcf_gt_missing);
21288 if (__pyx_t_1) {
21289
21290 /* "pysam/libcbcf.pyx":1004
21291 * break
21292 * elif data32[i] == bcf_gt_missing:
21293 * a = -1 # <<<<<<<<<<<<<<
21294 * else:
21295 * a = bcf_gt_allele(data32[i])
21296 */
21297 __pyx_v_a = -1;
21298
21299 /* "pysam/libcbcf.pyx":1003
21300 * if data32[i] == bcf_int32_vector_end:
21301 * break
21302 * elif data32[i] == bcf_gt_missing: # <<<<<<<<<<<<<<
21303 * a = -1
21304 * else:
21305 */
21306 goto __pyx_L21;
21307 }
21308
21309 /* "pysam/libcbcf.pyx":1006
21310 * a = -1
21311 * else:
21312 * a = bcf_gt_allele(data32[i]) # <<<<<<<<<<<<<<
21313 * alleles.append(a if 0 <= a < nalleles else None)
21314 *
21315 */
21316 /*else*/ {
21317 __pyx_v_a = bcf_gt_allele((__pyx_v_data32[__pyx_v_i]));
21318 }
21319 __pyx_L21:;
21320
21321 /* "pysam/libcbcf.pyx":1007
21322 * else:
21323 * a = bcf_gt_allele(data32[i])
21324 * alleles.append(a if 0 <= a < nalleles else None) # <<<<<<<<<<<<<<
21325 *
21326 * return tuple(alleles)
21327 */
21328 __pyx_t_1 = (0 <= __pyx_v_a);
21329 if (__pyx_t_1) {
21330 __pyx_t_1 = (__pyx_v_a < __pyx_v_nalleles);
21331 }
21332 if (__pyx_t_1) {
21333 __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_a); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1007, __pyx_L1_error)
21334 __Pyx_GOTREF(__pyx_t_11);
21335 __pyx_t_2 = __pyx_t_11;
21336 __pyx_t_11 = 0;
21337 } else {
21338 __Pyx_INCREF(Py_None);
21339 __pyx_t_2 = Py_None;
21340 }
21341 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_alleles, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1007, __pyx_L1_error)
21342 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21343 }
21344 __pyx_L20_break:;
21345
21346 /* "pysam/libcbcf.pyx":998
21347 * a = bcf_gt_allele(data16[i])
21348 * alleles.append(a if 0 <= a < nalleles else None)
21349 * elif fmt0.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
21350 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21351 * for i in range(fmt0.n):
21352 */
21353 }
21354 __pyx_L12:;
21355
21356 /* "pysam/libcbcf.pyx":1009
21357 * alleles.append(a if 0 <= a < nalleles else None)
21358 *
21359 * return tuple(alleles) # <<<<<<<<<<<<<<
21360 *
21361 *
21362 */
21363 __Pyx_XDECREF(__pyx_r);
21364 __pyx_t_2 = PyList_AsTuple(__pyx_v_alleles); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
21365 __Pyx_GOTREF(__pyx_t_2);
21366 __pyx_r = __pyx_t_2;
21367 __pyx_t_2 = 0;
21368 goto __pyx_L0;
21369
21370 /* "pysam/libcbcf.pyx":952
21371 *
21372 *
21373 * cdef bcf_format_get_allele_indices(VariantRecordSample sample): # <<<<<<<<<<<<<<
21374 * if sample is None:
21375 * raise ValueError('sample must not be None')
21376 */
21377
21378 /* function exit code */
21379 __pyx_L1_error:;
21380 __Pyx_XDECREF(__pyx_t_2);
21381 __Pyx_XDECREF(__pyx_t_11);
21382 __Pyx_AddTraceback("pysam.libcbcf.bcf_format_get_allele_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
21383 __pyx_r = 0;
21384 __pyx_L0:;
21385 __Pyx_XDECREF(__pyx_v_alleles);
21386 __Pyx_XGIVEREF(__pyx_r);
21387 __Pyx_TraceReturn(__pyx_r, 0);
21388 __Pyx_RefNannyFinishContext();
21389 return __pyx_r;
21390 }
21391
21392 /* "pysam/libcbcf.pyx":1012
21393 *
21394 *
21395 * cdef bcf_format_get_alleles(VariantRecordSample sample): # <<<<<<<<<<<<<<
21396 * if sample is None:
21397 * raise ValueError('sample must not be None')
21398 */
21399
21400 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_format_get_alleles(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_sample) {
21401 bcf_hdr_t *__pyx_v_hdr;
21402 bcf1_t *__pyx_v_r;
21403 int32_t __pyx_v_nsamples;
21404 int32_t __pyx_v_nalleles;
21405 bcf_fmt_t *__pyx_v_fmt0;
21406 int __pyx_v_gt0;
21407 int32_t __pyx_v_a;
21408 int8_t *__pyx_v_data8;
21409 int16_t *__pyx_v_data16;
21410 int32_t *__pyx_v_data32;
21411 PyObject *__pyx_v_alleles = NULL;
21412 int __pyx_v_i;
21413 PyObject *__pyx_r = NULL;
21414 __Pyx_TraceDeclarations
21415 __Pyx_RefNannyDeclarations
21416 int __pyx_t_1;
21417 PyObject *__pyx_t_2 = NULL;
21418 bcf_hdr_t *__pyx_t_3;
21419 bcf1_t *__pyx_t_4;
21420 uint32_t __pyx_t_5;
21421 int __pyx_t_6;
21422 bcf_fmt_t *__pyx_t_7;
21423 int __pyx_t_8;
21424 int __pyx_t_9;
21425 int __pyx_t_10;
21426 PyObject *__pyx_t_11 = NULL;
21427 int __pyx_t_12;
21428 int __pyx_lineno = 0;
21429 const char *__pyx_filename = NULL;
21430 int __pyx_clineno = 0;
21431 __Pyx_RefNannySetupContext("bcf_format_get_alleles", 1);
21432 __Pyx_TraceCall("bcf_format_get_alleles", __pyx_f[0], 1012, 0, __PYX_ERR(0, 1012, __pyx_L1_error));
21433
21434 /* "pysam/libcbcf.pyx":1013
21435 *
21436 * cdef bcf_format_get_alleles(VariantRecordSample sample):
21437 * if sample is None: # <<<<<<<<<<<<<<
21438 * raise ValueError('sample must not be None')
21439 *
21440 */
21441 __pyx_t_1 = (((PyObject *)__pyx_v_sample) == Py_None);
21442 if (unlikely(__pyx_t_1)) {
21443
21444 /* "pysam/libcbcf.pyx":1014
21445 * cdef bcf_format_get_alleles(VariantRecordSample sample):
21446 * if sample is None:
21447 * raise ValueError('sample must not be None') # <<<<<<<<<<<<<<
21448 *
21449 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
21450 */
21451 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
21452 __Pyx_GOTREF(__pyx_t_2);
21453 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
21454 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21455 __PYX_ERR(0, 1014, __pyx_L1_error)
21456
21457 /* "pysam/libcbcf.pyx":1013
21458 *
21459 * cdef bcf_format_get_alleles(VariantRecordSample sample):
21460 * if sample is None: # <<<<<<<<<<<<<<
21461 * raise ValueError('sample must not be None')
21462 *
21463 */
21464 }
21465
21466 /* "pysam/libcbcf.pyx":1016
21467 * raise ValueError('sample must not be None')
21468 *
21469 * cdef bcf_hdr_t *hdr = sample.record.header.ptr # <<<<<<<<<<<<<<
21470 * cdef bcf1_t *r = sample.record.ptr
21471 * cdef int32_t nsamples = r.n_sample
21472 */
21473 __pyx_t_3 = __pyx_v_sample->record->header->ptr;
21474 __pyx_v_hdr = __pyx_t_3;
21475
21476 /* "pysam/libcbcf.pyx":1017
21477 *
21478 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
21479 * cdef bcf1_t *r = sample.record.ptr # <<<<<<<<<<<<<<
21480 * cdef int32_t nsamples = r.n_sample
21481 *
21482 */
21483 __pyx_t_4 = __pyx_v_sample->record->ptr;
21484 __pyx_v_r = __pyx_t_4;
21485
21486 /* "pysam/libcbcf.pyx":1018
21487 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
21488 * cdef bcf1_t *r = sample.record.ptr
21489 * cdef int32_t nsamples = r.n_sample # <<<<<<<<<<<<<<
21490 *
21491 * if bcf_unpack(r, BCF_UN_ALL) < 0:
21492 */
21493 __pyx_t_5 = __pyx_v_r->n_sample;
21494 __pyx_v_nsamples = __pyx_t_5;
21495
21496 /* "pysam/libcbcf.pyx":1020
21497 * cdef int32_t nsamples = r.n_sample
21498 *
21499 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
21500 * raise ValueError('Error unpacking VariantRecord')
21501 *
21502 */
21503 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_ALL) < 0);
21504 if (unlikely(__pyx_t_1)) {
21505
21506 /* "pysam/libcbcf.pyx":1021
21507 *
21508 * if bcf_unpack(r, BCF_UN_ALL) < 0:
21509 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
21510 *
21511 * cdef int32_t nalleles = r.n_allele
21512 */
21513 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error)
21514 __Pyx_GOTREF(__pyx_t_2);
21515 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
21516 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21517 __PYX_ERR(0, 1021, __pyx_L1_error)
21518
21519 /* "pysam/libcbcf.pyx":1020
21520 * cdef int32_t nsamples = r.n_sample
21521 *
21522 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
21523 * raise ValueError('Error unpacking VariantRecord')
21524 *
21525 */
21526 }
21527
21528 /* "pysam/libcbcf.pyx":1023
21529 * raise ValueError('Error unpacking VariantRecord')
21530 *
21531 * cdef int32_t nalleles = r.n_allele # <<<<<<<<<<<<<<
21532 *
21533 * if sample.index < 0 or sample.index >= nsamples or not r.n_fmt:
21534 */
21535 __pyx_t_5 = __pyx_v_r->n_allele;
21536 __pyx_v_nalleles = __pyx_t_5;
21537
21538 /* "pysam/libcbcf.pyx":1025
21539 * cdef int32_t nalleles = r.n_allele
21540 *
21541 * if sample.index < 0 or sample.index >= nsamples or not r.n_fmt: # <<<<<<<<<<<<<<
21542 * return ()
21543 *
21544 */
21545 __pyx_t_6 = (__pyx_v_sample->index < 0);
21546 if (!__pyx_t_6) {
21547 } else {
21548 __pyx_t_1 = __pyx_t_6;
21549 goto __pyx_L6_bool_binop_done;
21550 }
21551 __pyx_t_6 = (__pyx_v_sample->index >= __pyx_v_nsamples);
21552 if (!__pyx_t_6) {
21553 } else {
21554 __pyx_t_1 = __pyx_t_6;
21555 goto __pyx_L6_bool_binop_done;
21556 }
21557 __pyx_t_6 = (!(__pyx_v_r->n_fmt != 0));
21558 __pyx_t_1 = __pyx_t_6;
21559 __pyx_L6_bool_binop_done:;
21560 if (__pyx_t_1) {
21561
21562 /* "pysam/libcbcf.pyx":1026
21563 *
21564 * if sample.index < 0 or sample.index >= nsamples or not r.n_fmt:
21565 * return () # <<<<<<<<<<<<<<
21566 *
21567 * cdef bcf_fmt_t *fmt0 = r.d.fmt
21568 */
21569 __Pyx_XDECREF(__pyx_r);
21570 __Pyx_INCREF(__pyx_empty_tuple);
21571 __pyx_r = __pyx_empty_tuple;
21572 goto __pyx_L0;
21573
21574 /* "pysam/libcbcf.pyx":1025
21575 * cdef int32_t nalleles = r.n_allele
21576 *
21577 * if sample.index < 0 or sample.index >= nsamples or not r.n_fmt: # <<<<<<<<<<<<<<
21578 * return ()
21579 *
21580 */
21581 }
21582
21583 /* "pysam/libcbcf.pyx":1028
21584 * return ()
21585 *
21586 * cdef bcf_fmt_t *fmt0 = r.d.fmt # <<<<<<<<<<<<<<
21587 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
21588 *
21589 */
21590 __pyx_t_7 = __pyx_v_r->d.fmt;
21591 __pyx_v_fmt0 = __pyx_t_7;
21592
21593 /* "pysam/libcbcf.pyx":1029
21594 *
21595 * cdef bcf_fmt_t *fmt0 = r.d.fmt
21596 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id) # <<<<<<<<<<<<<<
21597 *
21598 * if not gt0 or not fmt0.n:
21599 */
21600 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_is_gt_fmt(__pyx_v_hdr, __pyx_v_fmt0->id); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L1_error)
21601 __pyx_v_gt0 = __pyx_t_8;
21602
21603 /* "pysam/libcbcf.pyx":1031
21604 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
21605 *
21606 * if not gt0 or not fmt0.n: # <<<<<<<<<<<<<<
21607 * return ()
21608 *
21609 */
21610 __pyx_t_6 = (!(__pyx_v_gt0 != 0));
21611 if (!__pyx_t_6) {
21612 } else {
21613 __pyx_t_1 = __pyx_t_6;
21614 goto __pyx_L10_bool_binop_done;
21615 }
21616 __pyx_t_6 = (!(__pyx_v_fmt0->n != 0));
21617 __pyx_t_1 = __pyx_t_6;
21618 __pyx_L10_bool_binop_done:;
21619 if (__pyx_t_1) {
21620
21621 /* "pysam/libcbcf.pyx":1032
21622 *
21623 * if not gt0 or not fmt0.n:
21624 * return () # <<<<<<<<<<<<<<
21625 *
21626 * cdef int32_t a
21627 */
21628 __Pyx_XDECREF(__pyx_r);
21629 __Pyx_INCREF(__pyx_empty_tuple);
21630 __pyx_r = __pyx_empty_tuple;
21631 goto __pyx_L0;
21632
21633 /* "pysam/libcbcf.pyx":1031
21634 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
21635 *
21636 * if not gt0 or not fmt0.n: # <<<<<<<<<<<<<<
21637 * return ()
21638 *
21639 */
21640 }
21641
21642 /* "pysam/libcbcf.pyx":1038
21643 * cdef int16_t *data16
21644 * cdef int32_t *data32
21645 * alleles = [] # <<<<<<<<<<<<<<
21646 * if fmt0.type == BCF_BT_INT8:
21647 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
21648 */
21649 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L1_error)
21650 __Pyx_GOTREF(__pyx_t_2);
21651 __pyx_v_alleles = ((PyObject*)__pyx_t_2);
21652 __pyx_t_2 = 0;
21653
21654 /* "pysam/libcbcf.pyx":1039
21655 * cdef int32_t *data32
21656 * alleles = []
21657 * if fmt0.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
21658 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
21659 * for i in range(fmt0.n):
21660 */
21661 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT8);
21662 if (__pyx_t_1) {
21663
21664 /* "pysam/libcbcf.pyx":1040
21665 * alleles = []
21666 * if fmt0.type == BCF_BT_INT8:
21667 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
21668 * for i in range(fmt0.n):
21669 * if data8[i] == bcf_int8_vector_end:
21670 */
21671 __pyx_v_data8 = ((int8_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
21672
21673 /* "pysam/libcbcf.pyx":1041
21674 * if fmt0.type == BCF_BT_INT8:
21675 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
21676 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
21677 * if data8[i] == bcf_int8_vector_end:
21678 * break
21679 */
21680 __pyx_t_8 = __pyx_v_fmt0->n;
21681 __pyx_t_9 = __pyx_t_8;
21682 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
21683 __pyx_v_i = __pyx_t_10;
21684
21685 /* "pysam/libcbcf.pyx":1042
21686 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
21687 * for i in range(fmt0.n):
21688 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
21689 * break
21690 * a = bcf_gt_allele(data8[i])
21691 */
21692 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) == bcf_int8_vector_end);
21693 if (__pyx_t_1) {
21694
21695 /* "pysam/libcbcf.pyx":1043
21696 * for i in range(fmt0.n):
21697 * if data8[i] == bcf_int8_vector_end:
21698 * break # <<<<<<<<<<<<<<
21699 * a = bcf_gt_allele(data8[i])
21700 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21701 */
21702 goto __pyx_L14_break;
21703
21704 /* "pysam/libcbcf.pyx":1042
21705 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
21706 * for i in range(fmt0.n):
21707 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
21708 * break
21709 * a = bcf_gt_allele(data8[i])
21710 */
21711 }
21712
21713 /* "pysam/libcbcf.pyx":1044
21714 * if data8[i] == bcf_int8_vector_end:
21715 * break
21716 * a = bcf_gt_allele(data8[i]) # <<<<<<<<<<<<<<
21717 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21718 * elif fmt0.type == BCF_BT_INT16:
21719 */
21720 __pyx_v_a = bcf_gt_allele((__pyx_v_data8[__pyx_v_i]));
21721
21722 /* "pysam/libcbcf.pyx":1045
21723 * break
21724 * a = bcf_gt_allele(data8[i])
21725 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None) # <<<<<<<<<<<<<<
21726 * elif fmt0.type == BCF_BT_INT16:
21727 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21728 */
21729 __pyx_t_1 = (0 <= __pyx_v_a);
21730 if (__pyx_t_1) {
21731 __pyx_t_1 = (__pyx_v_a < __pyx_v_nalleles);
21732 }
21733 if (__pyx_t_1) {
21734 __pyx_t_11 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_r->d.allele[__pyx_v_a]), NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1045, __pyx_L1_error)
21735 __Pyx_GOTREF(__pyx_t_11);
21736 __pyx_t_2 = __pyx_t_11;
21737 __pyx_t_11 = 0;
21738 } else {
21739 __Pyx_INCREF(Py_None);
21740 __pyx_t_2 = Py_None;
21741 }
21742 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_alleles, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1045, __pyx_L1_error)
21743 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21744 }
21745 __pyx_L14_break:;
21746
21747 /* "pysam/libcbcf.pyx":1039
21748 * cdef int32_t *data32
21749 * alleles = []
21750 * if fmt0.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
21751 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
21752 * for i in range(fmt0.n):
21753 */
21754 goto __pyx_L12;
21755 }
21756
21757 /* "pysam/libcbcf.pyx":1046
21758 * a = bcf_gt_allele(data8[i])
21759 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21760 * elif fmt0.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
21761 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21762 * for i in range(fmt0.n):
21763 */
21764 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT16);
21765 if (__pyx_t_1) {
21766
21767 /* "pysam/libcbcf.pyx":1047
21768 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21769 * elif fmt0.type == BCF_BT_INT16:
21770 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
21771 * for i in range(fmt0.n):
21772 * if data16[i] == bcf_int16_vector_end:
21773 */
21774 __pyx_v_data16 = ((int16_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
21775
21776 /* "pysam/libcbcf.pyx":1048
21777 * elif fmt0.type == BCF_BT_INT16:
21778 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21779 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
21780 * if data16[i] == bcf_int16_vector_end:
21781 * break
21782 */
21783 __pyx_t_8 = __pyx_v_fmt0->n;
21784 __pyx_t_9 = __pyx_t_8;
21785 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
21786 __pyx_v_i = __pyx_t_10;
21787
21788 /* "pysam/libcbcf.pyx":1049
21789 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21790 * for i in range(fmt0.n):
21791 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
21792 * break
21793 * a = bcf_gt_allele(data16[i])
21794 */
21795 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) == bcf_int16_vector_end);
21796 if (__pyx_t_1) {
21797
21798 /* "pysam/libcbcf.pyx":1050
21799 * for i in range(fmt0.n):
21800 * if data16[i] == bcf_int16_vector_end:
21801 * break # <<<<<<<<<<<<<<
21802 * a = bcf_gt_allele(data16[i])
21803 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21804 */
21805 goto __pyx_L17_break;
21806
21807 /* "pysam/libcbcf.pyx":1049
21808 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21809 * for i in range(fmt0.n):
21810 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
21811 * break
21812 * a = bcf_gt_allele(data16[i])
21813 */
21814 }
21815
21816 /* "pysam/libcbcf.pyx":1051
21817 * if data16[i] == bcf_int16_vector_end:
21818 * break
21819 * a = bcf_gt_allele(data16[i]) # <<<<<<<<<<<<<<
21820 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21821 * elif fmt0.type == BCF_BT_INT32:
21822 */
21823 __pyx_v_a = bcf_gt_allele((__pyx_v_data16[__pyx_v_i]));
21824
21825 /* "pysam/libcbcf.pyx":1052
21826 * break
21827 * a = bcf_gt_allele(data16[i])
21828 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None) # <<<<<<<<<<<<<<
21829 * elif fmt0.type == BCF_BT_INT32:
21830 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21831 */
21832 __pyx_t_1 = (0 <= __pyx_v_a);
21833 if (__pyx_t_1) {
21834 __pyx_t_1 = (__pyx_v_a < __pyx_v_nalleles);
21835 }
21836 if (__pyx_t_1) {
21837 __pyx_t_11 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_r->d.allele[__pyx_v_a]), NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1052, __pyx_L1_error)
21838 __Pyx_GOTREF(__pyx_t_11);
21839 __pyx_t_2 = __pyx_t_11;
21840 __pyx_t_11 = 0;
21841 } else {
21842 __Pyx_INCREF(Py_None);
21843 __pyx_t_2 = Py_None;
21844 }
21845 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_alleles, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1052, __pyx_L1_error)
21846 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21847 }
21848 __pyx_L17_break:;
21849
21850 /* "pysam/libcbcf.pyx":1046
21851 * a = bcf_gt_allele(data8[i])
21852 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21853 * elif fmt0.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
21854 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
21855 * for i in range(fmt0.n):
21856 */
21857 goto __pyx_L12;
21858 }
21859
21860 /* "pysam/libcbcf.pyx":1053
21861 * a = bcf_gt_allele(data16[i])
21862 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21863 * elif fmt0.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
21864 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21865 * for i in range(fmt0.n):
21866 */
21867 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT32);
21868 if (__pyx_t_1) {
21869
21870 /* "pysam/libcbcf.pyx":1054
21871 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21872 * elif fmt0.type == BCF_BT_INT32:
21873 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
21874 * for i in range(fmt0.n):
21875 * if data32[i] == bcf_int32_vector_end:
21876 */
21877 __pyx_v_data32 = ((int32_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
21878
21879 /* "pysam/libcbcf.pyx":1055
21880 * elif fmt0.type == BCF_BT_INT32:
21881 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21882 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
21883 * if data32[i] == bcf_int32_vector_end:
21884 * break
21885 */
21886 __pyx_t_8 = __pyx_v_fmt0->n;
21887 __pyx_t_9 = __pyx_t_8;
21888 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
21889 __pyx_v_i = __pyx_t_10;
21890
21891 /* "pysam/libcbcf.pyx":1056
21892 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21893 * for i in range(fmt0.n):
21894 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
21895 * break
21896 * a = bcf_gt_allele(data32[i])
21897 */
21898 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) == bcf_int32_vector_end);
21899 if (__pyx_t_1) {
21900
21901 /* "pysam/libcbcf.pyx":1057
21902 * for i in range(fmt0.n):
21903 * if data32[i] == bcf_int32_vector_end:
21904 * break # <<<<<<<<<<<<<<
21905 * a = bcf_gt_allele(data32[i])
21906 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21907 */
21908 goto __pyx_L20_break;
21909
21910 /* "pysam/libcbcf.pyx":1056
21911 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21912 * for i in range(fmt0.n):
21913 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
21914 * break
21915 * a = bcf_gt_allele(data32[i])
21916 */
21917 }
21918
21919 /* "pysam/libcbcf.pyx":1058
21920 * if data32[i] == bcf_int32_vector_end:
21921 * break
21922 * a = bcf_gt_allele(data32[i]) # <<<<<<<<<<<<<<
21923 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21924 * return tuple(alleles)
21925 */
21926 __pyx_v_a = bcf_gt_allele((__pyx_v_data32[__pyx_v_i]));
21927
21928 /* "pysam/libcbcf.pyx":1059
21929 * break
21930 * a = bcf_gt_allele(data32[i])
21931 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None) # <<<<<<<<<<<<<<
21932 * return tuple(alleles)
21933 *
21934 */
21935 __pyx_t_1 = (0 <= __pyx_v_a);
21936 if (__pyx_t_1) {
21937 __pyx_t_1 = (__pyx_v_a < __pyx_v_nalleles);
21938 }
21939 if (__pyx_t_1) {
21940 __pyx_t_11 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_r->d.allele[__pyx_v_a]), NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1059, __pyx_L1_error)
21941 __Pyx_GOTREF(__pyx_t_11);
21942 __pyx_t_2 = __pyx_t_11;
21943 __pyx_t_11 = 0;
21944 } else {
21945 __Pyx_INCREF(Py_None);
21946 __pyx_t_2 = Py_None;
21947 }
21948 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_alleles, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1059, __pyx_L1_error)
21949 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21950 }
21951 __pyx_L20_break:;
21952
21953 /* "pysam/libcbcf.pyx":1053
21954 * a = bcf_gt_allele(data16[i])
21955 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21956 * elif fmt0.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
21957 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
21958 * for i in range(fmt0.n):
21959 */
21960 }
21961 __pyx_L12:;
21962
21963 /* "pysam/libcbcf.pyx":1060
21964 * a = bcf_gt_allele(data32[i])
21965 * alleles.append(charptr_to_str(r.d.allele[a]) if 0 <= a < nalleles else None)
21966 * return tuple(alleles) # <<<<<<<<<<<<<<
21967 *
21968 *
21969 */
21970 __Pyx_XDECREF(__pyx_r);
21971 __pyx_t_2 = PyList_AsTuple(__pyx_v_alleles); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error)
21972 __Pyx_GOTREF(__pyx_t_2);
21973 __pyx_r = __pyx_t_2;
21974 __pyx_t_2 = 0;
21975 goto __pyx_L0;
21976
21977 /* "pysam/libcbcf.pyx":1012
21978 *
21979 *
21980 * cdef bcf_format_get_alleles(VariantRecordSample sample): # <<<<<<<<<<<<<<
21981 * if sample is None:
21982 * raise ValueError('sample must not be None')
21983 */
21984
21985 /* function exit code */
21986 __pyx_L1_error:;
21987 __Pyx_XDECREF(__pyx_t_2);
21988 __Pyx_XDECREF(__pyx_t_11);
21989 __Pyx_AddTraceback("pysam.libcbcf.bcf_format_get_alleles", __pyx_clineno, __pyx_lineno, __pyx_filename);
21990 __pyx_r = 0;
21991 __pyx_L0:;
21992 __Pyx_XDECREF(__pyx_v_alleles);
21993 __Pyx_XGIVEREF(__pyx_r);
21994 __Pyx_TraceReturn(__pyx_r, 0);
21995 __Pyx_RefNannyFinishContext();
21996 return __pyx_r;
21997 }
21998
21999 /* "pysam/libcbcf.pyx":1063
22000 *
22001 *
22002 * cdef bint bcf_sample_get_phased(VariantRecordSample sample): # <<<<<<<<<<<<<<
22003 * if sample is None:
22004 * raise ValueError('sample must not be None')
22005 */
22006
22007 static int __pyx_f_5pysam_7libcbcf_bcf_sample_get_phased(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_sample) {
22008 bcf_hdr_t *__pyx_v_hdr;
22009 bcf1_t *__pyx_v_r;
22010 int32_t __pyx_v_n;
22011 bcf_fmt_t *__pyx_v_fmt0;
22012 int __pyx_v_gt0;
22013 int8_t *__pyx_v_data8;
22014 int16_t *__pyx_v_data16;
22015 int32_t *__pyx_v_data32;
22016 int __pyx_v_phased;
22017 int __pyx_v_i;
22018 int __pyx_r;
22019 __Pyx_TraceDeclarations
22020 __Pyx_RefNannyDeclarations
22021 int __pyx_t_1;
22022 PyObject *__pyx_t_2 = NULL;
22023 bcf_hdr_t *__pyx_t_3;
22024 bcf1_t *__pyx_t_4;
22025 uint32_t __pyx_t_5;
22026 int __pyx_t_6;
22027 bcf_fmt_t *__pyx_t_7;
22028 int __pyx_t_8;
22029 int __pyx_t_9;
22030 int __pyx_t_10;
22031 int __pyx_lineno = 0;
22032 const char *__pyx_filename = NULL;
22033 int __pyx_clineno = 0;
22034 __Pyx_RefNannySetupContext("bcf_sample_get_phased", 1);
22035 __Pyx_TraceCall("bcf_sample_get_phased", __pyx_f[0], 1063, 0, __PYX_ERR(0, 1063, __pyx_L1_error));
22036
22037 /* "pysam/libcbcf.pyx":1064
22038 *
22039 * cdef bint bcf_sample_get_phased(VariantRecordSample sample):
22040 * if sample is None: # <<<<<<<<<<<<<<
22041 * raise ValueError('sample must not be None')
22042 *
22043 */
22044 __pyx_t_1 = (((PyObject *)__pyx_v_sample) == Py_None);
22045 if (unlikely(__pyx_t_1)) {
22046
22047 /* "pysam/libcbcf.pyx":1065
22048 * cdef bint bcf_sample_get_phased(VariantRecordSample sample):
22049 * if sample is None:
22050 * raise ValueError('sample must not be None') # <<<<<<<<<<<<<<
22051 *
22052 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
22053 */
22054 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
22055 __Pyx_GOTREF(__pyx_t_2);
22056 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
22057 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22058 __PYX_ERR(0, 1065, __pyx_L1_error)
22059
22060 /* "pysam/libcbcf.pyx":1064
22061 *
22062 * cdef bint bcf_sample_get_phased(VariantRecordSample sample):
22063 * if sample is None: # <<<<<<<<<<<<<<
22064 * raise ValueError('sample must not be None')
22065 *
22066 */
22067 }
22068
22069 /* "pysam/libcbcf.pyx":1067
22070 * raise ValueError('sample must not be None')
22071 *
22072 * cdef bcf_hdr_t *hdr = sample.record.header.ptr # <<<<<<<<<<<<<<
22073 * cdef bcf1_t *r = sample.record.ptr
22074 * cdef int32_t n = r.n_sample
22075 */
22076 __pyx_t_3 = __pyx_v_sample->record->header->ptr;
22077 __pyx_v_hdr = __pyx_t_3;
22078
22079 /* "pysam/libcbcf.pyx":1068
22080 *
22081 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
22082 * cdef bcf1_t *r = sample.record.ptr # <<<<<<<<<<<<<<
22083 * cdef int32_t n = r.n_sample
22084 *
22085 */
22086 __pyx_t_4 = __pyx_v_sample->record->ptr;
22087 __pyx_v_r = __pyx_t_4;
22088
22089 /* "pysam/libcbcf.pyx":1069
22090 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
22091 * cdef bcf1_t *r = sample.record.ptr
22092 * cdef int32_t n = r.n_sample # <<<<<<<<<<<<<<
22093 *
22094 * if bcf_unpack(r, BCF_UN_ALL) < 0:
22095 */
22096 __pyx_t_5 = __pyx_v_r->n_sample;
22097 __pyx_v_n = __pyx_t_5;
22098
22099 /* "pysam/libcbcf.pyx":1071
22100 * cdef int32_t n = r.n_sample
22101 *
22102 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
22103 * raise ValueError('Error unpacking VariantRecord')
22104 *
22105 */
22106 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_ALL) < 0);
22107 if (unlikely(__pyx_t_1)) {
22108
22109 /* "pysam/libcbcf.pyx":1072
22110 *
22111 * if bcf_unpack(r, BCF_UN_ALL) < 0:
22112 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
22113 *
22114 * if sample.index < 0 or sample.index >= n or not r.n_fmt:
22115 */
22116 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error)
22117 __Pyx_GOTREF(__pyx_t_2);
22118 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
22119 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22120 __PYX_ERR(0, 1072, __pyx_L1_error)
22121
22122 /* "pysam/libcbcf.pyx":1071
22123 * cdef int32_t n = r.n_sample
22124 *
22125 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
22126 * raise ValueError('Error unpacking VariantRecord')
22127 *
22128 */
22129 }
22130
22131 /* "pysam/libcbcf.pyx":1074
22132 * raise ValueError('Error unpacking VariantRecord')
22133 *
22134 * if sample.index < 0 or sample.index >= n or not r.n_fmt: # <<<<<<<<<<<<<<
22135 * return False
22136 *
22137 */
22138 __pyx_t_6 = (__pyx_v_sample->index < 0);
22139 if (!__pyx_t_6) {
22140 } else {
22141 __pyx_t_1 = __pyx_t_6;
22142 goto __pyx_L6_bool_binop_done;
22143 }
22144 __pyx_t_6 = (__pyx_v_sample->index >= __pyx_v_n);
22145 if (!__pyx_t_6) {
22146 } else {
22147 __pyx_t_1 = __pyx_t_6;
22148 goto __pyx_L6_bool_binop_done;
22149 }
22150 __pyx_t_6 = (!(__pyx_v_r->n_fmt != 0));
22151 __pyx_t_1 = __pyx_t_6;
22152 __pyx_L6_bool_binop_done:;
22153 if (__pyx_t_1) {
22154
22155 /* "pysam/libcbcf.pyx":1075
22156 *
22157 * if sample.index < 0 or sample.index >= n or not r.n_fmt:
22158 * return False # <<<<<<<<<<<<<<
22159 *
22160 * cdef bcf_fmt_t *fmt0 = r.d.fmt
22161 */
22162 __pyx_r = 0;
22163 goto __pyx_L0;
22164
22165 /* "pysam/libcbcf.pyx":1074
22166 * raise ValueError('Error unpacking VariantRecord')
22167 *
22168 * if sample.index < 0 or sample.index >= n or not r.n_fmt: # <<<<<<<<<<<<<<
22169 * return False
22170 *
22171 */
22172 }
22173
22174 /* "pysam/libcbcf.pyx":1077
22175 * return False
22176 *
22177 * cdef bcf_fmt_t *fmt0 = r.d.fmt # <<<<<<<<<<<<<<
22178 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
22179 *
22180 */
22181 __pyx_t_7 = __pyx_v_r->d.fmt;
22182 __pyx_v_fmt0 = __pyx_t_7;
22183
22184 /* "pysam/libcbcf.pyx":1078
22185 *
22186 * cdef bcf_fmt_t *fmt0 = r.d.fmt
22187 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id) # <<<<<<<<<<<<<<
22188 *
22189 * if not gt0 or not fmt0.n:
22190 */
22191 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_is_gt_fmt(__pyx_v_hdr, __pyx_v_fmt0->id); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1078, __pyx_L1_error)
22192 __pyx_v_gt0 = __pyx_t_8;
22193
22194 /* "pysam/libcbcf.pyx":1080
22195 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
22196 *
22197 * if not gt0 or not fmt0.n: # <<<<<<<<<<<<<<
22198 * return False
22199 *
22200 */
22201 __pyx_t_6 = (!(__pyx_v_gt0 != 0));
22202 if (!__pyx_t_6) {
22203 } else {
22204 __pyx_t_1 = __pyx_t_6;
22205 goto __pyx_L10_bool_binop_done;
22206 }
22207 __pyx_t_6 = (!(__pyx_v_fmt0->n != 0));
22208 __pyx_t_1 = __pyx_t_6;
22209 __pyx_L10_bool_binop_done:;
22210 if (__pyx_t_1) {
22211
22212 /* "pysam/libcbcf.pyx":1081
22213 *
22214 * if not gt0 or not fmt0.n:
22215 * return False # <<<<<<<<<<<<<<
22216 *
22217 * cdef int8_t *data8
22218 */
22219 __pyx_r = 0;
22220 goto __pyx_L0;
22221
22222 /* "pysam/libcbcf.pyx":1080
22223 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
22224 *
22225 * if not gt0 or not fmt0.n: # <<<<<<<<<<<<<<
22226 * return False
22227 *
22228 */
22229 }
22230
22231 /* "pysam/libcbcf.pyx":1087
22232 * cdef int32_t *data32
22233 *
22234 * cdef bint phased = False # <<<<<<<<<<<<<<
22235 *
22236 * if fmt0.type == BCF_BT_INT8:
22237 */
22238 __pyx_v_phased = 0;
22239
22240 /* "pysam/libcbcf.pyx":1089
22241 * cdef bint phased = False
22242 *
22243 * if fmt0.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
22244 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
22245 * for i in range(fmt0.n):
22246 */
22247 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT8);
22248 if (__pyx_t_1) {
22249
22250 /* "pysam/libcbcf.pyx":1090
22251 *
22252 * if fmt0.type == BCF_BT_INT8:
22253 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
22254 * for i in range(fmt0.n):
22255 * if data8[i] == bcf_int8_vector_end:
22256 */
22257 __pyx_v_data8 = ((int8_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
22258
22259 /* "pysam/libcbcf.pyx":1091
22260 * if fmt0.type == BCF_BT_INT8:
22261 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
22262 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
22263 * if data8[i] == bcf_int8_vector_end:
22264 * break
22265 */
22266 __pyx_t_8 = __pyx_v_fmt0->n;
22267 __pyx_t_9 = __pyx_t_8;
22268 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
22269 __pyx_v_i = __pyx_t_10;
22270
22271 /* "pysam/libcbcf.pyx":1092
22272 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
22273 * for i in range(fmt0.n):
22274 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
22275 * break
22276 * elif data8[i] == bcf_int8_missing:
22277 */
22278 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) == bcf_int8_vector_end);
22279 if (__pyx_t_1) {
22280
22281 /* "pysam/libcbcf.pyx":1093
22282 * for i in range(fmt0.n):
22283 * if data8[i] == bcf_int8_vector_end:
22284 * break # <<<<<<<<<<<<<<
22285 * elif data8[i] == bcf_int8_missing:
22286 * continue
22287 */
22288 goto __pyx_L14_break;
22289
22290 /* "pysam/libcbcf.pyx":1092
22291 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
22292 * for i in range(fmt0.n):
22293 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
22294 * break
22295 * elif data8[i] == bcf_int8_missing:
22296 */
22297 }
22298
22299 /* "pysam/libcbcf.pyx":1094
22300 * if data8[i] == bcf_int8_vector_end:
22301 * break
22302 * elif data8[i] == bcf_int8_missing: # <<<<<<<<<<<<<<
22303 * continue
22304 * elif i and not bcf_gt_is_phased(data8[i]):
22305 */
22306 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) == bcf_int8_missing);
22307 if (__pyx_t_1) {
22308
22309 /* "pysam/libcbcf.pyx":1095
22310 * break
22311 * elif data8[i] == bcf_int8_missing:
22312 * continue # <<<<<<<<<<<<<<
22313 * elif i and not bcf_gt_is_phased(data8[i]):
22314 * return False
22315 */
22316 goto __pyx_L13_continue;
22317
22318 /* "pysam/libcbcf.pyx":1094
22319 * if data8[i] == bcf_int8_vector_end:
22320 * break
22321 * elif data8[i] == bcf_int8_missing: # <<<<<<<<<<<<<<
22322 * continue
22323 * elif i and not bcf_gt_is_phased(data8[i]):
22324 */
22325 }
22326
22327 /* "pysam/libcbcf.pyx":1096
22328 * elif data8[i] == bcf_int8_missing:
22329 * continue
22330 * elif i and not bcf_gt_is_phased(data8[i]): # <<<<<<<<<<<<<<
22331 * return False
22332 * else:
22333 */
22334 __pyx_t_6 = (__pyx_v_i != 0);
22335 if (__pyx_t_6) {
22336 } else {
22337 __pyx_t_1 = __pyx_t_6;
22338 goto __pyx_L16_bool_binop_done;
22339 }
22340 __pyx_t_6 = (!(bcf_gt_is_phased((__pyx_v_data8[__pyx_v_i])) != 0));
22341 __pyx_t_1 = __pyx_t_6;
22342 __pyx_L16_bool_binop_done:;
22343 if (__pyx_t_1) {
22344
22345 /* "pysam/libcbcf.pyx":1097
22346 * continue
22347 * elif i and not bcf_gt_is_phased(data8[i]):
22348 * return False # <<<<<<<<<<<<<<
22349 * else:
22350 * phased = True
22351 */
22352 __pyx_r = 0;
22353 goto __pyx_L0;
22354
22355 /* "pysam/libcbcf.pyx":1096
22356 * elif data8[i] == bcf_int8_missing:
22357 * continue
22358 * elif i and not bcf_gt_is_phased(data8[i]): # <<<<<<<<<<<<<<
22359 * return False
22360 * else:
22361 */
22362 }
22363
22364 /* "pysam/libcbcf.pyx":1099
22365 * return False
22366 * else:
22367 * phased = True # <<<<<<<<<<<<<<
22368 * elif fmt0.type == BCF_BT_INT16:
22369 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
22370 */
22371 /*else*/ {
22372 __pyx_v_phased = 1;
22373 }
22374 __pyx_L13_continue:;
22375 }
22376 __pyx_L14_break:;
22377
22378 /* "pysam/libcbcf.pyx":1089
22379 * cdef bint phased = False
22380 *
22381 * if fmt0.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
22382 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
22383 * for i in range(fmt0.n):
22384 */
22385 goto __pyx_L12;
22386 }
22387
22388 /* "pysam/libcbcf.pyx":1100
22389 * else:
22390 * phased = True
22391 * elif fmt0.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
22392 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
22393 * for i in range(fmt0.n):
22394 */
22395 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT16);
22396 if (__pyx_t_1) {
22397
22398 /* "pysam/libcbcf.pyx":1101
22399 * phased = True
22400 * elif fmt0.type == BCF_BT_INT16:
22401 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
22402 * for i in range(fmt0.n):
22403 * if data16[i] == bcf_int16_vector_end:
22404 */
22405 __pyx_v_data16 = ((int16_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
22406
22407 /* "pysam/libcbcf.pyx":1102
22408 * elif fmt0.type == BCF_BT_INT16:
22409 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
22410 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
22411 * if data16[i] == bcf_int16_vector_end:
22412 * break
22413 */
22414 __pyx_t_8 = __pyx_v_fmt0->n;
22415 __pyx_t_9 = __pyx_t_8;
22416 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
22417 __pyx_v_i = __pyx_t_10;
22418
22419 /* "pysam/libcbcf.pyx":1103
22420 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
22421 * for i in range(fmt0.n):
22422 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
22423 * break
22424 * elif data16[i] == bcf_int16_missing:
22425 */
22426 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) == bcf_int16_vector_end);
22427 if (__pyx_t_1) {
22428
22429 /* "pysam/libcbcf.pyx":1104
22430 * for i in range(fmt0.n):
22431 * if data16[i] == bcf_int16_vector_end:
22432 * break # <<<<<<<<<<<<<<
22433 * elif data16[i] == bcf_int16_missing:
22434 * continue
22435 */
22436 goto __pyx_L19_break;
22437
22438 /* "pysam/libcbcf.pyx":1103
22439 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
22440 * for i in range(fmt0.n):
22441 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
22442 * break
22443 * elif data16[i] == bcf_int16_missing:
22444 */
22445 }
22446
22447 /* "pysam/libcbcf.pyx":1105
22448 * if data16[i] == bcf_int16_vector_end:
22449 * break
22450 * elif data16[i] == bcf_int16_missing: # <<<<<<<<<<<<<<
22451 * continue
22452 * elif i and not bcf_gt_is_phased(data16[i]):
22453 */
22454 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) == bcf_int16_missing);
22455 if (__pyx_t_1) {
22456
22457 /* "pysam/libcbcf.pyx":1106
22458 * break
22459 * elif data16[i] == bcf_int16_missing:
22460 * continue # <<<<<<<<<<<<<<
22461 * elif i and not bcf_gt_is_phased(data16[i]):
22462 * return False
22463 */
22464 goto __pyx_L18_continue;
22465
22466 /* "pysam/libcbcf.pyx":1105
22467 * if data16[i] == bcf_int16_vector_end:
22468 * break
22469 * elif data16[i] == bcf_int16_missing: # <<<<<<<<<<<<<<
22470 * continue
22471 * elif i and not bcf_gt_is_phased(data16[i]):
22472 */
22473 }
22474
22475 /* "pysam/libcbcf.pyx":1107
22476 * elif data16[i] == bcf_int16_missing:
22477 * continue
22478 * elif i and not bcf_gt_is_phased(data16[i]): # <<<<<<<<<<<<<<
22479 * return False
22480 * else:
22481 */
22482 __pyx_t_6 = (__pyx_v_i != 0);
22483 if (__pyx_t_6) {
22484 } else {
22485 __pyx_t_1 = __pyx_t_6;
22486 goto __pyx_L21_bool_binop_done;
22487 }
22488 __pyx_t_6 = (!(bcf_gt_is_phased((__pyx_v_data16[__pyx_v_i])) != 0));
22489 __pyx_t_1 = __pyx_t_6;
22490 __pyx_L21_bool_binop_done:;
22491 if (__pyx_t_1) {
22492
22493 /* "pysam/libcbcf.pyx":1108
22494 * continue
22495 * elif i and not bcf_gt_is_phased(data16[i]):
22496 * return False # <<<<<<<<<<<<<<
22497 * else:
22498 * phased = True
22499 */
22500 __pyx_r = 0;
22501 goto __pyx_L0;
22502
22503 /* "pysam/libcbcf.pyx":1107
22504 * elif data16[i] == bcf_int16_missing:
22505 * continue
22506 * elif i and not bcf_gt_is_phased(data16[i]): # <<<<<<<<<<<<<<
22507 * return False
22508 * else:
22509 */
22510 }
22511
22512 /* "pysam/libcbcf.pyx":1110
22513 * return False
22514 * else:
22515 * phased = True # <<<<<<<<<<<<<<
22516 * elif fmt0.type == BCF_BT_INT32:
22517 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
22518 */
22519 /*else*/ {
22520 __pyx_v_phased = 1;
22521 }
22522 __pyx_L18_continue:;
22523 }
22524 __pyx_L19_break:;
22525
22526 /* "pysam/libcbcf.pyx":1100
22527 * else:
22528 * phased = True
22529 * elif fmt0.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
22530 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
22531 * for i in range(fmt0.n):
22532 */
22533 goto __pyx_L12;
22534 }
22535
22536 /* "pysam/libcbcf.pyx":1111
22537 * else:
22538 * phased = True
22539 * elif fmt0.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
22540 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
22541 * for i in range(fmt0.n):
22542 */
22543 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT32);
22544 if (__pyx_t_1) {
22545
22546 /* "pysam/libcbcf.pyx":1112
22547 * phased = True
22548 * elif fmt0.type == BCF_BT_INT32:
22549 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
22550 * for i in range(fmt0.n):
22551 * if data32[i] == bcf_int32_vector_end:
22552 */
22553 __pyx_v_data32 = ((int32_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
22554
22555 /* "pysam/libcbcf.pyx":1113
22556 * elif fmt0.type == BCF_BT_INT32:
22557 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
22558 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
22559 * if data32[i] == bcf_int32_vector_end:
22560 * break
22561 */
22562 __pyx_t_8 = __pyx_v_fmt0->n;
22563 __pyx_t_9 = __pyx_t_8;
22564 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
22565 __pyx_v_i = __pyx_t_10;
22566
22567 /* "pysam/libcbcf.pyx":1114
22568 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
22569 * for i in range(fmt0.n):
22570 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
22571 * break
22572 * elif data32[i] == bcf_int32_missing:
22573 */
22574 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) == bcf_int32_vector_end);
22575 if (__pyx_t_1) {
22576
22577 /* "pysam/libcbcf.pyx":1115
22578 * for i in range(fmt0.n):
22579 * if data32[i] == bcf_int32_vector_end:
22580 * break # <<<<<<<<<<<<<<
22581 * elif data32[i] == bcf_int32_missing:
22582 * continue
22583 */
22584 goto __pyx_L24_break;
22585
22586 /* "pysam/libcbcf.pyx":1114
22587 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
22588 * for i in range(fmt0.n):
22589 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
22590 * break
22591 * elif data32[i] == bcf_int32_missing:
22592 */
22593 }
22594
22595 /* "pysam/libcbcf.pyx":1116
22596 * if data32[i] == bcf_int32_vector_end:
22597 * break
22598 * elif data32[i] == bcf_int32_missing: # <<<<<<<<<<<<<<
22599 * continue
22600 * elif i and not bcf_gt_is_phased(data32[i]):
22601 */
22602 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) == bcf_int32_missing);
22603 if (__pyx_t_1) {
22604
22605 /* "pysam/libcbcf.pyx":1117
22606 * break
22607 * elif data32[i] == bcf_int32_missing:
22608 * continue # <<<<<<<<<<<<<<
22609 * elif i and not bcf_gt_is_phased(data32[i]):
22610 * return False
22611 */
22612 goto __pyx_L23_continue;
22613
22614 /* "pysam/libcbcf.pyx":1116
22615 * if data32[i] == bcf_int32_vector_end:
22616 * break
22617 * elif data32[i] == bcf_int32_missing: # <<<<<<<<<<<<<<
22618 * continue
22619 * elif i and not bcf_gt_is_phased(data32[i]):
22620 */
22621 }
22622
22623 /* "pysam/libcbcf.pyx":1118
22624 * elif data32[i] == bcf_int32_missing:
22625 * continue
22626 * elif i and not bcf_gt_is_phased(data32[i]): # <<<<<<<<<<<<<<
22627 * return False
22628 * else:
22629 */
22630 __pyx_t_6 = (__pyx_v_i != 0);
22631 if (__pyx_t_6) {
22632 } else {
22633 __pyx_t_1 = __pyx_t_6;
22634 goto __pyx_L26_bool_binop_done;
22635 }
22636 __pyx_t_6 = (!(bcf_gt_is_phased((__pyx_v_data32[__pyx_v_i])) != 0));
22637 __pyx_t_1 = __pyx_t_6;
22638 __pyx_L26_bool_binop_done:;
22639 if (__pyx_t_1) {
22640
22641 /* "pysam/libcbcf.pyx":1119
22642 * continue
22643 * elif i and not bcf_gt_is_phased(data32[i]):
22644 * return False # <<<<<<<<<<<<<<
22645 * else:
22646 * phased = True
22647 */
22648 __pyx_r = 0;
22649 goto __pyx_L0;
22650
22651 /* "pysam/libcbcf.pyx":1118
22652 * elif data32[i] == bcf_int32_missing:
22653 * continue
22654 * elif i and not bcf_gt_is_phased(data32[i]): # <<<<<<<<<<<<<<
22655 * return False
22656 * else:
22657 */
22658 }
22659
22660 /* "pysam/libcbcf.pyx":1121
22661 * return False
22662 * else:
22663 * phased = True # <<<<<<<<<<<<<<
22664 *
22665 * return phased
22666 */
22667 /*else*/ {
22668 __pyx_v_phased = 1;
22669 }
22670 __pyx_L23_continue:;
22671 }
22672 __pyx_L24_break:;
22673
22674 /* "pysam/libcbcf.pyx":1111
22675 * else:
22676 * phased = True
22677 * elif fmt0.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
22678 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
22679 * for i in range(fmt0.n):
22680 */
22681 }
22682 __pyx_L12:;
22683
22684 /* "pysam/libcbcf.pyx":1123
22685 * phased = True
22686 *
22687 * return phased # <<<<<<<<<<<<<<
22688 *
22689 *
22690 */
22691 __pyx_r = __pyx_v_phased;
22692 goto __pyx_L0;
22693
22694 /* "pysam/libcbcf.pyx":1063
22695 *
22696 *
22697 * cdef bint bcf_sample_get_phased(VariantRecordSample sample): # <<<<<<<<<<<<<<
22698 * if sample is None:
22699 * raise ValueError('sample must not be None')
22700 */
22701
22702 /* function exit code */
22703 __pyx_L1_error:;
22704 __Pyx_XDECREF(__pyx_t_2);
22705 __Pyx_AddTraceback("pysam.libcbcf.bcf_sample_get_phased", __pyx_clineno, __pyx_lineno, __pyx_filename);
22706 __pyx_r = -1;
22707 __pyx_L0:;
22708 __Pyx_TraceReturn(Py_None, 0);
22709 __Pyx_RefNannyFinishContext();
22710 return __pyx_r;
22711 }
22712
22713 /* "pysam/libcbcf.pyx":1126
22714 *
22715 *
22716 * cdef bcf_sample_set_phased(VariantRecordSample sample, bint phased): # <<<<<<<<<<<<<<
22717 * if sample is None:
22718 * raise ValueError('sample must not be None')
22719 */
22720
22721 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_sample_set_phased(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_sample, int __pyx_v_phased) {
22722 bcf_hdr_t *__pyx_v_hdr;
22723 bcf1_t *__pyx_v_r;
22724 int32_t __pyx_v_n;
22725 bcf_fmt_t *__pyx_v_fmt0;
22726 int __pyx_v_gt0;
22727 int8_t *__pyx_v_data8;
22728 int16_t *__pyx_v_data16;
22729 int32_t *__pyx_v_data32;
22730 int __pyx_v_i;
22731 PyObject *__pyx_r = NULL;
22732 __Pyx_TraceDeclarations
22733 __Pyx_RefNannyDeclarations
22734 int __pyx_t_1;
22735 PyObject *__pyx_t_2 = NULL;
22736 bcf_hdr_t *__pyx_t_3;
22737 bcf1_t *__pyx_t_4;
22738 uint32_t __pyx_t_5;
22739 int __pyx_t_6;
22740 bcf_fmt_t *__pyx_t_7;
22741 int __pyx_t_8;
22742 int __pyx_t_9;
22743 int __pyx_t_10;
22744 PyObject *__pyx_t_11 = NULL;
22745 PyObject *__pyx_t_12 = NULL;
22746 int32_t __pyx_t_13;
22747 int __pyx_lineno = 0;
22748 const char *__pyx_filename = NULL;
22749 int __pyx_clineno = 0;
22750 __Pyx_RefNannySetupContext("bcf_sample_set_phased", 1);
22751 __Pyx_TraceCall("bcf_sample_set_phased", __pyx_f[0], 1126, 0, __PYX_ERR(0, 1126, __pyx_L1_error));
22752
22753 /* "pysam/libcbcf.pyx":1127
22754 *
22755 * cdef bcf_sample_set_phased(VariantRecordSample sample, bint phased):
22756 * if sample is None: # <<<<<<<<<<<<<<
22757 * raise ValueError('sample must not be None')
22758 *
22759 */
22760 __pyx_t_1 = (((PyObject *)__pyx_v_sample) == Py_None);
22761 if (unlikely(__pyx_t_1)) {
22762
22763 /* "pysam/libcbcf.pyx":1128
22764 * cdef bcf_sample_set_phased(VariantRecordSample sample, bint phased):
22765 * if sample is None:
22766 * raise ValueError('sample must not be None') # <<<<<<<<<<<<<<
22767 *
22768 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
22769 */
22770 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
22771 __Pyx_GOTREF(__pyx_t_2);
22772 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
22773 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22774 __PYX_ERR(0, 1128, __pyx_L1_error)
22775
22776 /* "pysam/libcbcf.pyx":1127
22777 *
22778 * cdef bcf_sample_set_phased(VariantRecordSample sample, bint phased):
22779 * if sample is None: # <<<<<<<<<<<<<<
22780 * raise ValueError('sample must not be None')
22781 *
22782 */
22783 }
22784
22785 /* "pysam/libcbcf.pyx":1130
22786 * raise ValueError('sample must not be None')
22787 *
22788 * cdef bcf_hdr_t *hdr = sample.record.header.ptr # <<<<<<<<<<<<<<
22789 * cdef bcf1_t *r = sample.record.ptr
22790 * cdef int32_t n = r.n_sample
22791 */
22792 __pyx_t_3 = __pyx_v_sample->record->header->ptr;
22793 __pyx_v_hdr = __pyx_t_3;
22794
22795 /* "pysam/libcbcf.pyx":1131
22796 *
22797 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
22798 * cdef bcf1_t *r = sample.record.ptr # <<<<<<<<<<<<<<
22799 * cdef int32_t n = r.n_sample
22800 *
22801 */
22802 __pyx_t_4 = __pyx_v_sample->record->ptr;
22803 __pyx_v_r = __pyx_t_4;
22804
22805 /* "pysam/libcbcf.pyx":1132
22806 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
22807 * cdef bcf1_t *r = sample.record.ptr
22808 * cdef int32_t n = r.n_sample # <<<<<<<<<<<<<<
22809 *
22810 * if bcf_unpack(r, BCF_UN_ALL) < 0:
22811 */
22812 __pyx_t_5 = __pyx_v_r->n_sample;
22813 __pyx_v_n = __pyx_t_5;
22814
22815 /* "pysam/libcbcf.pyx":1134
22816 * cdef int32_t n = r.n_sample
22817 *
22818 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
22819 * raise ValueError('Error unpacking VariantRecord')
22820 *
22821 */
22822 __pyx_t_1 = (bcf_unpack(__pyx_v_r, BCF_UN_ALL) < 0);
22823 if (unlikely(__pyx_t_1)) {
22824
22825 /* "pysam/libcbcf.pyx":1135
22826 *
22827 * if bcf_unpack(r, BCF_UN_ALL) < 0:
22828 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
22829 *
22830 * if sample.index < 0 or sample.index >= n or not r.n_fmt:
22831 */
22832 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
22833 __Pyx_GOTREF(__pyx_t_2);
22834 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
22835 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22836 __PYX_ERR(0, 1135, __pyx_L1_error)
22837
22838 /* "pysam/libcbcf.pyx":1134
22839 * cdef int32_t n = r.n_sample
22840 *
22841 * if bcf_unpack(r, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
22842 * raise ValueError('Error unpacking VariantRecord')
22843 *
22844 */
22845 }
22846
22847 /* "pysam/libcbcf.pyx":1137
22848 * raise ValueError('Error unpacking VariantRecord')
22849 *
22850 * if sample.index < 0 or sample.index >= n or not r.n_fmt: # <<<<<<<<<<<<<<
22851 * return
22852 *
22853 */
22854 __pyx_t_6 = (__pyx_v_sample->index < 0);
22855 if (!__pyx_t_6) {
22856 } else {
22857 __pyx_t_1 = __pyx_t_6;
22858 goto __pyx_L6_bool_binop_done;
22859 }
22860 __pyx_t_6 = (__pyx_v_sample->index >= __pyx_v_n);
22861 if (!__pyx_t_6) {
22862 } else {
22863 __pyx_t_1 = __pyx_t_6;
22864 goto __pyx_L6_bool_binop_done;
22865 }
22866 __pyx_t_6 = (!(__pyx_v_r->n_fmt != 0));
22867 __pyx_t_1 = __pyx_t_6;
22868 __pyx_L6_bool_binop_done:;
22869 if (__pyx_t_1) {
22870
22871 /* "pysam/libcbcf.pyx":1138
22872 *
22873 * if sample.index < 0 or sample.index >= n or not r.n_fmt:
22874 * return # <<<<<<<<<<<<<<
22875 *
22876 * cdef bcf_fmt_t *fmt0 = r.d.fmt
22877 */
22878 __Pyx_XDECREF(__pyx_r);
22879 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22880 goto __pyx_L0;
22881
22882 /* "pysam/libcbcf.pyx":1137
22883 * raise ValueError('Error unpacking VariantRecord')
22884 *
22885 * if sample.index < 0 or sample.index >= n or not r.n_fmt: # <<<<<<<<<<<<<<
22886 * return
22887 *
22888 */
22889 }
22890
22891 /* "pysam/libcbcf.pyx":1140
22892 * return
22893 *
22894 * cdef bcf_fmt_t *fmt0 = r.d.fmt # <<<<<<<<<<<<<<
22895 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
22896 *
22897 */
22898 __pyx_t_7 = __pyx_v_r->d.fmt;
22899 __pyx_v_fmt0 = __pyx_t_7;
22900
22901 /* "pysam/libcbcf.pyx":1141
22902 *
22903 * cdef bcf_fmt_t *fmt0 = r.d.fmt
22904 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id) # <<<<<<<<<<<<<<
22905 *
22906 * if not gt0 or not fmt0.n:
22907 */
22908 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_is_gt_fmt(__pyx_v_hdr, __pyx_v_fmt0->id); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1141, __pyx_L1_error)
22909 __pyx_v_gt0 = __pyx_t_8;
22910
22911 /* "pysam/libcbcf.pyx":1143
22912 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
22913 *
22914 * if not gt0 or not fmt0.n: # <<<<<<<<<<<<<<
22915 * raise ValueError('Cannot set phased before genotype is set')
22916 *
22917 */
22918 __pyx_t_6 = (!(__pyx_v_gt0 != 0));
22919 if (!__pyx_t_6) {
22920 } else {
22921 __pyx_t_1 = __pyx_t_6;
22922 goto __pyx_L10_bool_binop_done;
22923 }
22924 __pyx_t_6 = (!(__pyx_v_fmt0->n != 0));
22925 __pyx_t_1 = __pyx_t_6;
22926 __pyx_L10_bool_binop_done:;
22927 if (unlikely(__pyx_t_1)) {
22928
22929 /* "pysam/libcbcf.pyx":1144
22930 *
22931 * if not gt0 or not fmt0.n:
22932 * raise ValueError('Cannot set phased before genotype is set') # <<<<<<<<<<<<<<
22933 *
22934 * cdef int8_t *data8
22935 */
22936 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
22937 __Pyx_GOTREF(__pyx_t_2);
22938 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
22939 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22940 __PYX_ERR(0, 1144, __pyx_L1_error)
22941
22942 /* "pysam/libcbcf.pyx":1143
22943 * cdef int gt0 = is_gt_fmt(hdr, fmt0.id)
22944 *
22945 * if not gt0 or not fmt0.n: # <<<<<<<<<<<<<<
22946 * raise ValueError('Cannot set phased before genotype is set')
22947 *
22948 */
22949 }
22950
22951 /* "pysam/libcbcf.pyx":1150
22952 * cdef int32_t *data32
22953 *
22954 * if fmt0.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
22955 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
22956 * for i in range(fmt0.n):
22957 */
22958 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT8);
22959 if (__pyx_t_1) {
22960
22961 /* "pysam/libcbcf.pyx":1151
22962 *
22963 * if fmt0.type == BCF_BT_INT8:
22964 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
22965 * for i in range(fmt0.n):
22966 * if data8[i] == bcf_int8_vector_end:
22967 */
22968 __pyx_v_data8 = ((int8_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
22969
22970 /* "pysam/libcbcf.pyx":1152
22971 * if fmt0.type == BCF_BT_INT8:
22972 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
22973 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
22974 * if data8[i] == bcf_int8_vector_end:
22975 * break
22976 */
22977 __pyx_t_8 = __pyx_v_fmt0->n;
22978 __pyx_t_9 = __pyx_t_8;
22979 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
22980 __pyx_v_i = __pyx_t_10;
22981
22982 /* "pysam/libcbcf.pyx":1153
22983 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
22984 * for i in range(fmt0.n):
22985 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
22986 * break
22987 * elif data8[i] == bcf_int8_missing:
22988 */
22989 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) == bcf_int8_vector_end);
22990 if (__pyx_t_1) {
22991
22992 /* "pysam/libcbcf.pyx":1154
22993 * for i in range(fmt0.n):
22994 * if data8[i] == bcf_int8_vector_end:
22995 * break # <<<<<<<<<<<<<<
22996 * elif data8[i] == bcf_int8_missing:
22997 * continue
22998 */
22999 goto __pyx_L14_break;
23000
23001 /* "pysam/libcbcf.pyx":1153
23002 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
23003 * for i in range(fmt0.n):
23004 * if data8[i] == bcf_int8_vector_end: # <<<<<<<<<<<<<<
23005 * break
23006 * elif data8[i] == bcf_int8_missing:
23007 */
23008 }
23009
23010 /* "pysam/libcbcf.pyx":1155
23011 * if data8[i] == bcf_int8_vector_end:
23012 * break
23013 * elif data8[i] == bcf_int8_missing: # <<<<<<<<<<<<<<
23014 * continue
23015 * elif i:
23016 */
23017 __pyx_t_1 = ((__pyx_v_data8[__pyx_v_i]) == bcf_int8_missing);
23018 if (__pyx_t_1) {
23019
23020 /* "pysam/libcbcf.pyx":1156
23021 * break
23022 * elif data8[i] == bcf_int8_missing:
23023 * continue # <<<<<<<<<<<<<<
23024 * elif i:
23025 * data8[i] = (data8[i] & 0xFE) | phased
23026 */
23027 goto __pyx_L13_continue;
23028
23029 /* "pysam/libcbcf.pyx":1155
23030 * if data8[i] == bcf_int8_vector_end:
23031 * break
23032 * elif data8[i] == bcf_int8_missing: # <<<<<<<<<<<<<<
23033 * continue
23034 * elif i:
23035 */
23036 }
23037
23038 /* "pysam/libcbcf.pyx":1157
23039 * elif data8[i] == bcf_int8_missing:
23040 * continue
23041 * elif i: # <<<<<<<<<<<<<<
23042 * data8[i] = (data8[i] & 0xFE) | phased
23043 * elif fmt0.type == BCF_BT_INT16:
23044 */
23045 __pyx_t_1 = (__pyx_v_i != 0);
23046 if (__pyx_t_1) {
23047
23048 /* "pysam/libcbcf.pyx":1158
23049 * continue
23050 * elif i:
23051 * data8[i] = (data8[i] & 0xFE) | phased # <<<<<<<<<<<<<<
23052 * elif fmt0.type == BCF_BT_INT16:
23053 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
23054 */
23055 (__pyx_v_data8[__pyx_v_i]) = (((__pyx_v_data8[__pyx_v_i]) & 0xFE) | __pyx_v_phased);
23056
23057 /* "pysam/libcbcf.pyx":1157
23058 * elif data8[i] == bcf_int8_missing:
23059 * continue
23060 * elif i: # <<<<<<<<<<<<<<
23061 * data8[i] = (data8[i] & 0xFE) | phased
23062 * elif fmt0.type == BCF_BT_INT16:
23063 */
23064 }
23065 __pyx_L13_continue:;
23066 }
23067 __pyx_L14_break:;
23068
23069 /* "pysam/libcbcf.pyx":1150
23070 * cdef int32_t *data32
23071 *
23072 * if fmt0.type == BCF_BT_INT8: # <<<<<<<<<<<<<<
23073 * data8 = <int8_t *>(fmt0.p + sample.index * fmt0.size)
23074 * for i in range(fmt0.n):
23075 */
23076 goto __pyx_L12;
23077 }
23078
23079 /* "pysam/libcbcf.pyx":1159
23080 * elif i:
23081 * data8[i] = (data8[i] & 0xFE) | phased
23082 * elif fmt0.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
23083 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
23084 * for i in range(fmt0.n):
23085 */
23086 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT16);
23087 if (__pyx_t_1) {
23088
23089 /* "pysam/libcbcf.pyx":1160
23090 * data8[i] = (data8[i] & 0xFE) | phased
23091 * elif fmt0.type == BCF_BT_INT16:
23092 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
23093 * for i in range(fmt0.n):
23094 * if data16[i] == bcf_int16_vector_end:
23095 */
23096 __pyx_v_data16 = ((int16_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
23097
23098 /* "pysam/libcbcf.pyx":1161
23099 * elif fmt0.type == BCF_BT_INT16:
23100 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
23101 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
23102 * if data16[i] == bcf_int16_vector_end:
23103 * break
23104 */
23105 __pyx_t_8 = __pyx_v_fmt0->n;
23106 __pyx_t_9 = __pyx_t_8;
23107 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
23108 __pyx_v_i = __pyx_t_10;
23109
23110 /* "pysam/libcbcf.pyx":1162
23111 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
23112 * for i in range(fmt0.n):
23113 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
23114 * break
23115 * elif data16[i] == bcf_int16_missing:
23116 */
23117 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) == bcf_int16_vector_end);
23118 if (__pyx_t_1) {
23119
23120 /* "pysam/libcbcf.pyx":1163
23121 * for i in range(fmt0.n):
23122 * if data16[i] == bcf_int16_vector_end:
23123 * break # <<<<<<<<<<<<<<
23124 * elif data16[i] == bcf_int16_missing:
23125 * continue
23126 */
23127 goto __pyx_L17_break;
23128
23129 /* "pysam/libcbcf.pyx":1162
23130 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
23131 * for i in range(fmt0.n):
23132 * if data16[i] == bcf_int16_vector_end: # <<<<<<<<<<<<<<
23133 * break
23134 * elif data16[i] == bcf_int16_missing:
23135 */
23136 }
23137
23138 /* "pysam/libcbcf.pyx":1164
23139 * if data16[i] == bcf_int16_vector_end:
23140 * break
23141 * elif data16[i] == bcf_int16_missing: # <<<<<<<<<<<<<<
23142 * continue
23143 * elif i:
23144 */
23145 __pyx_t_1 = ((__pyx_v_data16[__pyx_v_i]) == bcf_int16_missing);
23146 if (__pyx_t_1) {
23147
23148 /* "pysam/libcbcf.pyx":1165
23149 * break
23150 * elif data16[i] == bcf_int16_missing:
23151 * continue # <<<<<<<<<<<<<<
23152 * elif i:
23153 * data16[i] = (data16[i] & 0xFFFE) | phased
23154 */
23155 goto __pyx_L16_continue;
23156
23157 /* "pysam/libcbcf.pyx":1164
23158 * if data16[i] == bcf_int16_vector_end:
23159 * break
23160 * elif data16[i] == bcf_int16_missing: # <<<<<<<<<<<<<<
23161 * continue
23162 * elif i:
23163 */
23164 }
23165
23166 /* "pysam/libcbcf.pyx":1166
23167 * elif data16[i] == bcf_int16_missing:
23168 * continue
23169 * elif i: # <<<<<<<<<<<<<<
23170 * data16[i] = (data16[i] & 0xFFFE) | phased
23171 * elif fmt0.type == BCF_BT_INT32:
23172 */
23173 __pyx_t_1 = (__pyx_v_i != 0);
23174 if (__pyx_t_1) {
23175
23176 /* "pysam/libcbcf.pyx":1167
23177 * continue
23178 * elif i:
23179 * data16[i] = (data16[i] & 0xFFFE) | phased # <<<<<<<<<<<<<<
23180 * elif fmt0.type == BCF_BT_INT32:
23181 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
23182 */
23183 (__pyx_v_data16[__pyx_v_i]) = (((__pyx_v_data16[__pyx_v_i]) & 0xFFFE) | __pyx_v_phased);
23184
23185 /* "pysam/libcbcf.pyx":1166
23186 * elif data16[i] == bcf_int16_missing:
23187 * continue
23188 * elif i: # <<<<<<<<<<<<<<
23189 * data16[i] = (data16[i] & 0xFFFE) | phased
23190 * elif fmt0.type == BCF_BT_INT32:
23191 */
23192 }
23193 __pyx_L16_continue:;
23194 }
23195 __pyx_L17_break:;
23196
23197 /* "pysam/libcbcf.pyx":1159
23198 * elif i:
23199 * data8[i] = (data8[i] & 0xFE) | phased
23200 * elif fmt0.type == BCF_BT_INT16: # <<<<<<<<<<<<<<
23201 * data16 = <int16_t *>(fmt0.p + sample.index * fmt0.size)
23202 * for i in range(fmt0.n):
23203 */
23204 goto __pyx_L12;
23205 }
23206
23207 /* "pysam/libcbcf.pyx":1168
23208 * elif i:
23209 * data16[i] = (data16[i] & 0xFFFE) | phased
23210 * elif fmt0.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
23211 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
23212 * for i in range(fmt0.n):
23213 */
23214 __pyx_t_1 = (__pyx_v_fmt0->type == BCF_BT_INT32);
23215 if (__pyx_t_1) {
23216
23217 /* "pysam/libcbcf.pyx":1169
23218 * data16[i] = (data16[i] & 0xFFFE) | phased
23219 * elif fmt0.type == BCF_BT_INT32:
23220 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size) # <<<<<<<<<<<<<<
23221 * for i in range(fmt0.n):
23222 * if data32[i] == bcf_int32_vector_end:
23223 */
23224 __pyx_v_data32 = ((int32_t *)(__pyx_v_fmt0->p + (__pyx_v_sample->index * __pyx_v_fmt0->size)));
23225
23226 /* "pysam/libcbcf.pyx":1170
23227 * elif fmt0.type == BCF_BT_INT32:
23228 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
23229 * for i in range(fmt0.n): # <<<<<<<<<<<<<<
23230 * if data32[i] == bcf_int32_vector_end:
23231 * break
23232 */
23233 __pyx_t_8 = __pyx_v_fmt0->n;
23234 __pyx_t_9 = __pyx_t_8;
23235 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
23236 __pyx_v_i = __pyx_t_10;
23237
23238 /* "pysam/libcbcf.pyx":1171
23239 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
23240 * for i in range(fmt0.n):
23241 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
23242 * break
23243 * elif data32[i] == bcf_int32_missing:
23244 */
23245 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) == bcf_int32_vector_end);
23246 if (__pyx_t_1) {
23247
23248 /* "pysam/libcbcf.pyx":1172
23249 * for i in range(fmt0.n):
23250 * if data32[i] == bcf_int32_vector_end:
23251 * break # <<<<<<<<<<<<<<
23252 * elif data32[i] == bcf_int32_missing:
23253 * continue
23254 */
23255 goto __pyx_L20_break;
23256
23257 /* "pysam/libcbcf.pyx":1171
23258 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
23259 * for i in range(fmt0.n):
23260 * if data32[i] == bcf_int32_vector_end: # <<<<<<<<<<<<<<
23261 * break
23262 * elif data32[i] == bcf_int32_missing:
23263 */
23264 }
23265
23266 /* "pysam/libcbcf.pyx":1173
23267 * if data32[i] == bcf_int32_vector_end:
23268 * break
23269 * elif data32[i] == bcf_int32_missing: # <<<<<<<<<<<<<<
23270 * continue
23271 * elif i:
23272 */
23273 __pyx_t_1 = ((__pyx_v_data32[__pyx_v_i]) == bcf_int32_missing);
23274 if (__pyx_t_1) {
23275
23276 /* "pysam/libcbcf.pyx":1174
23277 * break
23278 * elif data32[i] == bcf_int32_missing:
23279 * continue # <<<<<<<<<<<<<<
23280 * elif i:
23281 * data32[i] = (data32[i] & 0xFFFFFFFE) | phased
23282 */
23283 goto __pyx_L19_continue;
23284
23285 /* "pysam/libcbcf.pyx":1173
23286 * if data32[i] == bcf_int32_vector_end:
23287 * break
23288 * elif data32[i] == bcf_int32_missing: # <<<<<<<<<<<<<<
23289 * continue
23290 * elif i:
23291 */
23292 }
23293
23294 /* "pysam/libcbcf.pyx":1175
23295 * elif data32[i] == bcf_int32_missing:
23296 * continue
23297 * elif i: # <<<<<<<<<<<<<<
23298 * data32[i] = (data32[i] & 0xFFFFFFFE) | phased
23299 *
23300 */
23301 __pyx_t_1 = (__pyx_v_i != 0);
23302 if (__pyx_t_1) {
23303
23304 /* "pysam/libcbcf.pyx":1176
23305 * continue
23306 * elif i:
23307 * data32[i] = (data32[i] & 0xFFFFFFFE) | phased # <<<<<<<<<<<<<<
23308 *
23309 *
23310 */
23311 __pyx_t_2 = __Pyx_PyInt_From_int32_t((__pyx_v_data32[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
23312 __Pyx_GOTREF(__pyx_t_2);
23313 __pyx_t_11 = PyNumber_And(__pyx_t_2, __pyx_int_4294967294); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1176, __pyx_L1_error)
23314 __Pyx_GOTREF(__pyx_t_11);
23315 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23316 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_phased); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
23317 __Pyx_GOTREF(__pyx_t_2);
23318 __pyx_t_12 = PyNumber_Or(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1176, __pyx_L1_error)
23319 __Pyx_GOTREF(__pyx_t_12);
23320 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23321 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23322 __pyx_t_13 = __Pyx_PyInt_As_int32_t(__pyx_t_12); if (unlikely((__pyx_t_13 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1176, __pyx_L1_error)
23323 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23324 (__pyx_v_data32[__pyx_v_i]) = __pyx_t_13;
23325
23326 /* "pysam/libcbcf.pyx":1175
23327 * elif data32[i] == bcf_int32_missing:
23328 * continue
23329 * elif i: # <<<<<<<<<<<<<<
23330 * data32[i] = (data32[i] & 0xFFFFFFFE) | phased
23331 *
23332 */
23333 }
23334 __pyx_L19_continue:;
23335 }
23336 __pyx_L20_break:;
23337
23338 /* "pysam/libcbcf.pyx":1168
23339 * elif i:
23340 * data16[i] = (data16[i] & 0xFFFE) | phased
23341 * elif fmt0.type == BCF_BT_INT32: # <<<<<<<<<<<<<<
23342 * data32 = <int32_t *>(fmt0.p + sample.index * fmt0.size)
23343 * for i in range(fmt0.n):
23344 */
23345 }
23346 __pyx_L12:;
23347
23348 /* "pysam/libcbcf.pyx":1126
23349 *
23350 *
23351 * cdef bcf_sample_set_phased(VariantRecordSample sample, bint phased): # <<<<<<<<<<<<<<
23352 * if sample is None:
23353 * raise ValueError('sample must not be None')
23354 */
23355
23356 /* function exit code */
23357 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23358 goto __pyx_L0;
23359 __pyx_L1_error:;
23360 __Pyx_XDECREF(__pyx_t_2);
23361 __Pyx_XDECREF(__pyx_t_11);
23362 __Pyx_XDECREF(__pyx_t_12);
23363 __Pyx_AddTraceback("pysam.libcbcf.bcf_sample_set_phased", __pyx_clineno, __pyx_lineno, __pyx_filename);
23364 __pyx_r = 0;
23365 __pyx_L0:;
23366 __Pyx_XGIVEREF(__pyx_r);
23367 __Pyx_TraceReturn(__pyx_r, 0);
23368 __Pyx_RefNannyFinishContext();
23369 return __pyx_r;
23370 }
23371
23372 /* "pysam/libcbcf.pyx":1179
23373 *
23374 *
23375 * cdef inline bcf_sync_end(VariantRecord record): # <<<<<<<<<<<<<<
23376 * cdef bcf_hdr_t *hdr = record.header.ptr
23377 * cdef bcf_info_t *info
23378 */
23379
23380 static CYTHON_INLINE PyObject *__pyx_f_5pysam_7libcbcf_bcf_sync_end(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record) {
23381 bcf_hdr_t *__pyx_v_hdr;
23382 bcf_info_t *__pyx_v_info;
23383 int __pyx_v_end_id;
23384 int __pyx_v_ref_len;
23385 PyObject *__pyx_r = NULL;
23386 __Pyx_TraceDeclarations
23387 __Pyx_RefNannyDeclarations
23388 bcf_hdr_t *__pyx_t_1;
23389 int __pyx_t_2;
23390 PyObject *__pyx_t_3 = NULL;
23391 int __pyx_t_4;
23392 Py_ssize_t __pyx_t_5;
23393 int __pyx_t_6;
23394 PyObject *__pyx_t_7 = NULL;
23395 PyObject *__pyx_t_8 = NULL;
23396 int __pyx_lineno = 0;
23397 const char *__pyx_filename = NULL;
23398 int __pyx_clineno = 0;
23399 __Pyx_RefNannySetupContext("bcf_sync_end", 1);
23400 __Pyx_TraceCall("bcf_sync_end", __pyx_f[0], 1179, 0, __PYX_ERR(0, 1179, __pyx_L1_error));
23401
23402 /* "pysam/libcbcf.pyx":1180
23403 *
23404 * cdef inline bcf_sync_end(VariantRecord record):
23405 * cdef bcf_hdr_t *hdr = record.header.ptr # <<<<<<<<<<<<<<
23406 * cdef bcf_info_t *info
23407 * cdef int end_id = bcf_header_get_info_id(record.header.ptr, b'END')
23408 */
23409 __pyx_t_1 = __pyx_v_record->header->ptr;
23410 __pyx_v_hdr = __pyx_t_1;
23411
23412 /* "pysam/libcbcf.pyx":1182
23413 * cdef bcf_hdr_t *hdr = record.header.ptr
23414 * cdef bcf_info_t *info
23415 * cdef int end_id = bcf_header_get_info_id(record.header.ptr, b'END') # <<<<<<<<<<<<<<
23416 * cdef int ref_len
23417 *
23418 */
23419 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_header_get_info_id(__pyx_v_record->header->ptr, __pyx_n_b_END); if (unlikely(__pyx_t_2 == ((int)-2) && PyErr_Occurred())) __PYX_ERR(0, 1182, __pyx_L1_error)
23420 __pyx_v_end_id = __pyx_t_2;
23421
23422 /* "pysam/libcbcf.pyx":1186
23423 *
23424 * # allow missing ref when instantiating a new record
23425 * if record.ref is not None: # <<<<<<<<<<<<<<
23426 * ref_len = len(record.ref)
23427 * else:
23428 */
23429 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_record), __pyx_n_s_ref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error)
23430 __Pyx_GOTREF(__pyx_t_3);
23431 __pyx_t_4 = (__pyx_t_3 != Py_None);
23432 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23433 if (__pyx_t_4) {
23434
23435 /* "pysam/libcbcf.pyx":1187
23436 * # allow missing ref when instantiating a new record
23437 * if record.ref is not None:
23438 * ref_len = len(record.ref) # <<<<<<<<<<<<<<
23439 * else:
23440 * ref_len = 0
23441 */
23442 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_record), __pyx_n_s_ref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1187, __pyx_L1_error)
23443 __Pyx_GOTREF(__pyx_t_3);
23444 __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1187, __pyx_L1_error)
23445 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23446 __pyx_v_ref_len = __pyx_t_5;
23447
23448 /* "pysam/libcbcf.pyx":1186
23449 *
23450 * # allow missing ref when instantiating a new record
23451 * if record.ref is not None: # <<<<<<<<<<<<<<
23452 * ref_len = len(record.ref)
23453 * else:
23454 */
23455 goto __pyx_L3;
23456 }
23457
23458 /* "pysam/libcbcf.pyx":1189
23459 * ref_len = len(record.ref)
23460 * else:
23461 * ref_len = 0 # <<<<<<<<<<<<<<
23462 *
23463 * # Delete INFO/END if no alleles are present or if rlen is equal to len(ref)
23464 */
23465 /*else*/ {
23466 __pyx_v_ref_len = 0;
23467 }
23468 __pyx_L3:;
23469
23470 /* "pysam/libcbcf.pyx":1193
23471 * # Delete INFO/END if no alleles are present or if rlen is equal to len(ref)
23472 * # Always keep END for symbolic alleles
23473 * if not has_symbolic_allele(record) and (not record.ptr.n_allele or record.ptr.rlen == ref_len): # <<<<<<<<<<<<<<
23474 * # If INFO/END is not defined in the header, it doesn't exist in the record
23475 * if end_id >= 0:
23476 */
23477 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_has_symbolic_allele(__pyx_v_record); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1193, __pyx_L1_error)
23478 __pyx_t_6 = (!(__pyx_t_2 != 0));
23479 if (__pyx_t_6) {
23480 } else {
23481 __pyx_t_4 = __pyx_t_6;
23482 goto __pyx_L5_bool_binop_done;
23483 }
23484 __pyx_t_6 = (!(__pyx_v_record->ptr->n_allele != 0));
23485 if (!__pyx_t_6) {
23486 } else {
23487 __pyx_t_4 = __pyx_t_6;
23488 goto __pyx_L5_bool_binop_done;
23489 }
23490 __pyx_t_6 = (__pyx_v_record->ptr->rlen == __pyx_v_ref_len);
23491 __pyx_t_4 = __pyx_t_6;
23492 __pyx_L5_bool_binop_done:;
23493 if (__pyx_t_4) {
23494
23495 /* "pysam/libcbcf.pyx":1195
23496 * if not has_symbolic_allele(record) and (not record.ptr.n_allele or record.ptr.rlen == ref_len):
23497 * # If INFO/END is not defined in the header, it doesn't exist in the record
23498 * if end_id >= 0: # <<<<<<<<<<<<<<
23499 * info = bcf_get_info(hdr, record.ptr, b'END')
23500 * if info and info.vptr:
23501 */
23502 __pyx_t_4 = (__pyx_v_end_id >= 0);
23503 if (__pyx_t_4) {
23504
23505 /* "pysam/libcbcf.pyx":1196
23506 * # If INFO/END is not defined in the header, it doesn't exist in the record
23507 * if end_id >= 0:
23508 * info = bcf_get_info(hdr, record.ptr, b'END') # <<<<<<<<<<<<<<
23509 * if info and info.vptr:
23510 * if bcf_update_info(hdr, record.ptr, b'END', NULL, 0, info.type) < 0:
23511 */
23512 __pyx_v_info = bcf_get_info(__pyx_v_hdr, __pyx_v_record->ptr, ((char const *)"END"));
23513
23514 /* "pysam/libcbcf.pyx":1197
23515 * if end_id >= 0:
23516 * info = bcf_get_info(hdr, record.ptr, b'END')
23517 * if info and info.vptr: # <<<<<<<<<<<<<<
23518 * if bcf_update_info(hdr, record.ptr, b'END', NULL, 0, info.type) < 0:
23519 * raise ValueError('Unable to delete END')
23520 */
23521 __pyx_t_6 = (__pyx_v_info != 0);
23522 if (__pyx_t_6) {
23523 } else {
23524 __pyx_t_4 = __pyx_t_6;
23525 goto __pyx_L10_bool_binop_done;
23526 }
23527 __pyx_t_6 = (__pyx_v_info->vptr != 0);
23528 __pyx_t_4 = __pyx_t_6;
23529 __pyx_L10_bool_binop_done:;
23530 if (__pyx_t_4) {
23531
23532 /* "pysam/libcbcf.pyx":1198
23533 * info = bcf_get_info(hdr, record.ptr, b'END')
23534 * if info and info.vptr:
23535 * if bcf_update_info(hdr, record.ptr, b'END', NULL, 0, info.type) < 0: # <<<<<<<<<<<<<<
23536 * raise ValueError('Unable to delete END')
23537 * else:
23538 */
23539 __pyx_t_4 = (bcf_update_info(__pyx_v_hdr, __pyx_v_record->ptr, ((char const *)"END"), NULL, 0, __pyx_v_info->type) < 0);
23540 if (unlikely(__pyx_t_4)) {
23541
23542 /* "pysam/libcbcf.pyx":1199
23543 * if info and info.vptr:
23544 * if bcf_update_info(hdr, record.ptr, b'END', NULL, 0, info.type) < 0:
23545 * raise ValueError('Unable to delete END') # <<<<<<<<<<<<<<
23546 * else:
23547 * # Create END header, if not present
23548 */
23549 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
23550 __Pyx_GOTREF(__pyx_t_3);
23551 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
23552 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23553 __PYX_ERR(0, 1199, __pyx_L1_error)
23554
23555 /* "pysam/libcbcf.pyx":1198
23556 * info = bcf_get_info(hdr, record.ptr, b'END')
23557 * if info and info.vptr:
23558 * if bcf_update_info(hdr, record.ptr, b'END', NULL, 0, info.type) < 0: # <<<<<<<<<<<<<<
23559 * raise ValueError('Unable to delete END')
23560 * else:
23561 */
23562 }
23563
23564 /* "pysam/libcbcf.pyx":1197
23565 * if end_id >= 0:
23566 * info = bcf_get_info(hdr, record.ptr, b'END')
23567 * if info and info.vptr: # <<<<<<<<<<<<<<
23568 * if bcf_update_info(hdr, record.ptr, b'END', NULL, 0, info.type) < 0:
23569 * raise ValueError('Unable to delete END')
23570 */
23571 }
23572
23573 /* "pysam/libcbcf.pyx":1195
23574 * if not has_symbolic_allele(record) and (not record.ptr.n_allele or record.ptr.rlen == ref_len):
23575 * # If INFO/END is not defined in the header, it doesn't exist in the record
23576 * if end_id >= 0: # <<<<<<<<<<<<<<
23577 * info = bcf_get_info(hdr, record.ptr, b'END')
23578 * if info and info.vptr:
23579 */
23580 }
23581
23582 /* "pysam/libcbcf.pyx":1193
23583 * # Delete INFO/END if no alleles are present or if rlen is equal to len(ref)
23584 * # Always keep END for symbolic alleles
23585 * if not has_symbolic_allele(record) and (not record.ptr.n_allele or record.ptr.rlen == ref_len): # <<<<<<<<<<<<<<
23586 * # If INFO/END is not defined in the header, it doesn't exist in the record
23587 * if end_id >= 0:
23588 */
23589 goto __pyx_L4;
23590 }
23591
23592 /* "pysam/libcbcf.pyx":1202
23593 * else:
23594 * # Create END header, if not present
23595 * if end_id < 0: # <<<<<<<<<<<<<<
23596 * record.header.info.add('END', number=1, type='Integer', description='Stop position of the interval')
23597 *
23598 */
23599 /*else*/ {
23600 __pyx_t_4 = (__pyx_v_end_id < 0);
23601 if (__pyx_t_4) {
23602
23603 /* "pysam/libcbcf.pyx":1203
23604 * # Create END header, if not present
23605 * if end_id < 0:
23606 * record.header.info.add('END', number=1, type='Integer', description='Stop position of the interval') # <<<<<<<<<<<<<<
23607 *
23608 * # Update to reflect stop position
23609 */
23610 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_record->header), __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error)
23611 __Pyx_GOTREF(__pyx_t_3);
23612 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1203, __pyx_L1_error)
23613 __Pyx_GOTREF(__pyx_t_7);
23614 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23615 __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error)
23616 __Pyx_GOTREF(__pyx_t_3);
23617 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_number, __pyx_int_1) < 0) __PYX_ERR(0, 1203, __pyx_L1_error)
23618 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_Integer) < 0) __PYX_ERR(0, 1203, __pyx_L1_error)
23619 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_description, __pyx_kp_u_Stop_position_of_the_interval) < 0) __PYX_ERR(0, 1203, __pyx_L1_error)
23620 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__28, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1203, __pyx_L1_error)
23621 __Pyx_GOTREF(__pyx_t_8);
23622 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23623 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23624 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23625
23626 /* "pysam/libcbcf.pyx":1202
23627 * else:
23628 * # Create END header, if not present
23629 * if end_id < 0: # <<<<<<<<<<<<<<
23630 * record.header.info.add('END', number=1, type='Integer', description='Stop position of the interval')
23631 *
23632 */
23633 }
23634
23635 /* "pysam/libcbcf.pyx":1206
23636 *
23637 * # Update to reflect stop position
23638 * bcf_info_set_value(record, b'END', record.ptr.pos + record.ptr.rlen) # <<<<<<<<<<<<<<
23639 *
23640 *
23641 */
23642 __pyx_t_8 = __Pyx_PyInt_From_int32_t((__pyx_v_record->ptr->pos + __pyx_v_record->ptr->rlen)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error)
23643 __Pyx_GOTREF(__pyx_t_8);
23644 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_bcf_info_set_value(__pyx_v_record, __pyx_n_b_END, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error)
23645 __Pyx_GOTREF(__pyx_t_3);
23646 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23647 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23648 }
23649 __pyx_L4:;
23650
23651 /* "pysam/libcbcf.pyx":1179
23652 *
23653 *
23654 * cdef inline bcf_sync_end(VariantRecord record): # <<<<<<<<<<<<<<
23655 * cdef bcf_hdr_t *hdr = record.header.ptr
23656 * cdef bcf_info_t *info
23657 */
23658
23659 /* function exit code */
23660 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23661 goto __pyx_L0;
23662 __pyx_L1_error:;
23663 __Pyx_XDECREF(__pyx_t_3);
23664 __Pyx_XDECREF(__pyx_t_7);
23665 __Pyx_XDECREF(__pyx_t_8);
23666 __Pyx_AddTraceback("pysam.libcbcf.bcf_sync_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
23667 __pyx_r = 0;
23668 __pyx_L0:;
23669 __Pyx_XGIVEREF(__pyx_r);
23670 __Pyx_TraceReturn(__pyx_r, 0);
23671 __Pyx_RefNannyFinishContext();
23672 return __pyx_r;
23673 }
23674
23675 /* "pysam/libcbcf.pyx":1209
23676 *
23677 *
23678 * cdef inline int has_symbolic_allele(VariantRecord record): # <<<<<<<<<<<<<<
23679 * """Return index of first symbolic allele. 0 if no symbolic alleles."""
23680 *
23681 */
23682
23683 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_has_symbolic_allele(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record) {
23684 long __pyx_v_i;
23685 char *__pyx_v_alt;
23686 int __pyx_r;
23687 __Pyx_TraceDeclarations
23688 uint32_t __pyx_t_1;
23689 uint32_t __pyx_t_2;
23690 long __pyx_t_3;
23691 int __pyx_t_4;
23692 int __pyx_t_5;
23693 Py_ssize_t __pyx_t_6;
23694 int __pyx_lineno = 0;
23695 const char *__pyx_filename = NULL;
23696 int __pyx_clineno = 0;
23697 __Pyx_TraceCall("has_symbolic_allele", __pyx_f[0], 1209, 0, __PYX_ERR(0, 1209, __pyx_L1_error));
23698
23699 /* "pysam/libcbcf.pyx":1212
23700 * """Return index of first symbolic allele. 0 if no symbolic alleles."""
23701 *
23702 * for i in range(1, record.ptr.n_allele): # <<<<<<<<<<<<<<
23703 * alt = record.ptr.d.allele[i]
23704 * if alt[0] == b'<' and alt[len(alt) - 1] == b'>':
23705 */
23706 __pyx_t_1 = __pyx_v_record->ptr->n_allele;
23707 __pyx_t_2 = __pyx_t_1;
23708 for (__pyx_t_3 = 1; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
23709 __pyx_v_i = __pyx_t_3;
23710
23711 /* "pysam/libcbcf.pyx":1213
23712 *
23713 * for i in range(1, record.ptr.n_allele):
23714 * alt = record.ptr.d.allele[i] # <<<<<<<<<<<<<<
23715 * if alt[0] == b'<' and alt[len(alt) - 1] == b'>':
23716 * return i
23717 */
23718 __pyx_v_alt = (__pyx_v_record->ptr->d.allele[__pyx_v_i]);
23719
23720 /* "pysam/libcbcf.pyx":1214
23721 * for i in range(1, record.ptr.n_allele):
23722 * alt = record.ptr.d.allele[i]
23723 * if alt[0] == b'<' and alt[len(alt) - 1] == b'>': # <<<<<<<<<<<<<<
23724 * return i
23725 *
23726 */
23727 __pyx_t_5 = ((__pyx_v_alt[0]) == '<');
23728 if (__pyx_t_5) {
23729 } else {
23730 __pyx_t_4 = __pyx_t_5;
23731 goto __pyx_L6_bool_binop_done;
23732 }
23733 __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_alt); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1214, __pyx_L1_error)
23734 __pyx_t_5 = ((__pyx_v_alt[(__pyx_t_6 - 1)]) == '>');
23735 __pyx_t_4 = __pyx_t_5;
23736 __pyx_L6_bool_binop_done:;
23737 if (__pyx_t_4) {
23738
23739 /* "pysam/libcbcf.pyx":1215
23740 * alt = record.ptr.d.allele[i]
23741 * if alt[0] == b'<' and alt[len(alt) - 1] == b'>':
23742 * return i # <<<<<<<<<<<<<<
23743 *
23744 * return 0
23745 */
23746 __pyx_r = __pyx_v_i;
23747 goto __pyx_L0;
23748
23749 /* "pysam/libcbcf.pyx":1214
23750 * for i in range(1, record.ptr.n_allele):
23751 * alt = record.ptr.d.allele[i]
23752 * if alt[0] == b'<' and alt[len(alt) - 1] == b'>': # <<<<<<<<<<<<<<
23753 * return i
23754 *
23755 */
23756 }
23757 }
23758
23759 /* "pysam/libcbcf.pyx":1217
23760 * return i
23761 *
23762 * return 0 # <<<<<<<<<<<<<<
23763 *
23764 *
23765 */
23766 __pyx_r = 0;
23767 goto __pyx_L0;
23768
23769 /* "pysam/libcbcf.pyx":1209
23770 *
23771 *
23772 * cdef inline int has_symbolic_allele(VariantRecord record): # <<<<<<<<<<<<<<
23773 * """Return index of first symbolic allele. 0 if no symbolic alleles."""
23774 *
23775 */
23776
23777 /* function exit code */
23778 __pyx_L1_error:;
23779 __Pyx_AddTraceback("pysam.libcbcf.has_symbolic_allele", __pyx_clineno, __pyx_lineno, __pyx_filename);
23780 __pyx_r = -1;
23781 __pyx_L0:;
23782 __Pyx_TraceReturn(Py_None, 0);
23783 return __pyx_r;
23784 }
23785
23786 /* "pysam/libcbcf.pyx":1226
23787 *
23788 *
23789 * cdef bcf_header_remove_hrec(VariantHeader header, int i): # <<<<<<<<<<<<<<
23790 * if header is None:
23791 * raise ValueError('header must not be None')
23792 */
23793
23794 static PyObject *__pyx_f_5pysam_7libcbcf_bcf_header_remove_hrec(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, int __pyx_v_i) {
23795 bcf_hdr_t *__pyx_v_hdr;
23796 bcf_hrec_t *__pyx_v_hrec;
23797 PyObject *__pyx_r = NULL;
23798 __Pyx_TraceDeclarations
23799 __Pyx_RefNannyDeclarations
23800 int __pyx_t_1;
23801 PyObject *__pyx_t_2 = NULL;
23802 bcf_hdr_t *__pyx_t_3;
23803 int __pyx_t_4;
23804 int __pyx_lineno = 0;
23805 const char *__pyx_filename = NULL;
23806 int __pyx_clineno = 0;
23807 __Pyx_RefNannySetupContext("bcf_header_remove_hrec", 1);
23808 __Pyx_TraceCall("bcf_header_remove_hrec", __pyx_f[0], 1226, 0, __PYX_ERR(0, 1226, __pyx_L1_error));
23809
23810 /* "pysam/libcbcf.pyx":1227
23811 *
23812 * cdef bcf_header_remove_hrec(VariantHeader header, int i):
23813 * if header is None: # <<<<<<<<<<<<<<
23814 * raise ValueError('header must not be None')
23815 *
23816 */
23817 __pyx_t_1 = (((PyObject *)__pyx_v_header) == Py_None);
23818 if (unlikely(__pyx_t_1)) {
23819
23820 /* "pysam/libcbcf.pyx":1228
23821 * cdef bcf_header_remove_hrec(VariantHeader header, int i):
23822 * if header is None:
23823 * raise ValueError('header must not be None') # <<<<<<<<<<<<<<
23824 *
23825 * cdef bcf_hdr_t *hdr = header.ptr
23826 */
23827 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
23828 __Pyx_GOTREF(__pyx_t_2);
23829 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
23830 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23831 __PYX_ERR(0, 1228, __pyx_L1_error)
23832
23833 /* "pysam/libcbcf.pyx":1227
23834 *
23835 * cdef bcf_header_remove_hrec(VariantHeader header, int i):
23836 * if header is None: # <<<<<<<<<<<<<<
23837 * raise ValueError('header must not be None')
23838 *
23839 */
23840 }
23841
23842 /* "pysam/libcbcf.pyx":1230
23843 * raise ValueError('header must not be None')
23844 *
23845 * cdef bcf_hdr_t *hdr = header.ptr # <<<<<<<<<<<<<<
23846 *
23847 * if i < 0 or i >= hdr.nhrec:
23848 */
23849 __pyx_t_3 = __pyx_v_header->ptr;
23850 __pyx_v_hdr = __pyx_t_3;
23851
23852 /* "pysam/libcbcf.pyx":1232
23853 * cdef bcf_hdr_t *hdr = header.ptr
23854 *
23855 * if i < 0 or i >= hdr.nhrec: # <<<<<<<<<<<<<<
23856 * raise ValueError('Invalid header record index')
23857 *
23858 */
23859 __pyx_t_4 = (__pyx_v_i < 0);
23860 if (!__pyx_t_4) {
23861 } else {
23862 __pyx_t_1 = __pyx_t_4;
23863 goto __pyx_L5_bool_binop_done;
23864 }
23865 __pyx_t_4 = (__pyx_v_i >= __pyx_v_hdr->nhrec);
23866 __pyx_t_1 = __pyx_t_4;
23867 __pyx_L5_bool_binop_done:;
23868 if (unlikely(__pyx_t_1)) {
23869
23870 /* "pysam/libcbcf.pyx":1233
23871 *
23872 * if i < 0 or i >= hdr.nhrec:
23873 * raise ValueError('Invalid header record index') # <<<<<<<<<<<<<<
23874 *
23875 * cdef bcf_hrec_t *hrec = hdr.hrec[i]
23876 */
23877 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error)
23878 __Pyx_GOTREF(__pyx_t_2);
23879 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
23880 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23881 __PYX_ERR(0, 1233, __pyx_L1_error)
23882
23883 /* "pysam/libcbcf.pyx":1232
23884 * cdef bcf_hdr_t *hdr = header.ptr
23885 *
23886 * if i < 0 or i >= hdr.nhrec: # <<<<<<<<<<<<<<
23887 * raise ValueError('Invalid header record index')
23888 *
23889 */
23890 }
23891
23892 /* "pysam/libcbcf.pyx":1235
23893 * raise ValueError('Invalid header record index')
23894 *
23895 * cdef bcf_hrec_t *hrec = hdr.hrec[i] # <<<<<<<<<<<<<<
23896 * hdr.nhrec -= 1
23897 *
23898 */
23899 __pyx_v_hrec = (__pyx_v_hdr->hrec[__pyx_v_i]);
23900
23901 /* "pysam/libcbcf.pyx":1236
23902 *
23903 * cdef bcf_hrec_t *hrec = hdr.hrec[i]
23904 * hdr.nhrec -= 1 # <<<<<<<<<<<<<<
23905 *
23906 * if i < hdr.nhrec:
23907 */
23908 __pyx_v_hdr->nhrec = (__pyx_v_hdr->nhrec - 1);
23909
23910 /* "pysam/libcbcf.pyx":1238
23911 * hdr.nhrec -= 1
23912 *
23913 * if i < hdr.nhrec: # <<<<<<<<<<<<<<
23914 * memmove(&hdr.hrec[i], &hdr.hrec[i+1], (hdr.nhrec-i)*sizeof(bcf_hrec_t*))
23915 *
23916 */
23917 __pyx_t_1 = (__pyx_v_i < __pyx_v_hdr->nhrec);
23918 if (__pyx_t_1) {
23919
23920 /* "pysam/libcbcf.pyx":1239
23921 *
23922 * if i < hdr.nhrec:
23923 * memmove(&hdr.hrec[i], &hdr.hrec[i+1], (hdr.nhrec-i)*sizeof(bcf_hrec_t*)) # <<<<<<<<<<<<<<
23924 *
23925 * bcf_hrec_destroy(hrec)
23926 */
23927 (void)(memmove((&(__pyx_v_hdr->hrec[__pyx_v_i])), (&(__pyx_v_hdr->hrec[(__pyx_v_i + 1)])), ((__pyx_v_hdr->nhrec - __pyx_v_i) * (sizeof(bcf_hrec_t *)))));
23928
23929 /* "pysam/libcbcf.pyx":1238
23930 * hdr.nhrec -= 1
23931 *
23932 * if i < hdr.nhrec: # <<<<<<<<<<<<<<
23933 * memmove(&hdr.hrec[i], &hdr.hrec[i+1], (hdr.nhrec-i)*sizeof(bcf_hrec_t*))
23934 *
23935 */
23936 }
23937
23938 /* "pysam/libcbcf.pyx":1241
23939 * memmove(&hdr.hrec[i], &hdr.hrec[i+1], (hdr.nhrec-i)*sizeof(bcf_hrec_t*))
23940 *
23941 * bcf_hrec_destroy(hrec) # <<<<<<<<<<<<<<
23942 * hdr.hrec[hdr.nhrec] = NULL
23943 * hdr.dirty = 1
23944 */
23945 bcf_hrec_destroy(__pyx_v_hrec);
23946
23947 /* "pysam/libcbcf.pyx":1242
23948 *
23949 * bcf_hrec_destroy(hrec)
23950 * hdr.hrec[hdr.nhrec] = NULL # <<<<<<<<<<<<<<
23951 * hdr.dirty = 1
23952 *
23953 */
23954 (__pyx_v_hdr->hrec[__pyx_v_hdr->nhrec]) = NULL;
23955
23956 /* "pysam/libcbcf.pyx":1243
23957 * bcf_hrec_destroy(hrec)
23958 * hdr.hrec[hdr.nhrec] = NULL
23959 * hdr.dirty = 1 # <<<<<<<<<<<<<<
23960 *
23961 *
23962 */
23963 __pyx_v_hdr->dirty = 1;
23964
23965 /* "pysam/libcbcf.pyx":1226
23966 *
23967 *
23968 * cdef bcf_header_remove_hrec(VariantHeader header, int i): # <<<<<<<<<<<<<<
23969 * if header is None:
23970 * raise ValueError('header must not be None')
23971 */
23972
23973 /* function exit code */
23974 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23975 goto __pyx_L0;
23976 __pyx_L1_error:;
23977 __Pyx_XDECREF(__pyx_t_2);
23978 __Pyx_AddTraceback("pysam.libcbcf.bcf_header_remove_hrec", __pyx_clineno, __pyx_lineno, __pyx_filename);
23979 __pyx_r = 0;
23980 __pyx_L0:;
23981 __Pyx_XGIVEREF(__pyx_r);
23982 __Pyx_TraceReturn(__pyx_r, 0);
23983 __Pyx_RefNannyFinishContext();
23984 return __pyx_r;
23985 }
23986
23987 /* "pysam/libcbcf.pyx":1251
23988 * cdef class VariantHeaderRecord(object):
23989 * """header record from a :class:`VariantHeader` object"""
23990 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
23991 * raise TypeError('this class cannot be instantiated from Python')
23992 *
23993 */
23994
23995 /* Python wrapper */
23996 static int __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23997 static int __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23998 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
23999 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
24000 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24001 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24002 int __pyx_r;
24003 __Pyx_RefNannyDeclarations
24004 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
24005 #if CYTHON_ASSUME_SAFE_MACROS
24006 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24007 #else
24008 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
24009 #endif
24010 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24011 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
24012 __Pyx_INCREF(__pyx_args);
24013 __pyx_v_args = __pyx_args;
24014 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
24015
24016 /* function exit code */
24017 __Pyx_DECREF(__pyx_v_args);
24018 __Pyx_XDECREF(__pyx_v_kwargs);
24019 __Pyx_RefNannyFinishContext();
24020 return __pyx_r;
24021 }
24022
24023 static int __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
24024 int __pyx_r;
24025 __Pyx_TraceDeclarations
24026 __Pyx_RefNannyDeclarations
24027 PyObject *__pyx_t_1 = NULL;
24028 int __pyx_lineno = 0;
24029 const char *__pyx_filename = NULL;
24030 int __pyx_clineno = 0;
24031 __Pyx_RefNannySetupContext("__init__", 1);
24032 __Pyx_TraceCall("__init__", __pyx_f[0], 1251, 0, __PYX_ERR(0, 1251, __pyx_L1_error));
24033
24034 /* "pysam/libcbcf.pyx":1252
24035 * """header record from a :class:`VariantHeader` object"""
24036 * def __init__(self, *args, **kwargs):
24037 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
24038 *
24039 * @property
24040 */
24041 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
24042 __Pyx_GOTREF(__pyx_t_1);
24043 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
24044 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24045 __PYX_ERR(0, 1252, __pyx_L1_error)
24046
24047 /* "pysam/libcbcf.pyx":1251
24048 * cdef class VariantHeaderRecord(object):
24049 * """header record from a :class:`VariantHeader` object"""
24050 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
24051 * raise TypeError('this class cannot be instantiated from Python')
24052 *
24053 */
24054
24055 /* function exit code */
24056 __pyx_L1_error:;
24057 __Pyx_XDECREF(__pyx_t_1);
24058 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24059 __pyx_r = -1;
24060 __Pyx_TraceReturn(Py_None, 0);
24061 __Pyx_RefNannyFinishContext();
24062 return __pyx_r;
24063 }
24064
24065 /* "pysam/libcbcf.pyx":1254
24066 * raise TypeError('this class cannot be instantiated from Python')
24067 *
24068 * @property # <<<<<<<<<<<<<<
24069 * def type(self):
24070 * """header type: FILTER, INFO, FORMAT, CONTIG, STRUCTURED, or GENERIC"""
24071 */
24072
24073 /* Python wrapper */
24074 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
24075 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_4type_1__get__(PyObject *__pyx_v_self) {
24076 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24077 PyObject *__pyx_r = 0;
24078 __Pyx_RefNannyDeclarations
24079 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24080 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24081 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_4type___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
24082
24083 /* function exit code */
24084 __Pyx_RefNannyFinishContext();
24085 return __pyx_r;
24086 }
24087
24088 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_4type___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
24089 bcf_hrec_t *__pyx_v_r;
24090 PyObject *__pyx_r = NULL;
24091 __Pyx_TraceDeclarations
24092 __Pyx_RefNannyDeclarations
24093 bcf_hrec_t *__pyx_t_1;
24094 int __pyx_t_2;
24095 PyObject *__pyx_t_3 = NULL;
24096 int __pyx_lineno = 0;
24097 const char *__pyx_filename = NULL;
24098 int __pyx_clineno = 0;
24099 __Pyx_RefNannySetupContext("__get__", 1);
24100 __Pyx_TraceCall("__get__", __pyx_f[0], 1254, 0, __PYX_ERR(0, 1254, __pyx_L1_error));
24101
24102 /* "pysam/libcbcf.pyx":1257
24103 * def type(self):
24104 * """header type: FILTER, INFO, FORMAT, CONTIG, STRUCTURED, or GENERIC"""
24105 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
24106 * if not r:
24107 * return None
24108 */
24109 __pyx_t_1 = __pyx_v_self->ptr;
24110 __pyx_v_r = __pyx_t_1;
24111
24112 /* "pysam/libcbcf.pyx":1258
24113 * """header type: FILTER, INFO, FORMAT, CONTIG, STRUCTURED, or GENERIC"""
24114 * cdef bcf_hrec_t *r = self.ptr
24115 * if not r: # <<<<<<<<<<<<<<
24116 * return None
24117 * return METADATA_TYPES[r.type]
24118 */
24119 __pyx_t_2 = (!(__pyx_v_r != 0));
24120 if (__pyx_t_2) {
24121
24122 /* "pysam/libcbcf.pyx":1259
24123 * cdef bcf_hrec_t *r = self.ptr
24124 * if not r:
24125 * return None # <<<<<<<<<<<<<<
24126 * return METADATA_TYPES[r.type]
24127 *
24128 */
24129 __Pyx_XDECREF(__pyx_r);
24130 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24131 goto __pyx_L0;
24132
24133 /* "pysam/libcbcf.pyx":1258
24134 * """header type: FILTER, INFO, FORMAT, CONTIG, STRUCTURED, or GENERIC"""
24135 * cdef bcf_hrec_t *r = self.ptr
24136 * if not r: # <<<<<<<<<<<<<<
24137 * return None
24138 * return METADATA_TYPES[r.type]
24139 */
24140 }
24141
24142 /* "pysam/libcbcf.pyx":1260
24143 * if not r:
24144 * return None
24145 * return METADATA_TYPES[r.type] # <<<<<<<<<<<<<<
24146 *
24147 * @property
24148 */
24149 __Pyx_XDECREF(__pyx_r);
24150 if (unlikely(__pyx_v_5pysam_7libcbcf_METADATA_TYPES == Py_None)) {
24151 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24152 __PYX_ERR(0, 1260, __pyx_L1_error)
24153 }
24154 __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_5pysam_7libcbcf_METADATA_TYPES, __pyx_v_r->type, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error)
24155 __Pyx_GOTREF(__pyx_t_3);
24156 __pyx_r = __pyx_t_3;
24157 __pyx_t_3 = 0;
24158 goto __pyx_L0;
24159
24160 /* "pysam/libcbcf.pyx":1254
24161 * raise TypeError('this class cannot be instantiated from Python')
24162 *
24163 * @property # <<<<<<<<<<<<<<
24164 * def type(self):
24165 * """header type: FILTER, INFO, FORMAT, CONTIG, STRUCTURED, or GENERIC"""
24166 */
24167
24168 /* function exit code */
24169 __pyx_L1_error:;
24170 __Pyx_XDECREF(__pyx_t_3);
24171 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24172 __pyx_r = NULL;
24173 __pyx_L0:;
24174 __Pyx_XGIVEREF(__pyx_r);
24175 __Pyx_TraceReturn(__pyx_r, 0);
24176 __Pyx_RefNannyFinishContext();
24177 return __pyx_r;
24178 }
24179
24180 /* "pysam/libcbcf.pyx":1262
24181 * return METADATA_TYPES[r.type]
24182 *
24183 * @property # <<<<<<<<<<<<<<
24184 * def key(self):
24185 * """header key (the part before '=', in FILTER/INFO/FORMAT/contig/fileformat etc.)"""
24186 */
24187
24188 /* Python wrapper */
24189 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3key_1__get__(PyObject *__pyx_v_self); /*proto*/
24190 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3key_1__get__(PyObject *__pyx_v_self) {
24191 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24192 PyObject *__pyx_r = 0;
24193 __Pyx_RefNannyDeclarations
24194 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24195 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24196 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_3key___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
24197
24198 /* function exit code */
24199 __Pyx_RefNannyFinishContext();
24200 return __pyx_r;
24201 }
24202
24203 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_3key___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
24204 bcf_hrec_t *__pyx_v_r;
24205 PyObject *__pyx_r = NULL;
24206 __Pyx_TraceDeclarations
24207 __Pyx_RefNannyDeclarations
24208 bcf_hrec_t *__pyx_t_1;
24209 PyObject *__pyx_t_2 = NULL;
24210 int __pyx_t_3;
24211 int __pyx_t_4;
24212 PyObject *__pyx_t_5 = NULL;
24213 int __pyx_lineno = 0;
24214 const char *__pyx_filename = NULL;
24215 int __pyx_clineno = 0;
24216 __Pyx_RefNannySetupContext("__get__", 1);
24217 __Pyx_TraceCall("__get__", __pyx_f[0], 1262, 0, __PYX_ERR(0, 1262, __pyx_L1_error));
24218
24219 /* "pysam/libcbcf.pyx":1265
24220 * def key(self):
24221 * """header key (the part before '=', in FILTER/INFO/FORMAT/contig/fileformat etc.)"""
24222 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
24223 * return bcf_str_cache_get_charptr(r.key) if r and r.key else None
24224 *
24225 */
24226 __pyx_t_1 = __pyx_v_self->ptr;
24227 __pyx_v_r = __pyx_t_1;
24228
24229 /* "pysam/libcbcf.pyx":1266
24230 * """header key (the part before '=', in FILTER/INFO/FORMAT/contig/fileformat etc.)"""
24231 * cdef bcf_hrec_t *r = self.ptr
24232 * return bcf_str_cache_get_charptr(r.key) if r and r.key else None # <<<<<<<<<<<<<<
24233 *
24234 * @property
24235 */
24236 __Pyx_XDECREF(__pyx_r);
24237 __pyx_t_4 = (__pyx_v_r != 0);
24238 if (__pyx_t_4) {
24239 } else {
24240 __pyx_t_3 = __pyx_t_4;
24241 goto __pyx_L3_bool_binop_done;
24242 }
24243 __pyx_t_4 = (__pyx_v_r->key != 0);
24244 __pyx_t_3 = __pyx_t_4;
24245 __pyx_L3_bool_binop_done:;
24246 if (__pyx_t_3) {
24247 __pyx_t_5 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(__pyx_v_r->key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1266, __pyx_L1_error)
24248 __Pyx_GOTREF(__pyx_t_5);
24249 __pyx_t_2 = __pyx_t_5;
24250 __pyx_t_5 = 0;
24251 } else {
24252 __Pyx_INCREF(Py_None);
24253 __pyx_t_2 = Py_None;
24254 }
24255 __pyx_r = __pyx_t_2;
24256 __pyx_t_2 = 0;
24257 goto __pyx_L0;
24258
24259 /* "pysam/libcbcf.pyx":1262
24260 * return METADATA_TYPES[r.type]
24261 *
24262 * @property # <<<<<<<<<<<<<<
24263 * def key(self):
24264 * """header key (the part before '=', in FILTER/INFO/FORMAT/contig/fileformat etc.)"""
24265 */
24266
24267 /* function exit code */
24268 __pyx_L1_error:;
24269 __Pyx_XDECREF(__pyx_t_2);
24270 __Pyx_XDECREF(__pyx_t_5);
24271 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.key.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24272 __pyx_r = NULL;
24273 __pyx_L0:;
24274 __Pyx_XGIVEREF(__pyx_r);
24275 __Pyx_TraceReturn(__pyx_r, 0);
24276 __Pyx_RefNannyFinishContext();
24277 return __pyx_r;
24278 }
24279
24280 /* "pysam/libcbcf.pyx":1268
24281 * return bcf_str_cache_get_charptr(r.key) if r and r.key else None
24282 *
24283 * @property # <<<<<<<<<<<<<<
24284 * def value(self):
24285 * """header value. Set only for generic lines, None for FILTER/INFO, etc."""
24286 */
24287
24288 /* Python wrapper */
24289 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
24290 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5value_1__get__(PyObject *__pyx_v_self) {
24291 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24292 PyObject *__pyx_r = 0;
24293 __Pyx_RefNannyDeclarations
24294 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24295 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24296 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5value___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
24297
24298 /* function exit code */
24299 __Pyx_RefNannyFinishContext();
24300 return __pyx_r;
24301 }
24302
24303 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5value___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
24304 bcf_hrec_t *__pyx_v_r;
24305 PyObject *__pyx_r = NULL;
24306 __Pyx_TraceDeclarations
24307 __Pyx_RefNannyDeclarations
24308 bcf_hrec_t *__pyx_t_1;
24309 PyObject *__pyx_t_2 = NULL;
24310 int __pyx_t_3;
24311 int __pyx_t_4;
24312 PyObject *__pyx_t_5 = NULL;
24313 int __pyx_lineno = 0;
24314 const char *__pyx_filename = NULL;
24315 int __pyx_clineno = 0;
24316 __Pyx_RefNannySetupContext("__get__", 1);
24317 __Pyx_TraceCall("__get__", __pyx_f[0], 1268, 0, __PYX_ERR(0, 1268, __pyx_L1_error));
24318
24319 /* "pysam/libcbcf.pyx":1271
24320 * def value(self):
24321 * """header value. Set only for generic lines, None for FILTER/INFO, etc."""
24322 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
24323 * return charptr_to_str(r.value) if r and r.value else None
24324 *
24325 */
24326 __pyx_t_1 = __pyx_v_self->ptr;
24327 __pyx_v_r = __pyx_t_1;
24328
24329 /* "pysam/libcbcf.pyx":1272
24330 * """header value. Set only for generic lines, None for FILTER/INFO, etc."""
24331 * cdef bcf_hrec_t *r = self.ptr
24332 * return charptr_to_str(r.value) if r and r.value else None # <<<<<<<<<<<<<<
24333 *
24334 * @property
24335 */
24336 __Pyx_XDECREF(__pyx_r);
24337 __pyx_t_4 = (__pyx_v_r != 0);
24338 if (__pyx_t_4) {
24339 } else {
24340 __pyx_t_3 = __pyx_t_4;
24341 goto __pyx_L3_bool_binop_done;
24342 }
24343 __pyx_t_4 = (__pyx_v_r->value != 0);
24344 __pyx_t_3 = __pyx_t_4;
24345 __pyx_L3_bool_binop_done:;
24346 if (__pyx_t_3) {
24347 __pyx_t_5 = __pyx_f_5pysam_9libcutils_charptr_to_str(__pyx_v_r->value, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error)
24348 __Pyx_GOTREF(__pyx_t_5);
24349 __pyx_t_2 = __pyx_t_5;
24350 __pyx_t_5 = 0;
24351 } else {
24352 __Pyx_INCREF(Py_None);
24353 __pyx_t_2 = Py_None;
24354 }
24355 __pyx_r = __pyx_t_2;
24356 __pyx_t_2 = 0;
24357 goto __pyx_L0;
24358
24359 /* "pysam/libcbcf.pyx":1268
24360 * return bcf_str_cache_get_charptr(r.key) if r and r.key else None
24361 *
24362 * @property # <<<<<<<<<<<<<<
24363 * def value(self):
24364 * """header value. Set only for generic lines, None for FILTER/INFO, etc."""
24365 */
24366
24367 /* function exit code */
24368 __pyx_L1_error:;
24369 __Pyx_XDECREF(__pyx_t_2);
24370 __Pyx_XDECREF(__pyx_t_5);
24371 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24372 __pyx_r = NULL;
24373 __pyx_L0:;
24374 __Pyx_XGIVEREF(__pyx_r);
24375 __Pyx_TraceReturn(__pyx_r, 0);
24376 __Pyx_RefNannyFinishContext();
24377 return __pyx_r;
24378 }
24379
24380 /* "pysam/libcbcf.pyx":1274
24381 * return charptr_to_str(r.value) if r and r.value else None
24382 *
24383 * @property # <<<<<<<<<<<<<<
24384 * def attrs(self):
24385 * """sequence of additional header attributes"""
24386 */
24387
24388 /* Python wrapper */
24389 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_1__get__(PyObject *__pyx_v_self); /*proto*/
24390 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_1__get__(PyObject *__pyx_v_self) {
24391 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24392 PyObject *__pyx_r = 0;
24393 __Pyx_RefNannyDeclarations
24394 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24395 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24396 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5attrs___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
24397
24398 /* function exit code */
24399 __Pyx_RefNannyFinishContext();
24400 return __pyx_r;
24401 }
24402 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_7__get___2generator32(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
24403
24404 /* "pysam/libcbcf.pyx":1281
24405 * return ()
24406 * cdef int i
24407 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None, # <<<<<<<<<<<<<<
24408 * charptr_to_str(r.vals[i]) if r.vals[i] else None)
24409 * for i in range(r.nkeys))
24410 */
24411
24412 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_7__get___genexpr(PyObject *__pyx_self, int __pyx_genexpr_arg_0) {
24413 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *__pyx_cur_scope;
24414 PyObject *__pyx_r = NULL;
24415 __Pyx_RefNannyDeclarations
24416 int __pyx_lineno = 0;
24417 const char *__pyx_filename = NULL;
24418 int __pyx_clineno = 0;
24419 __Pyx_RefNannySetupContext("genexpr", 0);
24420 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_6_genexpr(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL);
24421 if (unlikely(!__pyx_cur_scope)) {
24422 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *)Py_None);
24423 __Pyx_INCREF(Py_None);
24424 __PYX_ERR(0, 1281, __pyx_L1_error)
24425 } else {
24426 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
24427 }
24428 __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__ *) __pyx_self;
24429 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
24430 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
24431 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
24432 {
24433 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_7__get___2generator32, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_VariantHeaderRecord___get___loca, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1281, __pyx_L1_error)
24434 __Pyx_DECREF(__pyx_cur_scope);
24435 __Pyx_RefNannyFinishContext();
24436 return (PyObject *) gen;
24437 }
24438
24439 /* function exit code */
24440 __pyx_L1_error:;
24441 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.attrs.__get__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
24442 __pyx_r = NULL;
24443 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
24444 __Pyx_XGIVEREF(__pyx_r);
24445 __Pyx_RefNannyFinishContext();
24446 return __pyx_r;
24447 }
24448
24449 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_7__get___2generator32(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
24450 {
24451 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *)__pyx_generator->closure);
24452 PyObject *__pyx_r = NULL;
24453 __Pyx_TraceDeclarations
24454 int __pyx_t_1;
24455 int __pyx_t_2;
24456 int __pyx_t_3;
24457 PyObject *__pyx_t_4 = NULL;
24458 int __pyx_t_5;
24459 PyObject *__pyx_t_6 = NULL;
24460 PyObject *__pyx_t_7 = NULL;
24461 int __pyx_lineno = 0;
24462 const char *__pyx_filename = NULL;
24463 int __pyx_clineno = 0;
24464 __Pyx_RefNannyDeclarations
24465 __Pyx_RefNannySetupContext("genexpr", 0);
24466 __Pyx_TraceCall("genexpr", __pyx_f[0], 1281, 0, __PYX_ERR(0, 1281, __pyx_L1_error));
24467 switch (__pyx_generator->resume_label) {
24468 case 0: goto __pyx_L3_first_run;
24469 case 1: goto __pyx_L6_resume_from_yield;
24470 default: /* CPython raises the right error here */
24471 __Pyx_TraceReturn(Py_None, 0);
24472 __Pyx_RefNannyFinishContext();
24473 return NULL;
24474 }
24475 __pyx_L3_first_run:;
24476 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1281, __pyx_L1_error)
24477
24478 /* "pysam/libcbcf.pyx":1283
24479 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None,
24480 * charptr_to_str(r.vals[i]) if r.vals[i] else None)
24481 * for i in range(r.nkeys)) # <<<<<<<<<<<<<<
24482 *
24483 * def __len__(self):
24484 */
24485 __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0;
24486 __pyx_t_2 = __pyx_t_1;
24487 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
24488 __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
24489
24490 /* "pysam/libcbcf.pyx":1281
24491 * return ()
24492 * cdef int i
24493 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None, # <<<<<<<<<<<<<<
24494 * charptr_to_str(r.vals[i]) if r.vals[i] else None)
24495 * for i in range(r.nkeys))
24496 */
24497 __pyx_t_5 = ((__pyx_cur_scope->__pyx_outer_scope->__pyx_v_r->keys[__pyx_cur_scope->__pyx_v_i]) != 0);
24498 if (__pyx_t_5) {
24499 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr((__pyx_cur_scope->__pyx_outer_scope->__pyx_v_r->keys[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1281, __pyx_L1_error)
24500 __Pyx_GOTREF(__pyx_t_6);
24501 __pyx_t_4 = __pyx_t_6;
24502 __pyx_t_6 = 0;
24503 } else {
24504 __Pyx_INCREF(Py_None);
24505 __pyx_t_4 = Py_None;
24506 }
24507
24508 /* "pysam/libcbcf.pyx":1282
24509 * cdef int i
24510 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None,
24511 * charptr_to_str(r.vals[i]) if r.vals[i] else None) # <<<<<<<<<<<<<<
24512 * for i in range(r.nkeys))
24513 *
24514 */
24515 __pyx_t_5 = ((__pyx_cur_scope->__pyx_outer_scope->__pyx_v_r->vals[__pyx_cur_scope->__pyx_v_i]) != 0);
24516 if (__pyx_t_5) {
24517 __pyx_t_7 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_cur_scope->__pyx_outer_scope->__pyx_v_r->vals[__pyx_cur_scope->__pyx_v_i]), NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1282, __pyx_L1_error)
24518 __Pyx_GOTREF(__pyx_t_7);
24519 __pyx_t_6 = __pyx_t_7;
24520 __pyx_t_7 = 0;
24521 } else {
24522 __Pyx_INCREF(Py_None);
24523 __pyx_t_6 = Py_None;
24524 }
24525
24526 /* "pysam/libcbcf.pyx":1281
24527 * return ()
24528 * cdef int i
24529 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None, # <<<<<<<<<<<<<<
24530 * charptr_to_str(r.vals[i]) if r.vals[i] else None)
24531 * for i in range(r.nkeys))
24532 */
24533 __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1281, __pyx_L1_error)
24534 __Pyx_GOTREF(__pyx_t_7);
24535 __Pyx_GIVEREF(__pyx_t_4);
24536 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1281, __pyx_L1_error);
24537 __Pyx_GIVEREF(__pyx_t_6);
24538 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 1281, __pyx_L1_error);
24539 __pyx_t_4 = 0;
24540 __pyx_t_6 = 0;
24541 __pyx_r = __pyx_t_7;
24542 __pyx_t_7 = 0;
24543 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
24544 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
24545 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
24546 __Pyx_XGIVEREF(__pyx_r);
24547 __Pyx_TraceReturn(__pyx_r, 0);
24548 __Pyx_RefNannyFinishContext();
24549 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
24550 /* return from generator, yielding value */
24551 __pyx_generator->resume_label = 1;
24552 return __pyx_r;
24553 __pyx_L6_resume_from_yield:;
24554 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
24555 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
24556 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
24557 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1281, __pyx_L1_error)
24558 }
24559 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
24560
24561 /* function exit code */
24562 PyErr_SetNone(PyExc_StopIteration);
24563 goto __pyx_L0;
24564 __pyx_L1_error:;
24565 __Pyx_Generator_Replace_StopIteration(0);
24566 __Pyx_XDECREF(__pyx_t_4);
24567 __Pyx_XDECREF(__pyx_t_6);
24568 __Pyx_XDECREF(__pyx_t_7);
24569 __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
24570 __pyx_L0:;
24571 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
24572 #if !CYTHON_USE_EXC_INFO_STACK
24573 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
24574 #endif
24575 __pyx_generator->resume_label = -1;
24576 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
24577 __Pyx_TraceReturn(__pyx_r, 0);
24578 __Pyx_RefNannyFinishContext();
24579 return __pyx_r;
24580 }
24581
24582 /* "pysam/libcbcf.pyx":1274
24583 * return charptr_to_str(r.value) if r and r.value else None
24584 *
24585 * @property # <<<<<<<<<<<<<<
24586 * def attrs(self):
24587 * """sequence of additional header attributes"""
24588 */
24589
24590 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5attrs___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
24591 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__ *__pyx_cur_scope;
24592 PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_7__get___2generator32 = 0;
24593 PyObject *__pyx_r = NULL;
24594 __Pyx_TraceDeclarations
24595 __Pyx_RefNannyDeclarations
24596 bcf_hrec_t *__pyx_t_1;
24597 int __pyx_t_2;
24598 PyObject *__pyx_t_3 = NULL;
24599 PyObject *__pyx_t_4 = NULL;
24600 int __pyx_lineno = 0;
24601 const char *__pyx_filename = NULL;
24602 int __pyx_clineno = 0;
24603 __Pyx_RefNannySetupContext("__get__", 0);
24604 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_5___get__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__, __pyx_empty_tuple, NULL);
24605 if (unlikely(!__pyx_cur_scope)) {
24606 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__ *)Py_None);
24607 __Pyx_INCREF(Py_None);
24608 __PYX_ERR(0, 1274, __pyx_L1_error)
24609 } else {
24610 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
24611 }
24612 __Pyx_TraceCall("__get__", __pyx_f[0], 1274, 0, __PYX_ERR(0, 1274, __pyx_L1_error));
24613
24614 /* "pysam/libcbcf.pyx":1277
24615 * def attrs(self):
24616 * """sequence of additional header attributes"""
24617 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
24618 * if not r:
24619 * return ()
24620 */
24621 __pyx_t_1 = __pyx_v_self->ptr;
24622 __pyx_cur_scope->__pyx_v_r = __pyx_t_1;
24623
24624 /* "pysam/libcbcf.pyx":1278
24625 * """sequence of additional header attributes"""
24626 * cdef bcf_hrec_t *r = self.ptr
24627 * if not r: # <<<<<<<<<<<<<<
24628 * return ()
24629 * cdef int i
24630 */
24631 __pyx_t_2 = (!(__pyx_cur_scope->__pyx_v_r != 0));
24632 if (__pyx_t_2) {
24633
24634 /* "pysam/libcbcf.pyx":1279
24635 * cdef bcf_hrec_t *r = self.ptr
24636 * if not r:
24637 * return () # <<<<<<<<<<<<<<
24638 * cdef int i
24639 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None,
24640 */
24641 __Pyx_XDECREF(__pyx_r);
24642 __Pyx_INCREF(__pyx_empty_tuple);
24643 __pyx_r = __pyx_empty_tuple;
24644 goto __pyx_L0;
24645
24646 /* "pysam/libcbcf.pyx":1278
24647 * """sequence of additional header attributes"""
24648 * cdef bcf_hrec_t *r = self.ptr
24649 * if not r: # <<<<<<<<<<<<<<
24650 * return ()
24651 * cdef int i
24652 */
24653 }
24654
24655 /* "pysam/libcbcf.pyx":1281
24656 * return ()
24657 * cdef int i
24658 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None, # <<<<<<<<<<<<<<
24659 * charptr_to_str(r.vals[i]) if r.vals[i] else None)
24660 * for i in range(r.nkeys))
24661 */
24662 __Pyx_XDECREF(__pyx_r);
24663
24664 /* "pysam/libcbcf.pyx":1283
24665 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None,
24666 * charptr_to_str(r.vals[i]) if r.vals[i] else None)
24667 * for i in range(r.nkeys)) # <<<<<<<<<<<<<<
24668 *
24669 * def __len__(self):
24670 */
24671 __pyx_t_3 = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_7__get___genexpr(((PyObject*)__pyx_cur_scope), __pyx_cur_scope->__pyx_v_r->nkeys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error)
24672 __Pyx_GOTREF(__pyx_t_3);
24673
24674 /* "pysam/libcbcf.pyx":1281
24675 * return ()
24676 * cdef int i
24677 * return tuple((bcf_str_cache_get_charptr(r.keys[i]) if r.keys[i] else None, # <<<<<<<<<<<<<<
24678 * charptr_to_str(r.vals[i]) if r.vals[i] else None)
24679 * for i in range(r.nkeys))
24680 */
24681 __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1281, __pyx_L1_error)
24682 __Pyx_GOTREF(__pyx_t_4);
24683 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24684 __pyx_r = __pyx_t_4;
24685 __pyx_t_4 = 0;
24686 goto __pyx_L0;
24687
24688 /* "pysam/libcbcf.pyx":1274
24689 * return charptr_to_str(r.value) if r and r.value else None
24690 *
24691 * @property # <<<<<<<<<<<<<<
24692 * def attrs(self):
24693 * """sequence of additional header attributes"""
24694 */
24695
24696 /* function exit code */
24697 __pyx_L1_error:;
24698 __Pyx_XDECREF(__pyx_t_3);
24699 __Pyx_XDECREF(__pyx_t_4);
24700 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.attrs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24701 __pyx_r = NULL;
24702 __pyx_L0:;
24703 __Pyx_XDECREF(__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_7__get___2generator32);
24704 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
24705 __Pyx_XGIVEREF(__pyx_r);
24706 __Pyx_TraceReturn(__pyx_r, 0);
24707 __Pyx_RefNannyFinishContext();
24708 return __pyx_r;
24709 }
24710
24711 /* "pysam/libcbcf.pyx":1285
24712 * for i in range(r.nkeys))
24713 *
24714 * def __len__(self): # <<<<<<<<<<<<<<
24715 * cdef bcf_hrec_t *r = self.ptr
24716 * return r.nkeys if r else 0
24717 */
24718
24719 /* Python wrapper */
24720 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3__len__(PyObject *__pyx_v_self); /*proto*/
24721 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3__len__(PyObject *__pyx_v_self) {
24722 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24723 Py_ssize_t __pyx_r;
24724 __Pyx_RefNannyDeclarations
24725 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
24726 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24727 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
24728
24729 /* function exit code */
24730 __Pyx_RefNannyFinishContext();
24731 return __pyx_r;
24732 }
24733
24734 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
24735 bcf_hrec_t *__pyx_v_r;
24736 Py_ssize_t __pyx_r;
24737 __Pyx_TraceDeclarations
24738 bcf_hrec_t *__pyx_t_1;
24739 Py_ssize_t __pyx_t_2;
24740 int __pyx_t_3;
24741 int __pyx_lineno = 0;
24742 const char *__pyx_filename = NULL;
24743 int __pyx_clineno = 0;
24744 __Pyx_TraceCall("__len__", __pyx_f[0], 1285, 0, __PYX_ERR(0, 1285, __pyx_L1_error));
24745
24746 /* "pysam/libcbcf.pyx":1286
24747 *
24748 * def __len__(self):
24749 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
24750 * return r.nkeys if r else 0
24751 *
24752 */
24753 __pyx_t_1 = __pyx_v_self->ptr;
24754 __pyx_v_r = __pyx_t_1;
24755
24756 /* "pysam/libcbcf.pyx":1287
24757 * def __len__(self):
24758 * cdef bcf_hrec_t *r = self.ptr
24759 * return r.nkeys if r else 0 # <<<<<<<<<<<<<<
24760 *
24761 * def __bool__(self):
24762 */
24763 __pyx_t_3 = (__pyx_v_r != 0);
24764 if (__pyx_t_3) {
24765 __pyx_t_2 = __pyx_v_r->nkeys;
24766 } else {
24767 __pyx_t_2 = 0;
24768 }
24769 __pyx_r = __pyx_t_2;
24770 goto __pyx_L0;
24771
24772 /* "pysam/libcbcf.pyx":1285
24773 * for i in range(r.nkeys))
24774 *
24775 * def __len__(self): # <<<<<<<<<<<<<<
24776 * cdef bcf_hrec_t *r = self.ptr
24777 * return r.nkeys if r else 0
24778 */
24779
24780 /* function exit code */
24781 __pyx_L1_error:;
24782 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24783 __pyx_r = -1;
24784 __pyx_L0:;
24785 __Pyx_TraceReturn(Py_None, 0);
24786 return __pyx_r;
24787 }
24788
24789 /* "pysam/libcbcf.pyx":1289
24790 * return r.nkeys if r else 0
24791 *
24792 * def __bool__(self): # <<<<<<<<<<<<<<
24793 * cdef bcf_hrec_t *r = self.ptr
24794 * return r != NULL and r.nkeys != 0
24795 */
24796
24797 /* Python wrapper */
24798 static int __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5__bool__(PyObject *__pyx_v_self); /*proto*/
24799 static int __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5__bool__(PyObject *__pyx_v_self) {
24800 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24801 int __pyx_r;
24802 __Pyx_RefNannyDeclarations
24803 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
24804 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24805 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
24806
24807 /* function exit code */
24808 __Pyx_RefNannyFinishContext();
24809 return __pyx_r;
24810 }
24811
24812 static int __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
24813 bcf_hrec_t *__pyx_v_r;
24814 int __pyx_r;
24815 __Pyx_TraceDeclarations
24816 bcf_hrec_t *__pyx_t_1;
24817 int __pyx_t_2;
24818 int __pyx_t_3;
24819 int __pyx_lineno = 0;
24820 const char *__pyx_filename = NULL;
24821 int __pyx_clineno = 0;
24822 __Pyx_TraceCall("__bool__", __pyx_f[0], 1289, 0, __PYX_ERR(0, 1289, __pyx_L1_error));
24823
24824 /* "pysam/libcbcf.pyx":1290
24825 *
24826 * def __bool__(self):
24827 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
24828 * return r != NULL and r.nkeys != 0
24829 *
24830 */
24831 __pyx_t_1 = __pyx_v_self->ptr;
24832 __pyx_v_r = __pyx_t_1;
24833
24834 /* "pysam/libcbcf.pyx":1291
24835 * def __bool__(self):
24836 * cdef bcf_hrec_t *r = self.ptr
24837 * return r != NULL and r.nkeys != 0 # <<<<<<<<<<<<<<
24838 *
24839 * def __getitem__(self, key):
24840 */
24841 __pyx_t_3 = (__pyx_v_r != NULL);
24842 if (__pyx_t_3) {
24843 } else {
24844 __pyx_t_2 = __pyx_t_3;
24845 goto __pyx_L3_bool_binop_done;
24846 }
24847 __pyx_t_3 = (__pyx_v_r->nkeys != 0);
24848 __pyx_t_2 = __pyx_t_3;
24849 __pyx_L3_bool_binop_done:;
24850 __pyx_r = __pyx_t_2;
24851 goto __pyx_L0;
24852
24853 /* "pysam/libcbcf.pyx":1289
24854 * return r.nkeys if r else 0
24855 *
24856 * def __bool__(self): # <<<<<<<<<<<<<<
24857 * cdef bcf_hrec_t *r = self.ptr
24858 * return r != NULL and r.nkeys != 0
24859 */
24860
24861 /* function exit code */
24862 __pyx_L1_error:;
24863 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24864 __pyx_r = -1;
24865 __pyx_L0:;
24866 __Pyx_TraceReturn(Py_None, 0);
24867 return __pyx_r;
24868 }
24869
24870 /* "pysam/libcbcf.pyx":1293
24871 * return r != NULL and r.nkeys != 0
24872 *
24873 * def __getitem__(self, key): # <<<<<<<<<<<<<<
24874 * """get attribute value"""
24875 * cdef bcf_hrec_t *r = self.ptr
24876 */
24877
24878 /* Python wrapper */
24879 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
24880 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__, "get attribute value");
24881 #if CYTHON_UPDATE_DESCRIPTOR_DOC
24882 struct wrapperbase __pyx_wrapperbase_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__;
24883 #endif
24884 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
24885 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24886 PyObject *__pyx_r = 0;
24887 __Pyx_RefNannyDeclarations
24888 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
24889 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24890 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self), ((PyObject *)__pyx_v_key));
24891
24892 /* function exit code */
24893 __Pyx_RefNannyFinishContext();
24894 return __pyx_r;
24895 }
24896
24897 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_key) {
24898 bcf_hrec_t *__pyx_v_r;
24899 int __pyx_v_i;
24900 PyObject *__pyx_v_bkey = NULL;
24901 PyObject *__pyx_r = NULL;
24902 __Pyx_TraceDeclarations
24903 __Pyx_RefNannyDeclarations
24904 bcf_hrec_t *__pyx_t_1;
24905 int __pyx_t_2;
24906 PyObject *__pyx_t_3 = NULL;
24907 int __pyx_t_4;
24908 int __pyx_t_5;
24909 int __pyx_t_6;
24910 int __pyx_t_7;
24911 PyObject *__pyx_t_8 = NULL;
24912 int __pyx_lineno = 0;
24913 const char *__pyx_filename = NULL;
24914 int __pyx_clineno = 0;
24915 __Pyx_RefNannySetupContext("__getitem__", 1);
24916 __Pyx_TraceCall("__getitem__", __pyx_f[0], 1293, 0, __PYX_ERR(0, 1293, __pyx_L1_error));
24917
24918 /* "pysam/libcbcf.pyx":1295
24919 * def __getitem__(self, key):
24920 * """get attribute value"""
24921 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
24922 * cdef int i
24923 * if r:
24924 */
24925 __pyx_t_1 = __pyx_v_self->ptr;
24926 __pyx_v_r = __pyx_t_1;
24927
24928 /* "pysam/libcbcf.pyx":1297
24929 * cdef bcf_hrec_t *r = self.ptr
24930 * cdef int i
24931 * if r: # <<<<<<<<<<<<<<
24932 * bkey = force_bytes(key)
24933 * for i in range(r.nkeys):
24934 */
24935 __pyx_t_2 = (__pyx_v_r != 0);
24936 if (__pyx_t_2) {
24937
24938 /* "pysam/libcbcf.pyx":1298
24939 * cdef int i
24940 * if r:
24941 * bkey = force_bytes(key) # <<<<<<<<<<<<<<
24942 * for i in range(r.nkeys):
24943 * if r.keys[i] and r.keys[i] == bkey:
24944 */
24945 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L1_error)
24946 __Pyx_GOTREF(__pyx_t_3);
24947 __pyx_v_bkey = ((PyObject*)__pyx_t_3);
24948 __pyx_t_3 = 0;
24949
24950 /* "pysam/libcbcf.pyx":1299
24951 * if r:
24952 * bkey = force_bytes(key)
24953 * for i in range(r.nkeys): # <<<<<<<<<<<<<<
24954 * if r.keys[i] and r.keys[i] == bkey:
24955 * return charptr_to_str(r.vals[i]) if r.vals[i] else None
24956 */
24957 __pyx_t_4 = __pyx_v_r->nkeys;
24958 __pyx_t_5 = __pyx_t_4;
24959 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
24960 __pyx_v_i = __pyx_t_6;
24961
24962 /* "pysam/libcbcf.pyx":1300
24963 * bkey = force_bytes(key)
24964 * for i in range(r.nkeys):
24965 * if r.keys[i] and r.keys[i] == bkey: # <<<<<<<<<<<<<<
24966 * return charptr_to_str(r.vals[i]) if r.vals[i] else None
24967 * raise KeyError('cannot find metadata key')
24968 */
24969 __pyx_t_7 = ((__pyx_v_r->keys[__pyx_v_i]) != 0);
24970 if (__pyx_t_7) {
24971 } else {
24972 __pyx_t_2 = __pyx_t_7;
24973 goto __pyx_L7_bool_binop_done;
24974 }
24975 __pyx_t_3 = __Pyx_PyBytes_FromString((__pyx_v_r->keys[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1300, __pyx_L1_error)
24976 __Pyx_GOTREF(__pyx_t_3);
24977 __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_t_3, __pyx_v_bkey, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1300, __pyx_L1_error)
24978 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24979 __pyx_t_2 = __pyx_t_7;
24980 __pyx_L7_bool_binop_done:;
24981 if (__pyx_t_2) {
24982
24983 /* "pysam/libcbcf.pyx":1301
24984 * for i in range(r.nkeys):
24985 * if r.keys[i] and r.keys[i] == bkey:
24986 * return charptr_to_str(r.vals[i]) if r.vals[i] else None # <<<<<<<<<<<<<<
24987 * raise KeyError('cannot find metadata key')
24988 *
24989 */
24990 __Pyx_XDECREF(__pyx_r);
24991 __pyx_t_2 = ((__pyx_v_r->vals[__pyx_v_i]) != 0);
24992 if (__pyx_t_2) {
24993 __pyx_t_8 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_r->vals[__pyx_v_i]), NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1301, __pyx_L1_error)
24994 __Pyx_GOTREF(__pyx_t_8);
24995 __pyx_t_3 = __pyx_t_8;
24996 __pyx_t_8 = 0;
24997 } else {
24998 __Pyx_INCREF(Py_None);
24999 __pyx_t_3 = Py_None;
25000 }
25001 __pyx_r = __pyx_t_3;
25002 __pyx_t_3 = 0;
25003 goto __pyx_L0;
25004
25005 /* "pysam/libcbcf.pyx":1300
25006 * bkey = force_bytes(key)
25007 * for i in range(r.nkeys):
25008 * if r.keys[i] and r.keys[i] == bkey: # <<<<<<<<<<<<<<
25009 * return charptr_to_str(r.vals[i]) if r.vals[i] else None
25010 * raise KeyError('cannot find metadata key')
25011 */
25012 }
25013 }
25014
25015 /* "pysam/libcbcf.pyx":1297
25016 * cdef bcf_hrec_t *r = self.ptr
25017 * cdef int i
25018 * if r: # <<<<<<<<<<<<<<
25019 * bkey = force_bytes(key)
25020 * for i in range(r.nkeys):
25021 */
25022 }
25023
25024 /* "pysam/libcbcf.pyx":1302
25025 * if r.keys[i] and r.keys[i] == bkey:
25026 * return charptr_to_str(r.vals[i]) if r.vals[i] else None
25027 * raise KeyError('cannot find metadata key') # <<<<<<<<<<<<<<
25028 *
25029 * def __iter__(self):
25030 */
25031 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1302, __pyx_L1_error)
25032 __Pyx_GOTREF(__pyx_t_3);
25033 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25034 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25035 __PYX_ERR(0, 1302, __pyx_L1_error)
25036
25037 /* "pysam/libcbcf.pyx":1293
25038 * return r != NULL and r.nkeys != 0
25039 *
25040 * def __getitem__(self, key): # <<<<<<<<<<<<<<
25041 * """get attribute value"""
25042 * cdef bcf_hrec_t *r = self.ptr
25043 */
25044
25045 /* function exit code */
25046 __pyx_L1_error:;
25047 __Pyx_XDECREF(__pyx_t_3);
25048 __Pyx_XDECREF(__pyx_t_8);
25049 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25050 __pyx_r = NULL;
25051 __pyx_L0:;
25052 __Pyx_XDECREF(__pyx_v_bkey);
25053 __Pyx_XGIVEREF(__pyx_r);
25054 __Pyx_TraceReturn(__pyx_r, 0);
25055 __Pyx_RefNannyFinishContext();
25056 return __pyx_r;
25057 }
25058 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
25059
25060 /* "pysam/libcbcf.pyx":1304
25061 * raise KeyError('cannot find metadata key')
25062 *
25063 * def __iter__(self): # <<<<<<<<<<<<<<
25064 * cdef bcf_hrec_t *r = self.ptr
25065 * if not r:
25066 */
25067
25068 /* Python wrapper */
25069 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_9__iter__(PyObject *__pyx_v_self); /*proto*/
25070 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_9__iter__(PyObject *__pyx_v_self) {
25071 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25072 PyObject *__pyx_r = 0;
25073 __Pyx_RefNannyDeclarations
25074 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
25075 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
25076 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_8__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
25077
25078 /* function exit code */
25079 __Pyx_RefNannyFinishContext();
25080 return __pyx_r;
25081 }
25082
25083 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
25084 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *__pyx_cur_scope;
25085 PyObject *__pyx_r = NULL;
25086 __Pyx_RefNannyDeclarations
25087 int __pyx_lineno = 0;
25088 const char *__pyx_filename = NULL;
25089 int __pyx_clineno = 0;
25090 __Pyx_RefNannySetupContext("__iter__", 0);
25091 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_7___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__, __pyx_empty_tuple, NULL);
25092 if (unlikely(!__pyx_cur_scope)) {
25093 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *)Py_None);
25094 __Pyx_INCREF(Py_None);
25095 __PYX_ERR(0, 1304, __pyx_L1_error)
25096 } else {
25097 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
25098 }
25099 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
25100 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
25101 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
25102 {
25103 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_10generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantHeaderRecord___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1304, __pyx_L1_error)
25104 __Pyx_DECREF(__pyx_cur_scope);
25105 __Pyx_RefNannyFinishContext();
25106 return (PyObject *) gen;
25107 }
25108
25109 /* function exit code */
25110 __pyx_L1_error:;
25111 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25112 __pyx_r = NULL;
25113 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
25114 __Pyx_XGIVEREF(__pyx_r);
25115 __Pyx_RefNannyFinishContext();
25116 return __pyx_r;
25117 }
25118
25119 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
25120 {
25121 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *)__pyx_generator->closure);
25122 PyObject *__pyx_r = NULL;
25123 __Pyx_TraceDeclarations
25124 bcf_hrec_t *__pyx_t_1;
25125 int __pyx_t_2;
25126 int __pyx_t_3;
25127 int __pyx_t_4;
25128 int __pyx_t_5;
25129 PyObject *__pyx_t_6 = NULL;
25130 int __pyx_lineno = 0;
25131 const char *__pyx_filename = NULL;
25132 int __pyx_clineno = 0;
25133 __Pyx_RefNannyDeclarations
25134 __Pyx_RefNannySetupContext("__iter__", 0);
25135 __Pyx_TraceCall("__iter__", __pyx_f[0], 1304, 0, __PYX_ERR(0, 1304, __pyx_L1_error));
25136 switch (__pyx_generator->resume_label) {
25137 case 0: goto __pyx_L3_first_run;
25138 case 1: goto __pyx_L8_resume_from_yield;
25139 default: /* CPython raises the right error here */
25140 __Pyx_TraceReturn(Py_None, 0);
25141 __Pyx_RefNannyFinishContext();
25142 return NULL;
25143 }
25144 __pyx_L3_first_run:;
25145 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1304, __pyx_L1_error)
25146
25147 /* "pysam/libcbcf.pyx":1305
25148 *
25149 * def __iter__(self):
25150 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
25151 * if not r:
25152 * return
25153 */
25154 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->ptr;
25155 __pyx_cur_scope->__pyx_v_r = __pyx_t_1;
25156
25157 /* "pysam/libcbcf.pyx":1306
25158 * def __iter__(self):
25159 * cdef bcf_hrec_t *r = self.ptr
25160 * if not r: # <<<<<<<<<<<<<<
25161 * return
25162 * cdef int i
25163 */
25164 __pyx_t_2 = (!(__pyx_cur_scope->__pyx_v_r != 0));
25165 if (__pyx_t_2) {
25166
25167 /* "pysam/libcbcf.pyx":1307
25168 * cdef bcf_hrec_t *r = self.ptr
25169 * if not r:
25170 * return # <<<<<<<<<<<<<<
25171 * cdef int i
25172 * for i in range(r.nkeys):
25173 */
25174 __Pyx_XDECREF(__pyx_r);
25175 __pyx_r = NULL;
25176 goto __pyx_L0;
25177
25178 /* "pysam/libcbcf.pyx":1306
25179 * def __iter__(self):
25180 * cdef bcf_hrec_t *r = self.ptr
25181 * if not r: # <<<<<<<<<<<<<<
25182 * return
25183 * cdef int i
25184 */
25185 }
25186
25187 /* "pysam/libcbcf.pyx":1309
25188 * return
25189 * cdef int i
25190 * for i in range(r.nkeys): # <<<<<<<<<<<<<<
25191 * if r.keys[i]:
25192 * yield bcf_str_cache_get_charptr(r.keys[i])
25193 */
25194 __pyx_t_3 = __pyx_cur_scope->__pyx_v_r->nkeys;
25195 __pyx_t_4 = __pyx_t_3;
25196 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
25197 __pyx_cur_scope->__pyx_v_i = __pyx_t_5;
25198
25199 /* "pysam/libcbcf.pyx":1310
25200 * cdef int i
25201 * for i in range(r.nkeys):
25202 * if r.keys[i]: # <<<<<<<<<<<<<<
25203 * yield bcf_str_cache_get_charptr(r.keys[i])
25204 *
25205 */
25206 __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_r->keys[__pyx_cur_scope->__pyx_v_i]) != 0);
25207 if (__pyx_t_2) {
25208
25209 /* "pysam/libcbcf.pyx":1311
25210 * for i in range(r.nkeys):
25211 * if r.keys[i]:
25212 * yield bcf_str_cache_get_charptr(r.keys[i]) # <<<<<<<<<<<<<<
25213 *
25214 * def get(self, key, default=None):
25215 */
25216 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr((__pyx_cur_scope->__pyx_v_r->keys[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1311, __pyx_L1_error)
25217 __Pyx_GOTREF(__pyx_t_6);
25218 __pyx_r = __pyx_t_6;
25219 __pyx_t_6 = 0;
25220 __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
25221 __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
25222 __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
25223 __Pyx_XGIVEREF(__pyx_r);
25224 __Pyx_TraceReturn(__pyx_r, 0);
25225 __Pyx_RefNannyFinishContext();
25226 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
25227 /* return from generator, yielding value */
25228 __pyx_generator->resume_label = 1;
25229 return __pyx_r;
25230 __pyx_L8_resume_from_yield:;
25231 __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
25232 __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
25233 __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
25234 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1311, __pyx_L1_error)
25235
25236 /* "pysam/libcbcf.pyx":1310
25237 * cdef int i
25238 * for i in range(r.nkeys):
25239 * if r.keys[i]: # <<<<<<<<<<<<<<
25240 * yield bcf_str_cache_get_charptr(r.keys[i])
25241 *
25242 */
25243 }
25244 }
25245 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
25246
25247 /* "pysam/libcbcf.pyx":1304
25248 * raise KeyError('cannot find metadata key')
25249 *
25250 * def __iter__(self): # <<<<<<<<<<<<<<
25251 * cdef bcf_hrec_t *r = self.ptr
25252 * if not r:
25253 */
25254
25255 /* function exit code */
25256 PyErr_SetNone(PyExc_StopIteration);
25257 goto __pyx_L0;
25258 __pyx_L1_error:;
25259 __Pyx_Generator_Replace_StopIteration(0);
25260 __Pyx_XDECREF(__pyx_t_6);
25261 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25262 __pyx_L0:;
25263 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
25264 #if !CYTHON_USE_EXC_INFO_STACK
25265 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
25266 #endif
25267 __pyx_generator->resume_label = -1;
25268 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
25269 __Pyx_TraceReturn(__pyx_r, 0);
25270 __Pyx_RefNannyFinishContext();
25271 return __pyx_r;
25272 }
25273
25274 /* "pysam/libcbcf.pyx":1313
25275 * yield bcf_str_cache_get_charptr(r.keys[i])
25276 *
25277 * def get(self, key, default=None): # <<<<<<<<<<<<<<
25278 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
25279 * try:
25280 */
25281
25282 /* Python wrapper */
25283 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_12get(PyObject *__pyx_v_self,
25284 #if CYTHON_METH_FASTCALL
25285 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25286 #else
25287 PyObject *__pyx_args, PyObject *__pyx_kwds
25288 #endif
25289 ); /*proto*/
25290 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_11get, "VariantHeaderRecord.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
25291 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_12get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_12get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_11get};
25292 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_12get(PyObject *__pyx_v_self,
25293 #if CYTHON_METH_FASTCALL
25294 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25295 #else
25296 PyObject *__pyx_args, PyObject *__pyx_kwds
25297 #endif
25298 ) {
25299 PyObject *__pyx_v_key = 0;
25300 PyObject *__pyx_v_default = 0;
25301 #if !CYTHON_METH_FASTCALL
25302 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25303 #endif
25304 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25305 PyObject* values[2] = {0,0};
25306 int __pyx_lineno = 0;
25307 const char *__pyx_filename = NULL;
25308 int __pyx_clineno = 0;
25309 PyObject *__pyx_r = 0;
25310 __Pyx_RefNannyDeclarations
25311 __Pyx_RefNannySetupContext("get (wrapper)", 0);
25312 #if !CYTHON_METH_FASTCALL
25313 #if CYTHON_ASSUME_SAFE_MACROS
25314 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25315 #else
25316 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25317 #endif
25318 #endif
25319 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
25320 {
25321 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
25322 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
25323 if (__pyx_kwds) {
25324 Py_ssize_t kw_args;
25325 switch (__pyx_nargs) {
25326 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
25327 CYTHON_FALLTHROUGH;
25328 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
25329 CYTHON_FALLTHROUGH;
25330 case 0: break;
25331 default: goto __pyx_L5_argtuple_error;
25332 }
25333 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
25334 switch (__pyx_nargs) {
25335 case 0:
25336 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
25337 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
25338 kw_args--;
25339 }
25340 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L3_error)
25341 else goto __pyx_L5_argtuple_error;
25342 CYTHON_FALLTHROUGH;
25343 case 1:
25344 if (kw_args > 0) {
25345 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
25346 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
25347 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L3_error)
25348 }
25349 }
25350 if (unlikely(kw_args > 0)) {
25351 const Py_ssize_t kwd_pos_args = __pyx_nargs;
25352 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 1313, __pyx_L3_error)
25353 }
25354 } else {
25355 switch (__pyx_nargs) {
25356 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
25357 CYTHON_FALLTHROUGH;
25358 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
25359 break;
25360 default: goto __pyx_L5_argtuple_error;
25361 }
25362 }
25363 __pyx_v_key = values[0];
25364 __pyx_v_default = values[1];
25365 }
25366 goto __pyx_L6_skip;
25367 __pyx_L5_argtuple_error:;
25368 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1313, __pyx_L3_error)
25369 __pyx_L6_skip:;
25370 goto __pyx_L4_argument_unpacking_done;
25371 __pyx_L3_error:;
25372 {
25373 Py_ssize_t __pyx_temp;
25374 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25375 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
25376 }
25377 }
25378 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
25379 __Pyx_RefNannyFinishContext();
25380 return NULL;
25381 __pyx_L4_argument_unpacking_done:;
25382 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_11get(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
25383
25384 /* function exit code */
25385 {
25386 Py_ssize_t __pyx_temp;
25387 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25388 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
25389 }
25390 }
25391 __Pyx_RefNannyFinishContext();
25392 return __pyx_r;
25393 }
25394
25395 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_11get(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
25396 PyObject *__pyx_r = NULL;
25397 __Pyx_TraceDeclarations
25398 __Pyx_RefNannyDeclarations
25399 PyObject *__pyx_t_1 = NULL;
25400 PyObject *__pyx_t_2 = NULL;
25401 PyObject *__pyx_t_3 = NULL;
25402 PyObject *__pyx_t_4 = NULL;
25403 int __pyx_t_5;
25404 PyObject *__pyx_t_6 = NULL;
25405 PyObject *__pyx_t_7 = NULL;
25406 int __pyx_lineno = 0;
25407 const char *__pyx_filename = NULL;
25408 int __pyx_clineno = 0;
25409 __Pyx_TraceFrameInit(__pyx_codeobj__33)
25410 __Pyx_RefNannySetupContext("get", 1);
25411 __Pyx_TraceCall("get", __pyx_f[0], 1313, 0, __PYX_ERR(0, 1313, __pyx_L1_error));
25412
25413 /* "pysam/libcbcf.pyx":1315
25414 * def get(self, key, default=None):
25415 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
25416 * try: # <<<<<<<<<<<<<<
25417 * return self[key]
25418 * except KeyError:
25419 */
25420 {
25421 __Pyx_PyThreadState_declare
25422 __Pyx_PyThreadState_assign
25423 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
25424 __Pyx_XGOTREF(__pyx_t_1);
25425 __Pyx_XGOTREF(__pyx_t_2);
25426 __Pyx_XGOTREF(__pyx_t_3);
25427 /*try:*/ {
25428
25429 /* "pysam/libcbcf.pyx":1316
25430 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
25431 * try:
25432 * return self[key] # <<<<<<<<<<<<<<
25433 * except KeyError:
25434 * return default
25435 */
25436 __Pyx_XDECREF(__pyx_r);
25437 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L3_error)
25438 __Pyx_GOTREF(__pyx_t_4);
25439 __pyx_r = __pyx_t_4;
25440 __pyx_t_4 = 0;
25441 goto __pyx_L7_try_return;
25442
25443 /* "pysam/libcbcf.pyx":1315
25444 * def get(self, key, default=None):
25445 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
25446 * try: # <<<<<<<<<<<<<<
25447 * return self[key]
25448 * except KeyError:
25449 */
25450 }
25451 __pyx_L3_error:;
25452 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25453
25454 /* "pysam/libcbcf.pyx":1317
25455 * try:
25456 * return self[key]
25457 * except KeyError: # <<<<<<<<<<<<<<
25458 * return default
25459 *
25460 */
25461 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
25462 if (__pyx_t_5) {
25463 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
25464 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1317, __pyx_L5_except_error)
25465 __Pyx_XGOTREF(__pyx_t_4);
25466 __Pyx_XGOTREF(__pyx_t_6);
25467 __Pyx_XGOTREF(__pyx_t_7);
25468
25469 /* "pysam/libcbcf.pyx":1318
25470 * return self[key]
25471 * except KeyError:
25472 * return default # <<<<<<<<<<<<<<
25473 *
25474 * def __contains__(self, key):
25475 */
25476 __Pyx_XDECREF(__pyx_r);
25477 __Pyx_INCREF(__pyx_v_default);
25478 __pyx_r = __pyx_v_default;
25479 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25480 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25481 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25482 goto __pyx_L6_except_return;
25483 }
25484 goto __pyx_L5_except_error;
25485
25486 /* "pysam/libcbcf.pyx":1315
25487 * def get(self, key, default=None):
25488 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
25489 * try: # <<<<<<<<<<<<<<
25490 * return self[key]
25491 * except KeyError:
25492 */
25493 __pyx_L5_except_error:;
25494 __Pyx_XGIVEREF(__pyx_t_1);
25495 __Pyx_XGIVEREF(__pyx_t_2);
25496 __Pyx_XGIVEREF(__pyx_t_3);
25497 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
25498 goto __pyx_L1_error;
25499 __pyx_L7_try_return:;
25500 __Pyx_XGIVEREF(__pyx_t_1);
25501 __Pyx_XGIVEREF(__pyx_t_2);
25502 __Pyx_XGIVEREF(__pyx_t_3);
25503 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
25504 goto __pyx_L0;
25505 __pyx_L6_except_return:;
25506 __Pyx_XGIVEREF(__pyx_t_1);
25507 __Pyx_XGIVEREF(__pyx_t_2);
25508 __Pyx_XGIVEREF(__pyx_t_3);
25509 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
25510 goto __pyx_L0;
25511 }
25512
25513 /* "pysam/libcbcf.pyx":1313
25514 * yield bcf_str_cache_get_charptr(r.keys[i])
25515 *
25516 * def get(self, key, default=None): # <<<<<<<<<<<<<<
25517 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
25518 * try:
25519 */
25520
25521 /* function exit code */
25522 __pyx_L1_error:;
25523 __Pyx_XDECREF(__pyx_t_4);
25524 __Pyx_XDECREF(__pyx_t_6);
25525 __Pyx_XDECREF(__pyx_t_7);
25526 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
25527 __pyx_r = NULL;
25528 __pyx_L0:;
25529 __Pyx_XGIVEREF(__pyx_r);
25530 __Pyx_TraceReturn(__pyx_r, 0);
25531 __Pyx_RefNannyFinishContext();
25532 return __pyx_r;
25533 }
25534
25535 /* "pysam/libcbcf.pyx":1320
25536 * return default
25537 *
25538 * def __contains__(self, key): # <<<<<<<<<<<<<<
25539 * try:
25540 * self[key]
25541 */
25542
25543 /* Python wrapper */
25544 static int __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_14__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
25545 static int __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_14__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
25546 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25547 int __pyx_r;
25548 __Pyx_RefNannyDeclarations
25549 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
25550 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
25551 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_13__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self), ((PyObject *)__pyx_v_key));
25552
25553 /* function exit code */
25554 __Pyx_RefNannyFinishContext();
25555 return __pyx_r;
25556 }
25557
25558 static int __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_13__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_key) {
25559 int __pyx_r;
25560 __Pyx_TraceDeclarations
25561 __Pyx_RefNannyDeclarations
25562 PyObject *__pyx_t_1 = NULL;
25563 PyObject *__pyx_t_2 = NULL;
25564 PyObject *__pyx_t_3 = NULL;
25565 PyObject *__pyx_t_4 = NULL;
25566 int __pyx_t_5;
25567 PyObject *__pyx_t_6 = NULL;
25568 PyObject *__pyx_t_7 = NULL;
25569 int __pyx_lineno = 0;
25570 const char *__pyx_filename = NULL;
25571 int __pyx_clineno = 0;
25572 __Pyx_RefNannySetupContext("__contains__", 1);
25573 __Pyx_TraceCall("__contains__", __pyx_f[0], 1320, 0, __PYX_ERR(0, 1320, __pyx_L1_error));
25574
25575 /* "pysam/libcbcf.pyx":1321
25576 *
25577 * def __contains__(self, key):
25578 * try: # <<<<<<<<<<<<<<
25579 * self[key]
25580 * except KeyError:
25581 */
25582 {
25583 __Pyx_PyThreadState_declare
25584 __Pyx_PyThreadState_assign
25585 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
25586 __Pyx_XGOTREF(__pyx_t_1);
25587 __Pyx_XGOTREF(__pyx_t_2);
25588 __Pyx_XGOTREF(__pyx_t_3);
25589 /*try:*/ {
25590
25591 /* "pysam/libcbcf.pyx":1322
25592 * def __contains__(self, key):
25593 * try:
25594 * self[key] # <<<<<<<<<<<<<<
25595 * except KeyError:
25596 * return False
25597 */
25598 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L3_error)
25599 __Pyx_GOTREF(__pyx_t_4);
25600 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25601
25602 /* "pysam/libcbcf.pyx":1321
25603 *
25604 * def __contains__(self, key):
25605 * try: # <<<<<<<<<<<<<<
25606 * self[key]
25607 * except KeyError:
25608 */
25609 }
25610
25611 /* "pysam/libcbcf.pyx":1326
25612 * return False
25613 * else:
25614 * return True # <<<<<<<<<<<<<<
25615 *
25616 * def iterkeys(self):
25617 */
25618 /*else:*/ {
25619 __pyx_r = 1;
25620 goto __pyx_L6_except_return;
25621 }
25622 __pyx_L3_error:;
25623 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25624
25625 /* "pysam/libcbcf.pyx":1323
25626 * try:
25627 * self[key]
25628 * except KeyError: # <<<<<<<<<<<<<<
25629 * return False
25630 * else:
25631 */
25632 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
25633 if (__pyx_t_5) {
25634 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25635 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1323, __pyx_L5_except_error)
25636 __Pyx_XGOTREF(__pyx_t_4);
25637 __Pyx_XGOTREF(__pyx_t_6);
25638 __Pyx_XGOTREF(__pyx_t_7);
25639
25640 /* "pysam/libcbcf.pyx":1324
25641 * self[key]
25642 * except KeyError:
25643 * return False # <<<<<<<<<<<<<<
25644 * else:
25645 * return True
25646 */
25647 __pyx_r = 0;
25648 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25649 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25650 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25651 goto __pyx_L6_except_return;
25652 }
25653 goto __pyx_L5_except_error;
25654
25655 /* "pysam/libcbcf.pyx":1321
25656 *
25657 * def __contains__(self, key):
25658 * try: # <<<<<<<<<<<<<<
25659 * self[key]
25660 * except KeyError:
25661 */
25662 __pyx_L5_except_error:;
25663 __Pyx_XGIVEREF(__pyx_t_1);
25664 __Pyx_XGIVEREF(__pyx_t_2);
25665 __Pyx_XGIVEREF(__pyx_t_3);
25666 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
25667 goto __pyx_L1_error;
25668 __pyx_L6_except_return:;
25669 __Pyx_XGIVEREF(__pyx_t_1);
25670 __Pyx_XGIVEREF(__pyx_t_2);
25671 __Pyx_XGIVEREF(__pyx_t_3);
25672 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
25673 goto __pyx_L0;
25674 }
25675
25676 /* "pysam/libcbcf.pyx":1320
25677 * return default
25678 *
25679 * def __contains__(self, key): # <<<<<<<<<<<<<<
25680 * try:
25681 * self[key]
25682 */
25683
25684 /* function exit code */
25685 __pyx_L1_error:;
25686 __Pyx_XDECREF(__pyx_t_4);
25687 __Pyx_XDECREF(__pyx_t_6);
25688 __Pyx_XDECREF(__pyx_t_7);
25689 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25690 __pyx_r = -1;
25691 __pyx_L0:;
25692 __Pyx_TraceReturn(Py_None, 0);
25693 __Pyx_RefNannyFinishContext();
25694 return __pyx_r;
25695 }
25696
25697 /* "pysam/libcbcf.pyx":1328
25698 * return True
25699 *
25700 * def iterkeys(self): # <<<<<<<<<<<<<<
25701 * """D.iterkeys() -> an iterator over the keys of D"""
25702 * return iter(self)
25703 */
25704
25705 /* Python wrapper */
25706 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_16iterkeys(PyObject *__pyx_v_self,
25707 #if CYTHON_METH_FASTCALL
25708 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25709 #else
25710 PyObject *__pyx_args, PyObject *__pyx_kwds
25711 #endif
25712 ); /*proto*/
25713 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_15iterkeys, "VariantHeaderRecord.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
25714 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_16iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_16iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_15iterkeys};
25715 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_16iterkeys(PyObject *__pyx_v_self,
25716 #if CYTHON_METH_FASTCALL
25717 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25718 #else
25719 PyObject *__pyx_args, PyObject *__pyx_kwds
25720 #endif
25721 ) {
25722 #if !CYTHON_METH_FASTCALL
25723 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25724 #endif
25725 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25726 PyObject *__pyx_r = 0;
25727 __Pyx_RefNannyDeclarations
25728 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
25729 #if !CYTHON_METH_FASTCALL
25730 #if CYTHON_ASSUME_SAFE_MACROS
25731 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25732 #else
25733 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25734 #endif
25735 #endif
25736 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
25737 if (unlikely(__pyx_nargs > 0)) {
25738 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
25739 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
25740 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_15iterkeys(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
25741
25742 /* function exit code */
25743 __Pyx_RefNannyFinishContext();
25744 return __pyx_r;
25745 }
25746
25747 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_15iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
25748 PyObject *__pyx_r = NULL;
25749 __Pyx_TraceDeclarations
25750 __Pyx_RefNannyDeclarations
25751 PyObject *__pyx_t_1 = NULL;
25752 int __pyx_lineno = 0;
25753 const char *__pyx_filename = NULL;
25754 int __pyx_clineno = 0;
25755 __Pyx_TraceFrameInit(__pyx_codeobj__34)
25756 __Pyx_RefNannySetupContext("iterkeys", 1);
25757 __Pyx_TraceCall("iterkeys", __pyx_f[0], 1328, 0, __PYX_ERR(0, 1328, __pyx_L1_error));
25758
25759 /* "pysam/libcbcf.pyx":1330
25760 * def iterkeys(self):
25761 * """D.iterkeys() -> an iterator over the keys of D"""
25762 * return iter(self) # <<<<<<<<<<<<<<
25763 *
25764 * def itervalues(self):
25765 */
25766 __Pyx_XDECREF(__pyx_r);
25767 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error)
25768 __Pyx_GOTREF(__pyx_t_1);
25769 __pyx_r = __pyx_t_1;
25770 __pyx_t_1 = 0;
25771 goto __pyx_L0;
25772
25773 /* "pysam/libcbcf.pyx":1328
25774 * return True
25775 *
25776 * def iterkeys(self): # <<<<<<<<<<<<<<
25777 * """D.iterkeys() -> an iterator over the keys of D"""
25778 * return iter(self)
25779 */
25780
25781 /* function exit code */
25782 __pyx_L1_error:;
25783 __Pyx_XDECREF(__pyx_t_1);
25784 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
25785 __pyx_r = NULL;
25786 __pyx_L0:;
25787 __Pyx_XGIVEREF(__pyx_r);
25788 __Pyx_TraceReturn(__pyx_r, 0);
25789 __Pyx_RefNannyFinishContext();
25790 return __pyx_r;
25791 }
25792 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_19generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
25793
25794 /* "pysam/libcbcf.pyx":1332
25795 * return iter(self)
25796 *
25797 * def itervalues(self): # <<<<<<<<<<<<<<
25798 * """D.itervalues() -> an iterator over the values of D"""
25799 * cdef bcf_hrec_t *r = self.ptr
25800 */
25801
25802 /* Python wrapper */
25803 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_18itervalues(PyObject *__pyx_v_self,
25804 #if CYTHON_METH_FASTCALL
25805 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25806 #else
25807 PyObject *__pyx_args, PyObject *__pyx_kwds
25808 #endif
25809 ); /*proto*/
25810 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_17itervalues, "VariantHeaderRecord.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
25811 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_18itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_18itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_17itervalues};
25812 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_18itervalues(PyObject *__pyx_v_self,
25813 #if CYTHON_METH_FASTCALL
25814 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
25815 #else
25816 PyObject *__pyx_args, PyObject *__pyx_kwds
25817 #endif
25818 ) {
25819 #if !CYTHON_METH_FASTCALL
25820 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25821 #endif
25822 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25823 PyObject *__pyx_r = 0;
25824 __Pyx_RefNannyDeclarations
25825 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
25826 #if !CYTHON_METH_FASTCALL
25827 #if CYTHON_ASSUME_SAFE_MACROS
25828 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25829 #else
25830 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25831 #endif
25832 #endif
25833 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
25834 if (unlikely(__pyx_nargs > 0)) {
25835 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
25836 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
25837 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_17itervalues(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
25838
25839 /* function exit code */
25840 __Pyx_RefNannyFinishContext();
25841 return __pyx_r;
25842 }
25843
25844 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_17itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
25845 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *__pyx_cur_scope;
25846 PyObject *__pyx_r = NULL;
25847 __Pyx_RefNannyDeclarations
25848 int __pyx_lineno = 0;
25849 const char *__pyx_filename = NULL;
25850 int __pyx_clineno = 0;
25851 __Pyx_RefNannySetupContext("itervalues", 0);
25852 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_8_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues, __pyx_empty_tuple, NULL);
25853 if (unlikely(!__pyx_cur_scope)) {
25854 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *)Py_None);
25855 __Pyx_INCREF(Py_None);
25856 __PYX_ERR(0, 1332, __pyx_L1_error)
25857 } else {
25858 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
25859 }
25860 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
25861 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
25862 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
25863 {
25864 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_19generator1, __pyx_codeobj__35, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_VariantHeaderRecord_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1332, __pyx_L1_error)
25865 __Pyx_DECREF(__pyx_cur_scope);
25866 __Pyx_RefNannyFinishContext();
25867 return (PyObject *) gen;
25868 }
25869
25870 /* function exit code */
25871 __pyx_L1_error:;
25872 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
25873 __pyx_r = NULL;
25874 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
25875 __Pyx_XGIVEREF(__pyx_r);
25876 __Pyx_RefNannyFinishContext();
25877 return __pyx_r;
25878 }
25879
25880 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_19generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
25881 {
25882 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *)__pyx_generator->closure);
25883 PyObject *__pyx_r = NULL;
25884 __Pyx_TraceDeclarations
25885 bcf_hrec_t *__pyx_t_1;
25886 int __pyx_t_2;
25887 int __pyx_t_3;
25888 int __pyx_t_4;
25889 int __pyx_t_5;
25890 PyObject *__pyx_t_6 = NULL;
25891 PyObject *__pyx_t_7 = NULL;
25892 int __pyx_lineno = 0;
25893 const char *__pyx_filename = NULL;
25894 int __pyx_clineno = 0;
25895 __Pyx_RefNannyDeclarations
25896 __Pyx_RefNannySetupContext("itervalues", 0);
25897 __Pyx_TraceFrameInit(__pyx_codeobj__35)
25898 __Pyx_TraceCall("itervalues", __pyx_f[0], 1332, 0, __PYX_ERR(0, 1332, __pyx_L1_error));
25899 switch (__pyx_generator->resume_label) {
25900 case 0: goto __pyx_L3_first_run;
25901 case 1: goto __pyx_L8_resume_from_yield;
25902 default: /* CPython raises the right error here */
25903 __Pyx_TraceReturn(Py_None, 0);
25904 __Pyx_RefNannyFinishContext();
25905 return NULL;
25906 }
25907 __pyx_L3_first_run:;
25908 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1332, __pyx_L1_error)
25909
25910 /* "pysam/libcbcf.pyx":1334
25911 * def itervalues(self):
25912 * """D.itervalues() -> an iterator over the values of D"""
25913 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
25914 * if not r:
25915 * return
25916 */
25917 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->ptr;
25918 __pyx_cur_scope->__pyx_v_r = __pyx_t_1;
25919
25920 /* "pysam/libcbcf.pyx":1335
25921 * """D.itervalues() -> an iterator over the values of D"""
25922 * cdef bcf_hrec_t *r = self.ptr
25923 * if not r: # <<<<<<<<<<<<<<
25924 * return
25925 * cdef int i
25926 */
25927 __pyx_t_2 = (!(__pyx_cur_scope->__pyx_v_r != 0));
25928 if (__pyx_t_2) {
25929
25930 /* "pysam/libcbcf.pyx":1336
25931 * cdef bcf_hrec_t *r = self.ptr
25932 * if not r:
25933 * return # <<<<<<<<<<<<<<
25934 * cdef int i
25935 * for i in range(r.nkeys):
25936 */
25937 __Pyx_XDECREF(__pyx_r);
25938 __pyx_r = NULL;
25939 goto __pyx_L0;
25940
25941 /* "pysam/libcbcf.pyx":1335
25942 * """D.itervalues() -> an iterator over the values of D"""
25943 * cdef bcf_hrec_t *r = self.ptr
25944 * if not r: # <<<<<<<<<<<<<<
25945 * return
25946 * cdef int i
25947 */
25948 }
25949
25950 /* "pysam/libcbcf.pyx":1338
25951 * return
25952 * cdef int i
25953 * for i in range(r.nkeys): # <<<<<<<<<<<<<<
25954 * if r.keys[i]:
25955 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None
25956 */
25957 __pyx_t_3 = __pyx_cur_scope->__pyx_v_r->nkeys;
25958 __pyx_t_4 = __pyx_t_3;
25959 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
25960 __pyx_cur_scope->__pyx_v_i = __pyx_t_5;
25961
25962 /* "pysam/libcbcf.pyx":1339
25963 * cdef int i
25964 * for i in range(r.nkeys):
25965 * if r.keys[i]: # <<<<<<<<<<<<<<
25966 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None
25967 *
25968 */
25969 __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_r->keys[__pyx_cur_scope->__pyx_v_i]) != 0);
25970 if (__pyx_t_2) {
25971
25972 /* "pysam/libcbcf.pyx":1340
25973 * for i in range(r.nkeys):
25974 * if r.keys[i]:
25975 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None # <<<<<<<<<<<<<<
25976 *
25977 * def iteritems(self):
25978 */
25979 __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_r->vals[__pyx_cur_scope->__pyx_v_i]) != 0);
25980 if (__pyx_t_2) {
25981 __pyx_t_7 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_cur_scope->__pyx_v_r->vals[__pyx_cur_scope->__pyx_v_i]), NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1340, __pyx_L1_error)
25982 __Pyx_GOTREF(__pyx_t_7);
25983 __pyx_t_6 = __pyx_t_7;
25984 __pyx_t_7 = 0;
25985 } else {
25986 __Pyx_INCREF(Py_None);
25987 __pyx_t_6 = Py_None;
25988 }
25989 __pyx_r = __pyx_t_6;
25990 __pyx_t_6 = 0;
25991 __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
25992 __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
25993 __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
25994 __Pyx_XGIVEREF(__pyx_r);
25995 __Pyx_TraceReturn(__pyx_r, 0);
25996 __Pyx_RefNannyFinishContext();
25997 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
25998 /* return from generator, yielding value */
25999 __pyx_generator->resume_label = 1;
26000 return __pyx_r;
26001 __pyx_L8_resume_from_yield:;
26002 __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
26003 __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
26004 __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
26005 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1340, __pyx_L1_error)
26006
26007 /* "pysam/libcbcf.pyx":1339
26008 * cdef int i
26009 * for i in range(r.nkeys):
26010 * if r.keys[i]: # <<<<<<<<<<<<<<
26011 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None
26012 *
26013 */
26014 }
26015 }
26016 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
26017
26018 /* "pysam/libcbcf.pyx":1332
26019 * return iter(self)
26020 *
26021 * def itervalues(self): # <<<<<<<<<<<<<<
26022 * """D.itervalues() -> an iterator over the values of D"""
26023 * cdef bcf_hrec_t *r = self.ptr
26024 */
26025
26026 /* function exit code */
26027 PyErr_SetNone(PyExc_StopIteration);
26028 goto __pyx_L0;
26029 __pyx_L1_error:;
26030 __Pyx_Generator_Replace_StopIteration(0);
26031 __Pyx_XDECREF(__pyx_t_6);
26032 __Pyx_XDECREF(__pyx_t_7);
26033 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
26034 __pyx_L0:;
26035 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
26036 #if !CYTHON_USE_EXC_INFO_STACK
26037 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
26038 #endif
26039 __pyx_generator->resume_label = -1;
26040 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
26041 __Pyx_TraceReturn(__pyx_r, 0);
26042 __Pyx_RefNannyFinishContext();
26043 return __pyx_r;
26044 }
26045 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_22generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
26046
26047 /* "pysam/libcbcf.pyx":1342
26048 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None
26049 *
26050 * def iteritems(self): # <<<<<<<<<<<<<<
26051 * """D.iteritems() -> an iterator over the (key, value) items of D"""
26052 * cdef bcf_hrec_t *r = self.ptr
26053 */
26054
26055 /* Python wrapper */
26056 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_21iteritems(PyObject *__pyx_v_self,
26057 #if CYTHON_METH_FASTCALL
26058 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26059 #else
26060 PyObject *__pyx_args, PyObject *__pyx_kwds
26061 #endif
26062 ); /*proto*/
26063 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_20iteritems, "VariantHeaderRecord.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
26064 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_21iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_21iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_20iteritems};
26065 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_21iteritems(PyObject *__pyx_v_self,
26066 #if CYTHON_METH_FASTCALL
26067 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26068 #else
26069 PyObject *__pyx_args, PyObject *__pyx_kwds
26070 #endif
26071 ) {
26072 #if !CYTHON_METH_FASTCALL
26073 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26074 #endif
26075 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26076 PyObject *__pyx_r = 0;
26077 __Pyx_RefNannyDeclarations
26078 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
26079 #if !CYTHON_METH_FASTCALL
26080 #if CYTHON_ASSUME_SAFE_MACROS
26081 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26082 #else
26083 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26084 #endif
26085 #endif
26086 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26087 if (unlikely(__pyx_nargs > 0)) {
26088 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
26089 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
26090 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_20iteritems(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
26091
26092 /* function exit code */
26093 __Pyx_RefNannyFinishContext();
26094 return __pyx_r;
26095 }
26096
26097 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_20iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
26098 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *__pyx_cur_scope;
26099 PyObject *__pyx_r = NULL;
26100 __Pyx_RefNannyDeclarations
26101 int __pyx_lineno = 0;
26102 const char *__pyx_filename = NULL;
26103 int __pyx_clineno = 0;
26104 __Pyx_RefNannySetupContext("iteritems", 0);
26105 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_9_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems, __pyx_empty_tuple, NULL);
26106 if (unlikely(!__pyx_cur_scope)) {
26107 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *)Py_None);
26108 __Pyx_INCREF(Py_None);
26109 __PYX_ERR(0, 1342, __pyx_L1_error)
26110 } else {
26111 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
26112 }
26113 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
26114 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
26115 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
26116 {
26117 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_22generator2, __pyx_codeobj__36, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_VariantHeaderRecord_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1342, __pyx_L1_error)
26118 __Pyx_DECREF(__pyx_cur_scope);
26119 __Pyx_RefNannyFinishContext();
26120 return (PyObject *) gen;
26121 }
26122
26123 /* function exit code */
26124 __pyx_L1_error:;
26125 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
26126 __pyx_r = NULL;
26127 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
26128 __Pyx_XGIVEREF(__pyx_r);
26129 __Pyx_RefNannyFinishContext();
26130 return __pyx_r;
26131 }
26132
26133 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantHeaderRecord_22generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
26134 {
26135 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *)__pyx_generator->closure);
26136 PyObject *__pyx_r = NULL;
26137 __Pyx_TraceDeclarations
26138 bcf_hrec_t *__pyx_t_1;
26139 int __pyx_t_2;
26140 int __pyx_t_3;
26141 int __pyx_t_4;
26142 int __pyx_t_5;
26143 PyObject *__pyx_t_6 = NULL;
26144 PyObject *__pyx_t_7 = NULL;
26145 PyObject *__pyx_t_8 = NULL;
26146 int __pyx_lineno = 0;
26147 const char *__pyx_filename = NULL;
26148 int __pyx_clineno = 0;
26149 __Pyx_RefNannyDeclarations
26150 __Pyx_RefNannySetupContext("iteritems", 0);
26151 __Pyx_TraceFrameInit(__pyx_codeobj__36)
26152 __Pyx_TraceCall("iteritems", __pyx_f[0], 1342, 0, __PYX_ERR(0, 1342, __pyx_L1_error));
26153 switch (__pyx_generator->resume_label) {
26154 case 0: goto __pyx_L3_first_run;
26155 case 1: goto __pyx_L8_resume_from_yield;
26156 default: /* CPython raises the right error here */
26157 __Pyx_TraceReturn(Py_None, 0);
26158 __Pyx_RefNannyFinishContext();
26159 return NULL;
26160 }
26161 __pyx_L3_first_run:;
26162 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1342, __pyx_L1_error)
26163
26164 /* "pysam/libcbcf.pyx":1344
26165 * def iteritems(self):
26166 * """D.iteritems() -> an iterator over the (key, value) items of D"""
26167 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
26168 * if not r:
26169 * return
26170 */
26171 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->ptr;
26172 __pyx_cur_scope->__pyx_v_r = __pyx_t_1;
26173
26174 /* "pysam/libcbcf.pyx":1345
26175 * """D.iteritems() -> an iterator over the (key, value) items of D"""
26176 * cdef bcf_hrec_t *r = self.ptr
26177 * if not r: # <<<<<<<<<<<<<<
26178 * return
26179 * cdef int i
26180 */
26181 __pyx_t_2 = (!(__pyx_cur_scope->__pyx_v_r != 0));
26182 if (__pyx_t_2) {
26183
26184 /* "pysam/libcbcf.pyx":1346
26185 * cdef bcf_hrec_t *r = self.ptr
26186 * if not r:
26187 * return # <<<<<<<<<<<<<<
26188 * cdef int i
26189 * for i in range(r.nkeys):
26190 */
26191 __Pyx_XDECREF(__pyx_r);
26192 __pyx_r = NULL;
26193 goto __pyx_L0;
26194
26195 /* "pysam/libcbcf.pyx":1345
26196 * """D.iteritems() -> an iterator over the (key, value) items of D"""
26197 * cdef bcf_hrec_t *r = self.ptr
26198 * if not r: # <<<<<<<<<<<<<<
26199 * return
26200 * cdef int i
26201 */
26202 }
26203
26204 /* "pysam/libcbcf.pyx":1348
26205 * return
26206 * cdef int i
26207 * for i in range(r.nkeys): # <<<<<<<<<<<<<<
26208 * if r.keys[i]:
26209 * yield (bcf_str_cache_get_charptr(r.keys[i]), charptr_to_str(r.vals[i]) if r.vals[i] else None)
26210 */
26211 __pyx_t_3 = __pyx_cur_scope->__pyx_v_r->nkeys;
26212 __pyx_t_4 = __pyx_t_3;
26213 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
26214 __pyx_cur_scope->__pyx_v_i = __pyx_t_5;
26215
26216 /* "pysam/libcbcf.pyx":1349
26217 * cdef int i
26218 * for i in range(r.nkeys):
26219 * if r.keys[i]: # <<<<<<<<<<<<<<
26220 * yield (bcf_str_cache_get_charptr(r.keys[i]), charptr_to_str(r.vals[i]) if r.vals[i] else None)
26221 *
26222 */
26223 __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_r->keys[__pyx_cur_scope->__pyx_v_i]) != 0);
26224 if (__pyx_t_2) {
26225
26226 /* "pysam/libcbcf.pyx":1350
26227 * for i in range(r.nkeys):
26228 * if r.keys[i]:
26229 * yield (bcf_str_cache_get_charptr(r.keys[i]), charptr_to_str(r.vals[i]) if r.vals[i] else None) # <<<<<<<<<<<<<<
26230 *
26231 * def keys(self):
26232 */
26233 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr((__pyx_cur_scope->__pyx_v_r->keys[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1350, __pyx_L1_error)
26234 __Pyx_GOTREF(__pyx_t_6);
26235 __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_r->vals[__pyx_cur_scope->__pyx_v_i]) != 0);
26236 if (__pyx_t_2) {
26237 __pyx_t_8 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_cur_scope->__pyx_v_r->vals[__pyx_cur_scope->__pyx_v_i]), NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1350, __pyx_L1_error)
26238 __Pyx_GOTREF(__pyx_t_8);
26239 __pyx_t_7 = __pyx_t_8;
26240 __pyx_t_8 = 0;
26241 } else {
26242 __Pyx_INCREF(Py_None);
26243 __pyx_t_7 = Py_None;
26244 }
26245 __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1350, __pyx_L1_error)
26246 __Pyx_GOTREF(__pyx_t_8);
26247 __Pyx_GIVEREF(__pyx_t_6);
26248 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6)) __PYX_ERR(0, 1350, __pyx_L1_error);
26249 __Pyx_GIVEREF(__pyx_t_7);
26250 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0, 1350, __pyx_L1_error);
26251 __pyx_t_6 = 0;
26252 __pyx_t_7 = 0;
26253 __pyx_r = __pyx_t_8;
26254 __pyx_t_8 = 0;
26255 __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
26256 __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
26257 __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
26258 __Pyx_XGIVEREF(__pyx_r);
26259 __Pyx_TraceReturn(__pyx_r, 0);
26260 __Pyx_RefNannyFinishContext();
26261 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
26262 /* return from generator, yielding value */
26263 __pyx_generator->resume_label = 1;
26264 return __pyx_r;
26265 __pyx_L8_resume_from_yield:;
26266 __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
26267 __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
26268 __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
26269 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1350, __pyx_L1_error)
26270
26271 /* "pysam/libcbcf.pyx":1349
26272 * cdef int i
26273 * for i in range(r.nkeys):
26274 * if r.keys[i]: # <<<<<<<<<<<<<<
26275 * yield (bcf_str_cache_get_charptr(r.keys[i]), charptr_to_str(r.vals[i]) if r.vals[i] else None)
26276 *
26277 */
26278 }
26279 }
26280 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
26281
26282 /* "pysam/libcbcf.pyx":1342
26283 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None
26284 *
26285 * def iteritems(self): # <<<<<<<<<<<<<<
26286 * """D.iteritems() -> an iterator over the (key, value) items of D"""
26287 * cdef bcf_hrec_t *r = self.ptr
26288 */
26289
26290 /* function exit code */
26291 PyErr_SetNone(PyExc_StopIteration);
26292 goto __pyx_L0;
26293 __pyx_L1_error:;
26294 __Pyx_Generator_Replace_StopIteration(0);
26295 __Pyx_XDECREF(__pyx_t_6);
26296 __Pyx_XDECREF(__pyx_t_7);
26297 __Pyx_XDECREF(__pyx_t_8);
26298 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
26299 __pyx_L0:;
26300 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
26301 #if !CYTHON_USE_EXC_INFO_STACK
26302 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
26303 #endif
26304 __pyx_generator->resume_label = -1;
26305 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
26306 __Pyx_TraceReturn(__pyx_r, 0);
26307 __Pyx_RefNannyFinishContext();
26308 return __pyx_r;
26309 }
26310
26311 /* "pysam/libcbcf.pyx":1352
26312 * yield (bcf_str_cache_get_charptr(r.keys[i]), charptr_to_str(r.vals[i]) if r.vals[i] else None)
26313 *
26314 * def keys(self): # <<<<<<<<<<<<<<
26315 * """D.keys() -> list of D's keys"""
26316 * return list(self)
26317 */
26318
26319 /* Python wrapper */
26320 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_24keys(PyObject *__pyx_v_self,
26321 #if CYTHON_METH_FASTCALL
26322 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26323 #else
26324 PyObject *__pyx_args, PyObject *__pyx_kwds
26325 #endif
26326 ); /*proto*/
26327 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_23keys, "VariantHeaderRecord.keys(self)\nD.keys() -> list of D's keys");
26328 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_24keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_24keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_23keys};
26329 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_24keys(PyObject *__pyx_v_self,
26330 #if CYTHON_METH_FASTCALL
26331 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26332 #else
26333 PyObject *__pyx_args, PyObject *__pyx_kwds
26334 #endif
26335 ) {
26336 #if !CYTHON_METH_FASTCALL
26337 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26338 #endif
26339 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26340 PyObject *__pyx_r = 0;
26341 __Pyx_RefNannyDeclarations
26342 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
26343 #if !CYTHON_METH_FASTCALL
26344 #if CYTHON_ASSUME_SAFE_MACROS
26345 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26346 #else
26347 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26348 #endif
26349 #endif
26350 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26351 if (unlikely(__pyx_nargs > 0)) {
26352 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
26353 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
26354 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_23keys(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
26355
26356 /* function exit code */
26357 __Pyx_RefNannyFinishContext();
26358 return __pyx_r;
26359 }
26360
26361 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_23keys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
26362 PyObject *__pyx_r = NULL;
26363 __Pyx_TraceDeclarations
26364 __Pyx_RefNannyDeclarations
26365 PyObject *__pyx_t_1 = NULL;
26366 int __pyx_lineno = 0;
26367 const char *__pyx_filename = NULL;
26368 int __pyx_clineno = 0;
26369 __Pyx_TraceFrameInit(__pyx_codeobj__37)
26370 __Pyx_RefNannySetupContext("keys", 1);
26371 __Pyx_TraceCall("keys", __pyx_f[0], 1352, 0, __PYX_ERR(0, 1352, __pyx_L1_error));
26372
26373 /* "pysam/libcbcf.pyx":1354
26374 * def keys(self):
26375 * """D.keys() -> list of D's keys"""
26376 * return list(self) # <<<<<<<<<<<<<<
26377 *
26378 * def items(self):
26379 */
26380 __Pyx_XDECREF(__pyx_r);
26381 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
26382 __Pyx_GOTREF(__pyx_t_1);
26383 __pyx_r = __pyx_t_1;
26384 __pyx_t_1 = 0;
26385 goto __pyx_L0;
26386
26387 /* "pysam/libcbcf.pyx":1352
26388 * yield (bcf_str_cache_get_charptr(r.keys[i]), charptr_to_str(r.vals[i]) if r.vals[i] else None)
26389 *
26390 * def keys(self): # <<<<<<<<<<<<<<
26391 * """D.keys() -> list of D's keys"""
26392 * return list(self)
26393 */
26394
26395 /* function exit code */
26396 __pyx_L1_error:;
26397 __Pyx_XDECREF(__pyx_t_1);
26398 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
26399 __pyx_r = NULL;
26400 __pyx_L0:;
26401 __Pyx_XGIVEREF(__pyx_r);
26402 __Pyx_TraceReturn(__pyx_r, 0);
26403 __Pyx_RefNannyFinishContext();
26404 return __pyx_r;
26405 }
26406
26407 /* "pysam/libcbcf.pyx":1356
26408 * return list(self)
26409 *
26410 * def items(self): # <<<<<<<<<<<<<<
26411 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
26412 * return list(self.iteritems())
26413 */
26414
26415 /* Python wrapper */
26416 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_26items(PyObject *__pyx_v_self,
26417 #if CYTHON_METH_FASTCALL
26418 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26419 #else
26420 PyObject *__pyx_args, PyObject *__pyx_kwds
26421 #endif
26422 ); /*proto*/
26423 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_25items, "VariantHeaderRecord.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
26424 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_26items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_26items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_25items};
26425 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_26items(PyObject *__pyx_v_self,
26426 #if CYTHON_METH_FASTCALL
26427 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26428 #else
26429 PyObject *__pyx_args, PyObject *__pyx_kwds
26430 #endif
26431 ) {
26432 #if !CYTHON_METH_FASTCALL
26433 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26434 #endif
26435 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26436 PyObject *__pyx_r = 0;
26437 __Pyx_RefNannyDeclarations
26438 __Pyx_RefNannySetupContext("items (wrapper)", 0);
26439 #if !CYTHON_METH_FASTCALL
26440 #if CYTHON_ASSUME_SAFE_MACROS
26441 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26442 #else
26443 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26444 #endif
26445 #endif
26446 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26447 if (unlikely(__pyx_nargs > 0)) {
26448 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
26449 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
26450 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_25items(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
26451
26452 /* function exit code */
26453 __Pyx_RefNannyFinishContext();
26454 return __pyx_r;
26455 }
26456
26457 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_25items(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
26458 PyObject *__pyx_r = NULL;
26459 __Pyx_TraceDeclarations
26460 __Pyx_RefNannyDeclarations
26461 PyObject *__pyx_t_1 = NULL;
26462 PyObject *__pyx_t_2 = NULL;
26463 PyObject *__pyx_t_3 = NULL;
26464 unsigned int __pyx_t_4;
26465 int __pyx_lineno = 0;
26466 const char *__pyx_filename = NULL;
26467 int __pyx_clineno = 0;
26468 __Pyx_TraceFrameInit(__pyx_codeobj__38)
26469 __Pyx_RefNannySetupContext("items", 1);
26470 __Pyx_TraceCall("items", __pyx_f[0], 1356, 0, __PYX_ERR(0, 1356, __pyx_L1_error));
26471
26472 /* "pysam/libcbcf.pyx":1358
26473 * def items(self):
26474 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
26475 * return list(self.iteritems()) # <<<<<<<<<<<<<<
26476 *
26477 * def values(self):
26478 */
26479 __Pyx_XDECREF(__pyx_r);
26480 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error)
26481 __Pyx_GOTREF(__pyx_t_2);
26482 __pyx_t_3 = NULL;
26483 __pyx_t_4 = 0;
26484 #if CYTHON_UNPACK_METHODS
26485 if (likely(PyMethod_Check(__pyx_t_2))) {
26486 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
26487 if (likely(__pyx_t_3)) {
26488 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
26489 __Pyx_INCREF(__pyx_t_3);
26490 __Pyx_INCREF(function);
26491 __Pyx_DECREF_SET(__pyx_t_2, function);
26492 __pyx_t_4 = 1;
26493 }
26494 }
26495 #endif
26496 {
26497 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
26498 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
26499 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26500 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error)
26501 __Pyx_GOTREF(__pyx_t_1);
26502 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26503 }
26504 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error)
26505 __Pyx_GOTREF(__pyx_t_2);
26506 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26507 __pyx_r = __pyx_t_2;
26508 __pyx_t_2 = 0;
26509 goto __pyx_L0;
26510
26511 /* "pysam/libcbcf.pyx":1356
26512 * return list(self)
26513 *
26514 * def items(self): # <<<<<<<<<<<<<<
26515 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
26516 * return list(self.iteritems())
26517 */
26518
26519 /* function exit code */
26520 __pyx_L1_error:;
26521 __Pyx_XDECREF(__pyx_t_1);
26522 __Pyx_XDECREF(__pyx_t_2);
26523 __Pyx_XDECREF(__pyx_t_3);
26524 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
26525 __pyx_r = NULL;
26526 __pyx_L0:;
26527 __Pyx_XGIVEREF(__pyx_r);
26528 __Pyx_TraceReturn(__pyx_r, 0);
26529 __Pyx_RefNannyFinishContext();
26530 return __pyx_r;
26531 }
26532
26533 /* "pysam/libcbcf.pyx":1360
26534 * return list(self.iteritems())
26535 *
26536 * def values(self): # <<<<<<<<<<<<<<
26537 * """D.values() -> list of D's values"""
26538 * return list(self.itervalues())
26539 */
26540
26541 /* Python wrapper */
26542 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_28values(PyObject *__pyx_v_self,
26543 #if CYTHON_METH_FASTCALL
26544 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26545 #else
26546 PyObject *__pyx_args, PyObject *__pyx_kwds
26547 #endif
26548 ); /*proto*/
26549 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_27values, "VariantHeaderRecord.values(self)\nD.values() -> list of D's values");
26550 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_28values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_28values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_27values};
26551 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_28values(PyObject *__pyx_v_self,
26552 #if CYTHON_METH_FASTCALL
26553 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26554 #else
26555 PyObject *__pyx_args, PyObject *__pyx_kwds
26556 #endif
26557 ) {
26558 #if !CYTHON_METH_FASTCALL
26559 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26560 #endif
26561 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26562 PyObject *__pyx_r = 0;
26563 __Pyx_RefNannyDeclarations
26564 __Pyx_RefNannySetupContext("values (wrapper)", 0);
26565 #if !CYTHON_METH_FASTCALL
26566 #if CYTHON_ASSUME_SAFE_MACROS
26567 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26568 #else
26569 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26570 #endif
26571 #endif
26572 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26573 if (unlikely(__pyx_nargs > 0)) {
26574 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
26575 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
26576 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_27values(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
26577
26578 /* function exit code */
26579 __Pyx_RefNannyFinishContext();
26580 return __pyx_r;
26581 }
26582
26583 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_27values(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
26584 PyObject *__pyx_r = NULL;
26585 __Pyx_TraceDeclarations
26586 __Pyx_RefNannyDeclarations
26587 PyObject *__pyx_t_1 = NULL;
26588 PyObject *__pyx_t_2 = NULL;
26589 PyObject *__pyx_t_3 = NULL;
26590 unsigned int __pyx_t_4;
26591 int __pyx_lineno = 0;
26592 const char *__pyx_filename = NULL;
26593 int __pyx_clineno = 0;
26594 __Pyx_TraceFrameInit(__pyx_codeobj__39)
26595 __Pyx_RefNannySetupContext("values", 1);
26596 __Pyx_TraceCall("values", __pyx_f[0], 1360, 0, __PYX_ERR(0, 1360, __pyx_L1_error));
26597
26598 /* "pysam/libcbcf.pyx":1362
26599 * def values(self):
26600 * """D.values() -> list of D's values"""
26601 * return list(self.itervalues()) # <<<<<<<<<<<<<<
26602 *
26603 * def update(self, items=None, **kwargs):
26604 */
26605 __Pyx_XDECREF(__pyx_r);
26606 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error)
26607 __Pyx_GOTREF(__pyx_t_2);
26608 __pyx_t_3 = NULL;
26609 __pyx_t_4 = 0;
26610 #if CYTHON_UNPACK_METHODS
26611 if (likely(PyMethod_Check(__pyx_t_2))) {
26612 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
26613 if (likely(__pyx_t_3)) {
26614 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
26615 __Pyx_INCREF(__pyx_t_3);
26616 __Pyx_INCREF(function);
26617 __Pyx_DECREF_SET(__pyx_t_2, function);
26618 __pyx_t_4 = 1;
26619 }
26620 }
26621 #endif
26622 {
26623 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
26624 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
26625 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26626 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error)
26627 __Pyx_GOTREF(__pyx_t_1);
26628 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26629 }
26630 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error)
26631 __Pyx_GOTREF(__pyx_t_2);
26632 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26633 __pyx_r = __pyx_t_2;
26634 __pyx_t_2 = 0;
26635 goto __pyx_L0;
26636
26637 /* "pysam/libcbcf.pyx":1360
26638 * return list(self.iteritems())
26639 *
26640 * def values(self): # <<<<<<<<<<<<<<
26641 * """D.values() -> list of D's values"""
26642 * return list(self.itervalues())
26643 */
26644
26645 /* function exit code */
26646 __pyx_L1_error:;
26647 __Pyx_XDECREF(__pyx_t_1);
26648 __Pyx_XDECREF(__pyx_t_2);
26649 __Pyx_XDECREF(__pyx_t_3);
26650 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
26651 __pyx_r = NULL;
26652 __pyx_L0:;
26653 __Pyx_XGIVEREF(__pyx_r);
26654 __Pyx_TraceReturn(__pyx_r, 0);
26655 __Pyx_RefNannyFinishContext();
26656 return __pyx_r;
26657 }
26658
26659 /* "pysam/libcbcf.pyx":1364
26660 * return list(self.itervalues())
26661 *
26662 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
26663 * """D.update([E, ]**F) -> None.
26664 *
26665 */
26666
26667 /* Python wrapper */
26668 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_30update(PyObject *__pyx_v_self,
26669 #if CYTHON_METH_FASTCALL
26670 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26671 #else
26672 PyObject *__pyx_args, PyObject *__pyx_kwds
26673 #endif
26674 ); /*proto*/
26675 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_29update, "VariantHeaderRecord.update(self, items=None, **kwargs)\nD.update([E, ]**F) -> None.\n\n Update D from dict/iterable E and F.\n ");
26676 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_30update = {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_30update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_29update};
26677 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_30update(PyObject *__pyx_v_self,
26678 #if CYTHON_METH_FASTCALL
26679 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26680 #else
26681 PyObject *__pyx_args, PyObject *__pyx_kwds
26682 #endif
26683 ) {
26684 PyObject *__pyx_v_items = 0;
26685 PyObject *__pyx_v_kwargs = 0;
26686 #if !CYTHON_METH_FASTCALL
26687 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26688 #endif
26689 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26690 PyObject* values[1] = {0};
26691 int __pyx_lineno = 0;
26692 const char *__pyx_filename = NULL;
26693 int __pyx_clineno = 0;
26694 PyObject *__pyx_r = 0;
26695 __Pyx_RefNannyDeclarations
26696 __Pyx_RefNannySetupContext("update (wrapper)", 0);
26697 #if !CYTHON_METH_FASTCALL
26698 #if CYTHON_ASSUME_SAFE_MACROS
26699 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26700 #else
26701 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26702 #endif
26703 #endif
26704 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26705 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
26706 __Pyx_GOTREF(__pyx_v_kwargs);
26707 {
26708 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
26709 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
26710 if (__pyx_kwds) {
26711 Py_ssize_t kw_args;
26712 switch (__pyx_nargs) {
26713 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26714 CYTHON_FALLTHROUGH;
26715 case 0: break;
26716 default: goto __pyx_L5_argtuple_error;
26717 }
26718 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
26719 switch (__pyx_nargs) {
26720 case 0:
26721 if (kw_args > 0) {
26722 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
26723 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
26724 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1364, __pyx_L3_error)
26725 }
26726 }
26727 if (unlikely(kw_args > 0)) {
26728 const Py_ssize_t kwd_pos_args = __pyx_nargs;
26729 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "update") < 0)) __PYX_ERR(0, 1364, __pyx_L3_error)
26730 }
26731 } else {
26732 switch (__pyx_nargs) {
26733 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26734 CYTHON_FALLTHROUGH;
26735 case 0: break;
26736 default: goto __pyx_L5_argtuple_error;
26737 }
26738 }
26739 __pyx_v_items = values[0];
26740 }
26741 goto __pyx_L6_skip;
26742 __pyx_L5_argtuple_error:;
26743 __Pyx_RaiseArgtupleInvalid("update", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1364, __pyx_L3_error)
26744 __pyx_L6_skip:;
26745 goto __pyx_L4_argument_unpacking_done;
26746 __pyx_L3_error:;
26747 {
26748 Py_ssize_t __pyx_temp;
26749 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26750 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
26751 }
26752 }
26753 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
26754 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
26755 __Pyx_RefNannyFinishContext();
26756 return NULL;
26757 __pyx_L4_argument_unpacking_done:;
26758 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_29update(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self), __pyx_v_items, __pyx_v_kwargs);
26759
26760 /* function exit code */
26761 __Pyx_DECREF(__pyx_v_kwargs);
26762 {
26763 Py_ssize_t __pyx_temp;
26764 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26765 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
26766 }
26767 }
26768 __Pyx_RefNannyFinishContext();
26769 return __pyx_r;
26770 }
26771
26772 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_29update(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs) {
26773 PyObject *__pyx_v_k = NULL;
26774 PyObject *__pyx_v_v = NULL;
26775 PyObject *__pyx_r = NULL;
26776 __Pyx_TraceDeclarations
26777 __Pyx_RefNannyDeclarations
26778 PyObject *__pyx_t_1 = NULL;
26779 Py_ssize_t __pyx_t_2;
26780 Py_ssize_t __pyx_t_3;
26781 int __pyx_t_4;
26782 PyObject *__pyx_t_5 = NULL;
26783 PyObject *__pyx_t_6 = NULL;
26784 int __pyx_t_7;
26785 int __pyx_t_8;
26786 int __pyx_lineno = 0;
26787 const char *__pyx_filename = NULL;
26788 int __pyx_clineno = 0;
26789 __Pyx_TraceFrameInit(__pyx_codeobj__40)
26790 __Pyx_RefNannySetupContext("update", 1);
26791 __Pyx_TraceCall("update", __pyx_f[0], 1364, 0, __PYX_ERR(0, 1364, __pyx_L1_error));
26792
26793 /* "pysam/libcbcf.pyx":1369
26794 * Update D from dict/iterable E and F.
26795 * """
26796 * for k, v in items.items(): # <<<<<<<<<<<<<<
26797 * self[k] = v
26798 *
26799 */
26800 __pyx_t_2 = 0;
26801 if (unlikely(__pyx_v_items == Py_None)) {
26802 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
26803 __PYX_ERR(0, 1369, __pyx_L1_error)
26804 }
26805 __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_items, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L1_error)
26806 __Pyx_GOTREF(__pyx_t_5);
26807 __Pyx_XDECREF(__pyx_t_1);
26808 __pyx_t_1 = __pyx_t_5;
26809 __pyx_t_5 = 0;
26810 while (1) {
26811 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
26812 if (unlikely(__pyx_t_7 == 0)) break;
26813 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1369, __pyx_L1_error)
26814 __Pyx_GOTREF(__pyx_t_5);
26815 __Pyx_GOTREF(__pyx_t_6);
26816 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5);
26817 __pyx_t_5 = 0;
26818 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
26819 __pyx_t_6 = 0;
26820
26821 /* "pysam/libcbcf.pyx":1370
26822 * """
26823 * for k, v in items.items():
26824 * self[k] = v # <<<<<<<<<<<<<<
26825 *
26826 * if kwargs:
26827 */
26828 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 1370, __pyx_L1_error)
26829 }
26830 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26831
26832 /* "pysam/libcbcf.pyx":1372
26833 * self[k] = v
26834 *
26835 * if kwargs: # <<<<<<<<<<<<<<
26836 * for k, v in kwargs.items():
26837 * self[k] = v
26838 */
26839 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1372, __pyx_L1_error)
26840 if (__pyx_t_8) {
26841
26842 /* "pysam/libcbcf.pyx":1373
26843 *
26844 * if kwargs:
26845 * for k, v in kwargs.items(): # <<<<<<<<<<<<<<
26846 * self[k] = v
26847 *
26848 */
26849 __pyx_t_3 = 0;
26850 __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_2), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1373, __pyx_L1_error)
26851 __Pyx_GOTREF(__pyx_t_6);
26852 __Pyx_XDECREF(__pyx_t_1);
26853 __pyx_t_1 = __pyx_t_6;
26854 __pyx_t_6 = 0;
26855 while (1) {
26856 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_2, &__pyx_t_3, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4);
26857 if (unlikely(__pyx_t_7 == 0)) break;
26858 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1373, __pyx_L1_error)
26859 __Pyx_GOTREF(__pyx_t_6);
26860 __Pyx_GOTREF(__pyx_t_5);
26861 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
26862 __pyx_t_6 = 0;
26863 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
26864 __pyx_t_5 = 0;
26865
26866 /* "pysam/libcbcf.pyx":1374
26867 * if kwargs:
26868 * for k, v in kwargs.items():
26869 * self[k] = v # <<<<<<<<<<<<<<
26870 *
26871 * def pop(self, key, default=_nothing):
26872 */
26873 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 1374, __pyx_L1_error)
26874 }
26875 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26876
26877 /* "pysam/libcbcf.pyx":1372
26878 * self[k] = v
26879 *
26880 * if kwargs: # <<<<<<<<<<<<<<
26881 * for k, v in kwargs.items():
26882 * self[k] = v
26883 */
26884 }
26885
26886 /* "pysam/libcbcf.pyx":1364
26887 * return list(self.itervalues())
26888 *
26889 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
26890 * """D.update([E, ]**F) -> None.
26891 *
26892 */
26893
26894 /* function exit code */
26895 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
26896 goto __pyx_L0;
26897 __pyx_L1_error:;
26898 __Pyx_XDECREF(__pyx_t_1);
26899 __Pyx_XDECREF(__pyx_t_5);
26900 __Pyx_XDECREF(__pyx_t_6);
26901 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
26902 __pyx_r = NULL;
26903 __pyx_L0:;
26904 __Pyx_XDECREF(__pyx_v_k);
26905 __Pyx_XDECREF(__pyx_v_v);
26906 __Pyx_XGIVEREF(__pyx_r);
26907 __Pyx_TraceReturn(__pyx_r, 0);
26908 __Pyx_RefNannyFinishContext();
26909 return __pyx_r;
26910 }
26911
26912 /* "pysam/libcbcf.pyx":1376
26913 * self[k] = v
26914 *
26915 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
26916 * try:
26917 * value = self[key]
26918 */
26919
26920 /* Python wrapper */
26921 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_32pop(PyObject *__pyx_v_self,
26922 #if CYTHON_METH_FASTCALL
26923 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26924 #else
26925 PyObject *__pyx_args, PyObject *__pyx_kwds
26926 #endif
26927 ); /*proto*/
26928 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_31pop, "VariantHeaderRecord.pop(self, key, default=_nothing)");
26929 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_32pop = {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_32pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_31pop};
26930 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_32pop(PyObject *__pyx_v_self,
26931 #if CYTHON_METH_FASTCALL
26932 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
26933 #else
26934 PyObject *__pyx_args, PyObject *__pyx_kwds
26935 #endif
26936 ) {
26937 PyObject *__pyx_v_key = 0;
26938 PyObject *__pyx_v_default = 0;
26939 #if !CYTHON_METH_FASTCALL
26940 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26941 #endif
26942 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26943 PyObject* values[2] = {0,0};
26944 int __pyx_lineno = 0;
26945 const char *__pyx_filename = NULL;
26946 int __pyx_clineno = 0;
26947 PyObject *__pyx_r = 0;
26948 __Pyx_RefNannyDeclarations
26949 __Pyx_RefNannySetupContext("pop (wrapper)", 0);
26950 #if !CYTHON_METH_FASTCALL
26951 #if CYTHON_ASSUME_SAFE_MACROS
26952 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26953 #else
26954 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26955 #endif
26956 #endif
26957 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
26958 {
26959 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
26960 values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__41);
26961 if (__pyx_kwds) {
26962 Py_ssize_t kw_args;
26963 switch (__pyx_nargs) {
26964 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
26965 CYTHON_FALLTHROUGH;
26966 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26967 CYTHON_FALLTHROUGH;
26968 case 0: break;
26969 default: goto __pyx_L5_argtuple_error;
26970 }
26971 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
26972 switch (__pyx_nargs) {
26973 case 0:
26974 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
26975 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
26976 kw_args--;
26977 }
26978 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L3_error)
26979 else goto __pyx_L5_argtuple_error;
26980 CYTHON_FALLTHROUGH;
26981 case 1:
26982 if (kw_args > 0) {
26983 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
26984 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
26985 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L3_error)
26986 }
26987 }
26988 if (unlikely(kw_args > 0)) {
26989 const Py_ssize_t kwd_pos_args = __pyx_nargs;
26990 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pop") < 0)) __PYX_ERR(0, 1376, __pyx_L3_error)
26991 }
26992 } else {
26993 switch (__pyx_nargs) {
26994 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
26995 CYTHON_FALLTHROUGH;
26996 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
26997 break;
26998 default: goto __pyx_L5_argtuple_error;
26999 }
27000 }
27001 __pyx_v_key = values[0];
27002 __pyx_v_default = values[1];
27003 }
27004 goto __pyx_L6_skip;
27005 __pyx_L5_argtuple_error:;
27006 __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1376, __pyx_L3_error)
27007 __pyx_L6_skip:;
27008 goto __pyx_L4_argument_unpacking_done;
27009 __pyx_L3_error:;
27010 {
27011 Py_ssize_t __pyx_temp;
27012 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
27013 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27014 }
27015 }
27016 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
27017 __Pyx_RefNannyFinishContext();
27018 return NULL;
27019 __pyx_L4_argument_unpacking_done:;
27020 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_31pop(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
27021
27022 /* function exit code */
27023 {
27024 Py_ssize_t __pyx_temp;
27025 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
27026 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27027 }
27028 }
27029 __Pyx_RefNannyFinishContext();
27030 return __pyx_r;
27031 }
27032
27033 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_31pop(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
27034 PyObject *__pyx_v_value = NULL;
27035 PyObject *__pyx_r = NULL;
27036 __Pyx_TraceDeclarations
27037 __Pyx_RefNannyDeclarations
27038 PyObject *__pyx_t_1 = NULL;
27039 PyObject *__pyx_t_2 = NULL;
27040 PyObject *__pyx_t_3 = NULL;
27041 PyObject *__pyx_t_4 = NULL;
27042 int __pyx_t_5;
27043 PyObject *__pyx_t_6 = NULL;
27044 PyObject *__pyx_t_7 = NULL;
27045 int __pyx_t_8;
27046 int __pyx_lineno = 0;
27047 const char *__pyx_filename = NULL;
27048 int __pyx_clineno = 0;
27049 __Pyx_TraceFrameInit(__pyx_codeobj__42)
27050 __Pyx_RefNannySetupContext("pop", 1);
27051 __Pyx_TraceCall("pop", __pyx_f[0], 1376, 0, __PYX_ERR(0, 1376, __pyx_L1_error));
27052
27053 /* "pysam/libcbcf.pyx":1377
27054 *
27055 * def pop(self, key, default=_nothing):
27056 * try: # <<<<<<<<<<<<<<
27057 * value = self[key]
27058 * del self[key]
27059 */
27060 {
27061 __Pyx_PyThreadState_declare
27062 __Pyx_PyThreadState_assign
27063 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27064 __Pyx_XGOTREF(__pyx_t_1);
27065 __Pyx_XGOTREF(__pyx_t_2);
27066 __Pyx_XGOTREF(__pyx_t_3);
27067 /*try:*/ {
27068
27069 /* "pysam/libcbcf.pyx":1378
27070 * def pop(self, key, default=_nothing):
27071 * try:
27072 * value = self[key] # <<<<<<<<<<<<<<
27073 * del self[key]
27074 * return value
27075 */
27076 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L3_error)
27077 __Pyx_GOTREF(__pyx_t_4);
27078 __pyx_v_value = __pyx_t_4;
27079 __pyx_t_4 = 0;
27080
27081 /* "pysam/libcbcf.pyx":1379
27082 * try:
27083 * value = self[key]
27084 * del self[key] # <<<<<<<<<<<<<<
27085 * return value
27086 * except KeyError:
27087 */
27088 if (unlikely((PyObject_DelItem(((PyObject *)__pyx_v_self), __pyx_v_key) < 0))) __PYX_ERR(0, 1379, __pyx_L3_error)
27089
27090 /* "pysam/libcbcf.pyx":1380
27091 * value = self[key]
27092 * del self[key]
27093 * return value # <<<<<<<<<<<<<<
27094 * except KeyError:
27095 * if default is not _nothing:
27096 */
27097 __Pyx_XDECREF(__pyx_r);
27098 __Pyx_INCREF(__pyx_v_value);
27099 __pyx_r = __pyx_v_value;
27100 goto __pyx_L7_try_return;
27101
27102 /* "pysam/libcbcf.pyx":1377
27103 *
27104 * def pop(self, key, default=_nothing):
27105 * try: # <<<<<<<<<<<<<<
27106 * value = self[key]
27107 * del self[key]
27108 */
27109 }
27110 __pyx_L3_error:;
27111 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
27112
27113 /* "pysam/libcbcf.pyx":1381
27114 * del self[key]
27115 * return value
27116 * except KeyError: # <<<<<<<<<<<<<<
27117 * if default is not _nothing:
27118 * return default
27119 */
27120 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
27121 if (__pyx_t_5) {
27122 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
27123 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1381, __pyx_L5_except_error)
27124 __Pyx_XGOTREF(__pyx_t_4);
27125 __Pyx_XGOTREF(__pyx_t_6);
27126 __Pyx_XGOTREF(__pyx_t_7);
27127
27128 /* "pysam/libcbcf.pyx":1382
27129 * return value
27130 * except KeyError:
27131 * if default is not _nothing: # <<<<<<<<<<<<<<
27132 * return default
27133 * raise
27134 */
27135 __pyx_t_8 = (__pyx_v_default != __pyx_v_5pysam_7libcbcf__nothing);
27136 if (__pyx_t_8) {
27137
27138 /* "pysam/libcbcf.pyx":1383
27139 * except KeyError:
27140 * if default is not _nothing:
27141 * return default # <<<<<<<<<<<<<<
27142 * raise
27143 *
27144 */
27145 __Pyx_XDECREF(__pyx_r);
27146 __Pyx_INCREF(__pyx_v_default);
27147 __pyx_r = __pyx_v_default;
27148 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27149 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27150 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27151 goto __pyx_L6_except_return;
27152
27153 /* "pysam/libcbcf.pyx":1382
27154 * return value
27155 * except KeyError:
27156 * if default is not _nothing: # <<<<<<<<<<<<<<
27157 * return default
27158 * raise
27159 */
27160 }
27161
27162 /* "pysam/libcbcf.pyx":1384
27163 * if default is not _nothing:
27164 * return default
27165 * raise # <<<<<<<<<<<<<<
27166 *
27167 * # Mappings are not hashable by default, but subclasses can change this
27168 */
27169 __Pyx_GIVEREF(__pyx_t_4);
27170 __Pyx_GIVEREF(__pyx_t_6);
27171 __Pyx_XGIVEREF(__pyx_t_7);
27172 __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_6, __pyx_t_7);
27173 __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0;
27174 __PYX_ERR(0, 1384, __pyx_L5_except_error)
27175 }
27176 goto __pyx_L5_except_error;
27177
27178 /* "pysam/libcbcf.pyx":1377
27179 *
27180 * def pop(self, key, default=_nothing):
27181 * try: # <<<<<<<<<<<<<<
27182 * value = self[key]
27183 * del self[key]
27184 */
27185 __pyx_L5_except_error:;
27186 __Pyx_XGIVEREF(__pyx_t_1);
27187 __Pyx_XGIVEREF(__pyx_t_2);
27188 __Pyx_XGIVEREF(__pyx_t_3);
27189 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27190 goto __pyx_L1_error;
27191 __pyx_L7_try_return:;
27192 __Pyx_XGIVEREF(__pyx_t_1);
27193 __Pyx_XGIVEREF(__pyx_t_2);
27194 __Pyx_XGIVEREF(__pyx_t_3);
27195 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27196 goto __pyx_L0;
27197 __pyx_L6_except_return:;
27198 __Pyx_XGIVEREF(__pyx_t_1);
27199 __Pyx_XGIVEREF(__pyx_t_2);
27200 __Pyx_XGIVEREF(__pyx_t_3);
27201 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27202 goto __pyx_L0;
27203 }
27204
27205 /* "pysam/libcbcf.pyx":1376
27206 * self[k] = v
27207 *
27208 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
27209 * try:
27210 * value = self[key]
27211 */
27212
27213 /* function exit code */
27214 __pyx_L1_error:;
27215 __Pyx_XDECREF(__pyx_t_4);
27216 __Pyx_XDECREF(__pyx_t_6);
27217 __Pyx_XDECREF(__pyx_t_7);
27218 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
27219 __pyx_r = NULL;
27220 __pyx_L0:;
27221 __Pyx_XDECREF(__pyx_v_value);
27222 __Pyx_XGIVEREF(__pyx_r);
27223 __Pyx_TraceReturn(__pyx_r, 0);
27224 __Pyx_RefNannyFinishContext();
27225 return __pyx_r;
27226 }
27227
27228 /* "pysam/libcbcf.pyx":1391
27229 * #TODO: implement __richcmp__
27230 *
27231 * def __str__(self): # <<<<<<<<<<<<<<
27232 * cdef bcf_hrec_t *r = self.ptr
27233 *
27234 */
27235
27236 /* Python wrapper */
27237 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_34__str__(PyObject *__pyx_v_self); /*proto*/
27238 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_34__str__(PyObject *__pyx_v_self) {
27239 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
27240 PyObject *__pyx_r = 0;
27241 __Pyx_RefNannyDeclarations
27242 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
27243 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
27244 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_33__str__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
27245
27246 /* function exit code */
27247 __Pyx_RefNannyFinishContext();
27248 return __pyx_r;
27249 }
27250
27251 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_33__str__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
27252 bcf_hrec_t *__pyx_v_r;
27253 kstring_t __pyx_v_hrec_str;
27254 PyObject *__pyx_v_ret = NULL;
27255 PyObject *__pyx_r = NULL;
27256 __Pyx_TraceDeclarations
27257 __Pyx_RefNannyDeclarations
27258 bcf_hrec_t *__pyx_t_1;
27259 int __pyx_t_2;
27260 PyObject *__pyx_t_3 = NULL;
27261 int __pyx_lineno = 0;
27262 const char *__pyx_filename = NULL;
27263 int __pyx_clineno = 0;
27264 __Pyx_RefNannySetupContext("__str__", 1);
27265 __Pyx_TraceCall("__str__", __pyx_f[0], 1391, 0, __PYX_ERR(0, 1391, __pyx_L1_error));
27266
27267 /* "pysam/libcbcf.pyx":1392
27268 *
27269 * def __str__(self):
27270 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
27271 *
27272 * if not r:
27273 */
27274 __pyx_t_1 = __pyx_v_self->ptr;
27275 __pyx_v_r = __pyx_t_1;
27276
27277 /* "pysam/libcbcf.pyx":1394
27278 * cdef bcf_hrec_t *r = self.ptr
27279 *
27280 * if not r: # <<<<<<<<<<<<<<
27281 * raise ValueError('cannot convert deleted record to str')
27282 *
27283 */
27284 __pyx_t_2 = (!(__pyx_v_r != 0));
27285 if (unlikely(__pyx_t_2)) {
27286
27287 /* "pysam/libcbcf.pyx":1395
27288 *
27289 * if not r:
27290 * raise ValueError('cannot convert deleted record to str') # <<<<<<<<<<<<<<
27291 *
27292 * cdef kstring_t hrec_str
27293 */
27294 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
27295 __Pyx_GOTREF(__pyx_t_3);
27296 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27297 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27298 __PYX_ERR(0, 1395, __pyx_L1_error)
27299
27300 /* "pysam/libcbcf.pyx":1394
27301 * cdef bcf_hrec_t *r = self.ptr
27302 *
27303 * if not r: # <<<<<<<<<<<<<<
27304 * raise ValueError('cannot convert deleted record to str')
27305 *
27306 */
27307 }
27308
27309 /* "pysam/libcbcf.pyx":1398
27310 *
27311 * cdef kstring_t hrec_str
27312 * hrec_str.l = hrec_str.m = 0 # <<<<<<<<<<<<<<
27313 * hrec_str.s = NULL
27314 *
27315 */
27316 __pyx_v_hrec_str.l = 0;
27317 __pyx_v_hrec_str.m = 0;
27318
27319 /* "pysam/libcbcf.pyx":1399
27320 * cdef kstring_t hrec_str
27321 * hrec_str.l = hrec_str.m = 0
27322 * hrec_str.s = NULL # <<<<<<<<<<<<<<
27323 *
27324 * bcf_hrec_format(r, &hrec_str)
27325 */
27326 __pyx_v_hrec_str.s = NULL;
27327
27328 /* "pysam/libcbcf.pyx":1401
27329 * hrec_str.s = NULL
27330 *
27331 * bcf_hrec_format(r, &hrec_str) # <<<<<<<<<<<<<<
27332 *
27333 * ret = charptr_to_str_w_len(hrec_str.s, hrec_str.l)
27334 */
27335 bcf_hrec_format(__pyx_v_r, (&__pyx_v_hrec_str));
27336
27337 /* "pysam/libcbcf.pyx":1403
27338 * bcf_hrec_format(r, &hrec_str)
27339 *
27340 * ret = charptr_to_str_w_len(hrec_str.s, hrec_str.l) # <<<<<<<<<<<<<<
27341 *
27342 * if hrec_str.m:
27343 */
27344 __pyx_t_3 = __pyx_f_5pysam_9libcutils_charptr_to_str_w_len(__pyx_v_hrec_str.s, __pyx_v_hrec_str.l, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
27345 __Pyx_GOTREF(__pyx_t_3);
27346 __pyx_v_ret = __pyx_t_3;
27347 __pyx_t_3 = 0;
27348
27349 /* "pysam/libcbcf.pyx":1405
27350 * ret = charptr_to_str_w_len(hrec_str.s, hrec_str.l)
27351 *
27352 * if hrec_str.m: # <<<<<<<<<<<<<<
27353 * free(hrec_str.s)
27354 *
27355 */
27356 __pyx_t_2 = (__pyx_v_hrec_str.m != 0);
27357 if (__pyx_t_2) {
27358
27359 /* "pysam/libcbcf.pyx":1406
27360 *
27361 * if hrec_str.m:
27362 * free(hrec_str.s) # <<<<<<<<<<<<<<
27363 *
27364 * return ret
27365 */
27366 free(__pyx_v_hrec_str.s);
27367
27368 /* "pysam/libcbcf.pyx":1405
27369 * ret = charptr_to_str_w_len(hrec_str.s, hrec_str.l)
27370 *
27371 * if hrec_str.m: # <<<<<<<<<<<<<<
27372 * free(hrec_str.s)
27373 *
27374 */
27375 }
27376
27377 /* "pysam/libcbcf.pyx":1408
27378 * free(hrec_str.s)
27379 *
27380 * return ret # <<<<<<<<<<<<<<
27381 *
27382 * # FIXME: Not safe -- causes trivial segfaults at the moment
27383 */
27384 __Pyx_XDECREF(__pyx_r);
27385 __Pyx_INCREF(__pyx_v_ret);
27386 __pyx_r = __pyx_v_ret;
27387 goto __pyx_L0;
27388
27389 /* "pysam/libcbcf.pyx":1391
27390 * #TODO: implement __richcmp__
27391 *
27392 * def __str__(self): # <<<<<<<<<<<<<<
27393 * cdef bcf_hrec_t *r = self.ptr
27394 *
27395 */
27396
27397 /* function exit code */
27398 __pyx_L1_error:;
27399 __Pyx_XDECREF(__pyx_t_3);
27400 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27401 __pyx_r = NULL;
27402 __pyx_L0:;
27403 __Pyx_XDECREF(__pyx_v_ret);
27404 __Pyx_XGIVEREF(__pyx_r);
27405 __Pyx_TraceReturn(__pyx_r, 0);
27406 __Pyx_RefNannyFinishContext();
27407 return __pyx_r;
27408 }
27409
27410 /* "pysam/libcbcf.pyx":1411
27411 *
27412 * # FIXME: Not safe -- causes trivial segfaults at the moment
27413 * def remove(self): # <<<<<<<<<<<<<<
27414 * cdef bcf_hdr_t *hdr = self.header.ptr
27415 * cdef bcf_hrec_t *r = self.ptr
27416 */
27417
27418 /* Python wrapper */
27419 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_36remove(PyObject *__pyx_v_self,
27420 #if CYTHON_METH_FASTCALL
27421 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27422 #else
27423 PyObject *__pyx_args, PyObject *__pyx_kwds
27424 #endif
27425 ); /*proto*/
27426 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_35remove, "VariantHeaderRecord.remove(self)");
27427 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_36remove = {"remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_36remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_35remove};
27428 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_36remove(PyObject *__pyx_v_self,
27429 #if CYTHON_METH_FASTCALL
27430 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27431 #else
27432 PyObject *__pyx_args, PyObject *__pyx_kwds
27433 #endif
27434 ) {
27435 #if !CYTHON_METH_FASTCALL
27436 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27437 #endif
27438 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
27439 PyObject *__pyx_r = 0;
27440 __Pyx_RefNannyDeclarations
27441 __Pyx_RefNannySetupContext("remove (wrapper)", 0);
27442 #if !CYTHON_METH_FASTCALL
27443 #if CYTHON_ASSUME_SAFE_MACROS
27444 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27445 #else
27446 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
27447 #endif
27448 #endif
27449 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
27450 if (unlikely(__pyx_nargs > 0)) {
27451 __Pyx_RaiseArgtupleInvalid("remove", 1, 0, 0, __pyx_nargs); return NULL;}
27452 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "remove", 0))) return NULL;
27453 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_35remove(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
27454
27455 /* function exit code */
27456 __Pyx_RefNannyFinishContext();
27457 return __pyx_r;
27458 }
27459
27460 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_35remove(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
27461 bcf_hdr_t *__pyx_v_hdr;
27462 bcf_hrec_t *__pyx_v_r;
27463 char *__pyx_v_key;
27464 PyObject *__pyx_r = NULL;
27465 __Pyx_TraceDeclarations
27466 __Pyx_RefNannyDeclarations
27467 bcf_hdr_t *__pyx_t_1;
27468 bcf_hrec_t *__pyx_t_2;
27469 int __pyx_t_3;
27470 char *__pyx_t_4;
27471 int __pyx_lineno = 0;
27472 const char *__pyx_filename = NULL;
27473 int __pyx_clineno = 0;
27474 __Pyx_TraceFrameInit(__pyx_codeobj__44)
27475 __Pyx_RefNannySetupContext("remove", 1);
27476 __Pyx_TraceCall("remove", __pyx_f[0], 1411, 0, __PYX_ERR(0, 1411, __pyx_L1_error));
27477
27478 /* "pysam/libcbcf.pyx":1412
27479 * # FIXME: Not safe -- causes trivial segfaults at the moment
27480 * def remove(self):
27481 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
27482 * cdef bcf_hrec_t *r = self.ptr
27483 * if not r:
27484 */
27485 __pyx_t_1 = __pyx_v_self->header->ptr;
27486 __pyx_v_hdr = __pyx_t_1;
27487
27488 /* "pysam/libcbcf.pyx":1413
27489 * def remove(self):
27490 * cdef bcf_hdr_t *hdr = self.header.ptr
27491 * cdef bcf_hrec_t *r = self.ptr # <<<<<<<<<<<<<<
27492 * if not r:
27493 * return
27494 */
27495 __pyx_t_2 = __pyx_v_self->ptr;
27496 __pyx_v_r = __pyx_t_2;
27497
27498 /* "pysam/libcbcf.pyx":1414
27499 * cdef bcf_hdr_t *hdr = self.header.ptr
27500 * cdef bcf_hrec_t *r = self.ptr
27501 * if not r: # <<<<<<<<<<<<<<
27502 * return
27503 * assert r.key
27504 */
27505 __pyx_t_3 = (!(__pyx_v_r != 0));
27506 if (__pyx_t_3) {
27507
27508 /* "pysam/libcbcf.pyx":1415
27509 * cdef bcf_hrec_t *r = self.ptr
27510 * if not r:
27511 * return # <<<<<<<<<<<<<<
27512 * assert r.key
27513 * cdef char *key = r.key if r.type == BCF_HL_GEN else r.value
27514 */
27515 __Pyx_XDECREF(__pyx_r);
27516 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27517 goto __pyx_L0;
27518
27519 /* "pysam/libcbcf.pyx":1414
27520 * cdef bcf_hdr_t *hdr = self.header.ptr
27521 * cdef bcf_hrec_t *r = self.ptr
27522 * if not r: # <<<<<<<<<<<<<<
27523 * return
27524 * assert r.key
27525 */
27526 }
27527
27528 /* "pysam/libcbcf.pyx":1416
27529 * if not r:
27530 * return
27531 * assert r.key # <<<<<<<<<<<<<<
27532 * cdef char *key = r.key if r.type == BCF_HL_GEN else r.value
27533 * bcf_hdr_remove(hdr, r.type, key)
27534 */
27535 #ifndef CYTHON_WITHOUT_ASSERTIONS
27536 if (unlikely(__pyx_assertions_enabled())) {
27537 __pyx_t_3 = (__pyx_v_r->key != 0);
27538 if (unlikely(!__pyx_t_3)) {
27539 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
27540 __PYX_ERR(0, 1416, __pyx_L1_error)
27541 }
27542 }
27543 #else
27544 if ((1)); else __PYX_ERR(0, 1416, __pyx_L1_error)
27545 #endif
27546
27547 /* "pysam/libcbcf.pyx":1417
27548 * return
27549 * assert r.key
27550 * cdef char *key = r.key if r.type == BCF_HL_GEN else r.value # <<<<<<<<<<<<<<
27551 * bcf_hdr_remove(hdr, r.type, key)
27552 * self.ptr = NULL
27553 */
27554 __pyx_t_3 = (__pyx_v_r->type == BCF_HL_GEN);
27555 if (__pyx_t_3) {
27556 __pyx_t_4 = __pyx_v_r->key;
27557 } else {
27558 __pyx_t_4 = __pyx_v_r->value;
27559 }
27560 __pyx_v_key = __pyx_t_4;
27561
27562 /* "pysam/libcbcf.pyx":1418
27563 * assert r.key
27564 * cdef char *key = r.key if r.type == BCF_HL_GEN else r.value
27565 * bcf_hdr_remove(hdr, r.type, key) # <<<<<<<<<<<<<<
27566 * self.ptr = NULL
27567 *
27568 */
27569 bcf_hdr_remove(__pyx_v_hdr, __pyx_v_r->type, __pyx_v_key);
27570
27571 /* "pysam/libcbcf.pyx":1419
27572 * cdef char *key = r.key if r.type == BCF_HL_GEN else r.value
27573 * bcf_hdr_remove(hdr, r.type, key)
27574 * self.ptr = NULL # <<<<<<<<<<<<<<
27575 *
27576 *
27577 */
27578 __pyx_v_self->ptr = NULL;
27579
27580 /* "pysam/libcbcf.pyx":1411
27581 *
27582 * # FIXME: Not safe -- causes trivial segfaults at the moment
27583 * def remove(self): # <<<<<<<<<<<<<<
27584 * cdef bcf_hdr_t *hdr = self.header.ptr
27585 * cdef bcf_hrec_t *r = self.ptr
27586 */
27587
27588 /* function exit code */
27589 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27590 goto __pyx_L0;
27591 __pyx_L1_error:;
27592 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
27593 __pyx_r = NULL;
27594 __pyx_L0:;
27595 __Pyx_XGIVEREF(__pyx_r);
27596 __Pyx_TraceReturn(__pyx_r, 0);
27597 __Pyx_RefNannyFinishContext();
27598 return __pyx_r;
27599 }
27600
27601 /* "pysam/libcbcf.pxd":48
27602 *
27603 * cdef class VariantHeaderRecord(object):
27604 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
27605 * cdef bcf_hrec_t *ptr
27606 *
27607 */
27608
27609 /* Python wrapper */
27610 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
27611 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_6header_1__get__(PyObject *__pyx_v_self) {
27612 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
27613 PyObject *__pyx_r = 0;
27614 __Pyx_RefNannyDeclarations
27615 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27616 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
27617 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
27618
27619 /* function exit code */
27620 __Pyx_RefNannyFinishContext();
27621 return __pyx_r;
27622 }
27623
27624 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
27625 PyObject *__pyx_r = NULL;
27626 __Pyx_TraceDeclarations
27627 __Pyx_RefNannyDeclarations
27628 int __pyx_lineno = 0;
27629 const char *__pyx_filename = NULL;
27630 int __pyx_clineno = 0;
27631 __Pyx_RefNannySetupContext("__get__", 1);
27632 __Pyx_TraceCall("__get__", __pyx_f[3], 48, 0, __PYX_ERR(3, 48, __pyx_L1_error));
27633 __Pyx_XDECREF(__pyx_r);
27634 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
27635 __pyx_r = ((PyObject *)__pyx_v_self->header);
27636 goto __pyx_L0;
27637
27638 /* function exit code */
27639 __pyx_L1_error:;
27640 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27641 __pyx_r = NULL;
27642 __pyx_L0:;
27643 __Pyx_XGIVEREF(__pyx_r);
27644 __Pyx_TraceReturn(__pyx_r, 0);
27645 __Pyx_RefNannyFinishContext();
27646 return __pyx_r;
27647 }
27648
27649 /* "(tree fragment)":1
27650 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
27651 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
27652 * def __setstate_cython__(self, __pyx_state):
27653 */
27654
27655 /* Python wrapper */
27656 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_38__reduce_cython__(PyObject *__pyx_v_self,
27657 #if CYTHON_METH_FASTCALL
27658 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27659 #else
27660 PyObject *__pyx_args, PyObject *__pyx_kwds
27661 #endif
27662 ); /*proto*/
27663 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_37__reduce_cython__, "VariantHeaderRecord.__reduce_cython__(self)");
27664 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_38__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_38__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_37__reduce_cython__};
27665 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_38__reduce_cython__(PyObject *__pyx_v_self,
27666 #if CYTHON_METH_FASTCALL
27667 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27668 #else
27669 PyObject *__pyx_args, PyObject *__pyx_kwds
27670 #endif
27671 ) {
27672 #if !CYTHON_METH_FASTCALL
27673 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27674 #endif
27675 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
27676 PyObject *__pyx_r = 0;
27677 __Pyx_RefNannyDeclarations
27678 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
27679 #if !CYTHON_METH_FASTCALL
27680 #if CYTHON_ASSUME_SAFE_MACROS
27681 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27682 #else
27683 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
27684 #endif
27685 #endif
27686 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
27687 if (unlikely(__pyx_nargs > 0)) {
27688 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
27689 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
27690 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_37__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self));
27691
27692 /* function exit code */
27693 __Pyx_RefNannyFinishContext();
27694 return __pyx_r;
27695 }
27696
27697 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_37__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self) {
27698 PyObject *__pyx_r = NULL;
27699 __Pyx_TraceDeclarations
27700 __Pyx_RefNannyDeclarations
27701 int __pyx_lineno = 0;
27702 const char *__pyx_filename = NULL;
27703 int __pyx_clineno = 0;
27704 __Pyx_TraceFrameInit(__pyx_codeobj__45)
27705 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
27706 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
27707
27708 /* "(tree fragment)":2
27709 * def __reduce_cython__(self):
27710 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
27711 * def __setstate_cython__(self, __pyx_state):
27712 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
27713 */
27714 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_ptr_cannot_be_converted_to, 0, 0);
27715 __PYX_ERR(4, 2, __pyx_L1_error)
27716
27717 /* "(tree fragment)":1
27718 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
27719 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
27720 * def __setstate_cython__(self, __pyx_state):
27721 */
27722
27723 /* function exit code */
27724 __pyx_L1_error:;
27725 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27726 __pyx_r = NULL;
27727 __Pyx_XGIVEREF(__pyx_r);
27728 __Pyx_TraceReturn(__pyx_r, 0);
27729 __Pyx_RefNannyFinishContext();
27730 return __pyx_r;
27731 }
27732
27733 /* "(tree fragment)":3
27734 * def __reduce_cython__(self):
27735 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
27736 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
27737 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
27738 */
27739
27740 /* Python wrapper */
27741 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_40__setstate_cython__(PyObject *__pyx_v_self,
27742 #if CYTHON_METH_FASTCALL
27743 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27744 #else
27745 PyObject *__pyx_args, PyObject *__pyx_kwds
27746 #endif
27747 ); /*proto*/
27748 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_39__setstate_cython__, "VariantHeaderRecord.__setstate_cython__(self, __pyx_state)");
27749 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_40__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_40__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_39__setstate_cython__};
27750 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_40__setstate_cython__(PyObject *__pyx_v_self,
27751 #if CYTHON_METH_FASTCALL
27752 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
27753 #else
27754 PyObject *__pyx_args, PyObject *__pyx_kwds
27755 #endif
27756 ) {
27757 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
27758 #if !CYTHON_METH_FASTCALL
27759 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27760 #endif
27761 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
27762 PyObject* values[1] = {0};
27763 int __pyx_lineno = 0;
27764 const char *__pyx_filename = NULL;
27765 int __pyx_clineno = 0;
27766 PyObject *__pyx_r = 0;
27767 __Pyx_RefNannyDeclarations
27768 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
27769 #if !CYTHON_METH_FASTCALL
27770 #if CYTHON_ASSUME_SAFE_MACROS
27771 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27772 #else
27773 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
27774 #endif
27775 #endif
27776 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
27777 {
27778 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
27779 if (__pyx_kwds) {
27780 Py_ssize_t kw_args;
27781 switch (__pyx_nargs) {
27782 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27783 CYTHON_FALLTHROUGH;
27784 case 0: break;
27785 default: goto __pyx_L5_argtuple_error;
27786 }
27787 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
27788 switch (__pyx_nargs) {
27789 case 0:
27790 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
27791 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
27792 kw_args--;
27793 }
27794 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
27795 else goto __pyx_L5_argtuple_error;
27796 }
27797 if (unlikely(kw_args > 0)) {
27798 const Py_ssize_t kwd_pos_args = __pyx_nargs;
27799 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
27800 }
27801 } else if (unlikely(__pyx_nargs != 1)) {
27802 goto __pyx_L5_argtuple_error;
27803 } else {
27804 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
27805 }
27806 __pyx_v___pyx_state = values[0];
27807 }
27808 goto __pyx_L6_skip;
27809 __pyx_L5_argtuple_error:;
27810 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
27811 __pyx_L6_skip:;
27812 goto __pyx_L4_argument_unpacking_done;
27813 __pyx_L3_error:;
27814 {
27815 Py_ssize_t __pyx_temp;
27816 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
27817 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27818 }
27819 }
27820 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27821 __Pyx_RefNannyFinishContext();
27822 return NULL;
27823 __pyx_L4_argument_unpacking_done:;
27824 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_39__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_v_self), __pyx_v___pyx_state);
27825
27826 /* function exit code */
27827 {
27828 Py_ssize_t __pyx_temp;
27829 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
27830 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
27831 }
27832 }
27833 __Pyx_RefNannyFinishContext();
27834 return __pyx_r;
27835 }
27836
27837 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantHeaderRecord_39__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
27838 PyObject *__pyx_r = NULL;
27839 __Pyx_TraceDeclarations
27840 __Pyx_RefNannyDeclarations
27841 int __pyx_lineno = 0;
27842 const char *__pyx_filename = NULL;
27843 int __pyx_clineno = 0;
27844 __Pyx_TraceFrameInit(__pyx_codeobj__46)
27845 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
27846 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
27847
27848 /* "(tree fragment)":4
27849 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
27850 * def __setstate_cython__(self, __pyx_state):
27851 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
27852 */
27853 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_ptr_cannot_be_converted_to, 0, 0);
27854 __PYX_ERR(4, 4, __pyx_L1_error)
27855
27856 /* "(tree fragment)":3
27857 * def __reduce_cython__(self):
27858 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
27859 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
27860 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
27861 */
27862
27863 /* function exit code */
27864 __pyx_L1_error:;
27865 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27866 __pyx_r = NULL;
27867 __Pyx_XGIVEREF(__pyx_r);
27868 __Pyx_TraceReturn(__pyx_r, 0);
27869 __Pyx_RefNannyFinishContext();
27870 return __pyx_r;
27871 }
27872
27873 /* "pysam/libcbcf.pyx":1422
27874 *
27875 *
27876 * cdef VariantHeaderRecord makeVariantHeaderRecord(VariantHeader header, bcf_hrec_t *hdr): # <<<<<<<<<<<<<<
27877 * if not header:
27878 * raise ValueError('invalid VariantHeader')
27879 */
27880
27881 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecord(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, bcf_hrec_t *__pyx_v_hdr) {
27882 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_record = 0;
27883 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_r = NULL;
27884 __Pyx_TraceDeclarations
27885 __Pyx_RefNannyDeclarations
27886 int __pyx_t_1;
27887 int __pyx_t_2;
27888 PyObject *__pyx_t_3 = NULL;
27889 int __pyx_lineno = 0;
27890 const char *__pyx_filename = NULL;
27891 int __pyx_clineno = 0;
27892 __Pyx_RefNannySetupContext("makeVariantHeaderRecord", 1);
27893 __Pyx_TraceCall("makeVariantHeaderRecord", __pyx_f[0], 1422, 0, __PYX_ERR(0, 1422, __pyx_L1_error));
27894
27895 /* "pysam/libcbcf.pyx":1423
27896 *
27897 * cdef VariantHeaderRecord makeVariantHeaderRecord(VariantHeader header, bcf_hrec_t *hdr):
27898 * if not header: # <<<<<<<<<<<<<<
27899 * raise ValueError('invalid VariantHeader')
27900 *
27901 */
27902 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1423, __pyx_L1_error)
27903 __pyx_t_2 = (!__pyx_t_1);
27904 if (unlikely(__pyx_t_2)) {
27905
27906 /* "pysam/libcbcf.pyx":1424
27907 * cdef VariantHeaderRecord makeVariantHeaderRecord(VariantHeader header, bcf_hrec_t *hdr):
27908 * if not header:
27909 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
27910 *
27911 * if not hdr:
27912 */
27913 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1424, __pyx_L1_error)
27914 __Pyx_GOTREF(__pyx_t_3);
27915 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27916 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27917 __PYX_ERR(0, 1424, __pyx_L1_error)
27918
27919 /* "pysam/libcbcf.pyx":1423
27920 *
27921 * cdef VariantHeaderRecord makeVariantHeaderRecord(VariantHeader header, bcf_hrec_t *hdr):
27922 * if not header: # <<<<<<<<<<<<<<
27923 * raise ValueError('invalid VariantHeader')
27924 *
27925 */
27926 }
27927
27928 /* "pysam/libcbcf.pyx":1426
27929 * raise ValueError('invalid VariantHeader')
27930 *
27931 * if not hdr: # <<<<<<<<<<<<<<
27932 * return None
27933 *
27934 */
27935 __pyx_t_2 = (!(__pyx_v_hdr != 0));
27936 if (__pyx_t_2) {
27937
27938 /* "pysam/libcbcf.pyx":1427
27939 *
27940 * if not hdr:
27941 * return None # <<<<<<<<<<<<<<
27942 *
27943 * cdef VariantHeaderRecord record = VariantHeaderRecord.__new__(VariantHeaderRecord)
27944 */
27945 __Pyx_XDECREF((PyObject *)__pyx_r);
27946 __pyx_r = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)Py_None); __Pyx_INCREF(Py_None);
27947 goto __pyx_L0;
27948
27949 /* "pysam/libcbcf.pyx":1426
27950 * raise ValueError('invalid VariantHeader')
27951 *
27952 * if not hdr: # <<<<<<<<<<<<<<
27953 * return None
27954 *
27955 */
27956 }
27957
27958 /* "pysam/libcbcf.pyx":1429
27959 * return None
27960 *
27961 * cdef VariantHeaderRecord record = VariantHeaderRecord.__new__(VariantHeaderRecord) # <<<<<<<<<<<<<<
27962 * record.header = header
27963 * record.ptr = hdr
27964 */
27965 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecord(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __pyx_L1_error)
27966 __Pyx_GOTREF((PyObject *)__pyx_t_3);
27967 __pyx_v_record = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)__pyx_t_3);
27968 __pyx_t_3 = 0;
27969
27970 /* "pysam/libcbcf.pyx":1430
27971 *
27972 * cdef VariantHeaderRecord record = VariantHeaderRecord.__new__(VariantHeaderRecord)
27973 * record.header = header # <<<<<<<<<<<<<<
27974 * record.ptr = hdr
27975 *
27976 */
27977 __Pyx_INCREF((PyObject *)__pyx_v_header);
27978 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
27979 __Pyx_GOTREF((PyObject *)__pyx_v_record->header);
27980 __Pyx_DECREF((PyObject *)__pyx_v_record->header);
27981 __pyx_v_record->header = __pyx_v_header;
27982
27983 /* "pysam/libcbcf.pyx":1431
27984 * cdef VariantHeaderRecord record = VariantHeaderRecord.__new__(VariantHeaderRecord)
27985 * record.header = header
27986 * record.ptr = hdr # <<<<<<<<<<<<<<
27987 *
27988 * return record
27989 */
27990 __pyx_v_record->ptr = __pyx_v_hdr;
27991
27992 /* "pysam/libcbcf.pyx":1433
27993 * record.ptr = hdr
27994 *
27995 * return record # <<<<<<<<<<<<<<
27996 *
27997 *
27998 */
27999 __Pyx_XDECREF((PyObject *)__pyx_r);
28000 __Pyx_INCREF((PyObject *)__pyx_v_record);
28001 __pyx_r = __pyx_v_record;
28002 goto __pyx_L0;
28003
28004 /* "pysam/libcbcf.pyx":1422
28005 *
28006 *
28007 * cdef VariantHeaderRecord makeVariantHeaderRecord(VariantHeader header, bcf_hrec_t *hdr): # <<<<<<<<<<<<<<
28008 * if not header:
28009 * raise ValueError('invalid VariantHeader')
28010 */
28011
28012 /* function exit code */
28013 __pyx_L1_error:;
28014 __Pyx_XDECREF(__pyx_t_3);
28015 __Pyx_AddTraceback("pysam.libcbcf.makeVariantHeaderRecord", __pyx_clineno, __pyx_lineno, __pyx_filename);
28016 __pyx_r = 0;
28017 __pyx_L0:;
28018 __Pyx_XDECREF((PyObject *)__pyx_v_record);
28019 __Pyx_XGIVEREF((PyObject *)__pyx_r);
28020 __Pyx_TraceReturn(__pyx_r, 0);
28021 __Pyx_RefNannyFinishContext();
28022 return __pyx_r;
28023 }
28024
28025 /* "pysam/libcbcf.pyx":1438
28026 * cdef class VariantHeaderRecords(object):
28027 * """sequence of :class:`VariantHeaderRecord` object from a :class:`VariantHeader` object"""
28028 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
28029 * raise TypeError('this class cannot be instantiated from Python')
28030 *
28031 */
28032
28033 /* Python wrapper */
28034 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28035 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28036 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
28037 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
28038 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
28039 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28040 int __pyx_r;
28041 __Pyx_RefNannyDeclarations
28042 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
28043 #if CYTHON_ASSUME_SAFE_MACROS
28044 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
28045 #else
28046 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
28047 #endif
28048 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28049 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
28050 __Pyx_INCREF(__pyx_args);
28051 __pyx_v_args = __pyx_args;
28052 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
28053
28054 /* function exit code */
28055 __Pyx_DECREF(__pyx_v_args);
28056 __Pyx_XDECREF(__pyx_v_kwargs);
28057 __Pyx_RefNannyFinishContext();
28058 return __pyx_r;
28059 }
28060
28061 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
28062 int __pyx_r;
28063 __Pyx_TraceDeclarations
28064 __Pyx_RefNannyDeclarations
28065 PyObject *__pyx_t_1 = NULL;
28066 int __pyx_lineno = 0;
28067 const char *__pyx_filename = NULL;
28068 int __pyx_clineno = 0;
28069 __Pyx_RefNannySetupContext("__init__", 1);
28070 __Pyx_TraceCall("__init__", __pyx_f[0], 1438, 0, __PYX_ERR(0, 1438, __pyx_L1_error));
28071
28072 /* "pysam/libcbcf.pyx":1439
28073 * """sequence of :class:`VariantHeaderRecord` object from a :class:`VariantHeader` object"""
28074 * def __init__(self, *args, **kwargs):
28075 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
28076 *
28077 * def __len__(self):
28078 */
28079 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
28080 __Pyx_GOTREF(__pyx_t_1);
28081 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
28082 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28083 __PYX_ERR(0, 1439, __pyx_L1_error)
28084
28085 /* "pysam/libcbcf.pyx":1438
28086 * cdef class VariantHeaderRecords(object):
28087 * """sequence of :class:`VariantHeaderRecord` object from a :class:`VariantHeader` object"""
28088 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
28089 * raise TypeError('this class cannot be instantiated from Python')
28090 *
28091 */
28092
28093 /* function exit code */
28094 __pyx_L1_error:;
28095 __Pyx_XDECREF(__pyx_t_1);
28096 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28097 __pyx_r = -1;
28098 __Pyx_TraceReturn(Py_None, 0);
28099 __Pyx_RefNannyFinishContext();
28100 return __pyx_r;
28101 }
28102
28103 /* "pysam/libcbcf.pyx":1441
28104 * raise TypeError('this class cannot be instantiated from Python')
28105 *
28106 * def __len__(self): # <<<<<<<<<<<<<<
28107 * return self.header.ptr.nhrec
28108 *
28109 */
28110
28111 /* Python wrapper */
28112 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_3__len__(PyObject *__pyx_v_self); /*proto*/
28113 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_3__len__(PyObject *__pyx_v_self) {
28114 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28115 Py_ssize_t __pyx_r;
28116 __Pyx_RefNannyDeclarations
28117 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
28118 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28119 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v_self));
28120
28121 /* function exit code */
28122 __Pyx_RefNannyFinishContext();
28123 return __pyx_r;
28124 }
28125
28126 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self) {
28127 Py_ssize_t __pyx_r;
28128 __Pyx_TraceDeclarations
28129 int __pyx_lineno = 0;
28130 const char *__pyx_filename = NULL;
28131 int __pyx_clineno = 0;
28132 __Pyx_TraceCall("__len__", __pyx_f[0], 1441, 0, __PYX_ERR(0, 1441, __pyx_L1_error));
28133
28134 /* "pysam/libcbcf.pyx":1442
28135 *
28136 * def __len__(self):
28137 * return self.header.ptr.nhrec # <<<<<<<<<<<<<<
28138 *
28139 * def __bool__(self):
28140 */
28141 __pyx_r = __pyx_v_self->header->ptr->nhrec;
28142 goto __pyx_L0;
28143
28144 /* "pysam/libcbcf.pyx":1441
28145 * raise TypeError('this class cannot be instantiated from Python')
28146 *
28147 * def __len__(self): # <<<<<<<<<<<<<<
28148 * return self.header.ptr.nhrec
28149 *
28150 */
28151
28152 /* function exit code */
28153 __pyx_L1_error:;
28154 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28155 __pyx_r = -1;
28156 __pyx_L0:;
28157 __Pyx_TraceReturn(Py_None, 0);
28158 return __pyx_r;
28159 }
28160
28161 /* "pysam/libcbcf.pyx":1444
28162 * return self.header.ptr.nhrec
28163 *
28164 * def __bool__(self): # <<<<<<<<<<<<<<
28165 * return self.header.ptr.nhrec != 0
28166 *
28167 */
28168
28169 /* Python wrapper */
28170 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_5__bool__(PyObject *__pyx_v_self); /*proto*/
28171 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_5__bool__(PyObject *__pyx_v_self) {
28172 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28173 int __pyx_r;
28174 __Pyx_RefNannyDeclarations
28175 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
28176 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28177 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v_self));
28178
28179 /* function exit code */
28180 __Pyx_RefNannyFinishContext();
28181 return __pyx_r;
28182 }
28183
28184 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self) {
28185 int __pyx_r;
28186 __Pyx_TraceDeclarations
28187 int __pyx_lineno = 0;
28188 const char *__pyx_filename = NULL;
28189 int __pyx_clineno = 0;
28190 __Pyx_TraceCall("__bool__", __pyx_f[0], 1444, 0, __PYX_ERR(0, 1444, __pyx_L1_error));
28191
28192 /* "pysam/libcbcf.pyx":1445
28193 *
28194 * def __bool__(self):
28195 * return self.header.ptr.nhrec != 0 # <<<<<<<<<<<<<<
28196 *
28197 * def __getitem__(self, index):
28198 */
28199 __pyx_r = (__pyx_v_self->header->ptr->nhrec != 0);
28200 goto __pyx_L0;
28201
28202 /* "pysam/libcbcf.pyx":1444
28203 * return self.header.ptr.nhrec
28204 *
28205 * def __bool__(self): # <<<<<<<<<<<<<<
28206 * return self.header.ptr.nhrec != 0
28207 *
28208 */
28209
28210 /* function exit code */
28211 __pyx_L1_error:;
28212 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28213 __pyx_r = -1;
28214 __pyx_L0:;
28215 __Pyx_TraceReturn(Py_None, 0);
28216 return __pyx_r;
28217 }
28218
28219 /* "pysam/libcbcf.pyx":1447
28220 * return self.header.ptr.nhrec != 0
28221 *
28222 * def __getitem__(self, index): # <<<<<<<<<<<<<<
28223 * cdef int32_t i = index
28224 * if i < 0 or i >= self.header.ptr.nhrec:
28225 */
28226
28227 /* Python wrapper */
28228 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
28229 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
28230 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28231 PyObject *__pyx_r = 0;
28232 __Pyx_RefNannyDeclarations
28233 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
28234 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28235 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v_self), ((PyObject *)__pyx_v_index));
28236
28237 /* function exit code */
28238 __Pyx_RefNannyFinishContext();
28239 return __pyx_r;
28240 }
28241
28242 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self, PyObject *__pyx_v_index) {
28243 int32_t __pyx_v_i;
28244 PyObject *__pyx_r = NULL;
28245 __Pyx_TraceDeclarations
28246 __Pyx_RefNannyDeclarations
28247 int32_t __pyx_t_1;
28248 int __pyx_t_2;
28249 int __pyx_t_3;
28250 PyObject *__pyx_t_4 = NULL;
28251 PyObject *__pyx_t_5 = NULL;
28252 int __pyx_lineno = 0;
28253 const char *__pyx_filename = NULL;
28254 int __pyx_clineno = 0;
28255 __Pyx_RefNannySetupContext("__getitem__", 1);
28256 __Pyx_TraceCall("__getitem__", __pyx_f[0], 1447, 0, __PYX_ERR(0, 1447, __pyx_L1_error));
28257
28258 /* "pysam/libcbcf.pyx":1448
28259 *
28260 * def __getitem__(self, index):
28261 * cdef int32_t i = index # <<<<<<<<<<<<<<
28262 * if i < 0 or i >= self.header.ptr.nhrec:
28263 * raise IndexError('invalid header record index')
28264 */
28265 __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_index); if (unlikely((__pyx_t_1 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1448, __pyx_L1_error)
28266 __pyx_v_i = __pyx_t_1;
28267
28268 /* "pysam/libcbcf.pyx":1449
28269 * def __getitem__(self, index):
28270 * cdef int32_t i = index
28271 * if i < 0 or i >= self.header.ptr.nhrec: # <<<<<<<<<<<<<<
28272 * raise IndexError('invalid header record index')
28273 * return makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
28274 */
28275 __pyx_t_3 = (__pyx_v_i < 0);
28276 if (!__pyx_t_3) {
28277 } else {
28278 __pyx_t_2 = __pyx_t_3;
28279 goto __pyx_L4_bool_binop_done;
28280 }
28281 __pyx_t_3 = (__pyx_v_i >= __pyx_v_self->header->ptr->nhrec);
28282 __pyx_t_2 = __pyx_t_3;
28283 __pyx_L4_bool_binop_done:;
28284 if (unlikely(__pyx_t_2)) {
28285
28286 /* "pysam/libcbcf.pyx":1450
28287 * cdef int32_t i = index
28288 * if i < 0 or i >= self.header.ptr.nhrec:
28289 * raise IndexError('invalid header record index') # <<<<<<<<<<<<<<
28290 * return makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
28291 *
28292 */
28293 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1450, __pyx_L1_error)
28294 __Pyx_GOTREF(__pyx_t_4);
28295 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
28296 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28297 __PYX_ERR(0, 1450, __pyx_L1_error)
28298
28299 /* "pysam/libcbcf.pyx":1449
28300 * def __getitem__(self, index):
28301 * cdef int32_t i = index
28302 * if i < 0 or i >= self.header.ptr.nhrec: # <<<<<<<<<<<<<<
28303 * raise IndexError('invalid header record index')
28304 * return makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
28305 */
28306 }
28307
28308 /* "pysam/libcbcf.pyx":1451
28309 * if i < 0 or i >= self.header.ptr.nhrec:
28310 * raise IndexError('invalid header record index')
28311 * return makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i]) # <<<<<<<<<<<<<<
28312 *
28313 * def __iter__(self):
28314 */
28315 __Pyx_XDECREF(__pyx_r);
28316 __pyx_t_4 = ((PyObject *)__pyx_v_self->header);
28317 __Pyx_INCREF(__pyx_t_4);
28318 __pyx_t_5 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecord(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_4), (__pyx_v_self->header->ptr->hrec[__pyx_v_i]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1451, __pyx_L1_error)
28319 __Pyx_GOTREF(__pyx_t_5);
28320 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28321 __pyx_r = __pyx_t_5;
28322 __pyx_t_5 = 0;
28323 goto __pyx_L0;
28324
28325 /* "pysam/libcbcf.pyx":1447
28326 * return self.header.ptr.nhrec != 0
28327 *
28328 * def __getitem__(self, index): # <<<<<<<<<<<<<<
28329 * cdef int32_t i = index
28330 * if i < 0 or i >= self.header.ptr.nhrec:
28331 */
28332
28333 /* function exit code */
28334 __pyx_L1_error:;
28335 __Pyx_XDECREF(__pyx_t_4);
28336 __Pyx_XDECREF(__pyx_t_5);
28337 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28338 __pyx_r = NULL;
28339 __pyx_L0:;
28340 __Pyx_XGIVEREF(__pyx_r);
28341 __Pyx_TraceReturn(__pyx_r, 0);
28342 __Pyx_RefNannyFinishContext();
28343 return __pyx_r;
28344 }
28345 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderRecords_10generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
28346
28347 /* "pysam/libcbcf.pyx":1453
28348 * return makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
28349 *
28350 * def __iter__(self): # <<<<<<<<<<<<<<
28351 * cdef int32_t i
28352 * for i in range(self.header.ptr.nhrec):
28353 */
28354
28355 /* Python wrapper */
28356 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_9__iter__(PyObject *__pyx_v_self); /*proto*/
28357 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_9__iter__(PyObject *__pyx_v_self) {
28358 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28359 PyObject *__pyx_r = 0;
28360 __Pyx_RefNannyDeclarations
28361 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
28362 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28363 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_8__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v_self));
28364
28365 /* function exit code */
28366 __Pyx_RefNannyFinishContext();
28367 return __pyx_r;
28368 }
28369
28370 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self) {
28371 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *__pyx_cur_scope;
28372 PyObject *__pyx_r = NULL;
28373 __Pyx_RefNannyDeclarations
28374 int __pyx_lineno = 0;
28375 const char *__pyx_filename = NULL;
28376 int __pyx_clineno = 0;
28377 __Pyx_RefNannySetupContext("__iter__", 0);
28378 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_10___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__, __pyx_empty_tuple, NULL);
28379 if (unlikely(!__pyx_cur_scope)) {
28380 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *)Py_None);
28381 __Pyx_INCREF(Py_None);
28382 __PYX_ERR(0, 1453, __pyx_L1_error)
28383 } else {
28384 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
28385 }
28386 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
28387 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
28388 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
28389 {
28390 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_20VariantHeaderRecords_10generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantHeaderRecords___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1453, __pyx_L1_error)
28391 __Pyx_DECREF(__pyx_cur_scope);
28392 __Pyx_RefNannyFinishContext();
28393 return (PyObject *) gen;
28394 }
28395
28396 /* function exit code */
28397 __pyx_L1_error:;
28398 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28399 __pyx_r = NULL;
28400 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
28401 __Pyx_XGIVEREF(__pyx_r);
28402 __Pyx_RefNannyFinishContext();
28403 return __pyx_r;
28404 }
28405
28406 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderRecords_10generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
28407 {
28408 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *)__pyx_generator->closure);
28409 PyObject *__pyx_r = NULL;
28410 __Pyx_TraceDeclarations
28411 int __pyx_t_1;
28412 int __pyx_t_2;
28413 int32_t __pyx_t_3;
28414 PyObject *__pyx_t_4 = NULL;
28415 PyObject *__pyx_t_5 = NULL;
28416 int __pyx_lineno = 0;
28417 const char *__pyx_filename = NULL;
28418 int __pyx_clineno = 0;
28419 __Pyx_RefNannyDeclarations
28420 __Pyx_RefNannySetupContext("__iter__", 0);
28421 __Pyx_TraceCall("__iter__", __pyx_f[0], 1453, 0, __PYX_ERR(0, 1453, __pyx_L1_error));
28422 switch (__pyx_generator->resume_label) {
28423 case 0: goto __pyx_L3_first_run;
28424 case 1: goto __pyx_L6_resume_from_yield;
28425 default: /* CPython raises the right error here */
28426 __Pyx_TraceReturn(Py_None, 0);
28427 __Pyx_RefNannyFinishContext();
28428 return NULL;
28429 }
28430 __pyx_L3_first_run:;
28431 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1453, __pyx_L1_error)
28432
28433 /* "pysam/libcbcf.pyx":1455
28434 * def __iter__(self):
28435 * cdef int32_t i
28436 * for i in range(self.header.ptr.nhrec): # <<<<<<<<<<<<<<
28437 * yield makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
28438 *
28439 */
28440 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->header->ptr->nhrec;
28441 __pyx_t_2 = __pyx_t_1;
28442 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
28443 __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
28444
28445 /* "pysam/libcbcf.pyx":1456
28446 * cdef int32_t i
28447 * for i in range(self.header.ptr.nhrec):
28448 * yield makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i]) # <<<<<<<<<<<<<<
28449 *
28450 * __hash__ = None
28451 */
28452 __pyx_t_4 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->header);
28453 __Pyx_INCREF(__pyx_t_4);
28454 __pyx_t_5 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecord(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_4), (__pyx_cur_scope->__pyx_v_self->header->ptr->hrec[__pyx_cur_scope->__pyx_v_i]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1456, __pyx_L1_error)
28455 __Pyx_GOTREF(__pyx_t_5);
28456 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28457 __pyx_r = __pyx_t_5;
28458 __pyx_t_5 = 0;
28459 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
28460 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
28461 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
28462 __Pyx_XGIVEREF(__pyx_r);
28463 __Pyx_TraceReturn(__pyx_r, 0);
28464 __Pyx_RefNannyFinishContext();
28465 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
28466 /* return from generator, yielding value */
28467 __pyx_generator->resume_label = 1;
28468 return __pyx_r;
28469 __pyx_L6_resume_from_yield:;
28470 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
28471 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
28472 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
28473 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1456, __pyx_L1_error)
28474 }
28475 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
28476
28477 /* "pysam/libcbcf.pyx":1453
28478 * return makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
28479 *
28480 * def __iter__(self): # <<<<<<<<<<<<<<
28481 * cdef int32_t i
28482 * for i in range(self.header.ptr.nhrec):
28483 */
28484
28485 /* function exit code */
28486 PyErr_SetNone(PyExc_StopIteration);
28487 goto __pyx_L0;
28488 __pyx_L1_error:;
28489 __Pyx_Generator_Replace_StopIteration(0);
28490 __Pyx_XDECREF(__pyx_t_4);
28491 __Pyx_XDECREF(__pyx_t_5);
28492 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28493 __pyx_L0:;
28494 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
28495 #if !CYTHON_USE_EXC_INFO_STACK
28496 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
28497 #endif
28498 __pyx_generator->resume_label = -1;
28499 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
28500 __Pyx_TraceReturn(__pyx_r, 0);
28501 __Pyx_RefNannyFinishContext();
28502 return __pyx_r;
28503 }
28504
28505 /* "pysam/libcbcf.pxd":53
28506 *
28507 * cdef class VariantHeaderRecords(object):
28508 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
28509 *
28510 *
28511 */
28512
28513 /* Python wrapper */
28514 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
28515 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_6header_1__get__(PyObject *__pyx_v_self) {
28516 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28517 PyObject *__pyx_r = 0;
28518 __Pyx_RefNannyDeclarations
28519 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
28520 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28521 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v_self));
28522
28523 /* function exit code */
28524 __Pyx_RefNannyFinishContext();
28525 return __pyx_r;
28526 }
28527
28528 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self) {
28529 PyObject *__pyx_r = NULL;
28530 __Pyx_TraceDeclarations
28531 __Pyx_RefNannyDeclarations
28532 int __pyx_lineno = 0;
28533 const char *__pyx_filename = NULL;
28534 int __pyx_clineno = 0;
28535 __Pyx_RefNannySetupContext("__get__", 1);
28536 __Pyx_TraceCall("__get__", __pyx_f[3], 53, 0, __PYX_ERR(3, 53, __pyx_L1_error));
28537 __Pyx_XDECREF(__pyx_r);
28538 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
28539 __pyx_r = ((PyObject *)__pyx_v_self->header);
28540 goto __pyx_L0;
28541
28542 /* function exit code */
28543 __pyx_L1_error:;
28544 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28545 __pyx_r = NULL;
28546 __pyx_L0:;
28547 __Pyx_XGIVEREF(__pyx_r);
28548 __Pyx_TraceReturn(__pyx_r, 0);
28549 __Pyx_RefNannyFinishContext();
28550 return __pyx_r;
28551 }
28552
28553 /* "(tree fragment)":1
28554 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
28555 * cdef tuple state
28556 * cdef object _dict
28557 */
28558
28559 /* Python wrapper */
28560 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_12__reduce_cython__(PyObject *__pyx_v_self,
28561 #if CYTHON_METH_FASTCALL
28562 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28563 #else
28564 PyObject *__pyx_args, PyObject *__pyx_kwds
28565 #endif
28566 ); /*proto*/
28567 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderRecords_11__reduce_cython__, "VariantHeaderRecords.__reduce_cython__(self)");
28568 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderRecords_12__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_12__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderRecords_11__reduce_cython__};
28569 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_12__reduce_cython__(PyObject *__pyx_v_self,
28570 #if CYTHON_METH_FASTCALL
28571 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28572 #else
28573 PyObject *__pyx_args, PyObject *__pyx_kwds
28574 #endif
28575 ) {
28576 #if !CYTHON_METH_FASTCALL
28577 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
28578 #endif
28579 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28580 PyObject *__pyx_r = 0;
28581 __Pyx_RefNannyDeclarations
28582 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
28583 #if !CYTHON_METH_FASTCALL
28584 #if CYTHON_ASSUME_SAFE_MACROS
28585 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
28586 #else
28587 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
28588 #endif
28589 #endif
28590 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
28591 if (unlikely(__pyx_nargs > 0)) {
28592 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
28593 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
28594 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_11__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v_self));
28595
28596 /* function exit code */
28597 __Pyx_RefNannyFinishContext();
28598 return __pyx_r;
28599 }
28600
28601 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_11__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self) {
28602 PyObject *__pyx_v_state = 0;
28603 PyObject *__pyx_v__dict = 0;
28604 int __pyx_v_use_setstate;
28605 PyObject *__pyx_r = NULL;
28606 __Pyx_TraceDeclarations
28607 __Pyx_RefNannyDeclarations
28608 PyObject *__pyx_t_1 = NULL;
28609 int __pyx_t_2;
28610 PyObject *__pyx_t_3 = NULL;
28611 PyObject *__pyx_t_4 = NULL;
28612 int __pyx_lineno = 0;
28613 const char *__pyx_filename = NULL;
28614 int __pyx_clineno = 0;
28615 __Pyx_TraceFrameInit(__pyx_codeobj__49)
28616 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
28617 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
28618
28619 /* "(tree fragment)":5
28620 * cdef object _dict
28621 * cdef bint use_setstate
28622 * state = (self.header,) # <<<<<<<<<<<<<<
28623 * _dict = getattr(self, '__dict__', None)
28624 * if _dict is not None:
28625 */
28626 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
28627 __Pyx_GOTREF(__pyx_t_1);
28628 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
28629 __Pyx_GIVEREF((PyObject *)__pyx_v_self->header);
28630 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->header))) __PYX_ERR(4, 5, __pyx_L1_error);
28631 __pyx_v_state = ((PyObject*)__pyx_t_1);
28632 __pyx_t_1 = 0;
28633
28634 /* "(tree fragment)":6
28635 * cdef bint use_setstate
28636 * state = (self.header,)
28637 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
28638 * if _dict is not None:
28639 * state += (_dict,)
28640 */
28641 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
28642 __Pyx_GOTREF(__pyx_t_1);
28643 __pyx_v__dict = __pyx_t_1;
28644 __pyx_t_1 = 0;
28645
28646 /* "(tree fragment)":7
28647 * state = (self.header,)
28648 * _dict = getattr(self, '__dict__', None)
28649 * if _dict is not None: # <<<<<<<<<<<<<<
28650 * state += (_dict,)
28651 * use_setstate = True
28652 */
28653 __pyx_t_2 = (__pyx_v__dict != Py_None);
28654 if (__pyx_t_2) {
28655
28656 /* "(tree fragment)":8
28657 * _dict = getattr(self, '__dict__', None)
28658 * if _dict is not None:
28659 * state += (_dict,) # <<<<<<<<<<<<<<
28660 * use_setstate = True
28661 * else:
28662 */
28663 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
28664 __Pyx_GOTREF(__pyx_t_1);
28665 __Pyx_INCREF(__pyx_v__dict);
28666 __Pyx_GIVEREF(__pyx_v__dict);
28667 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
28668 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
28669 __Pyx_GOTREF(__pyx_t_3);
28670 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28671 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
28672 __pyx_t_3 = 0;
28673
28674 /* "(tree fragment)":9
28675 * if _dict is not None:
28676 * state += (_dict,)
28677 * use_setstate = True # <<<<<<<<<<<<<<
28678 * else:
28679 * use_setstate = self.header is not None
28680 */
28681 __pyx_v_use_setstate = 1;
28682
28683 /* "(tree fragment)":7
28684 * state = (self.header,)
28685 * _dict = getattr(self, '__dict__', None)
28686 * if _dict is not None: # <<<<<<<<<<<<<<
28687 * state += (_dict,)
28688 * use_setstate = True
28689 */
28690 goto __pyx_L3;
28691 }
28692
28693 /* "(tree fragment)":11
28694 * use_setstate = True
28695 * else:
28696 * use_setstate = self.header is not None # <<<<<<<<<<<<<<
28697 * if use_setstate:
28698 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, None), state
28699 */
28700 /*else*/ {
28701 __pyx_t_2 = (((PyObject *)__pyx_v_self->header) != Py_None);
28702 __pyx_v_use_setstate = __pyx_t_2;
28703 }
28704 __pyx_L3:;
28705
28706 /* "(tree fragment)":12
28707 * else:
28708 * use_setstate = self.header is not None
28709 * if use_setstate: # <<<<<<<<<<<<<<
28710 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, None), state
28711 * else:
28712 */
28713 if (__pyx_v_use_setstate) {
28714
28715 /* "(tree fragment)":13
28716 * use_setstate = self.header is not None
28717 * if use_setstate:
28718 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, None), state # <<<<<<<<<<<<<<
28719 * else:
28720 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, state)
28721 */
28722 __Pyx_XDECREF(__pyx_r);
28723 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_VariantHeaderReco); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
28724 __Pyx_GOTREF(__pyx_t_3);
28725 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
28726 __Pyx_GOTREF(__pyx_t_1);
28727 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
28728 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
28729 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
28730 __Pyx_INCREF(__pyx_int_31479882);
28731 __Pyx_GIVEREF(__pyx_int_31479882);
28732 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_31479882)) __PYX_ERR(4, 13, __pyx_L1_error);
28733 __Pyx_INCREF(Py_None);
28734 __Pyx_GIVEREF(Py_None);
28735 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
28736 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
28737 __Pyx_GOTREF(__pyx_t_4);
28738 __Pyx_GIVEREF(__pyx_t_3);
28739 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
28740 __Pyx_GIVEREF(__pyx_t_1);
28741 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
28742 __Pyx_INCREF(__pyx_v_state);
28743 __Pyx_GIVEREF(__pyx_v_state);
28744 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
28745 __pyx_t_3 = 0;
28746 __pyx_t_1 = 0;
28747 __pyx_r = __pyx_t_4;
28748 __pyx_t_4 = 0;
28749 goto __pyx_L0;
28750
28751 /* "(tree fragment)":12
28752 * else:
28753 * use_setstate = self.header is not None
28754 * if use_setstate: # <<<<<<<<<<<<<<
28755 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, None), state
28756 * else:
28757 */
28758 }
28759
28760 /* "(tree fragment)":15
28761 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, None), state
28762 * else:
28763 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, state) # <<<<<<<<<<<<<<
28764 * def __setstate_cython__(self, __pyx_state):
28765 * __pyx_unpickle_VariantHeaderRecords__set_state(self, __pyx_state)
28766 */
28767 /*else*/ {
28768 __Pyx_XDECREF(__pyx_r);
28769 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantHeaderReco); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
28770 __Pyx_GOTREF(__pyx_t_4);
28771 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
28772 __Pyx_GOTREF(__pyx_t_1);
28773 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
28774 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
28775 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
28776 __Pyx_INCREF(__pyx_int_31479882);
28777 __Pyx_GIVEREF(__pyx_int_31479882);
28778 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_31479882)) __PYX_ERR(4, 15, __pyx_L1_error);
28779 __Pyx_INCREF(__pyx_v_state);
28780 __Pyx_GIVEREF(__pyx_v_state);
28781 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
28782 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
28783 __Pyx_GOTREF(__pyx_t_3);
28784 __Pyx_GIVEREF(__pyx_t_4);
28785 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
28786 __Pyx_GIVEREF(__pyx_t_1);
28787 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
28788 __pyx_t_4 = 0;
28789 __pyx_t_1 = 0;
28790 __pyx_r = __pyx_t_3;
28791 __pyx_t_3 = 0;
28792 goto __pyx_L0;
28793 }
28794
28795 /* "(tree fragment)":1
28796 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
28797 * cdef tuple state
28798 * cdef object _dict
28799 */
28800
28801 /* function exit code */
28802 __pyx_L1_error:;
28803 __Pyx_XDECREF(__pyx_t_1);
28804 __Pyx_XDECREF(__pyx_t_3);
28805 __Pyx_XDECREF(__pyx_t_4);
28806 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28807 __pyx_r = NULL;
28808 __pyx_L0:;
28809 __Pyx_XDECREF(__pyx_v_state);
28810 __Pyx_XDECREF(__pyx_v__dict);
28811 __Pyx_XGIVEREF(__pyx_r);
28812 __Pyx_TraceReturn(__pyx_r, 0);
28813 __Pyx_RefNannyFinishContext();
28814 return __pyx_r;
28815 }
28816
28817 /* "(tree fragment)":16
28818 * else:
28819 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, state)
28820 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
28821 * __pyx_unpickle_VariantHeaderRecords__set_state(self, __pyx_state)
28822 */
28823
28824 /* Python wrapper */
28825 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_14__setstate_cython__(PyObject *__pyx_v_self,
28826 #if CYTHON_METH_FASTCALL
28827 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28828 #else
28829 PyObject *__pyx_args, PyObject *__pyx_kwds
28830 #endif
28831 ); /*proto*/
28832 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderRecords_13__setstate_cython__, "VariantHeaderRecords.__setstate_cython__(self, __pyx_state)");
28833 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderRecords_14__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_14__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderRecords_13__setstate_cython__};
28834 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_14__setstate_cython__(PyObject *__pyx_v_self,
28835 #if CYTHON_METH_FASTCALL
28836 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28837 #else
28838 PyObject *__pyx_args, PyObject *__pyx_kwds
28839 #endif
28840 ) {
28841 PyObject *__pyx_v___pyx_state = 0;
28842 #if !CYTHON_METH_FASTCALL
28843 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
28844 #endif
28845 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28846 PyObject* values[1] = {0};
28847 int __pyx_lineno = 0;
28848 const char *__pyx_filename = NULL;
28849 int __pyx_clineno = 0;
28850 PyObject *__pyx_r = 0;
28851 __Pyx_RefNannyDeclarations
28852 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
28853 #if !CYTHON_METH_FASTCALL
28854 #if CYTHON_ASSUME_SAFE_MACROS
28855 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
28856 #else
28857 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
28858 #endif
28859 #endif
28860 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
28861 {
28862 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
28863 if (__pyx_kwds) {
28864 Py_ssize_t kw_args;
28865 switch (__pyx_nargs) {
28866 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
28867 CYTHON_FALLTHROUGH;
28868 case 0: break;
28869 default: goto __pyx_L5_argtuple_error;
28870 }
28871 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
28872 switch (__pyx_nargs) {
28873 case 0:
28874 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
28875 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
28876 kw_args--;
28877 }
28878 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
28879 else goto __pyx_L5_argtuple_error;
28880 }
28881 if (unlikely(kw_args > 0)) {
28882 const Py_ssize_t kwd_pos_args = __pyx_nargs;
28883 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
28884 }
28885 } else if (unlikely(__pyx_nargs != 1)) {
28886 goto __pyx_L5_argtuple_error;
28887 } else {
28888 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
28889 }
28890 __pyx_v___pyx_state = values[0];
28891 }
28892 goto __pyx_L6_skip;
28893 __pyx_L5_argtuple_error:;
28894 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
28895 __pyx_L6_skip:;
28896 goto __pyx_L4_argument_unpacking_done;
28897 __pyx_L3_error:;
28898 {
28899 Py_ssize_t __pyx_temp;
28900 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
28901 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
28902 }
28903 }
28904 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28905 __Pyx_RefNannyFinishContext();
28906 return NULL;
28907 __pyx_L4_argument_unpacking_done:;
28908 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_13__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v_self), __pyx_v___pyx_state);
28909
28910 /* function exit code */
28911 {
28912 Py_ssize_t __pyx_temp;
28913 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
28914 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
28915 }
28916 }
28917 __Pyx_RefNannyFinishContext();
28918 return __pyx_r;
28919 }
28920
28921 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderRecords_13__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
28922 PyObject *__pyx_r = NULL;
28923 __Pyx_TraceDeclarations
28924 __Pyx_RefNannyDeclarations
28925 PyObject *__pyx_t_1 = NULL;
28926 int __pyx_lineno = 0;
28927 const char *__pyx_filename = NULL;
28928 int __pyx_clineno = 0;
28929 __Pyx_TraceFrameInit(__pyx_codeobj__50)
28930 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
28931 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
28932
28933 /* "(tree fragment)":17
28934 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, state)
28935 * def __setstate_cython__(self, __pyx_state):
28936 * __pyx_unpickle_VariantHeaderRecords__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
28937 */
28938 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
28939 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
28940 __Pyx_GOTREF(__pyx_t_1);
28941 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28942
28943 /* "(tree fragment)":16
28944 * else:
28945 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, state)
28946 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
28947 * __pyx_unpickle_VariantHeaderRecords__set_state(self, __pyx_state)
28948 */
28949
28950 /* function exit code */
28951 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
28952 goto __pyx_L0;
28953 __pyx_L1_error:;
28954 __Pyx_XDECREF(__pyx_t_1);
28955 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderRecords.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28956 __pyx_r = NULL;
28957 __pyx_L0:;
28958 __Pyx_XGIVEREF(__pyx_r);
28959 __Pyx_TraceReturn(__pyx_r, 0);
28960 __Pyx_RefNannyFinishContext();
28961 return __pyx_r;
28962 }
28963
28964 /* "pysam/libcbcf.pyx":1461
28965 *
28966 *
28967 * cdef VariantHeaderRecords makeVariantHeaderRecords(VariantHeader header): # <<<<<<<<<<<<<<
28968 * if not header:
28969 * raise ValueError('invalid VariantHeader')
28970 */
28971
28972 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecords(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header) {
28973 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v_records = 0;
28974 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_r = NULL;
28975 __Pyx_TraceDeclarations
28976 __Pyx_RefNannyDeclarations
28977 int __pyx_t_1;
28978 int __pyx_t_2;
28979 PyObject *__pyx_t_3 = NULL;
28980 int __pyx_lineno = 0;
28981 const char *__pyx_filename = NULL;
28982 int __pyx_clineno = 0;
28983 __Pyx_RefNannySetupContext("makeVariantHeaderRecords", 1);
28984 __Pyx_TraceCall("makeVariantHeaderRecords", __pyx_f[0], 1461, 0, __PYX_ERR(0, 1461, __pyx_L1_error));
28985
28986 /* "pysam/libcbcf.pyx":1462
28987 *
28988 * cdef VariantHeaderRecords makeVariantHeaderRecords(VariantHeader header):
28989 * if not header: # <<<<<<<<<<<<<<
28990 * raise ValueError('invalid VariantHeader')
28991 *
28992 */
28993 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1462, __pyx_L1_error)
28994 __pyx_t_2 = (!__pyx_t_1);
28995 if (unlikely(__pyx_t_2)) {
28996
28997 /* "pysam/libcbcf.pyx":1463
28998 * cdef VariantHeaderRecords makeVariantHeaderRecords(VariantHeader header):
28999 * if not header:
29000 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
29001 *
29002 * cdef VariantHeaderRecords records = VariantHeaderRecords.__new__(VariantHeaderRecords)
29003 */
29004 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error)
29005 __Pyx_GOTREF(__pyx_t_3);
29006 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
29007 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29008 __PYX_ERR(0, 1463, __pyx_L1_error)
29009
29010 /* "pysam/libcbcf.pyx":1462
29011 *
29012 * cdef VariantHeaderRecords makeVariantHeaderRecords(VariantHeader header):
29013 * if not header: # <<<<<<<<<<<<<<
29014 * raise ValueError('invalid VariantHeader')
29015 *
29016 */
29017 }
29018
29019 /* "pysam/libcbcf.pyx":1465
29020 * raise ValueError('invalid VariantHeader')
29021 *
29022 * cdef VariantHeaderRecords records = VariantHeaderRecords.__new__(VariantHeaderRecords) # <<<<<<<<<<<<<<
29023 * records.header = header
29024 * return records
29025 */
29026 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecords(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error)
29027 __Pyx_GOTREF((PyObject *)__pyx_t_3);
29028 __pyx_v_records = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_t_3);
29029 __pyx_t_3 = 0;
29030
29031 /* "pysam/libcbcf.pyx":1466
29032 *
29033 * cdef VariantHeaderRecords records = VariantHeaderRecords.__new__(VariantHeaderRecords)
29034 * records.header = header # <<<<<<<<<<<<<<
29035 * return records
29036 *
29037 */
29038 __Pyx_INCREF((PyObject *)__pyx_v_header);
29039 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
29040 __Pyx_GOTREF((PyObject *)__pyx_v_records->header);
29041 __Pyx_DECREF((PyObject *)__pyx_v_records->header);
29042 __pyx_v_records->header = __pyx_v_header;
29043
29044 /* "pysam/libcbcf.pyx":1467
29045 * cdef VariantHeaderRecords records = VariantHeaderRecords.__new__(VariantHeaderRecords)
29046 * records.header = header
29047 * return records # <<<<<<<<<<<<<<
29048 *
29049 *
29050 */
29051 __Pyx_XDECREF((PyObject *)__pyx_r);
29052 __Pyx_INCREF((PyObject *)__pyx_v_records);
29053 __pyx_r = __pyx_v_records;
29054 goto __pyx_L0;
29055
29056 /* "pysam/libcbcf.pyx":1461
29057 *
29058 *
29059 * cdef VariantHeaderRecords makeVariantHeaderRecords(VariantHeader header): # <<<<<<<<<<<<<<
29060 * if not header:
29061 * raise ValueError('invalid VariantHeader')
29062 */
29063
29064 /* function exit code */
29065 __pyx_L1_error:;
29066 __Pyx_XDECREF(__pyx_t_3);
29067 __Pyx_AddTraceback("pysam.libcbcf.makeVariantHeaderRecords", __pyx_clineno, __pyx_lineno, __pyx_filename);
29068 __pyx_r = 0;
29069 __pyx_L0:;
29070 __Pyx_XDECREF((PyObject *)__pyx_v_records);
29071 __Pyx_XGIVEREF((PyObject *)__pyx_r);
29072 __Pyx_TraceReturn(__pyx_r, 0);
29073 __Pyx_RefNannyFinishContext();
29074 return __pyx_r;
29075 }
29076
29077 /* "pysam/libcbcf.pyx":1472
29078 * cdef class VariantMetadata(object):
29079 * """filter, info or format metadata record from a :class:`VariantHeader` object"""
29080 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
29081 * raise TypeError('this class cannot be instantiated from Python')
29082 *
29083 */
29084
29085 /* Python wrapper */
29086 static int __pyx_pw_5pysam_7libcbcf_15VariantMetadata_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29087 static int __pyx_pw_5pysam_7libcbcf_15VariantMetadata_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29088 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
29089 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
29090 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
29091 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29092 int __pyx_r;
29093 __Pyx_RefNannyDeclarations
29094 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
29095 #if CYTHON_ASSUME_SAFE_MACROS
29096 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
29097 #else
29098 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
29099 #endif
29100 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
29101 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
29102 __Pyx_INCREF(__pyx_args);
29103 __pyx_v_args = __pyx_args;
29104 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
29105
29106 /* function exit code */
29107 __Pyx_DECREF(__pyx_v_args);
29108 __Pyx_XDECREF(__pyx_v_kwargs);
29109 __Pyx_RefNannyFinishContext();
29110 return __pyx_r;
29111 }
29112
29113 static int __pyx_pf_5pysam_7libcbcf_15VariantMetadata___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
29114 int __pyx_r;
29115 __Pyx_TraceDeclarations
29116 __Pyx_RefNannyDeclarations
29117 PyObject *__pyx_t_1 = NULL;
29118 int __pyx_lineno = 0;
29119 const char *__pyx_filename = NULL;
29120 int __pyx_clineno = 0;
29121 __Pyx_RefNannySetupContext("__init__", 1);
29122 __Pyx_TraceCall("__init__", __pyx_f[0], 1472, 0, __PYX_ERR(0, 1472, __pyx_L1_error));
29123
29124 /* "pysam/libcbcf.pyx":1473
29125 * """filter, info or format metadata record from a :class:`VariantHeader` object"""
29126 * def __init__(self, *args, **kwargs):
29127 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
29128 *
29129 * @property
29130 */
29131 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
29132 __Pyx_GOTREF(__pyx_t_1);
29133 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
29134 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29135 __PYX_ERR(0, 1473, __pyx_L1_error)
29136
29137 /* "pysam/libcbcf.pyx":1472
29138 * cdef class VariantMetadata(object):
29139 * """filter, info or format metadata record from a :class:`VariantHeader` object"""
29140 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
29141 * raise TypeError('this class cannot be instantiated from Python')
29142 *
29143 */
29144
29145 /* function exit code */
29146 __pyx_L1_error:;
29147 __Pyx_XDECREF(__pyx_t_1);
29148 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29149 __pyx_r = -1;
29150 __Pyx_TraceReturn(Py_None, 0);
29151 __Pyx_RefNannyFinishContext();
29152 return __pyx_r;
29153 }
29154
29155 /* "pysam/libcbcf.pyx":1475
29156 * raise TypeError('this class cannot be instantiated from Python')
29157 *
29158 * @property # <<<<<<<<<<<<<<
29159 * def name(self):
29160 * """metadata name"""
29161 */
29162
29163 /* Python wrapper */
29164 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
29165 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_4name_1__get__(PyObject *__pyx_v_self) {
29166 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29167 PyObject *__pyx_r = 0;
29168 __Pyx_RefNannyDeclarations
29169 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29170 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
29171 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_4name___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
29172
29173 /* function exit code */
29174 __Pyx_RefNannyFinishContext();
29175 return __pyx_r;
29176 }
29177
29178 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_4name___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
29179 bcf_hdr_t *__pyx_v_hdr;
29180 PyObject *__pyx_r = NULL;
29181 __Pyx_TraceDeclarations
29182 __Pyx_RefNannyDeclarations
29183 bcf_hdr_t *__pyx_t_1;
29184 PyObject *__pyx_t_2 = NULL;
29185 int __pyx_lineno = 0;
29186 const char *__pyx_filename = NULL;
29187 int __pyx_clineno = 0;
29188 __Pyx_RefNannySetupContext("__get__", 1);
29189 __Pyx_TraceCall("__get__", __pyx_f[0], 1475, 0, __PYX_ERR(0, 1475, __pyx_L1_error));
29190
29191 /* "pysam/libcbcf.pyx":1478
29192 * def name(self):
29193 * """metadata name"""
29194 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
29195 * return bcf_str_cache_get_charptr(hdr.id[BCF_DT_ID][self.id].key)
29196 *
29197 */
29198 __pyx_t_1 = __pyx_v_self->header->ptr;
29199 __pyx_v_hdr = __pyx_t_1;
29200
29201 /* "pysam/libcbcf.pyx":1479
29202 * """metadata name"""
29203 * cdef bcf_hdr_t *hdr = self.header.ptr
29204 * return bcf_str_cache_get_charptr(hdr.id[BCF_DT_ID][self.id].key) # <<<<<<<<<<<<<<
29205 *
29206 * # Q: Should this be exposed?
29207 */
29208 __Pyx_XDECREF(__pyx_r);
29209 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(((__pyx_v_hdr->id[BCF_DT_ID])[__pyx_v_self->id]).key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1479, __pyx_L1_error)
29210 __Pyx_GOTREF(__pyx_t_2);
29211 __pyx_r = __pyx_t_2;
29212 __pyx_t_2 = 0;
29213 goto __pyx_L0;
29214
29215 /* "pysam/libcbcf.pyx":1475
29216 * raise TypeError('this class cannot be instantiated from Python')
29217 *
29218 * @property # <<<<<<<<<<<<<<
29219 * def name(self):
29220 * """metadata name"""
29221 */
29222
29223 /* function exit code */
29224 __pyx_L1_error:;
29225 __Pyx_XDECREF(__pyx_t_2);
29226 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29227 __pyx_r = NULL;
29228 __pyx_L0:;
29229 __Pyx_XGIVEREF(__pyx_r);
29230 __Pyx_TraceReturn(__pyx_r, 0);
29231 __Pyx_RefNannyFinishContext();
29232 return __pyx_r;
29233 }
29234
29235 /* "pysam/libcbcf.pyx":1482
29236 *
29237 * # Q: Should this be exposed?
29238 * @property # <<<<<<<<<<<<<<
29239 * def id(self):
29240 * """metadata internal header id number"""
29241 */
29242
29243 /* Python wrapper */
29244 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
29245 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_2id_1__get__(PyObject *__pyx_v_self) {
29246 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29247 PyObject *__pyx_r = 0;
29248 __Pyx_RefNannyDeclarations
29249 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29250 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
29251 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_2id___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
29252
29253 /* function exit code */
29254 __Pyx_RefNannyFinishContext();
29255 return __pyx_r;
29256 }
29257
29258 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_2id___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
29259 PyObject *__pyx_r = NULL;
29260 __Pyx_TraceDeclarations
29261 __Pyx_RefNannyDeclarations
29262 PyObject *__pyx_t_1 = NULL;
29263 int __pyx_lineno = 0;
29264 const char *__pyx_filename = NULL;
29265 int __pyx_clineno = 0;
29266 __Pyx_RefNannySetupContext("__get__", 1);
29267 __Pyx_TraceCall("__get__", __pyx_f[0], 1482, 0, __PYX_ERR(0, 1482, __pyx_L1_error));
29268
29269 /* "pysam/libcbcf.pyx":1485
29270 * def id(self):
29271 * """metadata internal header id number"""
29272 * return self.id # <<<<<<<<<<<<<<
29273 *
29274 * @property
29275 */
29276 __Pyx_XDECREF(__pyx_r);
29277 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error)
29278 __Pyx_GOTREF(__pyx_t_1);
29279 __pyx_r = __pyx_t_1;
29280 __pyx_t_1 = 0;
29281 goto __pyx_L0;
29282
29283 /* "pysam/libcbcf.pyx":1482
29284 *
29285 * # Q: Should this be exposed?
29286 * @property # <<<<<<<<<<<<<<
29287 * def id(self):
29288 * """metadata internal header id number"""
29289 */
29290
29291 /* function exit code */
29292 __pyx_L1_error:;
29293 __Pyx_XDECREF(__pyx_t_1);
29294 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29295 __pyx_r = NULL;
29296 __pyx_L0:;
29297 __Pyx_XGIVEREF(__pyx_r);
29298 __Pyx_TraceReturn(__pyx_r, 0);
29299 __Pyx_RefNannyFinishContext();
29300 return __pyx_r;
29301 }
29302
29303 /* "pysam/libcbcf.pyx":1487
29304 * return self.id
29305 *
29306 * @property # <<<<<<<<<<<<<<
29307 * def number(self):
29308 * """metadata number (i.e. cardinality)"""
29309 */
29310
29311 /* Python wrapper */
29312 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_6number_1__get__(PyObject *__pyx_v_self); /*proto*/
29313 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_6number_1__get__(PyObject *__pyx_v_self) {
29314 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29315 PyObject *__pyx_r = 0;
29316 __Pyx_RefNannyDeclarations
29317 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29318 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
29319 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_6number___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
29320
29321 /* function exit code */
29322 __Pyx_RefNannyFinishContext();
29323 return __pyx_r;
29324 }
29325
29326 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_6number___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
29327 bcf_hdr_t *__pyx_v_hdr;
29328 int __pyx_v_l;
29329 PyObject *__pyx_r = NULL;
29330 __Pyx_TraceDeclarations
29331 __Pyx_RefNannyDeclarations
29332 bcf_hdr_t *__pyx_t_1;
29333 int __pyx_t_2;
29334 int __pyx_t_3;
29335 PyObject *__pyx_t_4 = NULL;
29336 int __pyx_lineno = 0;
29337 const char *__pyx_filename = NULL;
29338 int __pyx_clineno = 0;
29339 __Pyx_RefNannySetupContext("__get__", 1);
29340 __Pyx_TraceCall("__get__", __pyx_f[0], 1487, 0, __PYX_ERR(0, 1487, __pyx_L1_error));
29341
29342 /* "pysam/libcbcf.pyx":1490
29343 * def number(self):
29344 * """metadata number (i.e. cardinality)"""
29345 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
29346 *
29347 * if not check_header_id(hdr, self.type, self.id):
29348 */
29349 __pyx_t_1 = __pyx_v_self->header->ptr;
29350 __pyx_v_hdr = __pyx_t_1;
29351
29352 /* "pysam/libcbcf.pyx":1492
29353 * cdef bcf_hdr_t *hdr = self.header.ptr
29354 *
29355 * if not check_header_id(hdr, self.type, self.id): # <<<<<<<<<<<<<<
29356 * raise ValueError('Invalid header id')
29357 *
29358 */
29359 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, __pyx_v_self->type, __pyx_v_self->id); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1492, __pyx_L1_error)
29360 __pyx_t_3 = (!__pyx_t_2);
29361 if (unlikely(__pyx_t_3)) {
29362
29363 /* "pysam/libcbcf.pyx":1493
29364 *
29365 * if not check_header_id(hdr, self.type, self.id):
29366 * raise ValueError('Invalid header id') # <<<<<<<<<<<<<<
29367 *
29368 * if self.type == BCF_HL_FLT:
29369 */
29370 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1493, __pyx_L1_error)
29371 __Pyx_GOTREF(__pyx_t_4);
29372 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
29373 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29374 __PYX_ERR(0, 1493, __pyx_L1_error)
29375
29376 /* "pysam/libcbcf.pyx":1492
29377 * cdef bcf_hdr_t *hdr = self.header.ptr
29378 *
29379 * if not check_header_id(hdr, self.type, self.id): # <<<<<<<<<<<<<<
29380 * raise ValueError('Invalid header id')
29381 *
29382 */
29383 }
29384
29385 /* "pysam/libcbcf.pyx":1495
29386 * raise ValueError('Invalid header id')
29387 *
29388 * if self.type == BCF_HL_FLT: # <<<<<<<<<<<<<<
29389 * return None
29390 *
29391 */
29392 __pyx_t_3 = (__pyx_v_self->type == BCF_HL_FLT);
29393 if (__pyx_t_3) {
29394
29395 /* "pysam/libcbcf.pyx":1496
29396 *
29397 * if self.type == BCF_HL_FLT:
29398 * return None # <<<<<<<<<<<<<<
29399 *
29400 * cdef int l = bcf_hdr_id2length(hdr, self.type, self.id)
29401 */
29402 __Pyx_XDECREF(__pyx_r);
29403 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29404 goto __pyx_L0;
29405
29406 /* "pysam/libcbcf.pyx":1495
29407 * raise ValueError('Invalid header id')
29408 *
29409 * if self.type == BCF_HL_FLT: # <<<<<<<<<<<<<<
29410 * return None
29411 *
29412 */
29413 }
29414
29415 /* "pysam/libcbcf.pyx":1498
29416 * return None
29417 *
29418 * cdef int l = bcf_hdr_id2length(hdr, self.type, self.id) # <<<<<<<<<<<<<<
29419 * if l == BCF_VL_FIXED:
29420 * return bcf_hdr_id2number(hdr, self.type, self.id)
29421 */
29422 __pyx_v_l = bcf_hdr_id2length(__pyx_v_hdr, __pyx_v_self->type, __pyx_v_self->id);
29423
29424 /* "pysam/libcbcf.pyx":1499
29425 *
29426 * cdef int l = bcf_hdr_id2length(hdr, self.type, self.id)
29427 * if l == BCF_VL_FIXED: # <<<<<<<<<<<<<<
29428 * return bcf_hdr_id2number(hdr, self.type, self.id)
29429 * elif l == BCF_VL_VAR:
29430 */
29431 __pyx_t_3 = (__pyx_v_l == BCF_VL_FIXED);
29432 if (__pyx_t_3) {
29433
29434 /* "pysam/libcbcf.pyx":1500
29435 * cdef int l = bcf_hdr_id2length(hdr, self.type, self.id)
29436 * if l == BCF_VL_FIXED:
29437 * return bcf_hdr_id2number(hdr, self.type, self.id) # <<<<<<<<<<<<<<
29438 * elif l == BCF_VL_VAR:
29439 * return '.'
29440 */
29441 __Pyx_XDECREF(__pyx_r);
29442 __pyx_t_4 = __Pyx_PyInt_From_int(bcf_hdr_id2number(__pyx_v_hdr, __pyx_v_self->type, __pyx_v_self->id)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1500, __pyx_L1_error)
29443 __Pyx_GOTREF(__pyx_t_4);
29444 __pyx_r = __pyx_t_4;
29445 __pyx_t_4 = 0;
29446 goto __pyx_L0;
29447
29448 /* "pysam/libcbcf.pyx":1499
29449 *
29450 * cdef int l = bcf_hdr_id2length(hdr, self.type, self.id)
29451 * if l == BCF_VL_FIXED: # <<<<<<<<<<<<<<
29452 * return bcf_hdr_id2number(hdr, self.type, self.id)
29453 * elif l == BCF_VL_VAR:
29454 */
29455 }
29456
29457 /* "pysam/libcbcf.pyx":1501
29458 * if l == BCF_VL_FIXED:
29459 * return bcf_hdr_id2number(hdr, self.type, self.id)
29460 * elif l == BCF_VL_VAR: # <<<<<<<<<<<<<<
29461 * return '.'
29462 * else:
29463 */
29464 __pyx_t_3 = (__pyx_v_l == BCF_VL_VAR);
29465 if (__pyx_t_3) {
29466
29467 /* "pysam/libcbcf.pyx":1502
29468 * return bcf_hdr_id2number(hdr, self.type, self.id)
29469 * elif l == BCF_VL_VAR:
29470 * return '.' # <<<<<<<<<<<<<<
29471 * else:
29472 * return METADATA_LENGTHS[l]
29473 */
29474 __Pyx_XDECREF(__pyx_r);
29475 __Pyx_INCREF(__pyx_kp_u__52);
29476 __pyx_r = __pyx_kp_u__52;
29477 goto __pyx_L0;
29478
29479 /* "pysam/libcbcf.pyx":1501
29480 * if l == BCF_VL_FIXED:
29481 * return bcf_hdr_id2number(hdr, self.type, self.id)
29482 * elif l == BCF_VL_VAR: # <<<<<<<<<<<<<<
29483 * return '.'
29484 * else:
29485 */
29486 }
29487
29488 /* "pysam/libcbcf.pyx":1504
29489 * return '.'
29490 * else:
29491 * return METADATA_LENGTHS[l] # <<<<<<<<<<<<<<
29492 *
29493 * @property
29494 */
29495 /*else*/ {
29496 __Pyx_XDECREF(__pyx_r);
29497 if (unlikely(__pyx_v_5pysam_7libcbcf_METADATA_LENGTHS == Py_None)) {
29498 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
29499 __PYX_ERR(0, 1504, __pyx_L1_error)
29500 }
29501 __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_5pysam_7libcbcf_METADATA_LENGTHS, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1504, __pyx_L1_error)
29502 __Pyx_GOTREF(__pyx_t_4);
29503 __pyx_r = __pyx_t_4;
29504 __pyx_t_4 = 0;
29505 goto __pyx_L0;
29506 }
29507
29508 /* "pysam/libcbcf.pyx":1487
29509 * return self.id
29510 *
29511 * @property # <<<<<<<<<<<<<<
29512 * def number(self):
29513 * """metadata number (i.e. cardinality)"""
29514 */
29515
29516 /* function exit code */
29517 __pyx_L1_error:;
29518 __Pyx_XDECREF(__pyx_t_4);
29519 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.number.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29520 __pyx_r = NULL;
29521 __pyx_L0:;
29522 __Pyx_XGIVEREF(__pyx_r);
29523 __Pyx_TraceReturn(__pyx_r, 0);
29524 __Pyx_RefNannyFinishContext();
29525 return __pyx_r;
29526 }
29527
29528 /* "pysam/libcbcf.pyx":1506
29529 * return METADATA_LENGTHS[l]
29530 *
29531 * @property # <<<<<<<<<<<<<<
29532 * def type(self):
29533 * """metadata value type"""
29534 */
29535
29536 /* Python wrapper */
29537 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
29538 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_4type_1__get__(PyObject *__pyx_v_self) {
29539 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29540 PyObject *__pyx_r = 0;
29541 __Pyx_RefNannyDeclarations
29542 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29543 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
29544 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_4type___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
29545
29546 /* function exit code */
29547 __Pyx_RefNannyFinishContext();
29548 return __pyx_r;
29549 }
29550
29551 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_4type___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
29552 bcf_hdr_t *__pyx_v_hdr;
29553 PyObject *__pyx_r = NULL;
29554 __Pyx_TraceDeclarations
29555 __Pyx_RefNannyDeclarations
29556 bcf_hdr_t *__pyx_t_1;
29557 int __pyx_t_2;
29558 int __pyx_t_3;
29559 PyObject *__pyx_t_4 = NULL;
29560 int __pyx_t_5;
29561 int __pyx_lineno = 0;
29562 const char *__pyx_filename = NULL;
29563 int __pyx_clineno = 0;
29564 __Pyx_RefNannySetupContext("__get__", 1);
29565 __Pyx_TraceCall("__get__", __pyx_f[0], 1506, 0, __PYX_ERR(0, 1506, __pyx_L1_error));
29566
29567 /* "pysam/libcbcf.pyx":1509
29568 * def type(self):
29569 * """metadata value type"""
29570 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
29571 * if not check_header_id(hdr, self.type, self.id):
29572 * raise ValueError('Invalid header id')
29573 */
29574 __pyx_t_1 = __pyx_v_self->header->ptr;
29575 __pyx_v_hdr = __pyx_t_1;
29576
29577 /* "pysam/libcbcf.pyx":1510
29578 * """metadata value type"""
29579 * cdef bcf_hdr_t *hdr = self.header.ptr
29580 * if not check_header_id(hdr, self.type, self.id): # <<<<<<<<<<<<<<
29581 * raise ValueError('Invalid header id')
29582 *
29583 */
29584 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, __pyx_v_self->type, __pyx_v_self->id); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L1_error)
29585 __pyx_t_3 = (!__pyx_t_2);
29586 if (unlikely(__pyx_t_3)) {
29587
29588 /* "pysam/libcbcf.pyx":1511
29589 * cdef bcf_hdr_t *hdr = self.header.ptr
29590 * if not check_header_id(hdr, self.type, self.id):
29591 * raise ValueError('Invalid header id') # <<<<<<<<<<<<<<
29592 *
29593 * if self.type == BCF_HL_FLT:
29594 */
29595 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1511, __pyx_L1_error)
29596 __Pyx_GOTREF(__pyx_t_4);
29597 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
29598 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29599 __PYX_ERR(0, 1511, __pyx_L1_error)
29600
29601 /* "pysam/libcbcf.pyx":1510
29602 * """metadata value type"""
29603 * cdef bcf_hdr_t *hdr = self.header.ptr
29604 * if not check_header_id(hdr, self.type, self.id): # <<<<<<<<<<<<<<
29605 * raise ValueError('Invalid header id')
29606 *
29607 */
29608 }
29609
29610 /* "pysam/libcbcf.pyx":1513
29611 * raise ValueError('Invalid header id')
29612 *
29613 * if self.type == BCF_HL_FLT: # <<<<<<<<<<<<<<
29614 * return None
29615 * return VALUE_TYPES[bcf_hdr_id2type(hdr, self.type, self.id)]
29616 */
29617 __pyx_t_3 = (__pyx_v_self->type == BCF_HL_FLT);
29618 if (__pyx_t_3) {
29619
29620 /* "pysam/libcbcf.pyx":1514
29621 *
29622 * if self.type == BCF_HL_FLT:
29623 * return None # <<<<<<<<<<<<<<
29624 * return VALUE_TYPES[bcf_hdr_id2type(hdr, self.type, self.id)]
29625 *
29626 */
29627 __Pyx_XDECREF(__pyx_r);
29628 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29629 goto __pyx_L0;
29630
29631 /* "pysam/libcbcf.pyx":1513
29632 * raise ValueError('Invalid header id')
29633 *
29634 * if self.type == BCF_HL_FLT: # <<<<<<<<<<<<<<
29635 * return None
29636 * return VALUE_TYPES[bcf_hdr_id2type(hdr, self.type, self.id)]
29637 */
29638 }
29639
29640 /* "pysam/libcbcf.pyx":1515
29641 * if self.type == BCF_HL_FLT:
29642 * return None
29643 * return VALUE_TYPES[bcf_hdr_id2type(hdr, self.type, self.id)] # <<<<<<<<<<<<<<
29644 *
29645 * @property
29646 */
29647 __Pyx_XDECREF(__pyx_r);
29648 if (unlikely(__pyx_v_5pysam_7libcbcf_VALUE_TYPES == Py_None)) {
29649 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
29650 __PYX_ERR(0, 1515, __pyx_L1_error)
29651 }
29652 __pyx_t_5 = bcf_hdr_id2type(__pyx_v_hdr, __pyx_v_self->type, __pyx_v_self->id);
29653 __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_5pysam_7libcbcf_VALUE_TYPES, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error)
29654 __Pyx_GOTREF(__pyx_t_4);
29655 __pyx_r = __pyx_t_4;
29656 __pyx_t_4 = 0;
29657 goto __pyx_L0;
29658
29659 /* "pysam/libcbcf.pyx":1506
29660 * return METADATA_LENGTHS[l]
29661 *
29662 * @property # <<<<<<<<<<<<<<
29663 * def type(self):
29664 * """metadata value type"""
29665 */
29666
29667 /* function exit code */
29668 __pyx_L1_error:;
29669 __Pyx_XDECREF(__pyx_t_4);
29670 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29671 __pyx_r = NULL;
29672 __pyx_L0:;
29673 __Pyx_XGIVEREF(__pyx_r);
29674 __Pyx_TraceReturn(__pyx_r, 0);
29675 __Pyx_RefNannyFinishContext();
29676 return __pyx_r;
29677 }
29678
29679 /* "pysam/libcbcf.pyx":1517
29680 * return VALUE_TYPES[bcf_hdr_id2type(hdr, self.type, self.id)]
29681 *
29682 * @property # <<<<<<<<<<<<<<
29683 * def description(self):
29684 * """metadata description (or None if not set)"""
29685 */
29686
29687 /* Python wrapper */
29688 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_11description_1__get__(PyObject *__pyx_v_self); /*proto*/
29689 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_11description_1__get__(PyObject *__pyx_v_self) {
29690 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29691 PyObject *__pyx_r = 0;
29692 __Pyx_RefNannyDeclarations
29693 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29694 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
29695 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_11description___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
29696
29697 /* function exit code */
29698 __Pyx_RefNannyFinishContext();
29699 return __pyx_r;
29700 }
29701
29702 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_11description___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
29703 PyObject *__pyx_v_descr = NULL;
29704 PyObject *__pyx_r = NULL;
29705 __Pyx_TraceDeclarations
29706 __Pyx_RefNannyDeclarations
29707 PyObject *__pyx_t_1 = NULL;
29708 PyObject *__pyx_t_2 = NULL;
29709 PyObject *__pyx_t_3 = NULL;
29710 unsigned int __pyx_t_4;
29711 int __pyx_t_5;
29712 int __pyx_lineno = 0;
29713 const char *__pyx_filename = NULL;
29714 int __pyx_clineno = 0;
29715 __Pyx_RefNannySetupContext("__get__", 1);
29716 __Pyx_TraceCall("__get__", __pyx_f[0], 1517, 0, __PYX_ERR(0, 1517, __pyx_L1_error));
29717
29718 /* "pysam/libcbcf.pyx":1520
29719 * def description(self):
29720 * """metadata description (or None if not set)"""
29721 * descr = self.record.get('Description') # <<<<<<<<<<<<<<
29722 * if descr:
29723 * descr = descr.strip('"')
29724 */
29725 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_record); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error)
29726 __Pyx_GOTREF(__pyx_t_2);
29727 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error)
29728 __Pyx_GOTREF(__pyx_t_3);
29729 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29730 __pyx_t_2 = NULL;
29731 __pyx_t_4 = 0;
29732 #if CYTHON_UNPACK_METHODS
29733 if (likely(PyMethod_Check(__pyx_t_3))) {
29734 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
29735 if (likely(__pyx_t_2)) {
29736 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
29737 __Pyx_INCREF(__pyx_t_2);
29738 __Pyx_INCREF(function);
29739 __Pyx_DECREF_SET(__pyx_t_3, function);
29740 __pyx_t_4 = 1;
29741 }
29742 }
29743 #endif
29744 {
29745 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_u_Description};
29746 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
29747 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
29748 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
29749 __Pyx_GOTREF(__pyx_t_1);
29750 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29751 }
29752 __pyx_v_descr = __pyx_t_1;
29753 __pyx_t_1 = 0;
29754
29755 /* "pysam/libcbcf.pyx":1521
29756 * """metadata description (or None if not set)"""
29757 * descr = self.record.get('Description')
29758 * if descr: # <<<<<<<<<<<<<<
29759 * descr = descr.strip('"')
29760 * return force_str(descr)
29761 */
29762 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_descr); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1521, __pyx_L1_error)
29763 if (__pyx_t_5) {
29764
29765 /* "pysam/libcbcf.pyx":1522
29766 * descr = self.record.get('Description')
29767 * if descr:
29768 * descr = descr.strip('"') # <<<<<<<<<<<<<<
29769 * return force_str(descr)
29770 *
29771 */
29772 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_descr, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error)
29773 __Pyx_GOTREF(__pyx_t_3);
29774 __pyx_t_2 = NULL;
29775 __pyx_t_4 = 0;
29776 #if CYTHON_UNPACK_METHODS
29777 if (likely(PyMethod_Check(__pyx_t_3))) {
29778 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
29779 if (likely(__pyx_t_2)) {
29780 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
29781 __Pyx_INCREF(__pyx_t_2);
29782 __Pyx_INCREF(function);
29783 __Pyx_DECREF_SET(__pyx_t_3, function);
29784 __pyx_t_4 = 1;
29785 }
29786 }
29787 #endif
29788 {
29789 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u__53};
29790 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
29791 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
29792 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error)
29793 __Pyx_GOTREF(__pyx_t_1);
29794 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29795 }
29796 __Pyx_DECREF_SET(__pyx_v_descr, __pyx_t_1);
29797 __pyx_t_1 = 0;
29798
29799 /* "pysam/libcbcf.pyx":1521
29800 * """metadata description (or None if not set)"""
29801 * descr = self.record.get('Description')
29802 * if descr: # <<<<<<<<<<<<<<
29803 * descr = descr.strip('"')
29804 * return force_str(descr)
29805 */
29806 }
29807
29808 /* "pysam/libcbcf.pyx":1523
29809 * if descr:
29810 * descr = descr.strip('"')
29811 * return force_str(descr) # <<<<<<<<<<<<<<
29812 *
29813 * @property
29814 */
29815 __Pyx_XDECREF(__pyx_r);
29816 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_str(__pyx_v_descr, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error)
29817 __Pyx_GOTREF(__pyx_t_1);
29818 __pyx_r = __pyx_t_1;
29819 __pyx_t_1 = 0;
29820 goto __pyx_L0;
29821
29822 /* "pysam/libcbcf.pyx":1517
29823 * return VALUE_TYPES[bcf_hdr_id2type(hdr, self.type, self.id)]
29824 *
29825 * @property # <<<<<<<<<<<<<<
29826 * def description(self):
29827 * """metadata description (or None if not set)"""
29828 */
29829
29830 /* function exit code */
29831 __pyx_L1_error:;
29832 __Pyx_XDECREF(__pyx_t_1);
29833 __Pyx_XDECREF(__pyx_t_2);
29834 __Pyx_XDECREF(__pyx_t_3);
29835 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.description.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29836 __pyx_r = NULL;
29837 __pyx_L0:;
29838 __Pyx_XDECREF(__pyx_v_descr);
29839 __Pyx_XGIVEREF(__pyx_r);
29840 __Pyx_TraceReturn(__pyx_r, 0);
29841 __Pyx_RefNannyFinishContext();
29842 return __pyx_r;
29843 }
29844
29845 /* "pysam/libcbcf.pyx":1525
29846 * return force_str(descr)
29847 *
29848 * @property # <<<<<<<<<<<<<<
29849 * def record(self):
29850 * """:class:`VariantHeaderRecord` associated with this :class:`VariantMetadata` object"""
29851 */
29852
29853 /* Python wrapper */
29854 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_6record_1__get__(PyObject *__pyx_v_self); /*proto*/
29855 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_6record_1__get__(PyObject *__pyx_v_self) {
29856 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29857 PyObject *__pyx_r = 0;
29858 __Pyx_RefNannyDeclarations
29859 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29860 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
29861 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_6record___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
29862
29863 /* function exit code */
29864 __Pyx_RefNannyFinishContext();
29865 return __pyx_r;
29866 }
29867
29868 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_6record___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
29869 bcf_hdr_t *__pyx_v_hdr;
29870 bcf_hrec_t *__pyx_v_hrec;
29871 PyObject *__pyx_r = NULL;
29872 __Pyx_TraceDeclarations
29873 __Pyx_RefNannyDeclarations
29874 bcf_hdr_t *__pyx_t_1;
29875 int __pyx_t_2;
29876 int __pyx_t_3;
29877 PyObject *__pyx_t_4 = NULL;
29878 PyObject *__pyx_t_5 = NULL;
29879 int __pyx_lineno = 0;
29880 const char *__pyx_filename = NULL;
29881 int __pyx_clineno = 0;
29882 __Pyx_RefNannySetupContext("__get__", 1);
29883 __Pyx_TraceCall("__get__", __pyx_f[0], 1525, 0, __PYX_ERR(0, 1525, __pyx_L1_error));
29884
29885 /* "pysam/libcbcf.pyx":1528
29886 * def record(self):
29887 * """:class:`VariantHeaderRecord` associated with this :class:`VariantMetadata` object"""
29888 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
29889 * if not check_header_id(hdr, self.type, self.id):
29890 * raise ValueError('Invalid header id')
29891 */
29892 __pyx_t_1 = __pyx_v_self->header->ptr;
29893 __pyx_v_hdr = __pyx_t_1;
29894
29895 /* "pysam/libcbcf.pyx":1529
29896 * """:class:`VariantHeaderRecord` associated with this :class:`VariantMetadata` object"""
29897 * cdef bcf_hdr_t *hdr = self.header.ptr
29898 * if not check_header_id(hdr, self.type, self.id): # <<<<<<<<<<<<<<
29899 * raise ValueError('Invalid header id')
29900 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_ID][self.id].val.hrec[self.type]
29901 */
29902 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, __pyx_v_self->type, __pyx_v_self->id); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1529, __pyx_L1_error)
29903 __pyx_t_3 = (!__pyx_t_2);
29904 if (unlikely(__pyx_t_3)) {
29905
29906 /* "pysam/libcbcf.pyx":1530
29907 * cdef bcf_hdr_t *hdr = self.header.ptr
29908 * if not check_header_id(hdr, self.type, self.id):
29909 * raise ValueError('Invalid header id') # <<<<<<<<<<<<<<
29910 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_ID][self.id].val.hrec[self.type]
29911 * if not hrec:
29912 */
29913 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error)
29914 __Pyx_GOTREF(__pyx_t_4);
29915 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
29916 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29917 __PYX_ERR(0, 1530, __pyx_L1_error)
29918
29919 /* "pysam/libcbcf.pyx":1529
29920 * """:class:`VariantHeaderRecord` associated with this :class:`VariantMetadata` object"""
29921 * cdef bcf_hdr_t *hdr = self.header.ptr
29922 * if not check_header_id(hdr, self.type, self.id): # <<<<<<<<<<<<<<
29923 * raise ValueError('Invalid header id')
29924 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_ID][self.id].val.hrec[self.type]
29925 */
29926 }
29927
29928 /* "pysam/libcbcf.pyx":1531
29929 * if not check_header_id(hdr, self.type, self.id):
29930 * raise ValueError('Invalid header id')
29931 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_ID][self.id].val.hrec[self.type] # <<<<<<<<<<<<<<
29932 * if not hrec:
29933 * return None
29934 */
29935 __pyx_v_hrec = (((__pyx_v_hdr->id[BCF_DT_ID])[__pyx_v_self->id]).val->hrec[__pyx_v_self->type]);
29936
29937 /* "pysam/libcbcf.pyx":1532
29938 * raise ValueError('Invalid header id')
29939 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_ID][self.id].val.hrec[self.type]
29940 * if not hrec: # <<<<<<<<<<<<<<
29941 * return None
29942 * return makeVariantHeaderRecord(self.header, hrec)
29943 */
29944 __pyx_t_3 = (!(__pyx_v_hrec != 0));
29945 if (__pyx_t_3) {
29946
29947 /* "pysam/libcbcf.pyx":1533
29948 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_ID][self.id].val.hrec[self.type]
29949 * if not hrec:
29950 * return None # <<<<<<<<<<<<<<
29951 * return makeVariantHeaderRecord(self.header, hrec)
29952 *
29953 */
29954 __Pyx_XDECREF(__pyx_r);
29955 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29956 goto __pyx_L0;
29957
29958 /* "pysam/libcbcf.pyx":1532
29959 * raise ValueError('Invalid header id')
29960 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_ID][self.id].val.hrec[self.type]
29961 * if not hrec: # <<<<<<<<<<<<<<
29962 * return None
29963 * return makeVariantHeaderRecord(self.header, hrec)
29964 */
29965 }
29966
29967 /* "pysam/libcbcf.pyx":1534
29968 * if not hrec:
29969 * return None
29970 * return makeVariantHeaderRecord(self.header, hrec) # <<<<<<<<<<<<<<
29971 *
29972 * def remove_header(self):
29973 */
29974 __Pyx_XDECREF(__pyx_r);
29975 __pyx_t_4 = ((PyObject *)__pyx_v_self->header);
29976 __Pyx_INCREF(__pyx_t_4);
29977 __pyx_t_5 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecord(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_4), __pyx_v_hrec)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1534, __pyx_L1_error)
29978 __Pyx_GOTREF(__pyx_t_5);
29979 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29980 __pyx_r = __pyx_t_5;
29981 __pyx_t_5 = 0;
29982 goto __pyx_L0;
29983
29984 /* "pysam/libcbcf.pyx":1525
29985 * return force_str(descr)
29986 *
29987 * @property # <<<<<<<<<<<<<<
29988 * def record(self):
29989 * """:class:`VariantHeaderRecord` associated with this :class:`VariantMetadata` object"""
29990 */
29991
29992 /* function exit code */
29993 __pyx_L1_error:;
29994 __Pyx_XDECREF(__pyx_t_4);
29995 __Pyx_XDECREF(__pyx_t_5);
29996 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.record.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29997 __pyx_r = NULL;
29998 __pyx_L0:;
29999 __Pyx_XGIVEREF(__pyx_r);
30000 __Pyx_TraceReturn(__pyx_r, 0);
30001 __Pyx_RefNannyFinishContext();
30002 return __pyx_r;
30003 }
30004
30005 /* "pysam/libcbcf.pyx":1536
30006 * return makeVariantHeaderRecord(self.header, hrec)
30007 *
30008 * def remove_header(self): # <<<<<<<<<<<<<<
30009 * cdef bcf_hdr_t *hdr = self.header.ptr
30010 * cdef const char *key = hdr.id[BCF_DT_ID][self.id].key
30011 */
30012
30013 /* Python wrapper */
30014 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_3remove_header(PyObject *__pyx_v_self,
30015 #if CYTHON_METH_FASTCALL
30016 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
30017 #else
30018 PyObject *__pyx_args, PyObject *__pyx_kwds
30019 #endif
30020 ); /*proto*/
30021 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_15VariantMetadata_2remove_header, "VariantMetadata.remove_header(self)");
30022 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_15VariantMetadata_3remove_header = {"remove_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_15VariantMetadata_3remove_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_15VariantMetadata_2remove_header};
30023 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_3remove_header(PyObject *__pyx_v_self,
30024 #if CYTHON_METH_FASTCALL
30025 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
30026 #else
30027 PyObject *__pyx_args, PyObject *__pyx_kwds
30028 #endif
30029 ) {
30030 #if !CYTHON_METH_FASTCALL
30031 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
30032 #endif
30033 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
30034 PyObject *__pyx_r = 0;
30035 __Pyx_RefNannyDeclarations
30036 __Pyx_RefNannySetupContext("remove_header (wrapper)", 0);
30037 #if !CYTHON_METH_FASTCALL
30038 #if CYTHON_ASSUME_SAFE_MACROS
30039 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
30040 #else
30041 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
30042 #endif
30043 #endif
30044 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
30045 if (unlikely(__pyx_nargs > 0)) {
30046 __Pyx_RaiseArgtupleInvalid("remove_header", 1, 0, 0, __pyx_nargs); return NULL;}
30047 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "remove_header", 0))) return NULL;
30048 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_2remove_header(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
30049
30050 /* function exit code */
30051 __Pyx_RefNannyFinishContext();
30052 return __pyx_r;
30053 }
30054
30055 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_2remove_header(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
30056 bcf_hdr_t *__pyx_v_hdr;
30057 char const *__pyx_v_key;
30058 PyObject *__pyx_r = NULL;
30059 __Pyx_TraceDeclarations
30060 __Pyx_RefNannyDeclarations
30061 bcf_hdr_t *__pyx_t_1;
30062 char const *__pyx_t_2;
30063 int __pyx_lineno = 0;
30064 const char *__pyx_filename = NULL;
30065 int __pyx_clineno = 0;
30066 __Pyx_TraceFrameInit(__pyx_codeobj__54)
30067 __Pyx_RefNannySetupContext("remove_header", 1);
30068 __Pyx_TraceCall("remove_header", __pyx_f[0], 1536, 0, __PYX_ERR(0, 1536, __pyx_L1_error));
30069
30070 /* "pysam/libcbcf.pyx":1537
30071 *
30072 * def remove_header(self):
30073 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
30074 * cdef const char *key = hdr.id[BCF_DT_ID][self.id].key
30075 * bcf_hdr_remove(hdr, self.type, key)
30076 */
30077 __pyx_t_1 = __pyx_v_self->header->ptr;
30078 __pyx_v_hdr = __pyx_t_1;
30079
30080 /* "pysam/libcbcf.pyx":1538
30081 * def remove_header(self):
30082 * cdef bcf_hdr_t *hdr = self.header.ptr
30083 * cdef const char *key = hdr.id[BCF_DT_ID][self.id].key # <<<<<<<<<<<<<<
30084 * bcf_hdr_remove(hdr, self.type, key)
30085 *
30086 */
30087 __pyx_t_2 = ((__pyx_v_hdr->id[BCF_DT_ID])[__pyx_v_self->id]).key;
30088 __pyx_v_key = __pyx_t_2;
30089
30090 /* "pysam/libcbcf.pyx":1539
30091 * cdef bcf_hdr_t *hdr = self.header.ptr
30092 * cdef const char *key = hdr.id[BCF_DT_ID][self.id].key
30093 * bcf_hdr_remove(hdr, self.type, key) # <<<<<<<<<<<<<<
30094 *
30095 *
30096 */
30097 bcf_hdr_remove(__pyx_v_hdr, __pyx_v_self->type, __pyx_v_key);
30098
30099 /* "pysam/libcbcf.pyx":1536
30100 * return makeVariantHeaderRecord(self.header, hrec)
30101 *
30102 * def remove_header(self): # <<<<<<<<<<<<<<
30103 * cdef bcf_hdr_t *hdr = self.header.ptr
30104 * cdef const char *key = hdr.id[BCF_DT_ID][self.id].key
30105 */
30106
30107 /* function exit code */
30108 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30109 goto __pyx_L0;
30110 __pyx_L1_error:;
30111 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.remove_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
30112 __pyx_r = NULL;
30113 __pyx_L0:;
30114 __Pyx_XGIVEREF(__pyx_r);
30115 __Pyx_TraceReturn(__pyx_r, 0);
30116 __Pyx_RefNannyFinishContext();
30117 return __pyx_r;
30118 }
30119
30120 /* "pysam/libcbcf.pxd":70
30121 *
30122 * cdef class VariantMetadata(object):
30123 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
30124 * cdef int type
30125 * cdef int id
30126 */
30127
30128 /* Python wrapper */
30129 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
30130 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_6header_1__get__(PyObject *__pyx_v_self) {
30131 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
30132 PyObject *__pyx_r = 0;
30133 __Pyx_RefNannyDeclarations
30134 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30135 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
30136 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
30137
30138 /* function exit code */
30139 __Pyx_RefNannyFinishContext();
30140 return __pyx_r;
30141 }
30142
30143 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
30144 PyObject *__pyx_r = NULL;
30145 __Pyx_TraceDeclarations
30146 __Pyx_RefNannyDeclarations
30147 int __pyx_lineno = 0;
30148 const char *__pyx_filename = NULL;
30149 int __pyx_clineno = 0;
30150 __Pyx_RefNannySetupContext("__get__", 1);
30151 __Pyx_TraceCall("__get__", __pyx_f[3], 70, 0, __PYX_ERR(3, 70, __pyx_L1_error));
30152 __Pyx_XDECREF(__pyx_r);
30153 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
30154 __pyx_r = ((PyObject *)__pyx_v_self->header);
30155 goto __pyx_L0;
30156
30157 /* function exit code */
30158 __pyx_L1_error:;
30159 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30160 __pyx_r = NULL;
30161 __pyx_L0:;
30162 __Pyx_XGIVEREF(__pyx_r);
30163 __Pyx_TraceReturn(__pyx_r, 0);
30164 __Pyx_RefNannyFinishContext();
30165 return __pyx_r;
30166 }
30167
30168 /* "(tree fragment)":1
30169 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
30170 * cdef tuple state
30171 * cdef object _dict
30172 */
30173
30174 /* Python wrapper */
30175 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_5__reduce_cython__(PyObject *__pyx_v_self,
30176 #if CYTHON_METH_FASTCALL
30177 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
30178 #else
30179 PyObject *__pyx_args, PyObject *__pyx_kwds
30180 #endif
30181 ); /*proto*/
30182 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_15VariantMetadata_4__reduce_cython__, "VariantMetadata.__reduce_cython__(self)");
30183 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_15VariantMetadata_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_15VariantMetadata_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_15VariantMetadata_4__reduce_cython__};
30184 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_5__reduce_cython__(PyObject *__pyx_v_self,
30185 #if CYTHON_METH_FASTCALL
30186 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
30187 #else
30188 PyObject *__pyx_args, PyObject *__pyx_kwds
30189 #endif
30190 ) {
30191 #if !CYTHON_METH_FASTCALL
30192 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
30193 #endif
30194 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
30195 PyObject *__pyx_r = 0;
30196 __Pyx_RefNannyDeclarations
30197 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
30198 #if !CYTHON_METH_FASTCALL
30199 #if CYTHON_ASSUME_SAFE_MACROS
30200 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
30201 #else
30202 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
30203 #endif
30204 #endif
30205 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
30206 if (unlikely(__pyx_nargs > 0)) {
30207 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
30208 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
30209 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_4__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self));
30210
30211 /* function exit code */
30212 __Pyx_RefNannyFinishContext();
30213 return __pyx_r;
30214 }
30215
30216 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_4__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self) {
30217 PyObject *__pyx_v_state = 0;
30218 PyObject *__pyx_v__dict = 0;
30219 int __pyx_v_use_setstate;
30220 PyObject *__pyx_r = NULL;
30221 __Pyx_TraceDeclarations
30222 __Pyx_RefNannyDeclarations
30223 PyObject *__pyx_t_1 = NULL;
30224 PyObject *__pyx_t_2 = NULL;
30225 PyObject *__pyx_t_3 = NULL;
30226 int __pyx_t_4;
30227 int __pyx_lineno = 0;
30228 const char *__pyx_filename = NULL;
30229 int __pyx_clineno = 0;
30230 __Pyx_TraceFrameInit(__pyx_codeobj__55)
30231 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
30232 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
30233
30234 /* "(tree fragment)":5
30235 * cdef object _dict
30236 * cdef bint use_setstate
30237 * state = (self.header, self.id, self.type) # <<<<<<<<<<<<<<
30238 * _dict = getattr(self, '__dict__', None)
30239 * if _dict is not None:
30240 */
30241 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
30242 __Pyx_GOTREF(__pyx_t_1);
30243 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error)
30244 __Pyx_GOTREF(__pyx_t_2);
30245 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
30246 __Pyx_GOTREF(__pyx_t_3);
30247 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
30248 __Pyx_GIVEREF((PyObject *)__pyx_v_self->header);
30249 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->header))) __PYX_ERR(4, 5, __pyx_L1_error);
30250 __Pyx_GIVEREF(__pyx_t_1);
30251 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error);
30252 __Pyx_GIVEREF(__pyx_t_2);
30253 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error);
30254 __pyx_t_1 = 0;
30255 __pyx_t_2 = 0;
30256 __pyx_v_state = ((PyObject*)__pyx_t_3);
30257 __pyx_t_3 = 0;
30258
30259 /* "(tree fragment)":6
30260 * cdef bint use_setstate
30261 * state = (self.header, self.id, self.type)
30262 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
30263 * if _dict is not None:
30264 * state += (_dict,)
30265 */
30266 __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
30267 __Pyx_GOTREF(__pyx_t_3);
30268 __pyx_v__dict = __pyx_t_3;
30269 __pyx_t_3 = 0;
30270
30271 /* "(tree fragment)":7
30272 * state = (self.header, self.id, self.type)
30273 * _dict = getattr(self, '__dict__', None)
30274 * if _dict is not None: # <<<<<<<<<<<<<<
30275 * state += (_dict,)
30276 * use_setstate = True
30277 */
30278 __pyx_t_4 = (__pyx_v__dict != Py_None);
30279 if (__pyx_t_4) {
30280
30281 /* "(tree fragment)":8
30282 * _dict = getattr(self, '__dict__', None)
30283 * if _dict is not None:
30284 * state += (_dict,) # <<<<<<<<<<<<<<
30285 * use_setstate = True
30286 * else:
30287 */
30288 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
30289 __Pyx_GOTREF(__pyx_t_3);
30290 __Pyx_INCREF(__pyx_v__dict);
30291 __Pyx_GIVEREF(__pyx_v__dict);
30292 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
30293 __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 8, __pyx_L1_error)
30294 __Pyx_GOTREF(__pyx_t_2);
30295 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30296 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
30297 __pyx_t_2 = 0;
30298
30299 /* "(tree fragment)":9
30300 * if _dict is not None:
30301 * state += (_dict,)
30302 * use_setstate = True # <<<<<<<<<<<<<<
30303 * else:
30304 * use_setstate = self.header is not None
30305 */
30306 __pyx_v_use_setstate = 1;
30307
30308 /* "(tree fragment)":7
30309 * state = (self.header, self.id, self.type)
30310 * _dict = getattr(self, '__dict__', None)
30311 * if _dict is not None: # <<<<<<<<<<<<<<
30312 * state += (_dict,)
30313 * use_setstate = True
30314 */
30315 goto __pyx_L3;
30316 }
30317
30318 /* "(tree fragment)":11
30319 * use_setstate = True
30320 * else:
30321 * use_setstate = self.header is not None # <<<<<<<<<<<<<<
30322 * if use_setstate:
30323 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, None), state
30324 */
30325 /*else*/ {
30326 __pyx_t_4 = (((PyObject *)__pyx_v_self->header) != Py_None);
30327 __pyx_v_use_setstate = __pyx_t_4;
30328 }
30329 __pyx_L3:;
30330
30331 /* "(tree fragment)":12
30332 * else:
30333 * use_setstate = self.header is not None
30334 * if use_setstate: # <<<<<<<<<<<<<<
30335 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, None), state
30336 * else:
30337 */
30338 if (__pyx_v_use_setstate) {
30339
30340 /* "(tree fragment)":13
30341 * use_setstate = self.header is not None
30342 * if use_setstate:
30343 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, None), state # <<<<<<<<<<<<<<
30344 * else:
30345 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, state)
30346 */
30347 __Pyx_XDECREF(__pyx_r);
30348 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_VariantMetadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error)
30349 __Pyx_GOTREF(__pyx_t_2);
30350 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
30351 __Pyx_GOTREF(__pyx_t_3);
30352 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
30353 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
30354 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
30355 __Pyx_INCREF(__pyx_int_215036767);
30356 __Pyx_GIVEREF(__pyx_int_215036767);
30357 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_215036767)) __PYX_ERR(4, 13, __pyx_L1_error);
30358 __Pyx_INCREF(Py_None);
30359 __Pyx_GIVEREF(Py_None);
30360 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
30361 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
30362 __Pyx_GOTREF(__pyx_t_1);
30363 __Pyx_GIVEREF(__pyx_t_2);
30364 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error);
30365 __Pyx_GIVEREF(__pyx_t_3);
30366 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
30367 __Pyx_INCREF(__pyx_v_state);
30368 __Pyx_GIVEREF(__pyx_v_state);
30369 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
30370 __pyx_t_2 = 0;
30371 __pyx_t_3 = 0;
30372 __pyx_r = __pyx_t_1;
30373 __pyx_t_1 = 0;
30374 goto __pyx_L0;
30375
30376 /* "(tree fragment)":12
30377 * else:
30378 * use_setstate = self.header is not None
30379 * if use_setstate: # <<<<<<<<<<<<<<
30380 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, None), state
30381 * else:
30382 */
30383 }
30384
30385 /* "(tree fragment)":15
30386 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, None), state
30387 * else:
30388 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, state) # <<<<<<<<<<<<<<
30389 * def __setstate_cython__(self, __pyx_state):
30390 * __pyx_unpickle_VariantMetadata__set_state(self, __pyx_state)
30391 */
30392 /*else*/ {
30393 __Pyx_XDECREF(__pyx_r);
30394 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_VariantMetadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
30395 __Pyx_GOTREF(__pyx_t_1);
30396 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
30397 __Pyx_GOTREF(__pyx_t_3);
30398 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
30399 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
30400 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
30401 __Pyx_INCREF(__pyx_int_215036767);
30402 __Pyx_GIVEREF(__pyx_int_215036767);
30403 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_215036767)) __PYX_ERR(4, 15, __pyx_L1_error);
30404 __Pyx_INCREF(__pyx_v_state);
30405 __Pyx_GIVEREF(__pyx_v_state);
30406 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
30407 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error)
30408 __Pyx_GOTREF(__pyx_t_2);
30409 __Pyx_GIVEREF(__pyx_t_1);
30410 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
30411 __Pyx_GIVEREF(__pyx_t_3);
30412 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error);
30413 __pyx_t_1 = 0;
30414 __pyx_t_3 = 0;
30415 __pyx_r = __pyx_t_2;
30416 __pyx_t_2 = 0;
30417 goto __pyx_L0;
30418 }
30419
30420 /* "(tree fragment)":1
30421 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
30422 * cdef tuple state
30423 * cdef object _dict
30424 */
30425
30426 /* function exit code */
30427 __pyx_L1_error:;
30428 __Pyx_XDECREF(__pyx_t_1);
30429 __Pyx_XDECREF(__pyx_t_2);
30430 __Pyx_XDECREF(__pyx_t_3);
30431 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30432 __pyx_r = NULL;
30433 __pyx_L0:;
30434 __Pyx_XDECREF(__pyx_v_state);
30435 __Pyx_XDECREF(__pyx_v__dict);
30436 __Pyx_XGIVEREF(__pyx_r);
30437 __Pyx_TraceReturn(__pyx_r, 0);
30438 __Pyx_RefNannyFinishContext();
30439 return __pyx_r;
30440 }
30441
30442 /* "(tree fragment)":16
30443 * else:
30444 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, state)
30445 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
30446 * __pyx_unpickle_VariantMetadata__set_state(self, __pyx_state)
30447 */
30448
30449 /* Python wrapper */
30450 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_7__setstate_cython__(PyObject *__pyx_v_self,
30451 #if CYTHON_METH_FASTCALL
30452 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
30453 #else
30454 PyObject *__pyx_args, PyObject *__pyx_kwds
30455 #endif
30456 ); /*proto*/
30457 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_15VariantMetadata_6__setstate_cython__, "VariantMetadata.__setstate_cython__(self, __pyx_state)");
30458 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_15VariantMetadata_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_15VariantMetadata_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_15VariantMetadata_6__setstate_cython__};
30459 static PyObject *__pyx_pw_5pysam_7libcbcf_15VariantMetadata_7__setstate_cython__(PyObject *__pyx_v_self,
30460 #if CYTHON_METH_FASTCALL
30461 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
30462 #else
30463 PyObject *__pyx_args, PyObject *__pyx_kwds
30464 #endif
30465 ) {
30466 PyObject *__pyx_v___pyx_state = 0;
30467 #if !CYTHON_METH_FASTCALL
30468 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
30469 #endif
30470 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
30471 PyObject* values[1] = {0};
30472 int __pyx_lineno = 0;
30473 const char *__pyx_filename = NULL;
30474 int __pyx_clineno = 0;
30475 PyObject *__pyx_r = 0;
30476 __Pyx_RefNannyDeclarations
30477 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
30478 #if !CYTHON_METH_FASTCALL
30479 #if CYTHON_ASSUME_SAFE_MACROS
30480 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
30481 #else
30482 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
30483 #endif
30484 #endif
30485 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
30486 {
30487 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
30488 if (__pyx_kwds) {
30489 Py_ssize_t kw_args;
30490 switch (__pyx_nargs) {
30491 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
30492 CYTHON_FALLTHROUGH;
30493 case 0: break;
30494 default: goto __pyx_L5_argtuple_error;
30495 }
30496 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
30497 switch (__pyx_nargs) {
30498 case 0:
30499 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
30500 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
30501 kw_args--;
30502 }
30503 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
30504 else goto __pyx_L5_argtuple_error;
30505 }
30506 if (unlikely(kw_args > 0)) {
30507 const Py_ssize_t kwd_pos_args = __pyx_nargs;
30508 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
30509 }
30510 } else if (unlikely(__pyx_nargs != 1)) {
30511 goto __pyx_L5_argtuple_error;
30512 } else {
30513 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
30514 }
30515 __pyx_v___pyx_state = values[0];
30516 }
30517 goto __pyx_L6_skip;
30518 __pyx_L5_argtuple_error:;
30519 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
30520 __pyx_L6_skip:;
30521 goto __pyx_L4_argument_unpacking_done;
30522 __pyx_L3_error:;
30523 {
30524 Py_ssize_t __pyx_temp;
30525 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
30526 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
30527 }
30528 }
30529 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30530 __Pyx_RefNannyFinishContext();
30531 return NULL;
30532 __pyx_L4_argument_unpacking_done:;
30533 __pyx_r = __pyx_pf_5pysam_7libcbcf_15VariantMetadata_6__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v_self), __pyx_v___pyx_state);
30534
30535 /* function exit code */
30536 {
30537 Py_ssize_t __pyx_temp;
30538 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
30539 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
30540 }
30541 }
30542 __Pyx_RefNannyFinishContext();
30543 return __pyx_r;
30544 }
30545
30546 static PyObject *__pyx_pf_5pysam_7libcbcf_15VariantMetadata_6__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
30547 PyObject *__pyx_r = NULL;
30548 __Pyx_TraceDeclarations
30549 __Pyx_RefNannyDeclarations
30550 PyObject *__pyx_t_1 = NULL;
30551 int __pyx_lineno = 0;
30552 const char *__pyx_filename = NULL;
30553 int __pyx_clineno = 0;
30554 __Pyx_TraceFrameInit(__pyx_codeobj__56)
30555 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
30556 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
30557
30558 /* "(tree fragment)":17
30559 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, state)
30560 * def __setstate_cython__(self, __pyx_state):
30561 * __pyx_unpickle_VariantMetadata__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
30562 */
30563 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
30564 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantMetadata__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
30565 __Pyx_GOTREF(__pyx_t_1);
30566 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30567
30568 /* "(tree fragment)":16
30569 * else:
30570 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, state)
30571 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
30572 * __pyx_unpickle_VariantMetadata__set_state(self, __pyx_state)
30573 */
30574
30575 /* function exit code */
30576 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30577 goto __pyx_L0;
30578 __pyx_L1_error:;
30579 __Pyx_XDECREF(__pyx_t_1);
30580 __Pyx_AddTraceback("pysam.libcbcf.VariantMetadata.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30581 __pyx_r = NULL;
30582 __pyx_L0:;
30583 __Pyx_XGIVEREF(__pyx_r);
30584 __Pyx_TraceReturn(__pyx_r, 0);
30585 __Pyx_RefNannyFinishContext();
30586 return __pyx_r;
30587 }
30588
30589 /* "pysam/libcbcf.pyx":1542
30590 *
30591 *
30592 * cdef VariantMetadata makeVariantMetadata(VariantHeader header, int type, int id): # <<<<<<<<<<<<<<
30593 * if not header:
30594 * raise ValueError('invalid VariantHeader')
30595 */
30596
30597 static struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_f_5pysam_7libcbcf_makeVariantMetadata(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, int __pyx_v_type, int __pyx_v_id) {
30598 struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v_meta = 0;
30599 struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_r = NULL;
30600 __Pyx_TraceDeclarations
30601 __Pyx_RefNannyDeclarations
30602 int __pyx_t_1;
30603 int __pyx_t_2;
30604 PyObject *__pyx_t_3 = NULL;
30605 int __pyx_lineno = 0;
30606 const char *__pyx_filename = NULL;
30607 int __pyx_clineno = 0;
30608 __Pyx_RefNannySetupContext("makeVariantMetadata", 1);
30609 __Pyx_TraceCall("makeVariantMetadata", __pyx_f[0], 1542, 0, __PYX_ERR(0, 1542, __pyx_L1_error));
30610
30611 /* "pysam/libcbcf.pyx":1543
30612 *
30613 * cdef VariantMetadata makeVariantMetadata(VariantHeader header, int type, int id):
30614 * if not header: # <<<<<<<<<<<<<<
30615 * raise ValueError('invalid VariantHeader')
30616 *
30617 */
30618 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1543, __pyx_L1_error)
30619 __pyx_t_2 = (!__pyx_t_1);
30620 if (unlikely(__pyx_t_2)) {
30621
30622 /* "pysam/libcbcf.pyx":1544
30623 * cdef VariantMetadata makeVariantMetadata(VariantHeader header, int type, int id):
30624 * if not header:
30625 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
30626 *
30627 * if type != BCF_HL_FLT and type != BCF_HL_INFO and type != BCF_HL_FMT:
30628 */
30629 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error)
30630 __Pyx_GOTREF(__pyx_t_3);
30631 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
30632 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30633 __PYX_ERR(0, 1544, __pyx_L1_error)
30634
30635 /* "pysam/libcbcf.pyx":1543
30636 *
30637 * cdef VariantMetadata makeVariantMetadata(VariantHeader header, int type, int id):
30638 * if not header: # <<<<<<<<<<<<<<
30639 * raise ValueError('invalid VariantHeader')
30640 *
30641 */
30642 }
30643
30644 /* "pysam/libcbcf.pyx":1546
30645 * raise ValueError('invalid VariantHeader')
30646 *
30647 * if type != BCF_HL_FLT and type != BCF_HL_INFO and type != BCF_HL_FMT: # <<<<<<<<<<<<<<
30648 * raise ValueError('invalid metadata type')
30649 *
30650 */
30651 __pyx_t_1 = (__pyx_v_type != BCF_HL_FLT);
30652 if (__pyx_t_1) {
30653 } else {
30654 __pyx_t_2 = __pyx_t_1;
30655 goto __pyx_L5_bool_binop_done;
30656 }
30657 __pyx_t_1 = (__pyx_v_type != BCF_HL_INFO);
30658 if (__pyx_t_1) {
30659 } else {
30660 __pyx_t_2 = __pyx_t_1;
30661 goto __pyx_L5_bool_binop_done;
30662 }
30663 __pyx_t_1 = (__pyx_v_type != BCF_HL_FMT);
30664 __pyx_t_2 = __pyx_t_1;
30665 __pyx_L5_bool_binop_done:;
30666 if (unlikely(__pyx_t_2)) {
30667
30668 /* "pysam/libcbcf.pyx":1547
30669 *
30670 * if type != BCF_HL_FLT and type != BCF_HL_INFO and type != BCF_HL_FMT:
30671 * raise ValueError('invalid metadata type') # <<<<<<<<<<<<<<
30672 *
30673 * if id < 0 or id >= header.ptr.n[BCF_DT_ID]:
30674 */
30675 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
30676 __Pyx_GOTREF(__pyx_t_3);
30677 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
30678 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30679 __PYX_ERR(0, 1547, __pyx_L1_error)
30680
30681 /* "pysam/libcbcf.pyx":1546
30682 * raise ValueError('invalid VariantHeader')
30683 *
30684 * if type != BCF_HL_FLT and type != BCF_HL_INFO and type != BCF_HL_FMT: # <<<<<<<<<<<<<<
30685 * raise ValueError('invalid metadata type')
30686 *
30687 */
30688 }
30689
30690 /* "pysam/libcbcf.pyx":1549
30691 * raise ValueError('invalid metadata type')
30692 *
30693 * if id < 0 or id >= header.ptr.n[BCF_DT_ID]: # <<<<<<<<<<<<<<
30694 * raise ValueError('invalid metadata id')
30695 *
30696 */
30697 __pyx_t_1 = (__pyx_v_id < 0);
30698 if (!__pyx_t_1) {
30699 } else {
30700 __pyx_t_2 = __pyx_t_1;
30701 goto __pyx_L9_bool_binop_done;
30702 }
30703 __pyx_t_1 = (__pyx_v_id >= (__pyx_v_header->ptr->n[BCF_DT_ID]));
30704 __pyx_t_2 = __pyx_t_1;
30705 __pyx_L9_bool_binop_done:;
30706 if (unlikely(__pyx_t_2)) {
30707
30708 /* "pysam/libcbcf.pyx":1550
30709 *
30710 * if id < 0 or id >= header.ptr.n[BCF_DT_ID]:
30711 * raise ValueError('invalid metadata id') # <<<<<<<<<<<<<<
30712 *
30713 * cdef VariantMetadata meta = VariantMetadata.__new__(VariantMetadata)
30714 */
30715 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
30716 __Pyx_GOTREF(__pyx_t_3);
30717 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
30718 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30719 __PYX_ERR(0, 1550, __pyx_L1_error)
30720
30721 /* "pysam/libcbcf.pyx":1549
30722 * raise ValueError('invalid metadata type')
30723 *
30724 * if id < 0 or id >= header.ptr.n[BCF_DT_ID]: # <<<<<<<<<<<<<<
30725 * raise ValueError('invalid metadata id')
30726 *
30727 */
30728 }
30729
30730 /* "pysam/libcbcf.pyx":1552
30731 * raise ValueError('invalid metadata id')
30732 *
30733 * cdef VariantMetadata meta = VariantMetadata.__new__(VariantMetadata) # <<<<<<<<<<<<<<
30734 * meta.header = header
30735 * meta.type = type
30736 */
30737 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantMetadata(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantMetadata), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error)
30738 __Pyx_GOTREF((PyObject *)__pyx_t_3);
30739 __pyx_v_meta = ((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_t_3);
30740 __pyx_t_3 = 0;
30741
30742 /* "pysam/libcbcf.pyx":1553
30743 *
30744 * cdef VariantMetadata meta = VariantMetadata.__new__(VariantMetadata)
30745 * meta.header = header # <<<<<<<<<<<<<<
30746 * meta.type = type
30747 * meta.id = id
30748 */
30749 __Pyx_INCREF((PyObject *)__pyx_v_header);
30750 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
30751 __Pyx_GOTREF((PyObject *)__pyx_v_meta->header);
30752 __Pyx_DECREF((PyObject *)__pyx_v_meta->header);
30753 __pyx_v_meta->header = __pyx_v_header;
30754
30755 /* "pysam/libcbcf.pyx":1554
30756 * cdef VariantMetadata meta = VariantMetadata.__new__(VariantMetadata)
30757 * meta.header = header
30758 * meta.type = type # <<<<<<<<<<<<<<
30759 * meta.id = id
30760 *
30761 */
30762 __pyx_v_meta->type = __pyx_v_type;
30763
30764 /* "pysam/libcbcf.pyx":1555
30765 * meta.header = header
30766 * meta.type = type
30767 * meta.id = id # <<<<<<<<<<<<<<
30768 *
30769 * return meta
30770 */
30771 __pyx_v_meta->id = __pyx_v_id;
30772
30773 /* "pysam/libcbcf.pyx":1557
30774 * meta.id = id
30775 *
30776 * return meta # <<<<<<<<<<<<<<
30777 *
30778 *
30779 */
30780 __Pyx_XDECREF((PyObject *)__pyx_r);
30781 __Pyx_INCREF((PyObject *)__pyx_v_meta);
30782 __pyx_r = __pyx_v_meta;
30783 goto __pyx_L0;
30784
30785 /* "pysam/libcbcf.pyx":1542
30786 *
30787 *
30788 * cdef VariantMetadata makeVariantMetadata(VariantHeader header, int type, int id): # <<<<<<<<<<<<<<
30789 * if not header:
30790 * raise ValueError('invalid VariantHeader')
30791 */
30792
30793 /* function exit code */
30794 __pyx_L1_error:;
30795 __Pyx_XDECREF(__pyx_t_3);
30796 __Pyx_AddTraceback("pysam.libcbcf.makeVariantMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
30797 __pyx_r = 0;
30798 __pyx_L0:;
30799 __Pyx_XDECREF((PyObject *)__pyx_v_meta);
30800 __Pyx_XGIVEREF((PyObject *)__pyx_r);
30801 __Pyx_TraceReturn(__pyx_r, 0);
30802 __Pyx_RefNannyFinishContext();
30803 return __pyx_r;
30804 }
30805
30806 /* "pysam/libcbcf.pyx":1562
30807 * cdef class VariantHeaderMetadata(object):
30808 * """mapping from filter, info or format name to :class:`VariantMetadata` object"""
30809 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
30810 * raise TypeError('this class cannot be instantiated from Python')
30811 *
30812 */
30813
30814 /* Python wrapper */
30815 static int __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30816 static int __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30817 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
30818 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
30819 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
30820 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
30821 int __pyx_r;
30822 __Pyx_RefNannyDeclarations
30823 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
30824 #if CYTHON_ASSUME_SAFE_MACROS
30825 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
30826 #else
30827 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
30828 #endif
30829 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
30830 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
30831 __Pyx_INCREF(__pyx_args);
30832 __pyx_v_args = __pyx_args;
30833 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
30834
30835 /* function exit code */
30836 __Pyx_DECREF(__pyx_v_args);
30837 __Pyx_XDECREF(__pyx_v_kwargs);
30838 __Pyx_RefNannyFinishContext();
30839 return __pyx_r;
30840 }
30841
30842 static int __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
30843 int __pyx_r;
30844 __Pyx_TraceDeclarations
30845 __Pyx_RefNannyDeclarations
30846 PyObject *__pyx_t_1 = NULL;
30847 int __pyx_lineno = 0;
30848 const char *__pyx_filename = NULL;
30849 int __pyx_clineno = 0;
30850 __Pyx_RefNannySetupContext("__init__", 1);
30851 __Pyx_TraceCall("__init__", __pyx_f[0], 1562, 0, __PYX_ERR(0, 1562, __pyx_L1_error));
30852
30853 /* "pysam/libcbcf.pyx":1563
30854 * """mapping from filter, info or format name to :class:`VariantMetadata` object"""
30855 * def __init__(self, *args, **kwargs):
30856 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
30857 *
30858 * def add(self, id, number, type, description, **kwargs):
30859 */
30860 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L1_error)
30861 __Pyx_GOTREF(__pyx_t_1);
30862 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
30863 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30864 __PYX_ERR(0, 1563, __pyx_L1_error)
30865
30866 /* "pysam/libcbcf.pyx":1562
30867 * cdef class VariantHeaderMetadata(object):
30868 * """mapping from filter, info or format name to :class:`VariantMetadata` object"""
30869 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
30870 * raise TypeError('this class cannot be instantiated from Python')
30871 *
30872 */
30873
30874 /* function exit code */
30875 __pyx_L1_error:;
30876 __Pyx_XDECREF(__pyx_t_1);
30877 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30878 __pyx_r = -1;
30879 __Pyx_TraceReturn(Py_None, 0);
30880 __Pyx_RefNannyFinishContext();
30881 return __pyx_r;
30882 }
30883
30884 /* "pysam/libcbcf.pyx":1565
30885 * raise TypeError('this class cannot be instantiated from Python')
30886 *
30887 * def add(self, id, number, type, description, **kwargs): # <<<<<<<<<<<<<<
30888 * """Add a new filter, info or format record"""
30889 * if id in self:
30890 */
30891
30892 /* Python wrapper */
30893 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_3add(PyObject *__pyx_v_self,
30894 #if CYTHON_METH_FASTCALL
30895 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
30896 #else
30897 PyObject *__pyx_args, PyObject *__pyx_kwds
30898 #endif
30899 ); /*proto*/
30900 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_2add, "VariantHeaderMetadata.add(self, id, number, type, description, **kwargs)\nAdd a new filter, info or format record");
30901 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_3add = {"add", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_3add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_2add};
30902 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_3add(PyObject *__pyx_v_self,
30903 #if CYTHON_METH_FASTCALL
30904 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
30905 #else
30906 PyObject *__pyx_args, PyObject *__pyx_kwds
30907 #endif
30908 ) {
30909 PyObject *__pyx_v_id = 0;
30910 PyObject *__pyx_v_number = 0;
30911 PyObject *__pyx_v_type = 0;
30912 PyObject *__pyx_v_description = 0;
30913 PyObject *__pyx_v_kwargs = 0;
30914 #if !CYTHON_METH_FASTCALL
30915 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
30916 #endif
30917 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
30918 PyObject* values[4] = {0,0,0,0};
30919 int __pyx_lineno = 0;
30920 const char *__pyx_filename = NULL;
30921 int __pyx_clineno = 0;
30922 PyObject *__pyx_r = 0;
30923 __Pyx_RefNannyDeclarations
30924 __Pyx_RefNannySetupContext("add (wrapper)", 0);
30925 #if !CYTHON_METH_FASTCALL
30926 #if CYTHON_ASSUME_SAFE_MACROS
30927 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
30928 #else
30929 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
30930 #endif
30931 #endif
30932 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
30933 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
30934 __Pyx_GOTREF(__pyx_v_kwargs);
30935 {
30936 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_id,&__pyx_n_s_number,&__pyx_n_s_type,&__pyx_n_s_description,0};
30937 if (__pyx_kwds) {
30938 Py_ssize_t kw_args;
30939 switch (__pyx_nargs) {
30940 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
30941 CYTHON_FALLTHROUGH;
30942 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
30943 CYTHON_FALLTHROUGH;
30944 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
30945 CYTHON_FALLTHROUGH;
30946 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
30947 CYTHON_FALLTHROUGH;
30948 case 0: break;
30949 default: goto __pyx_L5_argtuple_error;
30950 }
30951 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
30952 switch (__pyx_nargs) {
30953 case 0:
30954 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_id)) != 0)) {
30955 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
30956 kw_args--;
30957 }
30958 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1565, __pyx_L3_error)
30959 else goto __pyx_L5_argtuple_error;
30960 CYTHON_FALLTHROUGH;
30961 case 1:
30962 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_number)) != 0)) {
30963 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
30964 kw_args--;
30965 }
30966 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1565, __pyx_L3_error)
30967 else {
30968 __Pyx_RaiseArgtupleInvalid("add", 1, 4, 4, 1); __PYX_ERR(0, 1565, __pyx_L3_error)
30969 }
30970 CYTHON_FALLTHROUGH;
30971 case 2:
30972 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type)) != 0)) {
30973 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
30974 kw_args--;
30975 }
30976 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1565, __pyx_L3_error)
30977 else {
30978 __Pyx_RaiseArgtupleInvalid("add", 1, 4, 4, 2); __PYX_ERR(0, 1565, __pyx_L3_error)
30979 }
30980 CYTHON_FALLTHROUGH;
30981 case 3:
30982 if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_description)) != 0)) {
30983 (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
30984 kw_args--;
30985 }
30986 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1565, __pyx_L3_error)
30987 else {
30988 __Pyx_RaiseArgtupleInvalid("add", 1, 4, 4, 3); __PYX_ERR(0, 1565, __pyx_L3_error)
30989 }
30990 }
30991 if (unlikely(kw_args > 0)) {
30992 const Py_ssize_t kwd_pos_args = __pyx_nargs;
30993 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "add") < 0)) __PYX_ERR(0, 1565, __pyx_L3_error)
30994 }
30995 } else if (unlikely(__pyx_nargs != 4)) {
30996 goto __pyx_L5_argtuple_error;
30997 } else {
30998 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
30999 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
31000 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
31001 values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
31002 }
31003 __pyx_v_id = values[0];
31004 __pyx_v_number = values[1];
31005 __pyx_v_type = values[2];
31006 __pyx_v_description = values[3];
31007 }
31008 goto __pyx_L6_skip;
31009 __pyx_L5_argtuple_error:;
31010 __Pyx_RaiseArgtupleInvalid("add", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1565, __pyx_L3_error)
31011 __pyx_L6_skip:;
31012 goto __pyx_L4_argument_unpacking_done;
31013 __pyx_L3_error:;
31014 {
31015 Py_ssize_t __pyx_temp;
31016 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
31017 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
31018 }
31019 }
31020 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
31021 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
31022 __Pyx_RefNannyFinishContext();
31023 return NULL;
31024 __pyx_L4_argument_unpacking_done:;
31025 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_2add(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self), __pyx_v_id, __pyx_v_number, __pyx_v_type, __pyx_v_description, __pyx_v_kwargs);
31026
31027 /* function exit code */
31028 __Pyx_DECREF(__pyx_v_kwargs);
31029 {
31030 Py_ssize_t __pyx_temp;
31031 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
31032 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
31033 }
31034 }
31035 __Pyx_RefNannyFinishContext();
31036 return __pyx_r;
31037 }
31038
31039 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_2add(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_number, PyObject *__pyx_v_type, PyObject *__pyx_v_description, PyObject *__pyx_v_kwargs) {
31040 PyObject *__pyx_v_items = NULL;
31041 PyObject *__pyx_r = NULL;
31042 __Pyx_TraceDeclarations
31043 __Pyx_RefNannyDeclarations
31044 int __pyx_t_1;
31045 PyObject *__pyx_t_2 = NULL;
31046 PyObject *__pyx_t_3 = NULL;
31047 PyObject *__pyx_t_4 = NULL;
31048 unsigned int __pyx_t_5;
31049 PyObject *__pyx_t_6 = NULL;
31050 PyObject *__pyx_t_7 = NULL;
31051 int __pyx_lineno = 0;
31052 const char *__pyx_filename = NULL;
31053 int __pyx_clineno = 0;
31054 __Pyx_TraceFrameInit(__pyx_codeobj__59)
31055 __Pyx_RefNannySetupContext("add", 0);
31056 __Pyx_TraceCall("add", __pyx_f[0], 1565, 0, __PYX_ERR(0, 1565, __pyx_L1_error));
31057 __Pyx_INCREF(__pyx_v_number);
31058
31059 /* "pysam/libcbcf.pyx":1567
31060 * def add(self, id, number, type, description, **kwargs):
31061 * """Add a new filter, info or format record"""
31062 * if id in self: # <<<<<<<<<<<<<<
31063 * raise ValueError('Header already exists for id={}'.format(id))
31064 *
31065 */
31066 __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_id, ((PyObject *)__pyx_v_self), Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1567, __pyx_L1_error)
31067 if (unlikely(__pyx_t_1)) {
31068
31069 /* "pysam/libcbcf.pyx":1568
31070 * """Add a new filter, info or format record"""
31071 * if id in self:
31072 * raise ValueError('Header already exists for id={}'.format(id)) # <<<<<<<<<<<<<<
31073 *
31074 * if self.type == BCF_HL_FLT:
31075 */
31076 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Header_already_exists_for_id, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error)
31077 __Pyx_GOTREF(__pyx_t_3);
31078 __pyx_t_4 = NULL;
31079 __pyx_t_5 = 0;
31080 #if CYTHON_UNPACK_METHODS
31081 if (likely(PyMethod_Check(__pyx_t_3))) {
31082 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
31083 if (likely(__pyx_t_4)) {
31084 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
31085 __Pyx_INCREF(__pyx_t_4);
31086 __Pyx_INCREF(function);
31087 __Pyx_DECREF_SET(__pyx_t_3, function);
31088 __pyx_t_5 = 1;
31089 }
31090 }
31091 #endif
31092 {
31093 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_id};
31094 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
31095 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
31096 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error)
31097 __Pyx_GOTREF(__pyx_t_2);
31098 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31099 }
31100 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error)
31101 __Pyx_GOTREF(__pyx_t_3);
31102 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31103 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31104 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31105 __PYX_ERR(0, 1568, __pyx_L1_error)
31106
31107 /* "pysam/libcbcf.pyx":1567
31108 * def add(self, id, number, type, description, **kwargs):
31109 * """Add a new filter, info or format record"""
31110 * if id in self: # <<<<<<<<<<<<<<
31111 * raise ValueError('Header already exists for id={}'.format(id))
31112 *
31113 */
31114 }
31115
31116 /* "pysam/libcbcf.pyx":1570
31117 * raise ValueError('Header already exists for id={}'.format(id))
31118 *
31119 * if self.type == BCF_HL_FLT: # <<<<<<<<<<<<<<
31120 * if number is not None:
31121 * raise ValueError('Number must be None when adding a filter')
31122 */
31123 __pyx_t_1 = (__pyx_v_self->type == BCF_HL_FLT);
31124 if (__pyx_t_1) {
31125
31126 /* "pysam/libcbcf.pyx":1571
31127 *
31128 * if self.type == BCF_HL_FLT:
31129 * if number is not None: # <<<<<<<<<<<<<<
31130 * raise ValueError('Number must be None when adding a filter')
31131 * if type is not None:
31132 */
31133 __pyx_t_1 = (__pyx_v_number != Py_None);
31134 if (unlikely(__pyx_t_1)) {
31135
31136 /* "pysam/libcbcf.pyx":1572
31137 * if self.type == BCF_HL_FLT:
31138 * if number is not None:
31139 * raise ValueError('Number must be None when adding a filter') # <<<<<<<<<<<<<<
31140 * if type is not None:
31141 * raise ValueError('Type must be None when adding a filter')
31142 */
31143 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error)
31144 __Pyx_GOTREF(__pyx_t_3);
31145 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31146 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31147 __PYX_ERR(0, 1572, __pyx_L1_error)
31148
31149 /* "pysam/libcbcf.pyx":1571
31150 *
31151 * if self.type == BCF_HL_FLT:
31152 * if number is not None: # <<<<<<<<<<<<<<
31153 * raise ValueError('Number must be None when adding a filter')
31154 * if type is not None:
31155 */
31156 }
31157
31158 /* "pysam/libcbcf.pyx":1573
31159 * if number is not None:
31160 * raise ValueError('Number must be None when adding a filter')
31161 * if type is not None: # <<<<<<<<<<<<<<
31162 * raise ValueError('Type must be None when adding a filter')
31163 *
31164 */
31165 __pyx_t_1 = (__pyx_v_type != Py_None);
31166 if (unlikely(__pyx_t_1)) {
31167
31168 /* "pysam/libcbcf.pyx":1574
31169 * raise ValueError('Number must be None when adding a filter')
31170 * if type is not None:
31171 * raise ValueError('Type must be None when adding a filter') # <<<<<<<<<<<<<<
31172 *
31173 * items = [('ID', unquoted_str(id)), ('Description', description)]
31174 */
31175 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __pyx_L1_error)
31176 __Pyx_GOTREF(__pyx_t_3);
31177 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31178 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31179 __PYX_ERR(0, 1574, __pyx_L1_error)
31180
31181 /* "pysam/libcbcf.pyx":1573
31182 * if number is not None:
31183 * raise ValueError('Number must be None when adding a filter')
31184 * if type is not None: # <<<<<<<<<<<<<<
31185 * raise ValueError('Type must be None when adding a filter')
31186 *
31187 */
31188 }
31189
31190 /* "pysam/libcbcf.pyx":1576
31191 * raise ValueError('Type must be None when adding a filter')
31192 *
31193 * items = [('ID', unquoted_str(id)), ('Description', description)] # <<<<<<<<<<<<<<
31194 * else:
31195 * if type not in VALUE_TYPES:
31196 */
31197 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unquoted_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error)
31198 __Pyx_GOTREF(__pyx_t_2);
31199 __pyx_t_4 = NULL;
31200 __pyx_t_5 = 0;
31201 #if CYTHON_UNPACK_METHODS
31202 if (unlikely(PyMethod_Check(__pyx_t_2))) {
31203 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
31204 if (likely(__pyx_t_4)) {
31205 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
31206 __Pyx_INCREF(__pyx_t_4);
31207 __Pyx_INCREF(function);
31208 __Pyx_DECREF_SET(__pyx_t_2, function);
31209 __pyx_t_5 = 1;
31210 }
31211 }
31212 #endif
31213 {
31214 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_id};
31215 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
31216 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
31217 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error)
31218 __Pyx_GOTREF(__pyx_t_3);
31219 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31220 }
31221 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error)
31222 __Pyx_GOTREF(__pyx_t_2);
31223 __Pyx_INCREF(__pyx_n_u_ID);
31224 __Pyx_GIVEREF(__pyx_n_u_ID);
31225 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_ID)) __PYX_ERR(0, 1576, __pyx_L1_error);
31226 __Pyx_GIVEREF(__pyx_t_3);
31227 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error);
31228 __pyx_t_3 = 0;
31229 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error)
31230 __Pyx_GOTREF(__pyx_t_3);
31231 __Pyx_INCREF(__pyx_n_u_Description);
31232 __Pyx_GIVEREF(__pyx_n_u_Description);
31233 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_Description)) __PYX_ERR(0, 1576, __pyx_L1_error);
31234 __Pyx_INCREF(__pyx_v_description);
31235 __Pyx_GIVEREF(__pyx_v_description);
31236 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_description)) __PYX_ERR(0, 1576, __pyx_L1_error);
31237 __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1576, __pyx_L1_error)
31238 __Pyx_GOTREF(__pyx_t_4);
31239 __Pyx_GIVEREF(__pyx_t_2);
31240 if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error);
31241 __Pyx_GIVEREF(__pyx_t_3);
31242 if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error);
31243 __pyx_t_2 = 0;
31244 __pyx_t_3 = 0;
31245 __pyx_v_items = __pyx_t_4;
31246 __pyx_t_4 = 0;
31247
31248 /* "pysam/libcbcf.pyx":1570
31249 * raise ValueError('Header already exists for id={}'.format(id))
31250 *
31251 * if self.type == BCF_HL_FLT: # <<<<<<<<<<<<<<
31252 * if number is not None:
31253 * raise ValueError('Number must be None when adding a filter')
31254 */
31255 goto __pyx_L4;
31256 }
31257
31258 /* "pysam/libcbcf.pyx":1578
31259 * items = [('ID', unquoted_str(id)), ('Description', description)]
31260 * else:
31261 * if type not in VALUE_TYPES: # <<<<<<<<<<<<<<
31262 * raise ValueError('unknown type specified: {}'.format(type))
31263 * if number is None:
31264 */
31265 /*else*/ {
31266 __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_type, __pyx_v_5pysam_7libcbcf_VALUE_TYPES, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1578, __pyx_L1_error)
31267 if (unlikely(__pyx_t_1)) {
31268
31269 /* "pysam/libcbcf.pyx":1579
31270 * else:
31271 * if type not in VALUE_TYPES:
31272 * raise ValueError('unknown type specified: {}'.format(type)) # <<<<<<<<<<<<<<
31273 * if number is None:
31274 * number = '.'
31275 */
31276 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unknown_type_specified, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1579, __pyx_L1_error)
31277 __Pyx_GOTREF(__pyx_t_3);
31278 __pyx_t_2 = NULL;
31279 __pyx_t_5 = 0;
31280 #if CYTHON_UNPACK_METHODS
31281 if (likely(PyMethod_Check(__pyx_t_3))) {
31282 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
31283 if (likely(__pyx_t_2)) {
31284 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
31285 __Pyx_INCREF(__pyx_t_2);
31286 __Pyx_INCREF(function);
31287 __Pyx_DECREF_SET(__pyx_t_3, function);
31288 __pyx_t_5 = 1;
31289 }
31290 }
31291 #endif
31292 {
31293 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_type};
31294 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
31295 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
31296 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1579, __pyx_L1_error)
31297 __Pyx_GOTREF(__pyx_t_4);
31298 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31299 }
31300 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1579, __pyx_L1_error)
31301 __Pyx_GOTREF(__pyx_t_3);
31302 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31303 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31304 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31305 __PYX_ERR(0, 1579, __pyx_L1_error)
31306
31307 /* "pysam/libcbcf.pyx":1578
31308 * items = [('ID', unquoted_str(id)), ('Description', description)]
31309 * else:
31310 * if type not in VALUE_TYPES: # <<<<<<<<<<<<<<
31311 * raise ValueError('unknown type specified: {}'.format(type))
31312 * if number is None:
31313 */
31314 }
31315
31316 /* "pysam/libcbcf.pyx":1580
31317 * if type not in VALUE_TYPES:
31318 * raise ValueError('unknown type specified: {}'.format(type))
31319 * if number is None: # <<<<<<<<<<<<<<
31320 * number = '.'
31321 *
31322 */
31323 __pyx_t_1 = (__pyx_v_number == Py_None);
31324 if (__pyx_t_1) {
31325
31326 /* "pysam/libcbcf.pyx":1581
31327 * raise ValueError('unknown type specified: {}'.format(type))
31328 * if number is None:
31329 * number = '.' # <<<<<<<<<<<<<<
31330 *
31331 * items = [('ID', unquoted_str(id)),
31332 */
31333 __Pyx_INCREF(__pyx_kp_u__52);
31334 __Pyx_DECREF_SET(__pyx_v_number, __pyx_kp_u__52);
31335
31336 /* "pysam/libcbcf.pyx":1580
31337 * if type not in VALUE_TYPES:
31338 * raise ValueError('unknown type specified: {}'.format(type))
31339 * if number is None: # <<<<<<<<<<<<<<
31340 * number = '.'
31341 *
31342 */
31343 }
31344
31345 /* "pysam/libcbcf.pyx":1583
31346 * number = '.'
31347 *
31348 * items = [('ID', unquoted_str(id)), # <<<<<<<<<<<<<<
31349 * ('Number', unquoted_str(number)),
31350 * ('Type', unquoted_str(type)),
31351 */
31352 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_unquoted_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1583, __pyx_L1_error)
31353 __Pyx_GOTREF(__pyx_t_4);
31354 __pyx_t_2 = NULL;
31355 __pyx_t_5 = 0;
31356 #if CYTHON_UNPACK_METHODS
31357 if (unlikely(PyMethod_Check(__pyx_t_4))) {
31358 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
31359 if (likely(__pyx_t_2)) {
31360 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
31361 __Pyx_INCREF(__pyx_t_2);
31362 __Pyx_INCREF(function);
31363 __Pyx_DECREF_SET(__pyx_t_4, function);
31364 __pyx_t_5 = 1;
31365 }
31366 }
31367 #endif
31368 {
31369 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_id};
31370 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
31371 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
31372 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error)
31373 __Pyx_GOTREF(__pyx_t_3);
31374 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31375 }
31376 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1583, __pyx_L1_error)
31377 __Pyx_GOTREF(__pyx_t_4);
31378 __Pyx_INCREF(__pyx_n_u_ID);
31379 __Pyx_GIVEREF(__pyx_n_u_ID);
31380 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_ID)) __PYX_ERR(0, 1583, __pyx_L1_error);
31381 __Pyx_GIVEREF(__pyx_t_3);
31382 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error);
31383 __pyx_t_3 = 0;
31384
31385 /* "pysam/libcbcf.pyx":1584
31386 *
31387 * items = [('ID', unquoted_str(id)),
31388 * ('Number', unquoted_str(number)), # <<<<<<<<<<<<<<
31389 * ('Type', unquoted_str(type)),
31390 * ('Description', description)]
31391 */
31392 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unquoted_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error)
31393 __Pyx_GOTREF(__pyx_t_2);
31394 __pyx_t_6 = NULL;
31395 __pyx_t_5 = 0;
31396 #if CYTHON_UNPACK_METHODS
31397 if (unlikely(PyMethod_Check(__pyx_t_2))) {
31398 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
31399 if (likely(__pyx_t_6)) {
31400 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
31401 __Pyx_INCREF(__pyx_t_6);
31402 __Pyx_INCREF(function);
31403 __Pyx_DECREF_SET(__pyx_t_2, function);
31404 __pyx_t_5 = 1;
31405 }
31406 }
31407 #endif
31408 {
31409 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_number};
31410 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
31411 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
31412 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1584, __pyx_L1_error)
31413 __Pyx_GOTREF(__pyx_t_3);
31414 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31415 }
31416 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error)
31417 __Pyx_GOTREF(__pyx_t_2);
31418 __Pyx_INCREF(__pyx_n_u_Number);
31419 __Pyx_GIVEREF(__pyx_n_u_Number);
31420 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_Number)) __PYX_ERR(0, 1584, __pyx_L1_error);
31421 __Pyx_GIVEREF(__pyx_t_3);
31422 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1584, __pyx_L1_error);
31423 __pyx_t_3 = 0;
31424
31425 /* "pysam/libcbcf.pyx":1585
31426 * items = [('ID', unquoted_str(id)),
31427 * ('Number', unquoted_str(number)),
31428 * ('Type', unquoted_str(type)), # <<<<<<<<<<<<<<
31429 * ('Description', description)]
31430 *
31431 */
31432 __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_unquoted_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1585, __pyx_L1_error)
31433 __Pyx_GOTREF(__pyx_t_6);
31434 __pyx_t_7 = NULL;
31435 __pyx_t_5 = 0;
31436 #if CYTHON_UNPACK_METHODS
31437 if (unlikely(PyMethod_Check(__pyx_t_6))) {
31438 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
31439 if (likely(__pyx_t_7)) {
31440 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
31441 __Pyx_INCREF(__pyx_t_7);
31442 __Pyx_INCREF(function);
31443 __Pyx_DECREF_SET(__pyx_t_6, function);
31444 __pyx_t_5 = 1;
31445 }
31446 }
31447 #endif
31448 {
31449 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_type};
31450 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
31451 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
31452 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error)
31453 __Pyx_GOTREF(__pyx_t_3);
31454 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
31455 }
31456 __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1585, __pyx_L1_error)
31457 __Pyx_GOTREF(__pyx_t_6);
31458 __Pyx_INCREF(__pyx_n_u_Type);
31459 __Pyx_GIVEREF(__pyx_n_u_Type);
31460 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_u_Type)) __PYX_ERR(0, 1585, __pyx_L1_error);
31461 __Pyx_GIVEREF(__pyx_t_3);
31462 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error);
31463 __pyx_t_3 = 0;
31464
31465 /* "pysam/libcbcf.pyx":1586
31466 * ('Number', unquoted_str(number)),
31467 * ('Type', unquoted_str(type)),
31468 * ('Description', description)] # <<<<<<<<<<<<<<
31469 *
31470 * items += kwargs.items()
31471 */
31472 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L1_error)
31473 __Pyx_GOTREF(__pyx_t_3);
31474 __Pyx_INCREF(__pyx_n_u_Description);
31475 __Pyx_GIVEREF(__pyx_n_u_Description);
31476 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_Description)) __PYX_ERR(0, 1586, __pyx_L1_error);
31477 __Pyx_INCREF(__pyx_v_description);
31478 __Pyx_GIVEREF(__pyx_v_description);
31479 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_description)) __PYX_ERR(0, 1586, __pyx_L1_error);
31480
31481 /* "pysam/libcbcf.pyx":1583
31482 * number = '.'
31483 *
31484 * items = [('ID', unquoted_str(id)), # <<<<<<<<<<<<<<
31485 * ('Number', unquoted_str(number)),
31486 * ('Type', unquoted_str(type)),
31487 */
31488 __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1583, __pyx_L1_error)
31489 __Pyx_GOTREF(__pyx_t_7);
31490 __Pyx_GIVEREF(__pyx_t_4);
31491 if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1583, __pyx_L1_error);
31492 __Pyx_GIVEREF(__pyx_t_2);
31493 if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error);
31494 __Pyx_GIVEREF(__pyx_t_6);
31495 if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6)) __PYX_ERR(0, 1583, __pyx_L1_error);
31496 __Pyx_GIVEREF(__pyx_t_3);
31497 if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 3, __pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error);
31498 __pyx_t_4 = 0;
31499 __pyx_t_2 = 0;
31500 __pyx_t_6 = 0;
31501 __pyx_t_3 = 0;
31502 __pyx_v_items = __pyx_t_7;
31503 __pyx_t_7 = 0;
31504 }
31505 __pyx_L4:;
31506
31507 /* "pysam/libcbcf.pyx":1588
31508 * ('Description', description)]
31509 *
31510 * items += kwargs.items() # <<<<<<<<<<<<<<
31511 * self.header.add_meta(METADATA_TYPES[self.type], items=items)
31512 *
31513 */
31514 __pyx_t_7 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1588, __pyx_L1_error)
31515 __Pyx_GOTREF(__pyx_t_7);
31516 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_items, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1588, __pyx_L1_error)
31517 __Pyx_GOTREF(__pyx_t_3);
31518 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
31519 __Pyx_DECREF_SET(__pyx_v_items, __pyx_t_3);
31520 __pyx_t_3 = 0;
31521
31522 /* "pysam/libcbcf.pyx":1589
31523 *
31524 * items += kwargs.items()
31525 * self.header.add_meta(METADATA_TYPES[self.type], items=items) # <<<<<<<<<<<<<<
31526 *
31527 * def __len__(self):
31528 */
31529 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->header), __pyx_n_s_add_meta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1589, __pyx_L1_error)
31530 __Pyx_GOTREF(__pyx_t_3);
31531 if (unlikely(__pyx_v_5pysam_7libcbcf_METADATA_TYPES == Py_None)) {
31532 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
31533 __PYX_ERR(0, 1589, __pyx_L1_error)
31534 }
31535 __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_5pysam_7libcbcf_METADATA_TYPES, __pyx_v_self->type, int32_t, 1, __Pyx_PyInt_From_int32_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1589, __pyx_L1_error)
31536 __Pyx_GOTREF(__pyx_t_7);
31537 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1589, __pyx_L1_error)
31538 __Pyx_GOTREF(__pyx_t_6);
31539 __Pyx_GIVEREF(__pyx_t_7);
31540 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7)) __PYX_ERR(0, 1589, __pyx_L1_error);
31541 __pyx_t_7 = 0;
31542 __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1589, __pyx_L1_error)
31543 __Pyx_GOTREF(__pyx_t_7);
31544 if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_items, __pyx_v_items) < 0) __PYX_ERR(0, 1589, __pyx_L1_error)
31545 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error)
31546 __Pyx_GOTREF(__pyx_t_2);
31547 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31548 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
31549 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
31550 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31551
31552 /* "pysam/libcbcf.pyx":1565
31553 * raise TypeError('this class cannot be instantiated from Python')
31554 *
31555 * def add(self, id, number, type, description, **kwargs): # <<<<<<<<<<<<<<
31556 * """Add a new filter, info or format record"""
31557 * if id in self:
31558 */
31559
31560 /* function exit code */
31561 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31562 goto __pyx_L0;
31563 __pyx_L1_error:;
31564 __Pyx_XDECREF(__pyx_t_2);
31565 __Pyx_XDECREF(__pyx_t_3);
31566 __Pyx_XDECREF(__pyx_t_4);
31567 __Pyx_XDECREF(__pyx_t_6);
31568 __Pyx_XDECREF(__pyx_t_7);
31569 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
31570 __pyx_r = NULL;
31571 __pyx_L0:;
31572 __Pyx_XDECREF(__pyx_v_items);
31573 __Pyx_XDECREF(__pyx_v_number);
31574 __Pyx_XGIVEREF(__pyx_r);
31575 __Pyx_TraceReturn(__pyx_r, 0);
31576 __Pyx_RefNannyFinishContext();
31577 return __pyx_r;
31578 }
31579
31580 /* "pysam/libcbcf.pyx":1591
31581 * self.header.add_meta(METADATA_TYPES[self.type], items=items)
31582 *
31583 * def __len__(self): # <<<<<<<<<<<<<<
31584 * cdef bcf_hdr_t *hdr = self.header.ptr
31585 * cdef bcf_idpair_t *idpair
31586 */
31587
31588 /* Python wrapper */
31589 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_5__len__(PyObject *__pyx_v_self); /*proto*/
31590 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_5__len__(PyObject *__pyx_v_self) {
31591 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
31592 Py_ssize_t __pyx_r;
31593 __Pyx_RefNannyDeclarations
31594 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
31595 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
31596 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_4__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
31597
31598 /* function exit code */
31599 __Pyx_RefNannyFinishContext();
31600 return __pyx_r;
31601 }
31602
31603 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_4__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
31604 bcf_hdr_t *__pyx_v_hdr;
31605 bcf_idpair_t *__pyx_v_idpair;
31606 int32_t __pyx_v_i;
31607 int32_t __pyx_v_n;
31608 Py_ssize_t __pyx_r;
31609 __Pyx_TraceDeclarations
31610 bcf_hdr_t *__pyx_t_1;
31611 int32_t __pyx_t_2;
31612 int32_t __pyx_t_3;
31613 int32_t __pyx_t_4;
31614 int __pyx_t_5;
31615 int __pyx_t_6;
31616 int __pyx_lineno = 0;
31617 const char *__pyx_filename = NULL;
31618 int __pyx_clineno = 0;
31619 __Pyx_TraceCall("__len__", __pyx_f[0], 1591, 0, __PYX_ERR(0, 1591, __pyx_L1_error));
31620
31621 /* "pysam/libcbcf.pyx":1592
31622 *
31623 * def __len__(self):
31624 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
31625 * cdef bcf_idpair_t *idpair
31626 * cdef int32_t i, n = 0
31627 */
31628 __pyx_t_1 = __pyx_v_self->header->ptr;
31629 __pyx_v_hdr = __pyx_t_1;
31630
31631 /* "pysam/libcbcf.pyx":1594
31632 * cdef bcf_hdr_t *hdr = self.header.ptr
31633 * cdef bcf_idpair_t *idpair
31634 * cdef int32_t i, n = 0 # <<<<<<<<<<<<<<
31635 *
31636 * for i in range(hdr.n[BCF_DT_ID]):
31637 */
31638 __pyx_v_n = 0;
31639
31640 /* "pysam/libcbcf.pyx":1596
31641 * cdef int32_t i, n = 0
31642 *
31643 * for i in range(hdr.n[BCF_DT_ID]): # <<<<<<<<<<<<<<
31644 * idpair = hdr.id[BCF_DT_ID] + i
31645 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
31646 */
31647 __pyx_t_2 = (__pyx_v_hdr->n[BCF_DT_ID]);
31648 __pyx_t_3 = __pyx_t_2;
31649 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31650 __pyx_v_i = __pyx_t_4;
31651
31652 /* "pysam/libcbcf.pyx":1597
31653 *
31654 * for i in range(hdr.n[BCF_DT_ID]):
31655 * idpair = hdr.id[BCF_DT_ID] + i # <<<<<<<<<<<<<<
31656 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
31657 * n += 1
31658 */
31659 __pyx_v_idpair = ((__pyx_v_hdr->id[BCF_DT_ID]) + __pyx_v_i);
31660
31661 /* "pysam/libcbcf.pyx":1598
31662 * for i in range(hdr.n[BCF_DT_ID]):
31663 * idpair = hdr.id[BCF_DT_ID] + i
31664 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF: # <<<<<<<<<<<<<<
31665 * n += 1
31666 * return n
31667 */
31668 __pyx_t_6 = (__pyx_v_idpair->key != 0);
31669 if (__pyx_t_6) {
31670 } else {
31671 __pyx_t_5 = __pyx_t_6;
31672 goto __pyx_L6_bool_binop_done;
31673 }
31674 __pyx_t_6 = (__pyx_v_idpair->val != 0);
31675 if (__pyx_t_6) {
31676 } else {
31677 __pyx_t_5 = __pyx_t_6;
31678 goto __pyx_L6_bool_binop_done;
31679 }
31680 __pyx_t_6 = (((__pyx_v_idpair->val->info[__pyx_v_self->type]) & 0xF) != 0xF);
31681 __pyx_t_5 = __pyx_t_6;
31682 __pyx_L6_bool_binop_done:;
31683 if (__pyx_t_5) {
31684
31685 /* "pysam/libcbcf.pyx":1599
31686 * idpair = hdr.id[BCF_DT_ID] + i
31687 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
31688 * n += 1 # <<<<<<<<<<<<<<
31689 * return n
31690 *
31691 */
31692 __pyx_v_n = (__pyx_v_n + 1);
31693
31694 /* "pysam/libcbcf.pyx":1598
31695 * for i in range(hdr.n[BCF_DT_ID]):
31696 * idpair = hdr.id[BCF_DT_ID] + i
31697 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF: # <<<<<<<<<<<<<<
31698 * n += 1
31699 * return n
31700 */
31701 }
31702 }
31703
31704 /* "pysam/libcbcf.pyx":1600
31705 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
31706 * n += 1
31707 * return n # <<<<<<<<<<<<<<
31708 *
31709 * def __bool__(self):
31710 */
31711 __pyx_r = __pyx_v_n;
31712 goto __pyx_L0;
31713
31714 /* "pysam/libcbcf.pyx":1591
31715 * self.header.add_meta(METADATA_TYPES[self.type], items=items)
31716 *
31717 * def __len__(self): # <<<<<<<<<<<<<<
31718 * cdef bcf_hdr_t *hdr = self.header.ptr
31719 * cdef bcf_idpair_t *idpair
31720 */
31721
31722 /* function exit code */
31723 __pyx_L1_error:;
31724 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31725 __pyx_r = -1;
31726 __pyx_L0:;
31727 __Pyx_TraceReturn(Py_None, 0);
31728 return __pyx_r;
31729 }
31730
31731 /* "pysam/libcbcf.pyx":1602
31732 * return n
31733 *
31734 * def __bool__(self): # <<<<<<<<<<<<<<
31735 * cdef bcf_hdr_t *hdr = self.header.ptr
31736 * cdef bcf_idpair_t *idpair
31737 */
31738
31739 /* Python wrapper */
31740 static int __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_7__bool__(PyObject *__pyx_v_self); /*proto*/
31741 static int __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_7__bool__(PyObject *__pyx_v_self) {
31742 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
31743 int __pyx_r;
31744 __Pyx_RefNannyDeclarations
31745 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
31746 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
31747 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_6__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
31748
31749 /* function exit code */
31750 __Pyx_RefNannyFinishContext();
31751 return __pyx_r;
31752 }
31753
31754 static int __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_6__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
31755 bcf_hdr_t *__pyx_v_hdr;
31756 bcf_idpair_t *__pyx_v_idpair;
31757 int32_t __pyx_v_i;
31758 int __pyx_r;
31759 __Pyx_TraceDeclarations
31760 bcf_hdr_t *__pyx_t_1;
31761 int32_t __pyx_t_2;
31762 int32_t __pyx_t_3;
31763 int32_t __pyx_t_4;
31764 int __pyx_t_5;
31765 int __pyx_t_6;
31766 int __pyx_lineno = 0;
31767 const char *__pyx_filename = NULL;
31768 int __pyx_clineno = 0;
31769 __Pyx_TraceCall("__bool__", __pyx_f[0], 1602, 0, __PYX_ERR(0, 1602, __pyx_L1_error));
31770
31771 /* "pysam/libcbcf.pyx":1603
31772 *
31773 * def __bool__(self):
31774 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
31775 * cdef bcf_idpair_t *idpair
31776 * cdef int32_t i
31777 */
31778 __pyx_t_1 = __pyx_v_self->header->ptr;
31779 __pyx_v_hdr = __pyx_t_1;
31780
31781 /* "pysam/libcbcf.pyx":1607
31782 * cdef int32_t i
31783 *
31784 * for i in range(hdr.n[BCF_DT_ID]): # <<<<<<<<<<<<<<
31785 * idpair = hdr.id[BCF_DT_ID] + i
31786 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
31787 */
31788 __pyx_t_2 = (__pyx_v_hdr->n[BCF_DT_ID]);
31789 __pyx_t_3 = __pyx_t_2;
31790 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31791 __pyx_v_i = __pyx_t_4;
31792
31793 /* "pysam/libcbcf.pyx":1608
31794 *
31795 * for i in range(hdr.n[BCF_DT_ID]):
31796 * idpair = hdr.id[BCF_DT_ID] + i # <<<<<<<<<<<<<<
31797 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
31798 * return True
31799 */
31800 __pyx_v_idpair = ((__pyx_v_hdr->id[BCF_DT_ID]) + __pyx_v_i);
31801
31802 /* "pysam/libcbcf.pyx":1609
31803 * for i in range(hdr.n[BCF_DT_ID]):
31804 * idpair = hdr.id[BCF_DT_ID] + i
31805 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF: # <<<<<<<<<<<<<<
31806 * return True
31807 * return False
31808 */
31809 __pyx_t_6 = (__pyx_v_idpair->key != 0);
31810 if (__pyx_t_6) {
31811 } else {
31812 __pyx_t_5 = __pyx_t_6;
31813 goto __pyx_L6_bool_binop_done;
31814 }
31815 __pyx_t_6 = (__pyx_v_idpair->val != 0);
31816 if (__pyx_t_6) {
31817 } else {
31818 __pyx_t_5 = __pyx_t_6;
31819 goto __pyx_L6_bool_binop_done;
31820 }
31821 __pyx_t_6 = (((__pyx_v_idpair->val->info[__pyx_v_self->type]) & 0xF) != 0xF);
31822 __pyx_t_5 = __pyx_t_6;
31823 __pyx_L6_bool_binop_done:;
31824 if (__pyx_t_5) {
31825
31826 /* "pysam/libcbcf.pyx":1610
31827 * idpair = hdr.id[BCF_DT_ID] + i
31828 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
31829 * return True # <<<<<<<<<<<<<<
31830 * return False
31831 *
31832 */
31833 __pyx_r = 1;
31834 goto __pyx_L0;
31835
31836 /* "pysam/libcbcf.pyx":1609
31837 * for i in range(hdr.n[BCF_DT_ID]):
31838 * idpair = hdr.id[BCF_DT_ID] + i
31839 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF: # <<<<<<<<<<<<<<
31840 * return True
31841 * return False
31842 */
31843 }
31844 }
31845
31846 /* "pysam/libcbcf.pyx":1611
31847 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
31848 * return True
31849 * return False # <<<<<<<<<<<<<<
31850 *
31851 * def __getitem__(self, key):
31852 */
31853 __pyx_r = 0;
31854 goto __pyx_L0;
31855
31856 /* "pysam/libcbcf.pyx":1602
31857 * return n
31858 *
31859 * def __bool__(self): # <<<<<<<<<<<<<<
31860 * cdef bcf_hdr_t *hdr = self.header.ptr
31861 * cdef bcf_idpair_t *idpair
31862 */
31863
31864 /* function exit code */
31865 __pyx_L1_error:;
31866 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31867 __pyx_r = -1;
31868 __pyx_L0:;
31869 __Pyx_TraceReturn(Py_None, 0);
31870 return __pyx_r;
31871 }
31872
31873 /* "pysam/libcbcf.pyx":1613
31874 * return False
31875 *
31876 * def __getitem__(self, key): # <<<<<<<<<<<<<<
31877 * cdef bcf_hdr_t *hdr = self.header.ptr
31878 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
31879 */
31880
31881 /* Python wrapper */
31882 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
31883 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
31884 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
31885 PyObject *__pyx_r = 0;
31886 __Pyx_RefNannyDeclarations
31887 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
31888 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
31889 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_8__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self), ((PyObject *)__pyx_v_key));
31890
31891 /* function exit code */
31892 __Pyx_RefNannyFinishContext();
31893 return __pyx_r;
31894 }
31895
31896 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_8__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_key) {
31897 bcf_hdr_t *__pyx_v_hdr;
31898 vdict_t *__pyx_v_d;
31899 PyObject *__pyx_v_bkey = 0;
31900 khiter_t __pyx_v_k;
31901 PyObject *__pyx_r = NULL;
31902 __Pyx_TraceDeclarations
31903 __Pyx_RefNannyDeclarations
31904 bcf_hdr_t *__pyx_t_1;
31905 PyObject *__pyx_t_2 = NULL;
31906 char const *__pyx_t_3;
31907 int __pyx_t_4;
31908 int __pyx_t_5;
31909 PyObject *__pyx_t_6 = NULL;
31910 PyObject *__pyx_t_7 = NULL;
31911 unsigned int __pyx_t_8;
31912 int __pyx_lineno = 0;
31913 const char *__pyx_filename = NULL;
31914 int __pyx_clineno = 0;
31915 __Pyx_RefNannySetupContext("__getitem__", 1);
31916 __Pyx_TraceCall("__getitem__", __pyx_f[0], 1613, 0, __PYX_ERR(0, 1613, __pyx_L1_error));
31917
31918 /* "pysam/libcbcf.pyx":1614
31919 *
31920 * def __getitem__(self, key):
31921 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
31922 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
31923 *
31924 */
31925 __pyx_t_1 = __pyx_v_self->header->ptr;
31926 __pyx_v_hdr = __pyx_t_1;
31927
31928 /* "pysam/libcbcf.pyx":1615
31929 * def __getitem__(self, key):
31930 * cdef bcf_hdr_t *hdr = self.header.ptr
31931 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID] # <<<<<<<<<<<<<<
31932 *
31933 * cdef bytes bkey = force_bytes(key)
31934 */
31935 __pyx_v_d = ((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_ID]));
31936
31937 /* "pysam/libcbcf.pyx":1617
31938 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
31939 *
31940 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
31941 * cdef khiter_t k = kh_get_vdict(d, bkey)
31942 *
31943 */
31944 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
31945 __Pyx_GOTREF(__pyx_t_2);
31946 __pyx_v_bkey = ((PyObject*)__pyx_t_2);
31947 __pyx_t_2 = 0;
31948
31949 /* "pysam/libcbcf.pyx":1618
31950 *
31951 * cdef bytes bkey = force_bytes(key)
31952 * cdef khiter_t k = kh_get_vdict(d, bkey) # <<<<<<<<<<<<<<
31953 *
31954 * if k == kh_end(d) or kh_val_vdict(d, k).info[self.type] & 0xF == 0xF:
31955 */
31956 if (unlikely(__pyx_v_bkey == Py_None)) {
31957 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
31958 __PYX_ERR(0, 1618, __pyx_L1_error)
31959 }
31960 __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L1_error)
31961 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_3);
31962
31963 /* "pysam/libcbcf.pyx":1620
31964 * cdef khiter_t k = kh_get_vdict(d, bkey)
31965 *
31966 * if k == kh_end(d) or kh_val_vdict(d, k).info[self.type] & 0xF == 0xF: # <<<<<<<<<<<<<<
31967 * raise KeyError('invalid key: {}'.format(key))
31968 *
31969 */
31970 __pyx_t_5 = (__pyx_v_k == kh_end(__pyx_v_d));
31971 if (!__pyx_t_5) {
31972 } else {
31973 __pyx_t_4 = __pyx_t_5;
31974 goto __pyx_L4_bool_binop_done;
31975 }
31976 __pyx_t_5 = (((kh_val(__pyx_v_d, __pyx_v_k).info[__pyx_v_self->type]) & 0xF) == 0xF);
31977 __pyx_t_4 = __pyx_t_5;
31978 __pyx_L4_bool_binop_done:;
31979 if (unlikely(__pyx_t_4)) {
31980
31981 /* "pysam/libcbcf.pyx":1621
31982 *
31983 * if k == kh_end(d) or kh_val_vdict(d, k).info[self.type] & 0xF == 0xF:
31984 * raise KeyError('invalid key: {}'.format(key)) # <<<<<<<<<<<<<<
31985 *
31986 * return makeVariantMetadata(self.header, self.type, kh_val_vdict(d, k).id)
31987 */
31988 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_key, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1621, __pyx_L1_error)
31989 __Pyx_GOTREF(__pyx_t_6);
31990 __pyx_t_7 = NULL;
31991 __pyx_t_8 = 0;
31992 #if CYTHON_UNPACK_METHODS
31993 if (likely(PyMethod_Check(__pyx_t_6))) {
31994 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
31995 if (likely(__pyx_t_7)) {
31996 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
31997 __Pyx_INCREF(__pyx_t_7);
31998 __Pyx_INCREF(function);
31999 __Pyx_DECREF_SET(__pyx_t_6, function);
32000 __pyx_t_8 = 1;
32001 }
32002 }
32003 #endif
32004 {
32005 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_key};
32006 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
32007 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
32008 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error)
32009 __Pyx_GOTREF(__pyx_t_2);
32010 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32011 }
32012 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1621, __pyx_L1_error)
32013 __Pyx_GOTREF(__pyx_t_6);
32014 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32015 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
32016 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32017 __PYX_ERR(0, 1621, __pyx_L1_error)
32018
32019 /* "pysam/libcbcf.pyx":1620
32020 * cdef khiter_t k = kh_get_vdict(d, bkey)
32021 *
32022 * if k == kh_end(d) or kh_val_vdict(d, k).info[self.type] & 0xF == 0xF: # <<<<<<<<<<<<<<
32023 * raise KeyError('invalid key: {}'.format(key))
32024 *
32025 */
32026 }
32027
32028 /* "pysam/libcbcf.pyx":1623
32029 * raise KeyError('invalid key: {}'.format(key))
32030 *
32031 * return makeVariantMetadata(self.header, self.type, kh_val_vdict(d, k).id) # <<<<<<<<<<<<<<
32032 *
32033 * def remove_header(self, key):
32034 */
32035 __Pyx_XDECREF(__pyx_r);
32036 __pyx_t_6 = ((PyObject *)__pyx_v_self->header);
32037 __Pyx_INCREF(__pyx_t_6);
32038 __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantMetadata(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_6), __pyx_v_self->type, kh_val(__pyx_v_d, __pyx_v_k).id)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
32039 __Pyx_GOTREF(__pyx_t_2);
32040 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32041 __pyx_r = __pyx_t_2;
32042 __pyx_t_2 = 0;
32043 goto __pyx_L0;
32044
32045 /* "pysam/libcbcf.pyx":1613
32046 * return False
32047 *
32048 * def __getitem__(self, key): # <<<<<<<<<<<<<<
32049 * cdef bcf_hdr_t *hdr = self.header.ptr
32050 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
32051 */
32052
32053 /* function exit code */
32054 __pyx_L1_error:;
32055 __Pyx_XDECREF(__pyx_t_2);
32056 __Pyx_XDECREF(__pyx_t_6);
32057 __Pyx_XDECREF(__pyx_t_7);
32058 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32059 __pyx_r = NULL;
32060 __pyx_L0:;
32061 __Pyx_XDECREF(__pyx_v_bkey);
32062 __Pyx_XGIVEREF(__pyx_r);
32063 __Pyx_TraceReturn(__pyx_r, 0);
32064 __Pyx_RefNannyFinishContext();
32065 return __pyx_r;
32066 }
32067
32068 /* "pysam/libcbcf.pyx":1625
32069 * return makeVariantMetadata(self.header, self.type, kh_val_vdict(d, k).id)
32070 *
32071 * def remove_header(self, key): # <<<<<<<<<<<<<<
32072 * cdef bcf_hdr_t *hdr = self.header.ptr
32073 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
32074 */
32075
32076 /* Python wrapper */
32077 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_11remove_header(PyObject *__pyx_v_self,
32078 #if CYTHON_METH_FASTCALL
32079 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
32080 #else
32081 PyObject *__pyx_args, PyObject *__pyx_kwds
32082 #endif
32083 ); /*proto*/
32084 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_10remove_header, "VariantHeaderMetadata.remove_header(self, key)");
32085 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_11remove_header = {"remove_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_11remove_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_10remove_header};
32086 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_11remove_header(PyObject *__pyx_v_self,
32087 #if CYTHON_METH_FASTCALL
32088 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
32089 #else
32090 PyObject *__pyx_args, PyObject *__pyx_kwds
32091 #endif
32092 ) {
32093 PyObject *__pyx_v_key = 0;
32094 #if !CYTHON_METH_FASTCALL
32095 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
32096 #endif
32097 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
32098 PyObject* values[1] = {0};
32099 int __pyx_lineno = 0;
32100 const char *__pyx_filename = NULL;
32101 int __pyx_clineno = 0;
32102 PyObject *__pyx_r = 0;
32103 __Pyx_RefNannyDeclarations
32104 __Pyx_RefNannySetupContext("remove_header (wrapper)", 0);
32105 #if !CYTHON_METH_FASTCALL
32106 #if CYTHON_ASSUME_SAFE_MACROS
32107 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
32108 #else
32109 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
32110 #endif
32111 #endif
32112 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
32113 {
32114 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,0};
32115 if (__pyx_kwds) {
32116 Py_ssize_t kw_args;
32117 switch (__pyx_nargs) {
32118 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
32119 CYTHON_FALLTHROUGH;
32120 case 0: break;
32121 default: goto __pyx_L5_argtuple_error;
32122 }
32123 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
32124 switch (__pyx_nargs) {
32125 case 0:
32126 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
32127 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
32128 kw_args--;
32129 }
32130 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1625, __pyx_L3_error)
32131 else goto __pyx_L5_argtuple_error;
32132 }
32133 if (unlikely(kw_args > 0)) {
32134 const Py_ssize_t kwd_pos_args = __pyx_nargs;
32135 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_header") < 0)) __PYX_ERR(0, 1625, __pyx_L3_error)
32136 }
32137 } else if (unlikely(__pyx_nargs != 1)) {
32138 goto __pyx_L5_argtuple_error;
32139 } else {
32140 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
32141 }
32142 __pyx_v_key = values[0];
32143 }
32144 goto __pyx_L6_skip;
32145 __pyx_L5_argtuple_error:;
32146 __Pyx_RaiseArgtupleInvalid("remove_header", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1625, __pyx_L3_error)
32147 __pyx_L6_skip:;
32148 goto __pyx_L4_argument_unpacking_done;
32149 __pyx_L3_error:;
32150 {
32151 Py_ssize_t __pyx_temp;
32152 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
32153 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
32154 }
32155 }
32156 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.remove_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
32157 __Pyx_RefNannyFinishContext();
32158 return NULL;
32159 __pyx_L4_argument_unpacking_done:;
32160 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_10remove_header(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self), __pyx_v_key);
32161
32162 /* function exit code */
32163 {
32164 Py_ssize_t __pyx_temp;
32165 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
32166 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
32167 }
32168 }
32169 __Pyx_RefNannyFinishContext();
32170 return __pyx_r;
32171 }
32172
32173 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_10remove_header(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_key) {
32174 bcf_hdr_t *__pyx_v_hdr;
32175 vdict_t *__pyx_v_d;
32176 PyObject *__pyx_v_bkey = 0;
32177 khiter_t __pyx_v_k;
32178 PyObject *__pyx_r = NULL;
32179 __Pyx_TraceDeclarations
32180 __Pyx_RefNannyDeclarations
32181 bcf_hdr_t *__pyx_t_1;
32182 PyObject *__pyx_t_2 = NULL;
32183 char const *__pyx_t_3;
32184 int __pyx_t_4;
32185 int __pyx_t_5;
32186 PyObject *__pyx_t_6 = NULL;
32187 PyObject *__pyx_t_7 = NULL;
32188 unsigned int __pyx_t_8;
32189 char const *__pyx_t_9;
32190 int __pyx_lineno = 0;
32191 const char *__pyx_filename = NULL;
32192 int __pyx_clineno = 0;
32193 __Pyx_TraceFrameInit(__pyx_codeobj__62)
32194 __Pyx_RefNannySetupContext("remove_header", 1);
32195 __Pyx_TraceCall("remove_header", __pyx_f[0], 1625, 0, __PYX_ERR(0, 1625, __pyx_L1_error));
32196
32197 /* "pysam/libcbcf.pyx":1626
32198 *
32199 * def remove_header(self, key):
32200 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
32201 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
32202 *
32203 */
32204 __pyx_t_1 = __pyx_v_self->header->ptr;
32205 __pyx_v_hdr = __pyx_t_1;
32206
32207 /* "pysam/libcbcf.pyx":1627
32208 * def remove_header(self, key):
32209 * cdef bcf_hdr_t *hdr = self.header.ptr
32210 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID] # <<<<<<<<<<<<<<
32211 *
32212 * cdef bytes bkey = force_bytes(key)
32213 */
32214 __pyx_v_d = ((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_ID]));
32215
32216 /* "pysam/libcbcf.pyx":1629
32217 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
32218 *
32219 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
32220 * cdef khiter_t k = kh_get_vdict(d, bkey)
32221 *
32222 */
32223 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error)
32224 __Pyx_GOTREF(__pyx_t_2);
32225 __pyx_v_bkey = ((PyObject*)__pyx_t_2);
32226 __pyx_t_2 = 0;
32227
32228 /* "pysam/libcbcf.pyx":1630
32229 *
32230 * cdef bytes bkey = force_bytes(key)
32231 * cdef khiter_t k = kh_get_vdict(d, bkey) # <<<<<<<<<<<<<<
32232 *
32233 * if k == kh_end(d) or kh_val_vdict(d, k).info[self.type] & 0xF == 0xF:
32234 */
32235 if (unlikely(__pyx_v_bkey == Py_None)) {
32236 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
32237 __PYX_ERR(0, 1630, __pyx_L1_error)
32238 }
32239 __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 1630, __pyx_L1_error)
32240 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_3);
32241
32242 /* "pysam/libcbcf.pyx":1632
32243 * cdef khiter_t k = kh_get_vdict(d, bkey)
32244 *
32245 * if k == kh_end(d) or kh_val_vdict(d, k).info[self.type] & 0xF == 0xF: # <<<<<<<<<<<<<<
32246 * raise KeyError('invalid key: {}'.format(key))
32247 *
32248 */
32249 __pyx_t_5 = (__pyx_v_k == kh_end(__pyx_v_d));
32250 if (!__pyx_t_5) {
32251 } else {
32252 __pyx_t_4 = __pyx_t_5;
32253 goto __pyx_L4_bool_binop_done;
32254 }
32255 __pyx_t_5 = (((kh_val(__pyx_v_d, __pyx_v_k).info[__pyx_v_self->type]) & 0xF) == 0xF);
32256 __pyx_t_4 = __pyx_t_5;
32257 __pyx_L4_bool_binop_done:;
32258 if (unlikely(__pyx_t_4)) {
32259
32260 /* "pysam/libcbcf.pyx":1633
32261 *
32262 * if k == kh_end(d) or kh_val_vdict(d, k).info[self.type] & 0xF == 0xF:
32263 * raise KeyError('invalid key: {}'.format(key)) # <<<<<<<<<<<<<<
32264 *
32265 * bcf_hdr_remove(hdr, self.type, bkey)
32266 */
32267 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_key, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1633, __pyx_L1_error)
32268 __Pyx_GOTREF(__pyx_t_6);
32269 __pyx_t_7 = NULL;
32270 __pyx_t_8 = 0;
32271 #if CYTHON_UNPACK_METHODS
32272 if (likely(PyMethod_Check(__pyx_t_6))) {
32273 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
32274 if (likely(__pyx_t_7)) {
32275 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
32276 __Pyx_INCREF(__pyx_t_7);
32277 __Pyx_INCREF(function);
32278 __Pyx_DECREF_SET(__pyx_t_6, function);
32279 __pyx_t_8 = 1;
32280 }
32281 }
32282 #endif
32283 {
32284 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_key};
32285 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
32286 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
32287 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error)
32288 __Pyx_GOTREF(__pyx_t_2);
32289 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32290 }
32291 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1633, __pyx_L1_error)
32292 __Pyx_GOTREF(__pyx_t_6);
32293 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32294 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
32295 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32296 __PYX_ERR(0, 1633, __pyx_L1_error)
32297
32298 /* "pysam/libcbcf.pyx":1632
32299 * cdef khiter_t k = kh_get_vdict(d, bkey)
32300 *
32301 * if k == kh_end(d) or kh_val_vdict(d, k).info[self.type] & 0xF == 0xF: # <<<<<<<<<<<<<<
32302 * raise KeyError('invalid key: {}'.format(key))
32303 *
32304 */
32305 }
32306
32307 /* "pysam/libcbcf.pyx":1635
32308 * raise KeyError('invalid key: {}'.format(key))
32309 *
32310 * bcf_hdr_remove(hdr, self.type, bkey) # <<<<<<<<<<<<<<
32311 * #bcf_hdr_sync(hdr)
32312 *
32313 */
32314 if (unlikely(__pyx_v_bkey == Py_None)) {
32315 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
32316 __PYX_ERR(0, 1635, __pyx_L1_error)
32317 }
32318 __pyx_t_9 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1635, __pyx_L1_error)
32319 bcf_hdr_remove(__pyx_v_hdr, __pyx_v_self->type, __pyx_t_9);
32320
32321 /* "pysam/libcbcf.pyx":1625
32322 * return makeVariantMetadata(self.header, self.type, kh_val_vdict(d, k).id)
32323 *
32324 * def remove_header(self, key): # <<<<<<<<<<<<<<
32325 * cdef bcf_hdr_t *hdr = self.header.ptr
32326 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
32327 */
32328
32329 /* function exit code */
32330 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32331 goto __pyx_L0;
32332 __pyx_L1_error:;
32333 __Pyx_XDECREF(__pyx_t_2);
32334 __Pyx_XDECREF(__pyx_t_6);
32335 __Pyx_XDECREF(__pyx_t_7);
32336 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.remove_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
32337 __pyx_r = NULL;
32338 __pyx_L0:;
32339 __Pyx_XDECREF(__pyx_v_bkey);
32340 __Pyx_XGIVEREF(__pyx_r);
32341 __Pyx_TraceReturn(__pyx_r, 0);
32342 __Pyx_RefNannyFinishContext();
32343 return __pyx_r;
32344 }
32345
32346 /* "pysam/libcbcf.pyx":1638
32347 * #bcf_hdr_sync(hdr)
32348 *
32349 * def clear_header(self): # <<<<<<<<<<<<<<
32350 * cdef bcf_hdr_t *hdr = self.header.ptr
32351 * bcf_hdr_remove(hdr, self.type, NULL)
32352 */
32353
32354 /* Python wrapper */
32355 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_13clear_header(PyObject *__pyx_v_self,
32356 #if CYTHON_METH_FASTCALL
32357 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
32358 #else
32359 PyObject *__pyx_args, PyObject *__pyx_kwds
32360 #endif
32361 ); /*proto*/
32362 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_12clear_header, "VariantHeaderMetadata.clear_header(self)");
32363 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_13clear_header = {"clear_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_13clear_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_12clear_header};
32364 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_13clear_header(PyObject *__pyx_v_self,
32365 #if CYTHON_METH_FASTCALL
32366 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
32367 #else
32368 PyObject *__pyx_args, PyObject *__pyx_kwds
32369 #endif
32370 ) {
32371 #if !CYTHON_METH_FASTCALL
32372 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
32373 #endif
32374 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
32375 PyObject *__pyx_r = 0;
32376 __Pyx_RefNannyDeclarations
32377 __Pyx_RefNannySetupContext("clear_header (wrapper)", 0);
32378 #if !CYTHON_METH_FASTCALL
32379 #if CYTHON_ASSUME_SAFE_MACROS
32380 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
32381 #else
32382 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
32383 #endif
32384 #endif
32385 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
32386 if (unlikely(__pyx_nargs > 0)) {
32387 __Pyx_RaiseArgtupleInvalid("clear_header", 1, 0, 0, __pyx_nargs); return NULL;}
32388 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear_header", 0))) return NULL;
32389 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_12clear_header(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
32390
32391 /* function exit code */
32392 __Pyx_RefNannyFinishContext();
32393 return __pyx_r;
32394 }
32395
32396 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_12clear_header(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
32397 bcf_hdr_t *__pyx_v_hdr;
32398 PyObject *__pyx_r = NULL;
32399 __Pyx_TraceDeclarations
32400 __Pyx_RefNannyDeclarations
32401 bcf_hdr_t *__pyx_t_1;
32402 int __pyx_lineno = 0;
32403 const char *__pyx_filename = NULL;
32404 int __pyx_clineno = 0;
32405 __Pyx_TraceFrameInit(__pyx_codeobj__63)
32406 __Pyx_RefNannySetupContext("clear_header", 1);
32407 __Pyx_TraceCall("clear_header", __pyx_f[0], 1638, 0, __PYX_ERR(0, 1638, __pyx_L1_error));
32408
32409 /* "pysam/libcbcf.pyx":1639
32410 *
32411 * def clear_header(self):
32412 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
32413 * bcf_hdr_remove(hdr, self.type, NULL)
32414 * #bcf_hdr_sync(hdr)
32415 */
32416 __pyx_t_1 = __pyx_v_self->header->ptr;
32417 __pyx_v_hdr = __pyx_t_1;
32418
32419 /* "pysam/libcbcf.pyx":1640
32420 * def clear_header(self):
32421 * cdef bcf_hdr_t *hdr = self.header.ptr
32422 * bcf_hdr_remove(hdr, self.type, NULL) # <<<<<<<<<<<<<<
32423 * #bcf_hdr_sync(hdr)
32424 *
32425 */
32426 bcf_hdr_remove(__pyx_v_hdr, __pyx_v_self->type, NULL);
32427
32428 /* "pysam/libcbcf.pyx":1638
32429 * #bcf_hdr_sync(hdr)
32430 *
32431 * def clear_header(self): # <<<<<<<<<<<<<<
32432 * cdef bcf_hdr_t *hdr = self.header.ptr
32433 * bcf_hdr_remove(hdr, self.type, NULL)
32434 */
32435
32436 /* function exit code */
32437 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32438 goto __pyx_L0;
32439 __pyx_L1_error:;
32440 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.clear_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
32441 __pyx_r = NULL;
32442 __pyx_L0:;
32443 __Pyx_XGIVEREF(__pyx_r);
32444 __Pyx_TraceReturn(__pyx_r, 0);
32445 __Pyx_RefNannyFinishContext();
32446 return __pyx_r;
32447 }
32448 static PyObject *__pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_16generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
32449
32450 /* "pysam/libcbcf.pyx":1643
32451 * #bcf_hdr_sync(hdr)
32452 *
32453 * def __iter__(self): # <<<<<<<<<<<<<<
32454 * cdef bcf_hdr_t *hdr = self.header.ptr
32455 * cdef bcf_idpair_t *idpair
32456 */
32457
32458 /* Python wrapper */
32459 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_15__iter__(PyObject *__pyx_v_self); /*proto*/
32460 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_15__iter__(PyObject *__pyx_v_self) {
32461 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
32462 PyObject *__pyx_r = 0;
32463 __Pyx_RefNannyDeclarations
32464 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
32465 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
32466 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_14__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
32467
32468 /* function exit code */
32469 __Pyx_RefNannyFinishContext();
32470 return __pyx_r;
32471 }
32472
32473 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_14__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
32474 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *__pyx_cur_scope;
32475 PyObject *__pyx_r = NULL;
32476 __Pyx_RefNannyDeclarations
32477 int __pyx_lineno = 0;
32478 const char *__pyx_filename = NULL;
32479 int __pyx_clineno = 0;
32480 __Pyx_RefNannySetupContext("__iter__", 0);
32481 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_11___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__, __pyx_empty_tuple, NULL);
32482 if (unlikely(!__pyx_cur_scope)) {
32483 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *)Py_None);
32484 __Pyx_INCREF(Py_None);
32485 __PYX_ERR(0, 1643, __pyx_L1_error)
32486 } else {
32487 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
32488 }
32489 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
32490 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
32491 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
32492 {
32493 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_16generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantHeaderMetadata___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1643, __pyx_L1_error)
32494 __Pyx_DECREF(__pyx_cur_scope);
32495 __Pyx_RefNannyFinishContext();
32496 return (PyObject *) gen;
32497 }
32498
32499 /* function exit code */
32500 __pyx_L1_error:;
32501 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32502 __pyx_r = NULL;
32503 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
32504 __Pyx_XGIVEREF(__pyx_r);
32505 __Pyx_RefNannyFinishContext();
32506 return __pyx_r;
32507 }
32508
32509 static PyObject *__pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_16generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
32510 {
32511 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *)__pyx_generator->closure);
32512 PyObject *__pyx_r = NULL;
32513 __Pyx_TraceDeclarations
32514 bcf_hdr_t *__pyx_t_1;
32515 int32_t __pyx_t_2;
32516 int32_t __pyx_t_3;
32517 int32_t __pyx_t_4;
32518 int __pyx_t_5;
32519 int __pyx_t_6;
32520 PyObject *__pyx_t_7 = NULL;
32521 int __pyx_lineno = 0;
32522 const char *__pyx_filename = NULL;
32523 int __pyx_clineno = 0;
32524 __Pyx_RefNannyDeclarations
32525 __Pyx_RefNannySetupContext("__iter__", 0);
32526 __Pyx_TraceCall("__iter__", __pyx_f[0], 1643, 0, __PYX_ERR(0, 1643, __pyx_L1_error));
32527 switch (__pyx_generator->resume_label) {
32528 case 0: goto __pyx_L3_first_run;
32529 case 1: goto __pyx_L10_resume_from_yield;
32530 default: /* CPython raises the right error here */
32531 __Pyx_TraceReturn(Py_None, 0);
32532 __Pyx_RefNannyFinishContext();
32533 return NULL;
32534 }
32535 __pyx_L3_first_run:;
32536 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1643, __pyx_L1_error)
32537
32538 /* "pysam/libcbcf.pyx":1644
32539 *
32540 * def __iter__(self):
32541 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
32542 * cdef bcf_idpair_t *idpair
32543 * cdef int32_t i
32544 */
32545 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->header->ptr;
32546 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
32547
32548 /* "pysam/libcbcf.pyx":1648
32549 * cdef int32_t i
32550 *
32551 * for i in range(hdr.n[BCF_DT_ID]): # <<<<<<<<<<<<<<
32552 * idpair = hdr.id[BCF_DT_ID] + i
32553 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
32554 */
32555 __pyx_t_2 = (__pyx_cur_scope->__pyx_v_hdr->n[BCF_DT_ID]);
32556 __pyx_t_3 = __pyx_t_2;
32557 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
32558 __pyx_cur_scope->__pyx_v_i = __pyx_t_4;
32559
32560 /* "pysam/libcbcf.pyx":1649
32561 *
32562 * for i in range(hdr.n[BCF_DT_ID]):
32563 * idpair = hdr.id[BCF_DT_ID] + i # <<<<<<<<<<<<<<
32564 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
32565 * yield bcf_str_cache_get_charptr(idpair.key)
32566 */
32567 __pyx_cur_scope->__pyx_v_idpair = ((__pyx_cur_scope->__pyx_v_hdr->id[BCF_DT_ID]) + __pyx_cur_scope->__pyx_v_i);
32568
32569 /* "pysam/libcbcf.pyx":1650
32570 * for i in range(hdr.n[BCF_DT_ID]):
32571 * idpair = hdr.id[BCF_DT_ID] + i
32572 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF: # <<<<<<<<<<<<<<
32573 * yield bcf_str_cache_get_charptr(idpair.key)
32574 *
32575 */
32576 __pyx_t_6 = (__pyx_cur_scope->__pyx_v_idpair->key != 0);
32577 if (__pyx_t_6) {
32578 } else {
32579 __pyx_t_5 = __pyx_t_6;
32580 goto __pyx_L7_bool_binop_done;
32581 }
32582 __pyx_t_6 = (__pyx_cur_scope->__pyx_v_idpair->val != 0);
32583 if (__pyx_t_6) {
32584 } else {
32585 __pyx_t_5 = __pyx_t_6;
32586 goto __pyx_L7_bool_binop_done;
32587 }
32588 __pyx_t_6 = (((__pyx_cur_scope->__pyx_v_idpair->val->info[__pyx_cur_scope->__pyx_v_self->type]) & 0xF) != 0xF);
32589 __pyx_t_5 = __pyx_t_6;
32590 __pyx_L7_bool_binop_done:;
32591 if (__pyx_t_5) {
32592
32593 /* "pysam/libcbcf.pyx":1651
32594 * idpair = hdr.id[BCF_DT_ID] + i
32595 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF:
32596 * yield bcf_str_cache_get_charptr(idpair.key) # <<<<<<<<<<<<<<
32597 *
32598 * def get(self, key, default=None):
32599 */
32600 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(__pyx_cur_scope->__pyx_v_idpair->key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1651, __pyx_L1_error)
32601 __Pyx_GOTREF(__pyx_t_7);
32602 __pyx_r = __pyx_t_7;
32603 __pyx_t_7 = 0;
32604 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
32605 __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
32606 __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
32607 __Pyx_XGIVEREF(__pyx_r);
32608 __Pyx_TraceReturn(__pyx_r, 0);
32609 __Pyx_RefNannyFinishContext();
32610 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
32611 /* return from generator, yielding value */
32612 __pyx_generator->resume_label = 1;
32613 return __pyx_r;
32614 __pyx_L10_resume_from_yield:;
32615 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
32616 __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
32617 __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
32618 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1651, __pyx_L1_error)
32619
32620 /* "pysam/libcbcf.pyx":1650
32621 * for i in range(hdr.n[BCF_DT_ID]):
32622 * idpair = hdr.id[BCF_DT_ID] + i
32623 * if idpair.key and idpair.val and idpair.val.info[self.type] & 0xF != 0xF: # <<<<<<<<<<<<<<
32624 * yield bcf_str_cache_get_charptr(idpair.key)
32625 *
32626 */
32627 }
32628 }
32629 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
32630
32631 /* "pysam/libcbcf.pyx":1643
32632 * #bcf_hdr_sync(hdr)
32633 *
32634 * def __iter__(self): # <<<<<<<<<<<<<<
32635 * cdef bcf_hdr_t *hdr = self.header.ptr
32636 * cdef bcf_idpair_t *idpair
32637 */
32638
32639 /* function exit code */
32640 PyErr_SetNone(PyExc_StopIteration);
32641 goto __pyx_L0;
32642 __pyx_L1_error:;
32643 __Pyx_Generator_Replace_StopIteration(0);
32644 __Pyx_XDECREF(__pyx_t_7);
32645 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32646 __pyx_L0:;
32647 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
32648 #if !CYTHON_USE_EXC_INFO_STACK
32649 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
32650 #endif
32651 __pyx_generator->resume_label = -1;
32652 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
32653 __Pyx_TraceReturn(__pyx_r, 0);
32654 __Pyx_RefNannyFinishContext();
32655 return __pyx_r;
32656 }
32657
32658 /* "pysam/libcbcf.pyx":1653
32659 * yield bcf_str_cache_get_charptr(idpair.key)
32660 *
32661 * def get(self, key, default=None): # <<<<<<<<<<<<<<
32662 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
32663 * try:
32664 */
32665
32666 /* Python wrapper */
32667 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_18get(PyObject *__pyx_v_self,
32668 #if CYTHON_METH_FASTCALL
32669 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
32670 #else
32671 PyObject *__pyx_args, PyObject *__pyx_kwds
32672 #endif
32673 ); /*proto*/
32674 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_17get, "VariantHeaderMetadata.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
32675 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_18get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_18get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_17get};
32676 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_18get(PyObject *__pyx_v_self,
32677 #if CYTHON_METH_FASTCALL
32678 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
32679 #else
32680 PyObject *__pyx_args, PyObject *__pyx_kwds
32681 #endif
32682 ) {
32683 PyObject *__pyx_v_key = 0;
32684 PyObject *__pyx_v_default = 0;
32685 #if !CYTHON_METH_FASTCALL
32686 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
32687 #endif
32688 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
32689 PyObject* values[2] = {0,0};
32690 int __pyx_lineno = 0;
32691 const char *__pyx_filename = NULL;
32692 int __pyx_clineno = 0;
32693 PyObject *__pyx_r = 0;
32694 __Pyx_RefNannyDeclarations
32695 __Pyx_RefNannySetupContext("get (wrapper)", 0);
32696 #if !CYTHON_METH_FASTCALL
32697 #if CYTHON_ASSUME_SAFE_MACROS
32698 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
32699 #else
32700 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
32701 #endif
32702 #endif
32703 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
32704 {
32705 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
32706 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
32707 if (__pyx_kwds) {
32708 Py_ssize_t kw_args;
32709 switch (__pyx_nargs) {
32710 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
32711 CYTHON_FALLTHROUGH;
32712 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
32713 CYTHON_FALLTHROUGH;
32714 case 0: break;
32715 default: goto __pyx_L5_argtuple_error;
32716 }
32717 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
32718 switch (__pyx_nargs) {
32719 case 0:
32720 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
32721 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
32722 kw_args--;
32723 }
32724 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1653, __pyx_L3_error)
32725 else goto __pyx_L5_argtuple_error;
32726 CYTHON_FALLTHROUGH;
32727 case 1:
32728 if (kw_args > 0) {
32729 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
32730 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
32731 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1653, __pyx_L3_error)
32732 }
32733 }
32734 if (unlikely(kw_args > 0)) {
32735 const Py_ssize_t kwd_pos_args = __pyx_nargs;
32736 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 1653, __pyx_L3_error)
32737 }
32738 } else {
32739 switch (__pyx_nargs) {
32740 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
32741 CYTHON_FALLTHROUGH;
32742 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
32743 break;
32744 default: goto __pyx_L5_argtuple_error;
32745 }
32746 }
32747 __pyx_v_key = values[0];
32748 __pyx_v_default = values[1];
32749 }
32750 goto __pyx_L6_skip;
32751 __pyx_L5_argtuple_error:;
32752 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1653, __pyx_L3_error)
32753 __pyx_L6_skip:;
32754 goto __pyx_L4_argument_unpacking_done;
32755 __pyx_L3_error:;
32756 {
32757 Py_ssize_t __pyx_temp;
32758 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
32759 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
32760 }
32761 }
32762 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
32763 __Pyx_RefNannyFinishContext();
32764 return NULL;
32765 __pyx_L4_argument_unpacking_done:;
32766 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_17get(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
32767
32768 /* function exit code */
32769 {
32770 Py_ssize_t __pyx_temp;
32771 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
32772 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
32773 }
32774 }
32775 __Pyx_RefNannyFinishContext();
32776 return __pyx_r;
32777 }
32778
32779 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_17get(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
32780 PyObject *__pyx_r = NULL;
32781 __Pyx_TraceDeclarations
32782 __Pyx_RefNannyDeclarations
32783 PyObject *__pyx_t_1 = NULL;
32784 PyObject *__pyx_t_2 = NULL;
32785 PyObject *__pyx_t_3 = NULL;
32786 PyObject *__pyx_t_4 = NULL;
32787 int __pyx_t_5;
32788 PyObject *__pyx_t_6 = NULL;
32789 PyObject *__pyx_t_7 = NULL;
32790 int __pyx_lineno = 0;
32791 const char *__pyx_filename = NULL;
32792 int __pyx_clineno = 0;
32793 __Pyx_TraceFrameInit(__pyx_codeobj__64)
32794 __Pyx_RefNannySetupContext("get", 1);
32795 __Pyx_TraceCall("get", __pyx_f[0], 1653, 0, __PYX_ERR(0, 1653, __pyx_L1_error));
32796
32797 /* "pysam/libcbcf.pyx":1655
32798 * def get(self, key, default=None):
32799 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
32800 * try: # <<<<<<<<<<<<<<
32801 * return self[key]
32802 * except KeyError:
32803 */
32804 {
32805 __Pyx_PyThreadState_declare
32806 __Pyx_PyThreadState_assign
32807 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
32808 __Pyx_XGOTREF(__pyx_t_1);
32809 __Pyx_XGOTREF(__pyx_t_2);
32810 __Pyx_XGOTREF(__pyx_t_3);
32811 /*try:*/ {
32812
32813 /* "pysam/libcbcf.pyx":1656
32814 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
32815 * try:
32816 * return self[key] # <<<<<<<<<<<<<<
32817 * except KeyError:
32818 * return default
32819 */
32820 __Pyx_XDECREF(__pyx_r);
32821 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1656, __pyx_L3_error)
32822 __Pyx_GOTREF(__pyx_t_4);
32823 __pyx_r = __pyx_t_4;
32824 __pyx_t_4 = 0;
32825 goto __pyx_L7_try_return;
32826
32827 /* "pysam/libcbcf.pyx":1655
32828 * def get(self, key, default=None):
32829 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
32830 * try: # <<<<<<<<<<<<<<
32831 * return self[key]
32832 * except KeyError:
32833 */
32834 }
32835 __pyx_L3_error:;
32836 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
32837
32838 /* "pysam/libcbcf.pyx":1657
32839 * try:
32840 * return self[key]
32841 * except KeyError: # <<<<<<<<<<<<<<
32842 * return default
32843 *
32844 */
32845 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
32846 if (__pyx_t_5) {
32847 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
32848 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1657, __pyx_L5_except_error)
32849 __Pyx_XGOTREF(__pyx_t_4);
32850 __Pyx_XGOTREF(__pyx_t_6);
32851 __Pyx_XGOTREF(__pyx_t_7);
32852
32853 /* "pysam/libcbcf.pyx":1658
32854 * return self[key]
32855 * except KeyError:
32856 * return default # <<<<<<<<<<<<<<
32857 *
32858 * def __contains__(self, key):
32859 */
32860 __Pyx_XDECREF(__pyx_r);
32861 __Pyx_INCREF(__pyx_v_default);
32862 __pyx_r = __pyx_v_default;
32863 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32864 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32865 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32866 goto __pyx_L6_except_return;
32867 }
32868 goto __pyx_L5_except_error;
32869
32870 /* "pysam/libcbcf.pyx":1655
32871 * def get(self, key, default=None):
32872 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
32873 * try: # <<<<<<<<<<<<<<
32874 * return self[key]
32875 * except KeyError:
32876 */
32877 __pyx_L5_except_error:;
32878 __Pyx_XGIVEREF(__pyx_t_1);
32879 __Pyx_XGIVEREF(__pyx_t_2);
32880 __Pyx_XGIVEREF(__pyx_t_3);
32881 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
32882 goto __pyx_L1_error;
32883 __pyx_L7_try_return:;
32884 __Pyx_XGIVEREF(__pyx_t_1);
32885 __Pyx_XGIVEREF(__pyx_t_2);
32886 __Pyx_XGIVEREF(__pyx_t_3);
32887 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
32888 goto __pyx_L0;
32889 __pyx_L6_except_return:;
32890 __Pyx_XGIVEREF(__pyx_t_1);
32891 __Pyx_XGIVEREF(__pyx_t_2);
32892 __Pyx_XGIVEREF(__pyx_t_3);
32893 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
32894 goto __pyx_L0;
32895 }
32896
32897 /* "pysam/libcbcf.pyx":1653
32898 * yield bcf_str_cache_get_charptr(idpair.key)
32899 *
32900 * def get(self, key, default=None): # <<<<<<<<<<<<<<
32901 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
32902 * try:
32903 */
32904
32905 /* function exit code */
32906 __pyx_L1_error:;
32907 __Pyx_XDECREF(__pyx_t_4);
32908 __Pyx_XDECREF(__pyx_t_6);
32909 __Pyx_XDECREF(__pyx_t_7);
32910 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
32911 __pyx_r = NULL;
32912 __pyx_L0:;
32913 __Pyx_XGIVEREF(__pyx_r);
32914 __Pyx_TraceReturn(__pyx_r, 0);
32915 __Pyx_RefNannyFinishContext();
32916 return __pyx_r;
32917 }
32918
32919 /* "pysam/libcbcf.pyx":1660
32920 * return default
32921 *
32922 * def __contains__(self, key): # <<<<<<<<<<<<<<
32923 * try:
32924 * self[key]
32925 */
32926
32927 /* Python wrapper */
32928 static int __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
32929 static int __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
32930 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
32931 int __pyx_r;
32932 __Pyx_RefNannyDeclarations
32933 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
32934 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
32935 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_19__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self), ((PyObject *)__pyx_v_key));
32936
32937 /* function exit code */
32938 __Pyx_RefNannyFinishContext();
32939 return __pyx_r;
32940 }
32941
32942 static int __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_19__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v_key) {
32943 int __pyx_r;
32944 __Pyx_TraceDeclarations
32945 __Pyx_RefNannyDeclarations
32946 PyObject *__pyx_t_1 = NULL;
32947 PyObject *__pyx_t_2 = NULL;
32948 PyObject *__pyx_t_3 = NULL;
32949 PyObject *__pyx_t_4 = NULL;
32950 int __pyx_t_5;
32951 PyObject *__pyx_t_6 = NULL;
32952 PyObject *__pyx_t_7 = NULL;
32953 int __pyx_lineno = 0;
32954 const char *__pyx_filename = NULL;
32955 int __pyx_clineno = 0;
32956 __Pyx_RefNannySetupContext("__contains__", 1);
32957 __Pyx_TraceCall("__contains__", __pyx_f[0], 1660, 0, __PYX_ERR(0, 1660, __pyx_L1_error));
32958
32959 /* "pysam/libcbcf.pyx":1661
32960 *
32961 * def __contains__(self, key):
32962 * try: # <<<<<<<<<<<<<<
32963 * self[key]
32964 * except KeyError:
32965 */
32966 {
32967 __Pyx_PyThreadState_declare
32968 __Pyx_PyThreadState_assign
32969 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
32970 __Pyx_XGOTREF(__pyx_t_1);
32971 __Pyx_XGOTREF(__pyx_t_2);
32972 __Pyx_XGOTREF(__pyx_t_3);
32973 /*try:*/ {
32974
32975 /* "pysam/libcbcf.pyx":1662
32976 * def __contains__(self, key):
32977 * try:
32978 * self[key] # <<<<<<<<<<<<<<
32979 * except KeyError:
32980 * return False
32981 */
32982 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1662, __pyx_L3_error)
32983 __Pyx_GOTREF(__pyx_t_4);
32984 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32985
32986 /* "pysam/libcbcf.pyx":1661
32987 *
32988 * def __contains__(self, key):
32989 * try: # <<<<<<<<<<<<<<
32990 * self[key]
32991 * except KeyError:
32992 */
32993 }
32994
32995 /* "pysam/libcbcf.pyx":1666
32996 * return False
32997 * else:
32998 * return True # <<<<<<<<<<<<<<
32999 *
33000 * def iterkeys(self):
33001 */
33002 /*else:*/ {
33003 __pyx_r = 1;
33004 goto __pyx_L6_except_return;
33005 }
33006 __pyx_L3_error:;
33007 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
33008
33009 /* "pysam/libcbcf.pyx":1663
33010 * try:
33011 * self[key]
33012 * except KeyError: # <<<<<<<<<<<<<<
33013 * return False
33014 * else:
33015 */
33016 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
33017 if (__pyx_t_5) {
33018 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33019 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1663, __pyx_L5_except_error)
33020 __Pyx_XGOTREF(__pyx_t_4);
33021 __Pyx_XGOTREF(__pyx_t_6);
33022 __Pyx_XGOTREF(__pyx_t_7);
33023
33024 /* "pysam/libcbcf.pyx":1664
33025 * self[key]
33026 * except KeyError:
33027 * return False # <<<<<<<<<<<<<<
33028 * else:
33029 * return True
33030 */
33031 __pyx_r = 0;
33032 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33033 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33034 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
33035 goto __pyx_L6_except_return;
33036 }
33037 goto __pyx_L5_except_error;
33038
33039 /* "pysam/libcbcf.pyx":1661
33040 *
33041 * def __contains__(self, key):
33042 * try: # <<<<<<<<<<<<<<
33043 * self[key]
33044 * except KeyError:
33045 */
33046 __pyx_L5_except_error:;
33047 __Pyx_XGIVEREF(__pyx_t_1);
33048 __Pyx_XGIVEREF(__pyx_t_2);
33049 __Pyx_XGIVEREF(__pyx_t_3);
33050 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
33051 goto __pyx_L1_error;
33052 __pyx_L6_except_return:;
33053 __Pyx_XGIVEREF(__pyx_t_1);
33054 __Pyx_XGIVEREF(__pyx_t_2);
33055 __Pyx_XGIVEREF(__pyx_t_3);
33056 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
33057 goto __pyx_L0;
33058 }
33059
33060 /* "pysam/libcbcf.pyx":1660
33061 * return default
33062 *
33063 * def __contains__(self, key): # <<<<<<<<<<<<<<
33064 * try:
33065 * self[key]
33066 */
33067
33068 /* function exit code */
33069 __pyx_L1_error:;
33070 __Pyx_XDECREF(__pyx_t_4);
33071 __Pyx_XDECREF(__pyx_t_6);
33072 __Pyx_XDECREF(__pyx_t_7);
33073 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33074 __pyx_r = -1;
33075 __pyx_L0:;
33076 __Pyx_TraceReturn(Py_None, 0);
33077 __Pyx_RefNannyFinishContext();
33078 return __pyx_r;
33079 }
33080
33081 /* "pysam/libcbcf.pyx":1668
33082 * return True
33083 *
33084 * def iterkeys(self): # <<<<<<<<<<<<<<
33085 * """D.iterkeys() -> an iterator over the keys of D"""
33086 * return iter(self)
33087 */
33088
33089 /* Python wrapper */
33090 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_22iterkeys(PyObject *__pyx_v_self,
33091 #if CYTHON_METH_FASTCALL
33092 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33093 #else
33094 PyObject *__pyx_args, PyObject *__pyx_kwds
33095 #endif
33096 ); /*proto*/
33097 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_21iterkeys, "VariantHeaderMetadata.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
33098 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_22iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_22iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_21iterkeys};
33099 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_22iterkeys(PyObject *__pyx_v_self,
33100 #if CYTHON_METH_FASTCALL
33101 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33102 #else
33103 PyObject *__pyx_args, PyObject *__pyx_kwds
33104 #endif
33105 ) {
33106 #if !CYTHON_METH_FASTCALL
33107 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
33108 #endif
33109 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
33110 PyObject *__pyx_r = 0;
33111 __Pyx_RefNannyDeclarations
33112 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
33113 #if !CYTHON_METH_FASTCALL
33114 #if CYTHON_ASSUME_SAFE_MACROS
33115 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
33116 #else
33117 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
33118 #endif
33119 #endif
33120 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
33121 if (unlikely(__pyx_nargs > 0)) {
33122 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
33123 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
33124 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_21iterkeys(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
33125
33126 /* function exit code */
33127 __Pyx_RefNannyFinishContext();
33128 return __pyx_r;
33129 }
33130
33131 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_21iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
33132 PyObject *__pyx_r = NULL;
33133 __Pyx_TraceDeclarations
33134 __Pyx_RefNannyDeclarations
33135 PyObject *__pyx_t_1 = NULL;
33136 int __pyx_lineno = 0;
33137 const char *__pyx_filename = NULL;
33138 int __pyx_clineno = 0;
33139 __Pyx_TraceFrameInit(__pyx_codeobj__65)
33140 __Pyx_RefNannySetupContext("iterkeys", 1);
33141 __Pyx_TraceCall("iterkeys", __pyx_f[0], 1668, 0, __PYX_ERR(0, 1668, __pyx_L1_error));
33142
33143 /* "pysam/libcbcf.pyx":1670
33144 * def iterkeys(self):
33145 * """D.iterkeys() -> an iterator over the keys of D"""
33146 * return iter(self) # <<<<<<<<<<<<<<
33147 *
33148 * def itervalues(self):
33149 */
33150 __Pyx_XDECREF(__pyx_r);
33151 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
33152 __Pyx_GOTREF(__pyx_t_1);
33153 __pyx_r = __pyx_t_1;
33154 __pyx_t_1 = 0;
33155 goto __pyx_L0;
33156
33157 /* "pysam/libcbcf.pyx":1668
33158 * return True
33159 *
33160 * def iterkeys(self): # <<<<<<<<<<<<<<
33161 * """D.iterkeys() -> an iterator over the keys of D"""
33162 * return iter(self)
33163 */
33164
33165 /* function exit code */
33166 __pyx_L1_error:;
33167 __Pyx_XDECREF(__pyx_t_1);
33168 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
33169 __pyx_r = NULL;
33170 __pyx_L0:;
33171 __Pyx_XGIVEREF(__pyx_r);
33172 __Pyx_TraceReturn(__pyx_r, 0);
33173 __Pyx_RefNannyFinishContext();
33174 return __pyx_r;
33175 }
33176 static PyObject *__pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_25generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
33177
33178 /* "pysam/libcbcf.pyx":1672
33179 * return iter(self)
33180 *
33181 * def itervalues(self): # <<<<<<<<<<<<<<
33182 * """D.itervalues() -> an iterator over the values of D"""
33183 * for key in self:
33184 */
33185
33186 /* Python wrapper */
33187 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_24itervalues(PyObject *__pyx_v_self,
33188 #if CYTHON_METH_FASTCALL
33189 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33190 #else
33191 PyObject *__pyx_args, PyObject *__pyx_kwds
33192 #endif
33193 ); /*proto*/
33194 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_23itervalues, "VariantHeaderMetadata.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
33195 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_24itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_24itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_23itervalues};
33196 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_24itervalues(PyObject *__pyx_v_self,
33197 #if CYTHON_METH_FASTCALL
33198 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33199 #else
33200 PyObject *__pyx_args, PyObject *__pyx_kwds
33201 #endif
33202 ) {
33203 #if !CYTHON_METH_FASTCALL
33204 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
33205 #endif
33206 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
33207 PyObject *__pyx_r = 0;
33208 __Pyx_RefNannyDeclarations
33209 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
33210 #if !CYTHON_METH_FASTCALL
33211 #if CYTHON_ASSUME_SAFE_MACROS
33212 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
33213 #else
33214 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
33215 #endif
33216 #endif
33217 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
33218 if (unlikely(__pyx_nargs > 0)) {
33219 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
33220 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
33221 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_23itervalues(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
33222
33223 /* function exit code */
33224 __Pyx_RefNannyFinishContext();
33225 return __pyx_r;
33226 }
33227
33228 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_23itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
33229 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *__pyx_cur_scope;
33230 PyObject *__pyx_r = NULL;
33231 __Pyx_RefNannyDeclarations
33232 int __pyx_lineno = 0;
33233 const char *__pyx_filename = NULL;
33234 int __pyx_clineno = 0;
33235 __Pyx_RefNannySetupContext("itervalues", 0);
33236 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_12_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues, __pyx_empty_tuple, NULL);
33237 if (unlikely(!__pyx_cur_scope)) {
33238 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *)Py_None);
33239 __Pyx_INCREF(Py_None);
33240 __PYX_ERR(0, 1672, __pyx_L1_error)
33241 } else {
33242 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
33243 }
33244 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
33245 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
33246 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
33247 {
33248 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_25generator5, __pyx_codeobj__66, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_VariantHeaderMetadata_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1672, __pyx_L1_error)
33249 __Pyx_DECREF(__pyx_cur_scope);
33250 __Pyx_RefNannyFinishContext();
33251 return (PyObject *) gen;
33252 }
33253
33254 /* function exit code */
33255 __pyx_L1_error:;
33256 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
33257 __pyx_r = NULL;
33258 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
33259 __Pyx_XGIVEREF(__pyx_r);
33260 __Pyx_RefNannyFinishContext();
33261 return __pyx_r;
33262 }
33263
33264 static PyObject *__pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_25generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
33265 {
33266 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *)__pyx_generator->closure);
33267 PyObject *__pyx_r = NULL;
33268 __Pyx_TraceDeclarations
33269 PyObject *__pyx_t_1 = NULL;
33270 Py_ssize_t __pyx_t_2;
33271 PyObject *(*__pyx_t_3)(PyObject *);
33272 PyObject *__pyx_t_4 = NULL;
33273 int __pyx_lineno = 0;
33274 const char *__pyx_filename = NULL;
33275 int __pyx_clineno = 0;
33276 __Pyx_RefNannyDeclarations
33277 __Pyx_RefNannySetupContext("itervalues", 0);
33278 __Pyx_TraceFrameInit(__pyx_codeobj__66)
33279 __Pyx_TraceCall("itervalues", __pyx_f[0], 1672, 0, __PYX_ERR(0, 1672, __pyx_L1_error));
33280 switch (__pyx_generator->resume_label) {
33281 case 0: goto __pyx_L3_first_run;
33282 case 1: goto __pyx_L6_resume_from_yield;
33283 default: /* CPython raises the right error here */
33284 __Pyx_TraceReturn(Py_None, 0);
33285 __Pyx_RefNannyFinishContext();
33286 return NULL;
33287 }
33288 __pyx_L3_first_run:;
33289 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1672, __pyx_L1_error)
33290
33291 /* "pysam/libcbcf.pyx":1674
33292 * def itervalues(self):
33293 * """D.itervalues() -> an iterator over the values of D"""
33294 * for key in self: # <<<<<<<<<<<<<<
33295 * yield self[key]
33296 *
33297 */
33298 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
33299 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
33300 __pyx_t_2 = 0;
33301 __pyx_t_3 = NULL;
33302 } else {
33303 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error)
33304 __Pyx_GOTREF(__pyx_t_1);
33305 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error)
33306 }
33307 for (;;) {
33308 if (likely(!__pyx_t_3)) {
33309 if (likely(PyList_CheckExact(__pyx_t_1))) {
33310 {
33311 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
33312 #if !CYTHON_ASSUME_SAFE_MACROS
33313 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1674, __pyx_L1_error)
33314 #endif
33315 if (__pyx_t_2 >= __pyx_temp) break;
33316 }
33317 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
33318 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1674, __pyx_L1_error)
33319 #else
33320 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error)
33321 __Pyx_GOTREF(__pyx_t_4);
33322 #endif
33323 } else {
33324 {
33325 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
33326 #if !CYTHON_ASSUME_SAFE_MACROS
33327 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1674, __pyx_L1_error)
33328 #endif
33329 if (__pyx_t_2 >= __pyx_temp) break;
33330 }
33331 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
33332 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1674, __pyx_L1_error)
33333 #else
33334 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error)
33335 __Pyx_GOTREF(__pyx_t_4);
33336 #endif
33337 }
33338 } else {
33339 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
33340 if (unlikely(!__pyx_t_4)) {
33341 PyObject* exc_type = PyErr_Occurred();
33342 if (exc_type) {
33343 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
33344 else __PYX_ERR(0, 1674, __pyx_L1_error)
33345 }
33346 break;
33347 }
33348 __Pyx_GOTREF(__pyx_t_4);
33349 }
33350 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
33351 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
33352 __Pyx_GIVEREF(__pyx_t_4);
33353 __pyx_t_4 = 0;
33354
33355 /* "pysam/libcbcf.pyx":1675
33356 * """D.itervalues() -> an iterator over the values of D"""
33357 * for key in self:
33358 * yield self[key] # <<<<<<<<<<<<<<
33359 *
33360 * def iteritems(self):
33361 */
33362 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1675, __pyx_L1_error)
33363 __Pyx_GOTREF(__pyx_t_4);
33364 __pyx_r = __pyx_t_4;
33365 __pyx_t_4 = 0;
33366 __Pyx_XGIVEREF(__pyx_t_1);
33367 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
33368 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
33369 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
33370 __Pyx_XGIVEREF(__pyx_r);
33371 __Pyx_TraceReturn(__pyx_r, 0);
33372 __Pyx_RefNannyFinishContext();
33373 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
33374 /* return from generator, yielding value */
33375 __pyx_generator->resume_label = 1;
33376 return __pyx_r;
33377 __pyx_L6_resume_from_yield:;
33378 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
33379 __pyx_cur_scope->__pyx_t_0 = 0;
33380 __Pyx_XGOTREF(__pyx_t_1);
33381 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
33382 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
33383 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1675, __pyx_L1_error)
33384
33385 /* "pysam/libcbcf.pyx":1674
33386 * def itervalues(self):
33387 * """D.itervalues() -> an iterator over the values of D"""
33388 * for key in self: # <<<<<<<<<<<<<<
33389 * yield self[key]
33390 *
33391 */
33392 }
33393 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
33394 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
33395
33396 /* "pysam/libcbcf.pyx":1672
33397 * return iter(self)
33398 *
33399 * def itervalues(self): # <<<<<<<<<<<<<<
33400 * """D.itervalues() -> an iterator over the values of D"""
33401 * for key in self:
33402 */
33403
33404 /* function exit code */
33405 PyErr_SetNone(PyExc_StopIteration);
33406 goto __pyx_L0;
33407 __pyx_L1_error:;
33408 __Pyx_Generator_Replace_StopIteration(0);
33409 __Pyx_XDECREF(__pyx_t_1);
33410 __Pyx_XDECREF(__pyx_t_4);
33411 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
33412 __pyx_L0:;
33413 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
33414 #if !CYTHON_USE_EXC_INFO_STACK
33415 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
33416 #endif
33417 __pyx_generator->resume_label = -1;
33418 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
33419 __Pyx_TraceReturn(__pyx_r, 0);
33420 __Pyx_RefNannyFinishContext();
33421 return __pyx_r;
33422 }
33423 static PyObject *__pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_28generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
33424
33425 /* "pysam/libcbcf.pyx":1677
33426 * yield self[key]
33427 *
33428 * def iteritems(self): # <<<<<<<<<<<<<<
33429 * """D.iteritems() -> an iterator over the (key, value) items of D"""
33430 * for key in self:
33431 */
33432
33433 /* Python wrapper */
33434 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_27iteritems(PyObject *__pyx_v_self,
33435 #if CYTHON_METH_FASTCALL
33436 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33437 #else
33438 PyObject *__pyx_args, PyObject *__pyx_kwds
33439 #endif
33440 ); /*proto*/
33441 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_26iteritems, "VariantHeaderMetadata.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
33442 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_27iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_27iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_26iteritems};
33443 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_27iteritems(PyObject *__pyx_v_self,
33444 #if CYTHON_METH_FASTCALL
33445 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33446 #else
33447 PyObject *__pyx_args, PyObject *__pyx_kwds
33448 #endif
33449 ) {
33450 #if !CYTHON_METH_FASTCALL
33451 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
33452 #endif
33453 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
33454 PyObject *__pyx_r = 0;
33455 __Pyx_RefNannyDeclarations
33456 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
33457 #if !CYTHON_METH_FASTCALL
33458 #if CYTHON_ASSUME_SAFE_MACROS
33459 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
33460 #else
33461 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
33462 #endif
33463 #endif
33464 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
33465 if (unlikely(__pyx_nargs > 0)) {
33466 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
33467 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
33468 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_26iteritems(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
33469
33470 /* function exit code */
33471 __Pyx_RefNannyFinishContext();
33472 return __pyx_r;
33473 }
33474
33475 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_26iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
33476 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *__pyx_cur_scope;
33477 PyObject *__pyx_r = NULL;
33478 __Pyx_RefNannyDeclarations
33479 int __pyx_lineno = 0;
33480 const char *__pyx_filename = NULL;
33481 int __pyx_clineno = 0;
33482 __Pyx_RefNannySetupContext("iteritems", 0);
33483 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_13_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems, __pyx_empty_tuple, NULL);
33484 if (unlikely(!__pyx_cur_scope)) {
33485 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *)Py_None);
33486 __Pyx_INCREF(Py_None);
33487 __PYX_ERR(0, 1677, __pyx_L1_error)
33488 } else {
33489 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
33490 }
33491 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
33492 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
33493 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
33494 {
33495 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_28generator6, __pyx_codeobj__67, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_VariantHeaderMetadata_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1677, __pyx_L1_error)
33496 __Pyx_DECREF(__pyx_cur_scope);
33497 __Pyx_RefNannyFinishContext();
33498 return (PyObject *) gen;
33499 }
33500
33501 /* function exit code */
33502 __pyx_L1_error:;
33503 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
33504 __pyx_r = NULL;
33505 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
33506 __Pyx_XGIVEREF(__pyx_r);
33507 __Pyx_RefNannyFinishContext();
33508 return __pyx_r;
33509 }
33510
33511 static PyObject *__pyx_gb_5pysam_7libcbcf_21VariantHeaderMetadata_28generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
33512 {
33513 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *)__pyx_generator->closure);
33514 PyObject *__pyx_r = NULL;
33515 __Pyx_TraceDeclarations
33516 PyObject *__pyx_t_1 = NULL;
33517 Py_ssize_t __pyx_t_2;
33518 PyObject *(*__pyx_t_3)(PyObject *);
33519 PyObject *__pyx_t_4 = NULL;
33520 PyObject *__pyx_t_5 = NULL;
33521 int __pyx_lineno = 0;
33522 const char *__pyx_filename = NULL;
33523 int __pyx_clineno = 0;
33524 __Pyx_RefNannyDeclarations
33525 __Pyx_RefNannySetupContext("iteritems", 0);
33526 __Pyx_TraceFrameInit(__pyx_codeobj__67)
33527 __Pyx_TraceCall("iteritems", __pyx_f[0], 1677, 0, __PYX_ERR(0, 1677, __pyx_L1_error));
33528 switch (__pyx_generator->resume_label) {
33529 case 0: goto __pyx_L3_first_run;
33530 case 1: goto __pyx_L6_resume_from_yield;
33531 default: /* CPython raises the right error here */
33532 __Pyx_TraceReturn(Py_None, 0);
33533 __Pyx_RefNannyFinishContext();
33534 return NULL;
33535 }
33536 __pyx_L3_first_run:;
33537 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1677, __pyx_L1_error)
33538
33539 /* "pysam/libcbcf.pyx":1679
33540 * def iteritems(self):
33541 * """D.iteritems() -> an iterator over the (key, value) items of D"""
33542 * for key in self: # <<<<<<<<<<<<<<
33543 * yield (key, self[key])
33544 *
33545 */
33546 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
33547 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
33548 __pyx_t_2 = 0;
33549 __pyx_t_3 = NULL;
33550 } else {
33551 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error)
33552 __Pyx_GOTREF(__pyx_t_1);
33553 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1679, __pyx_L1_error)
33554 }
33555 for (;;) {
33556 if (likely(!__pyx_t_3)) {
33557 if (likely(PyList_CheckExact(__pyx_t_1))) {
33558 {
33559 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
33560 #if !CYTHON_ASSUME_SAFE_MACROS
33561 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1679, __pyx_L1_error)
33562 #endif
33563 if (__pyx_t_2 >= __pyx_temp) break;
33564 }
33565 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
33566 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1679, __pyx_L1_error)
33567 #else
33568 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1679, __pyx_L1_error)
33569 __Pyx_GOTREF(__pyx_t_4);
33570 #endif
33571 } else {
33572 {
33573 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
33574 #if !CYTHON_ASSUME_SAFE_MACROS
33575 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1679, __pyx_L1_error)
33576 #endif
33577 if (__pyx_t_2 >= __pyx_temp) break;
33578 }
33579 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
33580 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1679, __pyx_L1_error)
33581 #else
33582 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1679, __pyx_L1_error)
33583 __Pyx_GOTREF(__pyx_t_4);
33584 #endif
33585 }
33586 } else {
33587 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
33588 if (unlikely(!__pyx_t_4)) {
33589 PyObject* exc_type = PyErr_Occurred();
33590 if (exc_type) {
33591 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
33592 else __PYX_ERR(0, 1679, __pyx_L1_error)
33593 }
33594 break;
33595 }
33596 __Pyx_GOTREF(__pyx_t_4);
33597 }
33598 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
33599 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
33600 __Pyx_GIVEREF(__pyx_t_4);
33601 __pyx_t_4 = 0;
33602
33603 /* "pysam/libcbcf.pyx":1680
33604 * """D.iteritems() -> an iterator over the (key, value) items of D"""
33605 * for key in self:
33606 * yield (key, self[key]) # <<<<<<<<<<<<<<
33607 *
33608 * def keys(self):
33609 */
33610 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1680, __pyx_L1_error)
33611 __Pyx_GOTREF(__pyx_t_4);
33612 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1680, __pyx_L1_error)
33613 __Pyx_GOTREF(__pyx_t_5);
33614 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
33615 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
33616 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_key)) __PYX_ERR(0, 1680, __pyx_L1_error);
33617 __Pyx_GIVEREF(__pyx_t_4);
33618 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1680, __pyx_L1_error);
33619 __pyx_t_4 = 0;
33620 __pyx_r = __pyx_t_5;
33621 __pyx_t_5 = 0;
33622 __Pyx_XGIVEREF(__pyx_t_1);
33623 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
33624 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
33625 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
33626 __Pyx_XGIVEREF(__pyx_r);
33627 __Pyx_TraceReturn(__pyx_r, 0);
33628 __Pyx_RefNannyFinishContext();
33629 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
33630 /* return from generator, yielding value */
33631 __pyx_generator->resume_label = 1;
33632 return __pyx_r;
33633 __pyx_L6_resume_from_yield:;
33634 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
33635 __pyx_cur_scope->__pyx_t_0 = 0;
33636 __Pyx_XGOTREF(__pyx_t_1);
33637 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
33638 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
33639 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1680, __pyx_L1_error)
33640
33641 /* "pysam/libcbcf.pyx":1679
33642 * def iteritems(self):
33643 * """D.iteritems() -> an iterator over the (key, value) items of D"""
33644 * for key in self: # <<<<<<<<<<<<<<
33645 * yield (key, self[key])
33646 *
33647 */
33648 }
33649 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
33650 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
33651
33652 /* "pysam/libcbcf.pyx":1677
33653 * yield self[key]
33654 *
33655 * def iteritems(self): # <<<<<<<<<<<<<<
33656 * """D.iteritems() -> an iterator over the (key, value) items of D"""
33657 * for key in self:
33658 */
33659
33660 /* function exit code */
33661 PyErr_SetNone(PyExc_StopIteration);
33662 goto __pyx_L0;
33663 __pyx_L1_error:;
33664 __Pyx_Generator_Replace_StopIteration(0);
33665 __Pyx_XDECREF(__pyx_t_1);
33666 __Pyx_XDECREF(__pyx_t_4);
33667 __Pyx_XDECREF(__pyx_t_5);
33668 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
33669 __pyx_L0:;
33670 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
33671 #if !CYTHON_USE_EXC_INFO_STACK
33672 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
33673 #endif
33674 __pyx_generator->resume_label = -1;
33675 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
33676 __Pyx_TraceReturn(__pyx_r, 0);
33677 __Pyx_RefNannyFinishContext();
33678 return __pyx_r;
33679 }
33680
33681 /* "pysam/libcbcf.pyx":1682
33682 * yield (key, self[key])
33683 *
33684 * def keys(self): # <<<<<<<<<<<<<<
33685 * """D.keys() -> list of D's keys"""
33686 * return list(self)
33687 */
33688
33689 /* Python wrapper */
33690 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_30keys(PyObject *__pyx_v_self,
33691 #if CYTHON_METH_FASTCALL
33692 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33693 #else
33694 PyObject *__pyx_args, PyObject *__pyx_kwds
33695 #endif
33696 ); /*proto*/
33697 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_29keys, "VariantHeaderMetadata.keys(self)\nD.keys() -> list of D's keys");
33698 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_30keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_30keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_29keys};
33699 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_30keys(PyObject *__pyx_v_self,
33700 #if CYTHON_METH_FASTCALL
33701 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33702 #else
33703 PyObject *__pyx_args, PyObject *__pyx_kwds
33704 #endif
33705 ) {
33706 #if !CYTHON_METH_FASTCALL
33707 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
33708 #endif
33709 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
33710 PyObject *__pyx_r = 0;
33711 __Pyx_RefNannyDeclarations
33712 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
33713 #if !CYTHON_METH_FASTCALL
33714 #if CYTHON_ASSUME_SAFE_MACROS
33715 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
33716 #else
33717 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
33718 #endif
33719 #endif
33720 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
33721 if (unlikely(__pyx_nargs > 0)) {
33722 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
33723 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
33724 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_29keys(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
33725
33726 /* function exit code */
33727 __Pyx_RefNannyFinishContext();
33728 return __pyx_r;
33729 }
33730
33731 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_29keys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
33732 PyObject *__pyx_r = NULL;
33733 __Pyx_TraceDeclarations
33734 __Pyx_RefNannyDeclarations
33735 PyObject *__pyx_t_1 = NULL;
33736 int __pyx_lineno = 0;
33737 const char *__pyx_filename = NULL;
33738 int __pyx_clineno = 0;
33739 __Pyx_TraceFrameInit(__pyx_codeobj__68)
33740 __Pyx_RefNannySetupContext("keys", 1);
33741 __Pyx_TraceCall("keys", __pyx_f[0], 1682, 0, __PYX_ERR(0, 1682, __pyx_L1_error));
33742
33743 /* "pysam/libcbcf.pyx":1684
33744 * def keys(self):
33745 * """D.keys() -> list of D's keys"""
33746 * return list(self) # <<<<<<<<<<<<<<
33747 *
33748 * def items(self):
33749 */
33750 __Pyx_XDECREF(__pyx_r);
33751 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error)
33752 __Pyx_GOTREF(__pyx_t_1);
33753 __pyx_r = __pyx_t_1;
33754 __pyx_t_1 = 0;
33755 goto __pyx_L0;
33756
33757 /* "pysam/libcbcf.pyx":1682
33758 * yield (key, self[key])
33759 *
33760 * def keys(self): # <<<<<<<<<<<<<<
33761 * """D.keys() -> list of D's keys"""
33762 * return list(self)
33763 */
33764
33765 /* function exit code */
33766 __pyx_L1_error:;
33767 __Pyx_XDECREF(__pyx_t_1);
33768 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
33769 __pyx_r = NULL;
33770 __pyx_L0:;
33771 __Pyx_XGIVEREF(__pyx_r);
33772 __Pyx_TraceReturn(__pyx_r, 0);
33773 __Pyx_RefNannyFinishContext();
33774 return __pyx_r;
33775 }
33776
33777 /* "pysam/libcbcf.pyx":1686
33778 * return list(self)
33779 *
33780 * def items(self): # <<<<<<<<<<<<<<
33781 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
33782 * return list(self.iteritems())
33783 */
33784
33785 /* Python wrapper */
33786 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_32items(PyObject *__pyx_v_self,
33787 #if CYTHON_METH_FASTCALL
33788 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33789 #else
33790 PyObject *__pyx_args, PyObject *__pyx_kwds
33791 #endif
33792 ); /*proto*/
33793 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_31items, "VariantHeaderMetadata.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
33794 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_32items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_32items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_31items};
33795 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_32items(PyObject *__pyx_v_self,
33796 #if CYTHON_METH_FASTCALL
33797 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33798 #else
33799 PyObject *__pyx_args, PyObject *__pyx_kwds
33800 #endif
33801 ) {
33802 #if !CYTHON_METH_FASTCALL
33803 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
33804 #endif
33805 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
33806 PyObject *__pyx_r = 0;
33807 __Pyx_RefNannyDeclarations
33808 __Pyx_RefNannySetupContext("items (wrapper)", 0);
33809 #if !CYTHON_METH_FASTCALL
33810 #if CYTHON_ASSUME_SAFE_MACROS
33811 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
33812 #else
33813 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
33814 #endif
33815 #endif
33816 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
33817 if (unlikely(__pyx_nargs > 0)) {
33818 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
33819 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
33820 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_31items(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
33821
33822 /* function exit code */
33823 __Pyx_RefNannyFinishContext();
33824 return __pyx_r;
33825 }
33826
33827 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_31items(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
33828 PyObject *__pyx_r = NULL;
33829 __Pyx_TraceDeclarations
33830 __Pyx_RefNannyDeclarations
33831 PyObject *__pyx_t_1 = NULL;
33832 PyObject *__pyx_t_2 = NULL;
33833 PyObject *__pyx_t_3 = NULL;
33834 unsigned int __pyx_t_4;
33835 int __pyx_lineno = 0;
33836 const char *__pyx_filename = NULL;
33837 int __pyx_clineno = 0;
33838 __Pyx_TraceFrameInit(__pyx_codeobj__69)
33839 __Pyx_RefNannySetupContext("items", 1);
33840 __Pyx_TraceCall("items", __pyx_f[0], 1686, 0, __PYX_ERR(0, 1686, __pyx_L1_error));
33841
33842 /* "pysam/libcbcf.pyx":1688
33843 * def items(self):
33844 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
33845 * return list(self.iteritems()) # <<<<<<<<<<<<<<
33846 *
33847 * def values(self):
33848 */
33849 __Pyx_XDECREF(__pyx_r);
33850 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
33851 __Pyx_GOTREF(__pyx_t_2);
33852 __pyx_t_3 = NULL;
33853 __pyx_t_4 = 0;
33854 #if CYTHON_UNPACK_METHODS
33855 if (likely(PyMethod_Check(__pyx_t_2))) {
33856 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
33857 if (likely(__pyx_t_3)) {
33858 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
33859 __Pyx_INCREF(__pyx_t_3);
33860 __Pyx_INCREF(function);
33861 __Pyx_DECREF_SET(__pyx_t_2, function);
33862 __pyx_t_4 = 1;
33863 }
33864 }
33865 #endif
33866 {
33867 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
33868 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
33869 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
33870 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error)
33871 __Pyx_GOTREF(__pyx_t_1);
33872 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33873 }
33874 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
33875 __Pyx_GOTREF(__pyx_t_2);
33876 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
33877 __pyx_r = __pyx_t_2;
33878 __pyx_t_2 = 0;
33879 goto __pyx_L0;
33880
33881 /* "pysam/libcbcf.pyx":1686
33882 * return list(self)
33883 *
33884 * def items(self): # <<<<<<<<<<<<<<
33885 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
33886 * return list(self.iteritems())
33887 */
33888
33889 /* function exit code */
33890 __pyx_L1_error:;
33891 __Pyx_XDECREF(__pyx_t_1);
33892 __Pyx_XDECREF(__pyx_t_2);
33893 __Pyx_XDECREF(__pyx_t_3);
33894 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
33895 __pyx_r = NULL;
33896 __pyx_L0:;
33897 __Pyx_XGIVEREF(__pyx_r);
33898 __Pyx_TraceReturn(__pyx_r, 0);
33899 __Pyx_RefNannyFinishContext();
33900 return __pyx_r;
33901 }
33902
33903 /* "pysam/libcbcf.pyx":1690
33904 * return list(self.iteritems())
33905 *
33906 * def values(self): # <<<<<<<<<<<<<<
33907 * """D.values() -> list of D's values"""
33908 * return list(self.itervalues())
33909 */
33910
33911 /* Python wrapper */
33912 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_34values(PyObject *__pyx_v_self,
33913 #if CYTHON_METH_FASTCALL
33914 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33915 #else
33916 PyObject *__pyx_args, PyObject *__pyx_kwds
33917 #endif
33918 ); /*proto*/
33919 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_33values, "VariantHeaderMetadata.values(self)\nD.values() -> list of D's values");
33920 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_34values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_34values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_33values};
33921 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_34values(PyObject *__pyx_v_self,
33922 #if CYTHON_METH_FASTCALL
33923 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
33924 #else
33925 PyObject *__pyx_args, PyObject *__pyx_kwds
33926 #endif
33927 ) {
33928 #if !CYTHON_METH_FASTCALL
33929 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
33930 #endif
33931 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
33932 PyObject *__pyx_r = 0;
33933 __Pyx_RefNannyDeclarations
33934 __Pyx_RefNannySetupContext("values (wrapper)", 0);
33935 #if !CYTHON_METH_FASTCALL
33936 #if CYTHON_ASSUME_SAFE_MACROS
33937 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
33938 #else
33939 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
33940 #endif
33941 #endif
33942 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
33943 if (unlikely(__pyx_nargs > 0)) {
33944 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
33945 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
33946 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_33values(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
33947
33948 /* function exit code */
33949 __Pyx_RefNannyFinishContext();
33950 return __pyx_r;
33951 }
33952
33953 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_33values(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
33954 PyObject *__pyx_r = NULL;
33955 __Pyx_TraceDeclarations
33956 __Pyx_RefNannyDeclarations
33957 PyObject *__pyx_t_1 = NULL;
33958 PyObject *__pyx_t_2 = NULL;
33959 PyObject *__pyx_t_3 = NULL;
33960 unsigned int __pyx_t_4;
33961 int __pyx_lineno = 0;
33962 const char *__pyx_filename = NULL;
33963 int __pyx_clineno = 0;
33964 __Pyx_TraceFrameInit(__pyx_codeobj__70)
33965 __Pyx_RefNannySetupContext("values", 1);
33966 __Pyx_TraceCall("values", __pyx_f[0], 1690, 0, __PYX_ERR(0, 1690, __pyx_L1_error));
33967
33968 /* "pysam/libcbcf.pyx":1692
33969 * def values(self):
33970 * """D.values() -> list of D's values"""
33971 * return list(self.itervalues()) # <<<<<<<<<<<<<<
33972 *
33973 * # Mappings are not hashable by default, but subclasses can change this
33974 */
33975 __Pyx_XDECREF(__pyx_r);
33976 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
33977 __Pyx_GOTREF(__pyx_t_2);
33978 __pyx_t_3 = NULL;
33979 __pyx_t_4 = 0;
33980 #if CYTHON_UNPACK_METHODS
33981 if (likely(PyMethod_Check(__pyx_t_2))) {
33982 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
33983 if (likely(__pyx_t_3)) {
33984 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
33985 __Pyx_INCREF(__pyx_t_3);
33986 __Pyx_INCREF(function);
33987 __Pyx_DECREF_SET(__pyx_t_2, function);
33988 __pyx_t_4 = 1;
33989 }
33990 }
33991 #endif
33992 {
33993 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
33994 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
33995 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
33996 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error)
33997 __Pyx_GOTREF(__pyx_t_1);
33998 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33999 }
34000 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
34001 __Pyx_GOTREF(__pyx_t_2);
34002 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34003 __pyx_r = __pyx_t_2;
34004 __pyx_t_2 = 0;
34005 goto __pyx_L0;
34006
34007 /* "pysam/libcbcf.pyx":1690
34008 * return list(self.iteritems())
34009 *
34010 * def values(self): # <<<<<<<<<<<<<<
34011 * """D.values() -> list of D's values"""
34012 * return list(self.itervalues())
34013 */
34014
34015 /* function exit code */
34016 __pyx_L1_error:;
34017 __Pyx_XDECREF(__pyx_t_1);
34018 __Pyx_XDECREF(__pyx_t_2);
34019 __Pyx_XDECREF(__pyx_t_3);
34020 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
34021 __pyx_r = NULL;
34022 __pyx_L0:;
34023 __Pyx_XGIVEREF(__pyx_r);
34024 __Pyx_TraceReturn(__pyx_r, 0);
34025 __Pyx_RefNannyFinishContext();
34026 return __pyx_r;
34027 }
34028
34029 /* "pysam/libcbcf.pxd":76
34030 *
34031 * cdef class VariantHeaderMetadata(object):
34032 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
34033 * cdef int32_t type
34034 *
34035 */
34036
34037 /* Python wrapper */
34038 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
34039 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_6header_1__get__(PyObject *__pyx_v_self) {
34040 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
34041 PyObject *__pyx_r = 0;
34042 __Pyx_RefNannyDeclarations
34043 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34044 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
34045 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
34046
34047 /* function exit code */
34048 __Pyx_RefNannyFinishContext();
34049 return __pyx_r;
34050 }
34051
34052 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
34053 PyObject *__pyx_r = NULL;
34054 __Pyx_TraceDeclarations
34055 __Pyx_RefNannyDeclarations
34056 int __pyx_lineno = 0;
34057 const char *__pyx_filename = NULL;
34058 int __pyx_clineno = 0;
34059 __Pyx_RefNannySetupContext("__get__", 1);
34060 __Pyx_TraceCall("__get__", __pyx_f[3], 76, 0, __PYX_ERR(3, 76, __pyx_L1_error));
34061 __Pyx_XDECREF(__pyx_r);
34062 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
34063 __pyx_r = ((PyObject *)__pyx_v_self->header);
34064 goto __pyx_L0;
34065
34066 /* function exit code */
34067 __pyx_L1_error:;
34068 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34069 __pyx_r = NULL;
34070 __pyx_L0:;
34071 __Pyx_XGIVEREF(__pyx_r);
34072 __Pyx_TraceReturn(__pyx_r, 0);
34073 __Pyx_RefNannyFinishContext();
34074 return __pyx_r;
34075 }
34076
34077 /* "(tree fragment)":1
34078 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
34079 * cdef tuple state
34080 * cdef object _dict
34081 */
34082
34083 /* Python wrapper */
34084 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_36__reduce_cython__(PyObject *__pyx_v_self,
34085 #if CYTHON_METH_FASTCALL
34086 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
34087 #else
34088 PyObject *__pyx_args, PyObject *__pyx_kwds
34089 #endif
34090 ); /*proto*/
34091 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_35__reduce_cython__, "VariantHeaderMetadata.__reduce_cython__(self)");
34092 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_36__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_36__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_35__reduce_cython__};
34093 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_36__reduce_cython__(PyObject *__pyx_v_self,
34094 #if CYTHON_METH_FASTCALL
34095 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
34096 #else
34097 PyObject *__pyx_args, PyObject *__pyx_kwds
34098 #endif
34099 ) {
34100 #if !CYTHON_METH_FASTCALL
34101 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
34102 #endif
34103 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
34104 PyObject *__pyx_r = 0;
34105 __Pyx_RefNannyDeclarations
34106 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
34107 #if !CYTHON_METH_FASTCALL
34108 #if CYTHON_ASSUME_SAFE_MACROS
34109 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
34110 #else
34111 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
34112 #endif
34113 #endif
34114 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
34115 if (unlikely(__pyx_nargs > 0)) {
34116 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
34117 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
34118 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_35__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self));
34119
34120 /* function exit code */
34121 __Pyx_RefNannyFinishContext();
34122 return __pyx_r;
34123 }
34124
34125 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_35__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self) {
34126 PyObject *__pyx_v_state = 0;
34127 PyObject *__pyx_v__dict = 0;
34128 int __pyx_v_use_setstate;
34129 PyObject *__pyx_r = NULL;
34130 __Pyx_TraceDeclarations
34131 __Pyx_RefNannyDeclarations
34132 PyObject *__pyx_t_1 = NULL;
34133 PyObject *__pyx_t_2 = NULL;
34134 int __pyx_t_3;
34135 PyObject *__pyx_t_4 = NULL;
34136 int __pyx_lineno = 0;
34137 const char *__pyx_filename = NULL;
34138 int __pyx_clineno = 0;
34139 __Pyx_TraceFrameInit(__pyx_codeobj__71)
34140 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
34141 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
34142
34143 /* "(tree fragment)":5
34144 * cdef object _dict
34145 * cdef bint use_setstate
34146 * state = (self.header, self.type) # <<<<<<<<<<<<<<
34147 * _dict = getattr(self, '__dict__', None)
34148 * if _dict is not None:
34149 */
34150 __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
34151 __Pyx_GOTREF(__pyx_t_1);
34152 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error)
34153 __Pyx_GOTREF(__pyx_t_2);
34154 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
34155 __Pyx_GIVEREF((PyObject *)__pyx_v_self->header);
34156 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->header))) __PYX_ERR(4, 5, __pyx_L1_error);
34157 __Pyx_GIVEREF(__pyx_t_1);
34158 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error);
34159 __pyx_t_1 = 0;
34160 __pyx_v_state = ((PyObject*)__pyx_t_2);
34161 __pyx_t_2 = 0;
34162
34163 /* "(tree fragment)":6
34164 * cdef bint use_setstate
34165 * state = (self.header, self.type)
34166 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
34167 * if _dict is not None:
34168 * state += (_dict,)
34169 */
34170 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error)
34171 __Pyx_GOTREF(__pyx_t_2);
34172 __pyx_v__dict = __pyx_t_2;
34173 __pyx_t_2 = 0;
34174
34175 /* "(tree fragment)":7
34176 * state = (self.header, self.type)
34177 * _dict = getattr(self, '__dict__', None)
34178 * if _dict is not None: # <<<<<<<<<<<<<<
34179 * state += (_dict,)
34180 * use_setstate = True
34181 */
34182 __pyx_t_3 = (__pyx_v__dict != Py_None);
34183 if (__pyx_t_3) {
34184
34185 /* "(tree fragment)":8
34186 * _dict = getattr(self, '__dict__', None)
34187 * if _dict is not None:
34188 * state += (_dict,) # <<<<<<<<<<<<<<
34189 * use_setstate = True
34190 * else:
34191 */
34192 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 8, __pyx_L1_error)
34193 __Pyx_GOTREF(__pyx_t_2);
34194 __Pyx_INCREF(__pyx_v__dict);
34195 __Pyx_GIVEREF(__pyx_v__dict);
34196 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
34197 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
34198 __Pyx_GOTREF(__pyx_t_1);
34199 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
34200 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
34201 __pyx_t_1 = 0;
34202
34203 /* "(tree fragment)":9
34204 * if _dict is not None:
34205 * state += (_dict,)
34206 * use_setstate = True # <<<<<<<<<<<<<<
34207 * else:
34208 * use_setstate = self.header is not None
34209 */
34210 __pyx_v_use_setstate = 1;
34211
34212 /* "(tree fragment)":7
34213 * state = (self.header, self.type)
34214 * _dict = getattr(self, '__dict__', None)
34215 * if _dict is not None: # <<<<<<<<<<<<<<
34216 * state += (_dict,)
34217 * use_setstate = True
34218 */
34219 goto __pyx_L3;
34220 }
34221
34222 /* "(tree fragment)":11
34223 * use_setstate = True
34224 * else:
34225 * use_setstate = self.header is not None # <<<<<<<<<<<<<<
34226 * if use_setstate:
34227 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, None), state
34228 */
34229 /*else*/ {
34230 __pyx_t_3 = (((PyObject *)__pyx_v_self->header) != Py_None);
34231 __pyx_v_use_setstate = __pyx_t_3;
34232 }
34233 __pyx_L3:;
34234
34235 /* "(tree fragment)":12
34236 * else:
34237 * use_setstate = self.header is not None
34238 * if use_setstate: # <<<<<<<<<<<<<<
34239 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, None), state
34240 * else:
34241 */
34242 if (__pyx_v_use_setstate) {
34243
34244 /* "(tree fragment)":13
34245 * use_setstate = self.header is not None
34246 * if use_setstate:
34247 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, None), state # <<<<<<<<<<<<<<
34248 * else:
34249 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, state)
34250 */
34251 __Pyx_XDECREF(__pyx_r);
34252 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_VariantHeaderMeta); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
34253 __Pyx_GOTREF(__pyx_t_1);
34254 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error)
34255 __Pyx_GOTREF(__pyx_t_2);
34256 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
34257 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
34258 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
34259 __Pyx_INCREF(__pyx_int_135711299);
34260 __Pyx_GIVEREF(__pyx_int_135711299);
34261 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_135711299)) __PYX_ERR(4, 13, __pyx_L1_error);
34262 __Pyx_INCREF(Py_None);
34263 __Pyx_GIVEREF(Py_None);
34264 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
34265 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
34266 __Pyx_GOTREF(__pyx_t_4);
34267 __Pyx_GIVEREF(__pyx_t_1);
34268 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
34269 __Pyx_GIVEREF(__pyx_t_2);
34270 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error);
34271 __Pyx_INCREF(__pyx_v_state);
34272 __Pyx_GIVEREF(__pyx_v_state);
34273 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
34274 __pyx_t_1 = 0;
34275 __pyx_t_2 = 0;
34276 __pyx_r = __pyx_t_4;
34277 __pyx_t_4 = 0;
34278 goto __pyx_L0;
34279
34280 /* "(tree fragment)":12
34281 * else:
34282 * use_setstate = self.header is not None
34283 * if use_setstate: # <<<<<<<<<<<<<<
34284 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, None), state
34285 * else:
34286 */
34287 }
34288
34289 /* "(tree fragment)":15
34290 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, None), state
34291 * else:
34292 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, state) # <<<<<<<<<<<<<<
34293 * def __setstate_cython__(self, __pyx_state):
34294 * __pyx_unpickle_VariantHeaderMetadata__set_state(self, __pyx_state)
34295 */
34296 /*else*/ {
34297 __Pyx_XDECREF(__pyx_r);
34298 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantHeaderMeta); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
34299 __Pyx_GOTREF(__pyx_t_4);
34300 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error)
34301 __Pyx_GOTREF(__pyx_t_2);
34302 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
34303 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
34304 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
34305 __Pyx_INCREF(__pyx_int_135711299);
34306 __Pyx_GIVEREF(__pyx_int_135711299);
34307 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_135711299)) __PYX_ERR(4, 15, __pyx_L1_error);
34308 __Pyx_INCREF(__pyx_v_state);
34309 __Pyx_GIVEREF(__pyx_v_state);
34310 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
34311 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
34312 __Pyx_GOTREF(__pyx_t_1);
34313 __Pyx_GIVEREF(__pyx_t_4);
34314 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
34315 __Pyx_GIVEREF(__pyx_t_2);
34316 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error);
34317 __pyx_t_4 = 0;
34318 __pyx_t_2 = 0;
34319 __pyx_r = __pyx_t_1;
34320 __pyx_t_1 = 0;
34321 goto __pyx_L0;
34322 }
34323
34324 /* "(tree fragment)":1
34325 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
34326 * cdef tuple state
34327 * cdef object _dict
34328 */
34329
34330 /* function exit code */
34331 __pyx_L1_error:;
34332 __Pyx_XDECREF(__pyx_t_1);
34333 __Pyx_XDECREF(__pyx_t_2);
34334 __Pyx_XDECREF(__pyx_t_4);
34335 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34336 __pyx_r = NULL;
34337 __pyx_L0:;
34338 __Pyx_XDECREF(__pyx_v_state);
34339 __Pyx_XDECREF(__pyx_v__dict);
34340 __Pyx_XGIVEREF(__pyx_r);
34341 __Pyx_TraceReturn(__pyx_r, 0);
34342 __Pyx_RefNannyFinishContext();
34343 return __pyx_r;
34344 }
34345
34346 /* "(tree fragment)":16
34347 * else:
34348 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, state)
34349 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
34350 * __pyx_unpickle_VariantHeaderMetadata__set_state(self, __pyx_state)
34351 */
34352
34353 /* Python wrapper */
34354 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_38__setstate_cython__(PyObject *__pyx_v_self,
34355 #if CYTHON_METH_FASTCALL
34356 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
34357 #else
34358 PyObject *__pyx_args, PyObject *__pyx_kwds
34359 #endif
34360 ); /*proto*/
34361 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_37__setstate_cython__, "VariantHeaderMetadata.__setstate_cython__(self, __pyx_state)");
34362 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_38__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_38__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_37__setstate_cython__};
34363 static PyObject *__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_38__setstate_cython__(PyObject *__pyx_v_self,
34364 #if CYTHON_METH_FASTCALL
34365 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
34366 #else
34367 PyObject *__pyx_args, PyObject *__pyx_kwds
34368 #endif
34369 ) {
34370 PyObject *__pyx_v___pyx_state = 0;
34371 #if !CYTHON_METH_FASTCALL
34372 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
34373 #endif
34374 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
34375 PyObject* values[1] = {0};
34376 int __pyx_lineno = 0;
34377 const char *__pyx_filename = NULL;
34378 int __pyx_clineno = 0;
34379 PyObject *__pyx_r = 0;
34380 __Pyx_RefNannyDeclarations
34381 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
34382 #if !CYTHON_METH_FASTCALL
34383 #if CYTHON_ASSUME_SAFE_MACROS
34384 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
34385 #else
34386 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
34387 #endif
34388 #endif
34389 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
34390 {
34391 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
34392 if (__pyx_kwds) {
34393 Py_ssize_t kw_args;
34394 switch (__pyx_nargs) {
34395 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
34396 CYTHON_FALLTHROUGH;
34397 case 0: break;
34398 default: goto __pyx_L5_argtuple_error;
34399 }
34400 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
34401 switch (__pyx_nargs) {
34402 case 0:
34403 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
34404 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
34405 kw_args--;
34406 }
34407 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
34408 else goto __pyx_L5_argtuple_error;
34409 }
34410 if (unlikely(kw_args > 0)) {
34411 const Py_ssize_t kwd_pos_args = __pyx_nargs;
34412 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
34413 }
34414 } else if (unlikely(__pyx_nargs != 1)) {
34415 goto __pyx_L5_argtuple_error;
34416 } else {
34417 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
34418 }
34419 __pyx_v___pyx_state = values[0];
34420 }
34421 goto __pyx_L6_skip;
34422 __pyx_L5_argtuple_error:;
34423 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
34424 __pyx_L6_skip:;
34425 goto __pyx_L4_argument_unpacking_done;
34426 __pyx_L3_error:;
34427 {
34428 Py_ssize_t __pyx_temp;
34429 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
34430 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
34431 }
34432 }
34433 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34434 __Pyx_RefNannyFinishContext();
34435 return NULL;
34436 __pyx_L4_argument_unpacking_done:;
34437 __pyx_r = __pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_37__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v_self), __pyx_v___pyx_state);
34438
34439 /* function exit code */
34440 {
34441 Py_ssize_t __pyx_temp;
34442 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
34443 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
34444 }
34445 }
34446 __Pyx_RefNannyFinishContext();
34447 return __pyx_r;
34448 }
34449
34450 static PyObject *__pyx_pf_5pysam_7libcbcf_21VariantHeaderMetadata_37__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
34451 PyObject *__pyx_r = NULL;
34452 __Pyx_TraceDeclarations
34453 __Pyx_RefNannyDeclarations
34454 PyObject *__pyx_t_1 = NULL;
34455 int __pyx_lineno = 0;
34456 const char *__pyx_filename = NULL;
34457 int __pyx_clineno = 0;
34458 __Pyx_TraceFrameInit(__pyx_codeobj__72)
34459 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
34460 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
34461
34462 /* "(tree fragment)":17
34463 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, state)
34464 * def __setstate_cython__(self, __pyx_state):
34465 * __pyx_unpickle_VariantHeaderMetadata__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
34466 */
34467 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
34468 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderMetadata__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
34469 __Pyx_GOTREF(__pyx_t_1);
34470 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34471
34472 /* "(tree fragment)":16
34473 * else:
34474 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, state)
34475 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
34476 * __pyx_unpickle_VariantHeaderMetadata__set_state(self, __pyx_state)
34477 */
34478
34479 /* function exit code */
34480 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
34481 goto __pyx_L0;
34482 __pyx_L1_error:;
34483 __Pyx_XDECREF(__pyx_t_1);
34484 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderMetadata.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34485 __pyx_r = NULL;
34486 __pyx_L0:;
34487 __Pyx_XGIVEREF(__pyx_r);
34488 __Pyx_TraceReturn(__pyx_r, 0);
34489 __Pyx_RefNannyFinishContext();
34490 return __pyx_r;
34491 }
34492
34493 /* "pysam/libcbcf.pyx":1700
34494 *
34495 *
34496 * cdef VariantHeaderMetadata makeVariantHeaderMetadata(VariantHeader header, int32_t type): # <<<<<<<<<<<<<<
34497 * if not header:
34498 * raise ValueError('invalid VariantHeader')
34499 */
34500
34501 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_f_5pysam_7libcbcf_makeVariantHeaderMetadata(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, int32_t __pyx_v_type) {
34502 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v_meta = 0;
34503 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_r = NULL;
34504 __Pyx_TraceDeclarations
34505 __Pyx_RefNannyDeclarations
34506 int __pyx_t_1;
34507 int __pyx_t_2;
34508 PyObject *__pyx_t_3 = NULL;
34509 int __pyx_lineno = 0;
34510 const char *__pyx_filename = NULL;
34511 int __pyx_clineno = 0;
34512 __Pyx_RefNannySetupContext("makeVariantHeaderMetadata", 1);
34513 __Pyx_TraceCall("makeVariantHeaderMetadata", __pyx_f[0], 1700, 0, __PYX_ERR(0, 1700, __pyx_L1_error));
34514
34515 /* "pysam/libcbcf.pyx":1701
34516 *
34517 * cdef VariantHeaderMetadata makeVariantHeaderMetadata(VariantHeader header, int32_t type):
34518 * if not header: # <<<<<<<<<<<<<<
34519 * raise ValueError('invalid VariantHeader')
34520 *
34521 */
34522 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1701, __pyx_L1_error)
34523 __pyx_t_2 = (!__pyx_t_1);
34524 if (unlikely(__pyx_t_2)) {
34525
34526 /* "pysam/libcbcf.pyx":1702
34527 * cdef VariantHeaderMetadata makeVariantHeaderMetadata(VariantHeader header, int32_t type):
34528 * if not header:
34529 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
34530 *
34531 * cdef VariantHeaderMetadata meta = VariantHeaderMetadata.__new__(VariantHeaderMetadata)
34532 */
34533 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1702, __pyx_L1_error)
34534 __Pyx_GOTREF(__pyx_t_3);
34535 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
34536 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
34537 __PYX_ERR(0, 1702, __pyx_L1_error)
34538
34539 /* "pysam/libcbcf.pyx":1701
34540 *
34541 * cdef VariantHeaderMetadata makeVariantHeaderMetadata(VariantHeader header, int32_t type):
34542 * if not header: # <<<<<<<<<<<<<<
34543 * raise ValueError('invalid VariantHeader')
34544 *
34545 */
34546 }
34547
34548 /* "pysam/libcbcf.pyx":1704
34549 * raise ValueError('invalid VariantHeader')
34550 *
34551 * cdef VariantHeaderMetadata meta = VariantHeaderMetadata.__new__(VariantHeaderMetadata) # <<<<<<<<<<<<<<
34552 * meta.header = header
34553 * meta.type = type
34554 */
34555 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderMetadata(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1704, __pyx_L1_error)
34556 __Pyx_GOTREF((PyObject *)__pyx_t_3);
34557 __pyx_v_meta = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_t_3);
34558 __pyx_t_3 = 0;
34559
34560 /* "pysam/libcbcf.pyx":1705
34561 *
34562 * cdef VariantHeaderMetadata meta = VariantHeaderMetadata.__new__(VariantHeaderMetadata)
34563 * meta.header = header # <<<<<<<<<<<<<<
34564 * meta.type = type
34565 *
34566 */
34567 __Pyx_INCREF((PyObject *)__pyx_v_header);
34568 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
34569 __Pyx_GOTREF((PyObject *)__pyx_v_meta->header);
34570 __Pyx_DECREF((PyObject *)__pyx_v_meta->header);
34571 __pyx_v_meta->header = __pyx_v_header;
34572
34573 /* "pysam/libcbcf.pyx":1706
34574 * cdef VariantHeaderMetadata meta = VariantHeaderMetadata.__new__(VariantHeaderMetadata)
34575 * meta.header = header
34576 * meta.type = type # <<<<<<<<<<<<<<
34577 *
34578 * return meta
34579 */
34580 __pyx_v_meta->type = __pyx_v_type;
34581
34582 /* "pysam/libcbcf.pyx":1708
34583 * meta.type = type
34584 *
34585 * return meta # <<<<<<<<<<<<<<
34586 *
34587 *
34588 */
34589 __Pyx_XDECREF((PyObject *)__pyx_r);
34590 __Pyx_INCREF((PyObject *)__pyx_v_meta);
34591 __pyx_r = __pyx_v_meta;
34592 goto __pyx_L0;
34593
34594 /* "pysam/libcbcf.pyx":1700
34595 *
34596 *
34597 * cdef VariantHeaderMetadata makeVariantHeaderMetadata(VariantHeader header, int32_t type): # <<<<<<<<<<<<<<
34598 * if not header:
34599 * raise ValueError('invalid VariantHeader')
34600 */
34601
34602 /* function exit code */
34603 __pyx_L1_error:;
34604 __Pyx_XDECREF(__pyx_t_3);
34605 __Pyx_AddTraceback("pysam.libcbcf.makeVariantHeaderMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
34606 __pyx_r = 0;
34607 __pyx_L0:;
34608 __Pyx_XDECREF((PyObject *)__pyx_v_meta);
34609 __Pyx_XGIVEREF((PyObject *)__pyx_r);
34610 __Pyx_TraceReturn(__pyx_r, 0);
34611 __Pyx_RefNannyFinishContext();
34612 return __pyx_r;
34613 }
34614
34615 /* "pysam/libcbcf.pyx":1713
34616 * cdef class VariantContig(object):
34617 * """contig metadata from a :class:`VariantHeader`"""
34618 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
34619 * raise TypeError('this class cannot be instantiated from Python')
34620 *
34621 */
34622
34623 /* Python wrapper */
34624 static int __pyx_pw_5pysam_7libcbcf_13VariantContig_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
34625 static int __pyx_pw_5pysam_7libcbcf_13VariantContig_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
34626 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
34627 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
34628 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
34629 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
34630 int __pyx_r;
34631 __Pyx_RefNannyDeclarations
34632 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
34633 #if CYTHON_ASSUME_SAFE_MACROS
34634 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
34635 #else
34636 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
34637 #endif
34638 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
34639 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
34640 __Pyx_INCREF(__pyx_args);
34641 __pyx_v_args = __pyx_args;
34642 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
34643
34644 /* function exit code */
34645 __Pyx_DECREF(__pyx_v_args);
34646 __Pyx_XDECREF(__pyx_v_kwargs);
34647 __Pyx_RefNannyFinishContext();
34648 return __pyx_r;
34649 }
34650
34651 static int __pyx_pf_5pysam_7libcbcf_13VariantContig___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
34652 int __pyx_r;
34653 __Pyx_TraceDeclarations
34654 __Pyx_RefNannyDeclarations
34655 PyObject *__pyx_t_1 = NULL;
34656 int __pyx_lineno = 0;
34657 const char *__pyx_filename = NULL;
34658 int __pyx_clineno = 0;
34659 __Pyx_RefNannySetupContext("__init__", 1);
34660 __Pyx_TraceCall("__init__", __pyx_f[0], 1713, 0, __PYX_ERR(0, 1713, __pyx_L1_error));
34661
34662 /* "pysam/libcbcf.pyx":1714
34663 * """contig metadata from a :class:`VariantHeader`"""
34664 * def __init__(self, *args, **kwargs):
34665 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
34666 *
34667 * @property
34668 */
34669 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
34670 __Pyx_GOTREF(__pyx_t_1);
34671 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
34672 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34673 __PYX_ERR(0, 1714, __pyx_L1_error)
34674
34675 /* "pysam/libcbcf.pyx":1713
34676 * cdef class VariantContig(object):
34677 * """contig metadata from a :class:`VariantHeader`"""
34678 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
34679 * raise TypeError('this class cannot be instantiated from Python')
34680 *
34681 */
34682
34683 /* function exit code */
34684 __pyx_L1_error:;
34685 __Pyx_XDECREF(__pyx_t_1);
34686 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34687 __pyx_r = -1;
34688 __Pyx_TraceReturn(Py_None, 0);
34689 __Pyx_RefNannyFinishContext();
34690 return __pyx_r;
34691 }
34692
34693 /* "pysam/libcbcf.pyx":1716
34694 * raise TypeError('this class cannot be instantiated from Python')
34695 *
34696 * @property # <<<<<<<<<<<<<<
34697 * def name(self):
34698 * """contig name"""
34699 */
34700
34701 /* Python wrapper */
34702 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
34703 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_4name_1__get__(PyObject *__pyx_v_self) {
34704 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
34705 PyObject *__pyx_r = 0;
34706 __Pyx_RefNannyDeclarations
34707 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34708 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
34709 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig_4name___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self));
34710
34711 /* function exit code */
34712 __Pyx_RefNannyFinishContext();
34713 return __pyx_r;
34714 }
34715
34716 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_4name___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self) {
34717 bcf_hdr_t *__pyx_v_hdr;
34718 PyObject *__pyx_r = NULL;
34719 __Pyx_TraceDeclarations
34720 __Pyx_RefNannyDeclarations
34721 bcf_hdr_t *__pyx_t_1;
34722 PyObject *__pyx_t_2 = NULL;
34723 int __pyx_lineno = 0;
34724 const char *__pyx_filename = NULL;
34725 int __pyx_clineno = 0;
34726 __Pyx_RefNannySetupContext("__get__", 1);
34727 __Pyx_TraceCall("__get__", __pyx_f[0], 1716, 0, __PYX_ERR(0, 1716, __pyx_L1_error));
34728
34729 /* "pysam/libcbcf.pyx":1719
34730 * def name(self):
34731 * """contig name"""
34732 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
34733 * return bcf_str_cache_get_charptr(hdr.id[BCF_DT_CTG][self.id].key)
34734 *
34735 */
34736 __pyx_t_1 = __pyx_v_self->header->ptr;
34737 __pyx_v_hdr = __pyx_t_1;
34738
34739 /* "pysam/libcbcf.pyx":1720
34740 * """contig name"""
34741 * cdef bcf_hdr_t *hdr = self.header.ptr
34742 * return bcf_str_cache_get_charptr(hdr.id[BCF_DT_CTG][self.id].key) # <<<<<<<<<<<<<<
34743 *
34744 * @property
34745 */
34746 __Pyx_XDECREF(__pyx_r);
34747 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(((__pyx_v_hdr->id[BCF_DT_CTG])[__pyx_v_self->id]).key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
34748 __Pyx_GOTREF(__pyx_t_2);
34749 __pyx_r = __pyx_t_2;
34750 __pyx_t_2 = 0;
34751 goto __pyx_L0;
34752
34753 /* "pysam/libcbcf.pyx":1716
34754 * raise TypeError('this class cannot be instantiated from Python')
34755 *
34756 * @property # <<<<<<<<<<<<<<
34757 * def name(self):
34758 * """contig name"""
34759 */
34760
34761 /* function exit code */
34762 __pyx_L1_error:;
34763 __Pyx_XDECREF(__pyx_t_2);
34764 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34765 __pyx_r = NULL;
34766 __pyx_L0:;
34767 __Pyx_XGIVEREF(__pyx_r);
34768 __Pyx_TraceReturn(__pyx_r, 0);
34769 __Pyx_RefNannyFinishContext();
34770 return __pyx_r;
34771 }
34772
34773 /* "pysam/libcbcf.pyx":1722
34774 * return bcf_str_cache_get_charptr(hdr.id[BCF_DT_CTG][self.id].key)
34775 *
34776 * @property # <<<<<<<<<<<<<<
34777 * def id(self):
34778 * """contig internal id number"""
34779 */
34780
34781 /* Python wrapper */
34782 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
34783 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_2id_1__get__(PyObject *__pyx_v_self) {
34784 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
34785 PyObject *__pyx_r = 0;
34786 __Pyx_RefNannyDeclarations
34787 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34788 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
34789 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig_2id___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self));
34790
34791 /* function exit code */
34792 __Pyx_RefNannyFinishContext();
34793 return __pyx_r;
34794 }
34795
34796 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_2id___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self) {
34797 PyObject *__pyx_r = NULL;
34798 __Pyx_TraceDeclarations
34799 __Pyx_RefNannyDeclarations
34800 PyObject *__pyx_t_1 = NULL;
34801 int __pyx_lineno = 0;
34802 const char *__pyx_filename = NULL;
34803 int __pyx_clineno = 0;
34804 __Pyx_RefNannySetupContext("__get__", 1);
34805 __Pyx_TraceCall("__get__", __pyx_f[0], 1722, 0, __PYX_ERR(0, 1722, __pyx_L1_error));
34806
34807 /* "pysam/libcbcf.pyx":1725
34808 * def id(self):
34809 * """contig internal id number"""
34810 * return self.id # <<<<<<<<<<<<<<
34811 *
34812 * @property
34813 */
34814 __Pyx_XDECREF(__pyx_r);
34815 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1725, __pyx_L1_error)
34816 __Pyx_GOTREF(__pyx_t_1);
34817 __pyx_r = __pyx_t_1;
34818 __pyx_t_1 = 0;
34819 goto __pyx_L0;
34820
34821 /* "pysam/libcbcf.pyx":1722
34822 * return bcf_str_cache_get_charptr(hdr.id[BCF_DT_CTG][self.id].key)
34823 *
34824 * @property # <<<<<<<<<<<<<<
34825 * def id(self):
34826 * """contig internal id number"""
34827 */
34828
34829 /* function exit code */
34830 __pyx_L1_error:;
34831 __Pyx_XDECREF(__pyx_t_1);
34832 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34833 __pyx_r = NULL;
34834 __pyx_L0:;
34835 __Pyx_XGIVEREF(__pyx_r);
34836 __Pyx_TraceReturn(__pyx_r, 0);
34837 __Pyx_RefNannyFinishContext();
34838 return __pyx_r;
34839 }
34840
34841 /* "pysam/libcbcf.pyx":1727
34842 * return self.id
34843 *
34844 * @property # <<<<<<<<<<<<<<
34845 * def length(self):
34846 * """contig length or None if not available"""
34847 */
34848
34849 /* Python wrapper */
34850 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_6length_1__get__(PyObject *__pyx_v_self); /*proto*/
34851 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_6length_1__get__(PyObject *__pyx_v_self) {
34852 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
34853 PyObject *__pyx_r = 0;
34854 __Pyx_RefNannyDeclarations
34855 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34856 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
34857 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig_6length___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self));
34858
34859 /* function exit code */
34860 __Pyx_RefNannyFinishContext();
34861 return __pyx_r;
34862 }
34863
34864 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_6length___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self) {
34865 bcf_hdr_t *__pyx_v_hdr;
34866 uint32_t __pyx_v_length;
34867 PyObject *__pyx_r = NULL;
34868 __Pyx_TraceDeclarations
34869 __Pyx_RefNannyDeclarations
34870 bcf_hdr_t *__pyx_t_1;
34871 PyObject *__pyx_t_2 = NULL;
34872 int __pyx_t_3;
34873 PyObject *__pyx_t_4 = NULL;
34874 int __pyx_lineno = 0;
34875 const char *__pyx_filename = NULL;
34876 int __pyx_clineno = 0;
34877 __Pyx_RefNannySetupContext("__get__", 1);
34878 __Pyx_TraceCall("__get__", __pyx_f[0], 1727, 0, __PYX_ERR(0, 1727, __pyx_L1_error));
34879
34880 /* "pysam/libcbcf.pyx":1730
34881 * def length(self):
34882 * """contig length or None if not available"""
34883 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
34884 * cdef uint32_t length = hdr.id[BCF_DT_CTG][self.id].val.info[0]
34885 * return length if length else None
34886 */
34887 __pyx_t_1 = __pyx_v_self->header->ptr;
34888 __pyx_v_hdr = __pyx_t_1;
34889
34890 /* "pysam/libcbcf.pyx":1731
34891 * """contig length or None if not available"""
34892 * cdef bcf_hdr_t *hdr = self.header.ptr
34893 * cdef uint32_t length = hdr.id[BCF_DT_CTG][self.id].val.info[0] # <<<<<<<<<<<<<<
34894 * return length if length else None
34895 *
34896 */
34897 __pyx_v_length = (((__pyx_v_hdr->id[BCF_DT_CTG])[__pyx_v_self->id]).val->info[0]);
34898
34899 /* "pysam/libcbcf.pyx":1732
34900 * cdef bcf_hdr_t *hdr = self.header.ptr
34901 * cdef uint32_t length = hdr.id[BCF_DT_CTG][self.id].val.info[0]
34902 * return length if length else None # <<<<<<<<<<<<<<
34903 *
34904 * @property
34905 */
34906 __Pyx_XDECREF(__pyx_r);
34907 __pyx_t_3 = (__pyx_v_length != 0);
34908 if (__pyx_t_3) {
34909 __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1732, __pyx_L1_error)
34910 __Pyx_GOTREF(__pyx_t_4);
34911 __pyx_t_2 = __pyx_t_4;
34912 __pyx_t_4 = 0;
34913 } else {
34914 __Pyx_INCREF(Py_None);
34915 __pyx_t_2 = Py_None;
34916 }
34917 __pyx_r = __pyx_t_2;
34918 __pyx_t_2 = 0;
34919 goto __pyx_L0;
34920
34921 /* "pysam/libcbcf.pyx":1727
34922 * return self.id
34923 *
34924 * @property # <<<<<<<<<<<<<<
34925 * def length(self):
34926 * """contig length or None if not available"""
34927 */
34928
34929 /* function exit code */
34930 __pyx_L1_error:;
34931 __Pyx_XDECREF(__pyx_t_2);
34932 __Pyx_XDECREF(__pyx_t_4);
34933 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34934 __pyx_r = NULL;
34935 __pyx_L0:;
34936 __Pyx_XGIVEREF(__pyx_r);
34937 __Pyx_TraceReturn(__pyx_r, 0);
34938 __Pyx_RefNannyFinishContext();
34939 return __pyx_r;
34940 }
34941
34942 /* "pysam/libcbcf.pyx":1734
34943 * return length if length else None
34944 *
34945 * @property # <<<<<<<<<<<<<<
34946 * def header_record(self):
34947 * """:class:`VariantHeaderRecord` associated with this :class:`VariantContig` object"""
34948 */
34949
34950 /* Python wrapper */
34951 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_13header_record_1__get__(PyObject *__pyx_v_self); /*proto*/
34952 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_13header_record_1__get__(PyObject *__pyx_v_self) {
34953 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
34954 PyObject *__pyx_r = 0;
34955 __Pyx_RefNannyDeclarations
34956 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34957 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
34958 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig_13header_record___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self));
34959
34960 /* function exit code */
34961 __Pyx_RefNannyFinishContext();
34962 return __pyx_r;
34963 }
34964
34965 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_13header_record___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self) {
34966 bcf_hdr_t *__pyx_v_hdr;
34967 bcf_hrec_t *__pyx_v_hrec;
34968 PyObject *__pyx_r = NULL;
34969 __Pyx_TraceDeclarations
34970 __Pyx_RefNannyDeclarations
34971 bcf_hdr_t *__pyx_t_1;
34972 PyObject *__pyx_t_2 = NULL;
34973 PyObject *__pyx_t_3 = NULL;
34974 int __pyx_lineno = 0;
34975 const char *__pyx_filename = NULL;
34976 int __pyx_clineno = 0;
34977 __Pyx_RefNannySetupContext("__get__", 1);
34978 __Pyx_TraceCall("__get__", __pyx_f[0], 1734, 0, __PYX_ERR(0, 1734, __pyx_L1_error));
34979
34980 /* "pysam/libcbcf.pyx":1737
34981 * def header_record(self):
34982 * """:class:`VariantHeaderRecord` associated with this :class:`VariantContig` object"""
34983 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
34984 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_CTG][self.id].val.hrec[0]
34985 * return makeVariantHeaderRecord(self.header, hrec)
34986 */
34987 __pyx_t_1 = __pyx_v_self->header->ptr;
34988 __pyx_v_hdr = __pyx_t_1;
34989
34990 /* "pysam/libcbcf.pyx":1738
34991 * """:class:`VariantHeaderRecord` associated with this :class:`VariantContig` object"""
34992 * cdef bcf_hdr_t *hdr = self.header.ptr
34993 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_CTG][self.id].val.hrec[0] # <<<<<<<<<<<<<<
34994 * return makeVariantHeaderRecord(self.header, hrec)
34995 *
34996 */
34997 __pyx_v_hrec = (((__pyx_v_hdr->id[BCF_DT_CTG])[__pyx_v_self->id]).val->hrec[0]);
34998
34999 /* "pysam/libcbcf.pyx":1739
35000 * cdef bcf_hdr_t *hdr = self.header.ptr
35001 * cdef bcf_hrec_t *hrec = hdr.id[BCF_DT_CTG][self.id].val.hrec[0]
35002 * return makeVariantHeaderRecord(self.header, hrec) # <<<<<<<<<<<<<<
35003 *
35004 * def remove_header(self):
35005 */
35006 __Pyx_XDECREF(__pyx_r);
35007 __pyx_t_2 = ((PyObject *)__pyx_v_self->header);
35008 __Pyx_INCREF(__pyx_t_2);
35009 __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecord(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_2), __pyx_v_hrec)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L1_error)
35010 __Pyx_GOTREF(__pyx_t_3);
35011 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35012 __pyx_r = __pyx_t_3;
35013 __pyx_t_3 = 0;
35014 goto __pyx_L0;
35015
35016 /* "pysam/libcbcf.pyx":1734
35017 * return length if length else None
35018 *
35019 * @property # <<<<<<<<<<<<<<
35020 * def header_record(self):
35021 * """:class:`VariantHeaderRecord` associated with this :class:`VariantContig` object"""
35022 */
35023
35024 /* function exit code */
35025 __pyx_L1_error:;
35026 __Pyx_XDECREF(__pyx_t_2);
35027 __Pyx_XDECREF(__pyx_t_3);
35028 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.header_record.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35029 __pyx_r = NULL;
35030 __pyx_L0:;
35031 __Pyx_XGIVEREF(__pyx_r);
35032 __Pyx_TraceReturn(__pyx_r, 0);
35033 __Pyx_RefNannyFinishContext();
35034 return __pyx_r;
35035 }
35036
35037 /* "pysam/libcbcf.pyx":1741
35038 * return makeVariantHeaderRecord(self.header, hrec)
35039 *
35040 * def remove_header(self): # <<<<<<<<<<<<<<
35041 * cdef bcf_hdr_t *hdr = self.header.ptr
35042 * cdef const char *key = hdr.id[BCF_DT_CTG][self.id].key
35043 */
35044
35045 /* Python wrapper */
35046 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_3remove_header(PyObject *__pyx_v_self,
35047 #if CYTHON_METH_FASTCALL
35048 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
35049 #else
35050 PyObject *__pyx_args, PyObject *__pyx_kwds
35051 #endif
35052 ); /*proto*/
35053 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantContig_2remove_header, "VariantContig.remove_header(self)");
35054 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantContig_3remove_header = {"remove_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantContig_3remove_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantContig_2remove_header};
35055 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_3remove_header(PyObject *__pyx_v_self,
35056 #if CYTHON_METH_FASTCALL
35057 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
35058 #else
35059 PyObject *__pyx_args, PyObject *__pyx_kwds
35060 #endif
35061 ) {
35062 #if !CYTHON_METH_FASTCALL
35063 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
35064 #endif
35065 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
35066 PyObject *__pyx_r = 0;
35067 __Pyx_RefNannyDeclarations
35068 __Pyx_RefNannySetupContext("remove_header (wrapper)", 0);
35069 #if !CYTHON_METH_FASTCALL
35070 #if CYTHON_ASSUME_SAFE_MACROS
35071 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
35072 #else
35073 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
35074 #endif
35075 #endif
35076 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
35077 if (unlikely(__pyx_nargs > 0)) {
35078 __Pyx_RaiseArgtupleInvalid("remove_header", 1, 0, 0, __pyx_nargs); return NULL;}
35079 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "remove_header", 0))) return NULL;
35080 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig_2remove_header(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self));
35081
35082 /* function exit code */
35083 __Pyx_RefNannyFinishContext();
35084 return __pyx_r;
35085 }
35086
35087 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_2remove_header(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self) {
35088 bcf_hdr_t *__pyx_v_hdr;
35089 char const *__pyx_v_key;
35090 PyObject *__pyx_r = NULL;
35091 __Pyx_TraceDeclarations
35092 __Pyx_RefNannyDeclarations
35093 bcf_hdr_t *__pyx_t_1;
35094 char const *__pyx_t_2;
35095 int __pyx_lineno = 0;
35096 const char *__pyx_filename = NULL;
35097 int __pyx_clineno = 0;
35098 __Pyx_TraceFrameInit(__pyx_codeobj__73)
35099 __Pyx_RefNannySetupContext("remove_header", 1);
35100 __Pyx_TraceCall("remove_header", __pyx_f[0], 1741, 0, __PYX_ERR(0, 1741, __pyx_L1_error));
35101
35102 /* "pysam/libcbcf.pyx":1742
35103 *
35104 * def remove_header(self):
35105 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
35106 * cdef const char *key = hdr.id[BCF_DT_CTG][self.id].key
35107 * bcf_hdr_remove(hdr, BCF_HL_CTG, key)
35108 */
35109 __pyx_t_1 = __pyx_v_self->header->ptr;
35110 __pyx_v_hdr = __pyx_t_1;
35111
35112 /* "pysam/libcbcf.pyx":1743
35113 * def remove_header(self):
35114 * cdef bcf_hdr_t *hdr = self.header.ptr
35115 * cdef const char *key = hdr.id[BCF_DT_CTG][self.id].key # <<<<<<<<<<<<<<
35116 * bcf_hdr_remove(hdr, BCF_HL_CTG, key)
35117 *
35118 */
35119 __pyx_t_2 = ((__pyx_v_hdr->id[BCF_DT_CTG])[__pyx_v_self->id]).key;
35120 __pyx_v_key = __pyx_t_2;
35121
35122 /* "pysam/libcbcf.pyx":1744
35123 * cdef bcf_hdr_t *hdr = self.header.ptr
35124 * cdef const char *key = hdr.id[BCF_DT_CTG][self.id].key
35125 * bcf_hdr_remove(hdr, BCF_HL_CTG, key) # <<<<<<<<<<<<<<
35126 *
35127 *
35128 */
35129 bcf_hdr_remove(__pyx_v_hdr, BCF_HL_CTG, __pyx_v_key);
35130
35131 /* "pysam/libcbcf.pyx":1741
35132 * return makeVariantHeaderRecord(self.header, hrec)
35133 *
35134 * def remove_header(self): # <<<<<<<<<<<<<<
35135 * cdef bcf_hdr_t *hdr = self.header.ptr
35136 * cdef const char *key = hdr.id[BCF_DT_CTG][self.id].key
35137 */
35138
35139 /* function exit code */
35140 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
35141 goto __pyx_L0;
35142 __pyx_L1_error:;
35143 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.remove_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
35144 __pyx_r = NULL;
35145 __pyx_L0:;
35146 __Pyx_XGIVEREF(__pyx_r);
35147 __Pyx_TraceReturn(__pyx_r, 0);
35148 __Pyx_RefNannyFinishContext();
35149 return __pyx_r;
35150 }
35151
35152 /* "pysam/libcbcf.pxd":65
35153 *
35154 * cdef class VariantContig(object):
35155 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
35156 * cdef int id
35157 *
35158 */
35159
35160 /* Python wrapper */
35161 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
35162 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_6header_1__get__(PyObject *__pyx_v_self) {
35163 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
35164 PyObject *__pyx_r = 0;
35165 __Pyx_RefNannyDeclarations
35166 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35167 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
35168 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self));
35169
35170 /* function exit code */
35171 __Pyx_RefNannyFinishContext();
35172 return __pyx_r;
35173 }
35174
35175 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self) {
35176 PyObject *__pyx_r = NULL;
35177 __Pyx_TraceDeclarations
35178 __Pyx_RefNannyDeclarations
35179 int __pyx_lineno = 0;
35180 const char *__pyx_filename = NULL;
35181 int __pyx_clineno = 0;
35182 __Pyx_RefNannySetupContext("__get__", 1);
35183 __Pyx_TraceCall("__get__", __pyx_f[3], 65, 0, __PYX_ERR(3, 65, __pyx_L1_error));
35184 __Pyx_XDECREF(__pyx_r);
35185 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
35186 __pyx_r = ((PyObject *)__pyx_v_self->header);
35187 goto __pyx_L0;
35188
35189 /* function exit code */
35190 __pyx_L1_error:;
35191 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35192 __pyx_r = NULL;
35193 __pyx_L0:;
35194 __Pyx_XGIVEREF(__pyx_r);
35195 __Pyx_TraceReturn(__pyx_r, 0);
35196 __Pyx_RefNannyFinishContext();
35197 return __pyx_r;
35198 }
35199
35200 /* "(tree fragment)":1
35201 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
35202 * cdef tuple state
35203 * cdef object _dict
35204 */
35205
35206 /* Python wrapper */
35207 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_5__reduce_cython__(PyObject *__pyx_v_self,
35208 #if CYTHON_METH_FASTCALL
35209 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
35210 #else
35211 PyObject *__pyx_args, PyObject *__pyx_kwds
35212 #endif
35213 ); /*proto*/
35214 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantContig_4__reduce_cython__, "VariantContig.__reduce_cython__(self)");
35215 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantContig_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantContig_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantContig_4__reduce_cython__};
35216 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_5__reduce_cython__(PyObject *__pyx_v_self,
35217 #if CYTHON_METH_FASTCALL
35218 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
35219 #else
35220 PyObject *__pyx_args, PyObject *__pyx_kwds
35221 #endif
35222 ) {
35223 #if !CYTHON_METH_FASTCALL
35224 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
35225 #endif
35226 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
35227 PyObject *__pyx_r = 0;
35228 __Pyx_RefNannyDeclarations
35229 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
35230 #if !CYTHON_METH_FASTCALL
35231 #if CYTHON_ASSUME_SAFE_MACROS
35232 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
35233 #else
35234 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
35235 #endif
35236 #endif
35237 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
35238 if (unlikely(__pyx_nargs > 0)) {
35239 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
35240 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
35241 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig_4__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self));
35242
35243 /* function exit code */
35244 __Pyx_RefNannyFinishContext();
35245 return __pyx_r;
35246 }
35247
35248 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_4__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self) {
35249 PyObject *__pyx_v_state = 0;
35250 PyObject *__pyx_v__dict = 0;
35251 int __pyx_v_use_setstate;
35252 PyObject *__pyx_r = NULL;
35253 __Pyx_TraceDeclarations
35254 __Pyx_RefNannyDeclarations
35255 PyObject *__pyx_t_1 = NULL;
35256 PyObject *__pyx_t_2 = NULL;
35257 int __pyx_t_3;
35258 PyObject *__pyx_t_4 = NULL;
35259 int __pyx_lineno = 0;
35260 const char *__pyx_filename = NULL;
35261 int __pyx_clineno = 0;
35262 __Pyx_TraceFrameInit(__pyx_codeobj__74)
35263 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
35264 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
35265
35266 /* "(tree fragment)":5
35267 * cdef object _dict
35268 * cdef bint use_setstate
35269 * state = (self.header, self.id) # <<<<<<<<<<<<<<
35270 * _dict = getattr(self, '__dict__', None)
35271 * if _dict is not None:
35272 */
35273 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
35274 __Pyx_GOTREF(__pyx_t_1);
35275 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error)
35276 __Pyx_GOTREF(__pyx_t_2);
35277 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
35278 __Pyx_GIVEREF((PyObject *)__pyx_v_self->header);
35279 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->header))) __PYX_ERR(4, 5, __pyx_L1_error);
35280 __Pyx_GIVEREF(__pyx_t_1);
35281 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error);
35282 __pyx_t_1 = 0;
35283 __pyx_v_state = ((PyObject*)__pyx_t_2);
35284 __pyx_t_2 = 0;
35285
35286 /* "(tree fragment)":6
35287 * cdef bint use_setstate
35288 * state = (self.header, self.id)
35289 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
35290 * if _dict is not None:
35291 * state += (_dict,)
35292 */
35293 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error)
35294 __Pyx_GOTREF(__pyx_t_2);
35295 __pyx_v__dict = __pyx_t_2;
35296 __pyx_t_2 = 0;
35297
35298 /* "(tree fragment)":7
35299 * state = (self.header, self.id)
35300 * _dict = getattr(self, '__dict__', None)
35301 * if _dict is not None: # <<<<<<<<<<<<<<
35302 * state += (_dict,)
35303 * use_setstate = True
35304 */
35305 __pyx_t_3 = (__pyx_v__dict != Py_None);
35306 if (__pyx_t_3) {
35307
35308 /* "(tree fragment)":8
35309 * _dict = getattr(self, '__dict__', None)
35310 * if _dict is not None:
35311 * state += (_dict,) # <<<<<<<<<<<<<<
35312 * use_setstate = True
35313 * else:
35314 */
35315 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 8, __pyx_L1_error)
35316 __Pyx_GOTREF(__pyx_t_2);
35317 __Pyx_INCREF(__pyx_v__dict);
35318 __Pyx_GIVEREF(__pyx_v__dict);
35319 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
35320 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
35321 __Pyx_GOTREF(__pyx_t_1);
35322 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35323 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
35324 __pyx_t_1 = 0;
35325
35326 /* "(tree fragment)":9
35327 * if _dict is not None:
35328 * state += (_dict,)
35329 * use_setstate = True # <<<<<<<<<<<<<<
35330 * else:
35331 * use_setstate = self.header is not None
35332 */
35333 __pyx_v_use_setstate = 1;
35334
35335 /* "(tree fragment)":7
35336 * state = (self.header, self.id)
35337 * _dict = getattr(self, '__dict__', None)
35338 * if _dict is not None: # <<<<<<<<<<<<<<
35339 * state += (_dict,)
35340 * use_setstate = True
35341 */
35342 goto __pyx_L3;
35343 }
35344
35345 /* "(tree fragment)":11
35346 * use_setstate = True
35347 * else:
35348 * use_setstate = self.header is not None # <<<<<<<<<<<<<<
35349 * if use_setstate:
35350 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, None), state
35351 */
35352 /*else*/ {
35353 __pyx_t_3 = (((PyObject *)__pyx_v_self->header) != Py_None);
35354 __pyx_v_use_setstate = __pyx_t_3;
35355 }
35356 __pyx_L3:;
35357
35358 /* "(tree fragment)":12
35359 * else:
35360 * use_setstate = self.header is not None
35361 * if use_setstate: # <<<<<<<<<<<<<<
35362 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, None), state
35363 * else:
35364 */
35365 if (__pyx_v_use_setstate) {
35366
35367 /* "(tree fragment)":13
35368 * use_setstate = self.header is not None
35369 * if use_setstate:
35370 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, None), state # <<<<<<<<<<<<<<
35371 * else:
35372 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, state)
35373 */
35374 __Pyx_XDECREF(__pyx_r);
35375 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_VariantContig); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
35376 __Pyx_GOTREF(__pyx_t_1);
35377 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error)
35378 __Pyx_GOTREF(__pyx_t_2);
35379 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
35380 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
35381 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
35382 __Pyx_INCREF(__pyx_int_39264352);
35383 __Pyx_GIVEREF(__pyx_int_39264352);
35384 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_39264352)) __PYX_ERR(4, 13, __pyx_L1_error);
35385 __Pyx_INCREF(Py_None);
35386 __Pyx_GIVEREF(Py_None);
35387 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
35388 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
35389 __Pyx_GOTREF(__pyx_t_4);
35390 __Pyx_GIVEREF(__pyx_t_1);
35391 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
35392 __Pyx_GIVEREF(__pyx_t_2);
35393 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error);
35394 __Pyx_INCREF(__pyx_v_state);
35395 __Pyx_GIVEREF(__pyx_v_state);
35396 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
35397 __pyx_t_1 = 0;
35398 __pyx_t_2 = 0;
35399 __pyx_r = __pyx_t_4;
35400 __pyx_t_4 = 0;
35401 goto __pyx_L0;
35402
35403 /* "(tree fragment)":12
35404 * else:
35405 * use_setstate = self.header is not None
35406 * if use_setstate: # <<<<<<<<<<<<<<
35407 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, None), state
35408 * else:
35409 */
35410 }
35411
35412 /* "(tree fragment)":15
35413 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, None), state
35414 * else:
35415 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, state) # <<<<<<<<<<<<<<
35416 * def __setstate_cython__(self, __pyx_state):
35417 * __pyx_unpickle_VariantContig__set_state(self, __pyx_state)
35418 */
35419 /*else*/ {
35420 __Pyx_XDECREF(__pyx_r);
35421 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantContig); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
35422 __Pyx_GOTREF(__pyx_t_4);
35423 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error)
35424 __Pyx_GOTREF(__pyx_t_2);
35425 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
35426 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
35427 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
35428 __Pyx_INCREF(__pyx_int_39264352);
35429 __Pyx_GIVEREF(__pyx_int_39264352);
35430 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_39264352)) __PYX_ERR(4, 15, __pyx_L1_error);
35431 __Pyx_INCREF(__pyx_v_state);
35432 __Pyx_GIVEREF(__pyx_v_state);
35433 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
35434 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
35435 __Pyx_GOTREF(__pyx_t_1);
35436 __Pyx_GIVEREF(__pyx_t_4);
35437 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
35438 __Pyx_GIVEREF(__pyx_t_2);
35439 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error);
35440 __pyx_t_4 = 0;
35441 __pyx_t_2 = 0;
35442 __pyx_r = __pyx_t_1;
35443 __pyx_t_1 = 0;
35444 goto __pyx_L0;
35445 }
35446
35447 /* "(tree fragment)":1
35448 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
35449 * cdef tuple state
35450 * cdef object _dict
35451 */
35452
35453 /* function exit code */
35454 __pyx_L1_error:;
35455 __Pyx_XDECREF(__pyx_t_1);
35456 __Pyx_XDECREF(__pyx_t_2);
35457 __Pyx_XDECREF(__pyx_t_4);
35458 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35459 __pyx_r = NULL;
35460 __pyx_L0:;
35461 __Pyx_XDECREF(__pyx_v_state);
35462 __Pyx_XDECREF(__pyx_v__dict);
35463 __Pyx_XGIVEREF(__pyx_r);
35464 __Pyx_TraceReturn(__pyx_r, 0);
35465 __Pyx_RefNannyFinishContext();
35466 return __pyx_r;
35467 }
35468
35469 /* "(tree fragment)":16
35470 * else:
35471 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, state)
35472 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
35473 * __pyx_unpickle_VariantContig__set_state(self, __pyx_state)
35474 */
35475
35476 /* Python wrapper */
35477 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_7__setstate_cython__(PyObject *__pyx_v_self,
35478 #if CYTHON_METH_FASTCALL
35479 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
35480 #else
35481 PyObject *__pyx_args, PyObject *__pyx_kwds
35482 #endif
35483 ); /*proto*/
35484 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantContig_6__setstate_cython__, "VariantContig.__setstate_cython__(self, __pyx_state)");
35485 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantContig_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantContig_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantContig_6__setstate_cython__};
35486 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantContig_7__setstate_cython__(PyObject *__pyx_v_self,
35487 #if CYTHON_METH_FASTCALL
35488 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
35489 #else
35490 PyObject *__pyx_args, PyObject *__pyx_kwds
35491 #endif
35492 ) {
35493 PyObject *__pyx_v___pyx_state = 0;
35494 #if !CYTHON_METH_FASTCALL
35495 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
35496 #endif
35497 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
35498 PyObject* values[1] = {0};
35499 int __pyx_lineno = 0;
35500 const char *__pyx_filename = NULL;
35501 int __pyx_clineno = 0;
35502 PyObject *__pyx_r = 0;
35503 __Pyx_RefNannyDeclarations
35504 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
35505 #if !CYTHON_METH_FASTCALL
35506 #if CYTHON_ASSUME_SAFE_MACROS
35507 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
35508 #else
35509 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
35510 #endif
35511 #endif
35512 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
35513 {
35514 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
35515 if (__pyx_kwds) {
35516 Py_ssize_t kw_args;
35517 switch (__pyx_nargs) {
35518 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
35519 CYTHON_FALLTHROUGH;
35520 case 0: break;
35521 default: goto __pyx_L5_argtuple_error;
35522 }
35523 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
35524 switch (__pyx_nargs) {
35525 case 0:
35526 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
35527 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
35528 kw_args--;
35529 }
35530 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
35531 else goto __pyx_L5_argtuple_error;
35532 }
35533 if (unlikely(kw_args > 0)) {
35534 const Py_ssize_t kwd_pos_args = __pyx_nargs;
35535 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
35536 }
35537 } else if (unlikely(__pyx_nargs != 1)) {
35538 goto __pyx_L5_argtuple_error;
35539 } else {
35540 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
35541 }
35542 __pyx_v___pyx_state = values[0];
35543 }
35544 goto __pyx_L6_skip;
35545 __pyx_L5_argtuple_error:;
35546 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
35547 __pyx_L6_skip:;
35548 goto __pyx_L4_argument_unpacking_done;
35549 __pyx_L3_error:;
35550 {
35551 Py_ssize_t __pyx_temp;
35552 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
35553 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
35554 }
35555 }
35556 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35557 __Pyx_RefNannyFinishContext();
35558 return NULL;
35559 __pyx_L4_argument_unpacking_done:;
35560 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantContig_6__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v_self), __pyx_v___pyx_state);
35561
35562 /* function exit code */
35563 {
35564 Py_ssize_t __pyx_temp;
35565 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
35566 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
35567 }
35568 }
35569 __Pyx_RefNannyFinishContext();
35570 return __pyx_r;
35571 }
35572
35573 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantContig_6__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
35574 PyObject *__pyx_r = NULL;
35575 __Pyx_TraceDeclarations
35576 __Pyx_RefNannyDeclarations
35577 PyObject *__pyx_t_1 = NULL;
35578 int __pyx_lineno = 0;
35579 const char *__pyx_filename = NULL;
35580 int __pyx_clineno = 0;
35581 __Pyx_TraceFrameInit(__pyx_codeobj__75)
35582 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
35583 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
35584
35585 /* "(tree fragment)":17
35586 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, state)
35587 * def __setstate_cython__(self, __pyx_state):
35588 * __pyx_unpickle_VariantContig__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
35589 */
35590 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
35591 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantContig__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
35592 __Pyx_GOTREF(__pyx_t_1);
35593 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
35594
35595 /* "(tree fragment)":16
35596 * else:
35597 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, state)
35598 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
35599 * __pyx_unpickle_VariantContig__set_state(self, __pyx_state)
35600 */
35601
35602 /* function exit code */
35603 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
35604 goto __pyx_L0;
35605 __pyx_L1_error:;
35606 __Pyx_XDECREF(__pyx_t_1);
35607 __Pyx_AddTraceback("pysam.libcbcf.VariantContig.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35608 __pyx_r = NULL;
35609 __pyx_L0:;
35610 __Pyx_XGIVEREF(__pyx_r);
35611 __Pyx_TraceReturn(__pyx_r, 0);
35612 __Pyx_RefNannyFinishContext();
35613 return __pyx_r;
35614 }
35615
35616 /* "pysam/libcbcf.pyx":1747
35617 *
35618 *
35619 * cdef VariantContig makeVariantContig(VariantHeader header, int id): # <<<<<<<<<<<<<<
35620 * if not header:
35621 * raise ValueError('invalid VariantHeader')
35622 */
35623
35624 static struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_f_5pysam_7libcbcf_makeVariantContig(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, int __pyx_v_id) {
35625 struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v_contig = 0;
35626 struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_r = NULL;
35627 __Pyx_TraceDeclarations
35628 __Pyx_RefNannyDeclarations
35629 int __pyx_t_1;
35630 int __pyx_t_2;
35631 PyObject *__pyx_t_3 = NULL;
35632 int __pyx_lineno = 0;
35633 const char *__pyx_filename = NULL;
35634 int __pyx_clineno = 0;
35635 __Pyx_RefNannySetupContext("makeVariantContig", 1);
35636 __Pyx_TraceCall("makeVariantContig", __pyx_f[0], 1747, 0, __PYX_ERR(0, 1747, __pyx_L1_error));
35637
35638 /* "pysam/libcbcf.pyx":1748
35639 *
35640 * cdef VariantContig makeVariantContig(VariantHeader header, int id):
35641 * if not header: # <<<<<<<<<<<<<<
35642 * raise ValueError('invalid VariantHeader')
35643 *
35644 */
35645 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1748, __pyx_L1_error)
35646 __pyx_t_2 = (!__pyx_t_1);
35647 if (unlikely(__pyx_t_2)) {
35648
35649 /* "pysam/libcbcf.pyx":1749
35650 * cdef VariantContig makeVariantContig(VariantHeader header, int id):
35651 * if not header:
35652 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
35653 *
35654 * if id < 0 or id >= header.ptr.n[BCF_DT_CTG]:
35655 */
35656 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1749, __pyx_L1_error)
35657 __Pyx_GOTREF(__pyx_t_3);
35658 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
35659 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35660 __PYX_ERR(0, 1749, __pyx_L1_error)
35661
35662 /* "pysam/libcbcf.pyx":1748
35663 *
35664 * cdef VariantContig makeVariantContig(VariantHeader header, int id):
35665 * if not header: # <<<<<<<<<<<<<<
35666 * raise ValueError('invalid VariantHeader')
35667 *
35668 */
35669 }
35670
35671 /* "pysam/libcbcf.pyx":1751
35672 * raise ValueError('invalid VariantHeader')
35673 *
35674 * if id < 0 or id >= header.ptr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
35675 * raise ValueError('invalid contig id')
35676 *
35677 */
35678 __pyx_t_1 = (__pyx_v_id < 0);
35679 if (!__pyx_t_1) {
35680 } else {
35681 __pyx_t_2 = __pyx_t_1;
35682 goto __pyx_L5_bool_binop_done;
35683 }
35684 __pyx_t_1 = (__pyx_v_id >= (__pyx_v_header->ptr->n[BCF_DT_CTG]));
35685 __pyx_t_2 = __pyx_t_1;
35686 __pyx_L5_bool_binop_done:;
35687 if (unlikely(__pyx_t_2)) {
35688
35689 /* "pysam/libcbcf.pyx":1752
35690 *
35691 * if id < 0 or id >= header.ptr.n[BCF_DT_CTG]:
35692 * raise ValueError('invalid contig id') # <<<<<<<<<<<<<<
35693 *
35694 * cdef VariantContig contig = VariantContig.__new__(VariantContig)
35695 */
35696 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1752, __pyx_L1_error)
35697 __Pyx_GOTREF(__pyx_t_3);
35698 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
35699 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35700 __PYX_ERR(0, 1752, __pyx_L1_error)
35701
35702 /* "pysam/libcbcf.pyx":1751
35703 * raise ValueError('invalid VariantHeader')
35704 *
35705 * if id < 0 or id >= header.ptr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
35706 * raise ValueError('invalid contig id')
35707 *
35708 */
35709 }
35710
35711 /* "pysam/libcbcf.pyx":1754
35712 * raise ValueError('invalid contig id')
35713 *
35714 * cdef VariantContig contig = VariantContig.__new__(VariantContig) # <<<<<<<<<<<<<<
35715 * contig.header = header
35716 * contig.id = id
35717 */
35718 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantContig(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantContig), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1754, __pyx_L1_error)
35719 __Pyx_GOTREF((PyObject *)__pyx_t_3);
35720 __pyx_v_contig = ((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_t_3);
35721 __pyx_t_3 = 0;
35722
35723 /* "pysam/libcbcf.pyx":1755
35724 *
35725 * cdef VariantContig contig = VariantContig.__new__(VariantContig)
35726 * contig.header = header # <<<<<<<<<<<<<<
35727 * contig.id = id
35728 *
35729 */
35730 __Pyx_INCREF((PyObject *)__pyx_v_header);
35731 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
35732 __Pyx_GOTREF((PyObject *)__pyx_v_contig->header);
35733 __Pyx_DECREF((PyObject *)__pyx_v_contig->header);
35734 __pyx_v_contig->header = __pyx_v_header;
35735
35736 /* "pysam/libcbcf.pyx":1756
35737 * cdef VariantContig contig = VariantContig.__new__(VariantContig)
35738 * contig.header = header
35739 * contig.id = id # <<<<<<<<<<<<<<
35740 *
35741 * return contig
35742 */
35743 __pyx_v_contig->id = __pyx_v_id;
35744
35745 /* "pysam/libcbcf.pyx":1758
35746 * contig.id = id
35747 *
35748 * return contig # <<<<<<<<<<<<<<
35749 *
35750 *
35751 */
35752 __Pyx_XDECREF((PyObject *)__pyx_r);
35753 __Pyx_INCREF((PyObject *)__pyx_v_contig);
35754 __pyx_r = __pyx_v_contig;
35755 goto __pyx_L0;
35756
35757 /* "pysam/libcbcf.pyx":1747
35758 *
35759 *
35760 * cdef VariantContig makeVariantContig(VariantHeader header, int id): # <<<<<<<<<<<<<<
35761 * if not header:
35762 * raise ValueError('invalid VariantHeader')
35763 */
35764
35765 /* function exit code */
35766 __pyx_L1_error:;
35767 __Pyx_XDECREF(__pyx_t_3);
35768 __Pyx_AddTraceback("pysam.libcbcf.makeVariantContig", __pyx_clineno, __pyx_lineno, __pyx_filename);
35769 __pyx_r = 0;
35770 __pyx_L0:;
35771 __Pyx_XDECREF((PyObject *)__pyx_v_contig);
35772 __Pyx_XGIVEREF((PyObject *)__pyx_r);
35773 __Pyx_TraceReturn(__pyx_r, 0);
35774 __Pyx_RefNannyFinishContext();
35775 return __pyx_r;
35776 }
35777
35778 /* "pysam/libcbcf.pyx":1763
35779 * cdef class VariantHeaderContigs(object):
35780 * """mapping from contig name or index to :class:`VariantContig` object."""
35781 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
35782 * raise TypeError('this class cannot be instantiated from Python')
35783 *
35784 */
35785
35786 /* Python wrapper */
35787 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
35788 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
35789 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
35790 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
35791 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
35792 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
35793 int __pyx_r;
35794 __Pyx_RefNannyDeclarations
35795 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
35796 #if CYTHON_ASSUME_SAFE_MACROS
35797 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
35798 #else
35799 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
35800 #endif
35801 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
35802 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
35803 __Pyx_INCREF(__pyx_args);
35804 __pyx_v_args = __pyx_args;
35805 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
35806
35807 /* function exit code */
35808 __Pyx_DECREF(__pyx_v_args);
35809 __Pyx_XDECREF(__pyx_v_kwargs);
35810 __Pyx_RefNannyFinishContext();
35811 return __pyx_r;
35812 }
35813
35814 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
35815 int __pyx_r;
35816 __Pyx_TraceDeclarations
35817 __Pyx_RefNannyDeclarations
35818 PyObject *__pyx_t_1 = NULL;
35819 int __pyx_lineno = 0;
35820 const char *__pyx_filename = NULL;
35821 int __pyx_clineno = 0;
35822 __Pyx_RefNannySetupContext("__init__", 1);
35823 __Pyx_TraceCall("__init__", __pyx_f[0], 1763, 0, __PYX_ERR(0, 1763, __pyx_L1_error));
35824
35825 /* "pysam/libcbcf.pyx":1764
35826 * """mapping from contig name or index to :class:`VariantContig` object."""
35827 * def __init__(self, *args, **kwargs):
35828 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
35829 *
35830 * def __len__(self):
35831 */
35832 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1764, __pyx_L1_error)
35833 __Pyx_GOTREF(__pyx_t_1);
35834 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
35835 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
35836 __PYX_ERR(0, 1764, __pyx_L1_error)
35837
35838 /* "pysam/libcbcf.pyx":1763
35839 * cdef class VariantHeaderContigs(object):
35840 * """mapping from contig name or index to :class:`VariantContig` object."""
35841 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
35842 * raise TypeError('this class cannot be instantiated from Python')
35843 *
35844 */
35845
35846 /* function exit code */
35847 __pyx_L1_error:;
35848 __Pyx_XDECREF(__pyx_t_1);
35849 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35850 __pyx_r = -1;
35851 __Pyx_TraceReturn(Py_None, 0);
35852 __Pyx_RefNannyFinishContext();
35853 return __pyx_r;
35854 }
35855
35856 /* "pysam/libcbcf.pyx":1766
35857 * raise TypeError('this class cannot be instantiated from Python')
35858 *
35859 * def __len__(self): # <<<<<<<<<<<<<<
35860 * cdef bcf_hdr_t *hdr = self.header.ptr
35861 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG]
35862 */
35863
35864 /* Python wrapper */
35865 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_3__len__(PyObject *__pyx_v_self); /*proto*/
35866 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_3__len__(PyObject *__pyx_v_self) {
35867 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
35868 Py_ssize_t __pyx_r;
35869 __Pyx_RefNannyDeclarations
35870 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
35871 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
35872 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
35873
35874 /* function exit code */
35875 __Pyx_RefNannyFinishContext();
35876 return __pyx_r;
35877 }
35878
35879 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
35880 bcf_hdr_t *__pyx_v_hdr;
35881 Py_ssize_t __pyx_r;
35882 __Pyx_TraceDeclarations
35883 bcf_hdr_t *__pyx_t_1;
35884 int __pyx_t_2;
35885 int __pyx_lineno = 0;
35886 const char *__pyx_filename = NULL;
35887 int __pyx_clineno = 0;
35888 __Pyx_TraceCall("__len__", __pyx_f[0], 1766, 0, __PYX_ERR(0, 1766, __pyx_L1_error));
35889
35890 /* "pysam/libcbcf.pyx":1767
35891 *
35892 * def __len__(self):
35893 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
35894 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG]
35895 * return hdr.n[BCF_DT_CTG]
35896 */
35897 __pyx_t_1 = __pyx_v_self->header->ptr;
35898 __pyx_v_hdr = __pyx_t_1;
35899
35900 /* "pysam/libcbcf.pyx":1768
35901 * def __len__(self):
35902 * cdef bcf_hdr_t *hdr = self.header.ptr
35903 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG] # <<<<<<<<<<<<<<
35904 * return hdr.n[BCF_DT_CTG]
35905 *
35906 */
35907 #ifndef CYTHON_WITHOUT_ASSERTIONS
35908 if (unlikely(__pyx_assertions_enabled())) {
35909 __pyx_t_2 = (kh_size(((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_CTG]))) == (__pyx_v_hdr->n[BCF_DT_CTG]));
35910 if (unlikely(!__pyx_t_2)) {
35911 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
35912 __PYX_ERR(0, 1768, __pyx_L1_error)
35913 }
35914 }
35915 #else
35916 if ((1)); else __PYX_ERR(0, 1768, __pyx_L1_error)
35917 #endif
35918
35919 /* "pysam/libcbcf.pyx":1769
35920 * cdef bcf_hdr_t *hdr = self.header.ptr
35921 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG]
35922 * return hdr.n[BCF_DT_CTG] # <<<<<<<<<<<<<<
35923 *
35924 * def __bool__(self):
35925 */
35926 __pyx_r = (__pyx_v_hdr->n[BCF_DT_CTG]);
35927 goto __pyx_L0;
35928
35929 /* "pysam/libcbcf.pyx":1766
35930 * raise TypeError('this class cannot be instantiated from Python')
35931 *
35932 * def __len__(self): # <<<<<<<<<<<<<<
35933 * cdef bcf_hdr_t *hdr = self.header.ptr
35934 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG]
35935 */
35936
35937 /* function exit code */
35938 __pyx_L1_error:;
35939 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35940 __pyx_r = -1;
35941 __pyx_L0:;
35942 __Pyx_TraceReturn(Py_None, 0);
35943 return __pyx_r;
35944 }
35945
35946 /* "pysam/libcbcf.pyx":1771
35947 * return hdr.n[BCF_DT_CTG]
35948 *
35949 * def __bool__(self): # <<<<<<<<<<<<<<
35950 * cdef bcf_hdr_t *hdr = self.header.ptr
35951 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG]
35952 */
35953
35954 /* Python wrapper */
35955 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_5__bool__(PyObject *__pyx_v_self); /*proto*/
35956 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_5__bool__(PyObject *__pyx_v_self) {
35957 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
35958 int __pyx_r;
35959 __Pyx_RefNannyDeclarations
35960 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
35961 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
35962 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
35963
35964 /* function exit code */
35965 __Pyx_RefNannyFinishContext();
35966 return __pyx_r;
35967 }
35968
35969 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
35970 bcf_hdr_t *__pyx_v_hdr;
35971 int __pyx_r;
35972 __Pyx_TraceDeclarations
35973 bcf_hdr_t *__pyx_t_1;
35974 int __pyx_t_2;
35975 int __pyx_lineno = 0;
35976 const char *__pyx_filename = NULL;
35977 int __pyx_clineno = 0;
35978 __Pyx_TraceCall("__bool__", __pyx_f[0], 1771, 0, __PYX_ERR(0, 1771, __pyx_L1_error));
35979
35980 /* "pysam/libcbcf.pyx":1772
35981 *
35982 * def __bool__(self):
35983 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
35984 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG]
35985 * return hdr.n[BCF_DT_CTG] != 0
35986 */
35987 __pyx_t_1 = __pyx_v_self->header->ptr;
35988 __pyx_v_hdr = __pyx_t_1;
35989
35990 /* "pysam/libcbcf.pyx":1773
35991 * def __bool__(self):
35992 * cdef bcf_hdr_t *hdr = self.header.ptr
35993 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG] # <<<<<<<<<<<<<<
35994 * return hdr.n[BCF_DT_CTG] != 0
35995 *
35996 */
35997 #ifndef CYTHON_WITHOUT_ASSERTIONS
35998 if (unlikely(__pyx_assertions_enabled())) {
35999 __pyx_t_2 = (kh_size(((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_CTG]))) == (__pyx_v_hdr->n[BCF_DT_CTG]));
36000 if (unlikely(!__pyx_t_2)) {
36001 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
36002 __PYX_ERR(0, 1773, __pyx_L1_error)
36003 }
36004 }
36005 #else
36006 if ((1)); else __PYX_ERR(0, 1773, __pyx_L1_error)
36007 #endif
36008
36009 /* "pysam/libcbcf.pyx":1774
36010 * cdef bcf_hdr_t *hdr = self.header.ptr
36011 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG]
36012 * return hdr.n[BCF_DT_CTG] != 0 # <<<<<<<<<<<<<<
36013 *
36014 * def __getitem__(self, key):
36015 */
36016 __pyx_r = ((__pyx_v_hdr->n[BCF_DT_CTG]) != 0);
36017 goto __pyx_L0;
36018
36019 /* "pysam/libcbcf.pyx":1771
36020 * return hdr.n[BCF_DT_CTG]
36021 *
36022 * def __bool__(self): # <<<<<<<<<<<<<<
36023 * cdef bcf_hdr_t *hdr = self.header.ptr
36024 * assert kh_size(<vdict_t *>hdr.dict[BCF_DT_CTG]) == hdr.n[BCF_DT_CTG]
36025 */
36026
36027 /* function exit code */
36028 __pyx_L1_error:;
36029 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36030 __pyx_r = -1;
36031 __pyx_L0:;
36032 __Pyx_TraceReturn(Py_None, 0);
36033 return __pyx_r;
36034 }
36035
36036 /* "pysam/libcbcf.pyx":1776
36037 * return hdr.n[BCF_DT_CTG] != 0
36038 *
36039 * def __getitem__(self, key): # <<<<<<<<<<<<<<
36040 * cdef bcf_hdr_t *hdr = self.header.ptr
36041 * cdef int index
36042 */
36043
36044 /* Python wrapper */
36045 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
36046 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
36047 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
36048 PyObject *__pyx_r = 0;
36049 __Pyx_RefNannyDeclarations
36050 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
36051 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
36052 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self), ((PyObject *)__pyx_v_key));
36053
36054 /* function exit code */
36055 __Pyx_RefNannyFinishContext();
36056 return __pyx_r;
36057 }
36058
36059 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_key) {
36060 bcf_hdr_t *__pyx_v_hdr;
36061 int __pyx_v_index;
36062 vdict_t *__pyx_v_d;
36063 PyObject *__pyx_v_bkey = 0;
36064 khiter_t __pyx_v_k;
36065 int __pyx_v_id;
36066 PyObject *__pyx_r = NULL;
36067 __Pyx_TraceDeclarations
36068 __Pyx_RefNannyDeclarations
36069 bcf_hdr_t *__pyx_t_1;
36070 int __pyx_t_2;
36071 int __pyx_t_3;
36072 int __pyx_t_4;
36073 PyObject *__pyx_t_5 = NULL;
36074 PyObject *__pyx_t_6 = NULL;
36075 char const *__pyx_t_7;
36076 PyObject *__pyx_t_8 = NULL;
36077 unsigned int __pyx_t_9;
36078 int __pyx_lineno = 0;
36079 const char *__pyx_filename = NULL;
36080 int __pyx_clineno = 0;
36081 __Pyx_RefNannySetupContext("__getitem__", 1);
36082 __Pyx_TraceCall("__getitem__", __pyx_f[0], 1776, 0, __PYX_ERR(0, 1776, __pyx_L1_error));
36083
36084 /* "pysam/libcbcf.pyx":1777
36085 *
36086 * def __getitem__(self, key):
36087 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
36088 * cdef int index
36089 *
36090 */
36091 __pyx_t_1 = __pyx_v_self->header->ptr;
36092 __pyx_v_hdr = __pyx_t_1;
36093
36094 /* "pysam/libcbcf.pyx":1780
36095 * cdef int index
36096 *
36097 * if isinstance(key, int): # <<<<<<<<<<<<<<
36098 * index = key
36099 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36100 */
36101 __pyx_t_2 = PyInt_Check(__pyx_v_key);
36102 if (__pyx_t_2) {
36103
36104 /* "pysam/libcbcf.pyx":1781
36105 *
36106 * if isinstance(key, int):
36107 * index = key # <<<<<<<<<<<<<<
36108 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36109 * raise IndexError('invalid contig index')
36110 */
36111 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_key); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1781, __pyx_L1_error)
36112 __pyx_v_index = __pyx_t_3;
36113
36114 /* "pysam/libcbcf.pyx":1782
36115 * if isinstance(key, int):
36116 * index = key
36117 * if index < 0 or index >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
36118 * raise IndexError('invalid contig index')
36119 * return makeVariantContig(self.header, index)
36120 */
36121 __pyx_t_4 = (__pyx_v_index < 0);
36122 if (!__pyx_t_4) {
36123 } else {
36124 __pyx_t_2 = __pyx_t_4;
36125 goto __pyx_L5_bool_binop_done;
36126 }
36127 __pyx_t_4 = (__pyx_v_index >= (__pyx_v_hdr->n[BCF_DT_CTG]));
36128 __pyx_t_2 = __pyx_t_4;
36129 __pyx_L5_bool_binop_done:;
36130 if (unlikely(__pyx_t_2)) {
36131
36132 /* "pysam/libcbcf.pyx":1783
36133 * index = key
36134 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36135 * raise IndexError('invalid contig index') # <<<<<<<<<<<<<<
36136 * return makeVariantContig(self.header, index)
36137 *
36138 */
36139 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1783, __pyx_L1_error)
36140 __Pyx_GOTREF(__pyx_t_5);
36141 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
36142 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36143 __PYX_ERR(0, 1783, __pyx_L1_error)
36144
36145 /* "pysam/libcbcf.pyx":1782
36146 * if isinstance(key, int):
36147 * index = key
36148 * if index < 0 or index >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
36149 * raise IndexError('invalid contig index')
36150 * return makeVariantContig(self.header, index)
36151 */
36152 }
36153
36154 /* "pysam/libcbcf.pyx":1784
36155 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36156 * raise IndexError('invalid contig index')
36157 * return makeVariantContig(self.header, index) # <<<<<<<<<<<<<<
36158 *
36159 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36160 */
36161 __Pyx_XDECREF(__pyx_r);
36162 __pyx_t_5 = ((PyObject *)__pyx_v_self->header);
36163 __Pyx_INCREF(__pyx_t_5);
36164 __pyx_t_6 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantContig(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_5), __pyx_v_index)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __pyx_L1_error)
36165 __Pyx_GOTREF(__pyx_t_6);
36166 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36167 __pyx_r = __pyx_t_6;
36168 __pyx_t_6 = 0;
36169 goto __pyx_L0;
36170
36171 /* "pysam/libcbcf.pyx":1780
36172 * cdef int index
36173 *
36174 * if isinstance(key, int): # <<<<<<<<<<<<<<
36175 * index = key
36176 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36177 */
36178 }
36179
36180 /* "pysam/libcbcf.pyx":1786
36181 * return makeVariantContig(self.header, index)
36182 *
36183 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG] # <<<<<<<<<<<<<<
36184 * cdef bytes bkey = force_bytes(key)
36185 * cdef khiter_t k = kh_get_vdict(d, bkey)
36186 */
36187 __pyx_v_d = ((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_CTG]));
36188
36189 /* "pysam/libcbcf.pyx":1787
36190 *
36191 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36192 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
36193 * cdef khiter_t k = kh_get_vdict(d, bkey)
36194 *
36195 */
36196 __pyx_t_6 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1787, __pyx_L1_error)
36197 __Pyx_GOTREF(__pyx_t_6);
36198 __pyx_v_bkey = ((PyObject*)__pyx_t_6);
36199 __pyx_t_6 = 0;
36200
36201 /* "pysam/libcbcf.pyx":1788
36202 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36203 * cdef bytes bkey = force_bytes(key)
36204 * cdef khiter_t k = kh_get_vdict(d, bkey) # <<<<<<<<<<<<<<
36205 *
36206 * if k == kh_end(d):
36207 */
36208 if (unlikely(__pyx_v_bkey == Py_None)) {
36209 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
36210 __PYX_ERR(0, 1788, __pyx_L1_error)
36211 }
36212 __pyx_t_7 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1788, __pyx_L1_error)
36213 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_7);
36214
36215 /* "pysam/libcbcf.pyx":1790
36216 * cdef khiter_t k = kh_get_vdict(d, bkey)
36217 *
36218 * if k == kh_end(d): # <<<<<<<<<<<<<<
36219 * raise KeyError('invalid contig: {}'.format(key))
36220 *
36221 */
36222 __pyx_t_2 = (__pyx_v_k == kh_end(__pyx_v_d));
36223 if (unlikely(__pyx_t_2)) {
36224
36225 /* "pysam/libcbcf.pyx":1791
36226 *
36227 * if k == kh_end(d):
36228 * raise KeyError('invalid contig: {}'.format(key)) # <<<<<<<<<<<<<<
36229 *
36230 * cdef int id = kh_val_vdict(d, k).id
36231 */
36232 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_contig, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1791, __pyx_L1_error)
36233 __Pyx_GOTREF(__pyx_t_5);
36234 __pyx_t_8 = NULL;
36235 __pyx_t_9 = 0;
36236 #if CYTHON_UNPACK_METHODS
36237 if (likely(PyMethod_Check(__pyx_t_5))) {
36238 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
36239 if (likely(__pyx_t_8)) {
36240 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
36241 __Pyx_INCREF(__pyx_t_8);
36242 __Pyx_INCREF(function);
36243 __Pyx_DECREF_SET(__pyx_t_5, function);
36244 __pyx_t_9 = 1;
36245 }
36246 }
36247 #endif
36248 {
36249 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_key};
36250 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
36251 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
36252 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1791, __pyx_L1_error)
36253 __Pyx_GOTREF(__pyx_t_6);
36254 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36255 }
36256 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1791, __pyx_L1_error)
36257 __Pyx_GOTREF(__pyx_t_5);
36258 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
36259 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
36260 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36261 __PYX_ERR(0, 1791, __pyx_L1_error)
36262
36263 /* "pysam/libcbcf.pyx":1790
36264 * cdef khiter_t k = kh_get_vdict(d, bkey)
36265 *
36266 * if k == kh_end(d): # <<<<<<<<<<<<<<
36267 * raise KeyError('invalid contig: {}'.format(key))
36268 *
36269 */
36270 }
36271
36272 /* "pysam/libcbcf.pyx":1793
36273 * raise KeyError('invalid contig: {}'.format(key))
36274 *
36275 * cdef int id = kh_val_vdict(d, k).id # <<<<<<<<<<<<<<
36276 *
36277 * return makeVariantContig(self.header, id)
36278 */
36279 __pyx_t_3 = kh_val(__pyx_v_d, __pyx_v_k).id;
36280 __pyx_v_id = __pyx_t_3;
36281
36282 /* "pysam/libcbcf.pyx":1795
36283 * cdef int id = kh_val_vdict(d, k).id
36284 *
36285 * return makeVariantContig(self.header, id) # <<<<<<<<<<<<<<
36286 *
36287 * def remove_header(self, key):
36288 */
36289 __Pyx_XDECREF(__pyx_r);
36290 __pyx_t_5 = ((PyObject *)__pyx_v_self->header);
36291 __Pyx_INCREF(__pyx_t_5);
36292 __pyx_t_6 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantContig(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_5), __pyx_v_id)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1795, __pyx_L1_error)
36293 __Pyx_GOTREF(__pyx_t_6);
36294 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36295 __pyx_r = __pyx_t_6;
36296 __pyx_t_6 = 0;
36297 goto __pyx_L0;
36298
36299 /* "pysam/libcbcf.pyx":1776
36300 * return hdr.n[BCF_DT_CTG] != 0
36301 *
36302 * def __getitem__(self, key): # <<<<<<<<<<<<<<
36303 * cdef bcf_hdr_t *hdr = self.header.ptr
36304 * cdef int index
36305 */
36306
36307 /* function exit code */
36308 __pyx_L1_error:;
36309 __Pyx_XDECREF(__pyx_t_5);
36310 __Pyx_XDECREF(__pyx_t_6);
36311 __Pyx_XDECREF(__pyx_t_8);
36312 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36313 __pyx_r = NULL;
36314 __pyx_L0:;
36315 __Pyx_XDECREF(__pyx_v_bkey);
36316 __Pyx_XGIVEREF(__pyx_r);
36317 __Pyx_TraceReturn(__pyx_r, 0);
36318 __Pyx_RefNannyFinishContext();
36319 return __pyx_r;
36320 }
36321
36322 /* "pysam/libcbcf.pyx":1797
36323 * return makeVariantContig(self.header, id)
36324 *
36325 * def remove_header(self, key): # <<<<<<<<<<<<<<
36326 * cdef bcf_hdr_t *hdr = self.header.ptr
36327 * cdef int index
36328 */
36329
36330 /* Python wrapper */
36331 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_9remove_header(PyObject *__pyx_v_self,
36332 #if CYTHON_METH_FASTCALL
36333 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
36334 #else
36335 PyObject *__pyx_args, PyObject *__pyx_kwds
36336 #endif
36337 ); /*proto*/
36338 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_8remove_header, "VariantHeaderContigs.remove_header(self, key)");
36339 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_9remove_header = {"remove_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_9remove_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_8remove_header};
36340 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_9remove_header(PyObject *__pyx_v_self,
36341 #if CYTHON_METH_FASTCALL
36342 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
36343 #else
36344 PyObject *__pyx_args, PyObject *__pyx_kwds
36345 #endif
36346 ) {
36347 PyObject *__pyx_v_key = 0;
36348 #if !CYTHON_METH_FASTCALL
36349 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
36350 #endif
36351 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
36352 PyObject* values[1] = {0};
36353 int __pyx_lineno = 0;
36354 const char *__pyx_filename = NULL;
36355 int __pyx_clineno = 0;
36356 PyObject *__pyx_r = 0;
36357 __Pyx_RefNannyDeclarations
36358 __Pyx_RefNannySetupContext("remove_header (wrapper)", 0);
36359 #if !CYTHON_METH_FASTCALL
36360 #if CYTHON_ASSUME_SAFE_MACROS
36361 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
36362 #else
36363 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
36364 #endif
36365 #endif
36366 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
36367 {
36368 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,0};
36369 if (__pyx_kwds) {
36370 Py_ssize_t kw_args;
36371 switch (__pyx_nargs) {
36372 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
36373 CYTHON_FALLTHROUGH;
36374 case 0: break;
36375 default: goto __pyx_L5_argtuple_error;
36376 }
36377 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
36378 switch (__pyx_nargs) {
36379 case 0:
36380 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
36381 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
36382 kw_args--;
36383 }
36384 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1797, __pyx_L3_error)
36385 else goto __pyx_L5_argtuple_error;
36386 }
36387 if (unlikely(kw_args > 0)) {
36388 const Py_ssize_t kwd_pos_args = __pyx_nargs;
36389 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_header") < 0)) __PYX_ERR(0, 1797, __pyx_L3_error)
36390 }
36391 } else if (unlikely(__pyx_nargs != 1)) {
36392 goto __pyx_L5_argtuple_error;
36393 } else {
36394 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
36395 }
36396 __pyx_v_key = values[0];
36397 }
36398 goto __pyx_L6_skip;
36399 __pyx_L5_argtuple_error:;
36400 __Pyx_RaiseArgtupleInvalid("remove_header", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1797, __pyx_L3_error)
36401 __pyx_L6_skip:;
36402 goto __pyx_L4_argument_unpacking_done;
36403 __pyx_L3_error:;
36404 {
36405 Py_ssize_t __pyx_temp;
36406 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
36407 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
36408 }
36409 }
36410 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.remove_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
36411 __Pyx_RefNannyFinishContext();
36412 return NULL;
36413 __pyx_L4_argument_unpacking_done:;
36414 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_8remove_header(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self), __pyx_v_key);
36415
36416 /* function exit code */
36417 {
36418 Py_ssize_t __pyx_temp;
36419 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
36420 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
36421 }
36422 }
36423 __Pyx_RefNannyFinishContext();
36424 return __pyx_r;
36425 }
36426
36427 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_8remove_header(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_key) {
36428 bcf_hdr_t *__pyx_v_hdr;
36429 int __pyx_v_index;
36430 char const *__pyx_v_ckey;
36431 vdict_t *__pyx_v_d;
36432 PyObject *__pyx_r = NULL;
36433 __Pyx_TraceDeclarations
36434 __Pyx_RefNannyDeclarations
36435 bcf_hdr_t *__pyx_t_1;
36436 int __pyx_t_2;
36437 int __pyx_t_3;
36438 int __pyx_t_4;
36439 PyObject *__pyx_t_5 = NULL;
36440 Py_ssize_t __pyx_t_6;
36441 char const *__pyx_t_7;
36442 char const *__pyx_t_8;
36443 PyObject *__pyx_t_9 = NULL;
36444 PyObject *__pyx_t_10 = NULL;
36445 unsigned int __pyx_t_11;
36446 char const *__pyx_t_12;
36447 int __pyx_lineno = 0;
36448 const char *__pyx_filename = NULL;
36449 int __pyx_clineno = 0;
36450 __Pyx_TraceFrameInit(__pyx_codeobj__78)
36451 __Pyx_RefNannySetupContext("remove_header", 0);
36452 __Pyx_TraceCall("remove_header", __pyx_f[0], 1797, 0, __PYX_ERR(0, 1797, __pyx_L1_error));
36453 __Pyx_INCREF(__pyx_v_key);
36454
36455 /* "pysam/libcbcf.pyx":1798
36456 *
36457 * def remove_header(self, key):
36458 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
36459 * cdef int index
36460 * cdef const char *ckey
36461 */
36462 __pyx_t_1 = __pyx_v_self->header->ptr;
36463 __pyx_v_hdr = __pyx_t_1;
36464
36465 /* "pysam/libcbcf.pyx":1804
36466 * cdef khiter_t k
36467 *
36468 * if isinstance(key, int): # <<<<<<<<<<<<<<
36469 * index = key
36470 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36471 */
36472 __pyx_t_2 = PyInt_Check(__pyx_v_key);
36473 if (__pyx_t_2) {
36474
36475 /* "pysam/libcbcf.pyx":1805
36476 *
36477 * if isinstance(key, int):
36478 * index = key # <<<<<<<<<<<<<<
36479 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36480 * raise IndexError('invalid contig index')
36481 */
36482 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_key); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1805, __pyx_L1_error)
36483 __pyx_v_index = __pyx_t_3;
36484
36485 /* "pysam/libcbcf.pyx":1806
36486 * if isinstance(key, int):
36487 * index = key
36488 * if index < 0 or index >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
36489 * raise IndexError('invalid contig index')
36490 * ckey = hdr.id[BCF_DT_CTG][self.id].key
36491 */
36492 __pyx_t_4 = (__pyx_v_index < 0);
36493 if (!__pyx_t_4) {
36494 } else {
36495 __pyx_t_2 = __pyx_t_4;
36496 goto __pyx_L5_bool_binop_done;
36497 }
36498 __pyx_t_4 = (__pyx_v_index >= (__pyx_v_hdr->n[BCF_DT_CTG]));
36499 __pyx_t_2 = __pyx_t_4;
36500 __pyx_L5_bool_binop_done:;
36501 if (unlikely(__pyx_t_2)) {
36502
36503 /* "pysam/libcbcf.pyx":1807
36504 * index = key
36505 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36506 * raise IndexError('invalid contig index') # <<<<<<<<<<<<<<
36507 * ckey = hdr.id[BCF_DT_CTG][self.id].key
36508 * else:
36509 */
36510 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1807, __pyx_L1_error)
36511 __Pyx_GOTREF(__pyx_t_5);
36512 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
36513 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36514 __PYX_ERR(0, 1807, __pyx_L1_error)
36515
36516 /* "pysam/libcbcf.pyx":1806
36517 * if isinstance(key, int):
36518 * index = key
36519 * if index < 0 or index >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
36520 * raise IndexError('invalid contig index')
36521 * ckey = hdr.id[BCF_DT_CTG][self.id].key
36522 */
36523 }
36524
36525 /* "pysam/libcbcf.pyx":1808
36526 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36527 * raise IndexError('invalid contig index')
36528 * ckey = hdr.id[BCF_DT_CTG][self.id].key # <<<<<<<<<<<<<<
36529 * else:
36530 * d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36531 */
36532 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1808, __pyx_L1_error)
36533 __Pyx_GOTREF(__pyx_t_5);
36534 __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1808, __pyx_L1_error)
36535 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36536 __pyx_t_7 = ((__pyx_v_hdr->id[BCF_DT_CTG])[__pyx_t_6]).key;
36537 __pyx_v_ckey = __pyx_t_7;
36538
36539 /* "pysam/libcbcf.pyx":1804
36540 * cdef khiter_t k
36541 *
36542 * if isinstance(key, int): # <<<<<<<<<<<<<<
36543 * index = key
36544 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
36545 */
36546 goto __pyx_L3;
36547 }
36548
36549 /* "pysam/libcbcf.pyx":1810
36550 * ckey = hdr.id[BCF_DT_CTG][self.id].key
36551 * else:
36552 * d = <vdict_t *>hdr.dict[BCF_DT_CTG] # <<<<<<<<<<<<<<
36553 * key = force_bytes(key)
36554 * if kh_get_vdict(d, key) == kh_end(d):
36555 */
36556 /*else*/ {
36557 __pyx_v_d = ((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_CTG]));
36558
36559 /* "pysam/libcbcf.pyx":1811
36560 * else:
36561 * d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36562 * key = force_bytes(key) # <<<<<<<<<<<<<<
36563 * if kh_get_vdict(d, key) == kh_end(d):
36564 * raise KeyError('invalid contig: {}'.format(key))
36565 */
36566 __pyx_t_5 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L1_error)
36567 __Pyx_GOTREF(__pyx_t_5);
36568 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_5);
36569 __pyx_t_5 = 0;
36570
36571 /* "pysam/libcbcf.pyx":1812
36572 * d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36573 * key = force_bytes(key)
36574 * if kh_get_vdict(d, key) == kh_end(d): # <<<<<<<<<<<<<<
36575 * raise KeyError('invalid contig: {}'.format(key))
36576 * ckey = key
36577 */
36578 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 1812, __pyx_L1_error)
36579 __pyx_t_2 = (kh_get_vdict(__pyx_v_d, __pyx_t_8) == kh_end(__pyx_v_d));
36580 if (unlikely(__pyx_t_2)) {
36581
36582 /* "pysam/libcbcf.pyx":1813
36583 * key = force_bytes(key)
36584 * if kh_get_vdict(d, key) == kh_end(d):
36585 * raise KeyError('invalid contig: {}'.format(key)) # <<<<<<<<<<<<<<
36586 * ckey = key
36587 *
36588 */
36589 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_contig, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1813, __pyx_L1_error)
36590 __Pyx_GOTREF(__pyx_t_9);
36591 __pyx_t_10 = NULL;
36592 __pyx_t_11 = 0;
36593 #if CYTHON_UNPACK_METHODS
36594 if (likely(PyMethod_Check(__pyx_t_9))) {
36595 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
36596 if (likely(__pyx_t_10)) {
36597 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
36598 __Pyx_INCREF(__pyx_t_10);
36599 __Pyx_INCREF(function);
36600 __Pyx_DECREF_SET(__pyx_t_9, function);
36601 __pyx_t_11 = 1;
36602 }
36603 }
36604 #endif
36605 {
36606 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_key};
36607 __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
36608 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
36609 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1813, __pyx_L1_error)
36610 __Pyx_GOTREF(__pyx_t_5);
36611 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
36612 }
36613 __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1813, __pyx_L1_error)
36614 __Pyx_GOTREF(__pyx_t_9);
36615 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36616 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
36617 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
36618 __PYX_ERR(0, 1813, __pyx_L1_error)
36619
36620 /* "pysam/libcbcf.pyx":1812
36621 * d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36622 * key = force_bytes(key)
36623 * if kh_get_vdict(d, key) == kh_end(d): # <<<<<<<<<<<<<<
36624 * raise KeyError('invalid contig: {}'.format(key))
36625 * ckey = key
36626 */
36627 }
36628
36629 /* "pysam/libcbcf.pyx":1814
36630 * if kh_get_vdict(d, key) == kh_end(d):
36631 * raise KeyError('invalid contig: {}'.format(key))
36632 * ckey = key # <<<<<<<<<<<<<<
36633 *
36634 * bcf_hdr_remove(hdr, BCF_HL_CTG, ckey)
36635 */
36636 __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 1814, __pyx_L1_error)
36637 __pyx_v_ckey = __pyx_t_12;
36638 }
36639 __pyx_L3:;
36640
36641 /* "pysam/libcbcf.pyx":1816
36642 * ckey = key
36643 *
36644 * bcf_hdr_remove(hdr, BCF_HL_CTG, ckey) # <<<<<<<<<<<<<<
36645 *
36646 * def clear_header(self):
36647 */
36648 bcf_hdr_remove(__pyx_v_hdr, BCF_HL_CTG, __pyx_v_ckey);
36649
36650 /* "pysam/libcbcf.pyx":1797
36651 * return makeVariantContig(self.header, id)
36652 *
36653 * def remove_header(self, key): # <<<<<<<<<<<<<<
36654 * cdef bcf_hdr_t *hdr = self.header.ptr
36655 * cdef int index
36656 */
36657
36658 /* function exit code */
36659 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
36660 goto __pyx_L0;
36661 __pyx_L1_error:;
36662 __Pyx_XDECREF(__pyx_t_5);
36663 __Pyx_XDECREF(__pyx_t_9);
36664 __Pyx_XDECREF(__pyx_t_10);
36665 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.remove_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
36666 __pyx_r = NULL;
36667 __pyx_L0:;
36668 __Pyx_XDECREF(__pyx_v_key);
36669 __Pyx_XGIVEREF(__pyx_r);
36670 __Pyx_TraceReturn(__pyx_r, 0);
36671 __Pyx_RefNannyFinishContext();
36672 return __pyx_r;
36673 }
36674
36675 /* "pysam/libcbcf.pyx":1818
36676 * bcf_hdr_remove(hdr, BCF_HL_CTG, ckey)
36677 *
36678 * def clear_header(self): # <<<<<<<<<<<<<<
36679 * cdef bcf_hdr_t *hdr = self.header.ptr
36680 * bcf_hdr_remove(hdr, BCF_HL_CTG, NULL)
36681 */
36682
36683 /* Python wrapper */
36684 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_11clear_header(PyObject *__pyx_v_self,
36685 #if CYTHON_METH_FASTCALL
36686 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
36687 #else
36688 PyObject *__pyx_args, PyObject *__pyx_kwds
36689 #endif
36690 ); /*proto*/
36691 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_10clear_header, "VariantHeaderContigs.clear_header(self)");
36692 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_11clear_header = {"clear_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_11clear_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_10clear_header};
36693 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_11clear_header(PyObject *__pyx_v_self,
36694 #if CYTHON_METH_FASTCALL
36695 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
36696 #else
36697 PyObject *__pyx_args, PyObject *__pyx_kwds
36698 #endif
36699 ) {
36700 #if !CYTHON_METH_FASTCALL
36701 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
36702 #endif
36703 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
36704 PyObject *__pyx_r = 0;
36705 __Pyx_RefNannyDeclarations
36706 __Pyx_RefNannySetupContext("clear_header (wrapper)", 0);
36707 #if !CYTHON_METH_FASTCALL
36708 #if CYTHON_ASSUME_SAFE_MACROS
36709 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
36710 #else
36711 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
36712 #endif
36713 #endif
36714 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
36715 if (unlikely(__pyx_nargs > 0)) {
36716 __Pyx_RaiseArgtupleInvalid("clear_header", 1, 0, 0, __pyx_nargs); return NULL;}
36717 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear_header", 0))) return NULL;
36718 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_10clear_header(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
36719
36720 /* function exit code */
36721 __Pyx_RefNannyFinishContext();
36722 return __pyx_r;
36723 }
36724
36725 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_10clear_header(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
36726 bcf_hdr_t *__pyx_v_hdr;
36727 PyObject *__pyx_r = NULL;
36728 __Pyx_TraceDeclarations
36729 __Pyx_RefNannyDeclarations
36730 bcf_hdr_t *__pyx_t_1;
36731 int __pyx_lineno = 0;
36732 const char *__pyx_filename = NULL;
36733 int __pyx_clineno = 0;
36734 __Pyx_TraceFrameInit(__pyx_codeobj__79)
36735 __Pyx_RefNannySetupContext("clear_header", 1);
36736 __Pyx_TraceCall("clear_header", __pyx_f[0], 1818, 0, __PYX_ERR(0, 1818, __pyx_L1_error));
36737
36738 /* "pysam/libcbcf.pyx":1819
36739 *
36740 * def clear_header(self):
36741 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
36742 * bcf_hdr_remove(hdr, BCF_HL_CTG, NULL)
36743 * #bcf_hdr_sync(hdr)
36744 */
36745 __pyx_t_1 = __pyx_v_self->header->ptr;
36746 __pyx_v_hdr = __pyx_t_1;
36747
36748 /* "pysam/libcbcf.pyx":1820
36749 * def clear_header(self):
36750 * cdef bcf_hdr_t *hdr = self.header.ptr
36751 * bcf_hdr_remove(hdr, BCF_HL_CTG, NULL) # <<<<<<<<<<<<<<
36752 * #bcf_hdr_sync(hdr)
36753 *
36754 */
36755 bcf_hdr_remove(__pyx_v_hdr, BCF_HL_CTG, NULL);
36756
36757 /* "pysam/libcbcf.pyx":1818
36758 * bcf_hdr_remove(hdr, BCF_HL_CTG, ckey)
36759 *
36760 * def clear_header(self): # <<<<<<<<<<<<<<
36761 * cdef bcf_hdr_t *hdr = self.header.ptr
36762 * bcf_hdr_remove(hdr, BCF_HL_CTG, NULL)
36763 */
36764
36765 /* function exit code */
36766 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
36767 goto __pyx_L0;
36768 __pyx_L1_error:;
36769 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.clear_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
36770 __pyx_r = NULL;
36771 __pyx_L0:;
36772 __Pyx_XGIVEREF(__pyx_r);
36773 __Pyx_TraceReturn(__pyx_r, 0);
36774 __Pyx_RefNannyFinishContext();
36775 return __pyx_r;
36776 }
36777 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_14generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
36778
36779 /* "pysam/libcbcf.pyx":1823
36780 * #bcf_hdr_sync(hdr)
36781 *
36782 * def __iter__(self): # <<<<<<<<<<<<<<
36783 * cdef bcf_hdr_t *hdr = self.header.ptr
36784 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36785 */
36786
36787 /* Python wrapper */
36788 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_13__iter__(PyObject *__pyx_v_self); /*proto*/
36789 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_13__iter__(PyObject *__pyx_v_self) {
36790 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
36791 PyObject *__pyx_r = 0;
36792 __Pyx_RefNannyDeclarations
36793 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
36794 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
36795 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_12__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
36796
36797 /* function exit code */
36798 __Pyx_RefNannyFinishContext();
36799 return __pyx_r;
36800 }
36801
36802 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_12__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
36803 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *__pyx_cur_scope;
36804 PyObject *__pyx_r = NULL;
36805 __Pyx_RefNannyDeclarations
36806 int __pyx_lineno = 0;
36807 const char *__pyx_filename = NULL;
36808 int __pyx_clineno = 0;
36809 __Pyx_RefNannySetupContext("__iter__", 0);
36810 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_14___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__, __pyx_empty_tuple, NULL);
36811 if (unlikely(!__pyx_cur_scope)) {
36812 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *)Py_None);
36813 __Pyx_INCREF(Py_None);
36814 __PYX_ERR(0, 1823, __pyx_L1_error)
36815 } else {
36816 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
36817 }
36818 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
36819 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
36820 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
36821 {
36822 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_14generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantHeaderContigs___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1823, __pyx_L1_error)
36823 __Pyx_DECREF(__pyx_cur_scope);
36824 __Pyx_RefNannyFinishContext();
36825 return (PyObject *) gen;
36826 }
36827
36828 /* function exit code */
36829 __pyx_L1_error:;
36830 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36831 __pyx_r = NULL;
36832 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
36833 __Pyx_XGIVEREF(__pyx_r);
36834 __Pyx_RefNannyFinishContext();
36835 return __pyx_r;
36836 }
36837
36838 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_14generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
36839 {
36840 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *)__pyx_generator->closure);
36841 PyObject *__pyx_r = NULL;
36842 __Pyx_TraceDeclarations
36843 bcf_hdr_t *__pyx_t_1;
36844 int __pyx_t_2;
36845 uint32_t __pyx_t_3;
36846 uint32_t __pyx_t_4;
36847 uint32_t __pyx_t_5;
36848 PyObject *__pyx_t_6 = NULL;
36849 int __pyx_lineno = 0;
36850 const char *__pyx_filename = NULL;
36851 int __pyx_clineno = 0;
36852 __Pyx_RefNannyDeclarations
36853 __Pyx_RefNannySetupContext("__iter__", 0);
36854 __Pyx_TraceCall("__iter__", __pyx_f[0], 1823, 0, __PYX_ERR(0, 1823, __pyx_L1_error));
36855 switch (__pyx_generator->resume_label) {
36856 case 0: goto __pyx_L3_first_run;
36857 case 1: goto __pyx_L6_resume_from_yield;
36858 default: /* CPython raises the right error here */
36859 __Pyx_TraceReturn(Py_None, 0);
36860 __Pyx_RefNannyFinishContext();
36861 return NULL;
36862 }
36863 __pyx_L3_first_run:;
36864 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1823, __pyx_L1_error)
36865
36866 /* "pysam/libcbcf.pyx":1824
36867 *
36868 * def __iter__(self):
36869 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
36870 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36871 * cdef uint32_t n = kh_size(d)
36872 */
36873 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->header->ptr;
36874 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
36875
36876 /* "pysam/libcbcf.pyx":1825
36877 * def __iter__(self):
36878 * cdef bcf_hdr_t *hdr = self.header.ptr
36879 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG] # <<<<<<<<<<<<<<
36880 * cdef uint32_t n = kh_size(d)
36881 *
36882 */
36883 __pyx_cur_scope->__pyx_v_d = ((vdict_t *)(__pyx_cur_scope->__pyx_v_hdr->dict[BCF_DT_CTG]));
36884
36885 /* "pysam/libcbcf.pyx":1826
36886 * cdef bcf_hdr_t *hdr = self.header.ptr
36887 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36888 * cdef uint32_t n = kh_size(d) # <<<<<<<<<<<<<<
36889 *
36890 * assert n == hdr.n[BCF_DT_CTG]
36891 */
36892 __pyx_cur_scope->__pyx_v_n = kh_size(__pyx_cur_scope->__pyx_v_d);
36893
36894 /* "pysam/libcbcf.pyx":1828
36895 * cdef uint32_t n = kh_size(d)
36896 *
36897 * assert n == hdr.n[BCF_DT_CTG] # <<<<<<<<<<<<<<
36898 *
36899 * for i in range(n):
36900 */
36901 #ifndef CYTHON_WITHOUT_ASSERTIONS
36902 if (unlikely(__pyx_assertions_enabled())) {
36903 __pyx_t_2 = (__pyx_cur_scope->__pyx_v_n == (__pyx_cur_scope->__pyx_v_hdr->n[BCF_DT_CTG]));
36904 if (unlikely(!__pyx_t_2)) {
36905 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
36906 __PYX_ERR(0, 1828, __pyx_L1_error)
36907 }
36908 }
36909 #else
36910 if ((1)); else __PYX_ERR(0, 1828, __pyx_L1_error)
36911 #endif
36912
36913 /* "pysam/libcbcf.pyx":1830
36914 * assert n == hdr.n[BCF_DT_CTG]
36915 *
36916 * for i in range(n): # <<<<<<<<<<<<<<
36917 * yield bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, i))
36918 *
36919 */
36920 __pyx_t_3 = __pyx_cur_scope->__pyx_v_n;
36921 __pyx_t_4 = __pyx_t_3;
36922 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
36923 __pyx_cur_scope->__pyx_v_i = __pyx_t_5;
36924
36925 /* "pysam/libcbcf.pyx":1831
36926 *
36927 * for i in range(n):
36928 * yield bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, i)) # <<<<<<<<<<<<<<
36929 *
36930 * def get(self, key, default=None):
36931 */
36932 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(bcf_hdr_id2name(__pyx_cur_scope->__pyx_v_hdr, __pyx_cur_scope->__pyx_v_i)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1831, __pyx_L1_error)
36933 __Pyx_GOTREF(__pyx_t_6);
36934 __pyx_r = __pyx_t_6;
36935 __pyx_t_6 = 0;
36936 __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
36937 __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
36938 __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
36939 __Pyx_XGIVEREF(__pyx_r);
36940 __Pyx_TraceReturn(__pyx_r, 0);
36941 __Pyx_RefNannyFinishContext();
36942 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
36943 /* return from generator, yielding value */
36944 __pyx_generator->resume_label = 1;
36945 return __pyx_r;
36946 __pyx_L6_resume_from_yield:;
36947 __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
36948 __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
36949 __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
36950 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1831, __pyx_L1_error)
36951 }
36952 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
36953
36954 /* "pysam/libcbcf.pyx":1823
36955 * #bcf_hdr_sync(hdr)
36956 *
36957 * def __iter__(self): # <<<<<<<<<<<<<<
36958 * cdef bcf_hdr_t *hdr = self.header.ptr
36959 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_CTG]
36960 */
36961
36962 /* function exit code */
36963 PyErr_SetNone(PyExc_StopIteration);
36964 goto __pyx_L0;
36965 __pyx_L1_error:;
36966 __Pyx_Generator_Replace_StopIteration(0);
36967 __Pyx_XDECREF(__pyx_t_6);
36968 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36969 __pyx_L0:;
36970 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
36971 #if !CYTHON_USE_EXC_INFO_STACK
36972 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
36973 #endif
36974 __pyx_generator->resume_label = -1;
36975 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
36976 __Pyx_TraceReturn(__pyx_r, 0);
36977 __Pyx_RefNannyFinishContext();
36978 return __pyx_r;
36979 }
36980
36981 /* "pysam/libcbcf.pyx":1833
36982 * yield bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, i))
36983 *
36984 * def get(self, key, default=None): # <<<<<<<<<<<<<<
36985 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
36986 * try:
36987 */
36988
36989 /* Python wrapper */
36990 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_16get(PyObject *__pyx_v_self,
36991 #if CYTHON_METH_FASTCALL
36992 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
36993 #else
36994 PyObject *__pyx_args, PyObject *__pyx_kwds
36995 #endif
36996 ); /*proto*/
36997 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_15get, "VariantHeaderContigs.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
36998 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_16get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_16get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_15get};
36999 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_16get(PyObject *__pyx_v_self,
37000 #if CYTHON_METH_FASTCALL
37001 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
37002 #else
37003 PyObject *__pyx_args, PyObject *__pyx_kwds
37004 #endif
37005 ) {
37006 PyObject *__pyx_v_key = 0;
37007 PyObject *__pyx_v_default = 0;
37008 #if !CYTHON_METH_FASTCALL
37009 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
37010 #endif
37011 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
37012 PyObject* values[2] = {0,0};
37013 int __pyx_lineno = 0;
37014 const char *__pyx_filename = NULL;
37015 int __pyx_clineno = 0;
37016 PyObject *__pyx_r = 0;
37017 __Pyx_RefNannyDeclarations
37018 __Pyx_RefNannySetupContext("get (wrapper)", 0);
37019 #if !CYTHON_METH_FASTCALL
37020 #if CYTHON_ASSUME_SAFE_MACROS
37021 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
37022 #else
37023 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
37024 #endif
37025 #endif
37026 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
37027 {
37028 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
37029 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
37030 if (__pyx_kwds) {
37031 Py_ssize_t kw_args;
37032 switch (__pyx_nargs) {
37033 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
37034 CYTHON_FALLTHROUGH;
37035 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
37036 CYTHON_FALLTHROUGH;
37037 case 0: break;
37038 default: goto __pyx_L5_argtuple_error;
37039 }
37040 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
37041 switch (__pyx_nargs) {
37042 case 0:
37043 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
37044 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
37045 kw_args--;
37046 }
37047 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1833, __pyx_L3_error)
37048 else goto __pyx_L5_argtuple_error;
37049 CYTHON_FALLTHROUGH;
37050 case 1:
37051 if (kw_args > 0) {
37052 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
37053 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
37054 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1833, __pyx_L3_error)
37055 }
37056 }
37057 if (unlikely(kw_args > 0)) {
37058 const Py_ssize_t kwd_pos_args = __pyx_nargs;
37059 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 1833, __pyx_L3_error)
37060 }
37061 } else {
37062 switch (__pyx_nargs) {
37063 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
37064 CYTHON_FALLTHROUGH;
37065 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
37066 break;
37067 default: goto __pyx_L5_argtuple_error;
37068 }
37069 }
37070 __pyx_v_key = values[0];
37071 __pyx_v_default = values[1];
37072 }
37073 goto __pyx_L6_skip;
37074 __pyx_L5_argtuple_error:;
37075 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1833, __pyx_L3_error)
37076 __pyx_L6_skip:;
37077 goto __pyx_L4_argument_unpacking_done;
37078 __pyx_L3_error:;
37079 {
37080 Py_ssize_t __pyx_temp;
37081 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
37082 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
37083 }
37084 }
37085 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
37086 __Pyx_RefNannyFinishContext();
37087 return NULL;
37088 __pyx_L4_argument_unpacking_done:;
37089 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_15get(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
37090
37091 /* function exit code */
37092 {
37093 Py_ssize_t __pyx_temp;
37094 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
37095 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
37096 }
37097 }
37098 __Pyx_RefNannyFinishContext();
37099 return __pyx_r;
37100 }
37101
37102 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_15get(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
37103 PyObject *__pyx_r = NULL;
37104 __Pyx_TraceDeclarations
37105 __Pyx_RefNannyDeclarations
37106 PyObject *__pyx_t_1 = NULL;
37107 PyObject *__pyx_t_2 = NULL;
37108 PyObject *__pyx_t_3 = NULL;
37109 PyObject *__pyx_t_4 = NULL;
37110 int __pyx_t_5;
37111 PyObject *__pyx_t_6 = NULL;
37112 PyObject *__pyx_t_7 = NULL;
37113 int __pyx_lineno = 0;
37114 const char *__pyx_filename = NULL;
37115 int __pyx_clineno = 0;
37116 __Pyx_TraceFrameInit(__pyx_codeobj__80)
37117 __Pyx_RefNannySetupContext("get", 1);
37118 __Pyx_TraceCall("get", __pyx_f[0], 1833, 0, __PYX_ERR(0, 1833, __pyx_L1_error));
37119
37120 /* "pysam/libcbcf.pyx":1835
37121 * def get(self, key, default=None):
37122 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
37123 * try: # <<<<<<<<<<<<<<
37124 * return self[key]
37125 * except KeyError:
37126 */
37127 {
37128 __Pyx_PyThreadState_declare
37129 __Pyx_PyThreadState_assign
37130 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
37131 __Pyx_XGOTREF(__pyx_t_1);
37132 __Pyx_XGOTREF(__pyx_t_2);
37133 __Pyx_XGOTREF(__pyx_t_3);
37134 /*try:*/ {
37135
37136 /* "pysam/libcbcf.pyx":1836
37137 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
37138 * try:
37139 * return self[key] # <<<<<<<<<<<<<<
37140 * except KeyError:
37141 * return default
37142 */
37143 __Pyx_XDECREF(__pyx_r);
37144 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L3_error)
37145 __Pyx_GOTREF(__pyx_t_4);
37146 __pyx_r = __pyx_t_4;
37147 __pyx_t_4 = 0;
37148 goto __pyx_L7_try_return;
37149
37150 /* "pysam/libcbcf.pyx":1835
37151 * def get(self, key, default=None):
37152 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
37153 * try: # <<<<<<<<<<<<<<
37154 * return self[key]
37155 * except KeyError:
37156 */
37157 }
37158 __pyx_L3_error:;
37159 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
37160
37161 /* "pysam/libcbcf.pyx":1837
37162 * try:
37163 * return self[key]
37164 * except KeyError: # <<<<<<<<<<<<<<
37165 * return default
37166 *
37167 */
37168 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
37169 if (__pyx_t_5) {
37170 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
37171 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1837, __pyx_L5_except_error)
37172 __Pyx_XGOTREF(__pyx_t_4);
37173 __Pyx_XGOTREF(__pyx_t_6);
37174 __Pyx_XGOTREF(__pyx_t_7);
37175
37176 /* "pysam/libcbcf.pyx":1838
37177 * return self[key]
37178 * except KeyError:
37179 * return default # <<<<<<<<<<<<<<
37180 *
37181 * def __contains__(self, key):
37182 */
37183 __Pyx_XDECREF(__pyx_r);
37184 __Pyx_INCREF(__pyx_v_default);
37185 __pyx_r = __pyx_v_default;
37186 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37187 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
37188 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
37189 goto __pyx_L6_except_return;
37190 }
37191 goto __pyx_L5_except_error;
37192
37193 /* "pysam/libcbcf.pyx":1835
37194 * def get(self, key, default=None):
37195 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
37196 * try: # <<<<<<<<<<<<<<
37197 * return self[key]
37198 * except KeyError:
37199 */
37200 __pyx_L5_except_error:;
37201 __Pyx_XGIVEREF(__pyx_t_1);
37202 __Pyx_XGIVEREF(__pyx_t_2);
37203 __Pyx_XGIVEREF(__pyx_t_3);
37204 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
37205 goto __pyx_L1_error;
37206 __pyx_L7_try_return:;
37207 __Pyx_XGIVEREF(__pyx_t_1);
37208 __Pyx_XGIVEREF(__pyx_t_2);
37209 __Pyx_XGIVEREF(__pyx_t_3);
37210 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
37211 goto __pyx_L0;
37212 __pyx_L6_except_return:;
37213 __Pyx_XGIVEREF(__pyx_t_1);
37214 __Pyx_XGIVEREF(__pyx_t_2);
37215 __Pyx_XGIVEREF(__pyx_t_3);
37216 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
37217 goto __pyx_L0;
37218 }
37219
37220 /* "pysam/libcbcf.pyx":1833
37221 * yield bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, i))
37222 *
37223 * def get(self, key, default=None): # <<<<<<<<<<<<<<
37224 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
37225 * try:
37226 */
37227
37228 /* function exit code */
37229 __pyx_L1_error:;
37230 __Pyx_XDECREF(__pyx_t_4);
37231 __Pyx_XDECREF(__pyx_t_6);
37232 __Pyx_XDECREF(__pyx_t_7);
37233 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
37234 __pyx_r = NULL;
37235 __pyx_L0:;
37236 __Pyx_XGIVEREF(__pyx_r);
37237 __Pyx_TraceReturn(__pyx_r, 0);
37238 __Pyx_RefNannyFinishContext();
37239 return __pyx_r;
37240 }
37241
37242 /* "pysam/libcbcf.pyx":1840
37243 * return default
37244 *
37245 * def __contains__(self, key): # <<<<<<<<<<<<<<
37246 * try:
37247 * self[key]
37248 */
37249
37250 /* Python wrapper */
37251 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_18__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
37252 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_18__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
37253 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
37254 int __pyx_r;
37255 __Pyx_RefNannyDeclarations
37256 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
37257 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
37258 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_17__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self), ((PyObject *)__pyx_v_key));
37259
37260 /* function exit code */
37261 __Pyx_RefNannyFinishContext();
37262 return __pyx_r;
37263 }
37264
37265 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_17__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_key) {
37266 int __pyx_r;
37267 __Pyx_TraceDeclarations
37268 __Pyx_RefNannyDeclarations
37269 PyObject *__pyx_t_1 = NULL;
37270 PyObject *__pyx_t_2 = NULL;
37271 PyObject *__pyx_t_3 = NULL;
37272 PyObject *__pyx_t_4 = NULL;
37273 int __pyx_t_5;
37274 PyObject *__pyx_t_6 = NULL;
37275 PyObject *__pyx_t_7 = NULL;
37276 int __pyx_lineno = 0;
37277 const char *__pyx_filename = NULL;
37278 int __pyx_clineno = 0;
37279 __Pyx_RefNannySetupContext("__contains__", 1);
37280 __Pyx_TraceCall("__contains__", __pyx_f[0], 1840, 0, __PYX_ERR(0, 1840, __pyx_L1_error));
37281
37282 /* "pysam/libcbcf.pyx":1841
37283 *
37284 * def __contains__(self, key):
37285 * try: # <<<<<<<<<<<<<<
37286 * self[key]
37287 * except KeyError:
37288 */
37289 {
37290 __Pyx_PyThreadState_declare
37291 __Pyx_PyThreadState_assign
37292 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
37293 __Pyx_XGOTREF(__pyx_t_1);
37294 __Pyx_XGOTREF(__pyx_t_2);
37295 __Pyx_XGOTREF(__pyx_t_3);
37296 /*try:*/ {
37297
37298 /* "pysam/libcbcf.pyx":1842
37299 * def __contains__(self, key):
37300 * try:
37301 * self[key] # <<<<<<<<<<<<<<
37302 * except KeyError:
37303 * return False
37304 */
37305 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L3_error)
37306 __Pyx_GOTREF(__pyx_t_4);
37307 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37308
37309 /* "pysam/libcbcf.pyx":1841
37310 *
37311 * def __contains__(self, key):
37312 * try: # <<<<<<<<<<<<<<
37313 * self[key]
37314 * except KeyError:
37315 */
37316 }
37317
37318 /* "pysam/libcbcf.pyx":1846
37319 * return False
37320 * else:
37321 * return True # <<<<<<<<<<<<<<
37322 *
37323 * def iterkeys(self):
37324 */
37325 /*else:*/ {
37326 __pyx_r = 1;
37327 goto __pyx_L6_except_return;
37328 }
37329 __pyx_L3_error:;
37330 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
37331
37332 /* "pysam/libcbcf.pyx":1843
37333 * try:
37334 * self[key]
37335 * except KeyError: # <<<<<<<<<<<<<<
37336 * return False
37337 * else:
37338 */
37339 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
37340 if (__pyx_t_5) {
37341 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37342 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1843, __pyx_L5_except_error)
37343 __Pyx_XGOTREF(__pyx_t_4);
37344 __Pyx_XGOTREF(__pyx_t_6);
37345 __Pyx_XGOTREF(__pyx_t_7);
37346
37347 /* "pysam/libcbcf.pyx":1844
37348 * self[key]
37349 * except KeyError:
37350 * return False # <<<<<<<<<<<<<<
37351 * else:
37352 * return True
37353 */
37354 __pyx_r = 0;
37355 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37356 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
37357 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
37358 goto __pyx_L6_except_return;
37359 }
37360 goto __pyx_L5_except_error;
37361
37362 /* "pysam/libcbcf.pyx":1841
37363 *
37364 * def __contains__(self, key):
37365 * try: # <<<<<<<<<<<<<<
37366 * self[key]
37367 * except KeyError:
37368 */
37369 __pyx_L5_except_error:;
37370 __Pyx_XGIVEREF(__pyx_t_1);
37371 __Pyx_XGIVEREF(__pyx_t_2);
37372 __Pyx_XGIVEREF(__pyx_t_3);
37373 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
37374 goto __pyx_L1_error;
37375 __pyx_L6_except_return:;
37376 __Pyx_XGIVEREF(__pyx_t_1);
37377 __Pyx_XGIVEREF(__pyx_t_2);
37378 __Pyx_XGIVEREF(__pyx_t_3);
37379 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
37380 goto __pyx_L0;
37381 }
37382
37383 /* "pysam/libcbcf.pyx":1840
37384 * return default
37385 *
37386 * def __contains__(self, key): # <<<<<<<<<<<<<<
37387 * try:
37388 * self[key]
37389 */
37390
37391 /* function exit code */
37392 __pyx_L1_error:;
37393 __Pyx_XDECREF(__pyx_t_4);
37394 __Pyx_XDECREF(__pyx_t_6);
37395 __Pyx_XDECREF(__pyx_t_7);
37396 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37397 __pyx_r = -1;
37398 __pyx_L0:;
37399 __Pyx_TraceReturn(Py_None, 0);
37400 __Pyx_RefNannyFinishContext();
37401 return __pyx_r;
37402 }
37403
37404 /* "pysam/libcbcf.pyx":1848
37405 * return True
37406 *
37407 * def iterkeys(self): # <<<<<<<<<<<<<<
37408 * """D.iterkeys() -> an iterator over the keys of D"""
37409 * return iter(self)
37410 */
37411
37412 /* Python wrapper */
37413 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_20iterkeys(PyObject *__pyx_v_self,
37414 #if CYTHON_METH_FASTCALL
37415 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
37416 #else
37417 PyObject *__pyx_args, PyObject *__pyx_kwds
37418 #endif
37419 ); /*proto*/
37420 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_19iterkeys, "VariantHeaderContigs.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
37421 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_20iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_20iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_19iterkeys};
37422 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_20iterkeys(PyObject *__pyx_v_self,
37423 #if CYTHON_METH_FASTCALL
37424 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
37425 #else
37426 PyObject *__pyx_args, PyObject *__pyx_kwds
37427 #endif
37428 ) {
37429 #if !CYTHON_METH_FASTCALL
37430 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
37431 #endif
37432 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
37433 PyObject *__pyx_r = 0;
37434 __Pyx_RefNannyDeclarations
37435 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
37436 #if !CYTHON_METH_FASTCALL
37437 #if CYTHON_ASSUME_SAFE_MACROS
37438 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
37439 #else
37440 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
37441 #endif
37442 #endif
37443 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
37444 if (unlikely(__pyx_nargs > 0)) {
37445 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
37446 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
37447 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_19iterkeys(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
37448
37449 /* function exit code */
37450 __Pyx_RefNannyFinishContext();
37451 return __pyx_r;
37452 }
37453
37454 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_19iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
37455 PyObject *__pyx_r = NULL;
37456 __Pyx_TraceDeclarations
37457 __Pyx_RefNannyDeclarations
37458 PyObject *__pyx_t_1 = NULL;
37459 int __pyx_lineno = 0;
37460 const char *__pyx_filename = NULL;
37461 int __pyx_clineno = 0;
37462 __Pyx_TraceFrameInit(__pyx_codeobj__81)
37463 __Pyx_RefNannySetupContext("iterkeys", 1);
37464 __Pyx_TraceCall("iterkeys", __pyx_f[0], 1848, 0, __PYX_ERR(0, 1848, __pyx_L1_error));
37465
37466 /* "pysam/libcbcf.pyx":1850
37467 * def iterkeys(self):
37468 * """D.iterkeys() -> an iterator over the keys of D"""
37469 * return iter(self) # <<<<<<<<<<<<<<
37470 *
37471 * def itervalues(self):
37472 */
37473 __Pyx_XDECREF(__pyx_r);
37474 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
37475 __Pyx_GOTREF(__pyx_t_1);
37476 __pyx_r = __pyx_t_1;
37477 __pyx_t_1 = 0;
37478 goto __pyx_L0;
37479
37480 /* "pysam/libcbcf.pyx":1848
37481 * return True
37482 *
37483 * def iterkeys(self): # <<<<<<<<<<<<<<
37484 * """D.iterkeys() -> an iterator over the keys of D"""
37485 * return iter(self)
37486 */
37487
37488 /* function exit code */
37489 __pyx_L1_error:;
37490 __Pyx_XDECREF(__pyx_t_1);
37491 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
37492 __pyx_r = NULL;
37493 __pyx_L0:;
37494 __Pyx_XGIVEREF(__pyx_r);
37495 __Pyx_TraceReturn(__pyx_r, 0);
37496 __Pyx_RefNannyFinishContext();
37497 return __pyx_r;
37498 }
37499 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_23generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
37500
37501 /* "pysam/libcbcf.pyx":1852
37502 * return iter(self)
37503 *
37504 * def itervalues(self): # <<<<<<<<<<<<<<
37505 * """D.itervalues() -> an iterator over the values of D"""
37506 * for key in self:
37507 */
37508
37509 /* Python wrapper */
37510 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_22itervalues(PyObject *__pyx_v_self,
37511 #if CYTHON_METH_FASTCALL
37512 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
37513 #else
37514 PyObject *__pyx_args, PyObject *__pyx_kwds
37515 #endif
37516 ); /*proto*/
37517 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_21itervalues, "VariantHeaderContigs.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
37518 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_22itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_22itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_21itervalues};
37519 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_22itervalues(PyObject *__pyx_v_self,
37520 #if CYTHON_METH_FASTCALL
37521 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
37522 #else
37523 PyObject *__pyx_args, PyObject *__pyx_kwds
37524 #endif
37525 ) {
37526 #if !CYTHON_METH_FASTCALL
37527 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
37528 #endif
37529 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
37530 PyObject *__pyx_r = 0;
37531 __Pyx_RefNannyDeclarations
37532 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
37533 #if !CYTHON_METH_FASTCALL
37534 #if CYTHON_ASSUME_SAFE_MACROS
37535 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
37536 #else
37537 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
37538 #endif
37539 #endif
37540 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
37541 if (unlikely(__pyx_nargs > 0)) {
37542 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
37543 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
37544 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_21itervalues(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
37545
37546 /* function exit code */
37547 __Pyx_RefNannyFinishContext();
37548 return __pyx_r;
37549 }
37550
37551 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_21itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
37552 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *__pyx_cur_scope;
37553 PyObject *__pyx_r = NULL;
37554 __Pyx_RefNannyDeclarations
37555 int __pyx_lineno = 0;
37556 const char *__pyx_filename = NULL;
37557 int __pyx_clineno = 0;
37558 __Pyx_RefNannySetupContext("itervalues", 0);
37559 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_15_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues, __pyx_empty_tuple, NULL);
37560 if (unlikely(!__pyx_cur_scope)) {
37561 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *)Py_None);
37562 __Pyx_INCREF(Py_None);
37563 __PYX_ERR(0, 1852, __pyx_L1_error)
37564 } else {
37565 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
37566 }
37567 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
37568 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
37569 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
37570 {
37571 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_23generator8, __pyx_codeobj__82, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_VariantHeaderContigs_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1852, __pyx_L1_error)
37572 __Pyx_DECREF(__pyx_cur_scope);
37573 __Pyx_RefNannyFinishContext();
37574 return (PyObject *) gen;
37575 }
37576
37577 /* function exit code */
37578 __pyx_L1_error:;
37579 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
37580 __pyx_r = NULL;
37581 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
37582 __Pyx_XGIVEREF(__pyx_r);
37583 __Pyx_RefNannyFinishContext();
37584 return __pyx_r;
37585 }
37586
37587 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_23generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
37588 {
37589 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *)__pyx_generator->closure);
37590 PyObject *__pyx_r = NULL;
37591 __Pyx_TraceDeclarations
37592 PyObject *__pyx_t_1 = NULL;
37593 Py_ssize_t __pyx_t_2;
37594 PyObject *(*__pyx_t_3)(PyObject *);
37595 PyObject *__pyx_t_4 = NULL;
37596 int __pyx_lineno = 0;
37597 const char *__pyx_filename = NULL;
37598 int __pyx_clineno = 0;
37599 __Pyx_RefNannyDeclarations
37600 __Pyx_RefNannySetupContext("itervalues", 0);
37601 __Pyx_TraceFrameInit(__pyx_codeobj__82)
37602 __Pyx_TraceCall("itervalues", __pyx_f[0], 1852, 0, __PYX_ERR(0, 1852, __pyx_L1_error));
37603 switch (__pyx_generator->resume_label) {
37604 case 0: goto __pyx_L3_first_run;
37605 case 1: goto __pyx_L6_resume_from_yield;
37606 default: /* CPython raises the right error here */
37607 __Pyx_TraceReturn(Py_None, 0);
37608 __Pyx_RefNannyFinishContext();
37609 return NULL;
37610 }
37611 __pyx_L3_first_run:;
37612 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1852, __pyx_L1_error)
37613
37614 /* "pysam/libcbcf.pyx":1854
37615 * def itervalues(self):
37616 * """D.itervalues() -> an iterator over the values of D"""
37617 * for key in self: # <<<<<<<<<<<<<<
37618 * yield self[key]
37619 *
37620 */
37621 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
37622 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
37623 __pyx_t_2 = 0;
37624 __pyx_t_3 = NULL;
37625 } else {
37626 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1854, __pyx_L1_error)
37627 __Pyx_GOTREF(__pyx_t_1);
37628 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1854, __pyx_L1_error)
37629 }
37630 for (;;) {
37631 if (likely(!__pyx_t_3)) {
37632 if (likely(PyList_CheckExact(__pyx_t_1))) {
37633 {
37634 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
37635 #if !CYTHON_ASSUME_SAFE_MACROS
37636 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1854, __pyx_L1_error)
37637 #endif
37638 if (__pyx_t_2 >= __pyx_temp) break;
37639 }
37640 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37641 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1854, __pyx_L1_error)
37642 #else
37643 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1854, __pyx_L1_error)
37644 __Pyx_GOTREF(__pyx_t_4);
37645 #endif
37646 } else {
37647 {
37648 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
37649 #if !CYTHON_ASSUME_SAFE_MACROS
37650 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1854, __pyx_L1_error)
37651 #endif
37652 if (__pyx_t_2 >= __pyx_temp) break;
37653 }
37654 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37655 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1854, __pyx_L1_error)
37656 #else
37657 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1854, __pyx_L1_error)
37658 __Pyx_GOTREF(__pyx_t_4);
37659 #endif
37660 }
37661 } else {
37662 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
37663 if (unlikely(!__pyx_t_4)) {
37664 PyObject* exc_type = PyErr_Occurred();
37665 if (exc_type) {
37666 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
37667 else __PYX_ERR(0, 1854, __pyx_L1_error)
37668 }
37669 break;
37670 }
37671 __Pyx_GOTREF(__pyx_t_4);
37672 }
37673 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
37674 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
37675 __Pyx_GIVEREF(__pyx_t_4);
37676 __pyx_t_4 = 0;
37677
37678 /* "pysam/libcbcf.pyx":1855
37679 * """D.itervalues() -> an iterator over the values of D"""
37680 * for key in self:
37681 * yield self[key] # <<<<<<<<<<<<<<
37682 *
37683 * def iteritems(self):
37684 */
37685 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1855, __pyx_L1_error)
37686 __Pyx_GOTREF(__pyx_t_4);
37687 __pyx_r = __pyx_t_4;
37688 __pyx_t_4 = 0;
37689 __Pyx_XGIVEREF(__pyx_t_1);
37690 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
37691 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
37692 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
37693 __Pyx_XGIVEREF(__pyx_r);
37694 __Pyx_TraceReturn(__pyx_r, 0);
37695 __Pyx_RefNannyFinishContext();
37696 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
37697 /* return from generator, yielding value */
37698 __pyx_generator->resume_label = 1;
37699 return __pyx_r;
37700 __pyx_L6_resume_from_yield:;
37701 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
37702 __pyx_cur_scope->__pyx_t_0 = 0;
37703 __Pyx_XGOTREF(__pyx_t_1);
37704 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
37705 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
37706 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1855, __pyx_L1_error)
37707
37708 /* "pysam/libcbcf.pyx":1854
37709 * def itervalues(self):
37710 * """D.itervalues() -> an iterator over the values of D"""
37711 * for key in self: # <<<<<<<<<<<<<<
37712 * yield self[key]
37713 *
37714 */
37715 }
37716 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37717 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
37718
37719 /* "pysam/libcbcf.pyx":1852
37720 * return iter(self)
37721 *
37722 * def itervalues(self): # <<<<<<<<<<<<<<
37723 * """D.itervalues() -> an iterator over the values of D"""
37724 * for key in self:
37725 */
37726
37727 /* function exit code */
37728 PyErr_SetNone(PyExc_StopIteration);
37729 goto __pyx_L0;
37730 __pyx_L1_error:;
37731 __Pyx_Generator_Replace_StopIteration(0);
37732 __Pyx_XDECREF(__pyx_t_1);
37733 __Pyx_XDECREF(__pyx_t_4);
37734 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
37735 __pyx_L0:;
37736 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
37737 #if !CYTHON_USE_EXC_INFO_STACK
37738 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
37739 #endif
37740 __pyx_generator->resume_label = -1;
37741 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
37742 __Pyx_TraceReturn(__pyx_r, 0);
37743 __Pyx_RefNannyFinishContext();
37744 return __pyx_r;
37745 }
37746 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_26generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
37747
37748 /* "pysam/libcbcf.pyx":1857
37749 * yield self[key]
37750 *
37751 * def iteritems(self): # <<<<<<<<<<<<<<
37752 * """D.iteritems() -> an iterator over the (key, value) items of D"""
37753 * for key in self:
37754 */
37755
37756 /* Python wrapper */
37757 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_25iteritems(PyObject *__pyx_v_self,
37758 #if CYTHON_METH_FASTCALL
37759 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
37760 #else
37761 PyObject *__pyx_args, PyObject *__pyx_kwds
37762 #endif
37763 ); /*proto*/
37764 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_24iteritems, "VariantHeaderContigs.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
37765 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_25iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_25iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_24iteritems};
37766 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_25iteritems(PyObject *__pyx_v_self,
37767 #if CYTHON_METH_FASTCALL
37768 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
37769 #else
37770 PyObject *__pyx_args, PyObject *__pyx_kwds
37771 #endif
37772 ) {
37773 #if !CYTHON_METH_FASTCALL
37774 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
37775 #endif
37776 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
37777 PyObject *__pyx_r = 0;
37778 __Pyx_RefNannyDeclarations
37779 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
37780 #if !CYTHON_METH_FASTCALL
37781 #if CYTHON_ASSUME_SAFE_MACROS
37782 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
37783 #else
37784 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
37785 #endif
37786 #endif
37787 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
37788 if (unlikely(__pyx_nargs > 0)) {
37789 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
37790 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
37791 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_24iteritems(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
37792
37793 /* function exit code */
37794 __Pyx_RefNannyFinishContext();
37795 return __pyx_r;
37796 }
37797
37798 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_24iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
37799 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *__pyx_cur_scope;
37800 PyObject *__pyx_r = NULL;
37801 __Pyx_RefNannyDeclarations
37802 int __pyx_lineno = 0;
37803 const char *__pyx_filename = NULL;
37804 int __pyx_clineno = 0;
37805 __Pyx_RefNannySetupContext("iteritems", 0);
37806 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_16_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems, __pyx_empty_tuple, NULL);
37807 if (unlikely(!__pyx_cur_scope)) {
37808 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *)Py_None);
37809 __Pyx_INCREF(Py_None);
37810 __PYX_ERR(0, 1857, __pyx_L1_error)
37811 } else {
37812 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
37813 }
37814 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
37815 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
37816 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
37817 {
37818 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_26generator9, __pyx_codeobj__83, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_VariantHeaderContigs_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1857, __pyx_L1_error)
37819 __Pyx_DECREF(__pyx_cur_scope);
37820 __Pyx_RefNannyFinishContext();
37821 return (PyObject *) gen;
37822 }
37823
37824 /* function exit code */
37825 __pyx_L1_error:;
37826 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
37827 __pyx_r = NULL;
37828 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
37829 __Pyx_XGIVEREF(__pyx_r);
37830 __Pyx_RefNannyFinishContext();
37831 return __pyx_r;
37832 }
37833
37834 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderContigs_26generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
37835 {
37836 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *)__pyx_generator->closure);
37837 PyObject *__pyx_r = NULL;
37838 __Pyx_TraceDeclarations
37839 PyObject *__pyx_t_1 = NULL;
37840 Py_ssize_t __pyx_t_2;
37841 PyObject *(*__pyx_t_3)(PyObject *);
37842 PyObject *__pyx_t_4 = NULL;
37843 PyObject *__pyx_t_5 = NULL;
37844 int __pyx_lineno = 0;
37845 const char *__pyx_filename = NULL;
37846 int __pyx_clineno = 0;
37847 __Pyx_RefNannyDeclarations
37848 __Pyx_RefNannySetupContext("iteritems", 0);
37849 __Pyx_TraceFrameInit(__pyx_codeobj__83)
37850 __Pyx_TraceCall("iteritems", __pyx_f[0], 1857, 0, __PYX_ERR(0, 1857, __pyx_L1_error));
37851 switch (__pyx_generator->resume_label) {
37852 case 0: goto __pyx_L3_first_run;
37853 case 1: goto __pyx_L6_resume_from_yield;
37854 default: /* CPython raises the right error here */
37855 __Pyx_TraceReturn(Py_None, 0);
37856 __Pyx_RefNannyFinishContext();
37857 return NULL;
37858 }
37859 __pyx_L3_first_run:;
37860 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1857, __pyx_L1_error)
37861
37862 /* "pysam/libcbcf.pyx":1859
37863 * def iteritems(self):
37864 * """D.iteritems() -> an iterator over the (key, value) items of D"""
37865 * for key in self: # <<<<<<<<<<<<<<
37866 * yield (key, self[key])
37867 *
37868 */
37869 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
37870 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
37871 __pyx_t_2 = 0;
37872 __pyx_t_3 = NULL;
37873 } else {
37874 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1859, __pyx_L1_error)
37875 __Pyx_GOTREF(__pyx_t_1);
37876 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1859, __pyx_L1_error)
37877 }
37878 for (;;) {
37879 if (likely(!__pyx_t_3)) {
37880 if (likely(PyList_CheckExact(__pyx_t_1))) {
37881 {
37882 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
37883 #if !CYTHON_ASSUME_SAFE_MACROS
37884 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1859, __pyx_L1_error)
37885 #endif
37886 if (__pyx_t_2 >= __pyx_temp) break;
37887 }
37888 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37889 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1859, __pyx_L1_error)
37890 #else
37891 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1859, __pyx_L1_error)
37892 __Pyx_GOTREF(__pyx_t_4);
37893 #endif
37894 } else {
37895 {
37896 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
37897 #if !CYTHON_ASSUME_SAFE_MACROS
37898 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1859, __pyx_L1_error)
37899 #endif
37900 if (__pyx_t_2 >= __pyx_temp) break;
37901 }
37902 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37903 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1859, __pyx_L1_error)
37904 #else
37905 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1859, __pyx_L1_error)
37906 __Pyx_GOTREF(__pyx_t_4);
37907 #endif
37908 }
37909 } else {
37910 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
37911 if (unlikely(!__pyx_t_4)) {
37912 PyObject* exc_type = PyErr_Occurred();
37913 if (exc_type) {
37914 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
37915 else __PYX_ERR(0, 1859, __pyx_L1_error)
37916 }
37917 break;
37918 }
37919 __Pyx_GOTREF(__pyx_t_4);
37920 }
37921 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
37922 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
37923 __Pyx_GIVEREF(__pyx_t_4);
37924 __pyx_t_4 = 0;
37925
37926 /* "pysam/libcbcf.pyx":1860
37927 * """D.iteritems() -> an iterator over the (key, value) items of D"""
37928 * for key in self:
37929 * yield (key, self[key]) # <<<<<<<<<<<<<<
37930 *
37931 * def keys(self):
37932 */
37933 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1860, __pyx_L1_error)
37934 __Pyx_GOTREF(__pyx_t_4);
37935 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1860, __pyx_L1_error)
37936 __Pyx_GOTREF(__pyx_t_5);
37937 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
37938 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
37939 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_key)) __PYX_ERR(0, 1860, __pyx_L1_error);
37940 __Pyx_GIVEREF(__pyx_t_4);
37941 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1860, __pyx_L1_error);
37942 __pyx_t_4 = 0;
37943 __pyx_r = __pyx_t_5;
37944 __pyx_t_5 = 0;
37945 __Pyx_XGIVEREF(__pyx_t_1);
37946 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
37947 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
37948 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
37949 __Pyx_XGIVEREF(__pyx_r);
37950 __Pyx_TraceReturn(__pyx_r, 0);
37951 __Pyx_RefNannyFinishContext();
37952 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
37953 /* return from generator, yielding value */
37954 __pyx_generator->resume_label = 1;
37955 return __pyx_r;
37956 __pyx_L6_resume_from_yield:;
37957 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
37958 __pyx_cur_scope->__pyx_t_0 = 0;
37959 __Pyx_XGOTREF(__pyx_t_1);
37960 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
37961 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
37962 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1860, __pyx_L1_error)
37963
37964 /* "pysam/libcbcf.pyx":1859
37965 * def iteritems(self):
37966 * """D.iteritems() -> an iterator over the (key, value) items of D"""
37967 * for key in self: # <<<<<<<<<<<<<<
37968 * yield (key, self[key])
37969 *
37970 */
37971 }
37972 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37973 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
37974
37975 /* "pysam/libcbcf.pyx":1857
37976 * yield self[key]
37977 *
37978 * def iteritems(self): # <<<<<<<<<<<<<<
37979 * """D.iteritems() -> an iterator over the (key, value) items of D"""
37980 * for key in self:
37981 */
37982
37983 /* function exit code */
37984 PyErr_SetNone(PyExc_StopIteration);
37985 goto __pyx_L0;
37986 __pyx_L1_error:;
37987 __Pyx_Generator_Replace_StopIteration(0);
37988 __Pyx_XDECREF(__pyx_t_1);
37989 __Pyx_XDECREF(__pyx_t_4);
37990 __Pyx_XDECREF(__pyx_t_5);
37991 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
37992 __pyx_L0:;
37993 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
37994 #if !CYTHON_USE_EXC_INFO_STACK
37995 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
37996 #endif
37997 __pyx_generator->resume_label = -1;
37998 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
37999 __Pyx_TraceReturn(__pyx_r, 0);
38000 __Pyx_RefNannyFinishContext();
38001 return __pyx_r;
38002 }
38003
38004 /* "pysam/libcbcf.pyx":1862
38005 * yield (key, self[key])
38006 *
38007 * def keys(self): # <<<<<<<<<<<<<<
38008 * """D.keys() -> list of D's keys"""
38009 * return list(self)
38010 */
38011
38012 /* Python wrapper */
38013 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_28keys(PyObject *__pyx_v_self,
38014 #if CYTHON_METH_FASTCALL
38015 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38016 #else
38017 PyObject *__pyx_args, PyObject *__pyx_kwds
38018 #endif
38019 ); /*proto*/
38020 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_27keys, "VariantHeaderContigs.keys(self)\nD.keys() -> list of D's keys");
38021 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_28keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_28keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_27keys};
38022 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_28keys(PyObject *__pyx_v_self,
38023 #if CYTHON_METH_FASTCALL
38024 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38025 #else
38026 PyObject *__pyx_args, PyObject *__pyx_kwds
38027 #endif
38028 ) {
38029 #if !CYTHON_METH_FASTCALL
38030 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
38031 #endif
38032 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
38033 PyObject *__pyx_r = 0;
38034 __Pyx_RefNannyDeclarations
38035 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
38036 #if !CYTHON_METH_FASTCALL
38037 #if CYTHON_ASSUME_SAFE_MACROS
38038 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
38039 #else
38040 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
38041 #endif
38042 #endif
38043 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
38044 if (unlikely(__pyx_nargs > 0)) {
38045 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
38046 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
38047 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_27keys(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
38048
38049 /* function exit code */
38050 __Pyx_RefNannyFinishContext();
38051 return __pyx_r;
38052 }
38053
38054 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_27keys(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
38055 PyObject *__pyx_r = NULL;
38056 __Pyx_TraceDeclarations
38057 __Pyx_RefNannyDeclarations
38058 PyObject *__pyx_t_1 = NULL;
38059 int __pyx_lineno = 0;
38060 const char *__pyx_filename = NULL;
38061 int __pyx_clineno = 0;
38062 __Pyx_TraceFrameInit(__pyx_codeobj__84)
38063 __Pyx_RefNannySetupContext("keys", 1);
38064 __Pyx_TraceCall("keys", __pyx_f[0], 1862, 0, __PYX_ERR(0, 1862, __pyx_L1_error));
38065
38066 /* "pysam/libcbcf.pyx":1864
38067 * def keys(self):
38068 * """D.keys() -> list of D's keys"""
38069 * return list(self) # <<<<<<<<<<<<<<
38070 *
38071 * def items(self):
38072 */
38073 __Pyx_XDECREF(__pyx_r);
38074 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1864, __pyx_L1_error)
38075 __Pyx_GOTREF(__pyx_t_1);
38076 __pyx_r = __pyx_t_1;
38077 __pyx_t_1 = 0;
38078 goto __pyx_L0;
38079
38080 /* "pysam/libcbcf.pyx":1862
38081 * yield (key, self[key])
38082 *
38083 * def keys(self): # <<<<<<<<<<<<<<
38084 * """D.keys() -> list of D's keys"""
38085 * return list(self)
38086 */
38087
38088 /* function exit code */
38089 __pyx_L1_error:;
38090 __Pyx_XDECREF(__pyx_t_1);
38091 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
38092 __pyx_r = NULL;
38093 __pyx_L0:;
38094 __Pyx_XGIVEREF(__pyx_r);
38095 __Pyx_TraceReturn(__pyx_r, 0);
38096 __Pyx_RefNannyFinishContext();
38097 return __pyx_r;
38098 }
38099
38100 /* "pysam/libcbcf.pyx":1866
38101 * return list(self)
38102 *
38103 * def items(self): # <<<<<<<<<<<<<<
38104 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
38105 * return list(self.iteritems())
38106 */
38107
38108 /* Python wrapper */
38109 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_30items(PyObject *__pyx_v_self,
38110 #if CYTHON_METH_FASTCALL
38111 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38112 #else
38113 PyObject *__pyx_args, PyObject *__pyx_kwds
38114 #endif
38115 ); /*proto*/
38116 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_29items, "VariantHeaderContigs.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
38117 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_30items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_30items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_29items};
38118 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_30items(PyObject *__pyx_v_self,
38119 #if CYTHON_METH_FASTCALL
38120 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38121 #else
38122 PyObject *__pyx_args, PyObject *__pyx_kwds
38123 #endif
38124 ) {
38125 #if !CYTHON_METH_FASTCALL
38126 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
38127 #endif
38128 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
38129 PyObject *__pyx_r = 0;
38130 __Pyx_RefNannyDeclarations
38131 __Pyx_RefNannySetupContext("items (wrapper)", 0);
38132 #if !CYTHON_METH_FASTCALL
38133 #if CYTHON_ASSUME_SAFE_MACROS
38134 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
38135 #else
38136 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
38137 #endif
38138 #endif
38139 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
38140 if (unlikely(__pyx_nargs > 0)) {
38141 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
38142 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
38143 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_29items(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
38144
38145 /* function exit code */
38146 __Pyx_RefNannyFinishContext();
38147 return __pyx_r;
38148 }
38149
38150 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_29items(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
38151 PyObject *__pyx_r = NULL;
38152 __Pyx_TraceDeclarations
38153 __Pyx_RefNannyDeclarations
38154 PyObject *__pyx_t_1 = NULL;
38155 PyObject *__pyx_t_2 = NULL;
38156 PyObject *__pyx_t_3 = NULL;
38157 unsigned int __pyx_t_4;
38158 int __pyx_lineno = 0;
38159 const char *__pyx_filename = NULL;
38160 int __pyx_clineno = 0;
38161 __Pyx_TraceFrameInit(__pyx_codeobj__85)
38162 __Pyx_RefNannySetupContext("items", 1);
38163 __Pyx_TraceCall("items", __pyx_f[0], 1866, 0, __PYX_ERR(0, 1866, __pyx_L1_error));
38164
38165 /* "pysam/libcbcf.pyx":1868
38166 * def items(self):
38167 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
38168 * return list(self.iteritems()) # <<<<<<<<<<<<<<
38169 *
38170 * def values(self):
38171 */
38172 __Pyx_XDECREF(__pyx_r);
38173 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1868, __pyx_L1_error)
38174 __Pyx_GOTREF(__pyx_t_2);
38175 __pyx_t_3 = NULL;
38176 __pyx_t_4 = 0;
38177 #if CYTHON_UNPACK_METHODS
38178 if (likely(PyMethod_Check(__pyx_t_2))) {
38179 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
38180 if (likely(__pyx_t_3)) {
38181 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
38182 __Pyx_INCREF(__pyx_t_3);
38183 __Pyx_INCREF(function);
38184 __Pyx_DECREF_SET(__pyx_t_2, function);
38185 __pyx_t_4 = 1;
38186 }
38187 }
38188 #endif
38189 {
38190 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
38191 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
38192 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
38193 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1868, __pyx_L1_error)
38194 __Pyx_GOTREF(__pyx_t_1);
38195 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38196 }
38197 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1868, __pyx_L1_error)
38198 __Pyx_GOTREF(__pyx_t_2);
38199 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
38200 __pyx_r = __pyx_t_2;
38201 __pyx_t_2 = 0;
38202 goto __pyx_L0;
38203
38204 /* "pysam/libcbcf.pyx":1866
38205 * return list(self)
38206 *
38207 * def items(self): # <<<<<<<<<<<<<<
38208 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
38209 * return list(self.iteritems())
38210 */
38211
38212 /* function exit code */
38213 __pyx_L1_error:;
38214 __Pyx_XDECREF(__pyx_t_1);
38215 __Pyx_XDECREF(__pyx_t_2);
38216 __Pyx_XDECREF(__pyx_t_3);
38217 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
38218 __pyx_r = NULL;
38219 __pyx_L0:;
38220 __Pyx_XGIVEREF(__pyx_r);
38221 __Pyx_TraceReturn(__pyx_r, 0);
38222 __Pyx_RefNannyFinishContext();
38223 return __pyx_r;
38224 }
38225
38226 /* "pysam/libcbcf.pyx":1870
38227 * return list(self.iteritems())
38228 *
38229 * def values(self): # <<<<<<<<<<<<<<
38230 * """D.values() -> list of D's values"""
38231 * return list(self.itervalues())
38232 */
38233
38234 /* Python wrapper */
38235 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_32values(PyObject *__pyx_v_self,
38236 #if CYTHON_METH_FASTCALL
38237 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38238 #else
38239 PyObject *__pyx_args, PyObject *__pyx_kwds
38240 #endif
38241 ); /*proto*/
38242 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_31values, "VariantHeaderContigs.values(self)\nD.values() -> list of D's values");
38243 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_32values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_32values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_31values};
38244 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_32values(PyObject *__pyx_v_self,
38245 #if CYTHON_METH_FASTCALL
38246 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38247 #else
38248 PyObject *__pyx_args, PyObject *__pyx_kwds
38249 #endif
38250 ) {
38251 #if !CYTHON_METH_FASTCALL
38252 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
38253 #endif
38254 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
38255 PyObject *__pyx_r = 0;
38256 __Pyx_RefNannyDeclarations
38257 __Pyx_RefNannySetupContext("values (wrapper)", 0);
38258 #if !CYTHON_METH_FASTCALL
38259 #if CYTHON_ASSUME_SAFE_MACROS
38260 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
38261 #else
38262 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
38263 #endif
38264 #endif
38265 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
38266 if (unlikely(__pyx_nargs > 0)) {
38267 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
38268 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
38269 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_31values(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
38270
38271 /* function exit code */
38272 __Pyx_RefNannyFinishContext();
38273 return __pyx_r;
38274 }
38275
38276 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_31values(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
38277 PyObject *__pyx_r = NULL;
38278 __Pyx_TraceDeclarations
38279 __Pyx_RefNannyDeclarations
38280 PyObject *__pyx_t_1 = NULL;
38281 PyObject *__pyx_t_2 = NULL;
38282 PyObject *__pyx_t_3 = NULL;
38283 unsigned int __pyx_t_4;
38284 int __pyx_lineno = 0;
38285 const char *__pyx_filename = NULL;
38286 int __pyx_clineno = 0;
38287 __Pyx_TraceFrameInit(__pyx_codeobj__86)
38288 __Pyx_RefNannySetupContext("values", 1);
38289 __Pyx_TraceCall("values", __pyx_f[0], 1870, 0, __PYX_ERR(0, 1870, __pyx_L1_error));
38290
38291 /* "pysam/libcbcf.pyx":1872
38292 * def values(self):
38293 * """D.values() -> list of D's values"""
38294 * return list(self.itervalues()) # <<<<<<<<<<<<<<
38295 *
38296 * # Mappings are not hashable by default, but subclasses can change this
38297 */
38298 __Pyx_XDECREF(__pyx_r);
38299 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __pyx_L1_error)
38300 __Pyx_GOTREF(__pyx_t_2);
38301 __pyx_t_3 = NULL;
38302 __pyx_t_4 = 0;
38303 #if CYTHON_UNPACK_METHODS
38304 if (likely(PyMethod_Check(__pyx_t_2))) {
38305 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
38306 if (likely(__pyx_t_3)) {
38307 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
38308 __Pyx_INCREF(__pyx_t_3);
38309 __Pyx_INCREF(function);
38310 __Pyx_DECREF_SET(__pyx_t_2, function);
38311 __pyx_t_4 = 1;
38312 }
38313 }
38314 #endif
38315 {
38316 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
38317 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
38318 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
38319 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1872, __pyx_L1_error)
38320 __Pyx_GOTREF(__pyx_t_1);
38321 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38322 }
38323 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __pyx_L1_error)
38324 __Pyx_GOTREF(__pyx_t_2);
38325 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
38326 __pyx_r = __pyx_t_2;
38327 __pyx_t_2 = 0;
38328 goto __pyx_L0;
38329
38330 /* "pysam/libcbcf.pyx":1870
38331 * return list(self.iteritems())
38332 *
38333 * def values(self): # <<<<<<<<<<<<<<
38334 * """D.values() -> list of D's values"""
38335 * return list(self.itervalues())
38336 */
38337
38338 /* function exit code */
38339 __pyx_L1_error:;
38340 __Pyx_XDECREF(__pyx_t_1);
38341 __Pyx_XDECREF(__pyx_t_2);
38342 __Pyx_XDECREF(__pyx_t_3);
38343 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
38344 __pyx_r = NULL;
38345 __pyx_L0:;
38346 __Pyx_XGIVEREF(__pyx_r);
38347 __Pyx_TraceReturn(__pyx_r, 0);
38348 __Pyx_RefNannyFinishContext();
38349 return __pyx_r;
38350 }
38351
38352 /* "pysam/libcbcf.pyx":1879
38353 * #TODO: implement __richcmp__
38354 *
38355 * def add(self, id, length=None, **kwargs): # <<<<<<<<<<<<<<
38356 * """Add a new contig record"""
38357 * if id in self:
38358 */
38359
38360 /* Python wrapper */
38361 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_34add(PyObject *__pyx_v_self,
38362 #if CYTHON_METH_FASTCALL
38363 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38364 #else
38365 PyObject *__pyx_args, PyObject *__pyx_kwds
38366 #endif
38367 ); /*proto*/
38368 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_33add, "VariantHeaderContigs.add(self, id, length=None, **kwargs)\nAdd a new contig record");
38369 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_34add = {"add", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_34add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_33add};
38370 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_34add(PyObject *__pyx_v_self,
38371 #if CYTHON_METH_FASTCALL
38372 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38373 #else
38374 PyObject *__pyx_args, PyObject *__pyx_kwds
38375 #endif
38376 ) {
38377 PyObject *__pyx_v_id = 0;
38378 PyObject *__pyx_v_length = 0;
38379 PyObject *__pyx_v_kwargs = 0;
38380 #if !CYTHON_METH_FASTCALL
38381 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
38382 #endif
38383 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
38384 PyObject* values[2] = {0,0};
38385 int __pyx_lineno = 0;
38386 const char *__pyx_filename = NULL;
38387 int __pyx_clineno = 0;
38388 PyObject *__pyx_r = 0;
38389 __Pyx_RefNannyDeclarations
38390 __Pyx_RefNannySetupContext("add (wrapper)", 0);
38391 #if !CYTHON_METH_FASTCALL
38392 #if CYTHON_ASSUME_SAFE_MACROS
38393 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
38394 #else
38395 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
38396 #endif
38397 #endif
38398 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
38399 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
38400 __Pyx_GOTREF(__pyx_v_kwargs);
38401 {
38402 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_id,&__pyx_n_s_length,0};
38403 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
38404 if (__pyx_kwds) {
38405 Py_ssize_t kw_args;
38406 switch (__pyx_nargs) {
38407 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
38408 CYTHON_FALLTHROUGH;
38409 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
38410 CYTHON_FALLTHROUGH;
38411 case 0: break;
38412 default: goto __pyx_L5_argtuple_error;
38413 }
38414 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
38415 switch (__pyx_nargs) {
38416 case 0:
38417 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_id)) != 0)) {
38418 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
38419 kw_args--;
38420 }
38421 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1879, __pyx_L3_error)
38422 else goto __pyx_L5_argtuple_error;
38423 CYTHON_FALLTHROUGH;
38424 case 1:
38425 if (kw_args > 0) {
38426 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_length);
38427 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
38428 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1879, __pyx_L3_error)
38429 }
38430 }
38431 if (unlikely(kw_args > 0)) {
38432 const Py_ssize_t kwd_pos_args = __pyx_nargs;
38433 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "add") < 0)) __PYX_ERR(0, 1879, __pyx_L3_error)
38434 }
38435 } else {
38436 switch (__pyx_nargs) {
38437 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
38438 CYTHON_FALLTHROUGH;
38439 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
38440 break;
38441 default: goto __pyx_L5_argtuple_error;
38442 }
38443 }
38444 __pyx_v_id = values[0];
38445 __pyx_v_length = values[1];
38446 }
38447 goto __pyx_L6_skip;
38448 __pyx_L5_argtuple_error:;
38449 __Pyx_RaiseArgtupleInvalid("add", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1879, __pyx_L3_error)
38450 __pyx_L6_skip:;
38451 goto __pyx_L4_argument_unpacking_done;
38452 __pyx_L3_error:;
38453 {
38454 Py_ssize_t __pyx_temp;
38455 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
38456 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
38457 }
38458 }
38459 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
38460 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
38461 __Pyx_RefNannyFinishContext();
38462 return NULL;
38463 __pyx_L4_argument_unpacking_done:;
38464 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_33add(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self), __pyx_v_id, __pyx_v_length, __pyx_v_kwargs);
38465
38466 /* function exit code */
38467 __Pyx_DECREF(__pyx_v_kwargs);
38468 {
38469 Py_ssize_t __pyx_temp;
38470 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
38471 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
38472 }
38473 }
38474 __Pyx_RefNannyFinishContext();
38475 return __pyx_r;
38476 }
38477
38478 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_33add(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v_id, PyObject *__pyx_v_length, PyObject *__pyx_v_kwargs) {
38479 PyObject *__pyx_v_items = NULL;
38480 PyObject *__pyx_r = NULL;
38481 __Pyx_TraceDeclarations
38482 __Pyx_RefNannyDeclarations
38483 int __pyx_t_1;
38484 PyObject *__pyx_t_2 = NULL;
38485 PyObject *__pyx_t_3 = NULL;
38486 PyObject *__pyx_t_4 = NULL;
38487 unsigned int __pyx_t_5;
38488 int __pyx_t_6;
38489 int __pyx_lineno = 0;
38490 const char *__pyx_filename = NULL;
38491 int __pyx_clineno = 0;
38492 __Pyx_TraceFrameInit(__pyx_codeobj__87)
38493 __Pyx_RefNannySetupContext("add", 1);
38494 __Pyx_TraceCall("add", __pyx_f[0], 1879, 0, __PYX_ERR(0, 1879, __pyx_L1_error));
38495
38496 /* "pysam/libcbcf.pyx":1881
38497 * def add(self, id, length=None, **kwargs):
38498 * """Add a new contig record"""
38499 * if id in self: # <<<<<<<<<<<<<<
38500 * raise ValueError('Header already exists for contig {}'.format(id))
38501 *
38502 */
38503 __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_id, ((PyObject *)__pyx_v_self), Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1881, __pyx_L1_error)
38504 if (unlikely(__pyx_t_1)) {
38505
38506 /* "pysam/libcbcf.pyx":1882
38507 * """Add a new contig record"""
38508 * if id in self:
38509 * raise ValueError('Header already exists for contig {}'.format(id)) # <<<<<<<<<<<<<<
38510 *
38511 * items = [('ID', unquoted_str(id))]
38512 */
38513 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Header_already_exists_for_contig, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1882, __pyx_L1_error)
38514 __Pyx_GOTREF(__pyx_t_3);
38515 __pyx_t_4 = NULL;
38516 __pyx_t_5 = 0;
38517 #if CYTHON_UNPACK_METHODS
38518 if (likely(PyMethod_Check(__pyx_t_3))) {
38519 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
38520 if (likely(__pyx_t_4)) {
38521 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
38522 __Pyx_INCREF(__pyx_t_4);
38523 __Pyx_INCREF(function);
38524 __Pyx_DECREF_SET(__pyx_t_3, function);
38525 __pyx_t_5 = 1;
38526 }
38527 }
38528 #endif
38529 {
38530 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_id};
38531 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
38532 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
38533 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __pyx_L1_error)
38534 __Pyx_GOTREF(__pyx_t_2);
38535 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
38536 }
38537 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1882, __pyx_L1_error)
38538 __Pyx_GOTREF(__pyx_t_3);
38539 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38540 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
38541 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
38542 __PYX_ERR(0, 1882, __pyx_L1_error)
38543
38544 /* "pysam/libcbcf.pyx":1881
38545 * def add(self, id, length=None, **kwargs):
38546 * """Add a new contig record"""
38547 * if id in self: # <<<<<<<<<<<<<<
38548 * raise ValueError('Header already exists for contig {}'.format(id))
38549 *
38550 */
38551 }
38552
38553 /* "pysam/libcbcf.pyx":1884
38554 * raise ValueError('Header already exists for contig {}'.format(id))
38555 *
38556 * items = [('ID', unquoted_str(id))] # <<<<<<<<<<<<<<
38557 * if length is not None:
38558 * items.append(("length", unquoted_str(length)))
38559 */
38560 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unquoted_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error)
38561 __Pyx_GOTREF(__pyx_t_2);
38562 __pyx_t_4 = NULL;
38563 __pyx_t_5 = 0;
38564 #if CYTHON_UNPACK_METHODS
38565 if (unlikely(PyMethod_Check(__pyx_t_2))) {
38566 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
38567 if (likely(__pyx_t_4)) {
38568 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
38569 __Pyx_INCREF(__pyx_t_4);
38570 __Pyx_INCREF(function);
38571 __Pyx_DECREF_SET(__pyx_t_2, function);
38572 __pyx_t_5 = 1;
38573 }
38574 }
38575 #endif
38576 {
38577 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_id};
38578 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
38579 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
38580 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error)
38581 __Pyx_GOTREF(__pyx_t_3);
38582 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38583 }
38584 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error)
38585 __Pyx_GOTREF(__pyx_t_2);
38586 __Pyx_INCREF(__pyx_n_u_ID);
38587 __Pyx_GIVEREF(__pyx_n_u_ID);
38588 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_ID)) __PYX_ERR(0, 1884, __pyx_L1_error);
38589 __Pyx_GIVEREF(__pyx_t_3);
38590 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error);
38591 __pyx_t_3 = 0;
38592 __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error)
38593 __Pyx_GOTREF(__pyx_t_3);
38594 __Pyx_GIVEREF(__pyx_t_2);
38595 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error);
38596 __pyx_t_2 = 0;
38597 __pyx_v_items = __pyx_t_3;
38598 __pyx_t_3 = 0;
38599
38600 /* "pysam/libcbcf.pyx":1885
38601 *
38602 * items = [('ID', unquoted_str(id))]
38603 * if length is not None: # <<<<<<<<<<<<<<
38604 * items.append(("length", unquoted_str(length)))
38605 * items += kwargs.items()
38606 */
38607 __pyx_t_1 = (__pyx_v_length != Py_None);
38608 if (__pyx_t_1) {
38609
38610 /* "pysam/libcbcf.pyx":1886
38611 * items = [('ID', unquoted_str(id))]
38612 * if length is not None:
38613 * items.append(("length", unquoted_str(length))) # <<<<<<<<<<<<<<
38614 * items += kwargs.items()
38615 * self.header.add_meta('contig', items=items)
38616 */
38617 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unquoted_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __pyx_L1_error)
38618 __Pyx_GOTREF(__pyx_t_2);
38619 __pyx_t_4 = NULL;
38620 __pyx_t_5 = 0;
38621 #if CYTHON_UNPACK_METHODS
38622 if (unlikely(PyMethod_Check(__pyx_t_2))) {
38623 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
38624 if (likely(__pyx_t_4)) {
38625 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
38626 __Pyx_INCREF(__pyx_t_4);
38627 __Pyx_INCREF(function);
38628 __Pyx_DECREF_SET(__pyx_t_2, function);
38629 __pyx_t_5 = 1;
38630 }
38631 }
38632 #endif
38633 {
38634 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_length};
38635 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
38636 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
38637 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __pyx_L1_error)
38638 __Pyx_GOTREF(__pyx_t_3);
38639 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38640 }
38641 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __pyx_L1_error)
38642 __Pyx_GOTREF(__pyx_t_2);
38643 __Pyx_INCREF(__pyx_n_u_length);
38644 __Pyx_GIVEREF(__pyx_n_u_length);
38645 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_length)) __PYX_ERR(0, 1886, __pyx_L1_error);
38646 __Pyx_GIVEREF(__pyx_t_3);
38647 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1886, __pyx_L1_error);
38648 __pyx_t_3 = 0;
38649 __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_items, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1886, __pyx_L1_error)
38650 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38651
38652 /* "pysam/libcbcf.pyx":1885
38653 *
38654 * items = [('ID', unquoted_str(id))]
38655 * if length is not None: # <<<<<<<<<<<<<<
38656 * items.append(("length", unquoted_str(length)))
38657 * items += kwargs.items()
38658 */
38659 }
38660
38661 /* "pysam/libcbcf.pyx":1887
38662 * if length is not None:
38663 * items.append(("length", unquoted_str(length)))
38664 * items += kwargs.items() # <<<<<<<<<<<<<<
38665 * self.header.add_meta('contig', items=items)
38666 *
38667 */
38668 __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
38669 __Pyx_GOTREF(__pyx_t_2);
38670 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_items, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1887, __pyx_L1_error)
38671 __Pyx_GOTREF(__pyx_t_3);
38672 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38673 __Pyx_DECREF_SET(__pyx_v_items, __pyx_t_3);
38674 __pyx_t_3 = 0;
38675
38676 /* "pysam/libcbcf.pyx":1888
38677 * items.append(("length", unquoted_str(length)))
38678 * items += kwargs.items()
38679 * self.header.add_meta('contig', items=items) # <<<<<<<<<<<<<<
38680 *
38681 *
38682 */
38683 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->header), __pyx_n_s_add_meta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1888, __pyx_L1_error)
38684 __Pyx_GOTREF(__pyx_t_3);
38685 __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1888, __pyx_L1_error)
38686 __Pyx_GOTREF(__pyx_t_2);
38687 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_items, __pyx_v_items) < 0) __PYX_ERR(0, 1888, __pyx_L1_error)
38688 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__88, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error)
38689 __Pyx_GOTREF(__pyx_t_4);
38690 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
38691 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38692 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
38693
38694 /* "pysam/libcbcf.pyx":1879
38695 * #TODO: implement __richcmp__
38696 *
38697 * def add(self, id, length=None, **kwargs): # <<<<<<<<<<<<<<
38698 * """Add a new contig record"""
38699 * if id in self:
38700 */
38701
38702 /* function exit code */
38703 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38704 goto __pyx_L0;
38705 __pyx_L1_error:;
38706 __Pyx_XDECREF(__pyx_t_2);
38707 __Pyx_XDECREF(__pyx_t_3);
38708 __Pyx_XDECREF(__pyx_t_4);
38709 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
38710 __pyx_r = NULL;
38711 __pyx_L0:;
38712 __Pyx_XDECREF(__pyx_v_items);
38713 __Pyx_XGIVEREF(__pyx_r);
38714 __Pyx_TraceReturn(__pyx_r, 0);
38715 __Pyx_RefNannyFinishContext();
38716 return __pyx_r;
38717 }
38718
38719 /* "pysam/libcbcf.pxd":57
38720 *
38721 * cdef class VariantHeaderContigs(object):
38722 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
38723 *
38724 *
38725 */
38726
38727 /* Python wrapper */
38728 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
38729 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_6header_1__get__(PyObject *__pyx_v_self) {
38730 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
38731 PyObject *__pyx_r = 0;
38732 __Pyx_RefNannyDeclarations
38733 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38734 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
38735 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
38736
38737 /* function exit code */
38738 __Pyx_RefNannyFinishContext();
38739 return __pyx_r;
38740 }
38741
38742 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
38743 PyObject *__pyx_r = NULL;
38744 __Pyx_TraceDeclarations
38745 __Pyx_RefNannyDeclarations
38746 int __pyx_lineno = 0;
38747 const char *__pyx_filename = NULL;
38748 int __pyx_clineno = 0;
38749 __Pyx_RefNannySetupContext("__get__", 1);
38750 __Pyx_TraceCall("__get__", __pyx_f[3], 57, 0, __PYX_ERR(3, 57, __pyx_L1_error));
38751 __Pyx_XDECREF(__pyx_r);
38752 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
38753 __pyx_r = ((PyObject *)__pyx_v_self->header);
38754 goto __pyx_L0;
38755
38756 /* function exit code */
38757 __pyx_L1_error:;
38758 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38759 __pyx_r = NULL;
38760 __pyx_L0:;
38761 __Pyx_XGIVEREF(__pyx_r);
38762 __Pyx_TraceReturn(__pyx_r, 0);
38763 __Pyx_RefNannyFinishContext();
38764 return __pyx_r;
38765 }
38766
38767 /* "(tree fragment)":1
38768 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
38769 * cdef tuple state
38770 * cdef object _dict
38771 */
38772
38773 /* Python wrapper */
38774 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_36__reduce_cython__(PyObject *__pyx_v_self,
38775 #if CYTHON_METH_FASTCALL
38776 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38777 #else
38778 PyObject *__pyx_args, PyObject *__pyx_kwds
38779 #endif
38780 ); /*proto*/
38781 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_35__reduce_cython__, "VariantHeaderContigs.__reduce_cython__(self)");
38782 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_36__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_36__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_35__reduce_cython__};
38783 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_36__reduce_cython__(PyObject *__pyx_v_self,
38784 #if CYTHON_METH_FASTCALL
38785 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
38786 #else
38787 PyObject *__pyx_args, PyObject *__pyx_kwds
38788 #endif
38789 ) {
38790 #if !CYTHON_METH_FASTCALL
38791 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
38792 #endif
38793 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
38794 PyObject *__pyx_r = 0;
38795 __Pyx_RefNannyDeclarations
38796 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
38797 #if !CYTHON_METH_FASTCALL
38798 #if CYTHON_ASSUME_SAFE_MACROS
38799 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
38800 #else
38801 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
38802 #endif
38803 #endif
38804 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
38805 if (unlikely(__pyx_nargs > 0)) {
38806 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
38807 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
38808 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_35__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self));
38809
38810 /* function exit code */
38811 __Pyx_RefNannyFinishContext();
38812 return __pyx_r;
38813 }
38814
38815 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_35__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self) {
38816 PyObject *__pyx_v_state = 0;
38817 PyObject *__pyx_v__dict = 0;
38818 int __pyx_v_use_setstate;
38819 PyObject *__pyx_r = NULL;
38820 __Pyx_TraceDeclarations
38821 __Pyx_RefNannyDeclarations
38822 PyObject *__pyx_t_1 = NULL;
38823 int __pyx_t_2;
38824 PyObject *__pyx_t_3 = NULL;
38825 PyObject *__pyx_t_4 = NULL;
38826 int __pyx_lineno = 0;
38827 const char *__pyx_filename = NULL;
38828 int __pyx_clineno = 0;
38829 __Pyx_TraceFrameInit(__pyx_codeobj__89)
38830 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
38831 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
38832
38833 /* "(tree fragment)":5
38834 * cdef object _dict
38835 * cdef bint use_setstate
38836 * state = (self.header,) # <<<<<<<<<<<<<<
38837 * _dict = getattr(self, '__dict__', None)
38838 * if _dict is not None:
38839 */
38840 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
38841 __Pyx_GOTREF(__pyx_t_1);
38842 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
38843 __Pyx_GIVEREF((PyObject *)__pyx_v_self->header);
38844 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->header))) __PYX_ERR(4, 5, __pyx_L1_error);
38845 __pyx_v_state = ((PyObject*)__pyx_t_1);
38846 __pyx_t_1 = 0;
38847
38848 /* "(tree fragment)":6
38849 * cdef bint use_setstate
38850 * state = (self.header,)
38851 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
38852 * if _dict is not None:
38853 * state += (_dict,)
38854 */
38855 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
38856 __Pyx_GOTREF(__pyx_t_1);
38857 __pyx_v__dict = __pyx_t_1;
38858 __pyx_t_1 = 0;
38859
38860 /* "(tree fragment)":7
38861 * state = (self.header,)
38862 * _dict = getattr(self, '__dict__', None)
38863 * if _dict is not None: # <<<<<<<<<<<<<<
38864 * state += (_dict,)
38865 * use_setstate = True
38866 */
38867 __pyx_t_2 = (__pyx_v__dict != Py_None);
38868 if (__pyx_t_2) {
38869
38870 /* "(tree fragment)":8
38871 * _dict = getattr(self, '__dict__', None)
38872 * if _dict is not None:
38873 * state += (_dict,) # <<<<<<<<<<<<<<
38874 * use_setstate = True
38875 * else:
38876 */
38877 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
38878 __Pyx_GOTREF(__pyx_t_1);
38879 __Pyx_INCREF(__pyx_v__dict);
38880 __Pyx_GIVEREF(__pyx_v__dict);
38881 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
38882 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
38883 __Pyx_GOTREF(__pyx_t_3);
38884 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
38885 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
38886 __pyx_t_3 = 0;
38887
38888 /* "(tree fragment)":9
38889 * if _dict is not None:
38890 * state += (_dict,)
38891 * use_setstate = True # <<<<<<<<<<<<<<
38892 * else:
38893 * use_setstate = self.header is not None
38894 */
38895 __pyx_v_use_setstate = 1;
38896
38897 /* "(tree fragment)":7
38898 * state = (self.header,)
38899 * _dict = getattr(self, '__dict__', None)
38900 * if _dict is not None: # <<<<<<<<<<<<<<
38901 * state += (_dict,)
38902 * use_setstate = True
38903 */
38904 goto __pyx_L3;
38905 }
38906
38907 /* "(tree fragment)":11
38908 * use_setstate = True
38909 * else:
38910 * use_setstate = self.header is not None # <<<<<<<<<<<<<<
38911 * if use_setstate:
38912 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, None), state
38913 */
38914 /*else*/ {
38915 __pyx_t_2 = (((PyObject *)__pyx_v_self->header) != Py_None);
38916 __pyx_v_use_setstate = __pyx_t_2;
38917 }
38918 __pyx_L3:;
38919
38920 /* "(tree fragment)":12
38921 * else:
38922 * use_setstate = self.header is not None
38923 * if use_setstate: # <<<<<<<<<<<<<<
38924 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, None), state
38925 * else:
38926 */
38927 if (__pyx_v_use_setstate) {
38928
38929 /* "(tree fragment)":13
38930 * use_setstate = self.header is not None
38931 * if use_setstate:
38932 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, None), state # <<<<<<<<<<<<<<
38933 * else:
38934 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, state)
38935 */
38936 __Pyx_XDECREF(__pyx_r);
38937 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_VariantHeaderCont); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
38938 __Pyx_GOTREF(__pyx_t_3);
38939 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
38940 __Pyx_GOTREF(__pyx_t_1);
38941 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
38942 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
38943 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
38944 __Pyx_INCREF(__pyx_int_31479882);
38945 __Pyx_GIVEREF(__pyx_int_31479882);
38946 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_31479882)) __PYX_ERR(4, 13, __pyx_L1_error);
38947 __Pyx_INCREF(Py_None);
38948 __Pyx_GIVEREF(Py_None);
38949 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
38950 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
38951 __Pyx_GOTREF(__pyx_t_4);
38952 __Pyx_GIVEREF(__pyx_t_3);
38953 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
38954 __Pyx_GIVEREF(__pyx_t_1);
38955 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
38956 __Pyx_INCREF(__pyx_v_state);
38957 __Pyx_GIVEREF(__pyx_v_state);
38958 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
38959 __pyx_t_3 = 0;
38960 __pyx_t_1 = 0;
38961 __pyx_r = __pyx_t_4;
38962 __pyx_t_4 = 0;
38963 goto __pyx_L0;
38964
38965 /* "(tree fragment)":12
38966 * else:
38967 * use_setstate = self.header is not None
38968 * if use_setstate: # <<<<<<<<<<<<<<
38969 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, None), state
38970 * else:
38971 */
38972 }
38973
38974 /* "(tree fragment)":15
38975 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, None), state
38976 * else:
38977 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, state) # <<<<<<<<<<<<<<
38978 * def __setstate_cython__(self, __pyx_state):
38979 * __pyx_unpickle_VariantHeaderContigs__set_state(self, __pyx_state)
38980 */
38981 /*else*/ {
38982 __Pyx_XDECREF(__pyx_r);
38983 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantHeaderCont); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
38984 __Pyx_GOTREF(__pyx_t_4);
38985 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
38986 __Pyx_GOTREF(__pyx_t_1);
38987 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
38988 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
38989 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
38990 __Pyx_INCREF(__pyx_int_31479882);
38991 __Pyx_GIVEREF(__pyx_int_31479882);
38992 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_31479882)) __PYX_ERR(4, 15, __pyx_L1_error);
38993 __Pyx_INCREF(__pyx_v_state);
38994 __Pyx_GIVEREF(__pyx_v_state);
38995 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
38996 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
38997 __Pyx_GOTREF(__pyx_t_3);
38998 __Pyx_GIVEREF(__pyx_t_4);
38999 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
39000 __Pyx_GIVEREF(__pyx_t_1);
39001 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
39002 __pyx_t_4 = 0;
39003 __pyx_t_1 = 0;
39004 __pyx_r = __pyx_t_3;
39005 __pyx_t_3 = 0;
39006 goto __pyx_L0;
39007 }
39008
39009 /* "(tree fragment)":1
39010 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
39011 * cdef tuple state
39012 * cdef object _dict
39013 */
39014
39015 /* function exit code */
39016 __pyx_L1_error:;
39017 __Pyx_XDECREF(__pyx_t_1);
39018 __Pyx_XDECREF(__pyx_t_3);
39019 __Pyx_XDECREF(__pyx_t_4);
39020 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39021 __pyx_r = NULL;
39022 __pyx_L0:;
39023 __Pyx_XDECREF(__pyx_v_state);
39024 __Pyx_XDECREF(__pyx_v__dict);
39025 __Pyx_XGIVEREF(__pyx_r);
39026 __Pyx_TraceReturn(__pyx_r, 0);
39027 __Pyx_RefNannyFinishContext();
39028 return __pyx_r;
39029 }
39030
39031 /* "(tree fragment)":16
39032 * else:
39033 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, state)
39034 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
39035 * __pyx_unpickle_VariantHeaderContigs__set_state(self, __pyx_state)
39036 */
39037
39038 /* Python wrapper */
39039 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_38__setstate_cython__(PyObject *__pyx_v_self,
39040 #if CYTHON_METH_FASTCALL
39041 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
39042 #else
39043 PyObject *__pyx_args, PyObject *__pyx_kwds
39044 #endif
39045 ); /*proto*/
39046 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_37__setstate_cython__, "VariantHeaderContigs.__setstate_cython__(self, __pyx_state)");
39047 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_38__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_38__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_37__setstate_cython__};
39048 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_38__setstate_cython__(PyObject *__pyx_v_self,
39049 #if CYTHON_METH_FASTCALL
39050 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
39051 #else
39052 PyObject *__pyx_args, PyObject *__pyx_kwds
39053 #endif
39054 ) {
39055 PyObject *__pyx_v___pyx_state = 0;
39056 #if !CYTHON_METH_FASTCALL
39057 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
39058 #endif
39059 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
39060 PyObject* values[1] = {0};
39061 int __pyx_lineno = 0;
39062 const char *__pyx_filename = NULL;
39063 int __pyx_clineno = 0;
39064 PyObject *__pyx_r = 0;
39065 __Pyx_RefNannyDeclarations
39066 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
39067 #if !CYTHON_METH_FASTCALL
39068 #if CYTHON_ASSUME_SAFE_MACROS
39069 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
39070 #else
39071 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
39072 #endif
39073 #endif
39074 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
39075 {
39076 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
39077 if (__pyx_kwds) {
39078 Py_ssize_t kw_args;
39079 switch (__pyx_nargs) {
39080 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
39081 CYTHON_FALLTHROUGH;
39082 case 0: break;
39083 default: goto __pyx_L5_argtuple_error;
39084 }
39085 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
39086 switch (__pyx_nargs) {
39087 case 0:
39088 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
39089 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
39090 kw_args--;
39091 }
39092 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
39093 else goto __pyx_L5_argtuple_error;
39094 }
39095 if (unlikely(kw_args > 0)) {
39096 const Py_ssize_t kwd_pos_args = __pyx_nargs;
39097 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
39098 }
39099 } else if (unlikely(__pyx_nargs != 1)) {
39100 goto __pyx_L5_argtuple_error;
39101 } else {
39102 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
39103 }
39104 __pyx_v___pyx_state = values[0];
39105 }
39106 goto __pyx_L6_skip;
39107 __pyx_L5_argtuple_error:;
39108 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
39109 __pyx_L6_skip:;
39110 goto __pyx_L4_argument_unpacking_done;
39111 __pyx_L3_error:;
39112 {
39113 Py_ssize_t __pyx_temp;
39114 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
39115 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
39116 }
39117 }
39118 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39119 __Pyx_RefNannyFinishContext();
39120 return NULL;
39121 __pyx_L4_argument_unpacking_done:;
39122 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_37__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v_self), __pyx_v___pyx_state);
39123
39124 /* function exit code */
39125 {
39126 Py_ssize_t __pyx_temp;
39127 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
39128 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
39129 }
39130 }
39131 __Pyx_RefNannyFinishContext();
39132 return __pyx_r;
39133 }
39134
39135 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderContigs_37__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
39136 PyObject *__pyx_r = NULL;
39137 __Pyx_TraceDeclarations
39138 __Pyx_RefNannyDeclarations
39139 PyObject *__pyx_t_1 = NULL;
39140 int __pyx_lineno = 0;
39141 const char *__pyx_filename = NULL;
39142 int __pyx_clineno = 0;
39143 __Pyx_TraceFrameInit(__pyx_codeobj__90)
39144 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
39145 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
39146
39147 /* "(tree fragment)":17
39148 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, state)
39149 * def __setstate_cython__(self, __pyx_state):
39150 * __pyx_unpickle_VariantHeaderContigs__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
39151 */
39152 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
39153 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderContigs__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
39154 __Pyx_GOTREF(__pyx_t_1);
39155 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39156
39157 /* "(tree fragment)":16
39158 * else:
39159 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, state)
39160 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
39161 * __pyx_unpickle_VariantHeaderContigs__set_state(self, __pyx_state)
39162 */
39163
39164 /* function exit code */
39165 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
39166 goto __pyx_L0;
39167 __pyx_L1_error:;
39168 __Pyx_XDECREF(__pyx_t_1);
39169 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderContigs.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39170 __pyx_r = NULL;
39171 __pyx_L0:;
39172 __Pyx_XGIVEREF(__pyx_r);
39173 __Pyx_TraceReturn(__pyx_r, 0);
39174 __Pyx_RefNannyFinishContext();
39175 return __pyx_r;
39176 }
39177
39178 /* "pysam/libcbcf.pyx":1891
39179 *
39180 *
39181 * cdef VariantHeaderContigs makeVariantHeaderContigs(VariantHeader header): # <<<<<<<<<<<<<<
39182 * if not header:
39183 * raise ValueError('invalid VariantHeader')
39184 */
39185
39186 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_f_5pysam_7libcbcf_makeVariantHeaderContigs(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header) {
39187 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v_contigs = 0;
39188 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_r = NULL;
39189 __Pyx_TraceDeclarations
39190 __Pyx_RefNannyDeclarations
39191 int __pyx_t_1;
39192 int __pyx_t_2;
39193 PyObject *__pyx_t_3 = NULL;
39194 int __pyx_lineno = 0;
39195 const char *__pyx_filename = NULL;
39196 int __pyx_clineno = 0;
39197 __Pyx_RefNannySetupContext("makeVariantHeaderContigs", 1);
39198 __Pyx_TraceCall("makeVariantHeaderContigs", __pyx_f[0], 1891, 0, __PYX_ERR(0, 1891, __pyx_L1_error));
39199
39200 /* "pysam/libcbcf.pyx":1892
39201 *
39202 * cdef VariantHeaderContigs makeVariantHeaderContigs(VariantHeader header):
39203 * if not header: # <<<<<<<<<<<<<<
39204 * raise ValueError('invalid VariantHeader')
39205 *
39206 */
39207 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1892, __pyx_L1_error)
39208 __pyx_t_2 = (!__pyx_t_1);
39209 if (unlikely(__pyx_t_2)) {
39210
39211 /* "pysam/libcbcf.pyx":1893
39212 * cdef VariantHeaderContigs makeVariantHeaderContigs(VariantHeader header):
39213 * if not header:
39214 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
39215 *
39216 * cdef VariantHeaderContigs contigs = VariantHeaderContigs.__new__(VariantHeaderContigs)
39217 */
39218 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1893, __pyx_L1_error)
39219 __Pyx_GOTREF(__pyx_t_3);
39220 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
39221 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
39222 __PYX_ERR(0, 1893, __pyx_L1_error)
39223
39224 /* "pysam/libcbcf.pyx":1892
39225 *
39226 * cdef VariantHeaderContigs makeVariantHeaderContigs(VariantHeader header):
39227 * if not header: # <<<<<<<<<<<<<<
39228 * raise ValueError('invalid VariantHeader')
39229 *
39230 */
39231 }
39232
39233 /* "pysam/libcbcf.pyx":1895
39234 * raise ValueError('invalid VariantHeader')
39235 *
39236 * cdef VariantHeaderContigs contigs = VariantHeaderContigs.__new__(VariantHeaderContigs) # <<<<<<<<<<<<<<
39237 * contigs.header = header
39238 *
39239 */
39240 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderContigs(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1895, __pyx_L1_error)
39241 __Pyx_GOTREF((PyObject *)__pyx_t_3);
39242 __pyx_v_contigs = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_t_3);
39243 __pyx_t_3 = 0;
39244
39245 /* "pysam/libcbcf.pyx":1896
39246 *
39247 * cdef VariantHeaderContigs contigs = VariantHeaderContigs.__new__(VariantHeaderContigs)
39248 * contigs.header = header # <<<<<<<<<<<<<<
39249 *
39250 * return contigs
39251 */
39252 __Pyx_INCREF((PyObject *)__pyx_v_header);
39253 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
39254 __Pyx_GOTREF((PyObject *)__pyx_v_contigs->header);
39255 __Pyx_DECREF((PyObject *)__pyx_v_contigs->header);
39256 __pyx_v_contigs->header = __pyx_v_header;
39257
39258 /* "pysam/libcbcf.pyx":1898
39259 * contigs.header = header
39260 *
39261 * return contigs # <<<<<<<<<<<<<<
39262 *
39263 *
39264 */
39265 __Pyx_XDECREF((PyObject *)__pyx_r);
39266 __Pyx_INCREF((PyObject *)__pyx_v_contigs);
39267 __pyx_r = __pyx_v_contigs;
39268 goto __pyx_L0;
39269
39270 /* "pysam/libcbcf.pyx":1891
39271 *
39272 *
39273 * cdef VariantHeaderContigs makeVariantHeaderContigs(VariantHeader header): # <<<<<<<<<<<<<<
39274 * if not header:
39275 * raise ValueError('invalid VariantHeader')
39276 */
39277
39278 /* function exit code */
39279 __pyx_L1_error:;
39280 __Pyx_XDECREF(__pyx_t_3);
39281 __Pyx_AddTraceback("pysam.libcbcf.makeVariantHeaderContigs", __pyx_clineno, __pyx_lineno, __pyx_filename);
39282 __pyx_r = 0;
39283 __pyx_L0:;
39284 __Pyx_XDECREF((PyObject *)__pyx_v_contigs);
39285 __Pyx_XGIVEREF((PyObject *)__pyx_r);
39286 __Pyx_TraceReturn(__pyx_r, 0);
39287 __Pyx_RefNannyFinishContext();
39288 return __pyx_r;
39289 }
39290
39291 /* "pysam/libcbcf.pyx":1903
39292 * cdef class VariantHeaderSamples(object):
39293 * """sequence of sample names from a :class:`VariantHeader` object"""
39294 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
39295 * raise TypeError('this class cannot be instantiated from Python')
39296 *
39297 */
39298
39299 /* Python wrapper */
39300 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
39301 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
39302 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
39303 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
39304 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
39305 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
39306 int __pyx_r;
39307 __Pyx_RefNannyDeclarations
39308 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
39309 #if CYTHON_ASSUME_SAFE_MACROS
39310 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
39311 #else
39312 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
39313 #endif
39314 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
39315 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
39316 __Pyx_INCREF(__pyx_args);
39317 __pyx_v_args = __pyx_args;
39318 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
39319
39320 /* function exit code */
39321 __Pyx_DECREF(__pyx_v_args);
39322 __Pyx_XDECREF(__pyx_v_kwargs);
39323 __Pyx_RefNannyFinishContext();
39324 return __pyx_r;
39325 }
39326
39327 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
39328 int __pyx_r;
39329 __Pyx_TraceDeclarations
39330 __Pyx_RefNannyDeclarations
39331 PyObject *__pyx_t_1 = NULL;
39332 int __pyx_lineno = 0;
39333 const char *__pyx_filename = NULL;
39334 int __pyx_clineno = 0;
39335 __Pyx_RefNannySetupContext("__init__", 1);
39336 __Pyx_TraceCall("__init__", __pyx_f[0], 1903, 0, __PYX_ERR(0, 1903, __pyx_L1_error));
39337
39338 /* "pysam/libcbcf.pyx":1904
39339 * """sequence of sample names from a :class:`VariantHeader` object"""
39340 * def __init__(self, *args, **kwargs):
39341 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
39342 *
39343 * def __len__(self):
39344 */
39345 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1904, __pyx_L1_error)
39346 __Pyx_GOTREF(__pyx_t_1);
39347 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
39348 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39349 __PYX_ERR(0, 1904, __pyx_L1_error)
39350
39351 /* "pysam/libcbcf.pyx":1903
39352 * cdef class VariantHeaderSamples(object):
39353 * """sequence of sample names from a :class:`VariantHeader` object"""
39354 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
39355 * raise TypeError('this class cannot be instantiated from Python')
39356 *
39357 */
39358
39359 /* function exit code */
39360 __pyx_L1_error:;
39361 __Pyx_XDECREF(__pyx_t_1);
39362 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39363 __pyx_r = -1;
39364 __Pyx_TraceReturn(Py_None, 0);
39365 __Pyx_RefNannyFinishContext();
39366 return __pyx_r;
39367 }
39368
39369 /* "pysam/libcbcf.pyx":1906
39370 * raise TypeError('this class cannot be instantiated from Python')
39371 *
39372 * def __len__(self): # <<<<<<<<<<<<<<
39373 * return bcf_hdr_nsamples(self.header.ptr)
39374 *
39375 */
39376
39377 /* Python wrapper */
39378 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_3__len__(PyObject *__pyx_v_self); /*proto*/
39379 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_3__len__(PyObject *__pyx_v_self) {
39380 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
39381 Py_ssize_t __pyx_r;
39382 __Pyx_RefNannyDeclarations
39383 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
39384 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
39385 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self));
39386
39387 /* function exit code */
39388 __Pyx_RefNannyFinishContext();
39389 return __pyx_r;
39390 }
39391
39392 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self) {
39393 Py_ssize_t __pyx_r;
39394 __Pyx_TraceDeclarations
39395 int __pyx_lineno = 0;
39396 const char *__pyx_filename = NULL;
39397 int __pyx_clineno = 0;
39398 __Pyx_TraceCall("__len__", __pyx_f[0], 1906, 0, __PYX_ERR(0, 1906, __pyx_L1_error));
39399
39400 /* "pysam/libcbcf.pyx":1907
39401 *
39402 * def __len__(self):
39403 * return bcf_hdr_nsamples(self.header.ptr) # <<<<<<<<<<<<<<
39404 *
39405 * def __bool__(self):
39406 */
39407 __pyx_r = bcf_hdr_nsamples(__pyx_v_self->header->ptr);
39408 goto __pyx_L0;
39409
39410 /* "pysam/libcbcf.pyx":1906
39411 * raise TypeError('this class cannot be instantiated from Python')
39412 *
39413 * def __len__(self): # <<<<<<<<<<<<<<
39414 * return bcf_hdr_nsamples(self.header.ptr)
39415 *
39416 */
39417
39418 /* function exit code */
39419 __pyx_L1_error:;
39420 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39421 __pyx_r = -1;
39422 __pyx_L0:;
39423 __Pyx_TraceReturn(Py_None, 0);
39424 return __pyx_r;
39425 }
39426
39427 /* "pysam/libcbcf.pyx":1909
39428 * return bcf_hdr_nsamples(self.header.ptr)
39429 *
39430 * def __bool__(self): # <<<<<<<<<<<<<<
39431 * return bcf_hdr_nsamples(self.header.ptr) != 0
39432 *
39433 */
39434
39435 /* Python wrapper */
39436 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_5__bool__(PyObject *__pyx_v_self); /*proto*/
39437 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_5__bool__(PyObject *__pyx_v_self) {
39438 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
39439 int __pyx_r;
39440 __Pyx_RefNannyDeclarations
39441 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
39442 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
39443 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self));
39444
39445 /* function exit code */
39446 __Pyx_RefNannyFinishContext();
39447 return __pyx_r;
39448 }
39449
39450 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self) {
39451 int __pyx_r;
39452 __Pyx_TraceDeclarations
39453 int __pyx_lineno = 0;
39454 const char *__pyx_filename = NULL;
39455 int __pyx_clineno = 0;
39456 __Pyx_TraceCall("__bool__", __pyx_f[0], 1909, 0, __PYX_ERR(0, 1909, __pyx_L1_error));
39457
39458 /* "pysam/libcbcf.pyx":1910
39459 *
39460 * def __bool__(self):
39461 * return bcf_hdr_nsamples(self.header.ptr) != 0 # <<<<<<<<<<<<<<
39462 *
39463 * def __getitem__(self, index):
39464 */
39465 __pyx_r = (bcf_hdr_nsamples(__pyx_v_self->header->ptr) != 0);
39466 goto __pyx_L0;
39467
39468 /* "pysam/libcbcf.pyx":1909
39469 * return bcf_hdr_nsamples(self.header.ptr)
39470 *
39471 * def __bool__(self): # <<<<<<<<<<<<<<
39472 * return bcf_hdr_nsamples(self.header.ptr) != 0
39473 *
39474 */
39475
39476 /* function exit code */
39477 __pyx_L1_error:;
39478 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39479 __pyx_r = -1;
39480 __pyx_L0:;
39481 __Pyx_TraceReturn(Py_None, 0);
39482 return __pyx_r;
39483 }
39484
39485 /* "pysam/libcbcf.pyx":1912
39486 * return bcf_hdr_nsamples(self.header.ptr) != 0
39487 *
39488 * def __getitem__(self, index): # <<<<<<<<<<<<<<
39489 * cdef bcf_hdr_t *hdr = self.header.ptr
39490 * cdef int32_t n = bcf_hdr_nsamples(hdr)
39491 */
39492
39493 /* Python wrapper */
39494 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
39495 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
39496 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
39497 PyObject *__pyx_r = 0;
39498 __Pyx_RefNannyDeclarations
39499 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
39500 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
39501 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self), ((PyObject *)__pyx_v_index));
39502
39503 /* function exit code */
39504 __Pyx_RefNannyFinishContext();
39505 return __pyx_r;
39506 }
39507
39508 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, PyObject *__pyx_v_index) {
39509 bcf_hdr_t *__pyx_v_hdr;
39510 int32_t __pyx_v_n;
39511 int32_t __pyx_v_i;
39512 PyObject *__pyx_r = NULL;
39513 __Pyx_TraceDeclarations
39514 __Pyx_RefNannyDeclarations
39515 bcf_hdr_t *__pyx_t_1;
39516 int32_t __pyx_t_2;
39517 int __pyx_t_3;
39518 int __pyx_t_4;
39519 PyObject *__pyx_t_5 = NULL;
39520 int __pyx_lineno = 0;
39521 const char *__pyx_filename = NULL;
39522 int __pyx_clineno = 0;
39523 __Pyx_RefNannySetupContext("__getitem__", 1);
39524 __Pyx_TraceCall("__getitem__", __pyx_f[0], 1912, 0, __PYX_ERR(0, 1912, __pyx_L1_error));
39525
39526 /* "pysam/libcbcf.pyx":1913
39527 *
39528 * def __getitem__(self, index):
39529 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
39530 * cdef int32_t n = bcf_hdr_nsamples(hdr)
39531 * cdef int32_t i = index
39532 */
39533 __pyx_t_1 = __pyx_v_self->header->ptr;
39534 __pyx_v_hdr = __pyx_t_1;
39535
39536 /* "pysam/libcbcf.pyx":1914
39537 * def __getitem__(self, index):
39538 * cdef bcf_hdr_t *hdr = self.header.ptr
39539 * cdef int32_t n = bcf_hdr_nsamples(hdr) # <<<<<<<<<<<<<<
39540 * cdef int32_t i = index
39541 *
39542 */
39543 __pyx_v_n = bcf_hdr_nsamples(__pyx_v_hdr);
39544
39545 /* "pysam/libcbcf.pyx":1915
39546 * cdef bcf_hdr_t *hdr = self.header.ptr
39547 * cdef int32_t n = bcf_hdr_nsamples(hdr)
39548 * cdef int32_t i = index # <<<<<<<<<<<<<<
39549 *
39550 * if i < 0 or i >= n:
39551 */
39552 __pyx_t_2 = __Pyx_PyInt_As_int32_t(__pyx_v_index); if (unlikely((__pyx_t_2 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L1_error)
39553 __pyx_v_i = __pyx_t_2;
39554
39555 /* "pysam/libcbcf.pyx":1917
39556 * cdef int32_t i = index
39557 *
39558 * if i < 0 or i >= n: # <<<<<<<<<<<<<<
39559 * raise IndexError('invalid sample index')
39560 *
39561 */
39562 __pyx_t_4 = (__pyx_v_i < 0);
39563 if (!__pyx_t_4) {
39564 } else {
39565 __pyx_t_3 = __pyx_t_4;
39566 goto __pyx_L4_bool_binop_done;
39567 }
39568 __pyx_t_4 = (__pyx_v_i >= __pyx_v_n);
39569 __pyx_t_3 = __pyx_t_4;
39570 __pyx_L4_bool_binop_done:;
39571 if (unlikely(__pyx_t_3)) {
39572
39573 /* "pysam/libcbcf.pyx":1918
39574 *
39575 * if i < 0 or i >= n:
39576 * raise IndexError('invalid sample index') # <<<<<<<<<<<<<<
39577 *
39578 * return charptr_to_str(hdr.samples[i])
39579 */
39580 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1918, __pyx_L1_error)
39581 __Pyx_GOTREF(__pyx_t_5);
39582 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
39583 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39584 __PYX_ERR(0, 1918, __pyx_L1_error)
39585
39586 /* "pysam/libcbcf.pyx":1917
39587 * cdef int32_t i = index
39588 *
39589 * if i < 0 or i >= n: # <<<<<<<<<<<<<<
39590 * raise IndexError('invalid sample index')
39591 *
39592 */
39593 }
39594
39595 /* "pysam/libcbcf.pyx":1920
39596 * raise IndexError('invalid sample index')
39597 *
39598 * return charptr_to_str(hdr.samples[i]) # <<<<<<<<<<<<<<
39599 *
39600 * def __iter__(self):
39601 */
39602 __Pyx_XDECREF(__pyx_r);
39603 __pyx_t_5 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_hdr->samples[__pyx_v_i]), NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1920, __pyx_L1_error)
39604 __Pyx_GOTREF(__pyx_t_5);
39605 __pyx_r = __pyx_t_5;
39606 __pyx_t_5 = 0;
39607 goto __pyx_L0;
39608
39609 /* "pysam/libcbcf.pyx":1912
39610 * return bcf_hdr_nsamples(self.header.ptr) != 0
39611 *
39612 * def __getitem__(self, index): # <<<<<<<<<<<<<<
39613 * cdef bcf_hdr_t *hdr = self.header.ptr
39614 * cdef int32_t n = bcf_hdr_nsamples(hdr)
39615 */
39616
39617 /* function exit code */
39618 __pyx_L1_error:;
39619 __Pyx_XDECREF(__pyx_t_5);
39620 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39621 __pyx_r = NULL;
39622 __pyx_L0:;
39623 __Pyx_XGIVEREF(__pyx_r);
39624 __Pyx_TraceReturn(__pyx_r, 0);
39625 __Pyx_RefNannyFinishContext();
39626 return __pyx_r;
39627 }
39628 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderSamples_10generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
39629
39630 /* "pysam/libcbcf.pyx":1922
39631 * return charptr_to_str(hdr.samples[i])
39632 *
39633 * def __iter__(self): # <<<<<<<<<<<<<<
39634 * cdef bcf_hdr_t *hdr = self.header.ptr
39635 * cdef int32_t i, n = bcf_hdr_nsamples(hdr)
39636 */
39637
39638 /* Python wrapper */
39639 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_9__iter__(PyObject *__pyx_v_self); /*proto*/
39640 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_9__iter__(PyObject *__pyx_v_self) {
39641 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
39642 PyObject *__pyx_r = 0;
39643 __Pyx_RefNannyDeclarations
39644 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
39645 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
39646 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_8__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self));
39647
39648 /* function exit code */
39649 __Pyx_RefNannyFinishContext();
39650 return __pyx_r;
39651 }
39652
39653 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self) {
39654 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *__pyx_cur_scope;
39655 PyObject *__pyx_r = NULL;
39656 __Pyx_RefNannyDeclarations
39657 int __pyx_lineno = 0;
39658 const char *__pyx_filename = NULL;
39659 int __pyx_clineno = 0;
39660 __Pyx_RefNannySetupContext("__iter__", 0);
39661 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_17___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__, __pyx_empty_tuple, NULL);
39662 if (unlikely(!__pyx_cur_scope)) {
39663 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *)Py_None);
39664 __Pyx_INCREF(Py_None);
39665 __PYX_ERR(0, 1922, __pyx_L1_error)
39666 } else {
39667 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
39668 }
39669 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
39670 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
39671 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
39672 {
39673 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_20VariantHeaderSamples_10generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantHeaderSamples___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 1922, __pyx_L1_error)
39674 __Pyx_DECREF(__pyx_cur_scope);
39675 __Pyx_RefNannyFinishContext();
39676 return (PyObject *) gen;
39677 }
39678
39679 /* function exit code */
39680 __pyx_L1_error:;
39681 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39682 __pyx_r = NULL;
39683 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
39684 __Pyx_XGIVEREF(__pyx_r);
39685 __Pyx_RefNannyFinishContext();
39686 return __pyx_r;
39687 }
39688
39689 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantHeaderSamples_10generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
39690 {
39691 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *)__pyx_generator->closure);
39692 PyObject *__pyx_r = NULL;
39693 __Pyx_TraceDeclarations
39694 bcf_hdr_t *__pyx_t_1;
39695 int32_t __pyx_t_2;
39696 int32_t __pyx_t_3;
39697 int32_t __pyx_t_4;
39698 PyObject *__pyx_t_5 = NULL;
39699 int __pyx_lineno = 0;
39700 const char *__pyx_filename = NULL;
39701 int __pyx_clineno = 0;
39702 __Pyx_RefNannyDeclarations
39703 __Pyx_RefNannySetupContext("__iter__", 0);
39704 __Pyx_TraceCall("__iter__", __pyx_f[0], 1922, 0, __PYX_ERR(0, 1922, __pyx_L1_error));
39705 switch (__pyx_generator->resume_label) {
39706 case 0: goto __pyx_L3_first_run;
39707 case 1: goto __pyx_L6_resume_from_yield;
39708 default: /* CPython raises the right error here */
39709 __Pyx_TraceReturn(Py_None, 0);
39710 __Pyx_RefNannyFinishContext();
39711 return NULL;
39712 }
39713 __pyx_L3_first_run:;
39714 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1922, __pyx_L1_error)
39715
39716 /* "pysam/libcbcf.pyx":1923
39717 *
39718 * def __iter__(self):
39719 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
39720 * cdef int32_t i, n = bcf_hdr_nsamples(hdr)
39721 *
39722 */
39723 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->header->ptr;
39724 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
39725
39726 /* "pysam/libcbcf.pyx":1924
39727 * def __iter__(self):
39728 * cdef bcf_hdr_t *hdr = self.header.ptr
39729 * cdef int32_t i, n = bcf_hdr_nsamples(hdr) # <<<<<<<<<<<<<<
39730 *
39731 * for i in range(n):
39732 */
39733 __pyx_cur_scope->__pyx_v_n = bcf_hdr_nsamples(__pyx_cur_scope->__pyx_v_hdr);
39734
39735 /* "pysam/libcbcf.pyx":1926
39736 * cdef int32_t i, n = bcf_hdr_nsamples(hdr)
39737 *
39738 * for i in range(n): # <<<<<<<<<<<<<<
39739 * yield charptr_to_str(hdr.samples[i])
39740 *
39741 */
39742 __pyx_t_2 = __pyx_cur_scope->__pyx_v_n;
39743 __pyx_t_3 = __pyx_t_2;
39744 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
39745 __pyx_cur_scope->__pyx_v_i = __pyx_t_4;
39746
39747 /* "pysam/libcbcf.pyx":1927
39748 *
39749 * for i in range(n):
39750 * yield charptr_to_str(hdr.samples[i]) # <<<<<<<<<<<<<<
39751 *
39752 * def __contains__(self, key):
39753 */
39754 __pyx_t_5 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_cur_scope->__pyx_v_hdr->samples[__pyx_cur_scope->__pyx_v_i]), NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1927, __pyx_L1_error)
39755 __Pyx_GOTREF(__pyx_t_5);
39756 __pyx_r = __pyx_t_5;
39757 __pyx_t_5 = 0;
39758 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
39759 __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
39760 __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
39761 __Pyx_XGIVEREF(__pyx_r);
39762 __Pyx_TraceReturn(__pyx_r, 0);
39763 __Pyx_RefNannyFinishContext();
39764 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
39765 /* return from generator, yielding value */
39766 __pyx_generator->resume_label = 1;
39767 return __pyx_r;
39768 __pyx_L6_resume_from_yield:;
39769 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
39770 __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
39771 __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
39772 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1927, __pyx_L1_error)
39773 }
39774 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
39775
39776 /* "pysam/libcbcf.pyx":1922
39777 * return charptr_to_str(hdr.samples[i])
39778 *
39779 * def __iter__(self): # <<<<<<<<<<<<<<
39780 * cdef bcf_hdr_t *hdr = self.header.ptr
39781 * cdef int32_t i, n = bcf_hdr_nsamples(hdr)
39782 */
39783
39784 /* function exit code */
39785 PyErr_SetNone(PyExc_StopIteration);
39786 goto __pyx_L0;
39787 __pyx_L1_error:;
39788 __Pyx_Generator_Replace_StopIteration(0);
39789 __Pyx_XDECREF(__pyx_t_5);
39790 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39791 __pyx_L0:;
39792 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
39793 #if !CYTHON_USE_EXC_INFO_STACK
39794 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
39795 #endif
39796 __pyx_generator->resume_label = -1;
39797 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
39798 __Pyx_TraceReturn(__pyx_r, 0);
39799 __Pyx_RefNannyFinishContext();
39800 return __pyx_r;
39801 }
39802
39803 /* "pysam/libcbcf.pyx":1929
39804 * yield charptr_to_str(hdr.samples[i])
39805 *
39806 * def __contains__(self, key): # <<<<<<<<<<<<<<
39807 * cdef bcf_hdr_t *hdr = self.header.ptr
39808 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_SAMPLE]
39809 */
39810
39811 /* Python wrapper */
39812 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_12__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
39813 static int __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_12__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
39814 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
39815 int __pyx_r;
39816 __Pyx_RefNannyDeclarations
39817 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
39818 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
39819 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_11__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self), ((PyObject *)__pyx_v_key));
39820
39821 /* function exit code */
39822 __Pyx_RefNannyFinishContext();
39823 return __pyx_r;
39824 }
39825
39826 static int __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_11__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, PyObject *__pyx_v_key) {
39827 bcf_hdr_t *__pyx_v_hdr;
39828 vdict_t *__pyx_v_d;
39829 PyObject *__pyx_v_bkey = 0;
39830 khiter_t __pyx_v_k;
39831 int __pyx_r;
39832 __Pyx_TraceDeclarations
39833 __Pyx_RefNannyDeclarations
39834 bcf_hdr_t *__pyx_t_1;
39835 PyObject *__pyx_t_2 = NULL;
39836 char const *__pyx_t_3;
39837 int __pyx_lineno = 0;
39838 const char *__pyx_filename = NULL;
39839 int __pyx_clineno = 0;
39840 __Pyx_RefNannySetupContext("__contains__", 1);
39841 __Pyx_TraceCall("__contains__", __pyx_f[0], 1929, 0, __PYX_ERR(0, 1929, __pyx_L1_error));
39842
39843 /* "pysam/libcbcf.pyx":1930
39844 *
39845 * def __contains__(self, key):
39846 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
39847 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_SAMPLE]
39848 * cdef bytes bkey = force_bytes(key)
39849 */
39850 __pyx_t_1 = __pyx_v_self->header->ptr;
39851 __pyx_v_hdr = __pyx_t_1;
39852
39853 /* "pysam/libcbcf.pyx":1931
39854 * def __contains__(self, key):
39855 * cdef bcf_hdr_t *hdr = self.header.ptr
39856 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_SAMPLE] # <<<<<<<<<<<<<<
39857 * cdef bytes bkey = force_bytes(key)
39858 * cdef khiter_t k = kh_get_vdict(d, bkey)
39859 */
39860 __pyx_v_d = ((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_SAMPLE]));
39861
39862 /* "pysam/libcbcf.pyx":1932
39863 * cdef bcf_hdr_t *hdr = self.header.ptr
39864 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_SAMPLE]
39865 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
39866 * cdef khiter_t k = kh_get_vdict(d, bkey)
39867 *
39868 */
39869 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1932, __pyx_L1_error)
39870 __Pyx_GOTREF(__pyx_t_2);
39871 __pyx_v_bkey = ((PyObject*)__pyx_t_2);
39872 __pyx_t_2 = 0;
39873
39874 /* "pysam/libcbcf.pyx":1933
39875 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_SAMPLE]
39876 * cdef bytes bkey = force_bytes(key)
39877 * cdef khiter_t k = kh_get_vdict(d, bkey) # <<<<<<<<<<<<<<
39878 *
39879 * return k != kh_end(d)
39880 */
39881 if (unlikely(__pyx_v_bkey == Py_None)) {
39882 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
39883 __PYX_ERR(0, 1933, __pyx_L1_error)
39884 }
39885 __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 1933, __pyx_L1_error)
39886 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_3);
39887
39888 /* "pysam/libcbcf.pyx":1935
39889 * cdef khiter_t k = kh_get_vdict(d, bkey)
39890 *
39891 * return k != kh_end(d) # <<<<<<<<<<<<<<
39892 *
39893 * # Mappings are not hashable by default, but subclasses can change this
39894 */
39895 __pyx_r = (__pyx_v_k != kh_end(__pyx_v_d));
39896 goto __pyx_L0;
39897
39898 /* "pysam/libcbcf.pyx":1929
39899 * yield charptr_to_str(hdr.samples[i])
39900 *
39901 * def __contains__(self, key): # <<<<<<<<<<<<<<
39902 * cdef bcf_hdr_t *hdr = self.header.ptr
39903 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_SAMPLE]
39904 */
39905
39906 /* function exit code */
39907 __pyx_L1_error:;
39908 __Pyx_XDECREF(__pyx_t_2);
39909 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39910 __pyx_r = -1;
39911 __pyx_L0:;
39912 __Pyx_XDECREF(__pyx_v_bkey);
39913 __Pyx_TraceReturn(Py_None, 0);
39914 __Pyx_RefNannyFinishContext();
39915 return __pyx_r;
39916 }
39917
39918 /* "pysam/libcbcf.pyx":1942
39919 * #TODO: implement __richcmp__
39920 *
39921 * def add(self, name): # <<<<<<<<<<<<<<
39922 * """Add a new sample"""
39923 * self.header.add_sample(name)
39924 */
39925
39926 /* Python wrapper */
39927 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_14add(PyObject *__pyx_v_self,
39928 #if CYTHON_METH_FASTCALL
39929 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
39930 #else
39931 PyObject *__pyx_args, PyObject *__pyx_kwds
39932 #endif
39933 ); /*proto*/
39934 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_13add, "VariantHeaderSamples.add(self, name)\nAdd a new sample");
39935 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderSamples_14add = {"add", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_14add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_13add};
39936 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_14add(PyObject *__pyx_v_self,
39937 #if CYTHON_METH_FASTCALL
39938 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
39939 #else
39940 PyObject *__pyx_args, PyObject *__pyx_kwds
39941 #endif
39942 ) {
39943 PyObject *__pyx_v_name = 0;
39944 #if !CYTHON_METH_FASTCALL
39945 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
39946 #endif
39947 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
39948 PyObject* values[1] = {0};
39949 int __pyx_lineno = 0;
39950 const char *__pyx_filename = NULL;
39951 int __pyx_clineno = 0;
39952 PyObject *__pyx_r = 0;
39953 __Pyx_RefNannyDeclarations
39954 __Pyx_RefNannySetupContext("add (wrapper)", 0);
39955 #if !CYTHON_METH_FASTCALL
39956 #if CYTHON_ASSUME_SAFE_MACROS
39957 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
39958 #else
39959 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
39960 #endif
39961 #endif
39962 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
39963 {
39964 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
39965 if (__pyx_kwds) {
39966 Py_ssize_t kw_args;
39967 switch (__pyx_nargs) {
39968 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
39969 CYTHON_FALLTHROUGH;
39970 case 0: break;
39971 default: goto __pyx_L5_argtuple_error;
39972 }
39973 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
39974 switch (__pyx_nargs) {
39975 case 0:
39976 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
39977 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
39978 kw_args--;
39979 }
39980 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1942, __pyx_L3_error)
39981 else goto __pyx_L5_argtuple_error;
39982 }
39983 if (unlikely(kw_args > 0)) {
39984 const Py_ssize_t kwd_pos_args = __pyx_nargs;
39985 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add") < 0)) __PYX_ERR(0, 1942, __pyx_L3_error)
39986 }
39987 } else if (unlikely(__pyx_nargs != 1)) {
39988 goto __pyx_L5_argtuple_error;
39989 } else {
39990 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
39991 }
39992 __pyx_v_name = values[0];
39993 }
39994 goto __pyx_L6_skip;
39995 __pyx_L5_argtuple_error:;
39996 __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1942, __pyx_L3_error)
39997 __pyx_L6_skip:;
39998 goto __pyx_L4_argument_unpacking_done;
39999 __pyx_L3_error:;
40000 {
40001 Py_ssize_t __pyx_temp;
40002 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
40003 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
40004 }
40005 }
40006 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
40007 __Pyx_RefNannyFinishContext();
40008 return NULL;
40009 __pyx_L4_argument_unpacking_done:;
40010 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_13add(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self), __pyx_v_name);
40011
40012 /* function exit code */
40013 {
40014 Py_ssize_t __pyx_temp;
40015 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
40016 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
40017 }
40018 }
40019 __Pyx_RefNannyFinishContext();
40020 return __pyx_r;
40021 }
40022
40023 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_13add(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, PyObject *__pyx_v_name) {
40024 PyObject *__pyx_r = NULL;
40025 __Pyx_TraceDeclarations
40026 __Pyx_RefNannyDeclarations
40027 PyObject *__pyx_t_1 = NULL;
40028 PyObject *__pyx_t_2 = NULL;
40029 PyObject *__pyx_t_3 = NULL;
40030 unsigned int __pyx_t_4;
40031 int __pyx_lineno = 0;
40032 const char *__pyx_filename = NULL;
40033 int __pyx_clineno = 0;
40034 __Pyx_TraceFrameInit(__pyx_codeobj__92)
40035 __Pyx_RefNannySetupContext("add", 1);
40036 __Pyx_TraceCall("add", __pyx_f[0], 1942, 0, __PYX_ERR(0, 1942, __pyx_L1_error));
40037
40038 /* "pysam/libcbcf.pyx":1944
40039 * def add(self, name):
40040 * """Add a new sample"""
40041 * self.header.add_sample(name) # <<<<<<<<<<<<<<
40042 *
40043 *
40044 */
40045 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->header), __pyx_n_s_add_sample); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error)
40046 __Pyx_GOTREF(__pyx_t_2);
40047 __pyx_t_3 = NULL;
40048 __pyx_t_4 = 0;
40049 #if CYTHON_UNPACK_METHODS
40050 if (likely(PyMethod_Check(__pyx_t_2))) {
40051 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
40052 if (likely(__pyx_t_3)) {
40053 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
40054 __Pyx_INCREF(__pyx_t_3);
40055 __Pyx_INCREF(function);
40056 __Pyx_DECREF_SET(__pyx_t_2, function);
40057 __pyx_t_4 = 1;
40058 }
40059 }
40060 #endif
40061 {
40062 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_name};
40063 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
40064 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
40065 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
40066 __Pyx_GOTREF(__pyx_t_1);
40067 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40068 }
40069 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40070
40071 /* "pysam/libcbcf.pyx":1942
40072 * #TODO: implement __richcmp__
40073 *
40074 * def add(self, name): # <<<<<<<<<<<<<<
40075 * """Add a new sample"""
40076 * self.header.add_sample(name)
40077 */
40078
40079 /* function exit code */
40080 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
40081 goto __pyx_L0;
40082 __pyx_L1_error:;
40083 __Pyx_XDECREF(__pyx_t_1);
40084 __Pyx_XDECREF(__pyx_t_2);
40085 __Pyx_XDECREF(__pyx_t_3);
40086 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
40087 __pyx_r = NULL;
40088 __pyx_L0:;
40089 __Pyx_XGIVEREF(__pyx_r);
40090 __Pyx_TraceReturn(__pyx_r, 0);
40091 __Pyx_RefNannyFinishContext();
40092 return __pyx_r;
40093 }
40094
40095 /* "pysam/libcbcf.pxd":61
40096 *
40097 * cdef class VariantHeaderSamples(object):
40098 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
40099 *
40100 *
40101 */
40102
40103 /* Python wrapper */
40104 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
40105 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_6header_1__get__(PyObject *__pyx_v_self) {
40106 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
40107 PyObject *__pyx_r = 0;
40108 __Pyx_RefNannyDeclarations
40109 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
40110 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
40111 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self));
40112
40113 /* function exit code */
40114 __Pyx_RefNannyFinishContext();
40115 return __pyx_r;
40116 }
40117
40118 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self) {
40119 PyObject *__pyx_r = NULL;
40120 __Pyx_TraceDeclarations
40121 __Pyx_RefNannyDeclarations
40122 int __pyx_lineno = 0;
40123 const char *__pyx_filename = NULL;
40124 int __pyx_clineno = 0;
40125 __Pyx_RefNannySetupContext("__get__", 1);
40126 __Pyx_TraceCall("__get__", __pyx_f[3], 61, 0, __PYX_ERR(3, 61, __pyx_L1_error));
40127 __Pyx_XDECREF(__pyx_r);
40128 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
40129 __pyx_r = ((PyObject *)__pyx_v_self->header);
40130 goto __pyx_L0;
40131
40132 /* function exit code */
40133 __pyx_L1_error:;
40134 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40135 __pyx_r = NULL;
40136 __pyx_L0:;
40137 __Pyx_XGIVEREF(__pyx_r);
40138 __Pyx_TraceReturn(__pyx_r, 0);
40139 __Pyx_RefNannyFinishContext();
40140 return __pyx_r;
40141 }
40142
40143 /* "(tree fragment)":1
40144 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
40145 * cdef tuple state
40146 * cdef object _dict
40147 */
40148
40149 /* Python wrapper */
40150 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_16__reduce_cython__(PyObject *__pyx_v_self,
40151 #if CYTHON_METH_FASTCALL
40152 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
40153 #else
40154 PyObject *__pyx_args, PyObject *__pyx_kwds
40155 #endif
40156 ); /*proto*/
40157 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_15__reduce_cython__, "VariantHeaderSamples.__reduce_cython__(self)");
40158 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderSamples_16__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_16__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_15__reduce_cython__};
40159 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_16__reduce_cython__(PyObject *__pyx_v_self,
40160 #if CYTHON_METH_FASTCALL
40161 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
40162 #else
40163 PyObject *__pyx_args, PyObject *__pyx_kwds
40164 #endif
40165 ) {
40166 #if !CYTHON_METH_FASTCALL
40167 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
40168 #endif
40169 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
40170 PyObject *__pyx_r = 0;
40171 __Pyx_RefNannyDeclarations
40172 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
40173 #if !CYTHON_METH_FASTCALL
40174 #if CYTHON_ASSUME_SAFE_MACROS
40175 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
40176 #else
40177 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
40178 #endif
40179 #endif
40180 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
40181 if (unlikely(__pyx_nargs > 0)) {
40182 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
40183 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
40184 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_15__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self));
40185
40186 /* function exit code */
40187 __Pyx_RefNannyFinishContext();
40188 return __pyx_r;
40189 }
40190
40191 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_15__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self) {
40192 PyObject *__pyx_v_state = 0;
40193 PyObject *__pyx_v__dict = 0;
40194 int __pyx_v_use_setstate;
40195 PyObject *__pyx_r = NULL;
40196 __Pyx_TraceDeclarations
40197 __Pyx_RefNannyDeclarations
40198 PyObject *__pyx_t_1 = NULL;
40199 int __pyx_t_2;
40200 PyObject *__pyx_t_3 = NULL;
40201 PyObject *__pyx_t_4 = NULL;
40202 int __pyx_lineno = 0;
40203 const char *__pyx_filename = NULL;
40204 int __pyx_clineno = 0;
40205 __Pyx_TraceFrameInit(__pyx_codeobj__93)
40206 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
40207 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
40208
40209 /* "(tree fragment)":5
40210 * cdef object _dict
40211 * cdef bint use_setstate
40212 * state = (self.header,) # <<<<<<<<<<<<<<
40213 * _dict = getattr(self, '__dict__', None)
40214 * if _dict is not None:
40215 */
40216 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
40217 __Pyx_GOTREF(__pyx_t_1);
40218 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
40219 __Pyx_GIVEREF((PyObject *)__pyx_v_self->header);
40220 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->header))) __PYX_ERR(4, 5, __pyx_L1_error);
40221 __pyx_v_state = ((PyObject*)__pyx_t_1);
40222 __pyx_t_1 = 0;
40223
40224 /* "(tree fragment)":6
40225 * cdef bint use_setstate
40226 * state = (self.header,)
40227 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
40228 * if _dict is not None:
40229 * state += (_dict,)
40230 */
40231 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
40232 __Pyx_GOTREF(__pyx_t_1);
40233 __pyx_v__dict = __pyx_t_1;
40234 __pyx_t_1 = 0;
40235
40236 /* "(tree fragment)":7
40237 * state = (self.header,)
40238 * _dict = getattr(self, '__dict__', None)
40239 * if _dict is not None: # <<<<<<<<<<<<<<
40240 * state += (_dict,)
40241 * use_setstate = True
40242 */
40243 __pyx_t_2 = (__pyx_v__dict != Py_None);
40244 if (__pyx_t_2) {
40245
40246 /* "(tree fragment)":8
40247 * _dict = getattr(self, '__dict__', None)
40248 * if _dict is not None:
40249 * state += (_dict,) # <<<<<<<<<<<<<<
40250 * use_setstate = True
40251 * else:
40252 */
40253 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
40254 __Pyx_GOTREF(__pyx_t_1);
40255 __Pyx_INCREF(__pyx_v__dict);
40256 __Pyx_GIVEREF(__pyx_v__dict);
40257 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
40258 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
40259 __Pyx_GOTREF(__pyx_t_3);
40260 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40261 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
40262 __pyx_t_3 = 0;
40263
40264 /* "(tree fragment)":9
40265 * if _dict is not None:
40266 * state += (_dict,)
40267 * use_setstate = True # <<<<<<<<<<<<<<
40268 * else:
40269 * use_setstate = self.header is not None
40270 */
40271 __pyx_v_use_setstate = 1;
40272
40273 /* "(tree fragment)":7
40274 * state = (self.header,)
40275 * _dict = getattr(self, '__dict__', None)
40276 * if _dict is not None: # <<<<<<<<<<<<<<
40277 * state += (_dict,)
40278 * use_setstate = True
40279 */
40280 goto __pyx_L3;
40281 }
40282
40283 /* "(tree fragment)":11
40284 * use_setstate = True
40285 * else:
40286 * use_setstate = self.header is not None # <<<<<<<<<<<<<<
40287 * if use_setstate:
40288 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, None), state
40289 */
40290 /*else*/ {
40291 __pyx_t_2 = (((PyObject *)__pyx_v_self->header) != Py_None);
40292 __pyx_v_use_setstate = __pyx_t_2;
40293 }
40294 __pyx_L3:;
40295
40296 /* "(tree fragment)":12
40297 * else:
40298 * use_setstate = self.header is not None
40299 * if use_setstate: # <<<<<<<<<<<<<<
40300 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, None), state
40301 * else:
40302 */
40303 if (__pyx_v_use_setstate) {
40304
40305 /* "(tree fragment)":13
40306 * use_setstate = self.header is not None
40307 * if use_setstate:
40308 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, None), state # <<<<<<<<<<<<<<
40309 * else:
40310 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, state)
40311 */
40312 __Pyx_XDECREF(__pyx_r);
40313 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_VariantHeaderSamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
40314 __Pyx_GOTREF(__pyx_t_3);
40315 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
40316 __Pyx_GOTREF(__pyx_t_1);
40317 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
40318 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
40319 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
40320 __Pyx_INCREF(__pyx_int_31479882);
40321 __Pyx_GIVEREF(__pyx_int_31479882);
40322 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_31479882)) __PYX_ERR(4, 13, __pyx_L1_error);
40323 __Pyx_INCREF(Py_None);
40324 __Pyx_GIVEREF(Py_None);
40325 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
40326 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
40327 __Pyx_GOTREF(__pyx_t_4);
40328 __Pyx_GIVEREF(__pyx_t_3);
40329 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
40330 __Pyx_GIVEREF(__pyx_t_1);
40331 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
40332 __Pyx_INCREF(__pyx_v_state);
40333 __Pyx_GIVEREF(__pyx_v_state);
40334 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
40335 __pyx_t_3 = 0;
40336 __pyx_t_1 = 0;
40337 __pyx_r = __pyx_t_4;
40338 __pyx_t_4 = 0;
40339 goto __pyx_L0;
40340
40341 /* "(tree fragment)":12
40342 * else:
40343 * use_setstate = self.header is not None
40344 * if use_setstate: # <<<<<<<<<<<<<<
40345 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, None), state
40346 * else:
40347 */
40348 }
40349
40350 /* "(tree fragment)":15
40351 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, None), state
40352 * else:
40353 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, state) # <<<<<<<<<<<<<<
40354 * def __setstate_cython__(self, __pyx_state):
40355 * __pyx_unpickle_VariantHeaderSamples__set_state(self, __pyx_state)
40356 */
40357 /*else*/ {
40358 __Pyx_XDECREF(__pyx_r);
40359 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantHeaderSamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
40360 __Pyx_GOTREF(__pyx_t_4);
40361 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
40362 __Pyx_GOTREF(__pyx_t_1);
40363 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
40364 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
40365 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
40366 __Pyx_INCREF(__pyx_int_31479882);
40367 __Pyx_GIVEREF(__pyx_int_31479882);
40368 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_31479882)) __PYX_ERR(4, 15, __pyx_L1_error);
40369 __Pyx_INCREF(__pyx_v_state);
40370 __Pyx_GIVEREF(__pyx_v_state);
40371 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
40372 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
40373 __Pyx_GOTREF(__pyx_t_3);
40374 __Pyx_GIVEREF(__pyx_t_4);
40375 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
40376 __Pyx_GIVEREF(__pyx_t_1);
40377 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
40378 __pyx_t_4 = 0;
40379 __pyx_t_1 = 0;
40380 __pyx_r = __pyx_t_3;
40381 __pyx_t_3 = 0;
40382 goto __pyx_L0;
40383 }
40384
40385 /* "(tree fragment)":1
40386 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
40387 * cdef tuple state
40388 * cdef object _dict
40389 */
40390
40391 /* function exit code */
40392 __pyx_L1_error:;
40393 __Pyx_XDECREF(__pyx_t_1);
40394 __Pyx_XDECREF(__pyx_t_3);
40395 __Pyx_XDECREF(__pyx_t_4);
40396 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40397 __pyx_r = NULL;
40398 __pyx_L0:;
40399 __Pyx_XDECREF(__pyx_v_state);
40400 __Pyx_XDECREF(__pyx_v__dict);
40401 __Pyx_XGIVEREF(__pyx_r);
40402 __Pyx_TraceReturn(__pyx_r, 0);
40403 __Pyx_RefNannyFinishContext();
40404 return __pyx_r;
40405 }
40406
40407 /* "(tree fragment)":16
40408 * else:
40409 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, state)
40410 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
40411 * __pyx_unpickle_VariantHeaderSamples__set_state(self, __pyx_state)
40412 */
40413
40414 /* Python wrapper */
40415 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_18__setstate_cython__(PyObject *__pyx_v_self,
40416 #if CYTHON_METH_FASTCALL
40417 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
40418 #else
40419 PyObject *__pyx_args, PyObject *__pyx_kwds
40420 #endif
40421 ); /*proto*/
40422 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_17__setstate_cython__, "VariantHeaderSamples.__setstate_cython__(self, __pyx_state)");
40423 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantHeaderSamples_18__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_18__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_17__setstate_cython__};
40424 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_18__setstate_cython__(PyObject *__pyx_v_self,
40425 #if CYTHON_METH_FASTCALL
40426 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
40427 #else
40428 PyObject *__pyx_args, PyObject *__pyx_kwds
40429 #endif
40430 ) {
40431 PyObject *__pyx_v___pyx_state = 0;
40432 #if !CYTHON_METH_FASTCALL
40433 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
40434 #endif
40435 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
40436 PyObject* values[1] = {0};
40437 int __pyx_lineno = 0;
40438 const char *__pyx_filename = NULL;
40439 int __pyx_clineno = 0;
40440 PyObject *__pyx_r = 0;
40441 __Pyx_RefNannyDeclarations
40442 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
40443 #if !CYTHON_METH_FASTCALL
40444 #if CYTHON_ASSUME_SAFE_MACROS
40445 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
40446 #else
40447 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
40448 #endif
40449 #endif
40450 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
40451 {
40452 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
40453 if (__pyx_kwds) {
40454 Py_ssize_t kw_args;
40455 switch (__pyx_nargs) {
40456 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
40457 CYTHON_FALLTHROUGH;
40458 case 0: break;
40459 default: goto __pyx_L5_argtuple_error;
40460 }
40461 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
40462 switch (__pyx_nargs) {
40463 case 0:
40464 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
40465 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
40466 kw_args--;
40467 }
40468 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
40469 else goto __pyx_L5_argtuple_error;
40470 }
40471 if (unlikely(kw_args > 0)) {
40472 const Py_ssize_t kwd_pos_args = __pyx_nargs;
40473 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
40474 }
40475 } else if (unlikely(__pyx_nargs != 1)) {
40476 goto __pyx_L5_argtuple_error;
40477 } else {
40478 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
40479 }
40480 __pyx_v___pyx_state = values[0];
40481 }
40482 goto __pyx_L6_skip;
40483 __pyx_L5_argtuple_error:;
40484 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
40485 __pyx_L6_skip:;
40486 goto __pyx_L4_argument_unpacking_done;
40487 __pyx_L3_error:;
40488 {
40489 Py_ssize_t __pyx_temp;
40490 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
40491 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
40492 }
40493 }
40494 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40495 __Pyx_RefNannyFinishContext();
40496 return NULL;
40497 __pyx_L4_argument_unpacking_done:;
40498 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_17__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v_self), __pyx_v___pyx_state);
40499
40500 /* function exit code */
40501 {
40502 Py_ssize_t __pyx_temp;
40503 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
40504 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
40505 }
40506 }
40507 __Pyx_RefNannyFinishContext();
40508 return __pyx_r;
40509 }
40510
40511 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantHeaderSamples_17__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
40512 PyObject *__pyx_r = NULL;
40513 __Pyx_TraceDeclarations
40514 __Pyx_RefNannyDeclarations
40515 PyObject *__pyx_t_1 = NULL;
40516 int __pyx_lineno = 0;
40517 const char *__pyx_filename = NULL;
40518 int __pyx_clineno = 0;
40519 __Pyx_TraceFrameInit(__pyx_codeobj__94)
40520 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
40521 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
40522
40523 /* "(tree fragment)":17
40524 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, state)
40525 * def __setstate_cython__(self, __pyx_state):
40526 * __pyx_unpickle_VariantHeaderSamples__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
40527 */
40528 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
40529 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderSamples__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
40530 __Pyx_GOTREF(__pyx_t_1);
40531 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40532
40533 /* "(tree fragment)":16
40534 * else:
40535 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, state)
40536 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
40537 * __pyx_unpickle_VariantHeaderSamples__set_state(self, __pyx_state)
40538 */
40539
40540 /* function exit code */
40541 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
40542 goto __pyx_L0;
40543 __pyx_L1_error:;
40544 __Pyx_XDECREF(__pyx_t_1);
40545 __Pyx_AddTraceback("pysam.libcbcf.VariantHeaderSamples.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40546 __pyx_r = NULL;
40547 __pyx_L0:;
40548 __Pyx_XGIVEREF(__pyx_r);
40549 __Pyx_TraceReturn(__pyx_r, 0);
40550 __Pyx_RefNannyFinishContext();
40551 return __pyx_r;
40552 }
40553
40554 /* "pysam/libcbcf.pyx":1947
40555 *
40556 *
40557 * cdef VariantHeaderSamples makeVariantHeaderSamples(VariantHeader header): # <<<<<<<<<<<<<<
40558 * if not header:
40559 * raise ValueError('invalid VariantHeader')
40560 */
40561
40562 static struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_f_5pysam_7libcbcf_makeVariantHeaderSamples(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header) {
40563 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v_samples = 0;
40564 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_r = NULL;
40565 __Pyx_TraceDeclarations
40566 __Pyx_RefNannyDeclarations
40567 int __pyx_t_1;
40568 int __pyx_t_2;
40569 PyObject *__pyx_t_3 = NULL;
40570 int __pyx_lineno = 0;
40571 const char *__pyx_filename = NULL;
40572 int __pyx_clineno = 0;
40573 __Pyx_RefNannySetupContext("makeVariantHeaderSamples", 1);
40574 __Pyx_TraceCall("makeVariantHeaderSamples", __pyx_f[0], 1947, 0, __PYX_ERR(0, 1947, __pyx_L1_error));
40575
40576 /* "pysam/libcbcf.pyx":1948
40577 *
40578 * cdef VariantHeaderSamples makeVariantHeaderSamples(VariantHeader header):
40579 * if not header: # <<<<<<<<<<<<<<
40580 * raise ValueError('invalid VariantHeader')
40581 *
40582 */
40583 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1948, __pyx_L1_error)
40584 __pyx_t_2 = (!__pyx_t_1);
40585 if (unlikely(__pyx_t_2)) {
40586
40587 /* "pysam/libcbcf.pyx":1949
40588 * cdef VariantHeaderSamples makeVariantHeaderSamples(VariantHeader header):
40589 * if not header:
40590 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
40591 *
40592 * cdef VariantHeaderSamples samples = VariantHeaderSamples.__new__(VariantHeaderSamples)
40593 */
40594 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L1_error)
40595 __Pyx_GOTREF(__pyx_t_3);
40596 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
40597 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40598 __PYX_ERR(0, 1949, __pyx_L1_error)
40599
40600 /* "pysam/libcbcf.pyx":1948
40601 *
40602 * cdef VariantHeaderSamples makeVariantHeaderSamples(VariantHeader header):
40603 * if not header: # <<<<<<<<<<<<<<
40604 * raise ValueError('invalid VariantHeader')
40605 *
40606 */
40607 }
40608
40609 /* "pysam/libcbcf.pyx":1951
40610 * raise ValueError('invalid VariantHeader')
40611 *
40612 * cdef VariantHeaderSamples samples = VariantHeaderSamples.__new__(VariantHeaderSamples) # <<<<<<<<<<<<<<
40613 * samples.header = header
40614 *
40615 */
40616 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderSamples(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error)
40617 __Pyx_GOTREF((PyObject *)__pyx_t_3);
40618 __pyx_v_samples = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_t_3);
40619 __pyx_t_3 = 0;
40620
40621 /* "pysam/libcbcf.pyx":1952
40622 *
40623 * cdef VariantHeaderSamples samples = VariantHeaderSamples.__new__(VariantHeaderSamples)
40624 * samples.header = header # <<<<<<<<<<<<<<
40625 *
40626 * return samples
40627 */
40628 __Pyx_INCREF((PyObject *)__pyx_v_header);
40629 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
40630 __Pyx_GOTREF((PyObject *)__pyx_v_samples->header);
40631 __Pyx_DECREF((PyObject *)__pyx_v_samples->header);
40632 __pyx_v_samples->header = __pyx_v_header;
40633
40634 /* "pysam/libcbcf.pyx":1954
40635 * samples.header = header
40636 *
40637 * return samples # <<<<<<<<<<<<<<
40638 *
40639 *
40640 */
40641 __Pyx_XDECREF((PyObject *)__pyx_r);
40642 __Pyx_INCREF((PyObject *)__pyx_v_samples);
40643 __pyx_r = __pyx_v_samples;
40644 goto __pyx_L0;
40645
40646 /* "pysam/libcbcf.pyx":1947
40647 *
40648 *
40649 * cdef VariantHeaderSamples makeVariantHeaderSamples(VariantHeader header): # <<<<<<<<<<<<<<
40650 * if not header:
40651 * raise ValueError('invalid VariantHeader')
40652 */
40653
40654 /* function exit code */
40655 __pyx_L1_error:;
40656 __Pyx_XDECREF(__pyx_t_3);
40657 __Pyx_AddTraceback("pysam.libcbcf.makeVariantHeaderSamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
40658 __pyx_r = 0;
40659 __pyx_L0:;
40660 __Pyx_XDECREF((PyObject *)__pyx_v_samples);
40661 __Pyx_XGIVEREF((PyObject *)__pyx_r);
40662 __Pyx_TraceReturn(__pyx_r, 0);
40663 __Pyx_RefNannyFinishContext();
40664 return __pyx_r;
40665 }
40666
40667 /* "pysam/libcbcf.pyx":1964
40668 *
40669 * # See makeVariantHeader for C constructor
40670 * def __cinit__(self): # <<<<<<<<<<<<<<
40671 * self.ptr = NULL
40672 *
40673 */
40674
40675 /* Python wrapper */
40676 static int __pyx_pw_5pysam_7libcbcf_13VariantHeader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
40677 static int __pyx_pw_5pysam_7libcbcf_13VariantHeader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
40678 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
40679 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
40680 int __pyx_r;
40681 __Pyx_RefNannyDeclarations
40682 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
40683 #if CYTHON_ASSUME_SAFE_MACROS
40684 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
40685 #else
40686 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
40687 #endif
40688 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
40689 if (unlikely(__pyx_nargs > 0)) {
40690 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;}
40691 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
40692 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader___cinit__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
40693
40694 /* function exit code */
40695 __Pyx_RefNannyFinishContext();
40696 return __pyx_r;
40697 }
40698
40699 static int __pyx_pf_5pysam_7libcbcf_13VariantHeader___cinit__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
40700 int __pyx_r;
40701 __Pyx_TraceDeclarations
40702 int __pyx_lineno = 0;
40703 const char *__pyx_filename = NULL;
40704 int __pyx_clineno = 0;
40705 __Pyx_TraceCall("__cinit__", __pyx_f[0], 1964, 0, __PYX_ERR(0, 1964, __pyx_L1_error));
40706
40707 /* "pysam/libcbcf.pyx":1965
40708 * # See makeVariantHeader for C constructor
40709 * def __cinit__(self):
40710 * self.ptr = NULL # <<<<<<<<<<<<<<
40711 *
40712 * # Python constructor
40713 */
40714 __pyx_v_self->ptr = NULL;
40715
40716 /* "pysam/libcbcf.pyx":1964
40717 *
40718 * # See makeVariantHeader for C constructor
40719 * def __cinit__(self): # <<<<<<<<<<<<<<
40720 * self.ptr = NULL
40721 *
40722 */
40723
40724 /* function exit code */
40725 __pyx_r = 0;
40726 goto __pyx_L0;
40727 __pyx_L1_error:;
40728 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40729 __pyx_r = -1;
40730 __pyx_L0:;
40731 __Pyx_TraceReturn(Py_None, 0);
40732 return __pyx_r;
40733 }
40734
40735 /* "pysam/libcbcf.pyx":1968
40736 *
40737 * # Python constructor
40738 * def __init__(self): # <<<<<<<<<<<<<<
40739 * self.ptr = bcf_hdr_init(b'w')
40740 * if not self.ptr:
40741 */
40742
40743 /* Python wrapper */
40744 static int __pyx_pw_5pysam_7libcbcf_13VariantHeader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
40745 static int __pyx_pw_5pysam_7libcbcf_13VariantHeader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
40746 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
40747 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
40748 int __pyx_r;
40749 __Pyx_RefNannyDeclarations
40750 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
40751 #if CYTHON_ASSUME_SAFE_MACROS
40752 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
40753 #else
40754 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
40755 #endif
40756 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
40757 if (unlikely(__pyx_nargs > 0)) {
40758 __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
40759 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
40760 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_2__init__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
40761
40762 /* function exit code */
40763 __Pyx_RefNannyFinishContext();
40764 return __pyx_r;
40765 }
40766
40767 static int __pyx_pf_5pysam_7libcbcf_13VariantHeader_2__init__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
40768 int __pyx_r;
40769 __Pyx_TraceDeclarations
40770 __Pyx_RefNannyDeclarations
40771 int __pyx_t_1;
40772 PyObject *__pyx_t_2 = NULL;
40773 int __pyx_lineno = 0;
40774 const char *__pyx_filename = NULL;
40775 int __pyx_clineno = 0;
40776 __Pyx_RefNannySetupContext("__init__", 1);
40777 __Pyx_TraceCall("__init__", __pyx_f[0], 1968, 0, __PYX_ERR(0, 1968, __pyx_L1_error));
40778
40779 /* "pysam/libcbcf.pyx":1969
40780 * # Python constructor
40781 * def __init__(self):
40782 * self.ptr = bcf_hdr_init(b'w') # <<<<<<<<<<<<<<
40783 * if not self.ptr:
40784 * raise ValueError('cannot create VariantHeader')
40785 */
40786 __pyx_v_self->ptr = bcf_hdr_init(((char const *)"w"));
40787
40788 /* "pysam/libcbcf.pyx":1970
40789 * def __init__(self):
40790 * self.ptr = bcf_hdr_init(b'w')
40791 * if not self.ptr: # <<<<<<<<<<<<<<
40792 * raise ValueError('cannot create VariantHeader')
40793 *
40794 */
40795 __pyx_t_1 = (!(__pyx_v_self->ptr != 0));
40796 if (unlikely(__pyx_t_1)) {
40797
40798 /* "pysam/libcbcf.pyx":1971
40799 * self.ptr = bcf_hdr_init(b'w')
40800 * if not self.ptr:
40801 * raise ValueError('cannot create VariantHeader') # <<<<<<<<<<<<<<
40802 *
40803 * def __dealloc__(self):
40804 */
40805 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
40806 __Pyx_GOTREF(__pyx_t_2);
40807 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
40808 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40809 __PYX_ERR(0, 1971, __pyx_L1_error)
40810
40811 /* "pysam/libcbcf.pyx":1970
40812 * def __init__(self):
40813 * self.ptr = bcf_hdr_init(b'w')
40814 * if not self.ptr: # <<<<<<<<<<<<<<
40815 * raise ValueError('cannot create VariantHeader')
40816 *
40817 */
40818 }
40819
40820 /* "pysam/libcbcf.pyx":1968
40821 *
40822 * # Python constructor
40823 * def __init__(self): # <<<<<<<<<<<<<<
40824 * self.ptr = bcf_hdr_init(b'w')
40825 * if not self.ptr:
40826 */
40827
40828 /* function exit code */
40829 __pyx_r = 0;
40830 goto __pyx_L0;
40831 __pyx_L1_error:;
40832 __Pyx_XDECREF(__pyx_t_2);
40833 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40834 __pyx_r = -1;
40835 __pyx_L0:;
40836 __Pyx_TraceReturn(Py_None, 0);
40837 __Pyx_RefNannyFinishContext();
40838 return __pyx_r;
40839 }
40840
40841 /* "pysam/libcbcf.pyx":1973
40842 * raise ValueError('cannot create VariantHeader')
40843 *
40844 * def __dealloc__(self): # <<<<<<<<<<<<<<
40845 * if self.ptr:
40846 * bcf_hdr_destroy(self.ptr)
40847 */
40848
40849 /* Python wrapper */
40850 static void __pyx_pw_5pysam_7libcbcf_13VariantHeader_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
40851 static void __pyx_pw_5pysam_7libcbcf_13VariantHeader_5__dealloc__(PyObject *__pyx_v_self) {
40852 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
40853 __Pyx_RefNannyDeclarations
40854 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
40855 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
40856 __pyx_pf_5pysam_7libcbcf_13VariantHeader_4__dealloc__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
40857
40858 /* function exit code */
40859 __Pyx_RefNannyFinishContext();
40860 }
40861
40862 static void __pyx_pf_5pysam_7libcbcf_13VariantHeader_4__dealloc__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
40863 __Pyx_TraceDeclarations
40864 int __pyx_t_1;
40865 int __pyx_lineno = 0;
40866 const char *__pyx_filename = NULL;
40867 int __pyx_clineno = 0;
40868 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1973, 0, __PYX_ERR(0, 1973, __pyx_L1_error));
40869
40870 /* "pysam/libcbcf.pyx":1974
40871 *
40872 * def __dealloc__(self):
40873 * if self.ptr: # <<<<<<<<<<<<<<
40874 * bcf_hdr_destroy(self.ptr)
40875 * self.ptr = NULL
40876 */
40877 __pyx_t_1 = (__pyx_v_self->ptr != 0);
40878 if (__pyx_t_1) {
40879
40880 /* "pysam/libcbcf.pyx":1975
40881 * def __dealloc__(self):
40882 * if self.ptr:
40883 * bcf_hdr_destroy(self.ptr) # <<<<<<<<<<<<<<
40884 * self.ptr = NULL
40885 *
40886 */
40887 bcf_hdr_destroy(__pyx_v_self->ptr);
40888
40889 /* "pysam/libcbcf.pyx":1976
40890 * if self.ptr:
40891 * bcf_hdr_destroy(self.ptr)
40892 * self.ptr = NULL # <<<<<<<<<<<<<<
40893 *
40894 * def __bool__(self):
40895 */
40896 __pyx_v_self->ptr = NULL;
40897
40898 /* "pysam/libcbcf.pyx":1974
40899 *
40900 * def __dealloc__(self):
40901 * if self.ptr: # <<<<<<<<<<<<<<
40902 * bcf_hdr_destroy(self.ptr)
40903 * self.ptr = NULL
40904 */
40905 }
40906
40907 /* "pysam/libcbcf.pyx":1973
40908 * raise ValueError('cannot create VariantHeader')
40909 *
40910 * def __dealloc__(self): # <<<<<<<<<<<<<<
40911 * if self.ptr:
40912 * bcf_hdr_destroy(self.ptr)
40913 */
40914
40915 /* function exit code */
40916 goto __pyx_L0;
40917 __pyx_L1_error:;
40918 __Pyx_WriteUnraisable("pysam.libcbcf.VariantHeader.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
40919 __pyx_L0:;
40920 __Pyx_TraceReturn(Py_None, 0);
40921 }
40922
40923 /* "pysam/libcbcf.pyx":1978
40924 * self.ptr = NULL
40925 *
40926 * def __bool__(self): # <<<<<<<<<<<<<<
40927 * return self.ptr != NULL
40928 *
40929 */
40930
40931 /* Python wrapper */
40932 static int __pyx_pw_5pysam_7libcbcf_13VariantHeader_7__bool__(PyObject *__pyx_v_self); /*proto*/
40933 static int __pyx_pw_5pysam_7libcbcf_13VariantHeader_7__bool__(PyObject *__pyx_v_self) {
40934 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
40935 int __pyx_r;
40936 __Pyx_RefNannyDeclarations
40937 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
40938 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
40939 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_6__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
40940
40941 /* function exit code */
40942 __Pyx_RefNannyFinishContext();
40943 return __pyx_r;
40944 }
40945
40946 static int __pyx_pf_5pysam_7libcbcf_13VariantHeader_6__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
40947 int __pyx_r;
40948 __Pyx_TraceDeclarations
40949 int __pyx_lineno = 0;
40950 const char *__pyx_filename = NULL;
40951 int __pyx_clineno = 0;
40952 __Pyx_TraceCall("__bool__", __pyx_f[0], 1978, 0, __PYX_ERR(0, 1978, __pyx_L1_error));
40953
40954 /* "pysam/libcbcf.pyx":1979
40955 *
40956 * def __bool__(self):
40957 * return self.ptr != NULL # <<<<<<<<<<<<<<
40958 *
40959 * def copy(self):
40960 */
40961 __pyx_r = (__pyx_v_self->ptr != NULL);
40962 goto __pyx_L0;
40963
40964 /* "pysam/libcbcf.pyx":1978
40965 * self.ptr = NULL
40966 *
40967 * def __bool__(self): # <<<<<<<<<<<<<<
40968 * return self.ptr != NULL
40969 *
40970 */
40971
40972 /* function exit code */
40973 __pyx_L1_error:;
40974 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40975 __pyx_r = -1;
40976 __pyx_L0:;
40977 __Pyx_TraceReturn(Py_None, 0);
40978 return __pyx_r;
40979 }
40980
40981 /* "pysam/libcbcf.pyx":1981
40982 * return self.ptr != NULL
40983 *
40984 * def copy(self): # <<<<<<<<<<<<<<
40985 * return makeVariantHeader(bcf_hdr_dup(self.ptr))
40986 *
40987 */
40988
40989 /* Python wrapper */
40990 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_9copy(PyObject *__pyx_v_self,
40991 #if CYTHON_METH_FASTCALL
40992 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
40993 #else
40994 PyObject *__pyx_args, PyObject *__pyx_kwds
40995 #endif
40996 ); /*proto*/
40997 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_8copy, "VariantHeader.copy(self)");
40998 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_9copy = {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_9copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_8copy};
40999 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_9copy(PyObject *__pyx_v_self,
41000 #if CYTHON_METH_FASTCALL
41001 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
41002 #else
41003 PyObject *__pyx_args, PyObject *__pyx_kwds
41004 #endif
41005 ) {
41006 #if !CYTHON_METH_FASTCALL
41007 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
41008 #endif
41009 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41010 PyObject *__pyx_r = 0;
41011 __Pyx_RefNannyDeclarations
41012 __Pyx_RefNannySetupContext("copy (wrapper)", 0);
41013 #if !CYTHON_METH_FASTCALL
41014 #if CYTHON_ASSUME_SAFE_MACROS
41015 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
41016 #else
41017 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
41018 #endif
41019 #endif
41020 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
41021 if (unlikely(__pyx_nargs > 0)) {
41022 __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
41023 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
41024 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_8copy(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41025
41026 /* function exit code */
41027 __Pyx_RefNannyFinishContext();
41028 return __pyx_r;
41029 }
41030
41031 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_8copy(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41032 PyObject *__pyx_r = NULL;
41033 __Pyx_TraceDeclarations
41034 __Pyx_RefNannyDeclarations
41035 PyObject *__pyx_t_1 = NULL;
41036 int __pyx_lineno = 0;
41037 const char *__pyx_filename = NULL;
41038 int __pyx_clineno = 0;
41039 __Pyx_TraceFrameInit(__pyx_codeobj__96)
41040 __Pyx_RefNannySetupContext("copy", 1);
41041 __Pyx_TraceCall("copy", __pyx_f[0], 1981, 0, __PYX_ERR(0, 1981, __pyx_L1_error));
41042
41043 /* "pysam/libcbcf.pyx":1982
41044 *
41045 * def copy(self):
41046 * return makeVariantHeader(bcf_hdr_dup(self.ptr)) # <<<<<<<<<<<<<<
41047 *
41048 * def merge(self, VariantHeader header):
41049 */
41050 __Pyx_XDECREF(__pyx_r);
41051 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeader(bcf_hdr_dup(__pyx_v_self->ptr))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1982, __pyx_L1_error)
41052 __Pyx_GOTREF(__pyx_t_1);
41053 __pyx_r = __pyx_t_1;
41054 __pyx_t_1 = 0;
41055 goto __pyx_L0;
41056
41057 /* "pysam/libcbcf.pyx":1981
41058 * return self.ptr != NULL
41059 *
41060 * def copy(self): # <<<<<<<<<<<<<<
41061 * return makeVariantHeader(bcf_hdr_dup(self.ptr))
41062 *
41063 */
41064
41065 /* function exit code */
41066 __pyx_L1_error:;
41067 __Pyx_XDECREF(__pyx_t_1);
41068 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
41069 __pyx_r = NULL;
41070 __pyx_L0:;
41071 __Pyx_XGIVEREF(__pyx_r);
41072 __Pyx_TraceReturn(__pyx_r, 0);
41073 __Pyx_RefNannyFinishContext();
41074 return __pyx_r;
41075 }
41076
41077 /* "pysam/libcbcf.pyx":1984
41078 * return makeVariantHeader(bcf_hdr_dup(self.ptr))
41079 *
41080 * def merge(self, VariantHeader header): # <<<<<<<<<<<<<<
41081 * if header is None:
41082 * raise ValueError('header must not be None')
41083 */
41084
41085 /* Python wrapper */
41086 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_11merge(PyObject *__pyx_v_self,
41087 #if CYTHON_METH_FASTCALL
41088 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
41089 #else
41090 PyObject *__pyx_args, PyObject *__pyx_kwds
41091 #endif
41092 ); /*proto*/
41093 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_10merge, "VariantHeader.merge(self, VariantHeader header)");
41094 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_11merge = {"merge", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_11merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_10merge};
41095 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_11merge(PyObject *__pyx_v_self,
41096 #if CYTHON_METH_FASTCALL
41097 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
41098 #else
41099 PyObject *__pyx_args, PyObject *__pyx_kwds
41100 #endif
41101 ) {
41102 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header = 0;
41103 #if !CYTHON_METH_FASTCALL
41104 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
41105 #endif
41106 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41107 PyObject* values[1] = {0};
41108 int __pyx_lineno = 0;
41109 const char *__pyx_filename = NULL;
41110 int __pyx_clineno = 0;
41111 PyObject *__pyx_r = 0;
41112 __Pyx_RefNannyDeclarations
41113 __Pyx_RefNannySetupContext("merge (wrapper)", 0);
41114 #if !CYTHON_METH_FASTCALL
41115 #if CYTHON_ASSUME_SAFE_MACROS
41116 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
41117 #else
41118 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
41119 #endif
41120 #endif
41121 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
41122 {
41123 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_header,0};
41124 if (__pyx_kwds) {
41125 Py_ssize_t kw_args;
41126 switch (__pyx_nargs) {
41127 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
41128 CYTHON_FALLTHROUGH;
41129 case 0: break;
41130 default: goto __pyx_L5_argtuple_error;
41131 }
41132 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
41133 switch (__pyx_nargs) {
41134 case 0:
41135 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header)) != 0)) {
41136 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
41137 kw_args--;
41138 }
41139 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1984, __pyx_L3_error)
41140 else goto __pyx_L5_argtuple_error;
41141 }
41142 if (unlikely(kw_args > 0)) {
41143 const Py_ssize_t kwd_pos_args = __pyx_nargs;
41144 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "merge") < 0)) __PYX_ERR(0, 1984, __pyx_L3_error)
41145 }
41146 } else if (unlikely(__pyx_nargs != 1)) {
41147 goto __pyx_L5_argtuple_error;
41148 } else {
41149 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
41150 }
41151 __pyx_v_header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)values[0]);
41152 }
41153 goto __pyx_L6_skip;
41154 __pyx_L5_argtuple_error:;
41155 __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1984, __pyx_L3_error)
41156 __pyx_L6_skip:;
41157 goto __pyx_L4_argument_unpacking_done;
41158 __pyx_L3_error:;
41159 {
41160 Py_ssize_t __pyx_temp;
41161 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
41162 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
41163 }
41164 }
41165 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.merge", __pyx_clineno, __pyx_lineno, __pyx_filename);
41166 __Pyx_RefNannyFinishContext();
41167 return NULL;
41168 __pyx_L4_argument_unpacking_done:;
41169 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_header), __pyx_ptype_5pysam_7libcbcf_VariantHeader, 1, "header", 0))) __PYX_ERR(0, 1984, __pyx_L1_error)
41170 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_10merge(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self), __pyx_v_header);
41171
41172 /* function exit code */
41173 goto __pyx_L0;
41174 __pyx_L1_error:;
41175 __pyx_r = NULL;
41176 __pyx_L0:;
41177 {
41178 Py_ssize_t __pyx_temp;
41179 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
41180 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
41181 }
41182 }
41183 __Pyx_RefNannyFinishContext();
41184 return __pyx_r;
41185 }
41186
41187 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_10merge(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header) {
41188 PyObject *__pyx_r = NULL;
41189 __Pyx_TraceDeclarations
41190 __Pyx_RefNannyDeclarations
41191 int __pyx_t_1;
41192 PyObject *__pyx_t_2 = NULL;
41193 int __pyx_lineno = 0;
41194 const char *__pyx_filename = NULL;
41195 int __pyx_clineno = 0;
41196 __Pyx_TraceFrameInit(__pyx_codeobj__97)
41197 __Pyx_RefNannySetupContext("merge", 1);
41198 __Pyx_TraceCall("merge", __pyx_f[0], 1984, 0, __PYX_ERR(0, 1984, __pyx_L1_error));
41199
41200 /* "pysam/libcbcf.pyx":1985
41201 *
41202 * def merge(self, VariantHeader header):
41203 * if header is None: # <<<<<<<<<<<<<<
41204 * raise ValueError('header must not be None')
41205 * bcf_hdr_merge(self.ptr, header.ptr)
41206 */
41207 __pyx_t_1 = (((PyObject *)__pyx_v_header) == Py_None);
41208 if (unlikely(__pyx_t_1)) {
41209
41210 /* "pysam/libcbcf.pyx":1986
41211 * def merge(self, VariantHeader header):
41212 * if header is None:
41213 * raise ValueError('header must not be None') # <<<<<<<<<<<<<<
41214 * bcf_hdr_merge(self.ptr, header.ptr)
41215 *
41216 */
41217 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1986, __pyx_L1_error)
41218 __Pyx_GOTREF(__pyx_t_2);
41219 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
41220 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
41221 __PYX_ERR(0, 1986, __pyx_L1_error)
41222
41223 /* "pysam/libcbcf.pyx":1985
41224 *
41225 * def merge(self, VariantHeader header):
41226 * if header is None: # <<<<<<<<<<<<<<
41227 * raise ValueError('header must not be None')
41228 * bcf_hdr_merge(self.ptr, header.ptr)
41229 */
41230 }
41231
41232 /* "pysam/libcbcf.pyx":1987
41233 * if header is None:
41234 * raise ValueError('header must not be None')
41235 * bcf_hdr_merge(self.ptr, header.ptr) # <<<<<<<<<<<<<<
41236 *
41237 * @property
41238 */
41239 (void)(bcf_hdr_merge(__pyx_v_self->ptr, __pyx_v_header->ptr));
41240
41241 /* "pysam/libcbcf.pyx":1984
41242 * return makeVariantHeader(bcf_hdr_dup(self.ptr))
41243 *
41244 * def merge(self, VariantHeader header): # <<<<<<<<<<<<<<
41245 * if header is None:
41246 * raise ValueError('header must not be None')
41247 */
41248
41249 /* function exit code */
41250 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
41251 goto __pyx_L0;
41252 __pyx_L1_error:;
41253 __Pyx_XDECREF(__pyx_t_2);
41254 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.merge", __pyx_clineno, __pyx_lineno, __pyx_filename);
41255 __pyx_r = NULL;
41256 __pyx_L0:;
41257 __Pyx_XGIVEREF(__pyx_r);
41258 __Pyx_TraceReturn(__pyx_r, 0);
41259 __Pyx_RefNannyFinishContext();
41260 return __pyx_r;
41261 }
41262
41263 /* "pysam/libcbcf.pyx":1989
41264 * bcf_hdr_merge(self.ptr, header.ptr)
41265 *
41266 * @property # <<<<<<<<<<<<<<
41267 * def version(self):
41268 * """VCF version"""
41269 */
41270
41271 /* Python wrapper */
41272 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
41273 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7version_1__get__(PyObject *__pyx_v_self) {
41274 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41275 PyObject *__pyx_r = 0;
41276 __Pyx_RefNannyDeclarations
41277 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
41278 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
41279 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_7version___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41280
41281 /* function exit code */
41282 __Pyx_RefNannyFinishContext();
41283 return __pyx_r;
41284 }
41285
41286 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7version___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41287 PyObject *__pyx_r = NULL;
41288 __Pyx_TraceDeclarations
41289 __Pyx_RefNannyDeclarations
41290 PyObject *__pyx_t_1 = NULL;
41291 PyObject *__pyx_t_2 = NULL;
41292 int __pyx_lineno = 0;
41293 const char *__pyx_filename = NULL;
41294 int __pyx_clineno = 0;
41295 __Pyx_RefNannySetupContext("__get__", 1);
41296 __Pyx_TraceCall("__get__", __pyx_f[0], 1989, 0, __PYX_ERR(0, 1989, __pyx_L1_error));
41297
41298 /* "pysam/libcbcf.pyx":1992
41299 * def version(self):
41300 * """VCF version"""
41301 * return force_str(bcf_hdr_get_version(self.ptr)) # <<<<<<<<<<<<<<
41302 *
41303 * @property
41304 */
41305 __Pyx_XDECREF(__pyx_r);
41306 __pyx_t_1 = __Pyx_PyBytes_FromString(bcf_hdr_get_version(__pyx_v_self->ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error)
41307 __Pyx_GOTREF(__pyx_t_1);
41308 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1992, __pyx_L1_error)
41309 __Pyx_GOTREF(__pyx_t_2);
41310 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41311 __pyx_r = __pyx_t_2;
41312 __pyx_t_2 = 0;
41313 goto __pyx_L0;
41314
41315 /* "pysam/libcbcf.pyx":1989
41316 * bcf_hdr_merge(self.ptr, header.ptr)
41317 *
41318 * @property # <<<<<<<<<<<<<<
41319 * def version(self):
41320 * """VCF version"""
41321 */
41322
41323 /* function exit code */
41324 __pyx_L1_error:;
41325 __Pyx_XDECREF(__pyx_t_1);
41326 __Pyx_XDECREF(__pyx_t_2);
41327 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41328 __pyx_r = NULL;
41329 __pyx_L0:;
41330 __Pyx_XGIVEREF(__pyx_r);
41331 __Pyx_TraceReturn(__pyx_r, 0);
41332 __Pyx_RefNannyFinishContext();
41333 return __pyx_r;
41334 }
41335
41336 /* "pysam/libcbcf.pyx":1994
41337 * return force_str(bcf_hdr_get_version(self.ptr))
41338 *
41339 * @property # <<<<<<<<<<<<<<
41340 * def samples(self):
41341 * """samples (:class:`VariantHeaderSamples`)"""
41342 */
41343
41344 /* Python wrapper */
41345 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7samples_1__get__(PyObject *__pyx_v_self); /*proto*/
41346 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7samples_1__get__(PyObject *__pyx_v_self) {
41347 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41348 PyObject *__pyx_r = 0;
41349 __Pyx_RefNannyDeclarations
41350 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
41351 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
41352 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_7samples___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41353
41354 /* function exit code */
41355 __Pyx_RefNannyFinishContext();
41356 return __pyx_r;
41357 }
41358
41359 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7samples___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41360 PyObject *__pyx_r = NULL;
41361 __Pyx_TraceDeclarations
41362 __Pyx_RefNannyDeclarations
41363 PyObject *__pyx_t_1 = NULL;
41364 int __pyx_lineno = 0;
41365 const char *__pyx_filename = NULL;
41366 int __pyx_clineno = 0;
41367 __Pyx_RefNannySetupContext("__get__", 1);
41368 __Pyx_TraceCall("__get__", __pyx_f[0], 1994, 0, __PYX_ERR(0, 1994, __pyx_L1_error));
41369
41370 /* "pysam/libcbcf.pyx":1997
41371 * def samples(self):
41372 * """samples (:class:`VariantHeaderSamples`)"""
41373 * return makeVariantHeaderSamples(self) # <<<<<<<<<<<<<<
41374 *
41375 * @property
41376 */
41377 __Pyx_XDECREF(__pyx_r);
41378 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderSamples(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error)
41379 __Pyx_GOTREF(__pyx_t_1);
41380 __pyx_r = __pyx_t_1;
41381 __pyx_t_1 = 0;
41382 goto __pyx_L0;
41383
41384 /* "pysam/libcbcf.pyx":1994
41385 * return force_str(bcf_hdr_get_version(self.ptr))
41386 *
41387 * @property # <<<<<<<<<<<<<<
41388 * def samples(self):
41389 * """samples (:class:`VariantHeaderSamples`)"""
41390 */
41391
41392 /* function exit code */
41393 __pyx_L1_error:;
41394 __Pyx_XDECREF(__pyx_t_1);
41395 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.samples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41396 __pyx_r = NULL;
41397 __pyx_L0:;
41398 __Pyx_XGIVEREF(__pyx_r);
41399 __Pyx_TraceReturn(__pyx_r, 0);
41400 __Pyx_RefNannyFinishContext();
41401 return __pyx_r;
41402 }
41403
41404 /* "pysam/libcbcf.pyx":1999
41405 * return makeVariantHeaderSamples(self)
41406 *
41407 * @property # <<<<<<<<<<<<<<
41408 * def records(self):
41409 * """header records (:class:`VariantHeaderRecords`)"""
41410 */
41411
41412 /* Python wrapper */
41413 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7records_1__get__(PyObject *__pyx_v_self); /*proto*/
41414 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7records_1__get__(PyObject *__pyx_v_self) {
41415 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41416 PyObject *__pyx_r = 0;
41417 __Pyx_RefNannyDeclarations
41418 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
41419 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
41420 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_7records___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41421
41422 /* function exit code */
41423 __Pyx_RefNannyFinishContext();
41424 return __pyx_r;
41425 }
41426
41427 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7records___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41428 PyObject *__pyx_r = NULL;
41429 __Pyx_TraceDeclarations
41430 __Pyx_RefNannyDeclarations
41431 PyObject *__pyx_t_1 = NULL;
41432 int __pyx_lineno = 0;
41433 const char *__pyx_filename = NULL;
41434 int __pyx_clineno = 0;
41435 __Pyx_RefNannySetupContext("__get__", 1);
41436 __Pyx_TraceCall("__get__", __pyx_f[0], 1999, 0, __PYX_ERR(0, 1999, __pyx_L1_error));
41437
41438 /* "pysam/libcbcf.pyx":2002
41439 * def records(self):
41440 * """header records (:class:`VariantHeaderRecords`)"""
41441 * return makeVariantHeaderRecords(self) # <<<<<<<<<<<<<<
41442 *
41443 * @property
41444 */
41445 __Pyx_XDECREF(__pyx_r);
41446 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderRecords(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2002, __pyx_L1_error)
41447 __Pyx_GOTREF(__pyx_t_1);
41448 __pyx_r = __pyx_t_1;
41449 __pyx_t_1 = 0;
41450 goto __pyx_L0;
41451
41452 /* "pysam/libcbcf.pyx":1999
41453 * return makeVariantHeaderSamples(self)
41454 *
41455 * @property # <<<<<<<<<<<<<<
41456 * def records(self):
41457 * """header records (:class:`VariantHeaderRecords`)"""
41458 */
41459
41460 /* function exit code */
41461 __pyx_L1_error:;
41462 __Pyx_XDECREF(__pyx_t_1);
41463 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.records.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41464 __pyx_r = NULL;
41465 __pyx_L0:;
41466 __Pyx_XGIVEREF(__pyx_r);
41467 __Pyx_TraceReturn(__pyx_r, 0);
41468 __Pyx_RefNannyFinishContext();
41469 return __pyx_r;
41470 }
41471
41472 /* "pysam/libcbcf.pyx":2004
41473 * return makeVariantHeaderRecords(self)
41474 *
41475 * @property # <<<<<<<<<<<<<<
41476 * def contigs(self):
41477 * """contig information (:class:`VariantHeaderContigs`)"""
41478 */
41479
41480 /* Python wrapper */
41481 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7contigs_1__get__(PyObject *__pyx_v_self); /*proto*/
41482 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7contigs_1__get__(PyObject *__pyx_v_self) {
41483 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41484 PyObject *__pyx_r = 0;
41485 __Pyx_RefNannyDeclarations
41486 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
41487 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
41488 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_7contigs___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41489
41490 /* function exit code */
41491 __Pyx_RefNannyFinishContext();
41492 return __pyx_r;
41493 }
41494
41495 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7contigs___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41496 PyObject *__pyx_r = NULL;
41497 __Pyx_TraceDeclarations
41498 __Pyx_RefNannyDeclarations
41499 PyObject *__pyx_t_1 = NULL;
41500 int __pyx_lineno = 0;
41501 const char *__pyx_filename = NULL;
41502 int __pyx_clineno = 0;
41503 __Pyx_RefNannySetupContext("__get__", 1);
41504 __Pyx_TraceCall("__get__", __pyx_f[0], 2004, 0, __PYX_ERR(0, 2004, __pyx_L1_error));
41505
41506 /* "pysam/libcbcf.pyx":2007
41507 * def contigs(self):
41508 * """contig information (:class:`VariantHeaderContigs`)"""
41509 * return makeVariantHeaderContigs(self) # <<<<<<<<<<<<<<
41510 *
41511 * @property
41512 */
41513 __Pyx_XDECREF(__pyx_r);
41514 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderContigs(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2007, __pyx_L1_error)
41515 __Pyx_GOTREF(__pyx_t_1);
41516 __pyx_r = __pyx_t_1;
41517 __pyx_t_1 = 0;
41518 goto __pyx_L0;
41519
41520 /* "pysam/libcbcf.pyx":2004
41521 * return makeVariantHeaderRecords(self)
41522 *
41523 * @property # <<<<<<<<<<<<<<
41524 * def contigs(self):
41525 * """contig information (:class:`VariantHeaderContigs`)"""
41526 */
41527
41528 /* function exit code */
41529 __pyx_L1_error:;
41530 __Pyx_XDECREF(__pyx_t_1);
41531 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.contigs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41532 __pyx_r = NULL;
41533 __pyx_L0:;
41534 __Pyx_XGIVEREF(__pyx_r);
41535 __Pyx_TraceReturn(__pyx_r, 0);
41536 __Pyx_RefNannyFinishContext();
41537 return __pyx_r;
41538 }
41539
41540 /* "pysam/libcbcf.pyx":2009
41541 * return makeVariantHeaderContigs(self)
41542 *
41543 * @property # <<<<<<<<<<<<<<
41544 * def filters(self):
41545 * """filter metadata (:class:`VariantHeaderMetadata`)"""
41546 */
41547
41548 /* Python wrapper */
41549 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7filters_1__get__(PyObject *__pyx_v_self); /*proto*/
41550 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7filters_1__get__(PyObject *__pyx_v_self) {
41551 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41552 PyObject *__pyx_r = 0;
41553 __Pyx_RefNannyDeclarations
41554 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
41555 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
41556 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_7filters___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41557
41558 /* function exit code */
41559 __Pyx_RefNannyFinishContext();
41560 return __pyx_r;
41561 }
41562
41563 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7filters___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41564 PyObject *__pyx_r = NULL;
41565 __Pyx_TraceDeclarations
41566 __Pyx_RefNannyDeclarations
41567 PyObject *__pyx_t_1 = NULL;
41568 int __pyx_lineno = 0;
41569 const char *__pyx_filename = NULL;
41570 int __pyx_clineno = 0;
41571 __Pyx_RefNannySetupContext("__get__", 1);
41572 __Pyx_TraceCall("__get__", __pyx_f[0], 2009, 0, __PYX_ERR(0, 2009, __pyx_L1_error));
41573
41574 /* "pysam/libcbcf.pyx":2012
41575 * def filters(self):
41576 * """filter metadata (:class:`VariantHeaderMetadata`)"""
41577 * return makeVariantHeaderMetadata(self, BCF_HL_FLT) # <<<<<<<<<<<<<<
41578 *
41579 * @property
41580 */
41581 __Pyx_XDECREF(__pyx_r);
41582 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderMetadata(__pyx_v_self, BCF_HL_FLT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __pyx_L1_error)
41583 __Pyx_GOTREF(__pyx_t_1);
41584 __pyx_r = __pyx_t_1;
41585 __pyx_t_1 = 0;
41586 goto __pyx_L0;
41587
41588 /* "pysam/libcbcf.pyx":2009
41589 * return makeVariantHeaderContigs(self)
41590 *
41591 * @property # <<<<<<<<<<<<<<
41592 * def filters(self):
41593 * """filter metadata (:class:`VariantHeaderMetadata`)"""
41594 */
41595
41596 /* function exit code */
41597 __pyx_L1_error:;
41598 __Pyx_XDECREF(__pyx_t_1);
41599 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.filters.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41600 __pyx_r = NULL;
41601 __pyx_L0:;
41602 __Pyx_XGIVEREF(__pyx_r);
41603 __Pyx_TraceReturn(__pyx_r, 0);
41604 __Pyx_RefNannyFinishContext();
41605 return __pyx_r;
41606 }
41607
41608 /* "pysam/libcbcf.pyx":2014
41609 * return makeVariantHeaderMetadata(self, BCF_HL_FLT)
41610 *
41611 * @property # <<<<<<<<<<<<<<
41612 * def info(self):
41613 * """info metadata (:class:`VariantHeaderMetadata`)"""
41614 */
41615
41616 /* Python wrapper */
41617 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_4info_1__get__(PyObject *__pyx_v_self); /*proto*/
41618 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_4info_1__get__(PyObject *__pyx_v_self) {
41619 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41620 PyObject *__pyx_r = 0;
41621 __Pyx_RefNannyDeclarations
41622 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
41623 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
41624 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_4info___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41625
41626 /* function exit code */
41627 __Pyx_RefNannyFinishContext();
41628 return __pyx_r;
41629 }
41630
41631 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_4info___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41632 PyObject *__pyx_r = NULL;
41633 __Pyx_TraceDeclarations
41634 __Pyx_RefNannyDeclarations
41635 PyObject *__pyx_t_1 = NULL;
41636 int __pyx_lineno = 0;
41637 const char *__pyx_filename = NULL;
41638 int __pyx_clineno = 0;
41639 __Pyx_RefNannySetupContext("__get__", 1);
41640 __Pyx_TraceCall("__get__", __pyx_f[0], 2014, 0, __PYX_ERR(0, 2014, __pyx_L1_error));
41641
41642 /* "pysam/libcbcf.pyx":2017
41643 * def info(self):
41644 * """info metadata (:class:`VariantHeaderMetadata`)"""
41645 * return makeVariantHeaderMetadata(self, BCF_HL_INFO) # <<<<<<<<<<<<<<
41646 *
41647 * @property
41648 */
41649 __Pyx_XDECREF(__pyx_r);
41650 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderMetadata(__pyx_v_self, BCF_HL_INFO)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2017, __pyx_L1_error)
41651 __Pyx_GOTREF(__pyx_t_1);
41652 __pyx_r = __pyx_t_1;
41653 __pyx_t_1 = 0;
41654 goto __pyx_L0;
41655
41656 /* "pysam/libcbcf.pyx":2014
41657 * return makeVariantHeaderMetadata(self, BCF_HL_FLT)
41658 *
41659 * @property # <<<<<<<<<<<<<<
41660 * def info(self):
41661 * """info metadata (:class:`VariantHeaderMetadata`)"""
41662 */
41663
41664 /* function exit code */
41665 __pyx_L1_error:;
41666 __Pyx_XDECREF(__pyx_t_1);
41667 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41668 __pyx_r = NULL;
41669 __pyx_L0:;
41670 __Pyx_XGIVEREF(__pyx_r);
41671 __Pyx_TraceReturn(__pyx_r, 0);
41672 __Pyx_RefNannyFinishContext();
41673 return __pyx_r;
41674 }
41675
41676 /* "pysam/libcbcf.pyx":2019
41677 * return makeVariantHeaderMetadata(self, BCF_HL_INFO)
41678 *
41679 * @property # <<<<<<<<<<<<<<
41680 * def formats(self):
41681 * """format metadata (:class:`VariantHeaderMetadata`)"""
41682 */
41683
41684 /* Python wrapper */
41685 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7formats_1__get__(PyObject *__pyx_v_self); /*proto*/
41686 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_7formats_1__get__(PyObject *__pyx_v_self) {
41687 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41688 PyObject *__pyx_r = 0;
41689 __Pyx_RefNannyDeclarations
41690 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
41691 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
41692 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_7formats___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41693
41694 /* function exit code */
41695 __Pyx_RefNannyFinishContext();
41696 return __pyx_r;
41697 }
41698
41699 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_7formats___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41700 PyObject *__pyx_r = NULL;
41701 __Pyx_TraceDeclarations
41702 __Pyx_RefNannyDeclarations
41703 PyObject *__pyx_t_1 = NULL;
41704 int __pyx_lineno = 0;
41705 const char *__pyx_filename = NULL;
41706 int __pyx_clineno = 0;
41707 __Pyx_RefNannySetupContext("__get__", 1);
41708 __Pyx_TraceCall("__get__", __pyx_f[0], 2019, 0, __PYX_ERR(0, 2019, __pyx_L1_error));
41709
41710 /* "pysam/libcbcf.pyx":2022
41711 * def formats(self):
41712 * """format metadata (:class:`VariantHeaderMetadata`)"""
41713 * return makeVariantHeaderMetadata(self, BCF_HL_FMT) # <<<<<<<<<<<<<<
41714 *
41715 * @property
41716 */
41717 __Pyx_XDECREF(__pyx_r);
41718 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeaderMetadata(__pyx_v_self, BCF_HL_FMT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2022, __pyx_L1_error)
41719 __Pyx_GOTREF(__pyx_t_1);
41720 __pyx_r = __pyx_t_1;
41721 __pyx_t_1 = 0;
41722 goto __pyx_L0;
41723
41724 /* "pysam/libcbcf.pyx":2019
41725 * return makeVariantHeaderMetadata(self, BCF_HL_INFO)
41726 *
41727 * @property # <<<<<<<<<<<<<<
41728 * def formats(self):
41729 * """format metadata (:class:`VariantHeaderMetadata`)"""
41730 */
41731
41732 /* function exit code */
41733 __pyx_L1_error:;
41734 __Pyx_XDECREF(__pyx_t_1);
41735 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.formats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41736 __pyx_r = NULL;
41737 __pyx_L0:;
41738 __Pyx_XGIVEREF(__pyx_r);
41739 __Pyx_TraceReturn(__pyx_r, 0);
41740 __Pyx_RefNannyFinishContext();
41741 return __pyx_r;
41742 }
41743
41744 /* "pysam/libcbcf.pyx":2024
41745 * return makeVariantHeaderMetadata(self, BCF_HL_FMT)
41746 *
41747 * @property # <<<<<<<<<<<<<<
41748 * def alts(self):
41749 * """alt metadata (:class:`dict` ID->record).
41750 */
41751
41752 /* Python wrapper */
41753 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_4alts_1__get__(PyObject *__pyx_v_self); /*proto*/
41754 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_4alts_1__get__(PyObject *__pyx_v_self) {
41755 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
41756 PyObject *__pyx_r = 0;
41757 __Pyx_RefNannyDeclarations
41758 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
41759 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
41760 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_4alts___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
41761
41762 /* function exit code */
41763 __Pyx_RefNannyFinishContext();
41764 return __pyx_r;
41765 }
41766
41767 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_4alts___get__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
41768 PyObject *__pyx_8genexpr5__pyx_v_record = NULL;
41769 PyObject *__pyx_r = NULL;
41770 __Pyx_TraceDeclarations
41771 __Pyx_RefNannyDeclarations
41772 PyObject *__pyx_t_1 = NULL;
41773 PyObject *__pyx_t_2 = NULL;
41774 PyObject *__pyx_t_3 = NULL;
41775 Py_ssize_t __pyx_t_4;
41776 PyObject *(*__pyx_t_5)(PyObject *);
41777 PyObject *__pyx_t_6 = NULL;
41778 PyObject *__pyx_t_7 = NULL;
41779 unsigned int __pyx_t_8;
41780 int __pyx_t_9;
41781 int __pyx_lineno = 0;
41782 const char *__pyx_filename = NULL;
41783 int __pyx_clineno = 0;
41784 __Pyx_RefNannySetupContext("__get__", 1);
41785 __Pyx_TraceCall("__get__", __pyx_f[0], 2024, 0, __PYX_ERR(0, 2024, __pyx_L1_error));
41786
41787 /* "pysam/libcbcf.pyx":2035
41788 * at the time it is created.
41789 * """
41790 * return {record['ID']:record for record in self.records # <<<<<<<<<<<<<<
41791 * if record.key.upper() == 'ALT' }
41792 *
41793 */
41794 __Pyx_XDECREF(__pyx_r);
41795 { /* enter inner scope */
41796 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2035, __pyx_L5_error)
41797 __Pyx_GOTREF(__pyx_t_1);
41798 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_records); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2035, __pyx_L5_error)
41799 __Pyx_GOTREF(__pyx_t_2);
41800 if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
41801 __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
41802 __pyx_t_4 = 0;
41803 __pyx_t_5 = NULL;
41804 } else {
41805 __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2035, __pyx_L5_error)
41806 __Pyx_GOTREF(__pyx_t_3);
41807 __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2035, __pyx_L5_error)
41808 }
41809 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
41810 for (;;) {
41811 if (likely(!__pyx_t_5)) {
41812 if (likely(PyList_CheckExact(__pyx_t_3))) {
41813 {
41814 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
41815 #if !CYTHON_ASSUME_SAFE_MACROS
41816 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2035, __pyx_L5_error)
41817 #endif
41818 if (__pyx_t_4 >= __pyx_temp) break;
41819 }
41820 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
41821 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 2035, __pyx_L5_error)
41822 #else
41823 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2035, __pyx_L5_error)
41824 __Pyx_GOTREF(__pyx_t_2);
41825 #endif
41826 } else {
41827 {
41828 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
41829 #if !CYTHON_ASSUME_SAFE_MACROS
41830 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2035, __pyx_L5_error)
41831 #endif
41832 if (__pyx_t_4 >= __pyx_temp) break;
41833 }
41834 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
41835 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 2035, __pyx_L5_error)
41836 #else
41837 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2035, __pyx_L5_error)
41838 __Pyx_GOTREF(__pyx_t_2);
41839 #endif
41840 }
41841 } else {
41842 __pyx_t_2 = __pyx_t_5(__pyx_t_3);
41843 if (unlikely(!__pyx_t_2)) {
41844 PyObject* exc_type = PyErr_Occurred();
41845 if (exc_type) {
41846 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
41847 else __PYX_ERR(0, 2035, __pyx_L5_error)
41848 }
41849 break;
41850 }
41851 __Pyx_GOTREF(__pyx_t_2);
41852 }
41853 __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_record, __pyx_t_2);
41854 __pyx_t_2 = 0;
41855
41856 /* "pysam/libcbcf.pyx":2036
41857 * """
41858 * return {record['ID']:record for record in self.records
41859 * if record.key.upper() == 'ALT' } # <<<<<<<<<<<<<<
41860 *
41861 * # only safe to do when opening an htsfile
41862 */
41863 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_record, __pyx_n_s_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2036, __pyx_L5_error)
41864 __Pyx_GOTREF(__pyx_t_6);
41865 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_upper); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2036, __pyx_L5_error)
41866 __Pyx_GOTREF(__pyx_t_7);
41867 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41868 __pyx_t_6 = NULL;
41869 __pyx_t_8 = 0;
41870 #if CYTHON_UNPACK_METHODS
41871 if (likely(PyMethod_Check(__pyx_t_7))) {
41872 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
41873 if (likely(__pyx_t_6)) {
41874 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
41875 __Pyx_INCREF(__pyx_t_6);
41876 __Pyx_INCREF(function);
41877 __Pyx_DECREF_SET(__pyx_t_7, function);
41878 __pyx_t_8 = 1;
41879 }
41880 }
41881 #endif
41882 {
41883 PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
41884 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
41885 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
41886 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L5_error)
41887 __Pyx_GOTREF(__pyx_t_2);
41888 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
41889 }
41890 __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_ALT, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2036, __pyx_L5_error)
41891 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
41892 if (__pyx_t_9) {
41893
41894 /* "pysam/libcbcf.pyx":2035
41895 * at the time it is created.
41896 * """
41897 * return {record['ID']:record for record in self.records # <<<<<<<<<<<<<<
41898 * if record.key.upper() == 'ALT' }
41899 *
41900 */
41901 __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_8genexpr5__pyx_v_record, __pyx_n_u_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2035, __pyx_L5_error)
41902 __Pyx_GOTREF(__pyx_t_2);
41903 if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_2, (PyObject*)__pyx_8genexpr5__pyx_v_record))) __PYX_ERR(0, 2035, __pyx_L5_error)
41904 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
41905
41906 /* "pysam/libcbcf.pyx":2036
41907 * """
41908 * return {record['ID']:record for record in self.records
41909 * if record.key.upper() == 'ALT' } # <<<<<<<<<<<<<<
41910 *
41911 * # only safe to do when opening an htsfile
41912 */
41913 }
41914
41915 /* "pysam/libcbcf.pyx":2035
41916 * at the time it is created.
41917 * """
41918 * return {record['ID']:record for record in self.records # <<<<<<<<<<<<<<
41919 * if record.key.upper() == 'ALT' }
41920 *
41921 */
41922 }
41923 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41924 __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_record); __pyx_8genexpr5__pyx_v_record = 0;
41925 goto __pyx_L10_exit_scope;
41926 __pyx_L5_error:;
41927 __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_record); __pyx_8genexpr5__pyx_v_record = 0;
41928 goto __pyx_L1_error;
41929 __pyx_L10_exit_scope:;
41930 } /* exit inner scope */
41931 __pyx_r = __pyx_t_1;
41932 __pyx_t_1 = 0;
41933 goto __pyx_L0;
41934
41935 /* "pysam/libcbcf.pyx":2024
41936 * return makeVariantHeaderMetadata(self, BCF_HL_FMT)
41937 *
41938 * @property # <<<<<<<<<<<<<<
41939 * def alts(self):
41940 * """alt metadata (:class:`dict` ID->record).
41941 */
41942
41943 /* function exit code */
41944 __pyx_L1_error:;
41945 __Pyx_XDECREF(__pyx_t_1);
41946 __Pyx_XDECREF(__pyx_t_2);
41947 __Pyx_XDECREF(__pyx_t_3);
41948 __Pyx_XDECREF(__pyx_t_6);
41949 __Pyx_XDECREF(__pyx_t_7);
41950 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.alts.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41951 __pyx_r = NULL;
41952 __pyx_L0:;
41953 __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_record);
41954 __Pyx_XGIVEREF(__pyx_r);
41955 __Pyx_TraceReturn(__pyx_r, 0);
41956 __Pyx_RefNannyFinishContext();
41957 return __pyx_r;
41958 }
41959
41960 /* "pysam/libcbcf.pyx":2039
41961 *
41962 * # only safe to do when opening an htsfile
41963 * cdef _subset_samples(self, include_samples): # <<<<<<<<<<<<<<
41964 * keep_samples = set(self.samples)
41965 * include_samples = set(include_samples)
41966 */
41967
41968 static PyObject *__pyx_f_5pysam_7libcbcf_13VariantHeader__subset_samples(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_include_samples) {
41969 PyObject *__pyx_v_keep_samples = NULL;
41970 PyObject *__pyx_v_missing_samples = NULL;
41971 char *__pyx_v_keep;
41972 PyObject *__pyx_v_ret = 0;
41973 PyObject *__pyx_r = NULL;
41974 __Pyx_TraceDeclarations
41975 __Pyx_RefNannyDeclarations
41976 PyObject *__pyx_t_1 = NULL;
41977 PyObject *__pyx_t_2 = NULL;
41978 int __pyx_t_3;
41979 Py_ssize_t __pyx_t_4;
41980 PyObject *__pyx_t_5 = NULL;
41981 PyObject *__pyx_t_6 = NULL;
41982 unsigned int __pyx_t_7;
41983 char *__pyx_t_8;
41984 char *__pyx_t_9;
41985 int __pyx_lineno = 0;
41986 const char *__pyx_filename = NULL;
41987 int __pyx_clineno = 0;
41988 __Pyx_RefNannySetupContext("_subset_samples", 0);
41989 __Pyx_TraceCall("_subset_samples", __pyx_f[0], 2039, 0, __PYX_ERR(0, 2039, __pyx_L1_error));
41990 __Pyx_INCREF(__pyx_v_include_samples);
41991
41992 /* "pysam/libcbcf.pyx":2040
41993 * # only safe to do when opening an htsfile
41994 * cdef _subset_samples(self, include_samples):
41995 * keep_samples = set(self.samples) # <<<<<<<<<<<<<<
41996 * include_samples = set(include_samples)
41997 * missing_samples = include_samples - keep_samples
41998 */
41999 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2040, __pyx_L1_error)
42000 __Pyx_GOTREF(__pyx_t_1);
42001 __pyx_t_2 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2040, __pyx_L1_error)
42002 __Pyx_GOTREF(__pyx_t_2);
42003 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42004 __pyx_v_keep_samples = __pyx_t_2;
42005 __pyx_t_2 = 0;
42006
42007 /* "pysam/libcbcf.pyx":2041
42008 * cdef _subset_samples(self, include_samples):
42009 * keep_samples = set(self.samples)
42010 * include_samples = set(include_samples) # <<<<<<<<<<<<<<
42011 * missing_samples = include_samples - keep_samples
42012 * keep_samples &= include_samples
42013 */
42014 __pyx_t_2 = PySet_New(__pyx_v_include_samples); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2041, __pyx_L1_error)
42015 __Pyx_GOTREF(__pyx_t_2);
42016 __Pyx_DECREF_SET(__pyx_v_include_samples, __pyx_t_2);
42017 __pyx_t_2 = 0;
42018
42019 /* "pysam/libcbcf.pyx":2042
42020 * keep_samples = set(self.samples)
42021 * include_samples = set(include_samples)
42022 * missing_samples = include_samples - keep_samples # <<<<<<<<<<<<<<
42023 * keep_samples &= include_samples
42024 *
42025 */
42026 __pyx_t_2 = PyNumber_Subtract(__pyx_v_include_samples, __pyx_v_keep_samples); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L1_error)
42027 __Pyx_GOTREF(__pyx_t_2);
42028 __pyx_v_missing_samples = __pyx_t_2;
42029 __pyx_t_2 = 0;
42030
42031 /* "pysam/libcbcf.pyx":2043
42032 * include_samples = set(include_samples)
42033 * missing_samples = include_samples - keep_samples
42034 * keep_samples &= include_samples # <<<<<<<<<<<<<<
42035 *
42036 * if missing_samples:
42037 */
42038 __pyx_t_2 = PyNumber_InPlaceAnd(__pyx_v_keep_samples, __pyx_v_include_samples); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2043, __pyx_L1_error)
42039 __Pyx_GOTREF(__pyx_t_2);
42040 __Pyx_DECREF_SET(__pyx_v_keep_samples, __pyx_t_2);
42041 __pyx_t_2 = 0;
42042
42043 /* "pysam/libcbcf.pyx":2045
42044 * keep_samples &= include_samples
42045 *
42046 * if missing_samples: # <<<<<<<<<<<<<<
42047 * # FIXME: add specialized exception with payload
42048 * raise ValueError(
42049 */
42050 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_missing_samples); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2045, __pyx_L1_error)
42051 if (unlikely(__pyx_t_3)) {
42052
42053 /* "pysam/libcbcf.pyx":2048
42054 * # FIXME: add specialized exception with payload
42055 * raise ValueError(
42056 * 'missing {:d} requested samples'.format( # <<<<<<<<<<<<<<
42057 * len(missing_samples)))
42058 *
42059 */
42060 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_missing_d_requested_samples, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2048, __pyx_L1_error)
42061 __Pyx_GOTREF(__pyx_t_1);
42062
42063 /* "pysam/libcbcf.pyx":2049
42064 * raise ValueError(
42065 * 'missing {:d} requested samples'.format(
42066 * len(missing_samples))) # <<<<<<<<<<<<<<
42067 *
42068 * keep_samples = force_bytes(','.join(keep_samples))
42069 */
42070 __pyx_t_4 = PyObject_Length(__pyx_v_missing_samples); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2049, __pyx_L1_error)
42071 __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2049, __pyx_L1_error)
42072 __Pyx_GOTREF(__pyx_t_5);
42073 __pyx_t_6 = NULL;
42074 __pyx_t_7 = 0;
42075 #if CYTHON_UNPACK_METHODS
42076 if (likely(PyMethod_Check(__pyx_t_1))) {
42077 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
42078 if (likely(__pyx_t_6)) {
42079 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
42080 __Pyx_INCREF(__pyx_t_6);
42081 __Pyx_INCREF(function);
42082 __Pyx_DECREF_SET(__pyx_t_1, function);
42083 __pyx_t_7 = 1;
42084 }
42085 }
42086 #endif
42087 {
42088 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
42089 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
42090 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
42091 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42092 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2048, __pyx_L1_error)
42093 __Pyx_GOTREF(__pyx_t_2);
42094 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42095 }
42096
42097 /* "pysam/libcbcf.pyx":2047
42098 * if missing_samples:
42099 * # FIXME: add specialized exception with payload
42100 * raise ValueError( # <<<<<<<<<<<<<<
42101 * 'missing {:d} requested samples'.format(
42102 * len(missing_samples)))
42103 */
42104 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2047, __pyx_L1_error)
42105 __Pyx_GOTREF(__pyx_t_1);
42106 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42107 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
42108 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42109 __PYX_ERR(0, 2047, __pyx_L1_error)
42110
42111 /* "pysam/libcbcf.pyx":2045
42112 * keep_samples &= include_samples
42113 *
42114 * if missing_samples: # <<<<<<<<<<<<<<
42115 * # FIXME: add specialized exception with payload
42116 * raise ValueError(
42117 */
42118 }
42119
42120 /* "pysam/libcbcf.pyx":2051
42121 * len(missing_samples)))
42122 *
42123 * keep_samples = force_bytes(','.join(keep_samples)) # <<<<<<<<<<<<<<
42124 * cdef char *keep = <char *>keep_samples if keep_samples else NULL
42125 * cdef ret = bcf_hdr_set_samples(self.ptr, keep, 0)
42126 */
42127 __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_keep_samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2051, __pyx_L1_error)
42128 __Pyx_GOTREF(__pyx_t_1);
42129 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L1_error)
42130 __Pyx_GOTREF(__pyx_t_2);
42131 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42132 __Pyx_DECREF_SET(__pyx_v_keep_samples, __pyx_t_2);
42133 __pyx_t_2 = 0;
42134
42135 /* "pysam/libcbcf.pyx":2052
42136 *
42137 * keep_samples = force_bytes(','.join(keep_samples))
42138 * cdef char *keep = <char *>keep_samples if keep_samples else NULL # <<<<<<<<<<<<<<
42139 * cdef ret = bcf_hdr_set_samples(self.ptr, keep, 0)
42140 *
42141 */
42142 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_keep_samples); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2052, __pyx_L1_error)
42143 if (__pyx_t_3) {
42144 __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_keep_samples); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2052, __pyx_L1_error)
42145 __pyx_t_8 = ((char *)__pyx_t_9);
42146 } else {
42147 __pyx_t_8 = NULL;
42148 }
42149 __pyx_v_keep = __pyx_t_8;
42150
42151 /* "pysam/libcbcf.pyx":2053
42152 * keep_samples = force_bytes(','.join(keep_samples))
42153 * cdef char *keep = <char *>keep_samples if keep_samples else NULL
42154 * cdef ret = bcf_hdr_set_samples(self.ptr, keep, 0) # <<<<<<<<<<<<<<
42155 *
42156 * if ret != 0:
42157 */
42158 __pyx_t_2 = __Pyx_PyInt_From_int(bcf_hdr_set_samples(__pyx_v_self->ptr, __pyx_v_keep, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2053, __pyx_L1_error)
42159 __Pyx_GOTREF(__pyx_t_2);
42160 __pyx_v_ret = __pyx_t_2;
42161 __pyx_t_2 = 0;
42162
42163 /* "pysam/libcbcf.pyx":2055
42164 * cdef ret = bcf_hdr_set_samples(self.ptr, keep, 0)
42165 *
42166 * if ret != 0: # <<<<<<<<<<<<<<
42167 * raise ValueError(
42168 * 'bcf_hdr_set_samples failed: ret = {}'.format(ret))
42169 */
42170 __pyx_t_3 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_ret, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2055, __pyx_L1_error)
42171 if (unlikely(__pyx_t_3)) {
42172
42173 /* "pysam/libcbcf.pyx":2057
42174 * if ret != 0:
42175 * raise ValueError(
42176 * 'bcf_hdr_set_samples failed: ret = {}'.format(ret)) # <<<<<<<<<<<<<<
42177 *
42178 * def __str__(self):
42179 */
42180 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_bcf_hdr_set_samples_failed_ret, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2057, __pyx_L1_error)
42181 __Pyx_GOTREF(__pyx_t_1);
42182 __pyx_t_5 = NULL;
42183 __pyx_t_7 = 0;
42184 #if CYTHON_UNPACK_METHODS
42185 if (likely(PyMethod_Check(__pyx_t_1))) {
42186 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
42187 if (likely(__pyx_t_5)) {
42188 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
42189 __Pyx_INCREF(__pyx_t_5);
42190 __Pyx_INCREF(function);
42191 __Pyx_DECREF_SET(__pyx_t_1, function);
42192 __pyx_t_7 = 1;
42193 }
42194 }
42195 #endif
42196 {
42197 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_ret};
42198 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
42199 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
42200 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2057, __pyx_L1_error)
42201 __Pyx_GOTREF(__pyx_t_2);
42202 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42203 }
42204
42205 /* "pysam/libcbcf.pyx":2056
42206 *
42207 * if ret != 0:
42208 * raise ValueError( # <<<<<<<<<<<<<<
42209 * 'bcf_hdr_set_samples failed: ret = {}'.format(ret))
42210 *
42211 */
42212 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2056, __pyx_L1_error)
42213 __Pyx_GOTREF(__pyx_t_1);
42214 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42215 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
42216 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42217 __PYX_ERR(0, 2056, __pyx_L1_error)
42218
42219 /* "pysam/libcbcf.pyx":2055
42220 * cdef ret = bcf_hdr_set_samples(self.ptr, keep, 0)
42221 *
42222 * if ret != 0: # <<<<<<<<<<<<<<
42223 * raise ValueError(
42224 * 'bcf_hdr_set_samples failed: ret = {}'.format(ret))
42225 */
42226 }
42227
42228 /* "pysam/libcbcf.pyx":2039
42229 *
42230 * # only safe to do when opening an htsfile
42231 * cdef _subset_samples(self, include_samples): # <<<<<<<<<<<<<<
42232 * keep_samples = set(self.samples)
42233 * include_samples = set(include_samples)
42234 */
42235
42236 /* function exit code */
42237 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42238 goto __pyx_L0;
42239 __pyx_L1_error:;
42240 __Pyx_XDECREF(__pyx_t_1);
42241 __Pyx_XDECREF(__pyx_t_2);
42242 __Pyx_XDECREF(__pyx_t_5);
42243 __Pyx_XDECREF(__pyx_t_6);
42244 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader._subset_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
42245 __pyx_r = 0;
42246 __pyx_L0:;
42247 __Pyx_XDECREF(__pyx_v_keep_samples);
42248 __Pyx_XDECREF(__pyx_v_missing_samples);
42249 __Pyx_XDECREF(__pyx_v_ret);
42250 __Pyx_XDECREF(__pyx_v_include_samples);
42251 __Pyx_XGIVEREF(__pyx_r);
42252 __Pyx_TraceReturn(__pyx_r, 0);
42253 __Pyx_RefNannyFinishContext();
42254 return __pyx_r;
42255 }
42256
42257 /* "pysam/libcbcf.pyx":2059
42258 * 'bcf_hdr_set_samples failed: ret = {}'.format(ret))
42259 *
42260 * def __str__(self): # <<<<<<<<<<<<<<
42261 * cdef int hlen
42262 * cdef kstring_t line
42263 */
42264
42265 /* Python wrapper */
42266 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_13__str__(PyObject *__pyx_v_self); /*proto*/
42267 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_13__str__(PyObject *__pyx_v_self) {
42268 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
42269 PyObject *__pyx_r = 0;
42270 __Pyx_RefNannyDeclarations
42271 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
42272 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
42273 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_12__str__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
42274
42275 /* function exit code */
42276 __Pyx_RefNannyFinishContext();
42277 return __pyx_r;
42278 }
42279
42280 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_12__str__(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
42281 kstring_t __pyx_v_line;
42282 PyObject *__pyx_v_ret = NULL;
42283 PyObject *__pyx_r = NULL;
42284 __Pyx_TraceDeclarations
42285 __Pyx_RefNannyDeclarations
42286 int __pyx_t_1;
42287 PyObject *__pyx_t_2 = NULL;
42288 int __pyx_lineno = 0;
42289 const char *__pyx_filename = NULL;
42290 int __pyx_clineno = 0;
42291 __Pyx_RefNannySetupContext("__str__", 1);
42292 __Pyx_TraceCall("__str__", __pyx_f[0], 2059, 0, __PYX_ERR(0, 2059, __pyx_L1_error));
42293
42294 /* "pysam/libcbcf.pyx":2062
42295 * cdef int hlen
42296 * cdef kstring_t line
42297 * line.l = line.m = 0 # <<<<<<<<<<<<<<
42298 * line.s = NULL
42299 *
42300 */
42301 __pyx_v_line.l = 0;
42302 __pyx_v_line.m = 0;
42303
42304 /* "pysam/libcbcf.pyx":2063
42305 * cdef kstring_t line
42306 * line.l = line.m = 0
42307 * line.s = NULL # <<<<<<<<<<<<<<
42308 *
42309 * if bcf_hdr_format(self.ptr, 0, &line) < 0:
42310 */
42311 __pyx_v_line.s = NULL;
42312
42313 /* "pysam/libcbcf.pyx":2065
42314 * line.s = NULL
42315 *
42316 * if bcf_hdr_format(self.ptr, 0, &line) < 0: # <<<<<<<<<<<<<<
42317 * if line.m:
42318 * free(line.s)
42319 */
42320 __pyx_t_1 = (bcf_hdr_format(__pyx_v_self->ptr, 0, (&__pyx_v_line)) < 0);
42321 if (__pyx_t_1) {
42322
42323 /* "pysam/libcbcf.pyx":2066
42324 *
42325 * if bcf_hdr_format(self.ptr, 0, &line) < 0:
42326 * if line.m: # <<<<<<<<<<<<<<
42327 * free(line.s)
42328 * raise ValueError('bcf_hdr_format failed')
42329 */
42330 __pyx_t_1 = (__pyx_v_line.m != 0);
42331 if (__pyx_t_1) {
42332
42333 /* "pysam/libcbcf.pyx":2067
42334 * if bcf_hdr_format(self.ptr, 0, &line) < 0:
42335 * if line.m:
42336 * free(line.s) # <<<<<<<<<<<<<<
42337 * raise ValueError('bcf_hdr_format failed')
42338 *
42339 */
42340 free(__pyx_v_line.s);
42341
42342 /* "pysam/libcbcf.pyx":2066
42343 *
42344 * if bcf_hdr_format(self.ptr, 0, &line) < 0:
42345 * if line.m: # <<<<<<<<<<<<<<
42346 * free(line.s)
42347 * raise ValueError('bcf_hdr_format failed')
42348 */
42349 }
42350
42351 /* "pysam/libcbcf.pyx":2068
42352 * if line.m:
42353 * free(line.s)
42354 * raise ValueError('bcf_hdr_format failed') # <<<<<<<<<<<<<<
42355 *
42356 * ret = charptr_to_str_w_len(line.s, line.l)
42357 */
42358 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2068, __pyx_L1_error)
42359 __Pyx_GOTREF(__pyx_t_2);
42360 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
42361 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42362 __PYX_ERR(0, 2068, __pyx_L1_error)
42363
42364 /* "pysam/libcbcf.pyx":2065
42365 * line.s = NULL
42366 *
42367 * if bcf_hdr_format(self.ptr, 0, &line) < 0: # <<<<<<<<<<<<<<
42368 * if line.m:
42369 * free(line.s)
42370 */
42371 }
42372
42373 /* "pysam/libcbcf.pyx":2070
42374 * raise ValueError('bcf_hdr_format failed')
42375 *
42376 * ret = charptr_to_str_w_len(line.s, line.l) # <<<<<<<<<<<<<<
42377 *
42378 * if line.m:
42379 */
42380 __pyx_t_2 = __pyx_f_5pysam_9libcutils_charptr_to_str_w_len(__pyx_v_line.s, __pyx_v_line.l, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2070, __pyx_L1_error)
42381 __Pyx_GOTREF(__pyx_t_2);
42382 __pyx_v_ret = __pyx_t_2;
42383 __pyx_t_2 = 0;
42384
42385 /* "pysam/libcbcf.pyx":2072
42386 * ret = charptr_to_str_w_len(line.s, line.l)
42387 *
42388 * if line.m: # <<<<<<<<<<<<<<
42389 * free(line.s)
42390 * return ret
42391 */
42392 __pyx_t_1 = (__pyx_v_line.m != 0);
42393 if (__pyx_t_1) {
42394
42395 /* "pysam/libcbcf.pyx":2073
42396 *
42397 * if line.m:
42398 * free(line.s) # <<<<<<<<<<<<<<
42399 * return ret
42400 *
42401 */
42402 free(__pyx_v_line.s);
42403
42404 /* "pysam/libcbcf.pyx":2072
42405 * ret = charptr_to_str_w_len(line.s, line.l)
42406 *
42407 * if line.m: # <<<<<<<<<<<<<<
42408 * free(line.s)
42409 * return ret
42410 */
42411 }
42412
42413 /* "pysam/libcbcf.pyx":2074
42414 * if line.m:
42415 * free(line.s)
42416 * return ret # <<<<<<<<<<<<<<
42417 *
42418 * def new_record(self, contig=None, start=0, stop=0, alleles=None,
42419 */
42420 __Pyx_XDECREF(__pyx_r);
42421 __Pyx_INCREF(__pyx_v_ret);
42422 __pyx_r = __pyx_v_ret;
42423 goto __pyx_L0;
42424
42425 /* "pysam/libcbcf.pyx":2059
42426 * 'bcf_hdr_set_samples failed: ret = {}'.format(ret))
42427 *
42428 * def __str__(self): # <<<<<<<<<<<<<<
42429 * cdef int hlen
42430 * cdef kstring_t line
42431 */
42432
42433 /* function exit code */
42434 __pyx_L1_error:;
42435 __Pyx_XDECREF(__pyx_t_2);
42436 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
42437 __pyx_r = NULL;
42438 __pyx_L0:;
42439 __Pyx_XDECREF(__pyx_v_ret);
42440 __Pyx_XGIVEREF(__pyx_r);
42441 __Pyx_TraceReturn(__pyx_r, 0);
42442 __Pyx_RefNannyFinishContext();
42443 return __pyx_r;
42444 }
42445
42446 /* "pysam/libcbcf.pyx":2076
42447 * return ret
42448 *
42449 * def new_record(self, contig=None, start=0, stop=0, alleles=None, # <<<<<<<<<<<<<<
42450 * id=None, qual=None, filter=None, info=None, samples=None,
42451 * **kwargs):
42452 */
42453
42454 /* Python wrapper */
42455 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_15new_record(PyObject *__pyx_v_self,
42456 #if CYTHON_METH_FASTCALL
42457 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
42458 #else
42459 PyObject *__pyx_args, PyObject *__pyx_kwds
42460 #endif
42461 ); /*proto*/
42462 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_14new_record, "VariantHeader.new_record(self, contig=None, start=0, stop=0, alleles=None, id=None, qual=None, filter=None, info=None, samples=None, **kwargs)\nCreate a new empty VariantRecord.\n\n Arguments are currently experimental. Use with caution and expect\n changes in upcoming releases.\n\n ");
42463 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_15new_record = {"new_record", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_15new_record, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_14new_record};
42464 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_15new_record(PyObject *__pyx_v_self,
42465 #if CYTHON_METH_FASTCALL
42466 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
42467 #else
42468 PyObject *__pyx_args, PyObject *__pyx_kwds
42469 #endif
42470 ) {
42471 PyObject *__pyx_v_contig = 0;
42472 PyObject *__pyx_v_start = 0;
42473 PyObject *__pyx_v_stop = 0;
42474 PyObject *__pyx_v_alleles = 0;
42475 PyObject *__pyx_v_id = 0;
42476 PyObject *__pyx_v_qual = 0;
42477 PyObject *__pyx_v_filter = 0;
42478 PyObject *__pyx_v_info = 0;
42479 PyObject *__pyx_v_samples = 0;
42480 PyObject *__pyx_v_kwargs = 0;
42481 #if !CYTHON_METH_FASTCALL
42482 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
42483 #endif
42484 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
42485 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
42486 int __pyx_lineno = 0;
42487 const char *__pyx_filename = NULL;
42488 int __pyx_clineno = 0;
42489 PyObject *__pyx_r = 0;
42490 __Pyx_RefNannyDeclarations
42491 __Pyx_RefNannySetupContext("new_record (wrapper)", 0);
42492 #if !CYTHON_METH_FASTCALL
42493 #if CYTHON_ASSUME_SAFE_MACROS
42494 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
42495 #else
42496 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
42497 #endif
42498 #endif
42499 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
42500 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
42501 __Pyx_GOTREF(__pyx_v_kwargs);
42502 {
42503 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_contig,&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_alleles,&__pyx_n_s_id,&__pyx_n_s_qual,&__pyx_n_s_filter,&__pyx_n_s_info,&__pyx_n_s_samples,0};
42504 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
42505 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
42506 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
42507 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
42508
42509 /* "pysam/libcbcf.pyx":2077
42510 *
42511 * def new_record(self, contig=None, start=0, stop=0, alleles=None,
42512 * id=None, qual=None, filter=None, info=None, samples=None, # <<<<<<<<<<<<<<
42513 * **kwargs):
42514 * """Create a new empty VariantRecord.
42515 */
42516 values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
42517 values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
42518 values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
42519 values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
42520 values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
42521 if (__pyx_kwds) {
42522 Py_ssize_t kw_args;
42523 switch (__pyx_nargs) {
42524 case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
42525 CYTHON_FALLTHROUGH;
42526 case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
42527 CYTHON_FALLTHROUGH;
42528 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
42529 CYTHON_FALLTHROUGH;
42530 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
42531 CYTHON_FALLTHROUGH;
42532 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
42533 CYTHON_FALLTHROUGH;
42534 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
42535 CYTHON_FALLTHROUGH;
42536 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
42537 CYTHON_FALLTHROUGH;
42538 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
42539 CYTHON_FALLTHROUGH;
42540 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
42541 CYTHON_FALLTHROUGH;
42542 case 0: break;
42543 default: goto __pyx_L5_argtuple_error;
42544 }
42545 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
42546 switch (__pyx_nargs) {
42547 case 0:
42548 if (kw_args > 0) {
42549 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_contig);
42550 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42551 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42552 }
42553 CYTHON_FALLTHROUGH;
42554 case 1:
42555 if (kw_args > 0) {
42556 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
42557 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42558 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42559 }
42560 CYTHON_FALLTHROUGH;
42561 case 2:
42562 if (kw_args > 0) {
42563 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stop);
42564 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42565 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42566 }
42567 CYTHON_FALLTHROUGH;
42568 case 3:
42569 if (kw_args > 0) {
42570 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alleles);
42571 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42572 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42573 }
42574 CYTHON_FALLTHROUGH;
42575 case 4:
42576 if (kw_args > 0) {
42577 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_id);
42578 if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42579 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42580 }
42581 CYTHON_FALLTHROUGH;
42582 case 5:
42583 if (kw_args > 0) {
42584 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_qual);
42585 if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42586 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42587 }
42588 CYTHON_FALLTHROUGH;
42589 case 6:
42590 if (kw_args > 0) {
42591 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filter);
42592 if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42593 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42594 }
42595 CYTHON_FALLTHROUGH;
42596 case 7:
42597 if (kw_args > 0) {
42598 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_info);
42599 if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42600 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42601 }
42602 CYTHON_FALLTHROUGH;
42603 case 8:
42604 if (kw_args > 0) {
42605 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_samples);
42606 if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
42607 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
42608 }
42609 }
42610 if (unlikely(kw_args > 0)) {
42611 const Py_ssize_t kwd_pos_args = __pyx_nargs;
42612 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "new_record") < 0)) __PYX_ERR(0, 2076, __pyx_L3_error)
42613 }
42614 } else {
42615 switch (__pyx_nargs) {
42616 case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
42617 CYTHON_FALLTHROUGH;
42618 case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
42619 CYTHON_FALLTHROUGH;
42620 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
42621 CYTHON_FALLTHROUGH;
42622 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
42623 CYTHON_FALLTHROUGH;
42624 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
42625 CYTHON_FALLTHROUGH;
42626 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
42627 CYTHON_FALLTHROUGH;
42628 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
42629 CYTHON_FALLTHROUGH;
42630 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
42631 CYTHON_FALLTHROUGH;
42632 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
42633 CYTHON_FALLTHROUGH;
42634 case 0: break;
42635 default: goto __pyx_L5_argtuple_error;
42636 }
42637 }
42638 __pyx_v_contig = values[0];
42639 __pyx_v_start = values[1];
42640 __pyx_v_stop = values[2];
42641 __pyx_v_alleles = values[3];
42642 __pyx_v_id = values[4];
42643 __pyx_v_qual = values[5];
42644 __pyx_v_filter = values[6];
42645 __pyx_v_info = values[7];
42646 __pyx_v_samples = values[8];
42647 }
42648 goto __pyx_L6_skip;
42649 __pyx_L5_argtuple_error:;
42650 __Pyx_RaiseArgtupleInvalid("new_record", 0, 0, 9, __pyx_nargs); __PYX_ERR(0, 2076, __pyx_L3_error)
42651 __pyx_L6_skip:;
42652 goto __pyx_L4_argument_unpacking_done;
42653 __pyx_L3_error:;
42654 {
42655 Py_ssize_t __pyx_temp;
42656 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
42657 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
42658 }
42659 }
42660 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
42661 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.new_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
42662 __Pyx_RefNannyFinishContext();
42663 return NULL;
42664 __pyx_L4_argument_unpacking_done:;
42665 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_14new_record(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self), __pyx_v_contig, __pyx_v_start, __pyx_v_stop, __pyx_v_alleles, __pyx_v_id, __pyx_v_qual, __pyx_v_filter, __pyx_v_info, __pyx_v_samples, __pyx_v_kwargs);
42666
42667 /* "pysam/libcbcf.pyx":2076
42668 * return ret
42669 *
42670 * def new_record(self, contig=None, start=0, stop=0, alleles=None, # <<<<<<<<<<<<<<
42671 * id=None, qual=None, filter=None, info=None, samples=None,
42672 * **kwargs):
42673 */
42674
42675 /* function exit code */
42676 __Pyx_DECREF(__pyx_v_kwargs);
42677 {
42678 Py_ssize_t __pyx_temp;
42679 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
42680 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
42681 }
42682 }
42683 __Pyx_RefNannyFinishContext();
42684 return __pyx_r;
42685 }
42686
42687 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_14new_record(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_alleles, PyObject *__pyx_v_id, PyObject *__pyx_v_qual, PyObject *__pyx_v_filter, PyObject *__pyx_v_info, PyObject *__pyx_v_samples, PyObject *__pyx_v_kwargs) {
42688 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_rec = NULL;
42689 PyObject *__pyx_v_f = NULL;
42690 PyObject *__pyx_v_i = NULL;
42691 PyObject *__pyx_v_sample = NULL;
42692 PyObject *__pyx_r = NULL;
42693 __Pyx_TraceDeclarations
42694 __Pyx_RefNannyDeclarations
42695 PyObject *__pyx_t_1 = NULL;
42696 int __pyx_t_2;
42697 int __pyx_t_3;
42698 Py_ssize_t __pyx_t_4;
42699 PyObject *(*__pyx_t_5)(PyObject *);
42700 PyObject *__pyx_t_6 = NULL;
42701 PyObject *__pyx_t_7 = NULL;
42702 PyObject *__pyx_t_8 = NULL;
42703 unsigned int __pyx_t_9;
42704 PyObject *__pyx_t_10 = NULL;
42705 int __pyx_lineno = 0;
42706 const char *__pyx_filename = NULL;
42707 int __pyx_clineno = 0;
42708 __Pyx_TraceFrameInit(__pyx_codeobj__99)
42709 __Pyx_RefNannySetupContext("new_record", 1);
42710 __Pyx_TraceCall("new_record", __pyx_f[0], 2076, 0, __PYX_ERR(0, 2076, __pyx_L1_error));
42711
42712 /* "pysam/libcbcf.pyx":2085
42713 *
42714 * """
42715 * rec = makeVariantRecord(self, bcf_init()) # <<<<<<<<<<<<<<
42716 *
42717 * if not rec:
42718 */
42719 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecord(__pyx_v_self, bcf_init())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2085, __pyx_L1_error)
42720 __Pyx_GOTREF(__pyx_t_1);
42721 __pyx_v_rec = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_1);
42722 __pyx_t_1 = 0;
42723
42724 /* "pysam/libcbcf.pyx":2087
42725 * rec = makeVariantRecord(self, bcf_init())
42726 *
42727 * if not rec: # <<<<<<<<<<<<<<
42728 * raise MemoryError('unable to allocate BCF record')
42729 *
42730 */
42731 __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_rec)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2087, __pyx_L1_error)
42732 __pyx_t_3 = (!__pyx_t_2);
42733 if (unlikely(__pyx_t_3)) {
42734
42735 /* "pysam/libcbcf.pyx":2088
42736 *
42737 * if not rec:
42738 * raise MemoryError('unable to allocate BCF record') # <<<<<<<<<<<<<<
42739 *
42740 * rec.ptr.n_sample = bcf_hdr_nsamples(self.ptr)
42741 */
42742 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
42743 __Pyx_GOTREF(__pyx_t_1);
42744 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
42745 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42746 __PYX_ERR(0, 2088, __pyx_L1_error)
42747
42748 /* "pysam/libcbcf.pyx":2087
42749 * rec = makeVariantRecord(self, bcf_init())
42750 *
42751 * if not rec: # <<<<<<<<<<<<<<
42752 * raise MemoryError('unable to allocate BCF record')
42753 *
42754 */
42755 }
42756
42757 /* "pysam/libcbcf.pyx":2090
42758 * raise MemoryError('unable to allocate BCF record')
42759 *
42760 * rec.ptr.n_sample = bcf_hdr_nsamples(self.ptr) # <<<<<<<<<<<<<<
42761 *
42762 * if contig is not None:
42763 */
42764 __pyx_v_rec->ptr->n_sample = bcf_hdr_nsamples(__pyx_v_self->ptr);
42765
42766 /* "pysam/libcbcf.pyx":2092
42767 * rec.ptr.n_sample = bcf_hdr_nsamples(self.ptr)
42768 *
42769 * if contig is not None: # <<<<<<<<<<<<<<
42770 * rec.contig = contig
42771 *
42772 */
42773 __pyx_t_3 = (__pyx_v_contig != Py_None);
42774 if (__pyx_t_3) {
42775
42776 /* "pysam/libcbcf.pyx":2093
42777 *
42778 * if contig is not None:
42779 * rec.contig = contig # <<<<<<<<<<<<<<
42780 *
42781 * rec.start = start
42782 */
42783 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_contig, __pyx_v_contig) < 0) __PYX_ERR(0, 2093, __pyx_L1_error)
42784
42785 /* "pysam/libcbcf.pyx":2092
42786 * rec.ptr.n_sample = bcf_hdr_nsamples(self.ptr)
42787 *
42788 * if contig is not None: # <<<<<<<<<<<<<<
42789 * rec.contig = contig
42790 *
42791 */
42792 }
42793
42794 /* "pysam/libcbcf.pyx":2095
42795 * rec.contig = contig
42796 *
42797 * rec.start = start # <<<<<<<<<<<<<<
42798 * rec.stop = stop
42799 * rec.id = id
42800 */
42801 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_start, __pyx_v_start) < 0) __PYX_ERR(0, 2095, __pyx_L1_error)
42802
42803 /* "pysam/libcbcf.pyx":2096
42804 *
42805 * rec.start = start
42806 * rec.stop = stop # <<<<<<<<<<<<<<
42807 * rec.id = id
42808 * rec.qual = qual
42809 */
42810 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_stop, __pyx_v_stop) < 0) __PYX_ERR(0, 2096, __pyx_L1_error)
42811
42812 /* "pysam/libcbcf.pyx":2097
42813 * rec.start = start
42814 * rec.stop = stop
42815 * rec.id = id # <<<<<<<<<<<<<<
42816 * rec.qual = qual
42817 *
42818 */
42819 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_id, __pyx_v_id) < 0) __PYX_ERR(0, 2097, __pyx_L1_error)
42820
42821 /* "pysam/libcbcf.pyx":2098
42822 * rec.stop = stop
42823 * rec.id = id
42824 * rec.qual = qual # <<<<<<<<<<<<<<
42825 *
42826 * if alleles is not None:
42827 */
42828 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_qual, __pyx_v_qual) < 0) __PYX_ERR(0, 2098, __pyx_L1_error)
42829
42830 /* "pysam/libcbcf.pyx":2100
42831 * rec.qual = qual
42832 *
42833 * if alleles is not None: # <<<<<<<<<<<<<<
42834 * rec.alleles = alleles
42835 *
42836 */
42837 __pyx_t_3 = (__pyx_v_alleles != Py_None);
42838 if (__pyx_t_3) {
42839
42840 /* "pysam/libcbcf.pyx":2101
42841 *
42842 * if alleles is not None:
42843 * rec.alleles = alleles # <<<<<<<<<<<<<<
42844 *
42845 * if filter is not None:
42846 */
42847 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_alleles, __pyx_v_alleles) < 0) __PYX_ERR(0, 2101, __pyx_L1_error)
42848
42849 /* "pysam/libcbcf.pyx":2100
42850 * rec.qual = qual
42851 *
42852 * if alleles is not None: # <<<<<<<<<<<<<<
42853 * rec.alleles = alleles
42854 *
42855 */
42856 }
42857
42858 /* "pysam/libcbcf.pyx":2103
42859 * rec.alleles = alleles
42860 *
42861 * if filter is not None: # <<<<<<<<<<<<<<
42862 * if isinstance(filter, (list, tuple, VariantRecordFilter)):
42863 * for f in filter:
42864 */
42865 __pyx_t_3 = (__pyx_v_filter != Py_None);
42866 if (__pyx_t_3) {
42867
42868 /* "pysam/libcbcf.pyx":2104
42869 *
42870 * if filter is not None:
42871 * if isinstance(filter, (list, tuple, VariantRecordFilter)): # <<<<<<<<<<<<<<
42872 * for f in filter:
42873 * rec.filter.add(f)
42874 */
42875 __pyx_t_2 = PyList_Check(__pyx_v_filter);
42876 if (!__pyx_t_2) {
42877 } else {
42878 __pyx_t_3 = __pyx_t_2;
42879 goto __pyx_L8_bool_binop_done;
42880 }
42881 __pyx_t_2 = PyTuple_Check(__pyx_v_filter);
42882 if (!__pyx_t_2) {
42883 } else {
42884 __pyx_t_3 = __pyx_t_2;
42885 goto __pyx_L8_bool_binop_done;
42886 }
42887 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_filter, __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
42888 __pyx_t_3 = __pyx_t_2;
42889 __pyx_L8_bool_binop_done:;
42890 if (__pyx_t_3) {
42891
42892 /* "pysam/libcbcf.pyx":2105
42893 * if filter is not None:
42894 * if isinstance(filter, (list, tuple, VariantRecordFilter)):
42895 * for f in filter: # <<<<<<<<<<<<<<
42896 * rec.filter.add(f)
42897 * else:
42898 */
42899 if (likely(PyList_CheckExact(__pyx_v_filter)) || PyTuple_CheckExact(__pyx_v_filter)) {
42900 __pyx_t_1 = __pyx_v_filter; __Pyx_INCREF(__pyx_t_1);
42901 __pyx_t_4 = 0;
42902 __pyx_t_5 = NULL;
42903 } else {
42904 __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2105, __pyx_L1_error)
42905 __Pyx_GOTREF(__pyx_t_1);
42906 __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2105, __pyx_L1_error)
42907 }
42908 for (;;) {
42909 if (likely(!__pyx_t_5)) {
42910 if (likely(PyList_CheckExact(__pyx_t_1))) {
42911 {
42912 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
42913 #if !CYTHON_ASSUME_SAFE_MACROS
42914 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2105, __pyx_L1_error)
42915 #endif
42916 if (__pyx_t_4 >= __pyx_temp) break;
42917 }
42918 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
42919 __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 2105, __pyx_L1_error)
42920 #else
42921 __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2105, __pyx_L1_error)
42922 __Pyx_GOTREF(__pyx_t_6);
42923 #endif
42924 } else {
42925 {
42926 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
42927 #if !CYTHON_ASSUME_SAFE_MACROS
42928 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2105, __pyx_L1_error)
42929 #endif
42930 if (__pyx_t_4 >= __pyx_temp) break;
42931 }
42932 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
42933 __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 2105, __pyx_L1_error)
42934 #else
42935 __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2105, __pyx_L1_error)
42936 __Pyx_GOTREF(__pyx_t_6);
42937 #endif
42938 }
42939 } else {
42940 __pyx_t_6 = __pyx_t_5(__pyx_t_1);
42941 if (unlikely(!__pyx_t_6)) {
42942 PyObject* exc_type = PyErr_Occurred();
42943 if (exc_type) {
42944 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
42945 else __PYX_ERR(0, 2105, __pyx_L1_error)
42946 }
42947 break;
42948 }
42949 __Pyx_GOTREF(__pyx_t_6);
42950 }
42951 __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_6);
42952 __pyx_t_6 = 0;
42953
42954 /* "pysam/libcbcf.pyx":2106
42955 * if isinstance(filter, (list, tuple, VariantRecordFilter)):
42956 * for f in filter:
42957 * rec.filter.add(f) # <<<<<<<<<<<<<<
42958 * else:
42959 * rec.filter.add(filter)
42960 */
42961 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2106, __pyx_L1_error)
42962 __Pyx_GOTREF(__pyx_t_7);
42963 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_add); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2106, __pyx_L1_error)
42964 __Pyx_GOTREF(__pyx_t_8);
42965 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
42966 __pyx_t_7 = NULL;
42967 __pyx_t_9 = 0;
42968 #if CYTHON_UNPACK_METHODS
42969 if (likely(PyMethod_Check(__pyx_t_8))) {
42970 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
42971 if (likely(__pyx_t_7)) {
42972 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
42973 __Pyx_INCREF(__pyx_t_7);
42974 __Pyx_INCREF(function);
42975 __Pyx_DECREF_SET(__pyx_t_8, function);
42976 __pyx_t_9 = 1;
42977 }
42978 }
42979 #endif
42980 {
42981 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_f};
42982 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
42983 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
42984 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2106, __pyx_L1_error)
42985 __Pyx_GOTREF(__pyx_t_6);
42986 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
42987 }
42988 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42989
42990 /* "pysam/libcbcf.pyx":2105
42991 * if filter is not None:
42992 * if isinstance(filter, (list, tuple, VariantRecordFilter)):
42993 * for f in filter: # <<<<<<<<<<<<<<
42994 * rec.filter.add(f)
42995 * else:
42996 */
42997 }
42998 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42999
43000 /* "pysam/libcbcf.pyx":2104
43001 *
43002 * if filter is not None:
43003 * if isinstance(filter, (list, tuple, VariantRecordFilter)): # <<<<<<<<<<<<<<
43004 * for f in filter:
43005 * rec.filter.add(f)
43006 */
43007 goto __pyx_L7;
43008 }
43009
43010 /* "pysam/libcbcf.pyx":2108
43011 * rec.filter.add(f)
43012 * else:
43013 * rec.filter.add(filter) # <<<<<<<<<<<<<<
43014 *
43015 * if info:
43016 */
43017 /*else*/ {
43018 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2108, __pyx_L1_error)
43019 __Pyx_GOTREF(__pyx_t_6);
43020 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_add); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2108, __pyx_L1_error)
43021 __Pyx_GOTREF(__pyx_t_8);
43022 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43023 __pyx_t_6 = NULL;
43024 __pyx_t_9 = 0;
43025 #if CYTHON_UNPACK_METHODS
43026 if (likely(PyMethod_Check(__pyx_t_8))) {
43027 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
43028 if (likely(__pyx_t_6)) {
43029 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
43030 __Pyx_INCREF(__pyx_t_6);
43031 __Pyx_INCREF(function);
43032 __Pyx_DECREF_SET(__pyx_t_8, function);
43033 __pyx_t_9 = 1;
43034 }
43035 }
43036 #endif
43037 {
43038 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_filter};
43039 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
43040 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
43041 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2108, __pyx_L1_error)
43042 __Pyx_GOTREF(__pyx_t_1);
43043 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43044 }
43045 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43046 }
43047 __pyx_L7:;
43048
43049 /* "pysam/libcbcf.pyx":2103
43050 * rec.alleles = alleles
43051 *
43052 * if filter is not None: # <<<<<<<<<<<<<<
43053 * if isinstance(filter, (list, tuple, VariantRecordFilter)):
43054 * for f in filter:
43055 */
43056 }
43057
43058 /* "pysam/libcbcf.pyx":2110
43059 * rec.filter.add(filter)
43060 *
43061 * if info: # <<<<<<<<<<<<<<
43062 * rec.info.update(info)
43063 *
43064 */
43065 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_info); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2110, __pyx_L1_error)
43066 if (__pyx_t_3) {
43067
43068 /* "pysam/libcbcf.pyx":2111
43069 *
43070 * if info:
43071 * rec.info.update(info) # <<<<<<<<<<<<<<
43072 *
43073 * if kwargs:
43074 */
43075 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2111, __pyx_L1_error)
43076 __Pyx_GOTREF(__pyx_t_8);
43077 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2111, __pyx_L1_error)
43078 __Pyx_GOTREF(__pyx_t_6);
43079 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43080 __pyx_t_8 = NULL;
43081 __pyx_t_9 = 0;
43082 #if CYTHON_UNPACK_METHODS
43083 if (likely(PyMethod_Check(__pyx_t_6))) {
43084 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
43085 if (likely(__pyx_t_8)) {
43086 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
43087 __Pyx_INCREF(__pyx_t_8);
43088 __Pyx_INCREF(function);
43089 __Pyx_DECREF_SET(__pyx_t_6, function);
43090 __pyx_t_9 = 1;
43091 }
43092 }
43093 #endif
43094 {
43095 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_info};
43096 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
43097 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43098 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2111, __pyx_L1_error)
43099 __Pyx_GOTREF(__pyx_t_1);
43100 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43101 }
43102 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43103
43104 /* "pysam/libcbcf.pyx":2110
43105 * rec.filter.add(filter)
43106 *
43107 * if info: # <<<<<<<<<<<<<<
43108 * rec.info.update(info)
43109 *
43110 */
43111 }
43112
43113 /* "pysam/libcbcf.pyx":2113
43114 * rec.info.update(info)
43115 *
43116 * if kwargs: # <<<<<<<<<<<<<<
43117 * rec.samples[0].update(kwargs)
43118 *
43119 */
43120 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2113, __pyx_L1_error)
43121 if (__pyx_t_3) {
43122
43123 /* "pysam/libcbcf.pyx":2114
43124 *
43125 * if kwargs:
43126 * rec.samples[0].update(kwargs) # <<<<<<<<<<<<<<
43127 *
43128 * if samples:
43129 */
43130 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_samples); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2114, __pyx_L1_error)
43131 __Pyx_GOTREF(__pyx_t_6);
43132 __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2114, __pyx_L1_error)
43133 __Pyx_GOTREF(__pyx_t_8);
43134 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43135 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2114, __pyx_L1_error)
43136 __Pyx_GOTREF(__pyx_t_6);
43137 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43138 __pyx_t_8 = NULL;
43139 __pyx_t_9 = 0;
43140 #if CYTHON_UNPACK_METHODS
43141 if (likely(PyMethod_Check(__pyx_t_6))) {
43142 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
43143 if (likely(__pyx_t_8)) {
43144 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
43145 __Pyx_INCREF(__pyx_t_8);
43146 __Pyx_INCREF(function);
43147 __Pyx_DECREF_SET(__pyx_t_6, function);
43148 __pyx_t_9 = 1;
43149 }
43150 }
43151 #endif
43152 {
43153 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_kwargs};
43154 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
43155 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43156 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2114, __pyx_L1_error)
43157 __Pyx_GOTREF(__pyx_t_1);
43158 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43159 }
43160 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43161
43162 /* "pysam/libcbcf.pyx":2113
43163 * rec.info.update(info)
43164 *
43165 * if kwargs: # <<<<<<<<<<<<<<
43166 * rec.samples[0].update(kwargs)
43167 *
43168 */
43169 }
43170
43171 /* "pysam/libcbcf.pyx":2116
43172 * rec.samples[0].update(kwargs)
43173 *
43174 * if samples: # <<<<<<<<<<<<<<
43175 * for i, sample in enumerate(samples):
43176 * rec.samples[i].update(sample)
43177 */
43178 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_samples); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2116, __pyx_L1_error)
43179 if (__pyx_t_3) {
43180
43181 /* "pysam/libcbcf.pyx":2117
43182 *
43183 * if samples:
43184 * for i, sample in enumerate(samples): # <<<<<<<<<<<<<<
43185 * rec.samples[i].update(sample)
43186 *
43187 */
43188 __Pyx_INCREF(__pyx_int_0);
43189 __pyx_t_1 = __pyx_int_0;
43190 if (likely(PyList_CheckExact(__pyx_v_samples)) || PyTuple_CheckExact(__pyx_v_samples)) {
43191 __pyx_t_6 = __pyx_v_samples; __Pyx_INCREF(__pyx_t_6);
43192 __pyx_t_4 = 0;
43193 __pyx_t_5 = NULL;
43194 } else {
43195 __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_samples); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2117, __pyx_L1_error)
43196 __Pyx_GOTREF(__pyx_t_6);
43197 __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2117, __pyx_L1_error)
43198 }
43199 for (;;) {
43200 if (likely(!__pyx_t_5)) {
43201 if (likely(PyList_CheckExact(__pyx_t_6))) {
43202 {
43203 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
43204 #if !CYTHON_ASSUME_SAFE_MACROS
43205 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2117, __pyx_L1_error)
43206 #endif
43207 if (__pyx_t_4 >= __pyx_temp) break;
43208 }
43209 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
43210 __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 2117, __pyx_L1_error)
43211 #else
43212 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2117, __pyx_L1_error)
43213 __Pyx_GOTREF(__pyx_t_8);
43214 #endif
43215 } else {
43216 {
43217 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
43218 #if !CYTHON_ASSUME_SAFE_MACROS
43219 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2117, __pyx_L1_error)
43220 #endif
43221 if (__pyx_t_4 >= __pyx_temp) break;
43222 }
43223 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
43224 __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 2117, __pyx_L1_error)
43225 #else
43226 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2117, __pyx_L1_error)
43227 __Pyx_GOTREF(__pyx_t_8);
43228 #endif
43229 }
43230 } else {
43231 __pyx_t_8 = __pyx_t_5(__pyx_t_6);
43232 if (unlikely(!__pyx_t_8)) {
43233 PyObject* exc_type = PyErr_Occurred();
43234 if (exc_type) {
43235 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
43236 else __PYX_ERR(0, 2117, __pyx_L1_error)
43237 }
43238 break;
43239 }
43240 __Pyx_GOTREF(__pyx_t_8);
43241 }
43242 __Pyx_XDECREF_SET(__pyx_v_sample, __pyx_t_8);
43243 __pyx_t_8 = 0;
43244 __Pyx_INCREF(__pyx_t_1);
43245 __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
43246 __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2117, __pyx_L1_error)
43247 __Pyx_GOTREF(__pyx_t_8);
43248 __Pyx_DECREF(__pyx_t_1);
43249 __pyx_t_1 = __pyx_t_8;
43250 __pyx_t_8 = 0;
43251
43252 /* "pysam/libcbcf.pyx":2118
43253 * if samples:
43254 * for i, sample in enumerate(samples):
43255 * rec.samples[i].update(sample) # <<<<<<<<<<<<<<
43256 *
43257 * return rec
43258 */
43259 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rec), __pyx_n_s_samples); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2118, __pyx_L1_error)
43260 __Pyx_GOTREF(__pyx_t_7);
43261 __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2118, __pyx_L1_error)
43262 __Pyx_GOTREF(__pyx_t_10);
43263 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
43264 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2118, __pyx_L1_error)
43265 __Pyx_GOTREF(__pyx_t_7);
43266 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
43267 __pyx_t_10 = NULL;
43268 __pyx_t_9 = 0;
43269 #if CYTHON_UNPACK_METHODS
43270 if (likely(PyMethod_Check(__pyx_t_7))) {
43271 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
43272 if (likely(__pyx_t_10)) {
43273 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
43274 __Pyx_INCREF(__pyx_t_10);
43275 __Pyx_INCREF(function);
43276 __Pyx_DECREF_SET(__pyx_t_7, function);
43277 __pyx_t_9 = 1;
43278 }
43279 }
43280 #endif
43281 {
43282 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_sample};
43283 __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
43284 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
43285 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2118, __pyx_L1_error)
43286 __Pyx_GOTREF(__pyx_t_8);
43287 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
43288 }
43289 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43290
43291 /* "pysam/libcbcf.pyx":2117
43292 *
43293 * if samples:
43294 * for i, sample in enumerate(samples): # <<<<<<<<<<<<<<
43295 * rec.samples[i].update(sample)
43296 *
43297 */
43298 }
43299 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43300 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43301
43302 /* "pysam/libcbcf.pyx":2116
43303 * rec.samples[0].update(kwargs)
43304 *
43305 * if samples: # <<<<<<<<<<<<<<
43306 * for i, sample in enumerate(samples):
43307 * rec.samples[i].update(sample)
43308 */
43309 }
43310
43311 /* "pysam/libcbcf.pyx":2120
43312 * rec.samples[i].update(sample)
43313 *
43314 * return rec # <<<<<<<<<<<<<<
43315 *
43316 * def add_record(self, VariantHeaderRecord record):
43317 */
43318 __Pyx_XDECREF(__pyx_r);
43319 __Pyx_INCREF((PyObject *)__pyx_v_rec);
43320 __pyx_r = ((PyObject *)__pyx_v_rec);
43321 goto __pyx_L0;
43322
43323 /* "pysam/libcbcf.pyx":2076
43324 * return ret
43325 *
43326 * def new_record(self, contig=None, start=0, stop=0, alleles=None, # <<<<<<<<<<<<<<
43327 * id=None, qual=None, filter=None, info=None, samples=None,
43328 * **kwargs):
43329 */
43330
43331 /* function exit code */
43332 __pyx_L1_error:;
43333 __Pyx_XDECREF(__pyx_t_1);
43334 __Pyx_XDECREF(__pyx_t_6);
43335 __Pyx_XDECREF(__pyx_t_7);
43336 __Pyx_XDECREF(__pyx_t_8);
43337 __Pyx_XDECREF(__pyx_t_10);
43338 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.new_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
43339 __pyx_r = NULL;
43340 __pyx_L0:;
43341 __Pyx_XDECREF((PyObject *)__pyx_v_rec);
43342 __Pyx_XDECREF(__pyx_v_f);
43343 __Pyx_XDECREF(__pyx_v_i);
43344 __Pyx_XDECREF(__pyx_v_sample);
43345 __Pyx_XGIVEREF(__pyx_r);
43346 __Pyx_TraceReturn(__pyx_r, 0);
43347 __Pyx_RefNannyFinishContext();
43348 return __pyx_r;
43349 }
43350
43351 /* "pysam/libcbcf.pyx":2122
43352 * return rec
43353 *
43354 * def add_record(self, VariantHeaderRecord record): # <<<<<<<<<<<<<<
43355 * """Add an existing :class:`VariantHeaderRecord` to this header"""
43356 * if record is None:
43357 */
43358
43359 /* Python wrapper */
43360 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_17add_record(PyObject *__pyx_v_self,
43361 #if CYTHON_METH_FASTCALL
43362 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
43363 #else
43364 PyObject *__pyx_args, PyObject *__pyx_kwds
43365 #endif
43366 ); /*proto*/
43367 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_16add_record, "VariantHeader.add_record(self, VariantHeaderRecord record)\nAdd an existing :class:`VariantHeaderRecord` to this header");
43368 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_17add_record = {"add_record", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_17add_record, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_16add_record};
43369 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_17add_record(PyObject *__pyx_v_self,
43370 #if CYTHON_METH_FASTCALL
43371 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
43372 #else
43373 PyObject *__pyx_args, PyObject *__pyx_kwds
43374 #endif
43375 ) {
43376 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_record = 0;
43377 #if !CYTHON_METH_FASTCALL
43378 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
43379 #endif
43380 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
43381 PyObject* values[1] = {0};
43382 int __pyx_lineno = 0;
43383 const char *__pyx_filename = NULL;
43384 int __pyx_clineno = 0;
43385 PyObject *__pyx_r = 0;
43386 __Pyx_RefNannyDeclarations
43387 __Pyx_RefNannySetupContext("add_record (wrapper)", 0);
43388 #if !CYTHON_METH_FASTCALL
43389 #if CYTHON_ASSUME_SAFE_MACROS
43390 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
43391 #else
43392 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
43393 #endif
43394 #endif
43395 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
43396 {
43397 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,0};
43398 if (__pyx_kwds) {
43399 Py_ssize_t kw_args;
43400 switch (__pyx_nargs) {
43401 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
43402 CYTHON_FALLTHROUGH;
43403 case 0: break;
43404 default: goto __pyx_L5_argtuple_error;
43405 }
43406 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
43407 switch (__pyx_nargs) {
43408 case 0:
43409 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_record)) != 0)) {
43410 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
43411 kw_args--;
43412 }
43413 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2122, __pyx_L3_error)
43414 else goto __pyx_L5_argtuple_error;
43415 }
43416 if (unlikely(kw_args > 0)) {
43417 const Py_ssize_t kwd_pos_args = __pyx_nargs;
43418 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_record") < 0)) __PYX_ERR(0, 2122, __pyx_L3_error)
43419 }
43420 } else if (unlikely(__pyx_nargs != 1)) {
43421 goto __pyx_L5_argtuple_error;
43422 } else {
43423 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
43424 }
43425 __pyx_v_record = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)values[0]);
43426 }
43427 goto __pyx_L6_skip;
43428 __pyx_L5_argtuple_error:;
43429 __Pyx_RaiseArgtupleInvalid("add_record", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2122, __pyx_L3_error)
43430 __pyx_L6_skip:;
43431 goto __pyx_L4_argument_unpacking_done;
43432 __pyx_L3_error:;
43433 {
43434 Py_ssize_t __pyx_temp;
43435 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
43436 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
43437 }
43438 }
43439 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
43440 __Pyx_RefNannyFinishContext();
43441 return NULL;
43442 __pyx_L4_argument_unpacking_done:;
43443 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, 1, "record", 0))) __PYX_ERR(0, 2122, __pyx_L1_error)
43444 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_16add_record(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self), __pyx_v_record);
43445
43446 /* function exit code */
43447 goto __pyx_L0;
43448 __pyx_L1_error:;
43449 __pyx_r = NULL;
43450 __pyx_L0:;
43451 {
43452 Py_ssize_t __pyx_temp;
43453 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
43454 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
43455 }
43456 }
43457 __Pyx_RefNannyFinishContext();
43458 return __pyx_r;
43459 }
43460
43461 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_16add_record(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *__pyx_v_record) {
43462 bcf_hrec_t *__pyx_v_hrec;
43463 PyObject *__pyx_r = NULL;
43464 __Pyx_TraceDeclarations
43465 __Pyx_RefNannyDeclarations
43466 int __pyx_t_1;
43467 PyObject *__pyx_t_2 = NULL;
43468 int __pyx_lineno = 0;
43469 const char *__pyx_filename = NULL;
43470 int __pyx_clineno = 0;
43471 __Pyx_TraceFrameInit(__pyx_codeobj__101)
43472 __Pyx_RefNannySetupContext("add_record", 1);
43473 __Pyx_TraceCall("add_record", __pyx_f[0], 2122, 0, __PYX_ERR(0, 2122, __pyx_L1_error));
43474
43475 /* "pysam/libcbcf.pyx":2124
43476 * def add_record(self, VariantHeaderRecord record):
43477 * """Add an existing :class:`VariantHeaderRecord` to this header"""
43478 * if record is None: # <<<<<<<<<<<<<<
43479 * raise ValueError('record must not be None')
43480 *
43481 */
43482 __pyx_t_1 = (((PyObject *)__pyx_v_record) == Py_None);
43483 if (unlikely(__pyx_t_1)) {
43484
43485 /* "pysam/libcbcf.pyx":2125
43486 * """Add an existing :class:`VariantHeaderRecord` to this header"""
43487 * if record is None:
43488 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
43489 *
43490 * cdef bcf_hrec_t *hrec = bcf_hrec_dup(record.ptr)
43491 */
43492 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2125, __pyx_L1_error)
43493 __Pyx_GOTREF(__pyx_t_2);
43494 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
43495 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43496 __PYX_ERR(0, 2125, __pyx_L1_error)
43497
43498 /* "pysam/libcbcf.pyx":2124
43499 * def add_record(self, VariantHeaderRecord record):
43500 * """Add an existing :class:`VariantHeaderRecord` to this header"""
43501 * if record is None: # <<<<<<<<<<<<<<
43502 * raise ValueError('record must not be None')
43503 *
43504 */
43505 }
43506
43507 /* "pysam/libcbcf.pyx":2127
43508 * raise ValueError('record must not be None')
43509 *
43510 * cdef bcf_hrec_t *hrec = bcf_hrec_dup(record.ptr) # <<<<<<<<<<<<<<
43511 *
43512 * bcf_hdr_add_hrec(self.ptr, hrec)
43513 */
43514 __pyx_v_hrec = bcf_hrec_dup(__pyx_v_record->ptr);
43515
43516 /* "pysam/libcbcf.pyx":2129
43517 * cdef bcf_hrec_t *hrec = bcf_hrec_dup(record.ptr)
43518 *
43519 * bcf_hdr_add_hrec(self.ptr, hrec) # <<<<<<<<<<<<<<
43520 *
43521 * self._hdr_sync()
43522 */
43523 (void)(bcf_hdr_add_hrec(__pyx_v_self->ptr, __pyx_v_hrec));
43524
43525 /* "pysam/libcbcf.pyx":2131
43526 * bcf_hdr_add_hrec(self.ptr, hrec)
43527 *
43528 * self._hdr_sync() # <<<<<<<<<<<<<<
43529 *
43530 * def add_line(self, line):
43531 */
43532 __pyx_t_2 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->__pyx_vtab)->_hdr_sync(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
43533 __Pyx_GOTREF(__pyx_t_2);
43534 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43535
43536 /* "pysam/libcbcf.pyx":2122
43537 * return rec
43538 *
43539 * def add_record(self, VariantHeaderRecord record): # <<<<<<<<<<<<<<
43540 * """Add an existing :class:`VariantHeaderRecord` to this header"""
43541 * if record is None:
43542 */
43543
43544 /* function exit code */
43545 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43546 goto __pyx_L0;
43547 __pyx_L1_error:;
43548 __Pyx_XDECREF(__pyx_t_2);
43549 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
43550 __pyx_r = NULL;
43551 __pyx_L0:;
43552 __Pyx_XGIVEREF(__pyx_r);
43553 __Pyx_TraceReturn(__pyx_r, 0);
43554 __Pyx_RefNannyFinishContext();
43555 return __pyx_r;
43556 }
43557
43558 /* "pysam/libcbcf.pyx":2133
43559 * self._hdr_sync()
43560 *
43561 * def add_line(self, line): # <<<<<<<<<<<<<<
43562 * """Add a metadata line to this header"""
43563 * bline = force_bytes(line)
43564 */
43565
43566 /* Python wrapper */
43567 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_19add_line(PyObject *__pyx_v_self,
43568 #if CYTHON_METH_FASTCALL
43569 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
43570 #else
43571 PyObject *__pyx_args, PyObject *__pyx_kwds
43572 #endif
43573 ); /*proto*/
43574 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_18add_line, "VariantHeader.add_line(self, line)\nAdd a metadata line to this header");
43575 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_19add_line = {"add_line", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_19add_line, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_18add_line};
43576 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_19add_line(PyObject *__pyx_v_self,
43577 #if CYTHON_METH_FASTCALL
43578 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
43579 #else
43580 PyObject *__pyx_args, PyObject *__pyx_kwds
43581 #endif
43582 ) {
43583 PyObject *__pyx_v_line = 0;
43584 #if !CYTHON_METH_FASTCALL
43585 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
43586 #endif
43587 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
43588 PyObject* values[1] = {0};
43589 int __pyx_lineno = 0;
43590 const char *__pyx_filename = NULL;
43591 int __pyx_clineno = 0;
43592 PyObject *__pyx_r = 0;
43593 __Pyx_RefNannyDeclarations
43594 __Pyx_RefNannySetupContext("add_line (wrapper)", 0);
43595 #if !CYTHON_METH_FASTCALL
43596 #if CYTHON_ASSUME_SAFE_MACROS
43597 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
43598 #else
43599 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
43600 #endif
43601 #endif
43602 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
43603 {
43604 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line,0};
43605 if (__pyx_kwds) {
43606 Py_ssize_t kw_args;
43607 switch (__pyx_nargs) {
43608 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
43609 CYTHON_FALLTHROUGH;
43610 case 0: break;
43611 default: goto __pyx_L5_argtuple_error;
43612 }
43613 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
43614 switch (__pyx_nargs) {
43615 case 0:
43616 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) {
43617 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
43618 kw_args--;
43619 }
43620 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2133, __pyx_L3_error)
43621 else goto __pyx_L5_argtuple_error;
43622 }
43623 if (unlikely(kw_args > 0)) {
43624 const Py_ssize_t kwd_pos_args = __pyx_nargs;
43625 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_line") < 0)) __PYX_ERR(0, 2133, __pyx_L3_error)
43626 }
43627 } else if (unlikely(__pyx_nargs != 1)) {
43628 goto __pyx_L5_argtuple_error;
43629 } else {
43630 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
43631 }
43632 __pyx_v_line = values[0];
43633 }
43634 goto __pyx_L6_skip;
43635 __pyx_L5_argtuple_error:;
43636 __Pyx_RaiseArgtupleInvalid("add_line", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2133, __pyx_L3_error)
43637 __pyx_L6_skip:;
43638 goto __pyx_L4_argument_unpacking_done;
43639 __pyx_L3_error:;
43640 {
43641 Py_ssize_t __pyx_temp;
43642 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
43643 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
43644 }
43645 }
43646 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_line", __pyx_clineno, __pyx_lineno, __pyx_filename);
43647 __Pyx_RefNannyFinishContext();
43648 return NULL;
43649 __pyx_L4_argument_unpacking_done:;
43650 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_18add_line(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self), __pyx_v_line);
43651
43652 /* function exit code */
43653 {
43654 Py_ssize_t __pyx_temp;
43655 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
43656 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
43657 }
43658 }
43659 __Pyx_RefNannyFinishContext();
43660 return __pyx_r;
43661 }
43662
43663 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_18add_line(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_line) {
43664 PyObject *__pyx_v_bline = NULL;
43665 PyObject *__pyx_r = NULL;
43666 __Pyx_TraceDeclarations
43667 __Pyx_RefNannyDeclarations
43668 PyObject *__pyx_t_1 = NULL;
43669 char const *__pyx_t_2;
43670 int __pyx_t_3;
43671 int __pyx_lineno = 0;
43672 const char *__pyx_filename = NULL;
43673 int __pyx_clineno = 0;
43674 __Pyx_TraceFrameInit(__pyx_codeobj__102)
43675 __Pyx_RefNannySetupContext("add_line", 1);
43676 __Pyx_TraceCall("add_line", __pyx_f[0], 2133, 0, __PYX_ERR(0, 2133, __pyx_L1_error));
43677
43678 /* "pysam/libcbcf.pyx":2135
43679 * def add_line(self, line):
43680 * """Add a metadata line to this header"""
43681 * bline = force_bytes(line) # <<<<<<<<<<<<<<
43682 * if bcf_hdr_append(self.ptr, bline) < 0:
43683 * raise ValueError('invalid header line')
43684 */
43685 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_line, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2135, __pyx_L1_error)
43686 __Pyx_GOTREF(__pyx_t_1);
43687 __pyx_v_bline = ((PyObject*)__pyx_t_1);
43688 __pyx_t_1 = 0;
43689
43690 /* "pysam/libcbcf.pyx":2136
43691 * """Add a metadata line to this header"""
43692 * bline = force_bytes(line)
43693 * if bcf_hdr_append(self.ptr, bline) < 0: # <<<<<<<<<<<<<<
43694 * raise ValueError('invalid header line')
43695 *
43696 */
43697 if (unlikely(__pyx_v_bline == Py_None)) {
43698 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
43699 __PYX_ERR(0, 2136, __pyx_L1_error)
43700 }
43701 __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_bline); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2136, __pyx_L1_error)
43702 __pyx_t_3 = (bcf_hdr_append(__pyx_v_self->ptr, __pyx_t_2) < 0);
43703 if (unlikely(__pyx_t_3)) {
43704
43705 /* "pysam/libcbcf.pyx":2137
43706 * bline = force_bytes(line)
43707 * if bcf_hdr_append(self.ptr, bline) < 0:
43708 * raise ValueError('invalid header line') # <<<<<<<<<<<<<<
43709 *
43710 * self._hdr_sync()
43711 */
43712 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __pyx_L1_error)
43713 __Pyx_GOTREF(__pyx_t_1);
43714 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
43715 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43716 __PYX_ERR(0, 2137, __pyx_L1_error)
43717
43718 /* "pysam/libcbcf.pyx":2136
43719 * """Add a metadata line to this header"""
43720 * bline = force_bytes(line)
43721 * if bcf_hdr_append(self.ptr, bline) < 0: # <<<<<<<<<<<<<<
43722 * raise ValueError('invalid header line')
43723 *
43724 */
43725 }
43726
43727 /* "pysam/libcbcf.pyx":2139
43728 * raise ValueError('invalid header line')
43729 *
43730 * self._hdr_sync() # <<<<<<<<<<<<<<
43731 *
43732 *
43733 */
43734 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->__pyx_vtab)->_hdr_sync(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2139, __pyx_L1_error)
43735 __Pyx_GOTREF(__pyx_t_1);
43736 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43737
43738 /* "pysam/libcbcf.pyx":2133
43739 * self._hdr_sync()
43740 *
43741 * def add_line(self, line): # <<<<<<<<<<<<<<
43742 * """Add a metadata line to this header"""
43743 * bline = force_bytes(line)
43744 */
43745
43746 /* function exit code */
43747 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43748 goto __pyx_L0;
43749 __pyx_L1_error:;
43750 __Pyx_XDECREF(__pyx_t_1);
43751 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_line", __pyx_clineno, __pyx_lineno, __pyx_filename);
43752 __pyx_r = NULL;
43753 __pyx_L0:;
43754 __Pyx_XDECREF(__pyx_v_bline);
43755 __Pyx_XGIVEREF(__pyx_r);
43756 __Pyx_TraceReturn(__pyx_r, 0);
43757 __Pyx_RefNannyFinishContext();
43758 return __pyx_r;
43759 }
43760
43761 /* "pysam/libcbcf.pyx":2142
43762 *
43763 *
43764 * def add_meta(self, key, value=None, items=None): # <<<<<<<<<<<<<<
43765 * """Add metadata to this header"""
43766 * if not ((value is not None) ^ (items is not None)):
43767 */
43768
43769 /* Python wrapper */
43770 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_21add_meta(PyObject *__pyx_v_self,
43771 #if CYTHON_METH_FASTCALL
43772 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
43773 #else
43774 PyObject *__pyx_args, PyObject *__pyx_kwds
43775 #endif
43776 ); /*proto*/
43777 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_20add_meta, "VariantHeader.add_meta(self, key, value=None, items=None)\nAdd metadata to this header");
43778 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_21add_meta = {"add_meta", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_21add_meta, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_20add_meta};
43779 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_21add_meta(PyObject *__pyx_v_self,
43780 #if CYTHON_METH_FASTCALL
43781 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
43782 #else
43783 PyObject *__pyx_args, PyObject *__pyx_kwds
43784 #endif
43785 ) {
43786 PyObject *__pyx_v_key = 0;
43787 PyObject *__pyx_v_value = 0;
43788 PyObject *__pyx_v_items = 0;
43789 #if !CYTHON_METH_FASTCALL
43790 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
43791 #endif
43792 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
43793 PyObject* values[3] = {0,0,0};
43794 int __pyx_lineno = 0;
43795 const char *__pyx_filename = NULL;
43796 int __pyx_clineno = 0;
43797 PyObject *__pyx_r = 0;
43798 __Pyx_RefNannyDeclarations
43799 __Pyx_RefNannySetupContext("add_meta (wrapper)", 0);
43800 #if !CYTHON_METH_FASTCALL
43801 #if CYTHON_ASSUME_SAFE_MACROS
43802 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
43803 #else
43804 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
43805 #endif
43806 #endif
43807 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
43808 {
43809 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,&__pyx_n_s_items,0};
43810 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
43811 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
43812 if (__pyx_kwds) {
43813 Py_ssize_t kw_args;
43814 switch (__pyx_nargs) {
43815 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
43816 CYTHON_FALLTHROUGH;
43817 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
43818 CYTHON_FALLTHROUGH;
43819 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
43820 CYTHON_FALLTHROUGH;
43821 case 0: break;
43822 default: goto __pyx_L5_argtuple_error;
43823 }
43824 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
43825 switch (__pyx_nargs) {
43826 case 0:
43827 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
43828 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
43829 kw_args--;
43830 }
43831 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2142, __pyx_L3_error)
43832 else goto __pyx_L5_argtuple_error;
43833 CYTHON_FALLTHROUGH;
43834 case 1:
43835 if (kw_args > 0) {
43836 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value);
43837 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
43838 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2142, __pyx_L3_error)
43839 }
43840 CYTHON_FALLTHROUGH;
43841 case 2:
43842 if (kw_args > 0) {
43843 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
43844 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
43845 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2142, __pyx_L3_error)
43846 }
43847 }
43848 if (unlikely(kw_args > 0)) {
43849 const Py_ssize_t kwd_pos_args = __pyx_nargs;
43850 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_meta") < 0)) __PYX_ERR(0, 2142, __pyx_L3_error)
43851 }
43852 } else {
43853 switch (__pyx_nargs) {
43854 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
43855 CYTHON_FALLTHROUGH;
43856 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
43857 CYTHON_FALLTHROUGH;
43858 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
43859 break;
43860 default: goto __pyx_L5_argtuple_error;
43861 }
43862 }
43863 __pyx_v_key = values[0];
43864 __pyx_v_value = values[1];
43865 __pyx_v_items = values[2];
43866 }
43867 goto __pyx_L6_skip;
43868 __pyx_L5_argtuple_error:;
43869 __Pyx_RaiseArgtupleInvalid("add_meta", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2142, __pyx_L3_error)
43870 __pyx_L6_skip:;
43871 goto __pyx_L4_argument_unpacking_done;
43872 __pyx_L3_error:;
43873 {
43874 Py_ssize_t __pyx_temp;
43875 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
43876 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
43877 }
43878 }
43879 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_meta", __pyx_clineno, __pyx_lineno, __pyx_filename);
43880 __Pyx_RefNannyFinishContext();
43881 return NULL;
43882 __pyx_L4_argument_unpacking_done:;
43883 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_20add_meta(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self), __pyx_v_key, __pyx_v_value, __pyx_v_items);
43884
43885 /* function exit code */
43886 {
43887 Py_ssize_t __pyx_temp;
43888 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
43889 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
43890 }
43891 }
43892 __Pyx_RefNannyFinishContext();
43893 return __pyx_r;
43894 }
43895
43896 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_20add_meta(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_items) {
43897 bcf_hrec_t *__pyx_v_hrec;
43898 int __pyx_v_quoted;
43899 PyObject *__pyx_r = NULL;
43900 __Pyx_TraceDeclarations
43901 __Pyx_RefNannyDeclarations
43902 int __pyx_t_1;
43903 int __pyx_t_2;
43904 int __pyx_t_3;
43905 PyObject *__pyx_t_4 = NULL;
43906 PyObject *__pyx_t_5 = NULL;
43907 PyObject *__pyx_t_6 = NULL;
43908 PyObject *__pyx_t_7 = NULL;
43909 char const *__pyx_t_8;
43910 Py_ssize_t __pyx_t_9;
43911 PyObject *(*__pyx_t_10)(PyObject *);
43912 PyObject *__pyx_t_11 = NULL;
43913 PyObject *__pyx_t_12 = NULL;
43914 PyObject *__pyx_t_13 = NULL;
43915 PyObject *__pyx_t_14 = NULL;
43916 PyObject *(*__pyx_t_15)(PyObject *);
43917 int __pyx_t_16;
43918 char const *__pyx_t_17;
43919 Py_ssize_t __pyx_t_18;
43920 char const *__pyx_t_19;
43921 int __pyx_lineno = 0;
43922 const char *__pyx_filename = NULL;
43923 int __pyx_clineno = 0;
43924 __Pyx_TraceFrameInit(__pyx_codeobj__104)
43925 __Pyx_RefNannySetupContext("add_meta", 0);
43926 __Pyx_TraceCall("add_meta", __pyx_f[0], 2142, 0, __PYX_ERR(0, 2142, __pyx_L1_error));
43927 __Pyx_INCREF(__pyx_v_key);
43928 __Pyx_INCREF(__pyx_v_value);
43929
43930 /* "pysam/libcbcf.pyx":2144
43931 * def add_meta(self, key, value=None, items=None):
43932 * """Add metadata to this header"""
43933 * if not ((value is not None) ^ (items is not None)): # <<<<<<<<<<<<<<
43934 * raise ValueError('either value or items must be specified')
43935 *
43936 */
43937 __pyx_t_1 = (__pyx_v_value != Py_None);
43938 __pyx_t_2 = (__pyx_v_items != Py_None);
43939 __pyx_t_3 = (!(__pyx_t_1 ^ __pyx_t_2));
43940 if (unlikely(__pyx_t_3)) {
43941
43942 /* "pysam/libcbcf.pyx":2145
43943 * """Add metadata to this header"""
43944 * if not ((value is not None) ^ (items is not None)):
43945 * raise ValueError('either value or items must be specified') # <<<<<<<<<<<<<<
43946 *
43947 * cdef bcf_hrec_t *hrec = <bcf_hrec_t*>calloc(1, sizeof(bcf_hrec_t))
43948 */
43949 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2145, __pyx_L1_error)
43950 __Pyx_GOTREF(__pyx_t_4);
43951 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
43952 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43953 __PYX_ERR(0, 2145, __pyx_L1_error)
43954
43955 /* "pysam/libcbcf.pyx":2144
43956 * def add_meta(self, key, value=None, items=None):
43957 * """Add metadata to this header"""
43958 * if not ((value is not None) ^ (items is not None)): # <<<<<<<<<<<<<<
43959 * raise ValueError('either value or items must be specified')
43960 *
43961 */
43962 }
43963
43964 /* "pysam/libcbcf.pyx":2147
43965 * raise ValueError('either value or items must be specified')
43966 *
43967 * cdef bcf_hrec_t *hrec = <bcf_hrec_t*>calloc(1, sizeof(bcf_hrec_t)) # <<<<<<<<<<<<<<
43968 * cdef int quoted
43969 *
43970 */
43971 __pyx_v_hrec = ((bcf_hrec_t *)calloc(1, (sizeof(bcf_hrec_t))));
43972
43973 /* "pysam/libcbcf.pyx":2150
43974 * cdef int quoted
43975 *
43976 * try: # <<<<<<<<<<<<<<
43977 * key = force_bytes(key)
43978 * hrec.key = strdup(key)
43979 */
43980 {
43981 __Pyx_PyThreadState_declare
43982 __Pyx_PyThreadState_assign
43983 __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
43984 __Pyx_XGOTREF(__pyx_t_5);
43985 __Pyx_XGOTREF(__pyx_t_6);
43986 __Pyx_XGOTREF(__pyx_t_7);
43987 /*try:*/ {
43988
43989 /* "pysam/libcbcf.pyx":2151
43990 *
43991 * try:
43992 * key = force_bytes(key) # <<<<<<<<<<<<<<
43993 * hrec.key = strdup(key)
43994 *
43995 */
43996 __pyx_t_4 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2151, __pyx_L4_error)
43997 __Pyx_GOTREF(__pyx_t_4);
43998 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_4);
43999 __pyx_t_4 = 0;
44000
44001 /* "pysam/libcbcf.pyx":2152
44002 * try:
44003 * key = force_bytes(key)
44004 * hrec.key = strdup(key) # <<<<<<<<<<<<<<
44005 *
44006 * if value is not None:
44007 */
44008 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2152, __pyx_L4_error)
44009 __pyx_v_hrec->key = strdup(__pyx_t_8);
44010
44011 /* "pysam/libcbcf.pyx":2154
44012 * hrec.key = strdup(key)
44013 *
44014 * if value is not None: # <<<<<<<<<<<<<<
44015 * hrec.value = strdup(force_bytes(value))
44016 * else:
44017 */
44018 __pyx_t_3 = (__pyx_v_value != Py_None);
44019 if (__pyx_t_3) {
44020
44021 /* "pysam/libcbcf.pyx":2155
44022 *
44023 * if value is not None:
44024 * hrec.value = strdup(force_bytes(value)) # <<<<<<<<<<<<<<
44025 * else:
44026 * for key, value in items:
44027 */
44028 __pyx_t_4 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_value, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2155, __pyx_L4_error)
44029 __Pyx_GOTREF(__pyx_t_4);
44030 if (unlikely(__pyx_t_4 == Py_None)) {
44031 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
44032 __PYX_ERR(0, 2155, __pyx_L4_error)
44033 }
44034 __pyx_t_8 = __Pyx_PyBytes_AsString(__pyx_t_4); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2155, __pyx_L4_error)
44035 __pyx_v_hrec->value = strdup(__pyx_t_8);
44036 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44037
44038 /* "pysam/libcbcf.pyx":2154
44039 * hrec.key = strdup(key)
44040 *
44041 * if value is not None: # <<<<<<<<<<<<<<
44042 * hrec.value = strdup(force_bytes(value))
44043 * else:
44044 */
44045 goto __pyx_L10;
44046 }
44047
44048 /* "pysam/libcbcf.pyx":2157
44049 * hrec.value = strdup(force_bytes(value))
44050 * else:
44051 * for key, value in items: # <<<<<<<<<<<<<<
44052 * quoted = not isinstance(value, unquoted_str) and key not in ("ID", "Number", "Type")
44053 *
44054 */
44055 /*else*/ {
44056 if (likely(PyList_CheckExact(__pyx_v_items)) || PyTuple_CheckExact(__pyx_v_items)) {
44057 __pyx_t_4 = __pyx_v_items; __Pyx_INCREF(__pyx_t_4);
44058 __pyx_t_9 = 0;
44059 __pyx_t_10 = NULL;
44060 } else {
44061 __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2157, __pyx_L4_error)
44062 __Pyx_GOTREF(__pyx_t_4);
44063 __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2157, __pyx_L4_error)
44064 }
44065 for (;;) {
44066 if (likely(!__pyx_t_10)) {
44067 if (likely(PyList_CheckExact(__pyx_t_4))) {
44068 {
44069 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
44070 #if !CYTHON_ASSUME_SAFE_MACROS
44071 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2157, __pyx_L4_error)
44072 #endif
44073 if (__pyx_t_9 >= __pyx_temp) break;
44074 }
44075 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44076 __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2157, __pyx_L4_error)
44077 #else
44078 __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2157, __pyx_L4_error)
44079 __Pyx_GOTREF(__pyx_t_11);
44080 #endif
44081 } else {
44082 {
44083 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
44084 #if !CYTHON_ASSUME_SAFE_MACROS
44085 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2157, __pyx_L4_error)
44086 #endif
44087 if (__pyx_t_9 >= __pyx_temp) break;
44088 }
44089 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44090 __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2157, __pyx_L4_error)
44091 #else
44092 __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2157, __pyx_L4_error)
44093 __Pyx_GOTREF(__pyx_t_11);
44094 #endif
44095 }
44096 } else {
44097 __pyx_t_11 = __pyx_t_10(__pyx_t_4);
44098 if (unlikely(!__pyx_t_11)) {
44099 PyObject* exc_type = PyErr_Occurred();
44100 if (exc_type) {
44101 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
44102 else __PYX_ERR(0, 2157, __pyx_L4_error)
44103 }
44104 break;
44105 }
44106 __Pyx_GOTREF(__pyx_t_11);
44107 }
44108 if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
44109 PyObject* sequence = __pyx_t_11;
44110 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
44111 if (unlikely(size != 2)) {
44112 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
44113 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
44114 __PYX_ERR(0, 2157, __pyx_L4_error)
44115 }
44116 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44117 if (likely(PyTuple_CheckExact(sequence))) {
44118 __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0);
44119 __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1);
44120 } else {
44121 __pyx_t_12 = PyList_GET_ITEM(sequence, 0);
44122 __pyx_t_13 = PyList_GET_ITEM(sequence, 1);
44123 }
44124 __Pyx_INCREF(__pyx_t_12);
44125 __Pyx_INCREF(__pyx_t_13);
44126 #else
44127 __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2157, __pyx_L4_error)
44128 __Pyx_GOTREF(__pyx_t_12);
44129 __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2157, __pyx_L4_error)
44130 __Pyx_GOTREF(__pyx_t_13);
44131 #endif
44132 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
44133 } else {
44134 Py_ssize_t index = -1;
44135 __pyx_t_14 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2157, __pyx_L4_error)
44136 __Pyx_GOTREF(__pyx_t_14);
44137 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
44138 __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_14);
44139 index = 0; __pyx_t_12 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed;
44140 __Pyx_GOTREF(__pyx_t_12);
44141 index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L13_unpacking_failed;
44142 __Pyx_GOTREF(__pyx_t_13);
44143 if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 2157, __pyx_L4_error)
44144 __pyx_t_15 = NULL;
44145 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
44146 goto __pyx_L14_unpacking_done;
44147 __pyx_L13_unpacking_failed:;
44148 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
44149 __pyx_t_15 = NULL;
44150 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
44151 __PYX_ERR(0, 2157, __pyx_L4_error)
44152 __pyx_L14_unpacking_done:;
44153 }
44154 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_12);
44155 __pyx_t_12 = 0;
44156 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_13);
44157 __pyx_t_13 = 0;
44158
44159 /* "pysam/libcbcf.pyx":2158
44160 * else:
44161 * for key, value in items:
44162 * quoted = not isinstance(value, unquoted_str) and key not in ("ID", "Number", "Type") # <<<<<<<<<<<<<<
44163 *
44164 * key = force_bytes(key)
44165 */
44166 __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_unquoted_str); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2158, __pyx_L4_error)
44167 __Pyx_GOTREF(__pyx_t_11);
44168 __pyx_t_3 = PyObject_IsInstance(__pyx_v_value, __pyx_t_11); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 2158, __pyx_L4_error)
44169 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
44170 __pyx_t_2 = (!__pyx_t_3);
44171 if (__pyx_t_2) {
44172 } else {
44173 __pyx_t_16 = __pyx_t_2;
44174 goto __pyx_L15_bool_binop_done;
44175 }
44176 __Pyx_INCREF(__pyx_v_key);
44177 __pyx_t_11 = __pyx_v_key;
44178 __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_n_u_ID, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2158, __pyx_L4_error)
44179 if (__pyx_t_3) {
44180 } else {
44181 __pyx_t_2 = __pyx_t_3;
44182 goto __pyx_L17_bool_binop_done;
44183 }
44184 __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_n_u_Number, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2158, __pyx_L4_error)
44185 if (__pyx_t_3) {
44186 } else {
44187 __pyx_t_2 = __pyx_t_3;
44188 goto __pyx_L17_bool_binop_done;
44189 }
44190 __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_n_u_Type, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2158, __pyx_L4_error)
44191 __pyx_t_2 = __pyx_t_3;
44192 __pyx_L17_bool_binop_done:;
44193 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
44194 __pyx_t_3 = __pyx_t_2;
44195 __pyx_t_16 = __pyx_t_3;
44196 __pyx_L15_bool_binop_done:;
44197 __pyx_v_quoted = __pyx_t_16;
44198
44199 /* "pysam/libcbcf.pyx":2160
44200 * quoted = not isinstance(value, unquoted_str) and key not in ("ID", "Number", "Type")
44201 *
44202 * key = force_bytes(key) # <<<<<<<<<<<<<<
44203 * bcf_hrec_add_key(hrec, key, <int>len(key))
44204 *
44205 */
44206 __pyx_t_11 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2160, __pyx_L4_error)
44207 __Pyx_GOTREF(__pyx_t_11);
44208 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_11);
44209 __pyx_t_11 = 0;
44210
44211 /* "pysam/libcbcf.pyx":2161
44212 *
44213 * key = force_bytes(key)
44214 * bcf_hrec_add_key(hrec, key, <int>len(key)) # <<<<<<<<<<<<<<
44215 *
44216 * value = force_bytes(str(value))
44217 */
44218 __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 2161, __pyx_L4_error)
44219 __pyx_t_18 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2161, __pyx_L4_error)
44220 bcf_hrec_add_key(__pyx_v_hrec, __pyx_t_17, ((int)__pyx_t_18));
44221
44222 /* "pysam/libcbcf.pyx":2163
44223 * bcf_hrec_add_key(hrec, key, <int>len(key))
44224 *
44225 * value = force_bytes(str(value)) # <<<<<<<<<<<<<<
44226 * bcf_hrec_set_val(hrec, hrec.nkeys-1, value, <int>len(value), quoted)
44227 * except:
44228 */
44229 __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2163, __pyx_L4_error)
44230 __Pyx_GOTREF(__pyx_t_11);
44231 __pyx_t_13 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2163, __pyx_L4_error)
44232 __Pyx_GOTREF(__pyx_t_13);
44233 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
44234 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_13);
44235 __pyx_t_13 = 0;
44236
44237 /* "pysam/libcbcf.pyx":2164
44238 *
44239 * value = force_bytes(str(value))
44240 * bcf_hrec_set_val(hrec, hrec.nkeys-1, value, <int>len(value), quoted) # <<<<<<<<<<<<<<
44241 * except:
44242 * bcf_hrec_destroy(hrec)
44243 */
44244 __pyx_t_19 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) __PYX_ERR(0, 2164, __pyx_L4_error)
44245 __pyx_t_18 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2164, __pyx_L4_error)
44246 bcf_hrec_set_val(__pyx_v_hrec, (__pyx_v_hrec->nkeys - 1), __pyx_t_19, ((int)__pyx_t_18), __pyx_v_quoted);
44247
44248 /* "pysam/libcbcf.pyx":2157
44249 * hrec.value = strdup(force_bytes(value))
44250 * else:
44251 * for key, value in items: # <<<<<<<<<<<<<<
44252 * quoted = not isinstance(value, unquoted_str) and key not in ("ID", "Number", "Type")
44253 *
44254 */
44255 }
44256 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44257 }
44258 __pyx_L10:;
44259
44260 /* "pysam/libcbcf.pyx":2150
44261 * cdef int quoted
44262 *
44263 * try: # <<<<<<<<<<<<<<
44264 * key = force_bytes(key)
44265 * hrec.key = strdup(key)
44266 */
44267 }
44268 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
44269 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
44270 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
44271 goto __pyx_L9_try_end;
44272 __pyx_L4_error:;
44273 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
44274 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
44275 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
44276 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
44277 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
44278
44279 /* "pysam/libcbcf.pyx":2165
44280 * value = force_bytes(str(value))
44281 * bcf_hrec_set_val(hrec, hrec.nkeys-1, value, <int>len(value), quoted)
44282 * except: # <<<<<<<<<<<<<<
44283 * bcf_hrec_destroy(hrec)
44284 * raise
44285 */
44286 /*except:*/ {
44287 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_meta", __pyx_clineno, __pyx_lineno, __pyx_filename);
44288 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_13, &__pyx_t_11) < 0) __PYX_ERR(0, 2165, __pyx_L6_except_error)
44289 __Pyx_XGOTREF(__pyx_t_4);
44290 __Pyx_XGOTREF(__pyx_t_13);
44291 __Pyx_XGOTREF(__pyx_t_11);
44292
44293 /* "pysam/libcbcf.pyx":2166
44294 * bcf_hrec_set_val(hrec, hrec.nkeys-1, value, <int>len(value), quoted)
44295 * except:
44296 * bcf_hrec_destroy(hrec) # <<<<<<<<<<<<<<
44297 * raise
44298 *
44299 */
44300 bcf_hrec_destroy(__pyx_v_hrec);
44301
44302 /* "pysam/libcbcf.pyx":2167
44303 * except:
44304 * bcf_hrec_destroy(hrec)
44305 * raise # <<<<<<<<<<<<<<
44306 *
44307 * bcf_hdr_add_hrec(self.ptr, hrec)
44308 */
44309 __Pyx_GIVEREF(__pyx_t_4);
44310 __Pyx_GIVEREF(__pyx_t_13);
44311 __Pyx_XGIVEREF(__pyx_t_11);
44312 __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_13, __pyx_t_11);
44313 __pyx_t_4 = 0; __pyx_t_13 = 0; __pyx_t_11 = 0;
44314 __PYX_ERR(0, 2167, __pyx_L6_except_error)
44315 }
44316
44317 /* "pysam/libcbcf.pyx":2150
44318 * cdef int quoted
44319 *
44320 * try: # <<<<<<<<<<<<<<
44321 * key = force_bytes(key)
44322 * hrec.key = strdup(key)
44323 */
44324 __pyx_L6_except_error:;
44325 __Pyx_XGIVEREF(__pyx_t_5);
44326 __Pyx_XGIVEREF(__pyx_t_6);
44327 __Pyx_XGIVEREF(__pyx_t_7);
44328 __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
44329 goto __pyx_L1_error;
44330 __pyx_L9_try_end:;
44331 }
44332
44333 /* "pysam/libcbcf.pyx":2169
44334 * raise
44335 *
44336 * bcf_hdr_add_hrec(self.ptr, hrec) # <<<<<<<<<<<<<<
44337 *
44338 * self._hdr_sync()
44339 */
44340 (void)(bcf_hdr_add_hrec(__pyx_v_self->ptr, __pyx_v_hrec));
44341
44342 /* "pysam/libcbcf.pyx":2171
44343 * bcf_hdr_add_hrec(self.ptr, hrec)
44344 *
44345 * self._hdr_sync() # <<<<<<<<<<<<<<
44346 *
44347 * cdef _add_sample(self, name):
44348 */
44349 __pyx_t_11 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->__pyx_vtab)->_hdr_sync(__pyx_v_self); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2171, __pyx_L1_error)
44350 __Pyx_GOTREF(__pyx_t_11);
44351 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
44352
44353 /* "pysam/libcbcf.pyx":2142
44354 *
44355 *
44356 * def add_meta(self, key, value=None, items=None): # <<<<<<<<<<<<<<
44357 * """Add metadata to this header"""
44358 * if not ((value is not None) ^ (items is not None)):
44359 */
44360
44361 /* function exit code */
44362 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44363 goto __pyx_L0;
44364 __pyx_L1_error:;
44365 __Pyx_XDECREF(__pyx_t_4);
44366 __Pyx_XDECREF(__pyx_t_11);
44367 __Pyx_XDECREF(__pyx_t_12);
44368 __Pyx_XDECREF(__pyx_t_13);
44369 __Pyx_XDECREF(__pyx_t_14);
44370 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_meta", __pyx_clineno, __pyx_lineno, __pyx_filename);
44371 __pyx_r = NULL;
44372 __pyx_L0:;
44373 __Pyx_XDECREF(__pyx_v_key);
44374 __Pyx_XDECREF(__pyx_v_value);
44375 __Pyx_XGIVEREF(__pyx_r);
44376 __Pyx_TraceReturn(__pyx_r, 0);
44377 __Pyx_RefNannyFinishContext();
44378 return __pyx_r;
44379 }
44380
44381 /* "pysam/libcbcf.pyx":2173
44382 * self._hdr_sync()
44383 *
44384 * cdef _add_sample(self, name): # <<<<<<<<<<<<<<
44385 * bname = force_bytes(name)
44386 * if bcf_hdr_add_sample(self.ptr, bname) < 0:
44387 */
44388
44389 static PyObject *__pyx_f_5pysam_7libcbcf_13VariantHeader__add_sample(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_name) {
44390 PyObject *__pyx_v_bname = NULL;
44391 PyObject *__pyx_r = NULL;
44392 __Pyx_TraceDeclarations
44393 __Pyx_RefNannyDeclarations
44394 PyObject *__pyx_t_1 = NULL;
44395 char const *__pyx_t_2;
44396 int __pyx_t_3;
44397 PyObject *__pyx_t_4 = NULL;
44398 PyObject *__pyx_t_5 = NULL;
44399 unsigned int __pyx_t_6;
44400 int __pyx_lineno = 0;
44401 const char *__pyx_filename = NULL;
44402 int __pyx_clineno = 0;
44403 __Pyx_RefNannySetupContext("_add_sample", 1);
44404 __Pyx_TraceCall("_add_sample", __pyx_f[0], 2173, 0, __PYX_ERR(0, 2173, __pyx_L1_error));
44405
44406 /* "pysam/libcbcf.pyx":2174
44407 *
44408 * cdef _add_sample(self, name):
44409 * bname = force_bytes(name) # <<<<<<<<<<<<<<
44410 * if bcf_hdr_add_sample(self.ptr, bname) < 0:
44411 * raise ValueError('Duplicated sample name: {}'.format(name))
44412 */
44413 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2174, __pyx_L1_error)
44414 __Pyx_GOTREF(__pyx_t_1);
44415 __pyx_v_bname = ((PyObject*)__pyx_t_1);
44416 __pyx_t_1 = 0;
44417
44418 /* "pysam/libcbcf.pyx":2175
44419 * cdef _add_sample(self, name):
44420 * bname = force_bytes(name)
44421 * if bcf_hdr_add_sample(self.ptr, bname) < 0: # <<<<<<<<<<<<<<
44422 * raise ValueError('Duplicated sample name: {}'.format(name))
44423 *
44424 */
44425 if (unlikely(__pyx_v_bname == Py_None)) {
44426 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
44427 __PYX_ERR(0, 2175, __pyx_L1_error)
44428 }
44429 __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_bname); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2175, __pyx_L1_error)
44430 __pyx_t_3 = (bcf_hdr_add_sample(__pyx_v_self->ptr, __pyx_t_2) < 0);
44431 if (unlikely(__pyx_t_3)) {
44432
44433 /* "pysam/libcbcf.pyx":2176
44434 * bname = force_bytes(name)
44435 * if bcf_hdr_add_sample(self.ptr, bname) < 0:
44436 * raise ValueError('Duplicated sample name: {}'.format(name)) # <<<<<<<<<<<<<<
44437 *
44438 * cdef _hdr_sync(self):
44439 */
44440 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Duplicated_sample_name, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2176, __pyx_L1_error)
44441 __Pyx_GOTREF(__pyx_t_4);
44442 __pyx_t_5 = NULL;
44443 __pyx_t_6 = 0;
44444 #if CYTHON_UNPACK_METHODS
44445 if (likely(PyMethod_Check(__pyx_t_4))) {
44446 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
44447 if (likely(__pyx_t_5)) {
44448 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
44449 __Pyx_INCREF(__pyx_t_5);
44450 __Pyx_INCREF(function);
44451 __Pyx_DECREF_SET(__pyx_t_4, function);
44452 __pyx_t_6 = 1;
44453 }
44454 }
44455 #endif
44456 {
44457 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_name};
44458 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
44459 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
44460 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2176, __pyx_L1_error)
44461 __Pyx_GOTREF(__pyx_t_1);
44462 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44463 }
44464 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2176, __pyx_L1_error)
44465 __Pyx_GOTREF(__pyx_t_4);
44466 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44467 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
44468 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44469 __PYX_ERR(0, 2176, __pyx_L1_error)
44470
44471 /* "pysam/libcbcf.pyx":2175
44472 * cdef _add_sample(self, name):
44473 * bname = force_bytes(name)
44474 * if bcf_hdr_add_sample(self.ptr, bname) < 0: # <<<<<<<<<<<<<<
44475 * raise ValueError('Duplicated sample name: {}'.format(name))
44476 *
44477 */
44478 }
44479
44480 /* "pysam/libcbcf.pyx":2173
44481 * self._hdr_sync()
44482 *
44483 * cdef _add_sample(self, name): # <<<<<<<<<<<<<<
44484 * bname = force_bytes(name)
44485 * if bcf_hdr_add_sample(self.ptr, bname) < 0:
44486 */
44487
44488 /* function exit code */
44489 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44490 goto __pyx_L0;
44491 __pyx_L1_error:;
44492 __Pyx_XDECREF(__pyx_t_1);
44493 __Pyx_XDECREF(__pyx_t_4);
44494 __Pyx_XDECREF(__pyx_t_5);
44495 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader._add_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
44496 __pyx_r = 0;
44497 __pyx_L0:;
44498 __Pyx_XDECREF(__pyx_v_bname);
44499 __Pyx_XGIVEREF(__pyx_r);
44500 __Pyx_TraceReturn(__pyx_r, 0);
44501 __Pyx_RefNannyFinishContext();
44502 return __pyx_r;
44503 }
44504
44505 /* "pysam/libcbcf.pyx":2178
44506 * raise ValueError('Duplicated sample name: {}'.format(name))
44507 *
44508 * cdef _hdr_sync(self): # <<<<<<<<<<<<<<
44509 * cdef bcf_hdr_t *hdr = self.ptr
44510 * if hdr.dirty:
44511 */
44512
44513 static PyObject *__pyx_f_5pysam_7libcbcf_13VariantHeader__hdr_sync(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
44514 bcf_hdr_t *__pyx_v_hdr;
44515 PyObject *__pyx_r = NULL;
44516 __Pyx_TraceDeclarations
44517 __Pyx_RefNannyDeclarations
44518 bcf_hdr_t *__pyx_t_1;
44519 int __pyx_t_2;
44520 PyObject *__pyx_t_3 = NULL;
44521 int __pyx_lineno = 0;
44522 const char *__pyx_filename = NULL;
44523 int __pyx_clineno = 0;
44524 __Pyx_RefNannySetupContext("_hdr_sync", 1);
44525 __Pyx_TraceCall("_hdr_sync", __pyx_f[0], 2178, 0, __PYX_ERR(0, 2178, __pyx_L1_error));
44526
44527 /* "pysam/libcbcf.pyx":2179
44528 *
44529 * cdef _hdr_sync(self):
44530 * cdef bcf_hdr_t *hdr = self.ptr # <<<<<<<<<<<<<<
44531 * if hdr.dirty:
44532 * if bcf_hdr_sync(hdr) < 0:
44533 */
44534 __pyx_t_1 = __pyx_v_self->ptr;
44535 __pyx_v_hdr = __pyx_t_1;
44536
44537 /* "pysam/libcbcf.pyx":2180
44538 * cdef _hdr_sync(self):
44539 * cdef bcf_hdr_t *hdr = self.ptr
44540 * if hdr.dirty: # <<<<<<<<<<<<<<
44541 * if bcf_hdr_sync(hdr) < 0:
44542 * raise MemoryError('unable to reallocate VariantHeader')
44543 */
44544 __pyx_t_2 = (__pyx_v_hdr->dirty != 0);
44545 if (__pyx_t_2) {
44546
44547 /* "pysam/libcbcf.pyx":2181
44548 * cdef bcf_hdr_t *hdr = self.ptr
44549 * if hdr.dirty:
44550 * if bcf_hdr_sync(hdr) < 0: # <<<<<<<<<<<<<<
44551 * raise MemoryError('unable to reallocate VariantHeader')
44552 *
44553 */
44554 __pyx_t_2 = (bcf_hdr_sync(__pyx_v_hdr) < 0);
44555 if (unlikely(__pyx_t_2)) {
44556
44557 /* "pysam/libcbcf.pyx":2182
44558 * if hdr.dirty:
44559 * if bcf_hdr_sync(hdr) < 0:
44560 * raise MemoryError('unable to reallocate VariantHeader') # <<<<<<<<<<<<<<
44561 *
44562 * def add_sample(self, name):
44563 */
44564 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2182, __pyx_L1_error)
44565 __Pyx_GOTREF(__pyx_t_3);
44566 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
44567 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44568 __PYX_ERR(0, 2182, __pyx_L1_error)
44569
44570 /* "pysam/libcbcf.pyx":2181
44571 * cdef bcf_hdr_t *hdr = self.ptr
44572 * if hdr.dirty:
44573 * if bcf_hdr_sync(hdr) < 0: # <<<<<<<<<<<<<<
44574 * raise MemoryError('unable to reallocate VariantHeader')
44575 *
44576 */
44577 }
44578
44579 /* "pysam/libcbcf.pyx":2180
44580 * cdef _hdr_sync(self):
44581 * cdef bcf_hdr_t *hdr = self.ptr
44582 * if hdr.dirty: # <<<<<<<<<<<<<<
44583 * if bcf_hdr_sync(hdr) < 0:
44584 * raise MemoryError('unable to reallocate VariantHeader')
44585 */
44586 }
44587
44588 /* "pysam/libcbcf.pyx":2178
44589 * raise ValueError('Duplicated sample name: {}'.format(name))
44590 *
44591 * cdef _hdr_sync(self): # <<<<<<<<<<<<<<
44592 * cdef bcf_hdr_t *hdr = self.ptr
44593 * if hdr.dirty:
44594 */
44595
44596 /* function exit code */
44597 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44598 goto __pyx_L0;
44599 __pyx_L1_error:;
44600 __Pyx_XDECREF(__pyx_t_3);
44601 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader._hdr_sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
44602 __pyx_r = 0;
44603 __pyx_L0:;
44604 __Pyx_XGIVEREF(__pyx_r);
44605 __Pyx_TraceReturn(__pyx_r, 0);
44606 __Pyx_RefNannyFinishContext();
44607 return __pyx_r;
44608 }
44609
44610 /* "pysam/libcbcf.pyx":2184
44611 * raise MemoryError('unable to reallocate VariantHeader')
44612 *
44613 * def add_sample(self, name): # <<<<<<<<<<<<<<
44614 * """Add a new sample to this header"""
44615 * self._add_sample(name)
44616 */
44617
44618 /* Python wrapper */
44619 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_23add_sample(PyObject *__pyx_v_self,
44620 #if CYTHON_METH_FASTCALL
44621 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
44622 #else
44623 PyObject *__pyx_args, PyObject *__pyx_kwds
44624 #endif
44625 ); /*proto*/
44626 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_22add_sample, "VariantHeader.add_sample(self, name)\nAdd a new sample to this header");
44627 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_23add_sample = {"add_sample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_23add_sample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_22add_sample};
44628 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_23add_sample(PyObject *__pyx_v_self,
44629 #if CYTHON_METH_FASTCALL
44630 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
44631 #else
44632 PyObject *__pyx_args, PyObject *__pyx_kwds
44633 #endif
44634 ) {
44635 PyObject *__pyx_v_name = 0;
44636 #if !CYTHON_METH_FASTCALL
44637 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
44638 #endif
44639 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
44640 PyObject* values[1] = {0};
44641 int __pyx_lineno = 0;
44642 const char *__pyx_filename = NULL;
44643 int __pyx_clineno = 0;
44644 PyObject *__pyx_r = 0;
44645 __Pyx_RefNannyDeclarations
44646 __Pyx_RefNannySetupContext("add_sample (wrapper)", 0);
44647 #if !CYTHON_METH_FASTCALL
44648 #if CYTHON_ASSUME_SAFE_MACROS
44649 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
44650 #else
44651 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
44652 #endif
44653 #endif
44654 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
44655 {
44656 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
44657 if (__pyx_kwds) {
44658 Py_ssize_t kw_args;
44659 switch (__pyx_nargs) {
44660 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
44661 CYTHON_FALLTHROUGH;
44662 case 0: break;
44663 default: goto __pyx_L5_argtuple_error;
44664 }
44665 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
44666 switch (__pyx_nargs) {
44667 case 0:
44668 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
44669 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
44670 kw_args--;
44671 }
44672 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2184, __pyx_L3_error)
44673 else goto __pyx_L5_argtuple_error;
44674 }
44675 if (unlikely(kw_args > 0)) {
44676 const Py_ssize_t kwd_pos_args = __pyx_nargs;
44677 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_sample") < 0)) __PYX_ERR(0, 2184, __pyx_L3_error)
44678 }
44679 } else if (unlikely(__pyx_nargs != 1)) {
44680 goto __pyx_L5_argtuple_error;
44681 } else {
44682 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
44683 }
44684 __pyx_v_name = values[0];
44685 }
44686 goto __pyx_L6_skip;
44687 __pyx_L5_argtuple_error:;
44688 __Pyx_RaiseArgtupleInvalid("add_sample", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2184, __pyx_L3_error)
44689 __pyx_L6_skip:;
44690 goto __pyx_L4_argument_unpacking_done;
44691 __pyx_L3_error:;
44692 {
44693 Py_ssize_t __pyx_temp;
44694 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
44695 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
44696 }
44697 }
44698 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
44699 __Pyx_RefNannyFinishContext();
44700 return NULL;
44701 __pyx_L4_argument_unpacking_done:;
44702 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_22add_sample(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self), __pyx_v_name);
44703
44704 /* function exit code */
44705 {
44706 Py_ssize_t __pyx_temp;
44707 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
44708 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
44709 }
44710 }
44711 __Pyx_RefNannyFinishContext();
44712 return __pyx_r;
44713 }
44714
44715 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_22add_sample(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_name) {
44716 PyObject *__pyx_r = NULL;
44717 __Pyx_TraceDeclarations
44718 __Pyx_RefNannyDeclarations
44719 PyObject *__pyx_t_1 = NULL;
44720 int __pyx_lineno = 0;
44721 const char *__pyx_filename = NULL;
44722 int __pyx_clineno = 0;
44723 __Pyx_TraceFrameInit(__pyx_codeobj__107)
44724 __Pyx_RefNannySetupContext("add_sample", 1);
44725 __Pyx_TraceCall("add_sample", __pyx_f[0], 2184, 0, __PYX_ERR(0, 2184, __pyx_L1_error));
44726
44727 /* "pysam/libcbcf.pyx":2186
44728 * def add_sample(self, name):
44729 * """Add a new sample to this header"""
44730 * self._add_sample(name) # <<<<<<<<<<<<<<
44731 * self._hdr_sync()
44732 *
44733 */
44734 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->__pyx_vtab)->_add_sample(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2186, __pyx_L1_error)
44735 __Pyx_GOTREF(__pyx_t_1);
44736 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44737
44738 /* "pysam/libcbcf.pyx":2187
44739 * """Add a new sample to this header"""
44740 * self._add_sample(name)
44741 * self._hdr_sync() # <<<<<<<<<<<<<<
44742 *
44743 * def add_samples(self, *args):
44744 */
44745 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->__pyx_vtab)->_hdr_sync(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2187, __pyx_L1_error)
44746 __Pyx_GOTREF(__pyx_t_1);
44747 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44748
44749 /* "pysam/libcbcf.pyx":2184
44750 * raise MemoryError('unable to reallocate VariantHeader')
44751 *
44752 * def add_sample(self, name): # <<<<<<<<<<<<<<
44753 * """Add a new sample to this header"""
44754 * self._add_sample(name)
44755 */
44756
44757 /* function exit code */
44758 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44759 goto __pyx_L0;
44760 __pyx_L1_error:;
44761 __Pyx_XDECREF(__pyx_t_1);
44762 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
44763 __pyx_r = NULL;
44764 __pyx_L0:;
44765 __Pyx_XGIVEREF(__pyx_r);
44766 __Pyx_TraceReturn(__pyx_r, 0);
44767 __Pyx_RefNannyFinishContext();
44768 return __pyx_r;
44769 }
44770
44771 /* "pysam/libcbcf.pyx":2189
44772 * self._hdr_sync()
44773 *
44774 * def add_samples(self, *args): # <<<<<<<<<<<<<<
44775 * """Add several new samples to this header.
44776 * This function takes multiple arguments, each of which may
44777 */
44778
44779 /* Python wrapper */
44780 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_25add_samples(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
44781 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_24add_samples, "VariantHeader.add_samples(self, *args)\nAdd several new samples to this header.\n This function takes multiple arguments, each of which may\n be either a sample name or an iterable returning sample names\n (e.g., a list of sample names).\n ");
44782 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_25add_samples = {"add_samples", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_25add_samples, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_24add_samples};
44783 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_25add_samples(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
44784 PyObject *__pyx_v_args = 0;
44785 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
44786 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
44787 PyObject *__pyx_r = 0;
44788 __Pyx_RefNannyDeclarations
44789 __Pyx_RefNannySetupContext("add_samples (wrapper)", 0);
44790 #if CYTHON_ASSUME_SAFE_MACROS
44791 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
44792 #else
44793 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
44794 #endif
44795 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
44796 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_samples", 0))) return NULL;
44797 __Pyx_INCREF(__pyx_args);
44798 __pyx_v_args = __pyx_args;
44799 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_24add_samples(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self), __pyx_v_args);
44800
44801 /* function exit code */
44802 __Pyx_DECREF(__pyx_v_args);
44803 __Pyx_RefNannyFinishContext();
44804 return __pyx_r;
44805 }
44806
44807 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_24add_samples(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, PyObject *__pyx_v_args) {
44808 PyObject *__pyx_v_arg = NULL;
44809 PyObject *__pyx_v_name = NULL;
44810 PyObject *__pyx_r = NULL;
44811 __Pyx_TraceDeclarations
44812 __Pyx_RefNannyDeclarations
44813 PyObject *__pyx_t_1 = NULL;
44814 Py_ssize_t __pyx_t_2;
44815 PyObject *__pyx_t_3 = NULL;
44816 int __pyx_t_4;
44817 Py_ssize_t __pyx_t_5;
44818 PyObject *(*__pyx_t_6)(PyObject *);
44819 PyObject *__pyx_t_7 = NULL;
44820 int __pyx_lineno = 0;
44821 const char *__pyx_filename = NULL;
44822 int __pyx_clineno = 0;
44823 __Pyx_TraceFrameInit(__pyx_codeobj__108)
44824 __Pyx_RefNannySetupContext("add_samples", 1);
44825 __Pyx_TraceCall("add_samples", __pyx_f[0], 2189, 0, __PYX_ERR(0, 2189, __pyx_L1_error));
44826
44827 /* "pysam/libcbcf.pyx":2195
44828 * (e.g., a list of sample names).
44829 * """
44830 * for arg in args: # <<<<<<<<<<<<<<
44831 * if isinstance(arg, str):
44832 * self._add_sample(arg)
44833 */
44834 __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
44835 __pyx_t_2 = 0;
44836 for (;;) {
44837 {
44838 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
44839 #if !CYTHON_ASSUME_SAFE_MACROS
44840 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2195, __pyx_L1_error)
44841 #endif
44842 if (__pyx_t_2 >= __pyx_temp) break;
44843 }
44844 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44845 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2195, __pyx_L1_error)
44846 #else
44847 __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2195, __pyx_L1_error)
44848 __Pyx_GOTREF(__pyx_t_3);
44849 #endif
44850 __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
44851 __pyx_t_3 = 0;
44852
44853 /* "pysam/libcbcf.pyx":2196
44854 * """
44855 * for arg in args:
44856 * if isinstance(arg, str): # <<<<<<<<<<<<<<
44857 * self._add_sample(arg)
44858 * else:
44859 */
44860 __pyx_t_4 = PyUnicode_Check(__pyx_v_arg);
44861 if (__pyx_t_4) {
44862
44863 /* "pysam/libcbcf.pyx":2197
44864 * for arg in args:
44865 * if isinstance(arg, str):
44866 * self._add_sample(arg) # <<<<<<<<<<<<<<
44867 * else:
44868 * for name in arg:
44869 */
44870 __pyx_t_3 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->__pyx_vtab)->_add_sample(__pyx_v_self, __pyx_v_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2197, __pyx_L1_error)
44871 __Pyx_GOTREF(__pyx_t_3);
44872 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44873
44874 /* "pysam/libcbcf.pyx":2196
44875 * """
44876 * for arg in args:
44877 * if isinstance(arg, str): # <<<<<<<<<<<<<<
44878 * self._add_sample(arg)
44879 * else:
44880 */
44881 goto __pyx_L5;
44882 }
44883
44884 /* "pysam/libcbcf.pyx":2199
44885 * self._add_sample(arg)
44886 * else:
44887 * for name in arg: # <<<<<<<<<<<<<<
44888 * self._add_sample(name)
44889 * self._hdr_sync()
44890 */
44891 /*else*/ {
44892 if (likely(PyList_CheckExact(__pyx_v_arg)) || PyTuple_CheckExact(__pyx_v_arg)) {
44893 __pyx_t_3 = __pyx_v_arg; __Pyx_INCREF(__pyx_t_3);
44894 __pyx_t_5 = 0;
44895 __pyx_t_6 = NULL;
44896 } else {
44897 __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2199, __pyx_L1_error)
44898 __Pyx_GOTREF(__pyx_t_3);
44899 __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2199, __pyx_L1_error)
44900 }
44901 for (;;) {
44902 if (likely(!__pyx_t_6)) {
44903 if (likely(PyList_CheckExact(__pyx_t_3))) {
44904 {
44905 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
44906 #if !CYTHON_ASSUME_SAFE_MACROS
44907 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2199, __pyx_L1_error)
44908 #endif
44909 if (__pyx_t_5 >= __pyx_temp) break;
44910 }
44911 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44912 __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2199, __pyx_L1_error)
44913 #else
44914 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2199, __pyx_L1_error)
44915 __Pyx_GOTREF(__pyx_t_7);
44916 #endif
44917 } else {
44918 {
44919 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
44920 #if !CYTHON_ASSUME_SAFE_MACROS
44921 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2199, __pyx_L1_error)
44922 #endif
44923 if (__pyx_t_5 >= __pyx_temp) break;
44924 }
44925 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44926 __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2199, __pyx_L1_error)
44927 #else
44928 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2199, __pyx_L1_error)
44929 __Pyx_GOTREF(__pyx_t_7);
44930 #endif
44931 }
44932 } else {
44933 __pyx_t_7 = __pyx_t_6(__pyx_t_3);
44934 if (unlikely(!__pyx_t_7)) {
44935 PyObject* exc_type = PyErr_Occurred();
44936 if (exc_type) {
44937 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
44938 else __PYX_ERR(0, 2199, __pyx_L1_error)
44939 }
44940 break;
44941 }
44942 __Pyx_GOTREF(__pyx_t_7);
44943 }
44944 __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
44945 __pyx_t_7 = 0;
44946
44947 /* "pysam/libcbcf.pyx":2200
44948 * else:
44949 * for name in arg:
44950 * self._add_sample(name) # <<<<<<<<<<<<<<
44951 * self._hdr_sync()
44952 *
44953 */
44954 __pyx_t_7 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->__pyx_vtab)->_add_sample(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2200, __pyx_L1_error)
44955 __Pyx_GOTREF(__pyx_t_7);
44956 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
44957
44958 /* "pysam/libcbcf.pyx":2199
44959 * self._add_sample(arg)
44960 * else:
44961 * for name in arg: # <<<<<<<<<<<<<<
44962 * self._add_sample(name)
44963 * self._hdr_sync()
44964 */
44965 }
44966 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44967 }
44968 __pyx_L5:;
44969
44970 /* "pysam/libcbcf.pyx":2195
44971 * (e.g., a list of sample names).
44972 * """
44973 * for arg in args: # <<<<<<<<<<<<<<
44974 * if isinstance(arg, str):
44975 * self._add_sample(arg)
44976 */
44977 }
44978 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44979
44980 /* "pysam/libcbcf.pyx":2201
44981 * for name in arg:
44982 * self._add_sample(name)
44983 * self._hdr_sync() # <<<<<<<<<<<<<<
44984 *
44985 *
44986 */
44987 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->__pyx_vtab)->_hdr_sync(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2201, __pyx_L1_error)
44988 __Pyx_GOTREF(__pyx_t_1);
44989 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44990
44991 /* "pysam/libcbcf.pyx":2189
44992 * self._hdr_sync()
44993 *
44994 * def add_samples(self, *args): # <<<<<<<<<<<<<<
44995 * """Add several new samples to this header.
44996 * This function takes multiple arguments, each of which may
44997 */
44998
44999 /* function exit code */
45000 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
45001 goto __pyx_L0;
45002 __pyx_L1_error:;
45003 __Pyx_XDECREF(__pyx_t_1);
45004 __Pyx_XDECREF(__pyx_t_3);
45005 __Pyx_XDECREF(__pyx_t_7);
45006 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.add_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
45007 __pyx_r = NULL;
45008 __pyx_L0:;
45009 __Pyx_XDECREF(__pyx_v_arg);
45010 __Pyx_XDECREF(__pyx_v_name);
45011 __Pyx_XGIVEREF(__pyx_r);
45012 __Pyx_TraceReturn(__pyx_r, 0);
45013 __Pyx_RefNannyFinishContext();
45014 return __pyx_r;
45015 }
45016
45017 /* "(tree fragment)":1
45018 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
45019 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
45020 * def __setstate_cython__(self, __pyx_state):
45021 */
45022
45023 /* Python wrapper */
45024 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_27__reduce_cython__(PyObject *__pyx_v_self,
45025 #if CYTHON_METH_FASTCALL
45026 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
45027 #else
45028 PyObject *__pyx_args, PyObject *__pyx_kwds
45029 #endif
45030 ); /*proto*/
45031 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_26__reduce_cython__, "VariantHeader.__reduce_cython__(self)");
45032 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_27__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_26__reduce_cython__};
45033 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_27__reduce_cython__(PyObject *__pyx_v_self,
45034 #if CYTHON_METH_FASTCALL
45035 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
45036 #else
45037 PyObject *__pyx_args, PyObject *__pyx_kwds
45038 #endif
45039 ) {
45040 #if !CYTHON_METH_FASTCALL
45041 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
45042 #endif
45043 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
45044 PyObject *__pyx_r = 0;
45045 __Pyx_RefNannyDeclarations
45046 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
45047 #if !CYTHON_METH_FASTCALL
45048 #if CYTHON_ASSUME_SAFE_MACROS
45049 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
45050 #else
45051 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
45052 #endif
45053 #endif
45054 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
45055 if (unlikely(__pyx_nargs > 0)) {
45056 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
45057 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
45058 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_26__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self));
45059
45060 /* function exit code */
45061 __Pyx_RefNannyFinishContext();
45062 return __pyx_r;
45063 }
45064
45065 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_26__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self) {
45066 PyObject *__pyx_r = NULL;
45067 __Pyx_TraceDeclarations
45068 __Pyx_RefNannyDeclarations
45069 int __pyx_lineno = 0;
45070 const char *__pyx_filename = NULL;
45071 int __pyx_clineno = 0;
45072 __Pyx_TraceFrameInit(__pyx_codeobj__109)
45073 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
45074 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
45075
45076 /* "(tree fragment)":2
45077 * def __reduce_cython__(self):
45078 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
45079 * def __setstate_cython__(self, __pyx_state):
45080 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
45081 */
45082 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
45083 __PYX_ERR(4, 2, __pyx_L1_error)
45084
45085 /* "(tree fragment)":1
45086 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
45087 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
45088 * def __setstate_cython__(self, __pyx_state):
45089 */
45090
45091 /* function exit code */
45092 __pyx_L1_error:;
45093 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
45094 __pyx_r = NULL;
45095 __Pyx_XGIVEREF(__pyx_r);
45096 __Pyx_TraceReturn(__pyx_r, 0);
45097 __Pyx_RefNannyFinishContext();
45098 return __pyx_r;
45099 }
45100
45101 /* "(tree fragment)":3
45102 * def __reduce_cython__(self):
45103 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
45104 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
45105 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
45106 */
45107
45108 /* Python wrapper */
45109 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_29__setstate_cython__(PyObject *__pyx_v_self,
45110 #if CYTHON_METH_FASTCALL
45111 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
45112 #else
45113 PyObject *__pyx_args, PyObject *__pyx_kwds
45114 #endif
45115 ); /*proto*/
45116 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantHeader_28__setstate_cython__, "VariantHeader.__setstate_cython__(self, __pyx_state)");
45117 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantHeader_29__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_28__setstate_cython__};
45118 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantHeader_29__setstate_cython__(PyObject *__pyx_v_self,
45119 #if CYTHON_METH_FASTCALL
45120 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
45121 #else
45122 PyObject *__pyx_args, PyObject *__pyx_kwds
45123 #endif
45124 ) {
45125 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
45126 #if !CYTHON_METH_FASTCALL
45127 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
45128 #endif
45129 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
45130 PyObject* values[1] = {0};
45131 int __pyx_lineno = 0;
45132 const char *__pyx_filename = NULL;
45133 int __pyx_clineno = 0;
45134 PyObject *__pyx_r = 0;
45135 __Pyx_RefNannyDeclarations
45136 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
45137 #if !CYTHON_METH_FASTCALL
45138 #if CYTHON_ASSUME_SAFE_MACROS
45139 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
45140 #else
45141 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
45142 #endif
45143 #endif
45144 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
45145 {
45146 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
45147 if (__pyx_kwds) {
45148 Py_ssize_t kw_args;
45149 switch (__pyx_nargs) {
45150 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
45151 CYTHON_FALLTHROUGH;
45152 case 0: break;
45153 default: goto __pyx_L5_argtuple_error;
45154 }
45155 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
45156 switch (__pyx_nargs) {
45157 case 0:
45158 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
45159 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
45160 kw_args--;
45161 }
45162 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
45163 else goto __pyx_L5_argtuple_error;
45164 }
45165 if (unlikely(kw_args > 0)) {
45166 const Py_ssize_t kwd_pos_args = __pyx_nargs;
45167 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
45168 }
45169 } else if (unlikely(__pyx_nargs != 1)) {
45170 goto __pyx_L5_argtuple_error;
45171 } else {
45172 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
45173 }
45174 __pyx_v___pyx_state = values[0];
45175 }
45176 goto __pyx_L6_skip;
45177 __pyx_L5_argtuple_error:;
45178 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
45179 __pyx_L6_skip:;
45180 goto __pyx_L4_argument_unpacking_done;
45181 __pyx_L3_error:;
45182 {
45183 Py_ssize_t __pyx_temp;
45184 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
45185 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
45186 }
45187 }
45188 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
45189 __Pyx_RefNannyFinishContext();
45190 return NULL;
45191 __pyx_L4_argument_unpacking_done:;
45192 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantHeader_28__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_v_self), __pyx_v___pyx_state);
45193
45194 /* function exit code */
45195 {
45196 Py_ssize_t __pyx_temp;
45197 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
45198 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
45199 }
45200 }
45201 __Pyx_RefNannyFinishContext();
45202 return __pyx_r;
45203 }
45204
45205 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantHeader_28__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
45206 PyObject *__pyx_r = NULL;
45207 __Pyx_TraceDeclarations
45208 __Pyx_RefNannyDeclarations
45209 int __pyx_lineno = 0;
45210 const char *__pyx_filename = NULL;
45211 int __pyx_clineno = 0;
45212 __Pyx_TraceFrameInit(__pyx_codeobj__110)
45213 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
45214 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
45215
45216 /* "(tree fragment)":4
45217 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
45218 * def __setstate_cython__(self, __pyx_state):
45219 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
45220 */
45221 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
45222 __PYX_ERR(4, 4, __pyx_L1_error)
45223
45224 /* "(tree fragment)":3
45225 * def __reduce_cython__(self):
45226 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
45227 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
45228 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
45229 */
45230
45231 /* function exit code */
45232 __pyx_L1_error:;
45233 __Pyx_AddTraceback("pysam.libcbcf.VariantHeader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
45234 __pyx_r = NULL;
45235 __Pyx_XGIVEREF(__pyx_r);
45236 __Pyx_TraceReturn(__pyx_r, 0);
45237 __Pyx_RefNannyFinishContext();
45238 return __pyx_r;
45239 }
45240
45241 /* "pysam/libcbcf.pyx":2204
45242 *
45243 *
45244 * cdef VariantHeader makeVariantHeader(bcf_hdr_t *hdr): # <<<<<<<<<<<<<<
45245 * if not hdr:
45246 * raise ValueError('cannot create VariantHeader')
45247 */
45248
45249 static struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_f_5pysam_7libcbcf_makeVariantHeader(bcf_hdr_t *__pyx_v_hdr) {
45250 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header = 0;
45251 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_r = NULL;
45252 __Pyx_TraceDeclarations
45253 __Pyx_RefNannyDeclarations
45254 int __pyx_t_1;
45255 PyObject *__pyx_t_2 = NULL;
45256 int __pyx_lineno = 0;
45257 const char *__pyx_filename = NULL;
45258 int __pyx_clineno = 0;
45259 __Pyx_RefNannySetupContext("makeVariantHeader", 1);
45260 __Pyx_TraceCall("makeVariantHeader", __pyx_f[0], 2204, 0, __PYX_ERR(0, 2204, __pyx_L1_error));
45261
45262 /* "pysam/libcbcf.pyx":2205
45263 *
45264 * cdef VariantHeader makeVariantHeader(bcf_hdr_t *hdr):
45265 * if not hdr: # <<<<<<<<<<<<<<
45266 * raise ValueError('cannot create VariantHeader')
45267 *
45268 */
45269 __pyx_t_1 = (!(__pyx_v_hdr != 0));
45270 if (unlikely(__pyx_t_1)) {
45271
45272 /* "pysam/libcbcf.pyx":2206
45273 * cdef VariantHeader makeVariantHeader(bcf_hdr_t *hdr):
45274 * if not hdr:
45275 * raise ValueError('cannot create VariantHeader') # <<<<<<<<<<<<<<
45276 *
45277 * cdef VariantHeader header = VariantHeader.__new__(VariantHeader)
45278 */
45279 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2206, __pyx_L1_error)
45280 __Pyx_GOTREF(__pyx_t_2);
45281 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
45282 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45283 __PYX_ERR(0, 2206, __pyx_L1_error)
45284
45285 /* "pysam/libcbcf.pyx":2205
45286 *
45287 * cdef VariantHeader makeVariantHeader(bcf_hdr_t *hdr):
45288 * if not hdr: # <<<<<<<<<<<<<<
45289 * raise ValueError('cannot create VariantHeader')
45290 *
45291 */
45292 }
45293
45294 /* "pysam/libcbcf.pyx":2208
45295 * raise ValueError('cannot create VariantHeader')
45296 *
45297 * cdef VariantHeader header = VariantHeader.__new__(VariantHeader) # <<<<<<<<<<<<<<
45298 * header.ptr = hdr
45299 *
45300 */
45301 __pyx_t_2 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantHeader(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2208, __pyx_L1_error)
45302 __Pyx_GOTREF((PyObject *)__pyx_t_2);
45303 __pyx_v_header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_2);
45304 __pyx_t_2 = 0;
45305
45306 /* "pysam/libcbcf.pyx":2209
45307 *
45308 * cdef VariantHeader header = VariantHeader.__new__(VariantHeader)
45309 * header.ptr = hdr # <<<<<<<<<<<<<<
45310 *
45311 * return header
45312 */
45313 __pyx_v_header->ptr = __pyx_v_hdr;
45314
45315 /* "pysam/libcbcf.pyx":2211
45316 * header.ptr = hdr
45317 *
45318 * return header # <<<<<<<<<<<<<<
45319 *
45320 *
45321 */
45322 __Pyx_XDECREF((PyObject *)__pyx_r);
45323 __Pyx_INCREF((PyObject *)__pyx_v_header);
45324 __pyx_r = __pyx_v_header;
45325 goto __pyx_L0;
45326
45327 /* "pysam/libcbcf.pyx":2204
45328 *
45329 *
45330 * cdef VariantHeader makeVariantHeader(bcf_hdr_t *hdr): # <<<<<<<<<<<<<<
45331 * if not hdr:
45332 * raise ValueError('cannot create VariantHeader')
45333 */
45334
45335 /* function exit code */
45336 __pyx_L1_error:;
45337 __Pyx_XDECREF(__pyx_t_2);
45338 __Pyx_AddTraceback("pysam.libcbcf.makeVariantHeader", __pyx_clineno, __pyx_lineno, __pyx_filename);
45339 __pyx_r = 0;
45340 __pyx_L0:;
45341 __Pyx_XDECREF((PyObject *)__pyx_v_header);
45342 __Pyx_XGIVEREF((PyObject *)__pyx_r);
45343 __Pyx_TraceReturn(__pyx_r, 0);
45344 __Pyx_RefNannyFinishContext();
45345 return __pyx_r;
45346 }
45347
45348 /* "pysam/libcbcf.pyx":2214
45349 *
45350 *
45351 * cdef inline int bcf_header_get_info_id(bcf_hdr_t *hdr, key) except? -2: # <<<<<<<<<<<<<<
45352 * cdef vdict_t *d
45353 * cdef khiter_t k
45354 */
45355
45356 static CYTHON_INLINE int __pyx_f_5pysam_7libcbcf_bcf_header_get_info_id(bcf_hdr_t *__pyx_v_hdr, PyObject *__pyx_v_key) {
45357 vdict_t *__pyx_v_d;
45358 khiter_t __pyx_v_k;
45359 int __pyx_r;
45360 __Pyx_TraceDeclarations
45361 __Pyx_RefNannyDeclarations
45362 int __pyx_t_1;
45363 PyObject *__pyx_t_2 = NULL;
45364 char const *__pyx_t_3;
45365 int __pyx_t_4;
45366 int __pyx_lineno = 0;
45367 const char *__pyx_filename = NULL;
45368 int __pyx_clineno = 0;
45369 __Pyx_RefNannySetupContext("bcf_header_get_info_id", 0);
45370 __Pyx_TraceCall("bcf_header_get_info_id", __pyx_f[0], 2214, 0, __PYX_ERR(0, 2214, __pyx_L1_error));
45371 __Pyx_INCREF(__pyx_v_key);
45372
45373 /* "pysam/libcbcf.pyx":2219
45374 * cdef int info_id
45375 *
45376 * if isinstance(key, str): # <<<<<<<<<<<<<<
45377 * key = force_bytes(key)
45378 *
45379 */
45380 __pyx_t_1 = PyUnicode_Check(__pyx_v_key);
45381 if (__pyx_t_1) {
45382
45383 /* "pysam/libcbcf.pyx":2220
45384 *
45385 * if isinstance(key, str):
45386 * key = force_bytes(key) # <<<<<<<<<<<<<<
45387 *
45388 * d = <vdict_t *>hdr.dict[BCF_DT_ID]
45389 */
45390 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2220, __pyx_L1_error)
45391 __Pyx_GOTREF(__pyx_t_2);
45392 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2);
45393 __pyx_t_2 = 0;
45394
45395 /* "pysam/libcbcf.pyx":2219
45396 * cdef int info_id
45397 *
45398 * if isinstance(key, str): # <<<<<<<<<<<<<<
45399 * key = force_bytes(key)
45400 *
45401 */
45402 }
45403
45404 /* "pysam/libcbcf.pyx":2222
45405 * key = force_bytes(key)
45406 *
45407 * d = <vdict_t *>hdr.dict[BCF_DT_ID] # <<<<<<<<<<<<<<
45408 * k = kh_get_vdict(d, key)
45409 *
45410 */
45411 __pyx_v_d = ((vdict_t *)(__pyx_v_hdr->dict[BCF_DT_ID]));
45412
45413 /* "pysam/libcbcf.pyx":2223
45414 *
45415 * d = <vdict_t *>hdr.dict[BCF_DT_ID]
45416 * k = kh_get_vdict(d, key) # <<<<<<<<<<<<<<
45417 *
45418 * if k == kh_end(d) or kh_val_vdict(d, k).info[BCF_HL_INFO] & 0xF == 0xF:
45419 */
45420 __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 2223, __pyx_L1_error)
45421 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_3);
45422
45423 /* "pysam/libcbcf.pyx":2225
45424 * k = kh_get_vdict(d, key)
45425 *
45426 * if k == kh_end(d) or kh_val_vdict(d, k).info[BCF_HL_INFO] & 0xF == 0xF: # <<<<<<<<<<<<<<
45427 * return -1
45428 *
45429 */
45430 __pyx_t_4 = (__pyx_v_k == kh_end(__pyx_v_d));
45431 if (!__pyx_t_4) {
45432 } else {
45433 __pyx_t_1 = __pyx_t_4;
45434 goto __pyx_L5_bool_binop_done;
45435 }
45436 __pyx_t_4 = (((kh_val(__pyx_v_d, __pyx_v_k).info[BCF_HL_INFO]) & 0xF) == 0xF);
45437 __pyx_t_1 = __pyx_t_4;
45438 __pyx_L5_bool_binop_done:;
45439 if (__pyx_t_1) {
45440
45441 /* "pysam/libcbcf.pyx":2226
45442 *
45443 * if k == kh_end(d) or kh_val_vdict(d, k).info[BCF_HL_INFO] & 0xF == 0xF:
45444 * return -1 # <<<<<<<<<<<<<<
45445 *
45446 * return kh_val_vdict(d, k).id
45447 */
45448 __pyx_r = -1;
45449 goto __pyx_L0;
45450
45451 /* "pysam/libcbcf.pyx":2225
45452 * k = kh_get_vdict(d, key)
45453 *
45454 * if k == kh_end(d) or kh_val_vdict(d, k).info[BCF_HL_INFO] & 0xF == 0xF: # <<<<<<<<<<<<<<
45455 * return -1
45456 *
45457 */
45458 }
45459
45460 /* "pysam/libcbcf.pyx":2228
45461 * return -1
45462 *
45463 * return kh_val_vdict(d, k).id # <<<<<<<<<<<<<<
45464 *
45465 *
45466 */
45467 __pyx_r = kh_val(__pyx_v_d, __pyx_v_k).id;
45468 goto __pyx_L0;
45469
45470 /* "pysam/libcbcf.pyx":2214
45471 *
45472 *
45473 * cdef inline int bcf_header_get_info_id(bcf_hdr_t *hdr, key) except? -2: # <<<<<<<<<<<<<<
45474 * cdef vdict_t *d
45475 * cdef khiter_t k
45476 */
45477
45478 /* function exit code */
45479 __pyx_L1_error:;
45480 __Pyx_XDECREF(__pyx_t_2);
45481 __Pyx_AddTraceback("pysam.libcbcf.bcf_header_get_info_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
45482 __pyx_r = -2;
45483 __pyx_L0:;
45484 __Pyx_XDECREF(__pyx_v_key);
45485 __Pyx_TraceReturn(Py_None, 0);
45486 __Pyx_RefNannyFinishContext();
45487 return __pyx_r;
45488 }
45489
45490 /* "pysam/libcbcf.pyx":2239
45491 * """Filters set on a :class:`VariantRecord` object, presented as a mapping from
45492 * filter index or name to :class:`VariantMetadata` object"""
45493 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
45494 * raise TypeError('this class cannot be instantiated from Python')
45495 *
45496 */
45497
45498 /* Python wrapper */
45499 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
45500 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
45501 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
45502 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
45503 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
45504 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
45505 int __pyx_r;
45506 __Pyx_RefNannyDeclarations
45507 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
45508 #if CYTHON_ASSUME_SAFE_MACROS
45509 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
45510 #else
45511 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
45512 #endif
45513 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
45514 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
45515 __Pyx_INCREF(__pyx_args);
45516 __pyx_v_args = __pyx_args;
45517 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
45518
45519 /* function exit code */
45520 __Pyx_DECREF(__pyx_v_args);
45521 __Pyx_XDECREF(__pyx_v_kwargs);
45522 __Pyx_RefNannyFinishContext();
45523 return __pyx_r;
45524 }
45525
45526 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
45527 int __pyx_r;
45528 __Pyx_TraceDeclarations
45529 __Pyx_RefNannyDeclarations
45530 PyObject *__pyx_t_1 = NULL;
45531 int __pyx_lineno = 0;
45532 const char *__pyx_filename = NULL;
45533 int __pyx_clineno = 0;
45534 __Pyx_RefNannySetupContext("__init__", 1);
45535 __Pyx_TraceCall("__init__", __pyx_f[0], 2239, 0, __PYX_ERR(0, 2239, __pyx_L1_error));
45536
45537 /* "pysam/libcbcf.pyx":2240
45538 * filter index or name to :class:`VariantMetadata` object"""
45539 * def __init__(self, *args, **kwargs):
45540 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
45541 *
45542 * def __len__(self):
45543 */
45544 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2240, __pyx_L1_error)
45545 __Pyx_GOTREF(__pyx_t_1);
45546 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
45547 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45548 __PYX_ERR(0, 2240, __pyx_L1_error)
45549
45550 /* "pysam/libcbcf.pyx":2239
45551 * """Filters set on a :class:`VariantRecord` object, presented as a mapping from
45552 * filter index or name to :class:`VariantMetadata` object"""
45553 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
45554 * raise TypeError('this class cannot be instantiated from Python')
45555 *
45556 */
45557
45558 /* function exit code */
45559 __pyx_L1_error:;
45560 __Pyx_XDECREF(__pyx_t_1);
45561 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
45562 __pyx_r = -1;
45563 __Pyx_TraceReturn(Py_None, 0);
45564 __Pyx_RefNannyFinishContext();
45565 return __pyx_r;
45566 }
45567
45568 /* "pysam/libcbcf.pyx":2242
45569 * raise TypeError('this class cannot be instantiated from Python')
45570 *
45571 * def __len__(self): # <<<<<<<<<<<<<<
45572 * return self.record.ptr.d.n_flt
45573 *
45574 */
45575
45576 /* Python wrapper */
45577 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_3__len__(PyObject *__pyx_v_self); /*proto*/
45578 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_3__len__(PyObject *__pyx_v_self) {
45579 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
45580 Py_ssize_t __pyx_r;
45581 __Pyx_RefNannyDeclarations
45582 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
45583 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
45584 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
45585
45586 /* function exit code */
45587 __Pyx_RefNannyFinishContext();
45588 return __pyx_r;
45589 }
45590
45591 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
45592 Py_ssize_t __pyx_r;
45593 __Pyx_TraceDeclarations
45594 int __pyx_lineno = 0;
45595 const char *__pyx_filename = NULL;
45596 int __pyx_clineno = 0;
45597 __Pyx_TraceCall("__len__", __pyx_f[0], 2242, 0, __PYX_ERR(0, 2242, __pyx_L1_error));
45598
45599 /* "pysam/libcbcf.pyx":2243
45600 *
45601 * def __len__(self):
45602 * return self.record.ptr.d.n_flt # <<<<<<<<<<<<<<
45603 *
45604 * def __bool__(self):
45605 */
45606 __pyx_r = __pyx_v_self->record->ptr->d.n_flt;
45607 goto __pyx_L0;
45608
45609 /* "pysam/libcbcf.pyx":2242
45610 * raise TypeError('this class cannot be instantiated from Python')
45611 *
45612 * def __len__(self): # <<<<<<<<<<<<<<
45613 * return self.record.ptr.d.n_flt
45614 *
45615 */
45616
45617 /* function exit code */
45618 __pyx_L1_error:;
45619 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
45620 __pyx_r = -1;
45621 __pyx_L0:;
45622 __Pyx_TraceReturn(Py_None, 0);
45623 return __pyx_r;
45624 }
45625
45626 /* "pysam/libcbcf.pyx":2245
45627 * return self.record.ptr.d.n_flt
45628 *
45629 * def __bool__(self): # <<<<<<<<<<<<<<
45630 * return self.record.ptr.d.n_flt != 0
45631 *
45632 */
45633
45634 /* Python wrapper */
45635 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_5__bool__(PyObject *__pyx_v_self); /*proto*/
45636 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_5__bool__(PyObject *__pyx_v_self) {
45637 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
45638 int __pyx_r;
45639 __Pyx_RefNannyDeclarations
45640 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
45641 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
45642 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
45643
45644 /* function exit code */
45645 __Pyx_RefNannyFinishContext();
45646 return __pyx_r;
45647 }
45648
45649 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
45650 int __pyx_r;
45651 __Pyx_TraceDeclarations
45652 int __pyx_lineno = 0;
45653 const char *__pyx_filename = NULL;
45654 int __pyx_clineno = 0;
45655 __Pyx_TraceCall("__bool__", __pyx_f[0], 2245, 0, __PYX_ERR(0, 2245, __pyx_L1_error));
45656
45657 /* "pysam/libcbcf.pyx":2246
45658 *
45659 * def __bool__(self):
45660 * return self.record.ptr.d.n_flt != 0 # <<<<<<<<<<<<<<
45661 *
45662 * def __getitem__(self, key):
45663 */
45664 __pyx_r = (__pyx_v_self->record->ptr->d.n_flt != 0);
45665 goto __pyx_L0;
45666
45667 /* "pysam/libcbcf.pyx":2245
45668 * return self.record.ptr.d.n_flt
45669 *
45670 * def __bool__(self): # <<<<<<<<<<<<<<
45671 * return self.record.ptr.d.n_flt != 0
45672 *
45673 */
45674
45675 /* function exit code */
45676 __pyx_L1_error:;
45677 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
45678 __pyx_r = -1;
45679 __pyx_L0:;
45680 __Pyx_TraceReturn(Py_None, 0);
45681 return __pyx_r;
45682 }
45683
45684 /* "pysam/libcbcf.pyx":2248
45685 * return self.record.ptr.d.n_flt != 0
45686 *
45687 * def __getitem__(self, key): # <<<<<<<<<<<<<<
45688 * cdef bcf_hdr_t *hdr = self.record.header.ptr
45689 * cdef bcf1_t *r = self.record.ptr
45690 */
45691
45692 /* Python wrapper */
45693 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
45694 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
45695 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
45696 PyObject *__pyx_r = 0;
45697 __Pyx_RefNannyDeclarations
45698 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
45699 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
45700 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self), ((PyObject *)__pyx_v_key));
45701
45702 /* function exit code */
45703 __Pyx_RefNannyFinishContext();
45704 return __pyx_r;
45705 }
45706
45707 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key) {
45708 bcf_hdr_t *__pyx_v_hdr;
45709 bcf1_t *__pyx_v_r;
45710 int __pyx_v_index;
45711 int __pyx_v_id;
45712 int __pyx_v_n;
45713 PyObject *__pyx_v_bkey = NULL;
45714 PyObject *__pyx_r = NULL;
45715 __Pyx_TraceDeclarations
45716 __Pyx_RefNannyDeclarations
45717 bcf_hdr_t *__pyx_t_1;
45718 bcf1_t *__pyx_t_2;
45719 int __pyx_t_3;
45720 int __pyx_t_4;
45721 int __pyx_t_5;
45722 PyObject *__pyx_t_6 = NULL;
45723 char const *__pyx_t_7;
45724 int __pyx_t_8;
45725 char *__pyx_t_9;
45726 PyObject *__pyx_t_10 = NULL;
45727 PyObject *__pyx_t_11 = NULL;
45728 unsigned int __pyx_t_12;
45729 int __pyx_lineno = 0;
45730 const char *__pyx_filename = NULL;
45731 int __pyx_clineno = 0;
45732 __Pyx_RefNannySetupContext("__getitem__", 0);
45733 __Pyx_TraceCall("__getitem__", __pyx_f[0], 2248, 0, __PYX_ERR(0, 2248, __pyx_L1_error));
45734 __Pyx_INCREF(__pyx_v_key);
45735
45736 /* "pysam/libcbcf.pyx":2249
45737 *
45738 * def __getitem__(self, key):
45739 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
45740 * cdef bcf1_t *r = self.record.ptr
45741 * cdef int index, id
45742 */
45743 __pyx_t_1 = __pyx_v_self->record->header->ptr;
45744 __pyx_v_hdr = __pyx_t_1;
45745
45746 /* "pysam/libcbcf.pyx":2250
45747 * def __getitem__(self, key):
45748 * cdef bcf_hdr_t *hdr = self.record.header.ptr
45749 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
45750 * cdef int index, id
45751 * cdef int n = r.d.n_flt
45752 */
45753 __pyx_t_2 = __pyx_v_self->record->ptr;
45754 __pyx_v_r = __pyx_t_2;
45755
45756 /* "pysam/libcbcf.pyx":2252
45757 * cdef bcf1_t *r = self.record.ptr
45758 * cdef int index, id
45759 * cdef int n = r.d.n_flt # <<<<<<<<<<<<<<
45760 *
45761 * if isinstance(key, int):
45762 */
45763 __pyx_t_3 = __pyx_v_r->d.n_flt;
45764 __pyx_v_n = __pyx_t_3;
45765
45766 /* "pysam/libcbcf.pyx":2254
45767 * cdef int n = r.d.n_flt
45768 *
45769 * if isinstance(key, int): # <<<<<<<<<<<<<<
45770 * index = key
45771 *
45772 */
45773 __pyx_t_4 = PyInt_Check(__pyx_v_key);
45774 if (__pyx_t_4) {
45775
45776 /* "pysam/libcbcf.pyx":2255
45777 *
45778 * if isinstance(key, int):
45779 * index = key # <<<<<<<<<<<<<<
45780 *
45781 * if index < 0 or index >= n:
45782 */
45783 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_key); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2255, __pyx_L1_error)
45784 __pyx_v_index = __pyx_t_3;
45785
45786 /* "pysam/libcbcf.pyx":2257
45787 * index = key
45788 *
45789 * if index < 0 or index >= n: # <<<<<<<<<<<<<<
45790 * raise IndexError('invalid filter index')
45791 *
45792 */
45793 __pyx_t_5 = (__pyx_v_index < 0);
45794 if (!__pyx_t_5) {
45795 } else {
45796 __pyx_t_4 = __pyx_t_5;
45797 goto __pyx_L5_bool_binop_done;
45798 }
45799 __pyx_t_5 = (__pyx_v_index >= __pyx_v_n);
45800 __pyx_t_4 = __pyx_t_5;
45801 __pyx_L5_bool_binop_done:;
45802 if (unlikely(__pyx_t_4)) {
45803
45804 /* "pysam/libcbcf.pyx":2258
45805 *
45806 * if index < 0 or index >= n:
45807 * raise IndexError('invalid filter index') # <<<<<<<<<<<<<<
45808 *
45809 * id = r.d.flt[index]
45810 */
45811 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2258, __pyx_L1_error)
45812 __Pyx_GOTREF(__pyx_t_6);
45813 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
45814 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
45815 __PYX_ERR(0, 2258, __pyx_L1_error)
45816
45817 /* "pysam/libcbcf.pyx":2257
45818 * index = key
45819 *
45820 * if index < 0 or index >= n: # <<<<<<<<<<<<<<
45821 * raise IndexError('invalid filter index')
45822 *
45823 */
45824 }
45825
45826 /* "pysam/libcbcf.pyx":2260
45827 * raise IndexError('invalid filter index')
45828 *
45829 * id = r.d.flt[index] # <<<<<<<<<<<<<<
45830 * else:
45831 * if key == '.':
45832 */
45833 __pyx_v_id = (__pyx_v_r->d.flt[__pyx_v_index]);
45834
45835 /* "pysam/libcbcf.pyx":2254
45836 * cdef int n = r.d.n_flt
45837 *
45838 * if isinstance(key, int): # <<<<<<<<<<<<<<
45839 * index = key
45840 *
45841 */
45842 goto __pyx_L3;
45843 }
45844
45845 /* "pysam/libcbcf.pyx":2262
45846 * id = r.d.flt[index]
45847 * else:
45848 * if key == '.': # <<<<<<<<<<<<<<
45849 * key = 'PASS'
45850 *
45851 */
45852 /*else*/ {
45853 __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_kp_u__52, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2262, __pyx_L1_error)
45854 if (__pyx_t_4) {
45855
45856 /* "pysam/libcbcf.pyx":2263
45857 * else:
45858 * if key == '.':
45859 * key = 'PASS' # <<<<<<<<<<<<<<
45860 *
45861 * bkey = force_bytes(key)
45862 */
45863 __Pyx_INCREF(__pyx_n_u_PASS);
45864 __Pyx_DECREF_SET(__pyx_v_key, __pyx_n_u_PASS);
45865
45866 /* "pysam/libcbcf.pyx":2262
45867 * id = r.d.flt[index]
45868 * else:
45869 * if key == '.': # <<<<<<<<<<<<<<
45870 * key = 'PASS'
45871 *
45872 */
45873 }
45874
45875 /* "pysam/libcbcf.pyx":2265
45876 * key = 'PASS'
45877 *
45878 * bkey = force_bytes(key) # <<<<<<<<<<<<<<
45879 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
45880 *
45881 */
45882 __pyx_t_6 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2265, __pyx_L1_error)
45883 __Pyx_GOTREF(__pyx_t_6);
45884 __pyx_v_bkey = ((PyObject*)__pyx_t_6);
45885 __pyx_t_6 = 0;
45886
45887 /* "pysam/libcbcf.pyx":2266
45888 *
45889 * bkey = force_bytes(key)
45890 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey) # <<<<<<<<<<<<<<
45891 *
45892 * if not check_header_id(hdr, BCF_HL_FLT, id) or not bcf_has_filter(hdr, r, bkey):
45893 */
45894 if (unlikely(__pyx_v_bkey == Py_None)) {
45895 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
45896 __PYX_ERR(0, 2266, __pyx_L1_error)
45897 }
45898 __pyx_t_7 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2266, __pyx_L1_error)
45899 __pyx_v_id = bcf_hdr_id2int(__pyx_v_hdr, BCF_DT_ID, __pyx_t_7);
45900
45901 /* "pysam/libcbcf.pyx":2268
45902 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
45903 *
45904 * if not check_header_id(hdr, BCF_HL_FLT, id) or not bcf_has_filter(hdr, r, bkey): # <<<<<<<<<<<<<<
45905 * raise KeyError('Invalid filter: {}'.format(key))
45906 *
45907 */
45908 __pyx_t_5 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_FLT, __pyx_v_id); if (unlikely(__pyx_t_5 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2268, __pyx_L1_error)
45909 __pyx_t_8 = (!__pyx_t_5);
45910 if (!__pyx_t_8) {
45911 } else {
45912 __pyx_t_4 = __pyx_t_8;
45913 goto __pyx_L9_bool_binop_done;
45914 }
45915 if (unlikely(__pyx_v_bkey == Py_None)) {
45916 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
45917 __PYX_ERR(0, 2268, __pyx_L1_error)
45918 }
45919 __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_bkey); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2268, __pyx_L1_error)
45920 __pyx_t_8 = (!(bcf_has_filter(__pyx_v_hdr, __pyx_v_r, __pyx_t_9) != 0));
45921 __pyx_t_4 = __pyx_t_8;
45922 __pyx_L9_bool_binop_done:;
45923 if (unlikely(__pyx_t_4)) {
45924
45925 /* "pysam/libcbcf.pyx":2269
45926 *
45927 * if not check_header_id(hdr, BCF_HL_FLT, id) or not bcf_has_filter(hdr, r, bkey):
45928 * raise KeyError('Invalid filter: {}'.format(key)) # <<<<<<<<<<<<<<
45929 *
45930 * return makeVariantMetadata(self.record.header, BCF_HL_FLT, id)
45931 */
45932 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Invalid_filter, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2269, __pyx_L1_error)
45933 __Pyx_GOTREF(__pyx_t_10);
45934 __pyx_t_11 = NULL;
45935 __pyx_t_12 = 0;
45936 #if CYTHON_UNPACK_METHODS
45937 if (likely(PyMethod_Check(__pyx_t_10))) {
45938 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
45939 if (likely(__pyx_t_11)) {
45940 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
45941 __Pyx_INCREF(__pyx_t_11);
45942 __Pyx_INCREF(function);
45943 __Pyx_DECREF_SET(__pyx_t_10, function);
45944 __pyx_t_12 = 1;
45945 }
45946 }
45947 #endif
45948 {
45949 PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_key};
45950 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
45951 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
45952 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2269, __pyx_L1_error)
45953 __Pyx_GOTREF(__pyx_t_6);
45954 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
45955 }
45956 __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2269, __pyx_L1_error)
45957 __Pyx_GOTREF(__pyx_t_10);
45958 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
45959 __Pyx_Raise(__pyx_t_10, 0, 0, 0);
45960 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
45961 __PYX_ERR(0, 2269, __pyx_L1_error)
45962
45963 /* "pysam/libcbcf.pyx":2268
45964 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
45965 *
45966 * if not check_header_id(hdr, BCF_HL_FLT, id) or not bcf_has_filter(hdr, r, bkey): # <<<<<<<<<<<<<<
45967 * raise KeyError('Invalid filter: {}'.format(key))
45968 *
45969 */
45970 }
45971 }
45972 __pyx_L3:;
45973
45974 /* "pysam/libcbcf.pyx":2271
45975 * raise KeyError('Invalid filter: {}'.format(key))
45976 *
45977 * return makeVariantMetadata(self.record.header, BCF_HL_FLT, id) # <<<<<<<<<<<<<<
45978 *
45979 * def add(self, key):
45980 */
45981 __Pyx_XDECREF(__pyx_r);
45982 __pyx_t_10 = ((PyObject *)__pyx_v_self->record->header);
45983 __Pyx_INCREF(__pyx_t_10);
45984 __pyx_t_6 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantMetadata(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_10), BCF_HL_FLT, __pyx_v_id)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2271, __pyx_L1_error)
45985 __Pyx_GOTREF(__pyx_t_6);
45986 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
45987 __pyx_r = __pyx_t_6;
45988 __pyx_t_6 = 0;
45989 goto __pyx_L0;
45990
45991 /* "pysam/libcbcf.pyx":2248
45992 * return self.record.ptr.d.n_flt != 0
45993 *
45994 * def __getitem__(self, key): # <<<<<<<<<<<<<<
45995 * cdef bcf_hdr_t *hdr = self.record.header.ptr
45996 * cdef bcf1_t *r = self.record.ptr
45997 */
45998
45999 /* function exit code */
46000 __pyx_L1_error:;
46001 __Pyx_XDECREF(__pyx_t_6);
46002 __Pyx_XDECREF(__pyx_t_10);
46003 __Pyx_XDECREF(__pyx_t_11);
46004 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
46005 __pyx_r = NULL;
46006 __pyx_L0:;
46007 __Pyx_XDECREF(__pyx_v_bkey);
46008 __Pyx_XDECREF(__pyx_v_key);
46009 __Pyx_XGIVEREF(__pyx_r);
46010 __Pyx_TraceReturn(__pyx_r, 0);
46011 __Pyx_RefNannyFinishContext();
46012 return __pyx_r;
46013 }
46014
46015 /* "pysam/libcbcf.pyx":2273
46016 * return makeVariantMetadata(self.record.header, BCF_HL_FLT, id)
46017 *
46018 * def add(self, key): # <<<<<<<<<<<<<<
46019 * """Add a new filter"""
46020 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46021 */
46022
46023 /* Python wrapper */
46024 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_9add(PyObject *__pyx_v_self,
46025 #if CYTHON_METH_FASTCALL
46026 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
46027 #else
46028 PyObject *__pyx_args, PyObject *__pyx_kwds
46029 #endif
46030 ); /*proto*/
46031 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_8add, "VariantRecordFilter.add(self, key)\nAdd a new filter");
46032 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_9add = {"add", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_9add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_8add};
46033 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_9add(PyObject *__pyx_v_self,
46034 #if CYTHON_METH_FASTCALL
46035 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
46036 #else
46037 PyObject *__pyx_args, PyObject *__pyx_kwds
46038 #endif
46039 ) {
46040 PyObject *__pyx_v_key = 0;
46041 #if !CYTHON_METH_FASTCALL
46042 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
46043 #endif
46044 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
46045 PyObject* values[1] = {0};
46046 int __pyx_lineno = 0;
46047 const char *__pyx_filename = NULL;
46048 int __pyx_clineno = 0;
46049 PyObject *__pyx_r = 0;
46050 __Pyx_RefNannyDeclarations
46051 __Pyx_RefNannySetupContext("add (wrapper)", 0);
46052 #if !CYTHON_METH_FASTCALL
46053 #if CYTHON_ASSUME_SAFE_MACROS
46054 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
46055 #else
46056 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
46057 #endif
46058 #endif
46059 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
46060 {
46061 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,0};
46062 if (__pyx_kwds) {
46063 Py_ssize_t kw_args;
46064 switch (__pyx_nargs) {
46065 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
46066 CYTHON_FALLTHROUGH;
46067 case 0: break;
46068 default: goto __pyx_L5_argtuple_error;
46069 }
46070 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
46071 switch (__pyx_nargs) {
46072 case 0:
46073 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
46074 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
46075 kw_args--;
46076 }
46077 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2273, __pyx_L3_error)
46078 else goto __pyx_L5_argtuple_error;
46079 }
46080 if (unlikely(kw_args > 0)) {
46081 const Py_ssize_t kwd_pos_args = __pyx_nargs;
46082 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add") < 0)) __PYX_ERR(0, 2273, __pyx_L3_error)
46083 }
46084 } else if (unlikely(__pyx_nargs != 1)) {
46085 goto __pyx_L5_argtuple_error;
46086 } else {
46087 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
46088 }
46089 __pyx_v_key = values[0];
46090 }
46091 goto __pyx_L6_skip;
46092 __pyx_L5_argtuple_error:;
46093 __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2273, __pyx_L3_error)
46094 __pyx_L6_skip:;
46095 goto __pyx_L4_argument_unpacking_done;
46096 __pyx_L3_error:;
46097 {
46098 Py_ssize_t __pyx_temp;
46099 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
46100 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
46101 }
46102 }
46103 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
46104 __Pyx_RefNannyFinishContext();
46105 return NULL;
46106 __pyx_L4_argument_unpacking_done:;
46107 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_8add(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self), __pyx_v_key);
46108
46109 /* function exit code */
46110 {
46111 Py_ssize_t __pyx_temp;
46112 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
46113 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
46114 }
46115 }
46116 __Pyx_RefNannyFinishContext();
46117 return __pyx_r;
46118 }
46119
46120 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_8add(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key) {
46121 bcf_hdr_t *__pyx_v_hdr;
46122 bcf1_t *__pyx_v_r;
46123 int __pyx_v_id;
46124 PyObject *__pyx_v_bkey = 0;
46125 PyObject *__pyx_r = NULL;
46126 __Pyx_TraceDeclarations
46127 __Pyx_RefNannyDeclarations
46128 bcf_hdr_t *__pyx_t_1;
46129 bcf1_t *__pyx_t_2;
46130 int __pyx_t_3;
46131 PyObject *__pyx_t_4 = NULL;
46132 char const *__pyx_t_5;
46133 int __pyx_t_6;
46134 PyObject *__pyx_t_7 = NULL;
46135 PyObject *__pyx_t_8 = NULL;
46136 unsigned int __pyx_t_9;
46137 int __pyx_lineno = 0;
46138 const char *__pyx_filename = NULL;
46139 int __pyx_clineno = 0;
46140 __Pyx_TraceFrameInit(__pyx_codeobj__112)
46141 __Pyx_RefNannySetupContext("add", 0);
46142 __Pyx_TraceCall("add", __pyx_f[0], 2273, 0, __PYX_ERR(0, 2273, __pyx_L1_error));
46143 __Pyx_INCREF(__pyx_v_key);
46144
46145 /* "pysam/libcbcf.pyx":2275
46146 * def add(self, key):
46147 * """Add a new filter"""
46148 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
46149 * cdef bcf1_t *r = self.record.ptr
46150 * cdef int id
46151 */
46152 __pyx_t_1 = __pyx_v_self->record->header->ptr;
46153 __pyx_v_hdr = __pyx_t_1;
46154
46155 /* "pysam/libcbcf.pyx":2276
46156 * """Add a new filter"""
46157 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46158 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
46159 * cdef int id
46160 *
46161 */
46162 __pyx_t_2 = __pyx_v_self->record->ptr;
46163 __pyx_v_r = __pyx_t_2;
46164
46165 /* "pysam/libcbcf.pyx":2279
46166 * cdef int id
46167 *
46168 * if key == '.': # <<<<<<<<<<<<<<
46169 * key = 'PASS'
46170 *
46171 */
46172 __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_kp_u__52, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2279, __pyx_L1_error)
46173 if (__pyx_t_3) {
46174
46175 /* "pysam/libcbcf.pyx":2280
46176 *
46177 * if key == '.':
46178 * key = 'PASS' # <<<<<<<<<<<<<<
46179 *
46180 * cdef bytes bkey = force_bytes(key)
46181 */
46182 __Pyx_INCREF(__pyx_n_u_PASS);
46183 __Pyx_DECREF_SET(__pyx_v_key, __pyx_n_u_PASS);
46184
46185 /* "pysam/libcbcf.pyx":2279
46186 * cdef int id
46187 *
46188 * if key == '.': # <<<<<<<<<<<<<<
46189 * key = 'PASS'
46190 *
46191 */
46192 }
46193
46194 /* "pysam/libcbcf.pyx":2282
46195 * key = 'PASS'
46196 *
46197 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
46198 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
46199 *
46200 */
46201 __pyx_t_4 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2282, __pyx_L1_error)
46202 __Pyx_GOTREF(__pyx_t_4);
46203 __pyx_v_bkey = ((PyObject*)__pyx_t_4);
46204 __pyx_t_4 = 0;
46205
46206 /* "pysam/libcbcf.pyx":2283
46207 *
46208 * cdef bytes bkey = force_bytes(key)
46209 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey) # <<<<<<<<<<<<<<
46210 *
46211 * if not check_header_id(hdr, BCF_HL_FLT, id):
46212 */
46213 if (unlikely(__pyx_v_bkey == Py_None)) {
46214 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
46215 __PYX_ERR(0, 2283, __pyx_L1_error)
46216 }
46217 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2283, __pyx_L1_error)
46218 __pyx_v_id = bcf_hdr_id2int(__pyx_v_hdr, BCF_DT_ID, __pyx_t_5);
46219
46220 /* "pysam/libcbcf.pyx":2285
46221 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
46222 *
46223 * if not check_header_id(hdr, BCF_HL_FLT, id): # <<<<<<<<<<<<<<
46224 * raise KeyError('Invalid filter: {}'.format(key))
46225 *
46226 */
46227 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_FLT, __pyx_v_id); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2285, __pyx_L1_error)
46228 __pyx_t_6 = (!__pyx_t_3);
46229 if (unlikely(__pyx_t_6)) {
46230
46231 /* "pysam/libcbcf.pyx":2286
46232 *
46233 * if not check_header_id(hdr, BCF_HL_FLT, id):
46234 * raise KeyError('Invalid filter: {}'.format(key)) # <<<<<<<<<<<<<<
46235 *
46236 * bcf_add_filter(hdr, r, id)
46237 */
46238 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Invalid_filter, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2286, __pyx_L1_error)
46239 __Pyx_GOTREF(__pyx_t_7);
46240 __pyx_t_8 = NULL;
46241 __pyx_t_9 = 0;
46242 #if CYTHON_UNPACK_METHODS
46243 if (likely(PyMethod_Check(__pyx_t_7))) {
46244 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
46245 if (likely(__pyx_t_8)) {
46246 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
46247 __Pyx_INCREF(__pyx_t_8);
46248 __Pyx_INCREF(function);
46249 __Pyx_DECREF_SET(__pyx_t_7, function);
46250 __pyx_t_9 = 1;
46251 }
46252 }
46253 #endif
46254 {
46255 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_key};
46256 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
46257 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
46258 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2286, __pyx_L1_error)
46259 __Pyx_GOTREF(__pyx_t_4);
46260 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
46261 }
46262 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2286, __pyx_L1_error)
46263 __Pyx_GOTREF(__pyx_t_7);
46264 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46265 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
46266 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
46267 __PYX_ERR(0, 2286, __pyx_L1_error)
46268
46269 /* "pysam/libcbcf.pyx":2285
46270 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
46271 *
46272 * if not check_header_id(hdr, BCF_HL_FLT, id): # <<<<<<<<<<<<<<
46273 * raise KeyError('Invalid filter: {}'.format(key))
46274 *
46275 */
46276 }
46277
46278 /* "pysam/libcbcf.pyx":2288
46279 * raise KeyError('Invalid filter: {}'.format(key))
46280 *
46281 * bcf_add_filter(hdr, r, id) # <<<<<<<<<<<<<<
46282 *
46283 * def __delitem__(self, key):
46284 */
46285 (void)(bcf_add_filter(__pyx_v_hdr, __pyx_v_r, __pyx_v_id));
46286
46287 /* "pysam/libcbcf.pyx":2273
46288 * return makeVariantMetadata(self.record.header, BCF_HL_FLT, id)
46289 *
46290 * def add(self, key): # <<<<<<<<<<<<<<
46291 * """Add a new filter"""
46292 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46293 */
46294
46295 /* function exit code */
46296 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
46297 goto __pyx_L0;
46298 __pyx_L1_error:;
46299 __Pyx_XDECREF(__pyx_t_4);
46300 __Pyx_XDECREF(__pyx_t_7);
46301 __Pyx_XDECREF(__pyx_t_8);
46302 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
46303 __pyx_r = NULL;
46304 __pyx_L0:;
46305 __Pyx_XDECREF(__pyx_v_bkey);
46306 __Pyx_XDECREF(__pyx_v_key);
46307 __Pyx_XGIVEREF(__pyx_r);
46308 __Pyx_TraceReturn(__pyx_r, 0);
46309 __Pyx_RefNannyFinishContext();
46310 return __pyx_r;
46311 }
46312
46313 /* "pysam/libcbcf.pyx":2290
46314 * bcf_add_filter(hdr, r, id)
46315 *
46316 * def __delitem__(self, key): # <<<<<<<<<<<<<<
46317 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46318 * cdef bcf1_t *r = self.record.ptr
46319 */
46320
46321 /* Python wrapper */
46322 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_11__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
46323 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_11__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
46324 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
46325 int __pyx_r;
46326 __Pyx_RefNannyDeclarations
46327 __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
46328 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
46329 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_10__delitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self), ((PyObject *)__pyx_v_key));
46330
46331 /* function exit code */
46332 __Pyx_RefNannyFinishContext();
46333 return __pyx_r;
46334 }
46335
46336 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_10__delitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key) {
46337 bcf_hdr_t *__pyx_v_hdr;
46338 bcf1_t *__pyx_v_r;
46339 int __pyx_v_index;
46340 int __pyx_v_id;
46341 int __pyx_v_n;
46342 PyObject *__pyx_v_bkey = NULL;
46343 int __pyx_r;
46344 __Pyx_TraceDeclarations
46345 __Pyx_RefNannyDeclarations
46346 bcf_hdr_t *__pyx_t_1;
46347 bcf1_t *__pyx_t_2;
46348 int __pyx_t_3;
46349 int __pyx_t_4;
46350 int __pyx_t_5;
46351 PyObject *__pyx_t_6 = NULL;
46352 char const *__pyx_t_7;
46353 int __pyx_t_8;
46354 char *__pyx_t_9;
46355 PyObject *__pyx_t_10 = NULL;
46356 PyObject *__pyx_t_11 = NULL;
46357 unsigned int __pyx_t_12;
46358 int __pyx_lineno = 0;
46359 const char *__pyx_filename = NULL;
46360 int __pyx_clineno = 0;
46361 __Pyx_RefNannySetupContext("__delitem__", 0);
46362 __Pyx_TraceCall("__delitem__", __pyx_f[0], 2290, 0, __PYX_ERR(0, 2290, __pyx_L1_error));
46363 __Pyx_INCREF(__pyx_v_key);
46364
46365 /* "pysam/libcbcf.pyx":2291
46366 *
46367 * def __delitem__(self, key):
46368 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
46369 * cdef bcf1_t *r = self.record.ptr
46370 * cdef int index, id
46371 */
46372 __pyx_t_1 = __pyx_v_self->record->header->ptr;
46373 __pyx_v_hdr = __pyx_t_1;
46374
46375 /* "pysam/libcbcf.pyx":2292
46376 * def __delitem__(self, key):
46377 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46378 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
46379 * cdef int index, id
46380 * cdef int n = r.d.n_flt
46381 */
46382 __pyx_t_2 = __pyx_v_self->record->ptr;
46383 __pyx_v_r = __pyx_t_2;
46384
46385 /* "pysam/libcbcf.pyx":2294
46386 * cdef bcf1_t *r = self.record.ptr
46387 * cdef int index, id
46388 * cdef int n = r.d.n_flt # <<<<<<<<<<<<<<
46389 *
46390 * if isinstance(key, int):
46391 */
46392 __pyx_t_3 = __pyx_v_r->d.n_flt;
46393 __pyx_v_n = __pyx_t_3;
46394
46395 /* "pysam/libcbcf.pyx":2296
46396 * cdef int n = r.d.n_flt
46397 *
46398 * if isinstance(key, int): # <<<<<<<<<<<<<<
46399 * index = key
46400 *
46401 */
46402 __pyx_t_4 = PyInt_Check(__pyx_v_key);
46403 if (__pyx_t_4) {
46404
46405 /* "pysam/libcbcf.pyx":2297
46406 *
46407 * if isinstance(key, int):
46408 * index = key # <<<<<<<<<<<<<<
46409 *
46410 * if index < 0 or index >= n:
46411 */
46412 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_key); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2297, __pyx_L1_error)
46413 __pyx_v_index = __pyx_t_3;
46414
46415 /* "pysam/libcbcf.pyx":2299
46416 * index = key
46417 *
46418 * if index < 0 or index >= n: # <<<<<<<<<<<<<<
46419 * raise IndexError('invalid filter index')
46420 *
46421 */
46422 __pyx_t_5 = (__pyx_v_index < 0);
46423 if (!__pyx_t_5) {
46424 } else {
46425 __pyx_t_4 = __pyx_t_5;
46426 goto __pyx_L5_bool_binop_done;
46427 }
46428 __pyx_t_5 = (__pyx_v_index >= __pyx_v_n);
46429 __pyx_t_4 = __pyx_t_5;
46430 __pyx_L5_bool_binop_done:;
46431 if (unlikely(__pyx_t_4)) {
46432
46433 /* "pysam/libcbcf.pyx":2300
46434 *
46435 * if index < 0 or index >= n:
46436 * raise IndexError('invalid filter index') # <<<<<<<<<<<<<<
46437 *
46438 * id = r.d.flt[index]
46439 */
46440 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2300, __pyx_L1_error)
46441 __Pyx_GOTREF(__pyx_t_6);
46442 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
46443 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
46444 __PYX_ERR(0, 2300, __pyx_L1_error)
46445
46446 /* "pysam/libcbcf.pyx":2299
46447 * index = key
46448 *
46449 * if index < 0 or index >= n: # <<<<<<<<<<<<<<
46450 * raise IndexError('invalid filter index')
46451 *
46452 */
46453 }
46454
46455 /* "pysam/libcbcf.pyx":2302
46456 * raise IndexError('invalid filter index')
46457 *
46458 * id = r.d.flt[index] # <<<<<<<<<<<<<<
46459 * else:
46460 * if key == '.':
46461 */
46462 __pyx_v_id = (__pyx_v_r->d.flt[__pyx_v_index]);
46463
46464 /* "pysam/libcbcf.pyx":2296
46465 * cdef int n = r.d.n_flt
46466 *
46467 * if isinstance(key, int): # <<<<<<<<<<<<<<
46468 * index = key
46469 *
46470 */
46471 goto __pyx_L3;
46472 }
46473
46474 /* "pysam/libcbcf.pyx":2304
46475 * id = r.d.flt[index]
46476 * else:
46477 * if key == '.': # <<<<<<<<<<<<<<
46478 * key = 'PASS'
46479 *
46480 */
46481 /*else*/ {
46482 __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_kp_u__52, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2304, __pyx_L1_error)
46483 if (__pyx_t_4) {
46484
46485 /* "pysam/libcbcf.pyx":2305
46486 * else:
46487 * if key == '.':
46488 * key = 'PASS' # <<<<<<<<<<<<<<
46489 *
46490 * bkey = force_bytes(key)
46491 */
46492 __Pyx_INCREF(__pyx_n_u_PASS);
46493 __Pyx_DECREF_SET(__pyx_v_key, __pyx_n_u_PASS);
46494
46495 /* "pysam/libcbcf.pyx":2304
46496 * id = r.d.flt[index]
46497 * else:
46498 * if key == '.': # <<<<<<<<<<<<<<
46499 * key = 'PASS'
46500 *
46501 */
46502 }
46503
46504 /* "pysam/libcbcf.pyx":2307
46505 * key = 'PASS'
46506 *
46507 * bkey = force_bytes(key) # <<<<<<<<<<<<<<
46508 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
46509 *
46510 */
46511 __pyx_t_6 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2307, __pyx_L1_error)
46512 __Pyx_GOTREF(__pyx_t_6);
46513 __pyx_v_bkey = ((PyObject*)__pyx_t_6);
46514 __pyx_t_6 = 0;
46515
46516 /* "pysam/libcbcf.pyx":2308
46517 *
46518 * bkey = force_bytes(key)
46519 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey) # <<<<<<<<<<<<<<
46520 *
46521 * if not check_header_id(hdr, BCF_HL_FLT, id) or not bcf_has_filter(hdr, r, bkey):
46522 */
46523 if (unlikely(__pyx_v_bkey == Py_None)) {
46524 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
46525 __PYX_ERR(0, 2308, __pyx_L1_error)
46526 }
46527 __pyx_t_7 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2308, __pyx_L1_error)
46528 __pyx_v_id = bcf_hdr_id2int(__pyx_v_hdr, BCF_DT_ID, __pyx_t_7);
46529
46530 /* "pysam/libcbcf.pyx":2310
46531 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
46532 *
46533 * if not check_header_id(hdr, BCF_HL_FLT, id) or not bcf_has_filter(hdr, r, bkey): # <<<<<<<<<<<<<<
46534 * raise KeyError('Invalid filter: {}'.format(key))
46535 *
46536 */
46537 __pyx_t_5 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_FLT, __pyx_v_id); if (unlikely(__pyx_t_5 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2310, __pyx_L1_error)
46538 __pyx_t_8 = (!__pyx_t_5);
46539 if (!__pyx_t_8) {
46540 } else {
46541 __pyx_t_4 = __pyx_t_8;
46542 goto __pyx_L9_bool_binop_done;
46543 }
46544 if (unlikely(__pyx_v_bkey == Py_None)) {
46545 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
46546 __PYX_ERR(0, 2310, __pyx_L1_error)
46547 }
46548 __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_bkey); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2310, __pyx_L1_error)
46549 __pyx_t_8 = (!(bcf_has_filter(__pyx_v_hdr, __pyx_v_r, __pyx_t_9) != 0));
46550 __pyx_t_4 = __pyx_t_8;
46551 __pyx_L9_bool_binop_done:;
46552 if (unlikely(__pyx_t_4)) {
46553
46554 /* "pysam/libcbcf.pyx":2311
46555 *
46556 * if not check_header_id(hdr, BCF_HL_FLT, id) or not bcf_has_filter(hdr, r, bkey):
46557 * raise KeyError('Invalid filter: {}'.format(key)) # <<<<<<<<<<<<<<
46558 *
46559 * bcf_remove_filter(hdr, r, id, 0)
46560 */
46561 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Invalid_filter, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2311, __pyx_L1_error)
46562 __Pyx_GOTREF(__pyx_t_10);
46563 __pyx_t_11 = NULL;
46564 __pyx_t_12 = 0;
46565 #if CYTHON_UNPACK_METHODS
46566 if (likely(PyMethod_Check(__pyx_t_10))) {
46567 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
46568 if (likely(__pyx_t_11)) {
46569 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
46570 __Pyx_INCREF(__pyx_t_11);
46571 __Pyx_INCREF(function);
46572 __Pyx_DECREF_SET(__pyx_t_10, function);
46573 __pyx_t_12 = 1;
46574 }
46575 }
46576 #endif
46577 {
46578 PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_key};
46579 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
46580 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
46581 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2311, __pyx_L1_error)
46582 __Pyx_GOTREF(__pyx_t_6);
46583 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
46584 }
46585 __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2311, __pyx_L1_error)
46586 __Pyx_GOTREF(__pyx_t_10);
46587 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
46588 __Pyx_Raise(__pyx_t_10, 0, 0, 0);
46589 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
46590 __PYX_ERR(0, 2311, __pyx_L1_error)
46591
46592 /* "pysam/libcbcf.pyx":2310
46593 * id = bcf_hdr_id2int(hdr, BCF_DT_ID, bkey)
46594 *
46595 * if not check_header_id(hdr, BCF_HL_FLT, id) or not bcf_has_filter(hdr, r, bkey): # <<<<<<<<<<<<<<
46596 * raise KeyError('Invalid filter: {}'.format(key))
46597 *
46598 */
46599 }
46600 }
46601 __pyx_L3:;
46602
46603 /* "pysam/libcbcf.pyx":2313
46604 * raise KeyError('Invalid filter: {}'.format(key))
46605 *
46606 * bcf_remove_filter(hdr, r, id, 0) # <<<<<<<<<<<<<<
46607 *
46608 * def clear(self):
46609 */
46610 (void)(bcf_remove_filter(__pyx_v_hdr, __pyx_v_r, __pyx_v_id, 0));
46611
46612 /* "pysam/libcbcf.pyx":2290
46613 * bcf_add_filter(hdr, r, id)
46614 *
46615 * def __delitem__(self, key): # <<<<<<<<<<<<<<
46616 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46617 * cdef bcf1_t *r = self.record.ptr
46618 */
46619
46620 /* function exit code */
46621 __pyx_r = 0;
46622 goto __pyx_L0;
46623 __pyx_L1_error:;
46624 __Pyx_XDECREF(__pyx_t_6);
46625 __Pyx_XDECREF(__pyx_t_10);
46626 __Pyx_XDECREF(__pyx_t_11);
46627 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
46628 __pyx_r = -1;
46629 __pyx_L0:;
46630 __Pyx_XDECREF(__pyx_v_bkey);
46631 __Pyx_XDECREF(__pyx_v_key);
46632 __Pyx_TraceReturn(Py_None, 0);
46633 __Pyx_RefNannyFinishContext();
46634 return __pyx_r;
46635 }
46636
46637 /* "pysam/libcbcf.pyx":2315
46638 * bcf_remove_filter(hdr, r, id, 0)
46639 *
46640 * def clear(self): # <<<<<<<<<<<<<<
46641 * """Clear all filters"""
46642 * cdef bcf1_t *r = self.record.ptr
46643 */
46644
46645 /* Python wrapper */
46646 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_13clear(PyObject *__pyx_v_self,
46647 #if CYTHON_METH_FASTCALL
46648 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
46649 #else
46650 PyObject *__pyx_args, PyObject *__pyx_kwds
46651 #endif
46652 ); /*proto*/
46653 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_12clear, "VariantRecordFilter.clear(self)\nClear all filters");
46654 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_13clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_13clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_12clear};
46655 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_13clear(PyObject *__pyx_v_self,
46656 #if CYTHON_METH_FASTCALL
46657 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
46658 #else
46659 PyObject *__pyx_args, PyObject *__pyx_kwds
46660 #endif
46661 ) {
46662 #if !CYTHON_METH_FASTCALL
46663 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
46664 #endif
46665 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
46666 PyObject *__pyx_r = 0;
46667 __Pyx_RefNannyDeclarations
46668 __Pyx_RefNannySetupContext("clear (wrapper)", 0);
46669 #if !CYTHON_METH_FASTCALL
46670 #if CYTHON_ASSUME_SAFE_MACROS
46671 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
46672 #else
46673 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
46674 #endif
46675 #endif
46676 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
46677 if (unlikely(__pyx_nargs > 0)) {
46678 __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, __pyx_nargs); return NULL;}
46679 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear", 0))) return NULL;
46680 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_12clear(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
46681
46682 /* function exit code */
46683 __Pyx_RefNannyFinishContext();
46684 return __pyx_r;
46685 }
46686
46687 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_12clear(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
46688 bcf1_t *__pyx_v_r;
46689 PyObject *__pyx_r = NULL;
46690 __Pyx_TraceDeclarations
46691 __Pyx_RefNannyDeclarations
46692 bcf1_t *__pyx_t_1;
46693 int __pyx_lineno = 0;
46694 const char *__pyx_filename = NULL;
46695 int __pyx_clineno = 0;
46696 __Pyx_TraceFrameInit(__pyx_codeobj__113)
46697 __Pyx_RefNannySetupContext("clear", 1);
46698 __Pyx_TraceCall("clear", __pyx_f[0], 2315, 0, __PYX_ERR(0, 2315, __pyx_L1_error));
46699
46700 /* "pysam/libcbcf.pyx":2317
46701 * def clear(self):
46702 * """Clear all filters"""
46703 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
46704 * r.d.shared_dirty |= BCF1_DIRTY_FLT
46705 * r.d.n_flt = 0
46706 */
46707 __pyx_t_1 = __pyx_v_self->record->ptr;
46708 __pyx_v_r = __pyx_t_1;
46709
46710 /* "pysam/libcbcf.pyx":2318
46711 * """Clear all filters"""
46712 * cdef bcf1_t *r = self.record.ptr
46713 * r.d.shared_dirty |= BCF1_DIRTY_FLT # <<<<<<<<<<<<<<
46714 * r.d.n_flt = 0
46715 *
46716 */
46717 __pyx_v_r->d.shared_dirty = (__pyx_v_r->d.shared_dirty | BCF1_DIRTY_FLT);
46718
46719 /* "pysam/libcbcf.pyx":2319
46720 * cdef bcf1_t *r = self.record.ptr
46721 * r.d.shared_dirty |= BCF1_DIRTY_FLT
46722 * r.d.n_flt = 0 # <<<<<<<<<<<<<<
46723 *
46724 * def __iter__(self):
46725 */
46726 __pyx_v_r->d.n_flt = 0;
46727
46728 /* "pysam/libcbcf.pyx":2315
46729 * bcf_remove_filter(hdr, r, id, 0)
46730 *
46731 * def clear(self): # <<<<<<<<<<<<<<
46732 * """Clear all filters"""
46733 * cdef bcf1_t *r = self.record.ptr
46734 */
46735
46736 /* function exit code */
46737 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
46738 goto __pyx_L0;
46739 __pyx_L1_error:;
46740 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
46741 __pyx_r = NULL;
46742 __pyx_L0:;
46743 __Pyx_XGIVEREF(__pyx_r);
46744 __Pyx_TraceReturn(__pyx_r, 0);
46745 __Pyx_RefNannyFinishContext();
46746 return __pyx_r;
46747 }
46748 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_16generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
46749
46750 /* "pysam/libcbcf.pyx":2321
46751 * r.d.n_flt = 0
46752 *
46753 * def __iter__(self): # <<<<<<<<<<<<<<
46754 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46755 * cdef bcf1_t *r = self.record.ptr
46756 */
46757
46758 /* Python wrapper */
46759 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_15__iter__(PyObject *__pyx_v_self); /*proto*/
46760 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_15__iter__(PyObject *__pyx_v_self) {
46761 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
46762 PyObject *__pyx_r = 0;
46763 __Pyx_RefNannyDeclarations
46764 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
46765 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
46766 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_14__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
46767
46768 /* function exit code */
46769 __Pyx_RefNannyFinishContext();
46770 return __pyx_r;
46771 }
46772
46773 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_14__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
46774 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *__pyx_cur_scope;
46775 PyObject *__pyx_r = NULL;
46776 __Pyx_RefNannyDeclarations
46777 int __pyx_lineno = 0;
46778 const char *__pyx_filename = NULL;
46779 int __pyx_clineno = 0;
46780 __Pyx_RefNannySetupContext("__iter__", 0);
46781 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_18___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__, __pyx_empty_tuple, NULL);
46782 if (unlikely(!__pyx_cur_scope)) {
46783 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *)Py_None);
46784 __Pyx_INCREF(Py_None);
46785 __PYX_ERR(0, 2321, __pyx_L1_error)
46786 } else {
46787 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
46788 }
46789 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
46790 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
46791 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
46792 {
46793 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_16generator11, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantRecordFilter___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2321, __pyx_L1_error)
46794 __Pyx_DECREF(__pyx_cur_scope);
46795 __Pyx_RefNannyFinishContext();
46796 return (PyObject *) gen;
46797 }
46798
46799 /* function exit code */
46800 __pyx_L1_error:;
46801 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
46802 __pyx_r = NULL;
46803 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
46804 __Pyx_XGIVEREF(__pyx_r);
46805 __Pyx_RefNannyFinishContext();
46806 return __pyx_r;
46807 }
46808
46809 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_16generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
46810 {
46811 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *)__pyx_generator->closure);
46812 PyObject *__pyx_r = NULL;
46813 __Pyx_TraceDeclarations
46814 bcf_hdr_t *__pyx_t_1;
46815 bcf1_t *__pyx_t_2;
46816 int __pyx_t_3;
46817 int __pyx_t_4;
46818 int __pyx_t_5;
46819 PyObject *__pyx_t_6 = NULL;
46820 int __pyx_lineno = 0;
46821 const char *__pyx_filename = NULL;
46822 int __pyx_clineno = 0;
46823 __Pyx_RefNannyDeclarations
46824 __Pyx_RefNannySetupContext("__iter__", 0);
46825 __Pyx_TraceCall("__iter__", __pyx_f[0], 2321, 0, __PYX_ERR(0, 2321, __pyx_L1_error));
46826 switch (__pyx_generator->resume_label) {
46827 case 0: goto __pyx_L3_first_run;
46828 case 1: goto __pyx_L6_resume_from_yield;
46829 default: /* CPython raises the right error here */
46830 __Pyx_TraceReturn(Py_None, 0);
46831 __Pyx_RefNannyFinishContext();
46832 return NULL;
46833 }
46834 __pyx_L3_first_run:;
46835 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2321, __pyx_L1_error)
46836
46837 /* "pysam/libcbcf.pyx":2322
46838 *
46839 * def __iter__(self):
46840 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
46841 * cdef bcf1_t *r = self.record.ptr
46842 * cdef int i
46843 */
46844 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
46845 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
46846
46847 /* "pysam/libcbcf.pyx":2323
46848 * def __iter__(self):
46849 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46850 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
46851 * cdef int i
46852 *
46853 */
46854 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
46855 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
46856
46857 /* "pysam/libcbcf.pyx":2326
46858 * cdef int i
46859 *
46860 * for i in range(r.d.n_flt): # <<<<<<<<<<<<<<
46861 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, r.d.flt[i]))
46862 *
46863 */
46864 __pyx_t_3 = __pyx_cur_scope->__pyx_v_r->d.n_flt;
46865 __pyx_t_4 = __pyx_t_3;
46866 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
46867 __pyx_cur_scope->__pyx_v_i = __pyx_t_5;
46868
46869 /* "pysam/libcbcf.pyx":2327
46870 *
46871 * for i in range(r.d.n_flt):
46872 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, r.d.flt[i])) # <<<<<<<<<<<<<<
46873 *
46874 * def get(self, key, default=None):
46875 */
46876 __pyx_t_6 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(bcf_hdr_int2id(__pyx_cur_scope->__pyx_v_hdr, BCF_DT_ID, (__pyx_cur_scope->__pyx_v_r->d.flt[__pyx_cur_scope->__pyx_v_i]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2327, __pyx_L1_error)
46877 __Pyx_GOTREF(__pyx_t_6);
46878 __pyx_r = __pyx_t_6;
46879 __pyx_t_6 = 0;
46880 __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
46881 __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
46882 __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
46883 __Pyx_XGIVEREF(__pyx_r);
46884 __Pyx_TraceReturn(__pyx_r, 0);
46885 __Pyx_RefNannyFinishContext();
46886 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
46887 /* return from generator, yielding value */
46888 __pyx_generator->resume_label = 1;
46889 return __pyx_r;
46890 __pyx_L6_resume_from_yield:;
46891 __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
46892 __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
46893 __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
46894 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2327, __pyx_L1_error)
46895 }
46896 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
46897
46898 /* "pysam/libcbcf.pyx":2321
46899 * r.d.n_flt = 0
46900 *
46901 * def __iter__(self): # <<<<<<<<<<<<<<
46902 * cdef bcf_hdr_t *hdr = self.record.header.ptr
46903 * cdef bcf1_t *r = self.record.ptr
46904 */
46905
46906 /* function exit code */
46907 PyErr_SetNone(PyExc_StopIteration);
46908 goto __pyx_L0;
46909 __pyx_L1_error:;
46910 __Pyx_Generator_Replace_StopIteration(0);
46911 __Pyx_XDECREF(__pyx_t_6);
46912 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
46913 __pyx_L0:;
46914 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
46915 #if !CYTHON_USE_EXC_INFO_STACK
46916 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
46917 #endif
46918 __pyx_generator->resume_label = -1;
46919 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
46920 __Pyx_TraceReturn(__pyx_r, 0);
46921 __Pyx_RefNannyFinishContext();
46922 return __pyx_r;
46923 }
46924
46925 /* "pysam/libcbcf.pyx":2329
46926 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, r.d.flt[i]))
46927 *
46928 * def get(self, key, default=None): # <<<<<<<<<<<<<<
46929 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
46930 * try:
46931 */
46932
46933 /* Python wrapper */
46934 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_18get(PyObject *__pyx_v_self,
46935 #if CYTHON_METH_FASTCALL
46936 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
46937 #else
46938 PyObject *__pyx_args, PyObject *__pyx_kwds
46939 #endif
46940 ); /*proto*/
46941 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_17get, "VariantRecordFilter.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
46942 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_18get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_18get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_17get};
46943 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_18get(PyObject *__pyx_v_self,
46944 #if CYTHON_METH_FASTCALL
46945 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
46946 #else
46947 PyObject *__pyx_args, PyObject *__pyx_kwds
46948 #endif
46949 ) {
46950 PyObject *__pyx_v_key = 0;
46951 PyObject *__pyx_v_default = 0;
46952 #if !CYTHON_METH_FASTCALL
46953 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
46954 #endif
46955 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
46956 PyObject* values[2] = {0,0};
46957 int __pyx_lineno = 0;
46958 const char *__pyx_filename = NULL;
46959 int __pyx_clineno = 0;
46960 PyObject *__pyx_r = 0;
46961 __Pyx_RefNannyDeclarations
46962 __Pyx_RefNannySetupContext("get (wrapper)", 0);
46963 #if !CYTHON_METH_FASTCALL
46964 #if CYTHON_ASSUME_SAFE_MACROS
46965 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
46966 #else
46967 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
46968 #endif
46969 #endif
46970 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
46971 {
46972 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
46973 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
46974 if (__pyx_kwds) {
46975 Py_ssize_t kw_args;
46976 switch (__pyx_nargs) {
46977 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
46978 CYTHON_FALLTHROUGH;
46979 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
46980 CYTHON_FALLTHROUGH;
46981 case 0: break;
46982 default: goto __pyx_L5_argtuple_error;
46983 }
46984 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
46985 switch (__pyx_nargs) {
46986 case 0:
46987 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
46988 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
46989 kw_args--;
46990 }
46991 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2329, __pyx_L3_error)
46992 else goto __pyx_L5_argtuple_error;
46993 CYTHON_FALLTHROUGH;
46994 case 1:
46995 if (kw_args > 0) {
46996 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
46997 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
46998 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2329, __pyx_L3_error)
46999 }
47000 }
47001 if (unlikely(kw_args > 0)) {
47002 const Py_ssize_t kwd_pos_args = __pyx_nargs;
47003 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 2329, __pyx_L3_error)
47004 }
47005 } else {
47006 switch (__pyx_nargs) {
47007 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
47008 CYTHON_FALLTHROUGH;
47009 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
47010 break;
47011 default: goto __pyx_L5_argtuple_error;
47012 }
47013 }
47014 __pyx_v_key = values[0];
47015 __pyx_v_default = values[1];
47016 }
47017 goto __pyx_L6_skip;
47018 __pyx_L5_argtuple_error:;
47019 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2329, __pyx_L3_error)
47020 __pyx_L6_skip:;
47021 goto __pyx_L4_argument_unpacking_done;
47022 __pyx_L3_error:;
47023 {
47024 Py_ssize_t __pyx_temp;
47025 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
47026 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
47027 }
47028 }
47029 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
47030 __Pyx_RefNannyFinishContext();
47031 return NULL;
47032 __pyx_L4_argument_unpacking_done:;
47033 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_17get(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
47034
47035 /* function exit code */
47036 {
47037 Py_ssize_t __pyx_temp;
47038 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
47039 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
47040 }
47041 }
47042 __Pyx_RefNannyFinishContext();
47043 return __pyx_r;
47044 }
47045
47046 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_17get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
47047 PyObject *__pyx_r = NULL;
47048 __Pyx_TraceDeclarations
47049 __Pyx_RefNannyDeclarations
47050 PyObject *__pyx_t_1 = NULL;
47051 PyObject *__pyx_t_2 = NULL;
47052 PyObject *__pyx_t_3 = NULL;
47053 PyObject *__pyx_t_4 = NULL;
47054 int __pyx_t_5;
47055 PyObject *__pyx_t_6 = NULL;
47056 PyObject *__pyx_t_7 = NULL;
47057 int __pyx_lineno = 0;
47058 const char *__pyx_filename = NULL;
47059 int __pyx_clineno = 0;
47060 __Pyx_TraceFrameInit(__pyx_codeobj__114)
47061 __Pyx_RefNannySetupContext("get", 1);
47062 __Pyx_TraceCall("get", __pyx_f[0], 2329, 0, __PYX_ERR(0, 2329, __pyx_L1_error));
47063
47064 /* "pysam/libcbcf.pyx":2331
47065 * def get(self, key, default=None):
47066 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
47067 * try: # <<<<<<<<<<<<<<
47068 * return self[key]
47069 * except KeyError:
47070 */
47071 {
47072 __Pyx_PyThreadState_declare
47073 __Pyx_PyThreadState_assign
47074 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
47075 __Pyx_XGOTREF(__pyx_t_1);
47076 __Pyx_XGOTREF(__pyx_t_2);
47077 __Pyx_XGOTREF(__pyx_t_3);
47078 /*try:*/ {
47079
47080 /* "pysam/libcbcf.pyx":2332
47081 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
47082 * try:
47083 * return self[key] # <<<<<<<<<<<<<<
47084 * except KeyError:
47085 * return default
47086 */
47087 __Pyx_XDECREF(__pyx_r);
47088 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2332, __pyx_L3_error)
47089 __Pyx_GOTREF(__pyx_t_4);
47090 __pyx_r = __pyx_t_4;
47091 __pyx_t_4 = 0;
47092 goto __pyx_L7_try_return;
47093
47094 /* "pysam/libcbcf.pyx":2331
47095 * def get(self, key, default=None):
47096 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
47097 * try: # <<<<<<<<<<<<<<
47098 * return self[key]
47099 * except KeyError:
47100 */
47101 }
47102 __pyx_L3_error:;
47103 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
47104
47105 /* "pysam/libcbcf.pyx":2333
47106 * try:
47107 * return self[key]
47108 * except KeyError: # <<<<<<<<<<<<<<
47109 * return default
47110 *
47111 */
47112 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
47113 if (__pyx_t_5) {
47114 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
47115 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 2333, __pyx_L5_except_error)
47116 __Pyx_XGOTREF(__pyx_t_4);
47117 __Pyx_XGOTREF(__pyx_t_6);
47118 __Pyx_XGOTREF(__pyx_t_7);
47119
47120 /* "pysam/libcbcf.pyx":2334
47121 * return self[key]
47122 * except KeyError:
47123 * return default # <<<<<<<<<<<<<<
47124 *
47125 * def __contains__(self, key):
47126 */
47127 __Pyx_XDECREF(__pyx_r);
47128 __Pyx_INCREF(__pyx_v_default);
47129 __pyx_r = __pyx_v_default;
47130 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
47131 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
47132 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47133 goto __pyx_L6_except_return;
47134 }
47135 goto __pyx_L5_except_error;
47136
47137 /* "pysam/libcbcf.pyx":2331
47138 * def get(self, key, default=None):
47139 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
47140 * try: # <<<<<<<<<<<<<<
47141 * return self[key]
47142 * except KeyError:
47143 */
47144 __pyx_L5_except_error:;
47145 __Pyx_XGIVEREF(__pyx_t_1);
47146 __Pyx_XGIVEREF(__pyx_t_2);
47147 __Pyx_XGIVEREF(__pyx_t_3);
47148 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
47149 goto __pyx_L1_error;
47150 __pyx_L7_try_return:;
47151 __Pyx_XGIVEREF(__pyx_t_1);
47152 __Pyx_XGIVEREF(__pyx_t_2);
47153 __Pyx_XGIVEREF(__pyx_t_3);
47154 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
47155 goto __pyx_L0;
47156 __pyx_L6_except_return:;
47157 __Pyx_XGIVEREF(__pyx_t_1);
47158 __Pyx_XGIVEREF(__pyx_t_2);
47159 __Pyx_XGIVEREF(__pyx_t_3);
47160 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
47161 goto __pyx_L0;
47162 }
47163
47164 /* "pysam/libcbcf.pyx":2329
47165 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, r.d.flt[i]))
47166 *
47167 * def get(self, key, default=None): # <<<<<<<<<<<<<<
47168 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
47169 * try:
47170 */
47171
47172 /* function exit code */
47173 __pyx_L1_error:;
47174 __Pyx_XDECREF(__pyx_t_4);
47175 __Pyx_XDECREF(__pyx_t_6);
47176 __Pyx_XDECREF(__pyx_t_7);
47177 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
47178 __pyx_r = NULL;
47179 __pyx_L0:;
47180 __Pyx_XGIVEREF(__pyx_r);
47181 __Pyx_TraceReturn(__pyx_r, 0);
47182 __Pyx_RefNannyFinishContext();
47183 return __pyx_r;
47184 }
47185
47186 /* "pysam/libcbcf.pyx":2336
47187 * return default
47188 *
47189 * def __contains__(self, key): # <<<<<<<<<<<<<<
47190 * cdef bcf_hdr_t *hdr = self.record.header.ptr
47191 * cdef bcf1_t *r = self.record.ptr
47192 */
47193
47194 /* Python wrapper */
47195 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
47196 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
47197 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
47198 int __pyx_r;
47199 __Pyx_RefNannyDeclarations
47200 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
47201 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
47202 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_19__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self), ((PyObject *)__pyx_v_key));
47203
47204 /* function exit code */
47205 __Pyx_RefNannyFinishContext();
47206 return __pyx_r;
47207 }
47208
47209 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_19__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v_key) {
47210 bcf_hdr_t *__pyx_v_hdr;
47211 bcf1_t *__pyx_v_r;
47212 PyObject *__pyx_v_bkey = 0;
47213 int __pyx_r;
47214 __Pyx_TraceDeclarations
47215 __Pyx_RefNannyDeclarations
47216 bcf_hdr_t *__pyx_t_1;
47217 bcf1_t *__pyx_t_2;
47218 PyObject *__pyx_t_3 = NULL;
47219 char *__pyx_t_4;
47220 int __pyx_lineno = 0;
47221 const char *__pyx_filename = NULL;
47222 int __pyx_clineno = 0;
47223 __Pyx_RefNannySetupContext("__contains__", 1);
47224 __Pyx_TraceCall("__contains__", __pyx_f[0], 2336, 0, __PYX_ERR(0, 2336, __pyx_L1_error));
47225
47226 /* "pysam/libcbcf.pyx":2337
47227 *
47228 * def __contains__(self, key):
47229 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
47230 * cdef bcf1_t *r = self.record.ptr
47231 * cdef bytes bkey = force_bytes(key)
47232 */
47233 __pyx_t_1 = __pyx_v_self->record->header->ptr;
47234 __pyx_v_hdr = __pyx_t_1;
47235
47236 /* "pysam/libcbcf.pyx":2338
47237 * def __contains__(self, key):
47238 * cdef bcf_hdr_t *hdr = self.record.header.ptr
47239 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
47240 * cdef bytes bkey = force_bytes(key)
47241 * return bcf_has_filter(hdr, r, bkey) == 1
47242 */
47243 __pyx_t_2 = __pyx_v_self->record->ptr;
47244 __pyx_v_r = __pyx_t_2;
47245
47246 /* "pysam/libcbcf.pyx":2339
47247 * cdef bcf_hdr_t *hdr = self.record.header.ptr
47248 * cdef bcf1_t *r = self.record.ptr
47249 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
47250 * return bcf_has_filter(hdr, r, bkey) == 1
47251 *
47252 */
47253 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2339, __pyx_L1_error)
47254 __Pyx_GOTREF(__pyx_t_3);
47255 __pyx_v_bkey = ((PyObject*)__pyx_t_3);
47256 __pyx_t_3 = 0;
47257
47258 /* "pysam/libcbcf.pyx":2340
47259 * cdef bcf1_t *r = self.record.ptr
47260 * cdef bytes bkey = force_bytes(key)
47261 * return bcf_has_filter(hdr, r, bkey) == 1 # <<<<<<<<<<<<<<
47262 *
47263 * def iterkeys(self):
47264 */
47265 if (unlikely(__pyx_v_bkey == Py_None)) {
47266 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
47267 __PYX_ERR(0, 2340, __pyx_L1_error)
47268 }
47269 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_bkey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2340, __pyx_L1_error)
47270 __pyx_r = (bcf_has_filter(__pyx_v_hdr, __pyx_v_r, __pyx_t_4) == 1);
47271 goto __pyx_L0;
47272
47273 /* "pysam/libcbcf.pyx":2336
47274 * return default
47275 *
47276 * def __contains__(self, key): # <<<<<<<<<<<<<<
47277 * cdef bcf_hdr_t *hdr = self.record.header.ptr
47278 * cdef bcf1_t *r = self.record.ptr
47279 */
47280
47281 /* function exit code */
47282 __pyx_L1_error:;
47283 __Pyx_XDECREF(__pyx_t_3);
47284 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
47285 __pyx_r = -1;
47286 __pyx_L0:;
47287 __Pyx_XDECREF(__pyx_v_bkey);
47288 __Pyx_TraceReturn(Py_None, 0);
47289 __Pyx_RefNannyFinishContext();
47290 return __pyx_r;
47291 }
47292
47293 /* "pysam/libcbcf.pyx":2342
47294 * return bcf_has_filter(hdr, r, bkey) == 1
47295 *
47296 * def iterkeys(self): # <<<<<<<<<<<<<<
47297 * """D.iterkeys() -> an iterator over the keys of D"""
47298 * return iter(self)
47299 */
47300
47301 /* Python wrapper */
47302 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_22iterkeys(PyObject *__pyx_v_self,
47303 #if CYTHON_METH_FASTCALL
47304 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
47305 #else
47306 PyObject *__pyx_args, PyObject *__pyx_kwds
47307 #endif
47308 ); /*proto*/
47309 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_21iterkeys, "VariantRecordFilter.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
47310 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_22iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_22iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_21iterkeys};
47311 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_22iterkeys(PyObject *__pyx_v_self,
47312 #if CYTHON_METH_FASTCALL
47313 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
47314 #else
47315 PyObject *__pyx_args, PyObject *__pyx_kwds
47316 #endif
47317 ) {
47318 #if !CYTHON_METH_FASTCALL
47319 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
47320 #endif
47321 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
47322 PyObject *__pyx_r = 0;
47323 __Pyx_RefNannyDeclarations
47324 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
47325 #if !CYTHON_METH_FASTCALL
47326 #if CYTHON_ASSUME_SAFE_MACROS
47327 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
47328 #else
47329 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
47330 #endif
47331 #endif
47332 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
47333 if (unlikely(__pyx_nargs > 0)) {
47334 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
47335 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
47336 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_21iterkeys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
47337
47338 /* function exit code */
47339 __Pyx_RefNannyFinishContext();
47340 return __pyx_r;
47341 }
47342
47343 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_21iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
47344 PyObject *__pyx_r = NULL;
47345 __Pyx_TraceDeclarations
47346 __Pyx_RefNannyDeclarations
47347 PyObject *__pyx_t_1 = NULL;
47348 int __pyx_lineno = 0;
47349 const char *__pyx_filename = NULL;
47350 int __pyx_clineno = 0;
47351 __Pyx_TraceFrameInit(__pyx_codeobj__115)
47352 __Pyx_RefNannySetupContext("iterkeys", 1);
47353 __Pyx_TraceCall("iterkeys", __pyx_f[0], 2342, 0, __PYX_ERR(0, 2342, __pyx_L1_error));
47354
47355 /* "pysam/libcbcf.pyx":2344
47356 * def iterkeys(self):
47357 * """D.iterkeys() -> an iterator over the keys of D"""
47358 * return iter(self) # <<<<<<<<<<<<<<
47359 *
47360 * def itervalues(self):
47361 */
47362 __Pyx_XDECREF(__pyx_r);
47363 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2344, __pyx_L1_error)
47364 __Pyx_GOTREF(__pyx_t_1);
47365 __pyx_r = __pyx_t_1;
47366 __pyx_t_1 = 0;
47367 goto __pyx_L0;
47368
47369 /* "pysam/libcbcf.pyx":2342
47370 * return bcf_has_filter(hdr, r, bkey) == 1
47371 *
47372 * def iterkeys(self): # <<<<<<<<<<<<<<
47373 * """D.iterkeys() -> an iterator over the keys of D"""
47374 * return iter(self)
47375 */
47376
47377 /* function exit code */
47378 __pyx_L1_error:;
47379 __Pyx_XDECREF(__pyx_t_1);
47380 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
47381 __pyx_r = NULL;
47382 __pyx_L0:;
47383 __Pyx_XGIVEREF(__pyx_r);
47384 __Pyx_TraceReturn(__pyx_r, 0);
47385 __Pyx_RefNannyFinishContext();
47386 return __pyx_r;
47387 }
47388 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_25generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
47389
47390 /* "pysam/libcbcf.pyx":2346
47391 * return iter(self)
47392 *
47393 * def itervalues(self): # <<<<<<<<<<<<<<
47394 * """D.itervalues() -> an iterator over the values of D"""
47395 * for key in self:
47396 */
47397
47398 /* Python wrapper */
47399 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_24itervalues(PyObject *__pyx_v_self,
47400 #if CYTHON_METH_FASTCALL
47401 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
47402 #else
47403 PyObject *__pyx_args, PyObject *__pyx_kwds
47404 #endif
47405 ); /*proto*/
47406 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_23itervalues, "VariantRecordFilter.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
47407 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_24itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_24itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_23itervalues};
47408 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_24itervalues(PyObject *__pyx_v_self,
47409 #if CYTHON_METH_FASTCALL
47410 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
47411 #else
47412 PyObject *__pyx_args, PyObject *__pyx_kwds
47413 #endif
47414 ) {
47415 #if !CYTHON_METH_FASTCALL
47416 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
47417 #endif
47418 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
47419 PyObject *__pyx_r = 0;
47420 __Pyx_RefNannyDeclarations
47421 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
47422 #if !CYTHON_METH_FASTCALL
47423 #if CYTHON_ASSUME_SAFE_MACROS
47424 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
47425 #else
47426 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
47427 #endif
47428 #endif
47429 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
47430 if (unlikely(__pyx_nargs > 0)) {
47431 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
47432 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
47433 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_23itervalues(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
47434
47435 /* function exit code */
47436 __Pyx_RefNannyFinishContext();
47437 return __pyx_r;
47438 }
47439
47440 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_23itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
47441 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *__pyx_cur_scope;
47442 PyObject *__pyx_r = NULL;
47443 __Pyx_RefNannyDeclarations
47444 int __pyx_lineno = 0;
47445 const char *__pyx_filename = NULL;
47446 int __pyx_clineno = 0;
47447 __Pyx_RefNannySetupContext("itervalues", 0);
47448 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_19_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues, __pyx_empty_tuple, NULL);
47449 if (unlikely(!__pyx_cur_scope)) {
47450 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *)Py_None);
47451 __Pyx_INCREF(Py_None);
47452 __PYX_ERR(0, 2346, __pyx_L1_error)
47453 } else {
47454 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
47455 }
47456 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
47457 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
47458 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
47459 {
47460 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_25generator12, __pyx_codeobj__116, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_VariantRecordFilter_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2346, __pyx_L1_error)
47461 __Pyx_DECREF(__pyx_cur_scope);
47462 __Pyx_RefNannyFinishContext();
47463 return (PyObject *) gen;
47464 }
47465
47466 /* function exit code */
47467 __pyx_L1_error:;
47468 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
47469 __pyx_r = NULL;
47470 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
47471 __Pyx_XGIVEREF(__pyx_r);
47472 __Pyx_RefNannyFinishContext();
47473 return __pyx_r;
47474 }
47475
47476 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_25generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
47477 {
47478 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *)__pyx_generator->closure);
47479 PyObject *__pyx_r = NULL;
47480 __Pyx_TraceDeclarations
47481 PyObject *__pyx_t_1 = NULL;
47482 Py_ssize_t __pyx_t_2;
47483 PyObject *(*__pyx_t_3)(PyObject *);
47484 PyObject *__pyx_t_4 = NULL;
47485 int __pyx_lineno = 0;
47486 const char *__pyx_filename = NULL;
47487 int __pyx_clineno = 0;
47488 __Pyx_RefNannyDeclarations
47489 __Pyx_RefNannySetupContext("itervalues", 0);
47490 __Pyx_TraceFrameInit(__pyx_codeobj__116)
47491 __Pyx_TraceCall("itervalues", __pyx_f[0], 2346, 0, __PYX_ERR(0, 2346, __pyx_L1_error));
47492 switch (__pyx_generator->resume_label) {
47493 case 0: goto __pyx_L3_first_run;
47494 case 1: goto __pyx_L6_resume_from_yield;
47495 default: /* CPython raises the right error here */
47496 __Pyx_TraceReturn(Py_None, 0);
47497 __Pyx_RefNannyFinishContext();
47498 return NULL;
47499 }
47500 __pyx_L3_first_run:;
47501 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2346, __pyx_L1_error)
47502
47503 /* "pysam/libcbcf.pyx":2348
47504 * def itervalues(self):
47505 * """D.itervalues() -> an iterator over the values of D"""
47506 * for key in self: # <<<<<<<<<<<<<<
47507 * yield self[key]
47508 *
47509 */
47510 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
47511 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
47512 __pyx_t_2 = 0;
47513 __pyx_t_3 = NULL;
47514 } else {
47515 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2348, __pyx_L1_error)
47516 __Pyx_GOTREF(__pyx_t_1);
47517 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2348, __pyx_L1_error)
47518 }
47519 for (;;) {
47520 if (likely(!__pyx_t_3)) {
47521 if (likely(PyList_CheckExact(__pyx_t_1))) {
47522 {
47523 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
47524 #if !CYTHON_ASSUME_SAFE_MACROS
47525 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2348, __pyx_L1_error)
47526 #endif
47527 if (__pyx_t_2 >= __pyx_temp) break;
47528 }
47529 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
47530 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2348, __pyx_L1_error)
47531 #else
47532 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2348, __pyx_L1_error)
47533 __Pyx_GOTREF(__pyx_t_4);
47534 #endif
47535 } else {
47536 {
47537 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
47538 #if !CYTHON_ASSUME_SAFE_MACROS
47539 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2348, __pyx_L1_error)
47540 #endif
47541 if (__pyx_t_2 >= __pyx_temp) break;
47542 }
47543 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
47544 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2348, __pyx_L1_error)
47545 #else
47546 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2348, __pyx_L1_error)
47547 __Pyx_GOTREF(__pyx_t_4);
47548 #endif
47549 }
47550 } else {
47551 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
47552 if (unlikely(!__pyx_t_4)) {
47553 PyObject* exc_type = PyErr_Occurred();
47554 if (exc_type) {
47555 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
47556 else __PYX_ERR(0, 2348, __pyx_L1_error)
47557 }
47558 break;
47559 }
47560 __Pyx_GOTREF(__pyx_t_4);
47561 }
47562 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
47563 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
47564 __Pyx_GIVEREF(__pyx_t_4);
47565 __pyx_t_4 = 0;
47566
47567 /* "pysam/libcbcf.pyx":2349
47568 * """D.itervalues() -> an iterator over the values of D"""
47569 * for key in self:
47570 * yield self[key] # <<<<<<<<<<<<<<
47571 *
47572 * def iteritems(self):
47573 */
47574 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2349, __pyx_L1_error)
47575 __Pyx_GOTREF(__pyx_t_4);
47576 __pyx_r = __pyx_t_4;
47577 __pyx_t_4 = 0;
47578 __Pyx_XGIVEREF(__pyx_t_1);
47579 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
47580 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
47581 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
47582 __Pyx_XGIVEREF(__pyx_r);
47583 __Pyx_TraceReturn(__pyx_r, 0);
47584 __Pyx_RefNannyFinishContext();
47585 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
47586 /* return from generator, yielding value */
47587 __pyx_generator->resume_label = 1;
47588 return __pyx_r;
47589 __pyx_L6_resume_from_yield:;
47590 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
47591 __pyx_cur_scope->__pyx_t_0 = 0;
47592 __Pyx_XGOTREF(__pyx_t_1);
47593 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
47594 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
47595 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2349, __pyx_L1_error)
47596
47597 /* "pysam/libcbcf.pyx":2348
47598 * def itervalues(self):
47599 * """D.itervalues() -> an iterator over the values of D"""
47600 * for key in self: # <<<<<<<<<<<<<<
47601 * yield self[key]
47602 *
47603 */
47604 }
47605 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47606 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
47607
47608 /* "pysam/libcbcf.pyx":2346
47609 * return iter(self)
47610 *
47611 * def itervalues(self): # <<<<<<<<<<<<<<
47612 * """D.itervalues() -> an iterator over the values of D"""
47613 * for key in self:
47614 */
47615
47616 /* function exit code */
47617 PyErr_SetNone(PyExc_StopIteration);
47618 goto __pyx_L0;
47619 __pyx_L1_error:;
47620 __Pyx_Generator_Replace_StopIteration(0);
47621 __Pyx_XDECREF(__pyx_t_1);
47622 __Pyx_XDECREF(__pyx_t_4);
47623 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
47624 __pyx_L0:;
47625 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
47626 #if !CYTHON_USE_EXC_INFO_STACK
47627 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
47628 #endif
47629 __pyx_generator->resume_label = -1;
47630 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
47631 __Pyx_TraceReturn(__pyx_r, 0);
47632 __Pyx_RefNannyFinishContext();
47633 return __pyx_r;
47634 }
47635 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_28generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
47636
47637 /* "pysam/libcbcf.pyx":2351
47638 * yield self[key]
47639 *
47640 * def iteritems(self): # <<<<<<<<<<<<<<
47641 * """D.iteritems() -> an iterator over the (key, value) items of D"""
47642 * for key in self:
47643 */
47644
47645 /* Python wrapper */
47646 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_27iteritems(PyObject *__pyx_v_self,
47647 #if CYTHON_METH_FASTCALL
47648 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
47649 #else
47650 PyObject *__pyx_args, PyObject *__pyx_kwds
47651 #endif
47652 ); /*proto*/
47653 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_26iteritems, "VariantRecordFilter.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
47654 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_27iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_27iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_26iteritems};
47655 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_27iteritems(PyObject *__pyx_v_self,
47656 #if CYTHON_METH_FASTCALL
47657 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
47658 #else
47659 PyObject *__pyx_args, PyObject *__pyx_kwds
47660 #endif
47661 ) {
47662 #if !CYTHON_METH_FASTCALL
47663 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
47664 #endif
47665 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
47666 PyObject *__pyx_r = 0;
47667 __Pyx_RefNannyDeclarations
47668 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
47669 #if !CYTHON_METH_FASTCALL
47670 #if CYTHON_ASSUME_SAFE_MACROS
47671 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
47672 #else
47673 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
47674 #endif
47675 #endif
47676 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
47677 if (unlikely(__pyx_nargs > 0)) {
47678 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
47679 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
47680 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_26iteritems(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
47681
47682 /* function exit code */
47683 __Pyx_RefNannyFinishContext();
47684 return __pyx_r;
47685 }
47686
47687 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_26iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
47688 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *__pyx_cur_scope;
47689 PyObject *__pyx_r = NULL;
47690 __Pyx_RefNannyDeclarations
47691 int __pyx_lineno = 0;
47692 const char *__pyx_filename = NULL;
47693 int __pyx_clineno = 0;
47694 __Pyx_RefNannySetupContext("iteritems", 0);
47695 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_20_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems, __pyx_empty_tuple, NULL);
47696 if (unlikely(!__pyx_cur_scope)) {
47697 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *)Py_None);
47698 __Pyx_INCREF(Py_None);
47699 __PYX_ERR(0, 2351, __pyx_L1_error)
47700 } else {
47701 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
47702 }
47703 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
47704 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
47705 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
47706 {
47707 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_28generator13, __pyx_codeobj__117, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_VariantRecordFilter_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2351, __pyx_L1_error)
47708 __Pyx_DECREF(__pyx_cur_scope);
47709 __Pyx_RefNannyFinishContext();
47710 return (PyObject *) gen;
47711 }
47712
47713 /* function exit code */
47714 __pyx_L1_error:;
47715 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
47716 __pyx_r = NULL;
47717 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
47718 __Pyx_XGIVEREF(__pyx_r);
47719 __Pyx_RefNannyFinishContext();
47720 return __pyx_r;
47721 }
47722
47723 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFilter_28generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
47724 {
47725 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *)__pyx_generator->closure);
47726 PyObject *__pyx_r = NULL;
47727 __Pyx_TraceDeclarations
47728 PyObject *__pyx_t_1 = NULL;
47729 Py_ssize_t __pyx_t_2;
47730 PyObject *(*__pyx_t_3)(PyObject *);
47731 PyObject *__pyx_t_4 = NULL;
47732 PyObject *__pyx_t_5 = NULL;
47733 int __pyx_lineno = 0;
47734 const char *__pyx_filename = NULL;
47735 int __pyx_clineno = 0;
47736 __Pyx_RefNannyDeclarations
47737 __Pyx_RefNannySetupContext("iteritems", 0);
47738 __Pyx_TraceFrameInit(__pyx_codeobj__117)
47739 __Pyx_TraceCall("iteritems", __pyx_f[0], 2351, 0, __PYX_ERR(0, 2351, __pyx_L1_error));
47740 switch (__pyx_generator->resume_label) {
47741 case 0: goto __pyx_L3_first_run;
47742 case 1: goto __pyx_L6_resume_from_yield;
47743 default: /* CPython raises the right error here */
47744 __Pyx_TraceReturn(Py_None, 0);
47745 __Pyx_RefNannyFinishContext();
47746 return NULL;
47747 }
47748 __pyx_L3_first_run:;
47749 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2351, __pyx_L1_error)
47750
47751 /* "pysam/libcbcf.pyx":2353
47752 * def iteritems(self):
47753 * """D.iteritems() -> an iterator over the (key, value) items of D"""
47754 * for key in self: # <<<<<<<<<<<<<<
47755 * yield (key, self[key])
47756 *
47757 */
47758 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
47759 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
47760 __pyx_t_2 = 0;
47761 __pyx_t_3 = NULL;
47762 } else {
47763 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2353, __pyx_L1_error)
47764 __Pyx_GOTREF(__pyx_t_1);
47765 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2353, __pyx_L1_error)
47766 }
47767 for (;;) {
47768 if (likely(!__pyx_t_3)) {
47769 if (likely(PyList_CheckExact(__pyx_t_1))) {
47770 {
47771 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
47772 #if !CYTHON_ASSUME_SAFE_MACROS
47773 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2353, __pyx_L1_error)
47774 #endif
47775 if (__pyx_t_2 >= __pyx_temp) break;
47776 }
47777 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
47778 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2353, __pyx_L1_error)
47779 #else
47780 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2353, __pyx_L1_error)
47781 __Pyx_GOTREF(__pyx_t_4);
47782 #endif
47783 } else {
47784 {
47785 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
47786 #if !CYTHON_ASSUME_SAFE_MACROS
47787 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2353, __pyx_L1_error)
47788 #endif
47789 if (__pyx_t_2 >= __pyx_temp) break;
47790 }
47791 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
47792 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2353, __pyx_L1_error)
47793 #else
47794 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2353, __pyx_L1_error)
47795 __Pyx_GOTREF(__pyx_t_4);
47796 #endif
47797 }
47798 } else {
47799 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
47800 if (unlikely(!__pyx_t_4)) {
47801 PyObject* exc_type = PyErr_Occurred();
47802 if (exc_type) {
47803 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
47804 else __PYX_ERR(0, 2353, __pyx_L1_error)
47805 }
47806 break;
47807 }
47808 __Pyx_GOTREF(__pyx_t_4);
47809 }
47810 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
47811 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
47812 __Pyx_GIVEREF(__pyx_t_4);
47813 __pyx_t_4 = 0;
47814
47815 /* "pysam/libcbcf.pyx":2354
47816 * """D.iteritems() -> an iterator over the (key, value) items of D"""
47817 * for key in self:
47818 * yield (key, self[key]) # <<<<<<<<<<<<<<
47819 *
47820 * def keys(self):
47821 */
47822 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2354, __pyx_L1_error)
47823 __Pyx_GOTREF(__pyx_t_4);
47824 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2354, __pyx_L1_error)
47825 __Pyx_GOTREF(__pyx_t_5);
47826 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
47827 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
47828 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_key)) __PYX_ERR(0, 2354, __pyx_L1_error);
47829 __Pyx_GIVEREF(__pyx_t_4);
47830 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 2354, __pyx_L1_error);
47831 __pyx_t_4 = 0;
47832 __pyx_r = __pyx_t_5;
47833 __pyx_t_5 = 0;
47834 __Pyx_XGIVEREF(__pyx_t_1);
47835 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
47836 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
47837 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
47838 __Pyx_XGIVEREF(__pyx_r);
47839 __Pyx_TraceReturn(__pyx_r, 0);
47840 __Pyx_RefNannyFinishContext();
47841 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
47842 /* return from generator, yielding value */
47843 __pyx_generator->resume_label = 1;
47844 return __pyx_r;
47845 __pyx_L6_resume_from_yield:;
47846 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
47847 __pyx_cur_scope->__pyx_t_0 = 0;
47848 __Pyx_XGOTREF(__pyx_t_1);
47849 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
47850 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
47851 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2354, __pyx_L1_error)
47852
47853 /* "pysam/libcbcf.pyx":2353
47854 * def iteritems(self):
47855 * """D.iteritems() -> an iterator over the (key, value) items of D"""
47856 * for key in self: # <<<<<<<<<<<<<<
47857 * yield (key, self[key])
47858 *
47859 */
47860 }
47861 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47862 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
47863
47864 /* "pysam/libcbcf.pyx":2351
47865 * yield self[key]
47866 *
47867 * def iteritems(self): # <<<<<<<<<<<<<<
47868 * """D.iteritems() -> an iterator over the (key, value) items of D"""
47869 * for key in self:
47870 */
47871
47872 /* function exit code */
47873 PyErr_SetNone(PyExc_StopIteration);
47874 goto __pyx_L0;
47875 __pyx_L1_error:;
47876 __Pyx_Generator_Replace_StopIteration(0);
47877 __Pyx_XDECREF(__pyx_t_1);
47878 __Pyx_XDECREF(__pyx_t_4);
47879 __Pyx_XDECREF(__pyx_t_5);
47880 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
47881 __pyx_L0:;
47882 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
47883 #if !CYTHON_USE_EXC_INFO_STACK
47884 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
47885 #endif
47886 __pyx_generator->resume_label = -1;
47887 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
47888 __Pyx_TraceReturn(__pyx_r, 0);
47889 __Pyx_RefNannyFinishContext();
47890 return __pyx_r;
47891 }
47892
47893 /* "pysam/libcbcf.pyx":2356
47894 * yield (key, self[key])
47895 *
47896 * def keys(self): # <<<<<<<<<<<<<<
47897 * """D.keys() -> list of D's keys"""
47898 * return list(self)
47899 */
47900
47901 /* Python wrapper */
47902 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_30keys(PyObject *__pyx_v_self,
47903 #if CYTHON_METH_FASTCALL
47904 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
47905 #else
47906 PyObject *__pyx_args, PyObject *__pyx_kwds
47907 #endif
47908 ); /*proto*/
47909 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_29keys, "VariantRecordFilter.keys(self)\nD.keys() -> list of D's keys");
47910 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_30keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_30keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_29keys};
47911 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_30keys(PyObject *__pyx_v_self,
47912 #if CYTHON_METH_FASTCALL
47913 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
47914 #else
47915 PyObject *__pyx_args, PyObject *__pyx_kwds
47916 #endif
47917 ) {
47918 #if !CYTHON_METH_FASTCALL
47919 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
47920 #endif
47921 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
47922 PyObject *__pyx_r = 0;
47923 __Pyx_RefNannyDeclarations
47924 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
47925 #if !CYTHON_METH_FASTCALL
47926 #if CYTHON_ASSUME_SAFE_MACROS
47927 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
47928 #else
47929 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
47930 #endif
47931 #endif
47932 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
47933 if (unlikely(__pyx_nargs > 0)) {
47934 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
47935 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
47936 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_29keys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
47937
47938 /* function exit code */
47939 __Pyx_RefNannyFinishContext();
47940 return __pyx_r;
47941 }
47942
47943 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_29keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
47944 PyObject *__pyx_r = NULL;
47945 __Pyx_TraceDeclarations
47946 __Pyx_RefNannyDeclarations
47947 PyObject *__pyx_t_1 = NULL;
47948 int __pyx_lineno = 0;
47949 const char *__pyx_filename = NULL;
47950 int __pyx_clineno = 0;
47951 __Pyx_TraceFrameInit(__pyx_codeobj__118)
47952 __Pyx_RefNannySetupContext("keys", 1);
47953 __Pyx_TraceCall("keys", __pyx_f[0], 2356, 0, __PYX_ERR(0, 2356, __pyx_L1_error));
47954
47955 /* "pysam/libcbcf.pyx":2358
47956 * def keys(self):
47957 * """D.keys() -> list of D's keys"""
47958 * return list(self) # <<<<<<<<<<<<<<
47959 *
47960 * def items(self):
47961 */
47962 __Pyx_XDECREF(__pyx_r);
47963 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2358, __pyx_L1_error)
47964 __Pyx_GOTREF(__pyx_t_1);
47965 __pyx_r = __pyx_t_1;
47966 __pyx_t_1 = 0;
47967 goto __pyx_L0;
47968
47969 /* "pysam/libcbcf.pyx":2356
47970 * yield (key, self[key])
47971 *
47972 * def keys(self): # <<<<<<<<<<<<<<
47973 * """D.keys() -> list of D's keys"""
47974 * return list(self)
47975 */
47976
47977 /* function exit code */
47978 __pyx_L1_error:;
47979 __Pyx_XDECREF(__pyx_t_1);
47980 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
47981 __pyx_r = NULL;
47982 __pyx_L0:;
47983 __Pyx_XGIVEREF(__pyx_r);
47984 __Pyx_TraceReturn(__pyx_r, 0);
47985 __Pyx_RefNannyFinishContext();
47986 return __pyx_r;
47987 }
47988
47989 /* "pysam/libcbcf.pyx":2360
47990 * return list(self)
47991 *
47992 * def items(self): # <<<<<<<<<<<<<<
47993 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
47994 * return list(self.iteritems())
47995 */
47996
47997 /* Python wrapper */
47998 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_32items(PyObject *__pyx_v_self,
47999 #if CYTHON_METH_FASTCALL
48000 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
48001 #else
48002 PyObject *__pyx_args, PyObject *__pyx_kwds
48003 #endif
48004 ); /*proto*/
48005 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_31items, "VariantRecordFilter.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
48006 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_32items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_32items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_31items};
48007 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_32items(PyObject *__pyx_v_self,
48008 #if CYTHON_METH_FASTCALL
48009 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
48010 #else
48011 PyObject *__pyx_args, PyObject *__pyx_kwds
48012 #endif
48013 ) {
48014 #if !CYTHON_METH_FASTCALL
48015 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
48016 #endif
48017 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
48018 PyObject *__pyx_r = 0;
48019 __Pyx_RefNannyDeclarations
48020 __Pyx_RefNannySetupContext("items (wrapper)", 0);
48021 #if !CYTHON_METH_FASTCALL
48022 #if CYTHON_ASSUME_SAFE_MACROS
48023 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
48024 #else
48025 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
48026 #endif
48027 #endif
48028 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
48029 if (unlikely(__pyx_nargs > 0)) {
48030 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
48031 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
48032 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_31items(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
48033
48034 /* function exit code */
48035 __Pyx_RefNannyFinishContext();
48036 return __pyx_r;
48037 }
48038
48039 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_31items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
48040 PyObject *__pyx_r = NULL;
48041 __Pyx_TraceDeclarations
48042 __Pyx_RefNannyDeclarations
48043 PyObject *__pyx_t_1 = NULL;
48044 PyObject *__pyx_t_2 = NULL;
48045 PyObject *__pyx_t_3 = NULL;
48046 unsigned int __pyx_t_4;
48047 int __pyx_lineno = 0;
48048 const char *__pyx_filename = NULL;
48049 int __pyx_clineno = 0;
48050 __Pyx_TraceFrameInit(__pyx_codeobj__119)
48051 __Pyx_RefNannySetupContext("items", 1);
48052 __Pyx_TraceCall("items", __pyx_f[0], 2360, 0, __PYX_ERR(0, 2360, __pyx_L1_error));
48053
48054 /* "pysam/libcbcf.pyx":2362
48055 * def items(self):
48056 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
48057 * return list(self.iteritems()) # <<<<<<<<<<<<<<
48058 *
48059 * def values(self):
48060 */
48061 __Pyx_XDECREF(__pyx_r);
48062 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error)
48063 __Pyx_GOTREF(__pyx_t_2);
48064 __pyx_t_3 = NULL;
48065 __pyx_t_4 = 0;
48066 #if CYTHON_UNPACK_METHODS
48067 if (likely(PyMethod_Check(__pyx_t_2))) {
48068 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
48069 if (likely(__pyx_t_3)) {
48070 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
48071 __Pyx_INCREF(__pyx_t_3);
48072 __Pyx_INCREF(function);
48073 __Pyx_DECREF_SET(__pyx_t_2, function);
48074 __pyx_t_4 = 1;
48075 }
48076 }
48077 #endif
48078 {
48079 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
48080 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
48081 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
48082 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2362, __pyx_L1_error)
48083 __Pyx_GOTREF(__pyx_t_1);
48084 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
48085 }
48086 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error)
48087 __Pyx_GOTREF(__pyx_t_2);
48088 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48089 __pyx_r = __pyx_t_2;
48090 __pyx_t_2 = 0;
48091 goto __pyx_L0;
48092
48093 /* "pysam/libcbcf.pyx":2360
48094 * return list(self)
48095 *
48096 * def items(self): # <<<<<<<<<<<<<<
48097 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
48098 * return list(self.iteritems())
48099 */
48100
48101 /* function exit code */
48102 __pyx_L1_error:;
48103 __Pyx_XDECREF(__pyx_t_1);
48104 __Pyx_XDECREF(__pyx_t_2);
48105 __Pyx_XDECREF(__pyx_t_3);
48106 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
48107 __pyx_r = NULL;
48108 __pyx_L0:;
48109 __Pyx_XGIVEREF(__pyx_r);
48110 __Pyx_TraceReturn(__pyx_r, 0);
48111 __Pyx_RefNannyFinishContext();
48112 return __pyx_r;
48113 }
48114
48115 /* "pysam/libcbcf.pyx":2364
48116 * return list(self.iteritems())
48117 *
48118 * def values(self): # <<<<<<<<<<<<<<
48119 * """D.values() -> list of D's values"""
48120 * return list(self.itervalues())
48121 */
48122
48123 /* Python wrapper */
48124 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_34values(PyObject *__pyx_v_self,
48125 #if CYTHON_METH_FASTCALL
48126 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
48127 #else
48128 PyObject *__pyx_args, PyObject *__pyx_kwds
48129 #endif
48130 ); /*proto*/
48131 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_33values, "VariantRecordFilter.values(self)\nD.values() -> list of D's values");
48132 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_34values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_34values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_33values};
48133 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_34values(PyObject *__pyx_v_self,
48134 #if CYTHON_METH_FASTCALL
48135 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
48136 #else
48137 PyObject *__pyx_args, PyObject *__pyx_kwds
48138 #endif
48139 ) {
48140 #if !CYTHON_METH_FASTCALL
48141 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
48142 #endif
48143 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
48144 PyObject *__pyx_r = 0;
48145 __Pyx_RefNannyDeclarations
48146 __Pyx_RefNannySetupContext("values (wrapper)", 0);
48147 #if !CYTHON_METH_FASTCALL
48148 #if CYTHON_ASSUME_SAFE_MACROS
48149 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
48150 #else
48151 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
48152 #endif
48153 #endif
48154 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
48155 if (unlikely(__pyx_nargs > 0)) {
48156 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
48157 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
48158 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_33values(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
48159
48160 /* function exit code */
48161 __Pyx_RefNannyFinishContext();
48162 return __pyx_r;
48163 }
48164
48165 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_33values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
48166 PyObject *__pyx_r = NULL;
48167 __Pyx_TraceDeclarations
48168 __Pyx_RefNannyDeclarations
48169 PyObject *__pyx_t_1 = NULL;
48170 PyObject *__pyx_t_2 = NULL;
48171 PyObject *__pyx_t_3 = NULL;
48172 unsigned int __pyx_t_4;
48173 int __pyx_lineno = 0;
48174 const char *__pyx_filename = NULL;
48175 int __pyx_clineno = 0;
48176 __Pyx_TraceFrameInit(__pyx_codeobj__120)
48177 __Pyx_RefNannySetupContext("values", 1);
48178 __Pyx_TraceCall("values", __pyx_f[0], 2364, 0, __PYX_ERR(0, 2364, __pyx_L1_error));
48179
48180 /* "pysam/libcbcf.pyx":2366
48181 * def values(self):
48182 * """D.values() -> list of D's values"""
48183 * return list(self.itervalues()) # <<<<<<<<<<<<<<
48184 *
48185 * def __richcmp__(VariantRecordFilter self not None, VariantRecordFilter other not None, int op):
48186 */
48187 __Pyx_XDECREF(__pyx_r);
48188 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2366, __pyx_L1_error)
48189 __Pyx_GOTREF(__pyx_t_2);
48190 __pyx_t_3 = NULL;
48191 __pyx_t_4 = 0;
48192 #if CYTHON_UNPACK_METHODS
48193 if (likely(PyMethod_Check(__pyx_t_2))) {
48194 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
48195 if (likely(__pyx_t_3)) {
48196 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
48197 __Pyx_INCREF(__pyx_t_3);
48198 __Pyx_INCREF(function);
48199 __Pyx_DECREF_SET(__pyx_t_2, function);
48200 __pyx_t_4 = 1;
48201 }
48202 }
48203 #endif
48204 {
48205 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
48206 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
48207 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
48208 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2366, __pyx_L1_error)
48209 __Pyx_GOTREF(__pyx_t_1);
48210 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
48211 }
48212 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2366, __pyx_L1_error)
48213 __Pyx_GOTREF(__pyx_t_2);
48214 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48215 __pyx_r = __pyx_t_2;
48216 __pyx_t_2 = 0;
48217 goto __pyx_L0;
48218
48219 /* "pysam/libcbcf.pyx":2364
48220 * return list(self.iteritems())
48221 *
48222 * def values(self): # <<<<<<<<<<<<<<
48223 * """D.values() -> list of D's values"""
48224 * return list(self.itervalues())
48225 */
48226
48227 /* function exit code */
48228 __pyx_L1_error:;
48229 __Pyx_XDECREF(__pyx_t_1);
48230 __Pyx_XDECREF(__pyx_t_2);
48231 __Pyx_XDECREF(__pyx_t_3);
48232 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
48233 __pyx_r = NULL;
48234 __pyx_L0:;
48235 __Pyx_XGIVEREF(__pyx_r);
48236 __Pyx_TraceReturn(__pyx_r, 0);
48237 __Pyx_RefNannyFinishContext();
48238 return __pyx_r;
48239 }
48240
48241 /* "pysam/libcbcf.pyx":2368
48242 * return list(self.itervalues())
48243 *
48244 * def __richcmp__(VariantRecordFilter self not None, VariantRecordFilter other not None, int op): # <<<<<<<<<<<<<<
48245 * if op != 2 and op != 3:
48246 * return NotImplemented
48247 */
48248
48249 /* Python wrapper */
48250 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_36__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
48251 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_36__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
48252 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
48253 int __pyx_lineno = 0;
48254 const char *__pyx_filename = NULL;
48255 int __pyx_clineno = 0;
48256 PyObject *__pyx_r = 0;
48257 __Pyx_RefNannyDeclarations
48258 __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
48259 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
48260 if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
48261 PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 2368, __pyx_L1_error)
48262 }
48263 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, 0, "other", 0))) __PYX_ERR(0, 2368, __pyx_L1_error)
48264 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_35__richcmp__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self), ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_other), ((int)__pyx_v_op));
48265
48266 /* function exit code */
48267 goto __pyx_L0;
48268 __pyx_L1_error:;
48269 __pyx_r = NULL;
48270 __pyx_L0:;
48271 __Pyx_RefNannyFinishContext();
48272 return __pyx_r;
48273 }
48274
48275 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_35__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_other, int __pyx_v_op) {
48276 bcf1_t *__pyx_v_s;
48277 bcf1_t *__pyx_v_o;
48278 int __pyx_v_cmp;
48279 PyObject *__pyx_r = NULL;
48280 __Pyx_TraceDeclarations
48281 __Pyx_RefNannyDeclarations
48282 int __pyx_t_1;
48283 bcf1_t *__pyx_t_2;
48284 int __pyx_t_3;
48285 PyObject *__pyx_t_4 = NULL;
48286 PyObject *__pyx_t_5 = NULL;
48287 PyObject *__pyx_t_6 = NULL;
48288 int __pyx_lineno = 0;
48289 const char *__pyx_filename = NULL;
48290 int __pyx_clineno = 0;
48291 __Pyx_RefNannySetupContext("__richcmp__", 1);
48292 __Pyx_TraceCall("__richcmp__", __pyx_f[0], 2368, 0, __PYX_ERR(0, 2368, __pyx_L1_error));
48293
48294 /* "pysam/libcbcf.pyx":2369
48295 *
48296 * def __richcmp__(VariantRecordFilter self not None, VariantRecordFilter other not None, int op):
48297 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
48298 * return NotImplemented
48299 *
48300 */
48301 switch (__pyx_v_op) {
48302 case 2:
48303 case 3:
48304 __pyx_t_1 = 0;
48305 break;
48306 default:
48307 __pyx_t_1 = 1;
48308 break;
48309 }
48310 if (__pyx_t_1) {
48311
48312 /* "pysam/libcbcf.pyx":2370
48313 * def __richcmp__(VariantRecordFilter self not None, VariantRecordFilter other not None, int op):
48314 * if op != 2 and op != 3:
48315 * return NotImplemented # <<<<<<<<<<<<<<
48316 *
48317 * cdef bcf1_t *s = self.record.ptr
48318 */
48319 __Pyx_XDECREF(__pyx_r);
48320 __Pyx_INCREF(__pyx_builtin_NotImplemented);
48321 __pyx_r = __pyx_builtin_NotImplemented;
48322 goto __pyx_L0;
48323
48324 /* "pysam/libcbcf.pyx":2369
48325 *
48326 * def __richcmp__(VariantRecordFilter self not None, VariantRecordFilter other not None, int op):
48327 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
48328 * return NotImplemented
48329 *
48330 */
48331 }
48332
48333 /* "pysam/libcbcf.pyx":2372
48334 * return NotImplemented
48335 *
48336 * cdef bcf1_t *s = self.record.ptr # <<<<<<<<<<<<<<
48337 * cdef bcf1_t *o = other.record.ptr
48338 *
48339 */
48340 __pyx_t_2 = __pyx_v_self->record->ptr;
48341 __pyx_v_s = __pyx_t_2;
48342
48343 /* "pysam/libcbcf.pyx":2373
48344 *
48345 * cdef bcf1_t *s = self.record.ptr
48346 * cdef bcf1_t *o = other.record.ptr # <<<<<<<<<<<<<<
48347 *
48348 * cdef bint cmp = (s.d.n_flt == o.d.n_flt and list(self) == list(other))
48349 */
48350 __pyx_t_2 = __pyx_v_other->record->ptr;
48351 __pyx_v_o = __pyx_t_2;
48352
48353 /* "pysam/libcbcf.pyx":2375
48354 * cdef bcf1_t *o = other.record.ptr
48355 *
48356 * cdef bint cmp = (s.d.n_flt == o.d.n_flt and list(self) == list(other)) # <<<<<<<<<<<<<<
48357 *
48358 * if op == 3:
48359 */
48360 __pyx_t_3 = (__pyx_v_s->d.n_flt == __pyx_v_o->d.n_flt);
48361 if (__pyx_t_3) {
48362 } else {
48363 __pyx_t_1 = __pyx_t_3;
48364 goto __pyx_L4_bool_binop_done;
48365 }
48366 __pyx_t_4 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2375, __pyx_L1_error)
48367 __Pyx_GOTREF(__pyx_t_4);
48368 __pyx_t_5 = PySequence_List(((PyObject *)__pyx_v_other)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2375, __pyx_L1_error)
48369 __Pyx_GOTREF(__pyx_t_5);
48370 __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2375, __pyx_L1_error)
48371 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
48372 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
48373 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2375, __pyx_L1_error)
48374 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
48375 __pyx_t_1 = __pyx_t_3;
48376 __pyx_L4_bool_binop_done:;
48377 __pyx_v_cmp = __pyx_t_1;
48378
48379 /* "pysam/libcbcf.pyx":2377
48380 * cdef bint cmp = (s.d.n_flt == o.d.n_flt and list(self) == list(other))
48381 *
48382 * if op == 3: # <<<<<<<<<<<<<<
48383 * cmp = not cmp
48384 *
48385 */
48386 __pyx_t_1 = (__pyx_v_op == 3);
48387 if (__pyx_t_1) {
48388
48389 /* "pysam/libcbcf.pyx":2378
48390 *
48391 * if op == 3:
48392 * cmp = not cmp # <<<<<<<<<<<<<<
48393 *
48394 * return cmp
48395 */
48396 __pyx_v_cmp = (!__pyx_v_cmp);
48397
48398 /* "pysam/libcbcf.pyx":2377
48399 * cdef bint cmp = (s.d.n_flt == o.d.n_flt and list(self) == list(other))
48400 *
48401 * if op == 3: # <<<<<<<<<<<<<<
48402 * cmp = not cmp
48403 *
48404 */
48405 }
48406
48407 /* "pysam/libcbcf.pyx":2380
48408 * cmp = not cmp
48409 *
48410 * return cmp # <<<<<<<<<<<<<<
48411 *
48412 * # Mappings are not hashable by default, but subclasses can change this
48413 */
48414 __Pyx_XDECREF(__pyx_r);
48415 __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_cmp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2380, __pyx_L1_error)
48416 __Pyx_GOTREF(__pyx_t_6);
48417 __pyx_r = __pyx_t_6;
48418 __pyx_t_6 = 0;
48419 goto __pyx_L0;
48420
48421 /* "pysam/libcbcf.pyx":2368
48422 * return list(self.itervalues())
48423 *
48424 * def __richcmp__(VariantRecordFilter self not None, VariantRecordFilter other not None, int op): # <<<<<<<<<<<<<<
48425 * if op != 2 and op != 3:
48426 * return NotImplemented
48427 */
48428
48429 /* function exit code */
48430 __pyx_L1_error:;
48431 __Pyx_XDECREF(__pyx_t_4);
48432 __Pyx_XDECREF(__pyx_t_5);
48433 __Pyx_XDECREF(__pyx_t_6);
48434 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48435 __pyx_r = NULL;
48436 __pyx_L0:;
48437 __Pyx_XGIVEREF(__pyx_r);
48438 __Pyx_TraceReturn(__pyx_r, 0);
48439 __Pyx_RefNannyFinishContext();
48440 return __pyx_r;
48441 }
48442
48443 /* "(tree fragment)":1
48444 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
48445 * cdef tuple state
48446 * cdef object _dict
48447 */
48448
48449 /* Python wrapper */
48450 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_38__reduce_cython__(PyObject *__pyx_v_self,
48451 #if CYTHON_METH_FASTCALL
48452 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
48453 #else
48454 PyObject *__pyx_args, PyObject *__pyx_kwds
48455 #endif
48456 ); /*proto*/
48457 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_37__reduce_cython__, "VariantRecordFilter.__reduce_cython__(self)");
48458 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_38__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_38__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_37__reduce_cython__};
48459 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_38__reduce_cython__(PyObject *__pyx_v_self,
48460 #if CYTHON_METH_FASTCALL
48461 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
48462 #else
48463 PyObject *__pyx_args, PyObject *__pyx_kwds
48464 #endif
48465 ) {
48466 #if !CYTHON_METH_FASTCALL
48467 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
48468 #endif
48469 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
48470 PyObject *__pyx_r = 0;
48471 __Pyx_RefNannyDeclarations
48472 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
48473 #if !CYTHON_METH_FASTCALL
48474 #if CYTHON_ASSUME_SAFE_MACROS
48475 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
48476 #else
48477 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
48478 #endif
48479 #endif
48480 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
48481 if (unlikely(__pyx_nargs > 0)) {
48482 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
48483 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
48484 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_37__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self));
48485
48486 /* function exit code */
48487 __Pyx_RefNannyFinishContext();
48488 return __pyx_r;
48489 }
48490
48491 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_37__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self) {
48492 PyObject *__pyx_v_state = 0;
48493 PyObject *__pyx_v__dict = 0;
48494 int __pyx_v_use_setstate;
48495 PyObject *__pyx_r = NULL;
48496 __Pyx_TraceDeclarations
48497 __Pyx_RefNannyDeclarations
48498 PyObject *__pyx_t_1 = NULL;
48499 int __pyx_t_2;
48500 PyObject *__pyx_t_3 = NULL;
48501 PyObject *__pyx_t_4 = NULL;
48502 int __pyx_lineno = 0;
48503 const char *__pyx_filename = NULL;
48504 int __pyx_clineno = 0;
48505 __Pyx_TraceFrameInit(__pyx_codeobj__121)
48506 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
48507 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
48508
48509 /* "(tree fragment)":5
48510 * cdef object _dict
48511 * cdef bint use_setstate
48512 * state = (self.record,) # <<<<<<<<<<<<<<
48513 * _dict = getattr(self, '__dict__', None)
48514 * if _dict is not None:
48515 */
48516 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
48517 __Pyx_GOTREF(__pyx_t_1);
48518 __Pyx_INCREF((PyObject *)__pyx_v_self->record);
48519 __Pyx_GIVEREF((PyObject *)__pyx_v_self->record);
48520 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->record))) __PYX_ERR(4, 5, __pyx_L1_error);
48521 __pyx_v_state = ((PyObject*)__pyx_t_1);
48522 __pyx_t_1 = 0;
48523
48524 /* "(tree fragment)":6
48525 * cdef bint use_setstate
48526 * state = (self.record,)
48527 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
48528 * if _dict is not None:
48529 * state += (_dict,)
48530 */
48531 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
48532 __Pyx_GOTREF(__pyx_t_1);
48533 __pyx_v__dict = __pyx_t_1;
48534 __pyx_t_1 = 0;
48535
48536 /* "(tree fragment)":7
48537 * state = (self.record,)
48538 * _dict = getattr(self, '__dict__', None)
48539 * if _dict is not None: # <<<<<<<<<<<<<<
48540 * state += (_dict,)
48541 * use_setstate = True
48542 */
48543 __pyx_t_2 = (__pyx_v__dict != Py_None);
48544 if (__pyx_t_2) {
48545
48546 /* "(tree fragment)":8
48547 * _dict = getattr(self, '__dict__', None)
48548 * if _dict is not None:
48549 * state += (_dict,) # <<<<<<<<<<<<<<
48550 * use_setstate = True
48551 * else:
48552 */
48553 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
48554 __Pyx_GOTREF(__pyx_t_1);
48555 __Pyx_INCREF(__pyx_v__dict);
48556 __Pyx_GIVEREF(__pyx_v__dict);
48557 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
48558 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
48559 __Pyx_GOTREF(__pyx_t_3);
48560 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48561 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
48562 __pyx_t_3 = 0;
48563
48564 /* "(tree fragment)":9
48565 * if _dict is not None:
48566 * state += (_dict,)
48567 * use_setstate = True # <<<<<<<<<<<<<<
48568 * else:
48569 * use_setstate = self.record is not None
48570 */
48571 __pyx_v_use_setstate = 1;
48572
48573 /* "(tree fragment)":7
48574 * state = (self.record,)
48575 * _dict = getattr(self, '__dict__', None)
48576 * if _dict is not None: # <<<<<<<<<<<<<<
48577 * state += (_dict,)
48578 * use_setstate = True
48579 */
48580 goto __pyx_L3;
48581 }
48582
48583 /* "(tree fragment)":11
48584 * use_setstate = True
48585 * else:
48586 * use_setstate = self.record is not None # <<<<<<<<<<<<<<
48587 * if use_setstate:
48588 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, None), state
48589 */
48590 /*else*/ {
48591 __pyx_t_2 = (((PyObject *)__pyx_v_self->record) != Py_None);
48592 __pyx_v_use_setstate = __pyx_t_2;
48593 }
48594 __pyx_L3:;
48595
48596 /* "(tree fragment)":12
48597 * else:
48598 * use_setstate = self.record is not None
48599 * if use_setstate: # <<<<<<<<<<<<<<
48600 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, None), state
48601 * else:
48602 */
48603 if (__pyx_v_use_setstate) {
48604
48605 /* "(tree fragment)":13
48606 * use_setstate = self.record is not None
48607 * if use_setstate:
48608 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, None), state # <<<<<<<<<<<<<<
48609 * else:
48610 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, state)
48611 */
48612 __Pyx_XDECREF(__pyx_r);
48613 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_VariantRecordFilt); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
48614 __Pyx_GOTREF(__pyx_t_3);
48615 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
48616 __Pyx_GOTREF(__pyx_t_1);
48617 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
48618 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
48619 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
48620 __Pyx_INCREF(__pyx_int_118286449);
48621 __Pyx_GIVEREF(__pyx_int_118286449);
48622 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_118286449)) __PYX_ERR(4, 13, __pyx_L1_error);
48623 __Pyx_INCREF(Py_None);
48624 __Pyx_GIVEREF(Py_None);
48625 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
48626 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
48627 __Pyx_GOTREF(__pyx_t_4);
48628 __Pyx_GIVEREF(__pyx_t_3);
48629 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
48630 __Pyx_GIVEREF(__pyx_t_1);
48631 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
48632 __Pyx_INCREF(__pyx_v_state);
48633 __Pyx_GIVEREF(__pyx_v_state);
48634 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
48635 __pyx_t_3 = 0;
48636 __pyx_t_1 = 0;
48637 __pyx_r = __pyx_t_4;
48638 __pyx_t_4 = 0;
48639 goto __pyx_L0;
48640
48641 /* "(tree fragment)":12
48642 * else:
48643 * use_setstate = self.record is not None
48644 * if use_setstate: # <<<<<<<<<<<<<<
48645 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, None), state
48646 * else:
48647 */
48648 }
48649
48650 /* "(tree fragment)":15
48651 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, None), state
48652 * else:
48653 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, state) # <<<<<<<<<<<<<<
48654 * def __setstate_cython__(self, __pyx_state):
48655 * __pyx_unpickle_VariantRecordFilter__set_state(self, __pyx_state)
48656 */
48657 /*else*/ {
48658 __Pyx_XDECREF(__pyx_r);
48659 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantRecordFilt); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
48660 __Pyx_GOTREF(__pyx_t_4);
48661 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
48662 __Pyx_GOTREF(__pyx_t_1);
48663 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
48664 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
48665 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
48666 __Pyx_INCREF(__pyx_int_118286449);
48667 __Pyx_GIVEREF(__pyx_int_118286449);
48668 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_118286449)) __PYX_ERR(4, 15, __pyx_L1_error);
48669 __Pyx_INCREF(__pyx_v_state);
48670 __Pyx_GIVEREF(__pyx_v_state);
48671 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
48672 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
48673 __Pyx_GOTREF(__pyx_t_3);
48674 __Pyx_GIVEREF(__pyx_t_4);
48675 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
48676 __Pyx_GIVEREF(__pyx_t_1);
48677 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
48678 __pyx_t_4 = 0;
48679 __pyx_t_1 = 0;
48680 __pyx_r = __pyx_t_3;
48681 __pyx_t_3 = 0;
48682 goto __pyx_L0;
48683 }
48684
48685 /* "(tree fragment)":1
48686 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
48687 * cdef tuple state
48688 * cdef object _dict
48689 */
48690
48691 /* function exit code */
48692 __pyx_L1_error:;
48693 __Pyx_XDECREF(__pyx_t_1);
48694 __Pyx_XDECREF(__pyx_t_3);
48695 __Pyx_XDECREF(__pyx_t_4);
48696 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48697 __pyx_r = NULL;
48698 __pyx_L0:;
48699 __Pyx_XDECREF(__pyx_v_state);
48700 __Pyx_XDECREF(__pyx_v__dict);
48701 __Pyx_XGIVEREF(__pyx_r);
48702 __Pyx_TraceReturn(__pyx_r, 0);
48703 __Pyx_RefNannyFinishContext();
48704 return __pyx_r;
48705 }
48706
48707 /* "(tree fragment)":16
48708 * else:
48709 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, state)
48710 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
48711 * __pyx_unpickle_VariantRecordFilter__set_state(self, __pyx_state)
48712 */
48713
48714 /* Python wrapper */
48715 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_40__setstate_cython__(PyObject *__pyx_v_self,
48716 #if CYTHON_METH_FASTCALL
48717 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
48718 #else
48719 PyObject *__pyx_args, PyObject *__pyx_kwds
48720 #endif
48721 ); /*proto*/
48722 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_39__setstate_cython__, "VariantRecordFilter.__setstate_cython__(self, __pyx_state)");
48723 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_40__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_40__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_39__setstate_cython__};
48724 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_40__setstate_cython__(PyObject *__pyx_v_self,
48725 #if CYTHON_METH_FASTCALL
48726 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
48727 #else
48728 PyObject *__pyx_args, PyObject *__pyx_kwds
48729 #endif
48730 ) {
48731 PyObject *__pyx_v___pyx_state = 0;
48732 #if !CYTHON_METH_FASTCALL
48733 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
48734 #endif
48735 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
48736 PyObject* values[1] = {0};
48737 int __pyx_lineno = 0;
48738 const char *__pyx_filename = NULL;
48739 int __pyx_clineno = 0;
48740 PyObject *__pyx_r = 0;
48741 __Pyx_RefNannyDeclarations
48742 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
48743 #if !CYTHON_METH_FASTCALL
48744 #if CYTHON_ASSUME_SAFE_MACROS
48745 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
48746 #else
48747 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
48748 #endif
48749 #endif
48750 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
48751 {
48752 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
48753 if (__pyx_kwds) {
48754 Py_ssize_t kw_args;
48755 switch (__pyx_nargs) {
48756 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
48757 CYTHON_FALLTHROUGH;
48758 case 0: break;
48759 default: goto __pyx_L5_argtuple_error;
48760 }
48761 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
48762 switch (__pyx_nargs) {
48763 case 0:
48764 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
48765 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
48766 kw_args--;
48767 }
48768 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
48769 else goto __pyx_L5_argtuple_error;
48770 }
48771 if (unlikely(kw_args > 0)) {
48772 const Py_ssize_t kwd_pos_args = __pyx_nargs;
48773 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
48774 }
48775 } else if (unlikely(__pyx_nargs != 1)) {
48776 goto __pyx_L5_argtuple_error;
48777 } else {
48778 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
48779 }
48780 __pyx_v___pyx_state = values[0];
48781 }
48782 goto __pyx_L6_skip;
48783 __pyx_L5_argtuple_error:;
48784 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
48785 __pyx_L6_skip:;
48786 goto __pyx_L4_argument_unpacking_done;
48787 __pyx_L3_error:;
48788 {
48789 Py_ssize_t __pyx_temp;
48790 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
48791 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
48792 }
48793 }
48794 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48795 __Pyx_RefNannyFinishContext();
48796 return NULL;
48797 __pyx_L4_argument_unpacking_done:;
48798 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_39__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v_self), __pyx_v___pyx_state);
48799
48800 /* function exit code */
48801 {
48802 Py_ssize_t __pyx_temp;
48803 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
48804 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
48805 }
48806 }
48807 __Pyx_RefNannyFinishContext();
48808 return __pyx_r;
48809 }
48810
48811 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFilter_39__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
48812 PyObject *__pyx_r = NULL;
48813 __Pyx_TraceDeclarations
48814 __Pyx_RefNannyDeclarations
48815 PyObject *__pyx_t_1 = NULL;
48816 int __pyx_lineno = 0;
48817 const char *__pyx_filename = NULL;
48818 int __pyx_clineno = 0;
48819 __Pyx_TraceFrameInit(__pyx_codeobj__122)
48820 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
48821 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
48822
48823 /* "(tree fragment)":17
48824 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, state)
48825 * def __setstate_cython__(self, __pyx_state):
48826 * __pyx_unpickle_VariantRecordFilter__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
48827 */
48828 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
48829 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordFilter__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
48830 __Pyx_GOTREF(__pyx_t_1);
48831 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48832
48833 /* "(tree fragment)":16
48834 * else:
48835 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, state)
48836 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
48837 * __pyx_unpickle_VariantRecordFilter__set_state(self, __pyx_state)
48838 */
48839
48840 /* function exit code */
48841 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
48842 goto __pyx_L0;
48843 __pyx_L1_error:;
48844 __Pyx_XDECREF(__pyx_t_1);
48845 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFilter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48846 __pyx_r = NULL;
48847 __pyx_L0:;
48848 __Pyx_XGIVEREF(__pyx_r);
48849 __Pyx_TraceReturn(__pyx_r, 0);
48850 __Pyx_RefNannyFinishContext();
48851 return __pyx_r;
48852 }
48853
48854 /* "pysam/libcbcf.pyx":2388
48855 *
48856 *
48857 * cdef VariantRecordFilter makeVariantRecordFilter(VariantRecord record): # <<<<<<<<<<<<<<
48858 * if not record:
48859 * raise ValueError('invalid VariantRecord')
48860 */
48861
48862 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_f_5pysam_7libcbcf_makeVariantRecordFilter(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record) {
48863 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v_filter = 0;
48864 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_r = NULL;
48865 __Pyx_TraceDeclarations
48866 __Pyx_RefNannyDeclarations
48867 int __pyx_t_1;
48868 int __pyx_t_2;
48869 PyObject *__pyx_t_3 = NULL;
48870 int __pyx_lineno = 0;
48871 const char *__pyx_filename = NULL;
48872 int __pyx_clineno = 0;
48873 __Pyx_RefNannySetupContext("makeVariantRecordFilter", 1);
48874 __Pyx_TraceCall("makeVariantRecordFilter", __pyx_f[0], 2388, 0, __PYX_ERR(0, 2388, __pyx_L1_error));
48875
48876 /* "pysam/libcbcf.pyx":2389
48877 *
48878 * cdef VariantRecordFilter makeVariantRecordFilter(VariantRecord record):
48879 * if not record: # <<<<<<<<<<<<<<
48880 * raise ValueError('invalid VariantRecord')
48881 *
48882 */
48883 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_record)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2389, __pyx_L1_error)
48884 __pyx_t_2 = (!__pyx_t_1);
48885 if (unlikely(__pyx_t_2)) {
48886
48887 /* "pysam/libcbcf.pyx":2390
48888 * cdef VariantRecordFilter makeVariantRecordFilter(VariantRecord record):
48889 * if not record:
48890 * raise ValueError('invalid VariantRecord') # <<<<<<<<<<<<<<
48891 *
48892 * cdef VariantRecordFilter filter = VariantRecordFilter.__new__(VariantRecordFilter)
48893 */
48894 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2390, __pyx_L1_error)
48895 __Pyx_GOTREF(__pyx_t_3);
48896 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
48897 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48898 __PYX_ERR(0, 2390, __pyx_L1_error)
48899
48900 /* "pysam/libcbcf.pyx":2389
48901 *
48902 * cdef VariantRecordFilter makeVariantRecordFilter(VariantRecord record):
48903 * if not record: # <<<<<<<<<<<<<<
48904 * raise ValueError('invalid VariantRecord')
48905 *
48906 */
48907 }
48908
48909 /* "pysam/libcbcf.pyx":2392
48910 * raise ValueError('invalid VariantRecord')
48911 *
48912 * cdef VariantRecordFilter filter = VariantRecordFilter.__new__(VariantRecordFilter) # <<<<<<<<<<<<<<
48913 * filter.record = record
48914 *
48915 */
48916 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordFilter(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2392, __pyx_L1_error)
48917 __Pyx_GOTREF((PyObject *)__pyx_t_3);
48918 __pyx_v_filter = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_t_3);
48919 __pyx_t_3 = 0;
48920
48921 /* "pysam/libcbcf.pyx":2393
48922 *
48923 * cdef VariantRecordFilter filter = VariantRecordFilter.__new__(VariantRecordFilter)
48924 * filter.record = record # <<<<<<<<<<<<<<
48925 *
48926 * return filter
48927 */
48928 __Pyx_INCREF((PyObject *)__pyx_v_record);
48929 __Pyx_GIVEREF((PyObject *)__pyx_v_record);
48930 __Pyx_GOTREF((PyObject *)__pyx_v_filter->record);
48931 __Pyx_DECREF((PyObject *)__pyx_v_filter->record);
48932 __pyx_v_filter->record = __pyx_v_record;
48933
48934 /* "pysam/libcbcf.pyx":2395
48935 * filter.record = record
48936 *
48937 * return filter # <<<<<<<<<<<<<<
48938 *
48939 *
48940 */
48941 __Pyx_XDECREF((PyObject *)__pyx_r);
48942 __Pyx_INCREF((PyObject *)__pyx_v_filter);
48943 __pyx_r = __pyx_v_filter;
48944 goto __pyx_L0;
48945
48946 /* "pysam/libcbcf.pyx":2388
48947 *
48948 *
48949 * cdef VariantRecordFilter makeVariantRecordFilter(VariantRecord record): # <<<<<<<<<<<<<<
48950 * if not record:
48951 * raise ValueError('invalid VariantRecord')
48952 */
48953
48954 /* function exit code */
48955 __pyx_L1_error:;
48956 __Pyx_XDECREF(__pyx_t_3);
48957 __Pyx_AddTraceback("pysam.libcbcf.makeVariantRecordFilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
48958 __pyx_r = 0;
48959 __pyx_L0:;
48960 __Pyx_XDECREF((PyObject *)__pyx_v_filter);
48961 __Pyx_XGIVEREF((PyObject *)__pyx_r);
48962 __Pyx_TraceReturn(__pyx_r, 0);
48963 __Pyx_RefNannyFinishContext();
48964 return __pyx_r;
48965 }
48966
48967 /* "pysam/libcbcf.pyx":2401
48968 * """Format data present for each sample in a :class:`VariantRecord` object,
48969 * presented as mapping from format name to :class:`VariantMetadata` object."""
48970 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
48971 * raise TypeError('this class cannot be instantiated from Python')
48972 *
48973 */
48974
48975 /* Python wrapper */
48976 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
48977 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
48978 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
48979 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
48980 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
48981 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
48982 int __pyx_r;
48983 __Pyx_RefNannyDeclarations
48984 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
48985 #if CYTHON_ASSUME_SAFE_MACROS
48986 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
48987 #else
48988 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
48989 #endif
48990 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
48991 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
48992 __Pyx_INCREF(__pyx_args);
48993 __pyx_v_args = __pyx_args;
48994 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
48995
48996 /* function exit code */
48997 __Pyx_DECREF(__pyx_v_args);
48998 __Pyx_XDECREF(__pyx_v_kwargs);
48999 __Pyx_RefNannyFinishContext();
49000 return __pyx_r;
49001 }
49002
49003 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
49004 int __pyx_r;
49005 __Pyx_TraceDeclarations
49006 __Pyx_RefNannyDeclarations
49007 PyObject *__pyx_t_1 = NULL;
49008 int __pyx_lineno = 0;
49009 const char *__pyx_filename = NULL;
49010 int __pyx_clineno = 0;
49011 __Pyx_RefNannySetupContext("__init__", 1);
49012 __Pyx_TraceCall("__init__", __pyx_f[0], 2401, 0, __PYX_ERR(0, 2401, __pyx_L1_error));
49013
49014 /* "pysam/libcbcf.pyx":2402
49015 * presented as mapping from format name to :class:`VariantMetadata` object."""
49016 * def __init__(self, *args, **kwargs):
49017 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
49018 *
49019 * def __len__(self):
49020 */
49021 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __pyx_L1_error)
49022 __Pyx_GOTREF(__pyx_t_1);
49023 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
49024 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49025 __PYX_ERR(0, 2402, __pyx_L1_error)
49026
49027 /* "pysam/libcbcf.pyx":2401
49028 * """Format data present for each sample in a :class:`VariantRecord` object,
49029 * presented as mapping from format name to :class:`VariantMetadata` object."""
49030 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
49031 * raise TypeError('this class cannot be instantiated from Python')
49032 *
49033 */
49034
49035 /* function exit code */
49036 __pyx_L1_error:;
49037 __Pyx_XDECREF(__pyx_t_1);
49038 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49039 __pyx_r = -1;
49040 __Pyx_TraceReturn(Py_None, 0);
49041 __Pyx_RefNannyFinishContext();
49042 return __pyx_r;
49043 }
49044
49045 /* "pysam/libcbcf.pyx":2404
49046 * raise TypeError('this class cannot be instantiated from Python')
49047 *
49048 * def __len__(self): # <<<<<<<<<<<<<<
49049 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49050 * cdef bcf1_t *r = self.record.ptr
49051 */
49052
49053 /* Python wrapper */
49054 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_3__len__(PyObject *__pyx_v_self); /*proto*/
49055 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_3__len__(PyObject *__pyx_v_self) {
49056 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
49057 Py_ssize_t __pyx_r;
49058 __Pyx_RefNannyDeclarations
49059 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
49060 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
49061 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
49062
49063 /* function exit code */
49064 __Pyx_RefNannyFinishContext();
49065 return __pyx_r;
49066 }
49067
49068 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
49069 CYTHON_UNUSED bcf_hdr_t *__pyx_v_hdr;
49070 bcf1_t *__pyx_v_r;
49071 int __pyx_v_i;
49072 int __pyx_v_n;
49073 Py_ssize_t __pyx_r;
49074 __Pyx_TraceDeclarations
49075 bcf_hdr_t *__pyx_t_1;
49076 bcf1_t *__pyx_t_2;
49077 uint32_t __pyx_t_3;
49078 uint32_t __pyx_t_4;
49079 int __pyx_t_5;
49080 int __pyx_t_6;
49081 int __pyx_lineno = 0;
49082 const char *__pyx_filename = NULL;
49083 int __pyx_clineno = 0;
49084 __Pyx_TraceCall("__len__", __pyx_f[0], 2404, 0, __PYX_ERR(0, 2404, __pyx_L1_error));
49085
49086 /* "pysam/libcbcf.pyx":2405
49087 *
49088 * def __len__(self):
49089 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
49090 * cdef bcf1_t *r = self.record.ptr
49091 * cdef int i, n = 0
49092 */
49093 __pyx_t_1 = __pyx_v_self->record->header->ptr;
49094 __pyx_v_hdr = __pyx_t_1;
49095
49096 /* "pysam/libcbcf.pyx":2406
49097 * def __len__(self):
49098 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49099 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
49100 * cdef int i, n = 0
49101 *
49102 */
49103 __pyx_t_2 = __pyx_v_self->record->ptr;
49104 __pyx_v_r = __pyx_t_2;
49105
49106 /* "pysam/libcbcf.pyx":2407
49107 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49108 * cdef bcf1_t *r = self.record.ptr
49109 * cdef int i, n = 0 # <<<<<<<<<<<<<<
49110 *
49111 * for i in range(r.n_fmt):
49112 */
49113 __pyx_v_n = 0;
49114
49115 /* "pysam/libcbcf.pyx":2409
49116 * cdef int i, n = 0
49117 *
49118 * for i in range(r.n_fmt): # <<<<<<<<<<<<<<
49119 * if r.d.fmt[i].p:
49120 * n += 1
49121 */
49122 __pyx_t_3 = __pyx_v_r->n_fmt;
49123 __pyx_t_4 = __pyx_t_3;
49124 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
49125 __pyx_v_i = __pyx_t_5;
49126
49127 /* "pysam/libcbcf.pyx":2410
49128 *
49129 * for i in range(r.n_fmt):
49130 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
49131 * n += 1
49132 * return n
49133 */
49134 __pyx_t_6 = ((__pyx_v_r->d.fmt[__pyx_v_i]).p != 0);
49135 if (__pyx_t_6) {
49136
49137 /* "pysam/libcbcf.pyx":2411
49138 * for i in range(r.n_fmt):
49139 * if r.d.fmt[i].p:
49140 * n += 1 # <<<<<<<<<<<<<<
49141 * return n
49142 *
49143 */
49144 __pyx_v_n = (__pyx_v_n + 1);
49145
49146 /* "pysam/libcbcf.pyx":2410
49147 *
49148 * for i in range(r.n_fmt):
49149 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
49150 * n += 1
49151 * return n
49152 */
49153 }
49154 }
49155
49156 /* "pysam/libcbcf.pyx":2412
49157 * if r.d.fmt[i].p:
49158 * n += 1
49159 * return n # <<<<<<<<<<<<<<
49160 *
49161 * def __bool__(self):
49162 */
49163 __pyx_r = __pyx_v_n;
49164 goto __pyx_L0;
49165
49166 /* "pysam/libcbcf.pyx":2404
49167 * raise TypeError('this class cannot be instantiated from Python')
49168 *
49169 * def __len__(self): # <<<<<<<<<<<<<<
49170 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49171 * cdef bcf1_t *r = self.record.ptr
49172 */
49173
49174 /* function exit code */
49175 __pyx_L1_error:;
49176 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49177 __pyx_r = -1;
49178 __pyx_L0:;
49179 __Pyx_TraceReturn(Py_None, 0);
49180 return __pyx_r;
49181 }
49182
49183 /* "pysam/libcbcf.pyx":2414
49184 * return n
49185 *
49186 * def __bool__(self): # <<<<<<<<<<<<<<
49187 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49188 * cdef bcf1_t *r = self.record.ptr
49189 */
49190
49191 /* Python wrapper */
49192 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_5__bool__(PyObject *__pyx_v_self); /*proto*/
49193 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_5__bool__(PyObject *__pyx_v_self) {
49194 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
49195 int __pyx_r;
49196 __Pyx_RefNannyDeclarations
49197 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
49198 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
49199 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
49200
49201 /* function exit code */
49202 __Pyx_RefNannyFinishContext();
49203 return __pyx_r;
49204 }
49205
49206 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
49207 CYTHON_UNUSED bcf_hdr_t *__pyx_v_hdr;
49208 bcf1_t *__pyx_v_r;
49209 int __pyx_v_i;
49210 int __pyx_r;
49211 __Pyx_TraceDeclarations
49212 bcf_hdr_t *__pyx_t_1;
49213 bcf1_t *__pyx_t_2;
49214 uint32_t __pyx_t_3;
49215 uint32_t __pyx_t_4;
49216 int __pyx_t_5;
49217 int __pyx_t_6;
49218 int __pyx_lineno = 0;
49219 const char *__pyx_filename = NULL;
49220 int __pyx_clineno = 0;
49221 __Pyx_TraceCall("__bool__", __pyx_f[0], 2414, 0, __PYX_ERR(0, 2414, __pyx_L1_error));
49222
49223 /* "pysam/libcbcf.pyx":2415
49224 *
49225 * def __bool__(self):
49226 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
49227 * cdef bcf1_t *r = self.record.ptr
49228 * cdef int i
49229 */
49230 __pyx_t_1 = __pyx_v_self->record->header->ptr;
49231 __pyx_v_hdr = __pyx_t_1;
49232
49233 /* "pysam/libcbcf.pyx":2416
49234 * def __bool__(self):
49235 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49236 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
49237 * cdef int i
49238 *
49239 */
49240 __pyx_t_2 = __pyx_v_self->record->ptr;
49241 __pyx_v_r = __pyx_t_2;
49242
49243 /* "pysam/libcbcf.pyx":2419
49244 * cdef int i
49245 *
49246 * for i in range(r.n_fmt): # <<<<<<<<<<<<<<
49247 * if r.d.fmt[i].p:
49248 * return True
49249 */
49250 __pyx_t_3 = __pyx_v_r->n_fmt;
49251 __pyx_t_4 = __pyx_t_3;
49252 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
49253 __pyx_v_i = __pyx_t_5;
49254
49255 /* "pysam/libcbcf.pyx":2420
49256 *
49257 * for i in range(r.n_fmt):
49258 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
49259 * return True
49260 * return False
49261 */
49262 __pyx_t_6 = ((__pyx_v_r->d.fmt[__pyx_v_i]).p != 0);
49263 if (__pyx_t_6) {
49264
49265 /* "pysam/libcbcf.pyx":2421
49266 * for i in range(r.n_fmt):
49267 * if r.d.fmt[i].p:
49268 * return True # <<<<<<<<<<<<<<
49269 * return False
49270 *
49271 */
49272 __pyx_r = 1;
49273 goto __pyx_L0;
49274
49275 /* "pysam/libcbcf.pyx":2420
49276 *
49277 * for i in range(r.n_fmt):
49278 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
49279 * return True
49280 * return False
49281 */
49282 }
49283 }
49284
49285 /* "pysam/libcbcf.pyx":2422
49286 * if r.d.fmt[i].p:
49287 * return True
49288 * return False # <<<<<<<<<<<<<<
49289 *
49290 * def __getitem__(self, key):
49291 */
49292 __pyx_r = 0;
49293 goto __pyx_L0;
49294
49295 /* "pysam/libcbcf.pyx":2414
49296 * return n
49297 *
49298 * def __bool__(self): # <<<<<<<<<<<<<<
49299 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49300 * cdef bcf1_t *r = self.record.ptr
49301 */
49302
49303 /* function exit code */
49304 __pyx_L1_error:;
49305 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49306 __pyx_r = -1;
49307 __pyx_L0:;
49308 __Pyx_TraceReturn(Py_None, 0);
49309 return __pyx_r;
49310 }
49311
49312 /* "pysam/libcbcf.pyx":2424
49313 * return False
49314 *
49315 * def __getitem__(self, key): # <<<<<<<<<<<<<<
49316 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49317 * cdef bcf1_t *r = self.record.ptr
49318 */
49319
49320 /* Python wrapper */
49321 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
49322 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
49323 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
49324 PyObject *__pyx_r = 0;
49325 __Pyx_RefNannyDeclarations
49326 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
49327 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
49328 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self), ((PyObject *)__pyx_v_key));
49329
49330 /* function exit code */
49331 __Pyx_RefNannyFinishContext();
49332 return __pyx_r;
49333 }
49334
49335 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v_key) {
49336 bcf_hdr_t *__pyx_v_hdr;
49337 bcf1_t *__pyx_v_r;
49338 PyObject *__pyx_v_bkey = 0;
49339 bcf_fmt_t *__pyx_v_fmt;
49340 PyObject *__pyx_r = NULL;
49341 __Pyx_TraceDeclarations
49342 __Pyx_RefNannyDeclarations
49343 bcf_hdr_t *__pyx_t_1;
49344 bcf1_t *__pyx_t_2;
49345 PyObject *__pyx_t_3 = NULL;
49346 char const *__pyx_t_4;
49347 int __pyx_t_5;
49348 int __pyx_t_6;
49349 PyObject *__pyx_t_7 = NULL;
49350 PyObject *__pyx_t_8 = NULL;
49351 unsigned int __pyx_t_9;
49352 int __pyx_lineno = 0;
49353 const char *__pyx_filename = NULL;
49354 int __pyx_clineno = 0;
49355 __Pyx_RefNannySetupContext("__getitem__", 1);
49356 __Pyx_TraceCall("__getitem__", __pyx_f[0], 2424, 0, __PYX_ERR(0, 2424, __pyx_L1_error));
49357
49358 /* "pysam/libcbcf.pyx":2425
49359 *
49360 * def __getitem__(self, key):
49361 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
49362 * cdef bcf1_t *r = self.record.ptr
49363 *
49364 */
49365 __pyx_t_1 = __pyx_v_self->record->header->ptr;
49366 __pyx_v_hdr = __pyx_t_1;
49367
49368 /* "pysam/libcbcf.pyx":2426
49369 * def __getitem__(self, key):
49370 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49371 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
49372 *
49373 * cdef bytes bkey = force_bytes(key)
49374 */
49375 __pyx_t_2 = __pyx_v_self->record->ptr;
49376 __pyx_v_r = __pyx_t_2;
49377
49378 /* "pysam/libcbcf.pyx":2428
49379 * cdef bcf1_t *r = self.record.ptr
49380 *
49381 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
49382 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
49383 *
49384 */
49385 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2428, __pyx_L1_error)
49386 __Pyx_GOTREF(__pyx_t_3);
49387 __pyx_v_bkey = ((PyObject*)__pyx_t_3);
49388 __pyx_t_3 = 0;
49389
49390 /* "pysam/libcbcf.pyx":2429
49391 *
49392 * cdef bytes bkey = force_bytes(key)
49393 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey) # <<<<<<<<<<<<<<
49394 *
49395 * if not fmt or not fmt.p:
49396 */
49397 if (unlikely(__pyx_v_bkey == Py_None)) {
49398 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
49399 __PYX_ERR(0, 2429, __pyx_L1_error)
49400 }
49401 __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2429, __pyx_L1_error)
49402 __pyx_v_fmt = bcf_get_fmt(__pyx_v_hdr, __pyx_v_r, __pyx_t_4);
49403
49404 /* "pysam/libcbcf.pyx":2431
49405 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
49406 *
49407 * if not fmt or not fmt.p: # <<<<<<<<<<<<<<
49408 * raise KeyError('unknown format: {}'.format(key))
49409 *
49410 */
49411 __pyx_t_6 = (!(__pyx_v_fmt != 0));
49412 if (!__pyx_t_6) {
49413 } else {
49414 __pyx_t_5 = __pyx_t_6;
49415 goto __pyx_L4_bool_binop_done;
49416 }
49417 __pyx_t_6 = (!(__pyx_v_fmt->p != 0));
49418 __pyx_t_5 = __pyx_t_6;
49419 __pyx_L4_bool_binop_done:;
49420 if (unlikely(__pyx_t_5)) {
49421
49422 /* "pysam/libcbcf.pyx":2432
49423 *
49424 * if not fmt or not fmt.p:
49425 * raise KeyError('unknown format: {}'.format(key)) # <<<<<<<<<<<<<<
49426 *
49427 * return makeVariantMetadata(self.record.header, BCF_HL_FMT, fmt.id)
49428 */
49429 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unknown_format, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2432, __pyx_L1_error)
49430 __Pyx_GOTREF(__pyx_t_7);
49431 __pyx_t_8 = NULL;
49432 __pyx_t_9 = 0;
49433 #if CYTHON_UNPACK_METHODS
49434 if (likely(PyMethod_Check(__pyx_t_7))) {
49435 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
49436 if (likely(__pyx_t_8)) {
49437 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
49438 __Pyx_INCREF(__pyx_t_8);
49439 __Pyx_INCREF(function);
49440 __Pyx_DECREF_SET(__pyx_t_7, function);
49441 __pyx_t_9 = 1;
49442 }
49443 }
49444 #endif
49445 {
49446 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_key};
49447 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
49448 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
49449 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2432, __pyx_L1_error)
49450 __Pyx_GOTREF(__pyx_t_3);
49451 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
49452 }
49453 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2432, __pyx_L1_error)
49454 __Pyx_GOTREF(__pyx_t_7);
49455 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
49456 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
49457 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
49458 __PYX_ERR(0, 2432, __pyx_L1_error)
49459
49460 /* "pysam/libcbcf.pyx":2431
49461 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
49462 *
49463 * if not fmt or not fmt.p: # <<<<<<<<<<<<<<
49464 * raise KeyError('unknown format: {}'.format(key))
49465 *
49466 */
49467 }
49468
49469 /* "pysam/libcbcf.pyx":2434
49470 * raise KeyError('unknown format: {}'.format(key))
49471 *
49472 * return makeVariantMetadata(self.record.header, BCF_HL_FMT, fmt.id) # <<<<<<<<<<<<<<
49473 *
49474 * def __delitem__(self, key):
49475 */
49476 __Pyx_XDECREF(__pyx_r);
49477 __pyx_t_7 = ((PyObject *)__pyx_v_self->record->header);
49478 __Pyx_INCREF(__pyx_t_7);
49479 __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantMetadata(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_7), BCF_HL_FMT, __pyx_v_fmt->id)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2434, __pyx_L1_error)
49480 __Pyx_GOTREF(__pyx_t_3);
49481 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
49482 __pyx_r = __pyx_t_3;
49483 __pyx_t_3 = 0;
49484 goto __pyx_L0;
49485
49486 /* "pysam/libcbcf.pyx":2424
49487 * return False
49488 *
49489 * def __getitem__(self, key): # <<<<<<<<<<<<<<
49490 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49491 * cdef bcf1_t *r = self.record.ptr
49492 */
49493
49494 /* function exit code */
49495 __pyx_L1_error:;
49496 __Pyx_XDECREF(__pyx_t_3);
49497 __Pyx_XDECREF(__pyx_t_7);
49498 __Pyx_XDECREF(__pyx_t_8);
49499 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49500 __pyx_r = NULL;
49501 __pyx_L0:;
49502 __Pyx_XDECREF(__pyx_v_bkey);
49503 __Pyx_XGIVEREF(__pyx_r);
49504 __Pyx_TraceReturn(__pyx_r, 0);
49505 __Pyx_RefNannyFinishContext();
49506 return __pyx_r;
49507 }
49508
49509 /* "pysam/libcbcf.pyx":2436
49510 * return makeVariantMetadata(self.record.header, BCF_HL_FMT, fmt.id)
49511 *
49512 * def __delitem__(self, key): # <<<<<<<<<<<<<<
49513 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49514 * cdef bcf1_t *r = self.record.ptr
49515 */
49516
49517 /* Python wrapper */
49518 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_9__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
49519 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_9__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
49520 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
49521 int __pyx_r;
49522 __Pyx_RefNannyDeclarations
49523 __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
49524 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
49525 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_8__delitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self), ((PyObject *)__pyx_v_key));
49526
49527 /* function exit code */
49528 __Pyx_RefNannyFinishContext();
49529 return __pyx_r;
49530 }
49531
49532 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_8__delitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v_key) {
49533 bcf_hdr_t *__pyx_v_hdr;
49534 bcf1_t *__pyx_v_r;
49535 PyObject *__pyx_v_bkey = 0;
49536 bcf_fmt_t *__pyx_v_fmt;
49537 int __pyx_r;
49538 __Pyx_TraceDeclarations
49539 __Pyx_RefNannyDeclarations
49540 bcf_hdr_t *__pyx_t_1;
49541 bcf1_t *__pyx_t_2;
49542 PyObject *__pyx_t_3 = NULL;
49543 char const *__pyx_t_4;
49544 int __pyx_t_5;
49545 int __pyx_t_6;
49546 PyObject *__pyx_t_7 = NULL;
49547 PyObject *__pyx_t_8 = NULL;
49548 unsigned int __pyx_t_9;
49549 char const *__pyx_t_10;
49550 int __pyx_lineno = 0;
49551 const char *__pyx_filename = NULL;
49552 int __pyx_clineno = 0;
49553 __Pyx_RefNannySetupContext("__delitem__", 1);
49554 __Pyx_TraceCall("__delitem__", __pyx_f[0], 2436, 0, __PYX_ERR(0, 2436, __pyx_L1_error));
49555
49556 /* "pysam/libcbcf.pyx":2437
49557 *
49558 * def __delitem__(self, key):
49559 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
49560 * cdef bcf1_t *r = self.record.ptr
49561 *
49562 */
49563 __pyx_t_1 = __pyx_v_self->record->header->ptr;
49564 __pyx_v_hdr = __pyx_t_1;
49565
49566 /* "pysam/libcbcf.pyx":2438
49567 * def __delitem__(self, key):
49568 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49569 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
49570 *
49571 * cdef bytes bkey = force_bytes(key)
49572 */
49573 __pyx_t_2 = __pyx_v_self->record->ptr;
49574 __pyx_v_r = __pyx_t_2;
49575
49576 /* "pysam/libcbcf.pyx":2440
49577 * cdef bcf1_t *r = self.record.ptr
49578 *
49579 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
49580 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
49581 *
49582 */
49583 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2440, __pyx_L1_error)
49584 __Pyx_GOTREF(__pyx_t_3);
49585 __pyx_v_bkey = ((PyObject*)__pyx_t_3);
49586 __pyx_t_3 = 0;
49587
49588 /* "pysam/libcbcf.pyx":2441
49589 *
49590 * cdef bytes bkey = force_bytes(key)
49591 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey) # <<<<<<<<<<<<<<
49592 *
49593 * if not fmt or not fmt.p:
49594 */
49595 if (unlikely(__pyx_v_bkey == Py_None)) {
49596 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
49597 __PYX_ERR(0, 2441, __pyx_L1_error)
49598 }
49599 __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2441, __pyx_L1_error)
49600 __pyx_v_fmt = bcf_get_fmt(__pyx_v_hdr, __pyx_v_r, __pyx_t_4);
49601
49602 /* "pysam/libcbcf.pyx":2443
49603 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
49604 *
49605 * if not fmt or not fmt.p: # <<<<<<<<<<<<<<
49606 * raise KeyError('unknown format: {}'.format(key))
49607 *
49608 */
49609 __pyx_t_6 = (!(__pyx_v_fmt != 0));
49610 if (!__pyx_t_6) {
49611 } else {
49612 __pyx_t_5 = __pyx_t_6;
49613 goto __pyx_L4_bool_binop_done;
49614 }
49615 __pyx_t_6 = (!(__pyx_v_fmt->p != 0));
49616 __pyx_t_5 = __pyx_t_6;
49617 __pyx_L4_bool_binop_done:;
49618 if (unlikely(__pyx_t_5)) {
49619
49620 /* "pysam/libcbcf.pyx":2444
49621 *
49622 * if not fmt or not fmt.p:
49623 * raise KeyError('unknown format: {}'.format(key)) # <<<<<<<<<<<<<<
49624 *
49625 * if bcf_update_format(hdr, r, bkey, fmt.p, 0, fmt.type) < 0:
49626 */
49627 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unknown_format, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2444, __pyx_L1_error)
49628 __Pyx_GOTREF(__pyx_t_7);
49629 __pyx_t_8 = NULL;
49630 __pyx_t_9 = 0;
49631 #if CYTHON_UNPACK_METHODS
49632 if (likely(PyMethod_Check(__pyx_t_7))) {
49633 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
49634 if (likely(__pyx_t_8)) {
49635 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
49636 __Pyx_INCREF(__pyx_t_8);
49637 __Pyx_INCREF(function);
49638 __Pyx_DECREF_SET(__pyx_t_7, function);
49639 __pyx_t_9 = 1;
49640 }
49641 }
49642 #endif
49643 {
49644 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_key};
49645 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
49646 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
49647 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2444, __pyx_L1_error)
49648 __Pyx_GOTREF(__pyx_t_3);
49649 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
49650 }
49651 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2444, __pyx_L1_error)
49652 __Pyx_GOTREF(__pyx_t_7);
49653 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
49654 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
49655 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
49656 __PYX_ERR(0, 2444, __pyx_L1_error)
49657
49658 /* "pysam/libcbcf.pyx":2443
49659 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
49660 *
49661 * if not fmt or not fmt.p: # <<<<<<<<<<<<<<
49662 * raise KeyError('unknown format: {}'.format(key))
49663 *
49664 */
49665 }
49666
49667 /* "pysam/libcbcf.pyx":2446
49668 * raise KeyError('unknown format: {}'.format(key))
49669 *
49670 * if bcf_update_format(hdr, r, bkey, fmt.p, 0, fmt.type) < 0: # <<<<<<<<<<<<<<
49671 * raise ValueError('Unable to delete FORMAT')
49672 *
49673 */
49674 if (unlikely(__pyx_v_bkey == Py_None)) {
49675 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
49676 __PYX_ERR(0, 2446, __pyx_L1_error)
49677 }
49678 __pyx_t_10 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2446, __pyx_L1_error)
49679 __pyx_t_5 = (bcf_update_format(__pyx_v_hdr, __pyx_v_r, __pyx_t_10, __pyx_v_fmt->p, 0, __pyx_v_fmt->type) < 0);
49680 if (unlikely(__pyx_t_5)) {
49681
49682 /* "pysam/libcbcf.pyx":2447
49683 *
49684 * if bcf_update_format(hdr, r, bkey, fmt.p, 0, fmt.type) < 0:
49685 * raise ValueError('Unable to delete FORMAT') # <<<<<<<<<<<<<<
49686 *
49687 * def clear(self):
49688 */
49689 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2447, __pyx_L1_error)
49690 __Pyx_GOTREF(__pyx_t_7);
49691 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
49692 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
49693 __PYX_ERR(0, 2447, __pyx_L1_error)
49694
49695 /* "pysam/libcbcf.pyx":2446
49696 * raise KeyError('unknown format: {}'.format(key))
49697 *
49698 * if bcf_update_format(hdr, r, bkey, fmt.p, 0, fmt.type) < 0: # <<<<<<<<<<<<<<
49699 * raise ValueError('Unable to delete FORMAT')
49700 *
49701 */
49702 }
49703
49704 /* "pysam/libcbcf.pyx":2436
49705 * return makeVariantMetadata(self.record.header, BCF_HL_FMT, fmt.id)
49706 *
49707 * def __delitem__(self, key): # <<<<<<<<<<<<<<
49708 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49709 * cdef bcf1_t *r = self.record.ptr
49710 */
49711
49712 /* function exit code */
49713 __pyx_r = 0;
49714 goto __pyx_L0;
49715 __pyx_L1_error:;
49716 __Pyx_XDECREF(__pyx_t_3);
49717 __Pyx_XDECREF(__pyx_t_7);
49718 __Pyx_XDECREF(__pyx_t_8);
49719 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49720 __pyx_r = -1;
49721 __pyx_L0:;
49722 __Pyx_XDECREF(__pyx_v_bkey);
49723 __Pyx_TraceReturn(Py_None, 0);
49724 __Pyx_RefNannyFinishContext();
49725 return __pyx_r;
49726 }
49727
49728 /* "pysam/libcbcf.pyx":2449
49729 * raise ValueError('Unable to delete FORMAT')
49730 *
49731 * def clear(self): # <<<<<<<<<<<<<<
49732 * """Clear all formats for all samples within the associated
49733 * :class:`VariantRecord` instance"""
49734 */
49735
49736 /* Python wrapper */
49737 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_11clear(PyObject *__pyx_v_self,
49738 #if CYTHON_METH_FASTCALL
49739 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
49740 #else
49741 PyObject *__pyx_args, PyObject *__pyx_kwds
49742 #endif
49743 ); /*proto*/
49744 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_10clear, "VariantRecordFormat.clear(self)\nClear all formats for all samples within the associated\n :class:`VariantRecord` instance");
49745 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_11clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_11clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_10clear};
49746 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_11clear(PyObject *__pyx_v_self,
49747 #if CYTHON_METH_FASTCALL
49748 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
49749 #else
49750 PyObject *__pyx_args, PyObject *__pyx_kwds
49751 #endif
49752 ) {
49753 #if !CYTHON_METH_FASTCALL
49754 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
49755 #endif
49756 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
49757 PyObject *__pyx_r = 0;
49758 __Pyx_RefNannyDeclarations
49759 __Pyx_RefNannySetupContext("clear (wrapper)", 0);
49760 #if !CYTHON_METH_FASTCALL
49761 #if CYTHON_ASSUME_SAFE_MACROS
49762 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
49763 #else
49764 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
49765 #endif
49766 #endif
49767 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
49768 if (unlikely(__pyx_nargs > 0)) {
49769 __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, __pyx_nargs); return NULL;}
49770 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear", 0))) return NULL;
49771 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_10clear(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
49772
49773 /* function exit code */
49774 __Pyx_RefNannyFinishContext();
49775 return __pyx_r;
49776 }
49777
49778 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_10clear(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
49779 bcf_hdr_t *__pyx_v_hdr;
49780 bcf1_t *__pyx_v_r;
49781 bcf_fmt_t *__pyx_v_fmt;
49782 char const *__pyx_v_key;
49783 int __pyx_v_i;
49784 PyObject *__pyx_r = NULL;
49785 __Pyx_TraceDeclarations
49786 __Pyx_RefNannyDeclarations
49787 bcf_hdr_t *__pyx_t_1;
49788 bcf1_t *__pyx_t_2;
49789 int __pyx_t_3;
49790 int __pyx_t_4;
49791 PyObject *__pyx_t_5 = NULL;
49792 int __pyx_lineno = 0;
49793 const char *__pyx_filename = NULL;
49794 int __pyx_clineno = 0;
49795 __Pyx_TraceFrameInit(__pyx_codeobj__125)
49796 __Pyx_RefNannySetupContext("clear", 1);
49797 __Pyx_TraceCall("clear", __pyx_f[0], 2449, 0, __PYX_ERR(0, 2449, __pyx_L1_error));
49798
49799 /* "pysam/libcbcf.pyx":2452
49800 * """Clear all formats for all samples within the associated
49801 * :class:`VariantRecord` instance"""
49802 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
49803 * cdef bcf1_t *r = self.record.ptr
49804 * cdef bcf_fmt_t *fmt
49805 */
49806 __pyx_t_1 = __pyx_v_self->record->header->ptr;
49807 __pyx_v_hdr = __pyx_t_1;
49808
49809 /* "pysam/libcbcf.pyx":2453
49810 * :class:`VariantRecord` instance"""
49811 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49812 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
49813 * cdef bcf_fmt_t *fmt
49814 * cdef const char *key
49815 */
49816 __pyx_t_2 = __pyx_v_self->record->ptr;
49817 __pyx_v_r = __pyx_t_2;
49818
49819 /* "pysam/libcbcf.pyx":2458
49820 * cdef int i
49821 *
49822 * for i in reversed(range(r.n_fmt)): # <<<<<<<<<<<<<<
49823 * fmt = &r.d.fmt[i]
49824 * if fmt.p:
49825 */
49826 for (__pyx_t_3 = __pyx_v_r->n_fmt-1; __pyx_t_3 >= 0; __pyx_t_3-=1) {
49827 __pyx_v_i = __pyx_t_3;
49828
49829 /* "pysam/libcbcf.pyx":2459
49830 *
49831 * for i in reversed(range(r.n_fmt)):
49832 * fmt = &r.d.fmt[i] # <<<<<<<<<<<<<<
49833 * if fmt.p:
49834 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)
49835 */
49836 __pyx_v_fmt = (&(__pyx_v_r->d.fmt[__pyx_v_i]));
49837
49838 /* "pysam/libcbcf.pyx":2460
49839 * for i in reversed(range(r.n_fmt)):
49840 * fmt = &r.d.fmt[i]
49841 * if fmt.p: # <<<<<<<<<<<<<<
49842 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)
49843 * if bcf_update_format(hdr, r, key, fmt.p, 0, fmt.type) < 0:
49844 */
49845 __pyx_t_4 = (__pyx_v_fmt->p != 0);
49846 if (__pyx_t_4) {
49847
49848 /* "pysam/libcbcf.pyx":2461
49849 * fmt = &r.d.fmt[i]
49850 * if fmt.p:
49851 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id) # <<<<<<<<<<<<<<
49852 * if bcf_update_format(hdr, r, key, fmt.p, 0, fmt.type) < 0:
49853 * raise ValueError('Unable to delete FORMAT')
49854 */
49855 __pyx_v_key = bcf_hdr_int2id(__pyx_v_hdr, BCF_DT_ID, __pyx_v_fmt->id);
49856
49857 /* "pysam/libcbcf.pyx":2462
49858 * if fmt.p:
49859 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)
49860 * if bcf_update_format(hdr, r, key, fmt.p, 0, fmt.type) < 0: # <<<<<<<<<<<<<<
49861 * raise ValueError('Unable to delete FORMAT')
49862 *
49863 */
49864 __pyx_t_4 = (bcf_update_format(__pyx_v_hdr, __pyx_v_r, __pyx_v_key, __pyx_v_fmt->p, 0, __pyx_v_fmt->type) < 0);
49865 if (unlikely(__pyx_t_4)) {
49866
49867 /* "pysam/libcbcf.pyx":2463
49868 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)
49869 * if bcf_update_format(hdr, r, key, fmt.p, 0, fmt.type) < 0:
49870 * raise ValueError('Unable to delete FORMAT') # <<<<<<<<<<<<<<
49871 *
49872 * def __iter__(self):
49873 */
49874 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2463, __pyx_L1_error)
49875 __Pyx_GOTREF(__pyx_t_5);
49876 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
49877 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
49878 __PYX_ERR(0, 2463, __pyx_L1_error)
49879
49880 /* "pysam/libcbcf.pyx":2462
49881 * if fmt.p:
49882 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)
49883 * if bcf_update_format(hdr, r, key, fmt.p, 0, fmt.type) < 0: # <<<<<<<<<<<<<<
49884 * raise ValueError('Unable to delete FORMAT')
49885 *
49886 */
49887 }
49888
49889 /* "pysam/libcbcf.pyx":2460
49890 * for i in reversed(range(r.n_fmt)):
49891 * fmt = &r.d.fmt[i]
49892 * if fmt.p: # <<<<<<<<<<<<<<
49893 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)
49894 * if bcf_update_format(hdr, r, key, fmt.p, 0, fmt.type) < 0:
49895 */
49896 }
49897 }
49898
49899 /* "pysam/libcbcf.pyx":2449
49900 * raise ValueError('Unable to delete FORMAT')
49901 *
49902 * def clear(self): # <<<<<<<<<<<<<<
49903 * """Clear all formats for all samples within the associated
49904 * :class:`VariantRecord` instance"""
49905 */
49906
49907 /* function exit code */
49908 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
49909 goto __pyx_L0;
49910 __pyx_L1_error:;
49911 __Pyx_XDECREF(__pyx_t_5);
49912 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
49913 __pyx_r = NULL;
49914 __pyx_L0:;
49915 __Pyx_XGIVEREF(__pyx_r);
49916 __Pyx_TraceReturn(__pyx_r, 0);
49917 __Pyx_RefNannyFinishContext();
49918 return __pyx_r;
49919 }
49920 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_14generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
49921
49922 /* "pysam/libcbcf.pyx":2465
49923 * raise ValueError('Unable to delete FORMAT')
49924 *
49925 * def __iter__(self): # <<<<<<<<<<<<<<
49926 * cdef bcf_hdr_t *hdr = self.record.header.ptr
49927 * cdef bcf1_t *r = self.record.ptr
49928 */
49929
49930 /* Python wrapper */
49931 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_13__iter__(PyObject *__pyx_v_self); /*proto*/
49932 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_13__iter__(PyObject *__pyx_v_self) {
49933 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
49934 PyObject *__pyx_r = 0;
49935 __Pyx_RefNannyDeclarations
49936 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
49937 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
49938 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_12__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
49939
49940 /* function exit code */
49941 __Pyx_RefNannyFinishContext();
49942 return __pyx_r;
49943 }
49944
49945 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_12__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
49946 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *__pyx_cur_scope;
49947 PyObject *__pyx_r = NULL;
49948 __Pyx_RefNannyDeclarations
49949 int __pyx_lineno = 0;
49950 const char *__pyx_filename = NULL;
49951 int __pyx_clineno = 0;
49952 __Pyx_RefNannySetupContext("__iter__", 0);
49953 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_21___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__, __pyx_empty_tuple, NULL);
49954 if (unlikely(!__pyx_cur_scope)) {
49955 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *)Py_None);
49956 __Pyx_INCREF(Py_None);
49957 __PYX_ERR(0, 2465, __pyx_L1_error)
49958 } else {
49959 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
49960 }
49961 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
49962 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
49963 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
49964 {
49965 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_14generator14, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantRecordFormat___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2465, __pyx_L1_error)
49966 __Pyx_DECREF(__pyx_cur_scope);
49967 __Pyx_RefNannyFinishContext();
49968 return (PyObject *) gen;
49969 }
49970
49971 /* function exit code */
49972 __pyx_L1_error:;
49973 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49974 __pyx_r = NULL;
49975 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
49976 __Pyx_XGIVEREF(__pyx_r);
49977 __Pyx_RefNannyFinishContext();
49978 return __pyx_r;
49979 }
49980
49981 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_14generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
49982 {
49983 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *)__pyx_generator->closure);
49984 PyObject *__pyx_r = NULL;
49985 __Pyx_TraceDeclarations
49986 bcf_hdr_t *__pyx_t_1;
49987 bcf1_t *__pyx_t_2;
49988 uint32_t __pyx_t_3;
49989 uint32_t __pyx_t_4;
49990 int __pyx_t_5;
49991 int __pyx_t_6;
49992 PyObject *__pyx_t_7 = NULL;
49993 int __pyx_lineno = 0;
49994 const char *__pyx_filename = NULL;
49995 int __pyx_clineno = 0;
49996 __Pyx_RefNannyDeclarations
49997 __Pyx_RefNannySetupContext("__iter__", 0);
49998 __Pyx_TraceCall("__iter__", __pyx_f[0], 2465, 0, __PYX_ERR(0, 2465, __pyx_L1_error));
49999 switch (__pyx_generator->resume_label) {
50000 case 0: goto __pyx_L3_first_run;
50001 case 1: goto __pyx_L7_resume_from_yield;
50002 default: /* CPython raises the right error here */
50003 __Pyx_TraceReturn(Py_None, 0);
50004 __Pyx_RefNannyFinishContext();
50005 return NULL;
50006 }
50007 __pyx_L3_first_run:;
50008 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2465, __pyx_L1_error)
50009
50010 /* "pysam/libcbcf.pyx":2466
50011 *
50012 * def __iter__(self):
50013 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
50014 * cdef bcf1_t *r = self.record.ptr
50015 * cdef bcf_fmt_t *fmt
50016 */
50017 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
50018 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
50019
50020 /* "pysam/libcbcf.pyx":2467
50021 * def __iter__(self):
50022 * cdef bcf_hdr_t *hdr = self.record.header.ptr
50023 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
50024 * cdef bcf_fmt_t *fmt
50025 * cdef int i
50026 */
50027 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
50028 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
50029
50030 /* "pysam/libcbcf.pyx":2471
50031 * cdef int i
50032 *
50033 * for i in range(r.n_fmt): # <<<<<<<<<<<<<<
50034 * fmt = &r.d.fmt[i]
50035 * if fmt.p:
50036 */
50037 __pyx_t_3 = __pyx_cur_scope->__pyx_v_r->n_fmt;
50038 __pyx_t_4 = __pyx_t_3;
50039 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
50040 __pyx_cur_scope->__pyx_v_i = __pyx_t_5;
50041
50042 /* "pysam/libcbcf.pyx":2472
50043 *
50044 * for i in range(r.n_fmt):
50045 * fmt = &r.d.fmt[i] # <<<<<<<<<<<<<<
50046 * if fmt.p:
50047 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
50048 */
50049 __pyx_cur_scope->__pyx_v_fmt = (&(__pyx_cur_scope->__pyx_v_r->d.fmt[__pyx_cur_scope->__pyx_v_i]));
50050
50051 /* "pysam/libcbcf.pyx":2473
50052 * for i in range(r.n_fmt):
50053 * fmt = &r.d.fmt[i]
50054 * if fmt.p: # <<<<<<<<<<<<<<
50055 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
50056 *
50057 */
50058 __pyx_t_6 = (__pyx_cur_scope->__pyx_v_fmt->p != 0);
50059 if (__pyx_t_6) {
50060
50061 /* "pysam/libcbcf.pyx":2474
50062 * fmt = &r.d.fmt[i]
50063 * if fmt.p:
50064 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)) # <<<<<<<<<<<<<<
50065 *
50066 * def get(self, key, default=None):
50067 */
50068 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(bcf_hdr_int2id(__pyx_cur_scope->__pyx_v_hdr, BCF_DT_ID, __pyx_cur_scope->__pyx_v_fmt->id)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2474, __pyx_L1_error)
50069 __Pyx_GOTREF(__pyx_t_7);
50070 __pyx_r = __pyx_t_7;
50071 __pyx_t_7 = 0;
50072 __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
50073 __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
50074 __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
50075 __Pyx_XGIVEREF(__pyx_r);
50076 __Pyx_TraceReturn(__pyx_r, 0);
50077 __Pyx_RefNannyFinishContext();
50078 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
50079 /* return from generator, yielding value */
50080 __pyx_generator->resume_label = 1;
50081 return __pyx_r;
50082 __pyx_L7_resume_from_yield:;
50083 __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
50084 __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
50085 __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
50086 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2474, __pyx_L1_error)
50087
50088 /* "pysam/libcbcf.pyx":2473
50089 * for i in range(r.n_fmt):
50090 * fmt = &r.d.fmt[i]
50091 * if fmt.p: # <<<<<<<<<<<<<<
50092 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
50093 *
50094 */
50095 }
50096 }
50097 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
50098
50099 /* "pysam/libcbcf.pyx":2465
50100 * raise ValueError('Unable to delete FORMAT')
50101 *
50102 * def __iter__(self): # <<<<<<<<<<<<<<
50103 * cdef bcf_hdr_t *hdr = self.record.header.ptr
50104 * cdef bcf1_t *r = self.record.ptr
50105 */
50106
50107 /* function exit code */
50108 PyErr_SetNone(PyExc_StopIteration);
50109 goto __pyx_L0;
50110 __pyx_L1_error:;
50111 __Pyx_Generator_Replace_StopIteration(0);
50112 __Pyx_XDECREF(__pyx_t_7);
50113 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50114 __pyx_L0:;
50115 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
50116 #if !CYTHON_USE_EXC_INFO_STACK
50117 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
50118 #endif
50119 __pyx_generator->resume_label = -1;
50120 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
50121 __Pyx_TraceReturn(__pyx_r, 0);
50122 __Pyx_RefNannyFinishContext();
50123 return __pyx_r;
50124 }
50125
50126 /* "pysam/libcbcf.pyx":2476
50127 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
50128 *
50129 * def get(self, key, default=None): # <<<<<<<<<<<<<<
50130 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
50131 * try:
50132 */
50133
50134 /* Python wrapper */
50135 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_16get(PyObject *__pyx_v_self,
50136 #if CYTHON_METH_FASTCALL
50137 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
50138 #else
50139 PyObject *__pyx_args, PyObject *__pyx_kwds
50140 #endif
50141 ); /*proto*/
50142 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_15get, "VariantRecordFormat.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
50143 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_16get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_16get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_15get};
50144 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_16get(PyObject *__pyx_v_self,
50145 #if CYTHON_METH_FASTCALL
50146 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
50147 #else
50148 PyObject *__pyx_args, PyObject *__pyx_kwds
50149 #endif
50150 ) {
50151 PyObject *__pyx_v_key = 0;
50152 PyObject *__pyx_v_default = 0;
50153 #if !CYTHON_METH_FASTCALL
50154 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
50155 #endif
50156 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
50157 PyObject* values[2] = {0,0};
50158 int __pyx_lineno = 0;
50159 const char *__pyx_filename = NULL;
50160 int __pyx_clineno = 0;
50161 PyObject *__pyx_r = 0;
50162 __Pyx_RefNannyDeclarations
50163 __Pyx_RefNannySetupContext("get (wrapper)", 0);
50164 #if !CYTHON_METH_FASTCALL
50165 #if CYTHON_ASSUME_SAFE_MACROS
50166 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
50167 #else
50168 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
50169 #endif
50170 #endif
50171 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
50172 {
50173 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
50174 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
50175 if (__pyx_kwds) {
50176 Py_ssize_t kw_args;
50177 switch (__pyx_nargs) {
50178 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
50179 CYTHON_FALLTHROUGH;
50180 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
50181 CYTHON_FALLTHROUGH;
50182 case 0: break;
50183 default: goto __pyx_L5_argtuple_error;
50184 }
50185 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
50186 switch (__pyx_nargs) {
50187 case 0:
50188 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
50189 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
50190 kw_args--;
50191 }
50192 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2476, __pyx_L3_error)
50193 else goto __pyx_L5_argtuple_error;
50194 CYTHON_FALLTHROUGH;
50195 case 1:
50196 if (kw_args > 0) {
50197 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
50198 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
50199 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2476, __pyx_L3_error)
50200 }
50201 }
50202 if (unlikely(kw_args > 0)) {
50203 const Py_ssize_t kwd_pos_args = __pyx_nargs;
50204 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 2476, __pyx_L3_error)
50205 }
50206 } else {
50207 switch (__pyx_nargs) {
50208 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
50209 CYTHON_FALLTHROUGH;
50210 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
50211 break;
50212 default: goto __pyx_L5_argtuple_error;
50213 }
50214 }
50215 __pyx_v_key = values[0];
50216 __pyx_v_default = values[1];
50217 }
50218 goto __pyx_L6_skip;
50219 __pyx_L5_argtuple_error:;
50220 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2476, __pyx_L3_error)
50221 __pyx_L6_skip:;
50222 goto __pyx_L4_argument_unpacking_done;
50223 __pyx_L3_error:;
50224 {
50225 Py_ssize_t __pyx_temp;
50226 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
50227 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
50228 }
50229 }
50230 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
50231 __Pyx_RefNannyFinishContext();
50232 return NULL;
50233 __pyx_L4_argument_unpacking_done:;
50234 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_15get(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
50235
50236 /* function exit code */
50237 {
50238 Py_ssize_t __pyx_temp;
50239 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
50240 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
50241 }
50242 }
50243 __Pyx_RefNannyFinishContext();
50244 return __pyx_r;
50245 }
50246
50247 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_15get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
50248 PyObject *__pyx_r = NULL;
50249 __Pyx_TraceDeclarations
50250 __Pyx_RefNannyDeclarations
50251 PyObject *__pyx_t_1 = NULL;
50252 PyObject *__pyx_t_2 = NULL;
50253 PyObject *__pyx_t_3 = NULL;
50254 PyObject *__pyx_t_4 = NULL;
50255 int __pyx_t_5;
50256 PyObject *__pyx_t_6 = NULL;
50257 PyObject *__pyx_t_7 = NULL;
50258 int __pyx_lineno = 0;
50259 const char *__pyx_filename = NULL;
50260 int __pyx_clineno = 0;
50261 __Pyx_TraceFrameInit(__pyx_codeobj__126)
50262 __Pyx_RefNannySetupContext("get", 1);
50263 __Pyx_TraceCall("get", __pyx_f[0], 2476, 0, __PYX_ERR(0, 2476, __pyx_L1_error));
50264
50265 /* "pysam/libcbcf.pyx":2478
50266 * def get(self, key, default=None):
50267 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
50268 * try: # <<<<<<<<<<<<<<
50269 * return self[key]
50270 * except KeyError:
50271 */
50272 {
50273 __Pyx_PyThreadState_declare
50274 __Pyx_PyThreadState_assign
50275 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
50276 __Pyx_XGOTREF(__pyx_t_1);
50277 __Pyx_XGOTREF(__pyx_t_2);
50278 __Pyx_XGOTREF(__pyx_t_3);
50279 /*try:*/ {
50280
50281 /* "pysam/libcbcf.pyx":2479
50282 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
50283 * try:
50284 * return self[key] # <<<<<<<<<<<<<<
50285 * except KeyError:
50286 * return default
50287 */
50288 __Pyx_XDECREF(__pyx_r);
50289 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2479, __pyx_L3_error)
50290 __Pyx_GOTREF(__pyx_t_4);
50291 __pyx_r = __pyx_t_4;
50292 __pyx_t_4 = 0;
50293 goto __pyx_L7_try_return;
50294
50295 /* "pysam/libcbcf.pyx":2478
50296 * def get(self, key, default=None):
50297 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
50298 * try: # <<<<<<<<<<<<<<
50299 * return self[key]
50300 * except KeyError:
50301 */
50302 }
50303 __pyx_L3_error:;
50304 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
50305
50306 /* "pysam/libcbcf.pyx":2480
50307 * try:
50308 * return self[key]
50309 * except KeyError: # <<<<<<<<<<<<<<
50310 * return default
50311 *
50312 */
50313 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
50314 if (__pyx_t_5) {
50315 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
50316 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 2480, __pyx_L5_except_error)
50317 __Pyx_XGOTREF(__pyx_t_4);
50318 __Pyx_XGOTREF(__pyx_t_6);
50319 __Pyx_XGOTREF(__pyx_t_7);
50320
50321 /* "pysam/libcbcf.pyx":2481
50322 * return self[key]
50323 * except KeyError:
50324 * return default # <<<<<<<<<<<<<<
50325 *
50326 * def __contains__(self, key):
50327 */
50328 __Pyx_XDECREF(__pyx_r);
50329 __Pyx_INCREF(__pyx_v_default);
50330 __pyx_r = __pyx_v_default;
50331 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
50332 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
50333 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
50334 goto __pyx_L6_except_return;
50335 }
50336 goto __pyx_L5_except_error;
50337
50338 /* "pysam/libcbcf.pyx":2478
50339 * def get(self, key, default=None):
50340 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
50341 * try: # <<<<<<<<<<<<<<
50342 * return self[key]
50343 * except KeyError:
50344 */
50345 __pyx_L5_except_error:;
50346 __Pyx_XGIVEREF(__pyx_t_1);
50347 __Pyx_XGIVEREF(__pyx_t_2);
50348 __Pyx_XGIVEREF(__pyx_t_3);
50349 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
50350 goto __pyx_L1_error;
50351 __pyx_L7_try_return:;
50352 __Pyx_XGIVEREF(__pyx_t_1);
50353 __Pyx_XGIVEREF(__pyx_t_2);
50354 __Pyx_XGIVEREF(__pyx_t_3);
50355 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
50356 goto __pyx_L0;
50357 __pyx_L6_except_return:;
50358 __Pyx_XGIVEREF(__pyx_t_1);
50359 __Pyx_XGIVEREF(__pyx_t_2);
50360 __Pyx_XGIVEREF(__pyx_t_3);
50361 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
50362 goto __pyx_L0;
50363 }
50364
50365 /* "pysam/libcbcf.pyx":2476
50366 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
50367 *
50368 * def get(self, key, default=None): # <<<<<<<<<<<<<<
50369 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
50370 * try:
50371 */
50372
50373 /* function exit code */
50374 __pyx_L1_error:;
50375 __Pyx_XDECREF(__pyx_t_4);
50376 __Pyx_XDECREF(__pyx_t_6);
50377 __Pyx_XDECREF(__pyx_t_7);
50378 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
50379 __pyx_r = NULL;
50380 __pyx_L0:;
50381 __Pyx_XGIVEREF(__pyx_r);
50382 __Pyx_TraceReturn(__pyx_r, 0);
50383 __Pyx_RefNannyFinishContext();
50384 return __pyx_r;
50385 }
50386
50387 /* "pysam/libcbcf.pyx":2483
50388 * return default
50389 *
50390 * def __contains__(self, key): # <<<<<<<<<<<<<<
50391 * cdef bcf_hdr_t *hdr = self.record.header.ptr
50392 * cdef bcf1_t *r = self.record.ptr
50393 */
50394
50395 /* Python wrapper */
50396 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_18__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
50397 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_18__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
50398 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
50399 int __pyx_r;
50400 __Pyx_RefNannyDeclarations
50401 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
50402 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
50403 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_17__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self), ((PyObject *)__pyx_v_key));
50404
50405 /* function exit code */
50406 __Pyx_RefNannyFinishContext();
50407 return __pyx_r;
50408 }
50409
50410 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_17__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v_key) {
50411 bcf_hdr_t *__pyx_v_hdr;
50412 bcf1_t *__pyx_v_r;
50413 PyObject *__pyx_v_bkey = 0;
50414 bcf_fmt_t *__pyx_v_fmt;
50415 int __pyx_r;
50416 __Pyx_TraceDeclarations
50417 __Pyx_RefNannyDeclarations
50418 bcf_hdr_t *__pyx_t_1;
50419 bcf1_t *__pyx_t_2;
50420 PyObject *__pyx_t_3 = NULL;
50421 char const *__pyx_t_4;
50422 int __pyx_t_5;
50423 int __pyx_t_6;
50424 int __pyx_lineno = 0;
50425 const char *__pyx_filename = NULL;
50426 int __pyx_clineno = 0;
50427 __Pyx_RefNannySetupContext("__contains__", 1);
50428 __Pyx_TraceCall("__contains__", __pyx_f[0], 2483, 0, __PYX_ERR(0, 2483, __pyx_L1_error));
50429
50430 /* "pysam/libcbcf.pyx":2484
50431 *
50432 * def __contains__(self, key):
50433 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
50434 * cdef bcf1_t *r = self.record.ptr
50435 * cdef bytes bkey = force_bytes(key)
50436 */
50437 __pyx_t_1 = __pyx_v_self->record->header->ptr;
50438 __pyx_v_hdr = __pyx_t_1;
50439
50440 /* "pysam/libcbcf.pyx":2485
50441 * def __contains__(self, key):
50442 * cdef bcf_hdr_t *hdr = self.record.header.ptr
50443 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
50444 * cdef bytes bkey = force_bytes(key)
50445 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
50446 */
50447 __pyx_t_2 = __pyx_v_self->record->ptr;
50448 __pyx_v_r = __pyx_t_2;
50449
50450 /* "pysam/libcbcf.pyx":2486
50451 * cdef bcf_hdr_t *hdr = self.record.header.ptr
50452 * cdef bcf1_t *r = self.record.ptr
50453 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
50454 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
50455 * return fmt != NULL and fmt.p != NULL
50456 */
50457 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2486, __pyx_L1_error)
50458 __Pyx_GOTREF(__pyx_t_3);
50459 __pyx_v_bkey = ((PyObject*)__pyx_t_3);
50460 __pyx_t_3 = 0;
50461
50462 /* "pysam/libcbcf.pyx":2487
50463 * cdef bcf1_t *r = self.record.ptr
50464 * cdef bytes bkey = force_bytes(key)
50465 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey) # <<<<<<<<<<<<<<
50466 * return fmt != NULL and fmt.p != NULL
50467 *
50468 */
50469 if (unlikely(__pyx_v_bkey == Py_None)) {
50470 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
50471 __PYX_ERR(0, 2487, __pyx_L1_error)
50472 }
50473 __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2487, __pyx_L1_error)
50474 __pyx_v_fmt = bcf_get_fmt(__pyx_v_hdr, __pyx_v_r, __pyx_t_4);
50475
50476 /* "pysam/libcbcf.pyx":2488
50477 * cdef bytes bkey = force_bytes(key)
50478 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
50479 * return fmt != NULL and fmt.p != NULL # <<<<<<<<<<<<<<
50480 *
50481 * def iterkeys(self):
50482 */
50483 __pyx_t_6 = (__pyx_v_fmt != NULL);
50484 if (__pyx_t_6) {
50485 } else {
50486 __pyx_t_5 = __pyx_t_6;
50487 goto __pyx_L3_bool_binop_done;
50488 }
50489 __pyx_t_6 = (__pyx_v_fmt->p != NULL);
50490 __pyx_t_5 = __pyx_t_6;
50491 __pyx_L3_bool_binop_done:;
50492 __pyx_r = __pyx_t_5;
50493 goto __pyx_L0;
50494
50495 /* "pysam/libcbcf.pyx":2483
50496 * return default
50497 *
50498 * def __contains__(self, key): # <<<<<<<<<<<<<<
50499 * cdef bcf_hdr_t *hdr = self.record.header.ptr
50500 * cdef bcf1_t *r = self.record.ptr
50501 */
50502
50503 /* function exit code */
50504 __pyx_L1_error:;
50505 __Pyx_XDECREF(__pyx_t_3);
50506 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50507 __pyx_r = -1;
50508 __pyx_L0:;
50509 __Pyx_XDECREF(__pyx_v_bkey);
50510 __Pyx_TraceReturn(Py_None, 0);
50511 __Pyx_RefNannyFinishContext();
50512 return __pyx_r;
50513 }
50514
50515 /* "pysam/libcbcf.pyx":2490
50516 * return fmt != NULL and fmt.p != NULL
50517 *
50518 * def iterkeys(self): # <<<<<<<<<<<<<<
50519 * """D.iterkeys() -> an iterator over the keys of D"""
50520 * return iter(self)
50521 */
50522
50523 /* Python wrapper */
50524 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_20iterkeys(PyObject *__pyx_v_self,
50525 #if CYTHON_METH_FASTCALL
50526 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
50527 #else
50528 PyObject *__pyx_args, PyObject *__pyx_kwds
50529 #endif
50530 ); /*proto*/
50531 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_19iterkeys, "VariantRecordFormat.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
50532 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_20iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_20iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_19iterkeys};
50533 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_20iterkeys(PyObject *__pyx_v_self,
50534 #if CYTHON_METH_FASTCALL
50535 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
50536 #else
50537 PyObject *__pyx_args, PyObject *__pyx_kwds
50538 #endif
50539 ) {
50540 #if !CYTHON_METH_FASTCALL
50541 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
50542 #endif
50543 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
50544 PyObject *__pyx_r = 0;
50545 __Pyx_RefNannyDeclarations
50546 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
50547 #if !CYTHON_METH_FASTCALL
50548 #if CYTHON_ASSUME_SAFE_MACROS
50549 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
50550 #else
50551 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
50552 #endif
50553 #endif
50554 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
50555 if (unlikely(__pyx_nargs > 0)) {
50556 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
50557 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
50558 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_19iterkeys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
50559
50560 /* function exit code */
50561 __Pyx_RefNannyFinishContext();
50562 return __pyx_r;
50563 }
50564
50565 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_19iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
50566 PyObject *__pyx_r = NULL;
50567 __Pyx_TraceDeclarations
50568 __Pyx_RefNannyDeclarations
50569 PyObject *__pyx_t_1 = NULL;
50570 int __pyx_lineno = 0;
50571 const char *__pyx_filename = NULL;
50572 int __pyx_clineno = 0;
50573 __Pyx_TraceFrameInit(__pyx_codeobj__127)
50574 __Pyx_RefNannySetupContext("iterkeys", 1);
50575 __Pyx_TraceCall("iterkeys", __pyx_f[0], 2490, 0, __PYX_ERR(0, 2490, __pyx_L1_error));
50576
50577 /* "pysam/libcbcf.pyx":2492
50578 * def iterkeys(self):
50579 * """D.iterkeys() -> an iterator over the keys of D"""
50580 * return iter(self) # <<<<<<<<<<<<<<
50581 *
50582 * def itervalues(self):
50583 */
50584 __Pyx_XDECREF(__pyx_r);
50585 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2492, __pyx_L1_error)
50586 __Pyx_GOTREF(__pyx_t_1);
50587 __pyx_r = __pyx_t_1;
50588 __pyx_t_1 = 0;
50589 goto __pyx_L0;
50590
50591 /* "pysam/libcbcf.pyx":2490
50592 * return fmt != NULL and fmt.p != NULL
50593 *
50594 * def iterkeys(self): # <<<<<<<<<<<<<<
50595 * """D.iterkeys() -> an iterator over the keys of D"""
50596 * return iter(self)
50597 */
50598
50599 /* function exit code */
50600 __pyx_L1_error:;
50601 __Pyx_XDECREF(__pyx_t_1);
50602 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
50603 __pyx_r = NULL;
50604 __pyx_L0:;
50605 __Pyx_XGIVEREF(__pyx_r);
50606 __Pyx_TraceReturn(__pyx_r, 0);
50607 __Pyx_RefNannyFinishContext();
50608 return __pyx_r;
50609 }
50610 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_23generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
50611
50612 /* "pysam/libcbcf.pyx":2494
50613 * return iter(self)
50614 *
50615 * def itervalues(self): # <<<<<<<<<<<<<<
50616 * """D.itervalues() -> an iterator over the values of D"""
50617 * for key in self:
50618 */
50619
50620 /* Python wrapper */
50621 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_22itervalues(PyObject *__pyx_v_self,
50622 #if CYTHON_METH_FASTCALL
50623 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
50624 #else
50625 PyObject *__pyx_args, PyObject *__pyx_kwds
50626 #endif
50627 ); /*proto*/
50628 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_21itervalues, "VariantRecordFormat.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
50629 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_22itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_22itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_21itervalues};
50630 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_22itervalues(PyObject *__pyx_v_self,
50631 #if CYTHON_METH_FASTCALL
50632 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
50633 #else
50634 PyObject *__pyx_args, PyObject *__pyx_kwds
50635 #endif
50636 ) {
50637 #if !CYTHON_METH_FASTCALL
50638 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
50639 #endif
50640 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
50641 PyObject *__pyx_r = 0;
50642 __Pyx_RefNannyDeclarations
50643 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
50644 #if !CYTHON_METH_FASTCALL
50645 #if CYTHON_ASSUME_SAFE_MACROS
50646 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
50647 #else
50648 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
50649 #endif
50650 #endif
50651 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
50652 if (unlikely(__pyx_nargs > 0)) {
50653 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
50654 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
50655 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_21itervalues(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
50656
50657 /* function exit code */
50658 __Pyx_RefNannyFinishContext();
50659 return __pyx_r;
50660 }
50661
50662 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_21itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
50663 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *__pyx_cur_scope;
50664 PyObject *__pyx_r = NULL;
50665 __Pyx_RefNannyDeclarations
50666 int __pyx_lineno = 0;
50667 const char *__pyx_filename = NULL;
50668 int __pyx_clineno = 0;
50669 __Pyx_RefNannySetupContext("itervalues", 0);
50670 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_22_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues, __pyx_empty_tuple, NULL);
50671 if (unlikely(!__pyx_cur_scope)) {
50672 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *)Py_None);
50673 __Pyx_INCREF(Py_None);
50674 __PYX_ERR(0, 2494, __pyx_L1_error)
50675 } else {
50676 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
50677 }
50678 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
50679 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
50680 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
50681 {
50682 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_23generator15, __pyx_codeobj__128, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_VariantRecordFormat_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2494, __pyx_L1_error)
50683 __Pyx_DECREF(__pyx_cur_scope);
50684 __Pyx_RefNannyFinishContext();
50685 return (PyObject *) gen;
50686 }
50687
50688 /* function exit code */
50689 __pyx_L1_error:;
50690 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
50691 __pyx_r = NULL;
50692 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
50693 __Pyx_XGIVEREF(__pyx_r);
50694 __Pyx_RefNannyFinishContext();
50695 return __pyx_r;
50696 }
50697
50698 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_23generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
50699 {
50700 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *)__pyx_generator->closure);
50701 PyObject *__pyx_r = NULL;
50702 __Pyx_TraceDeclarations
50703 PyObject *__pyx_t_1 = NULL;
50704 Py_ssize_t __pyx_t_2;
50705 PyObject *(*__pyx_t_3)(PyObject *);
50706 PyObject *__pyx_t_4 = NULL;
50707 int __pyx_lineno = 0;
50708 const char *__pyx_filename = NULL;
50709 int __pyx_clineno = 0;
50710 __Pyx_RefNannyDeclarations
50711 __Pyx_RefNannySetupContext("itervalues", 0);
50712 __Pyx_TraceFrameInit(__pyx_codeobj__128)
50713 __Pyx_TraceCall("itervalues", __pyx_f[0], 2494, 0, __PYX_ERR(0, 2494, __pyx_L1_error));
50714 switch (__pyx_generator->resume_label) {
50715 case 0: goto __pyx_L3_first_run;
50716 case 1: goto __pyx_L6_resume_from_yield;
50717 default: /* CPython raises the right error here */
50718 __Pyx_TraceReturn(Py_None, 0);
50719 __Pyx_RefNannyFinishContext();
50720 return NULL;
50721 }
50722 __pyx_L3_first_run:;
50723 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2494, __pyx_L1_error)
50724
50725 /* "pysam/libcbcf.pyx":2496
50726 * def itervalues(self):
50727 * """D.itervalues() -> an iterator over the values of D"""
50728 * for key in self: # <<<<<<<<<<<<<<
50729 * yield self[key]
50730 *
50731 */
50732 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
50733 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
50734 __pyx_t_2 = 0;
50735 __pyx_t_3 = NULL;
50736 } else {
50737 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2496, __pyx_L1_error)
50738 __Pyx_GOTREF(__pyx_t_1);
50739 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2496, __pyx_L1_error)
50740 }
50741 for (;;) {
50742 if (likely(!__pyx_t_3)) {
50743 if (likely(PyList_CheckExact(__pyx_t_1))) {
50744 {
50745 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
50746 #if !CYTHON_ASSUME_SAFE_MACROS
50747 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2496, __pyx_L1_error)
50748 #endif
50749 if (__pyx_t_2 >= __pyx_temp) break;
50750 }
50751 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
50752 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2496, __pyx_L1_error)
50753 #else
50754 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error)
50755 __Pyx_GOTREF(__pyx_t_4);
50756 #endif
50757 } else {
50758 {
50759 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
50760 #if !CYTHON_ASSUME_SAFE_MACROS
50761 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2496, __pyx_L1_error)
50762 #endif
50763 if (__pyx_t_2 >= __pyx_temp) break;
50764 }
50765 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
50766 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2496, __pyx_L1_error)
50767 #else
50768 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error)
50769 __Pyx_GOTREF(__pyx_t_4);
50770 #endif
50771 }
50772 } else {
50773 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
50774 if (unlikely(!__pyx_t_4)) {
50775 PyObject* exc_type = PyErr_Occurred();
50776 if (exc_type) {
50777 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
50778 else __PYX_ERR(0, 2496, __pyx_L1_error)
50779 }
50780 break;
50781 }
50782 __Pyx_GOTREF(__pyx_t_4);
50783 }
50784 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
50785 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
50786 __Pyx_GIVEREF(__pyx_t_4);
50787 __pyx_t_4 = 0;
50788
50789 /* "pysam/libcbcf.pyx":2497
50790 * """D.itervalues() -> an iterator over the values of D"""
50791 * for key in self:
50792 * yield self[key] # <<<<<<<<<<<<<<
50793 *
50794 * def iteritems(self):
50795 */
50796 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2497, __pyx_L1_error)
50797 __Pyx_GOTREF(__pyx_t_4);
50798 __pyx_r = __pyx_t_4;
50799 __pyx_t_4 = 0;
50800 __Pyx_XGIVEREF(__pyx_t_1);
50801 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
50802 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
50803 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
50804 __Pyx_XGIVEREF(__pyx_r);
50805 __Pyx_TraceReturn(__pyx_r, 0);
50806 __Pyx_RefNannyFinishContext();
50807 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
50808 /* return from generator, yielding value */
50809 __pyx_generator->resume_label = 1;
50810 return __pyx_r;
50811 __pyx_L6_resume_from_yield:;
50812 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
50813 __pyx_cur_scope->__pyx_t_0 = 0;
50814 __Pyx_XGOTREF(__pyx_t_1);
50815 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
50816 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
50817 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2497, __pyx_L1_error)
50818
50819 /* "pysam/libcbcf.pyx":2496
50820 * def itervalues(self):
50821 * """D.itervalues() -> an iterator over the values of D"""
50822 * for key in self: # <<<<<<<<<<<<<<
50823 * yield self[key]
50824 *
50825 */
50826 }
50827 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50828 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
50829
50830 /* "pysam/libcbcf.pyx":2494
50831 * return iter(self)
50832 *
50833 * def itervalues(self): # <<<<<<<<<<<<<<
50834 * """D.itervalues() -> an iterator over the values of D"""
50835 * for key in self:
50836 */
50837
50838 /* function exit code */
50839 PyErr_SetNone(PyExc_StopIteration);
50840 goto __pyx_L0;
50841 __pyx_L1_error:;
50842 __Pyx_Generator_Replace_StopIteration(0);
50843 __Pyx_XDECREF(__pyx_t_1);
50844 __Pyx_XDECREF(__pyx_t_4);
50845 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
50846 __pyx_L0:;
50847 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
50848 #if !CYTHON_USE_EXC_INFO_STACK
50849 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
50850 #endif
50851 __pyx_generator->resume_label = -1;
50852 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
50853 __Pyx_TraceReturn(__pyx_r, 0);
50854 __Pyx_RefNannyFinishContext();
50855 return __pyx_r;
50856 }
50857 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_26generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
50858
50859 /* "pysam/libcbcf.pyx":2499
50860 * yield self[key]
50861 *
50862 * def iteritems(self): # <<<<<<<<<<<<<<
50863 * """D.iteritems() -> an iterator over the (key, value) items of D"""
50864 * for key in self:
50865 */
50866
50867 /* Python wrapper */
50868 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_25iteritems(PyObject *__pyx_v_self,
50869 #if CYTHON_METH_FASTCALL
50870 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
50871 #else
50872 PyObject *__pyx_args, PyObject *__pyx_kwds
50873 #endif
50874 ); /*proto*/
50875 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_24iteritems, "VariantRecordFormat.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
50876 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_25iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_25iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_24iteritems};
50877 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_25iteritems(PyObject *__pyx_v_self,
50878 #if CYTHON_METH_FASTCALL
50879 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
50880 #else
50881 PyObject *__pyx_args, PyObject *__pyx_kwds
50882 #endif
50883 ) {
50884 #if !CYTHON_METH_FASTCALL
50885 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
50886 #endif
50887 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
50888 PyObject *__pyx_r = 0;
50889 __Pyx_RefNannyDeclarations
50890 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
50891 #if !CYTHON_METH_FASTCALL
50892 #if CYTHON_ASSUME_SAFE_MACROS
50893 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
50894 #else
50895 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
50896 #endif
50897 #endif
50898 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
50899 if (unlikely(__pyx_nargs > 0)) {
50900 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
50901 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
50902 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_24iteritems(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
50903
50904 /* function exit code */
50905 __Pyx_RefNannyFinishContext();
50906 return __pyx_r;
50907 }
50908
50909 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_24iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
50910 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *__pyx_cur_scope;
50911 PyObject *__pyx_r = NULL;
50912 __Pyx_RefNannyDeclarations
50913 int __pyx_lineno = 0;
50914 const char *__pyx_filename = NULL;
50915 int __pyx_clineno = 0;
50916 __Pyx_RefNannySetupContext("iteritems", 0);
50917 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_23_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems, __pyx_empty_tuple, NULL);
50918 if (unlikely(!__pyx_cur_scope)) {
50919 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *)Py_None);
50920 __Pyx_INCREF(Py_None);
50921 __PYX_ERR(0, 2499, __pyx_L1_error)
50922 } else {
50923 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
50924 }
50925 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
50926 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
50927 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
50928 {
50929 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_26generator16, __pyx_codeobj__129, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_VariantRecordFormat_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2499, __pyx_L1_error)
50930 __Pyx_DECREF(__pyx_cur_scope);
50931 __Pyx_RefNannyFinishContext();
50932 return (PyObject *) gen;
50933 }
50934
50935 /* function exit code */
50936 __pyx_L1_error:;
50937 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
50938 __pyx_r = NULL;
50939 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
50940 __Pyx_XGIVEREF(__pyx_r);
50941 __Pyx_RefNannyFinishContext();
50942 return __pyx_r;
50943 }
50944
50945 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordFormat_26generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
50946 {
50947 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *)__pyx_generator->closure);
50948 PyObject *__pyx_r = NULL;
50949 __Pyx_TraceDeclarations
50950 PyObject *__pyx_t_1 = NULL;
50951 Py_ssize_t __pyx_t_2;
50952 PyObject *(*__pyx_t_3)(PyObject *);
50953 PyObject *__pyx_t_4 = NULL;
50954 PyObject *__pyx_t_5 = NULL;
50955 int __pyx_lineno = 0;
50956 const char *__pyx_filename = NULL;
50957 int __pyx_clineno = 0;
50958 __Pyx_RefNannyDeclarations
50959 __Pyx_RefNannySetupContext("iteritems", 0);
50960 __Pyx_TraceFrameInit(__pyx_codeobj__129)
50961 __Pyx_TraceCall("iteritems", __pyx_f[0], 2499, 0, __PYX_ERR(0, 2499, __pyx_L1_error));
50962 switch (__pyx_generator->resume_label) {
50963 case 0: goto __pyx_L3_first_run;
50964 case 1: goto __pyx_L6_resume_from_yield;
50965 default: /* CPython raises the right error here */
50966 __Pyx_TraceReturn(Py_None, 0);
50967 __Pyx_RefNannyFinishContext();
50968 return NULL;
50969 }
50970 __pyx_L3_first_run:;
50971 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2499, __pyx_L1_error)
50972
50973 /* "pysam/libcbcf.pyx":2501
50974 * def iteritems(self):
50975 * """D.iteritems() -> an iterator over the (key, value) items of D"""
50976 * for key in self: # <<<<<<<<<<<<<<
50977 * yield (key, self[key])
50978 *
50979 */
50980 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
50981 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
50982 __pyx_t_2 = 0;
50983 __pyx_t_3 = NULL;
50984 } else {
50985 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2501, __pyx_L1_error)
50986 __Pyx_GOTREF(__pyx_t_1);
50987 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2501, __pyx_L1_error)
50988 }
50989 for (;;) {
50990 if (likely(!__pyx_t_3)) {
50991 if (likely(PyList_CheckExact(__pyx_t_1))) {
50992 {
50993 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
50994 #if !CYTHON_ASSUME_SAFE_MACROS
50995 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2501, __pyx_L1_error)
50996 #endif
50997 if (__pyx_t_2 >= __pyx_temp) break;
50998 }
50999 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
51000 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2501, __pyx_L1_error)
51001 #else
51002 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2501, __pyx_L1_error)
51003 __Pyx_GOTREF(__pyx_t_4);
51004 #endif
51005 } else {
51006 {
51007 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
51008 #if !CYTHON_ASSUME_SAFE_MACROS
51009 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2501, __pyx_L1_error)
51010 #endif
51011 if (__pyx_t_2 >= __pyx_temp) break;
51012 }
51013 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
51014 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2501, __pyx_L1_error)
51015 #else
51016 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2501, __pyx_L1_error)
51017 __Pyx_GOTREF(__pyx_t_4);
51018 #endif
51019 }
51020 } else {
51021 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
51022 if (unlikely(!__pyx_t_4)) {
51023 PyObject* exc_type = PyErr_Occurred();
51024 if (exc_type) {
51025 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
51026 else __PYX_ERR(0, 2501, __pyx_L1_error)
51027 }
51028 break;
51029 }
51030 __Pyx_GOTREF(__pyx_t_4);
51031 }
51032 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
51033 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
51034 __Pyx_GIVEREF(__pyx_t_4);
51035 __pyx_t_4 = 0;
51036
51037 /* "pysam/libcbcf.pyx":2502
51038 * """D.iteritems() -> an iterator over the (key, value) items of D"""
51039 * for key in self:
51040 * yield (key, self[key]) # <<<<<<<<<<<<<<
51041 *
51042 * def keys(self):
51043 */
51044 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2502, __pyx_L1_error)
51045 __Pyx_GOTREF(__pyx_t_4);
51046 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2502, __pyx_L1_error)
51047 __Pyx_GOTREF(__pyx_t_5);
51048 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
51049 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
51050 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_key)) __PYX_ERR(0, 2502, __pyx_L1_error);
51051 __Pyx_GIVEREF(__pyx_t_4);
51052 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 2502, __pyx_L1_error);
51053 __pyx_t_4 = 0;
51054 __pyx_r = __pyx_t_5;
51055 __pyx_t_5 = 0;
51056 __Pyx_XGIVEREF(__pyx_t_1);
51057 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
51058 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
51059 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
51060 __Pyx_XGIVEREF(__pyx_r);
51061 __Pyx_TraceReturn(__pyx_r, 0);
51062 __Pyx_RefNannyFinishContext();
51063 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
51064 /* return from generator, yielding value */
51065 __pyx_generator->resume_label = 1;
51066 return __pyx_r;
51067 __pyx_L6_resume_from_yield:;
51068 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
51069 __pyx_cur_scope->__pyx_t_0 = 0;
51070 __Pyx_XGOTREF(__pyx_t_1);
51071 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
51072 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
51073 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2502, __pyx_L1_error)
51074
51075 /* "pysam/libcbcf.pyx":2501
51076 * def iteritems(self):
51077 * """D.iteritems() -> an iterator over the (key, value) items of D"""
51078 * for key in self: # <<<<<<<<<<<<<<
51079 * yield (key, self[key])
51080 *
51081 */
51082 }
51083 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51084 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
51085
51086 /* "pysam/libcbcf.pyx":2499
51087 * yield self[key]
51088 *
51089 * def iteritems(self): # <<<<<<<<<<<<<<
51090 * """D.iteritems() -> an iterator over the (key, value) items of D"""
51091 * for key in self:
51092 */
51093
51094 /* function exit code */
51095 PyErr_SetNone(PyExc_StopIteration);
51096 goto __pyx_L0;
51097 __pyx_L1_error:;
51098 __Pyx_Generator_Replace_StopIteration(0);
51099 __Pyx_XDECREF(__pyx_t_1);
51100 __Pyx_XDECREF(__pyx_t_4);
51101 __Pyx_XDECREF(__pyx_t_5);
51102 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
51103 __pyx_L0:;
51104 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
51105 #if !CYTHON_USE_EXC_INFO_STACK
51106 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
51107 #endif
51108 __pyx_generator->resume_label = -1;
51109 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
51110 __Pyx_TraceReturn(__pyx_r, 0);
51111 __Pyx_RefNannyFinishContext();
51112 return __pyx_r;
51113 }
51114
51115 /* "pysam/libcbcf.pyx":2504
51116 * yield (key, self[key])
51117 *
51118 * def keys(self): # <<<<<<<<<<<<<<
51119 * """D.keys() -> list of D's keys"""
51120 * return list(self)
51121 */
51122
51123 /* Python wrapper */
51124 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_28keys(PyObject *__pyx_v_self,
51125 #if CYTHON_METH_FASTCALL
51126 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51127 #else
51128 PyObject *__pyx_args, PyObject *__pyx_kwds
51129 #endif
51130 ); /*proto*/
51131 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_27keys, "VariantRecordFormat.keys(self)\nD.keys() -> list of D's keys");
51132 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_28keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_28keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_27keys};
51133 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_28keys(PyObject *__pyx_v_self,
51134 #if CYTHON_METH_FASTCALL
51135 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51136 #else
51137 PyObject *__pyx_args, PyObject *__pyx_kwds
51138 #endif
51139 ) {
51140 #if !CYTHON_METH_FASTCALL
51141 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
51142 #endif
51143 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
51144 PyObject *__pyx_r = 0;
51145 __Pyx_RefNannyDeclarations
51146 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
51147 #if !CYTHON_METH_FASTCALL
51148 #if CYTHON_ASSUME_SAFE_MACROS
51149 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
51150 #else
51151 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
51152 #endif
51153 #endif
51154 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
51155 if (unlikely(__pyx_nargs > 0)) {
51156 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
51157 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
51158 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_27keys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
51159
51160 /* function exit code */
51161 __Pyx_RefNannyFinishContext();
51162 return __pyx_r;
51163 }
51164
51165 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_27keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
51166 PyObject *__pyx_r = NULL;
51167 __Pyx_TraceDeclarations
51168 __Pyx_RefNannyDeclarations
51169 PyObject *__pyx_t_1 = NULL;
51170 int __pyx_lineno = 0;
51171 const char *__pyx_filename = NULL;
51172 int __pyx_clineno = 0;
51173 __Pyx_TraceFrameInit(__pyx_codeobj__130)
51174 __Pyx_RefNannySetupContext("keys", 1);
51175 __Pyx_TraceCall("keys", __pyx_f[0], 2504, 0, __PYX_ERR(0, 2504, __pyx_L1_error));
51176
51177 /* "pysam/libcbcf.pyx":2506
51178 * def keys(self):
51179 * """D.keys() -> list of D's keys"""
51180 * return list(self) # <<<<<<<<<<<<<<
51181 *
51182 * def items(self):
51183 */
51184 __Pyx_XDECREF(__pyx_r);
51185 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2506, __pyx_L1_error)
51186 __Pyx_GOTREF(__pyx_t_1);
51187 __pyx_r = __pyx_t_1;
51188 __pyx_t_1 = 0;
51189 goto __pyx_L0;
51190
51191 /* "pysam/libcbcf.pyx":2504
51192 * yield (key, self[key])
51193 *
51194 * def keys(self): # <<<<<<<<<<<<<<
51195 * """D.keys() -> list of D's keys"""
51196 * return list(self)
51197 */
51198
51199 /* function exit code */
51200 __pyx_L1_error:;
51201 __Pyx_XDECREF(__pyx_t_1);
51202 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
51203 __pyx_r = NULL;
51204 __pyx_L0:;
51205 __Pyx_XGIVEREF(__pyx_r);
51206 __Pyx_TraceReturn(__pyx_r, 0);
51207 __Pyx_RefNannyFinishContext();
51208 return __pyx_r;
51209 }
51210
51211 /* "pysam/libcbcf.pyx":2508
51212 * return list(self)
51213 *
51214 * def items(self): # <<<<<<<<<<<<<<
51215 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
51216 * return list(self.iteritems())
51217 */
51218
51219 /* Python wrapper */
51220 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_30items(PyObject *__pyx_v_self,
51221 #if CYTHON_METH_FASTCALL
51222 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51223 #else
51224 PyObject *__pyx_args, PyObject *__pyx_kwds
51225 #endif
51226 ); /*proto*/
51227 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_29items, "VariantRecordFormat.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
51228 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_30items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_30items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_29items};
51229 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_30items(PyObject *__pyx_v_self,
51230 #if CYTHON_METH_FASTCALL
51231 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51232 #else
51233 PyObject *__pyx_args, PyObject *__pyx_kwds
51234 #endif
51235 ) {
51236 #if !CYTHON_METH_FASTCALL
51237 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
51238 #endif
51239 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
51240 PyObject *__pyx_r = 0;
51241 __Pyx_RefNannyDeclarations
51242 __Pyx_RefNannySetupContext("items (wrapper)", 0);
51243 #if !CYTHON_METH_FASTCALL
51244 #if CYTHON_ASSUME_SAFE_MACROS
51245 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
51246 #else
51247 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
51248 #endif
51249 #endif
51250 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
51251 if (unlikely(__pyx_nargs > 0)) {
51252 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
51253 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
51254 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_29items(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
51255
51256 /* function exit code */
51257 __Pyx_RefNannyFinishContext();
51258 return __pyx_r;
51259 }
51260
51261 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_29items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
51262 PyObject *__pyx_r = NULL;
51263 __Pyx_TraceDeclarations
51264 __Pyx_RefNannyDeclarations
51265 PyObject *__pyx_t_1 = NULL;
51266 PyObject *__pyx_t_2 = NULL;
51267 PyObject *__pyx_t_3 = NULL;
51268 unsigned int __pyx_t_4;
51269 int __pyx_lineno = 0;
51270 const char *__pyx_filename = NULL;
51271 int __pyx_clineno = 0;
51272 __Pyx_TraceFrameInit(__pyx_codeobj__131)
51273 __Pyx_RefNannySetupContext("items", 1);
51274 __Pyx_TraceCall("items", __pyx_f[0], 2508, 0, __PYX_ERR(0, 2508, __pyx_L1_error));
51275
51276 /* "pysam/libcbcf.pyx":2510
51277 * def items(self):
51278 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
51279 * return list(self.iteritems()) # <<<<<<<<<<<<<<
51280 *
51281 * def values(self):
51282 */
51283 __Pyx_XDECREF(__pyx_r);
51284 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2510, __pyx_L1_error)
51285 __Pyx_GOTREF(__pyx_t_2);
51286 __pyx_t_3 = NULL;
51287 __pyx_t_4 = 0;
51288 #if CYTHON_UNPACK_METHODS
51289 if (likely(PyMethod_Check(__pyx_t_2))) {
51290 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
51291 if (likely(__pyx_t_3)) {
51292 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
51293 __Pyx_INCREF(__pyx_t_3);
51294 __Pyx_INCREF(function);
51295 __Pyx_DECREF_SET(__pyx_t_2, function);
51296 __pyx_t_4 = 1;
51297 }
51298 }
51299 #endif
51300 {
51301 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
51302 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
51303 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51304 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2510, __pyx_L1_error)
51305 __Pyx_GOTREF(__pyx_t_1);
51306 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51307 }
51308 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2510, __pyx_L1_error)
51309 __Pyx_GOTREF(__pyx_t_2);
51310 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51311 __pyx_r = __pyx_t_2;
51312 __pyx_t_2 = 0;
51313 goto __pyx_L0;
51314
51315 /* "pysam/libcbcf.pyx":2508
51316 * return list(self)
51317 *
51318 * def items(self): # <<<<<<<<<<<<<<
51319 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
51320 * return list(self.iteritems())
51321 */
51322
51323 /* function exit code */
51324 __pyx_L1_error:;
51325 __Pyx_XDECREF(__pyx_t_1);
51326 __Pyx_XDECREF(__pyx_t_2);
51327 __Pyx_XDECREF(__pyx_t_3);
51328 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
51329 __pyx_r = NULL;
51330 __pyx_L0:;
51331 __Pyx_XGIVEREF(__pyx_r);
51332 __Pyx_TraceReturn(__pyx_r, 0);
51333 __Pyx_RefNannyFinishContext();
51334 return __pyx_r;
51335 }
51336
51337 /* "pysam/libcbcf.pyx":2512
51338 * return list(self.iteritems())
51339 *
51340 * def values(self): # <<<<<<<<<<<<<<
51341 * """D.values() -> list of D's values"""
51342 * return list(self.itervalues())
51343 */
51344
51345 /* Python wrapper */
51346 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_32values(PyObject *__pyx_v_self,
51347 #if CYTHON_METH_FASTCALL
51348 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51349 #else
51350 PyObject *__pyx_args, PyObject *__pyx_kwds
51351 #endif
51352 ); /*proto*/
51353 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_31values, "VariantRecordFormat.values(self)\nD.values() -> list of D's values");
51354 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_32values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_32values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_31values};
51355 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_32values(PyObject *__pyx_v_self,
51356 #if CYTHON_METH_FASTCALL
51357 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51358 #else
51359 PyObject *__pyx_args, PyObject *__pyx_kwds
51360 #endif
51361 ) {
51362 #if !CYTHON_METH_FASTCALL
51363 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
51364 #endif
51365 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
51366 PyObject *__pyx_r = 0;
51367 __Pyx_RefNannyDeclarations
51368 __Pyx_RefNannySetupContext("values (wrapper)", 0);
51369 #if !CYTHON_METH_FASTCALL
51370 #if CYTHON_ASSUME_SAFE_MACROS
51371 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
51372 #else
51373 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
51374 #endif
51375 #endif
51376 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
51377 if (unlikely(__pyx_nargs > 0)) {
51378 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
51379 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
51380 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_31values(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
51381
51382 /* function exit code */
51383 __Pyx_RefNannyFinishContext();
51384 return __pyx_r;
51385 }
51386
51387 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_31values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
51388 PyObject *__pyx_r = NULL;
51389 __Pyx_TraceDeclarations
51390 __Pyx_RefNannyDeclarations
51391 PyObject *__pyx_t_1 = NULL;
51392 PyObject *__pyx_t_2 = NULL;
51393 PyObject *__pyx_t_3 = NULL;
51394 unsigned int __pyx_t_4;
51395 int __pyx_lineno = 0;
51396 const char *__pyx_filename = NULL;
51397 int __pyx_clineno = 0;
51398 __Pyx_TraceFrameInit(__pyx_codeobj__132)
51399 __Pyx_RefNannySetupContext("values", 1);
51400 __Pyx_TraceCall("values", __pyx_f[0], 2512, 0, __PYX_ERR(0, 2512, __pyx_L1_error));
51401
51402 /* "pysam/libcbcf.pyx":2514
51403 * def values(self):
51404 * """D.values() -> list of D's values"""
51405 * return list(self.itervalues()) # <<<<<<<<<<<<<<
51406 *
51407 * # Mappings are not hashable by default, but subclasses can change this
51408 */
51409 __Pyx_XDECREF(__pyx_r);
51410 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2514, __pyx_L1_error)
51411 __Pyx_GOTREF(__pyx_t_2);
51412 __pyx_t_3 = NULL;
51413 __pyx_t_4 = 0;
51414 #if CYTHON_UNPACK_METHODS
51415 if (likely(PyMethod_Check(__pyx_t_2))) {
51416 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
51417 if (likely(__pyx_t_3)) {
51418 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
51419 __Pyx_INCREF(__pyx_t_3);
51420 __Pyx_INCREF(function);
51421 __Pyx_DECREF_SET(__pyx_t_2, function);
51422 __pyx_t_4 = 1;
51423 }
51424 }
51425 #endif
51426 {
51427 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
51428 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
51429 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51430 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2514, __pyx_L1_error)
51431 __Pyx_GOTREF(__pyx_t_1);
51432 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51433 }
51434 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2514, __pyx_L1_error)
51435 __Pyx_GOTREF(__pyx_t_2);
51436 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51437 __pyx_r = __pyx_t_2;
51438 __pyx_t_2 = 0;
51439 goto __pyx_L0;
51440
51441 /* "pysam/libcbcf.pyx":2512
51442 * return list(self.iteritems())
51443 *
51444 * def values(self): # <<<<<<<<<<<<<<
51445 * """D.values() -> list of D's values"""
51446 * return list(self.itervalues())
51447 */
51448
51449 /* function exit code */
51450 __pyx_L1_error:;
51451 __Pyx_XDECREF(__pyx_t_1);
51452 __Pyx_XDECREF(__pyx_t_2);
51453 __Pyx_XDECREF(__pyx_t_3);
51454 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
51455 __pyx_r = NULL;
51456 __pyx_L0:;
51457 __Pyx_XGIVEREF(__pyx_r);
51458 __Pyx_TraceReturn(__pyx_r, 0);
51459 __Pyx_RefNannyFinishContext();
51460 return __pyx_r;
51461 }
51462
51463 /* "(tree fragment)":1
51464 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
51465 * cdef tuple state
51466 * cdef object _dict
51467 */
51468
51469 /* Python wrapper */
51470 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_34__reduce_cython__(PyObject *__pyx_v_self,
51471 #if CYTHON_METH_FASTCALL
51472 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51473 #else
51474 PyObject *__pyx_args, PyObject *__pyx_kwds
51475 #endif
51476 ); /*proto*/
51477 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_33__reduce_cython__, "VariantRecordFormat.__reduce_cython__(self)");
51478 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_34__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_34__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_33__reduce_cython__};
51479 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_34__reduce_cython__(PyObject *__pyx_v_self,
51480 #if CYTHON_METH_FASTCALL
51481 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51482 #else
51483 PyObject *__pyx_args, PyObject *__pyx_kwds
51484 #endif
51485 ) {
51486 #if !CYTHON_METH_FASTCALL
51487 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
51488 #endif
51489 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
51490 PyObject *__pyx_r = 0;
51491 __Pyx_RefNannyDeclarations
51492 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
51493 #if !CYTHON_METH_FASTCALL
51494 #if CYTHON_ASSUME_SAFE_MACROS
51495 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
51496 #else
51497 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
51498 #endif
51499 #endif
51500 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
51501 if (unlikely(__pyx_nargs > 0)) {
51502 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
51503 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
51504 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_33__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self));
51505
51506 /* function exit code */
51507 __Pyx_RefNannyFinishContext();
51508 return __pyx_r;
51509 }
51510
51511 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_33__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self) {
51512 PyObject *__pyx_v_state = 0;
51513 PyObject *__pyx_v__dict = 0;
51514 int __pyx_v_use_setstate;
51515 PyObject *__pyx_r = NULL;
51516 __Pyx_TraceDeclarations
51517 __Pyx_RefNannyDeclarations
51518 PyObject *__pyx_t_1 = NULL;
51519 int __pyx_t_2;
51520 PyObject *__pyx_t_3 = NULL;
51521 PyObject *__pyx_t_4 = NULL;
51522 int __pyx_lineno = 0;
51523 const char *__pyx_filename = NULL;
51524 int __pyx_clineno = 0;
51525 __Pyx_TraceFrameInit(__pyx_codeobj__133)
51526 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
51527 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
51528
51529 /* "(tree fragment)":5
51530 * cdef object _dict
51531 * cdef bint use_setstate
51532 * state = (self.record,) # <<<<<<<<<<<<<<
51533 * _dict = getattr(self, '__dict__', None)
51534 * if _dict is not None:
51535 */
51536 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
51537 __Pyx_GOTREF(__pyx_t_1);
51538 __Pyx_INCREF((PyObject *)__pyx_v_self->record);
51539 __Pyx_GIVEREF((PyObject *)__pyx_v_self->record);
51540 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->record))) __PYX_ERR(4, 5, __pyx_L1_error);
51541 __pyx_v_state = ((PyObject*)__pyx_t_1);
51542 __pyx_t_1 = 0;
51543
51544 /* "(tree fragment)":6
51545 * cdef bint use_setstate
51546 * state = (self.record,)
51547 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
51548 * if _dict is not None:
51549 * state += (_dict,)
51550 */
51551 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
51552 __Pyx_GOTREF(__pyx_t_1);
51553 __pyx_v__dict = __pyx_t_1;
51554 __pyx_t_1 = 0;
51555
51556 /* "(tree fragment)":7
51557 * state = (self.record,)
51558 * _dict = getattr(self, '__dict__', None)
51559 * if _dict is not None: # <<<<<<<<<<<<<<
51560 * state += (_dict,)
51561 * use_setstate = True
51562 */
51563 __pyx_t_2 = (__pyx_v__dict != Py_None);
51564 if (__pyx_t_2) {
51565
51566 /* "(tree fragment)":8
51567 * _dict = getattr(self, '__dict__', None)
51568 * if _dict is not None:
51569 * state += (_dict,) # <<<<<<<<<<<<<<
51570 * use_setstate = True
51571 * else:
51572 */
51573 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
51574 __Pyx_GOTREF(__pyx_t_1);
51575 __Pyx_INCREF(__pyx_v__dict);
51576 __Pyx_GIVEREF(__pyx_v__dict);
51577 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
51578 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
51579 __Pyx_GOTREF(__pyx_t_3);
51580 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51581 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
51582 __pyx_t_3 = 0;
51583
51584 /* "(tree fragment)":9
51585 * if _dict is not None:
51586 * state += (_dict,)
51587 * use_setstate = True # <<<<<<<<<<<<<<
51588 * else:
51589 * use_setstate = self.record is not None
51590 */
51591 __pyx_v_use_setstate = 1;
51592
51593 /* "(tree fragment)":7
51594 * state = (self.record,)
51595 * _dict = getattr(self, '__dict__', None)
51596 * if _dict is not None: # <<<<<<<<<<<<<<
51597 * state += (_dict,)
51598 * use_setstate = True
51599 */
51600 goto __pyx_L3;
51601 }
51602
51603 /* "(tree fragment)":11
51604 * use_setstate = True
51605 * else:
51606 * use_setstate = self.record is not None # <<<<<<<<<<<<<<
51607 * if use_setstate:
51608 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, None), state
51609 */
51610 /*else*/ {
51611 __pyx_t_2 = (((PyObject *)__pyx_v_self->record) != Py_None);
51612 __pyx_v_use_setstate = __pyx_t_2;
51613 }
51614 __pyx_L3:;
51615
51616 /* "(tree fragment)":12
51617 * else:
51618 * use_setstate = self.record is not None
51619 * if use_setstate: # <<<<<<<<<<<<<<
51620 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, None), state
51621 * else:
51622 */
51623 if (__pyx_v_use_setstate) {
51624
51625 /* "(tree fragment)":13
51626 * use_setstate = self.record is not None
51627 * if use_setstate:
51628 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, None), state # <<<<<<<<<<<<<<
51629 * else:
51630 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, state)
51631 */
51632 __Pyx_XDECREF(__pyx_r);
51633 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_VariantRecordForm); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
51634 __Pyx_GOTREF(__pyx_t_3);
51635 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
51636 __Pyx_GOTREF(__pyx_t_1);
51637 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
51638 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
51639 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
51640 __Pyx_INCREF(__pyx_int_118286449);
51641 __Pyx_GIVEREF(__pyx_int_118286449);
51642 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_118286449)) __PYX_ERR(4, 13, __pyx_L1_error);
51643 __Pyx_INCREF(Py_None);
51644 __Pyx_GIVEREF(Py_None);
51645 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
51646 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
51647 __Pyx_GOTREF(__pyx_t_4);
51648 __Pyx_GIVEREF(__pyx_t_3);
51649 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
51650 __Pyx_GIVEREF(__pyx_t_1);
51651 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
51652 __Pyx_INCREF(__pyx_v_state);
51653 __Pyx_GIVEREF(__pyx_v_state);
51654 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
51655 __pyx_t_3 = 0;
51656 __pyx_t_1 = 0;
51657 __pyx_r = __pyx_t_4;
51658 __pyx_t_4 = 0;
51659 goto __pyx_L0;
51660
51661 /* "(tree fragment)":12
51662 * else:
51663 * use_setstate = self.record is not None
51664 * if use_setstate: # <<<<<<<<<<<<<<
51665 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, None), state
51666 * else:
51667 */
51668 }
51669
51670 /* "(tree fragment)":15
51671 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, None), state
51672 * else:
51673 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, state) # <<<<<<<<<<<<<<
51674 * def __setstate_cython__(self, __pyx_state):
51675 * __pyx_unpickle_VariantRecordFormat__set_state(self, __pyx_state)
51676 */
51677 /*else*/ {
51678 __Pyx_XDECREF(__pyx_r);
51679 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantRecordForm); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
51680 __Pyx_GOTREF(__pyx_t_4);
51681 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
51682 __Pyx_GOTREF(__pyx_t_1);
51683 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
51684 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
51685 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
51686 __Pyx_INCREF(__pyx_int_118286449);
51687 __Pyx_GIVEREF(__pyx_int_118286449);
51688 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_118286449)) __PYX_ERR(4, 15, __pyx_L1_error);
51689 __Pyx_INCREF(__pyx_v_state);
51690 __Pyx_GIVEREF(__pyx_v_state);
51691 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
51692 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
51693 __Pyx_GOTREF(__pyx_t_3);
51694 __Pyx_GIVEREF(__pyx_t_4);
51695 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
51696 __Pyx_GIVEREF(__pyx_t_1);
51697 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
51698 __pyx_t_4 = 0;
51699 __pyx_t_1 = 0;
51700 __pyx_r = __pyx_t_3;
51701 __pyx_t_3 = 0;
51702 goto __pyx_L0;
51703 }
51704
51705 /* "(tree fragment)":1
51706 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
51707 * cdef tuple state
51708 * cdef object _dict
51709 */
51710
51711 /* function exit code */
51712 __pyx_L1_error:;
51713 __Pyx_XDECREF(__pyx_t_1);
51714 __Pyx_XDECREF(__pyx_t_3);
51715 __Pyx_XDECREF(__pyx_t_4);
51716 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
51717 __pyx_r = NULL;
51718 __pyx_L0:;
51719 __Pyx_XDECREF(__pyx_v_state);
51720 __Pyx_XDECREF(__pyx_v__dict);
51721 __Pyx_XGIVEREF(__pyx_r);
51722 __Pyx_TraceReturn(__pyx_r, 0);
51723 __Pyx_RefNannyFinishContext();
51724 return __pyx_r;
51725 }
51726
51727 /* "(tree fragment)":16
51728 * else:
51729 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, state)
51730 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
51731 * __pyx_unpickle_VariantRecordFormat__set_state(self, __pyx_state)
51732 */
51733
51734 /* Python wrapper */
51735 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_36__setstate_cython__(PyObject *__pyx_v_self,
51736 #if CYTHON_METH_FASTCALL
51737 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51738 #else
51739 PyObject *__pyx_args, PyObject *__pyx_kwds
51740 #endif
51741 ); /*proto*/
51742 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_35__setstate_cython__, "VariantRecordFormat.__setstate_cython__(self, __pyx_state)");
51743 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_36__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_36__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_35__setstate_cython__};
51744 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_36__setstate_cython__(PyObject *__pyx_v_self,
51745 #if CYTHON_METH_FASTCALL
51746 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
51747 #else
51748 PyObject *__pyx_args, PyObject *__pyx_kwds
51749 #endif
51750 ) {
51751 PyObject *__pyx_v___pyx_state = 0;
51752 #if !CYTHON_METH_FASTCALL
51753 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
51754 #endif
51755 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
51756 PyObject* values[1] = {0};
51757 int __pyx_lineno = 0;
51758 const char *__pyx_filename = NULL;
51759 int __pyx_clineno = 0;
51760 PyObject *__pyx_r = 0;
51761 __Pyx_RefNannyDeclarations
51762 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
51763 #if !CYTHON_METH_FASTCALL
51764 #if CYTHON_ASSUME_SAFE_MACROS
51765 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
51766 #else
51767 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
51768 #endif
51769 #endif
51770 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
51771 {
51772 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
51773 if (__pyx_kwds) {
51774 Py_ssize_t kw_args;
51775 switch (__pyx_nargs) {
51776 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
51777 CYTHON_FALLTHROUGH;
51778 case 0: break;
51779 default: goto __pyx_L5_argtuple_error;
51780 }
51781 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
51782 switch (__pyx_nargs) {
51783 case 0:
51784 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
51785 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
51786 kw_args--;
51787 }
51788 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
51789 else goto __pyx_L5_argtuple_error;
51790 }
51791 if (unlikely(kw_args > 0)) {
51792 const Py_ssize_t kwd_pos_args = __pyx_nargs;
51793 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
51794 }
51795 } else if (unlikely(__pyx_nargs != 1)) {
51796 goto __pyx_L5_argtuple_error;
51797 } else {
51798 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
51799 }
51800 __pyx_v___pyx_state = values[0];
51801 }
51802 goto __pyx_L6_skip;
51803 __pyx_L5_argtuple_error:;
51804 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
51805 __pyx_L6_skip:;
51806 goto __pyx_L4_argument_unpacking_done;
51807 __pyx_L3_error:;
51808 {
51809 Py_ssize_t __pyx_temp;
51810 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
51811 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
51812 }
51813 }
51814 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
51815 __Pyx_RefNannyFinishContext();
51816 return NULL;
51817 __pyx_L4_argument_unpacking_done:;
51818 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_35__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v_self), __pyx_v___pyx_state);
51819
51820 /* function exit code */
51821 {
51822 Py_ssize_t __pyx_temp;
51823 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
51824 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
51825 }
51826 }
51827 __Pyx_RefNannyFinishContext();
51828 return __pyx_r;
51829 }
51830
51831 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordFormat_35__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
51832 PyObject *__pyx_r = NULL;
51833 __Pyx_TraceDeclarations
51834 __Pyx_RefNannyDeclarations
51835 PyObject *__pyx_t_1 = NULL;
51836 int __pyx_lineno = 0;
51837 const char *__pyx_filename = NULL;
51838 int __pyx_clineno = 0;
51839 __Pyx_TraceFrameInit(__pyx_codeobj__134)
51840 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
51841 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
51842
51843 /* "(tree fragment)":17
51844 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, state)
51845 * def __setstate_cython__(self, __pyx_state):
51846 * __pyx_unpickle_VariantRecordFormat__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
51847 */
51848 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
51849 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordFormat__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
51850 __Pyx_GOTREF(__pyx_t_1);
51851 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51852
51853 /* "(tree fragment)":16
51854 * else:
51855 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, state)
51856 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
51857 * __pyx_unpickle_VariantRecordFormat__set_state(self, __pyx_state)
51858 */
51859
51860 /* function exit code */
51861 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
51862 goto __pyx_L0;
51863 __pyx_L1_error:;
51864 __Pyx_XDECREF(__pyx_t_1);
51865 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordFormat.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
51866 __pyx_r = NULL;
51867 __pyx_L0:;
51868 __Pyx_XGIVEREF(__pyx_r);
51869 __Pyx_TraceReturn(__pyx_r, 0);
51870 __Pyx_RefNannyFinishContext();
51871 return __pyx_r;
51872 }
51873
51874 /* "pysam/libcbcf.pyx":2522
51875 *
51876 *
51877 * cdef VariantRecordFormat makeVariantRecordFormat(VariantRecord record): # <<<<<<<<<<<<<<
51878 * if not record:
51879 * raise ValueError('invalid VariantRecord')
51880 */
51881
51882 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_f_5pysam_7libcbcf_makeVariantRecordFormat(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record) {
51883 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v_format = 0;
51884 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_r = NULL;
51885 __Pyx_TraceDeclarations
51886 __Pyx_RefNannyDeclarations
51887 int __pyx_t_1;
51888 int __pyx_t_2;
51889 PyObject *__pyx_t_3 = NULL;
51890 int __pyx_lineno = 0;
51891 const char *__pyx_filename = NULL;
51892 int __pyx_clineno = 0;
51893 __Pyx_RefNannySetupContext("makeVariantRecordFormat", 1);
51894 __Pyx_TraceCall("makeVariantRecordFormat", __pyx_f[0], 2522, 0, __PYX_ERR(0, 2522, __pyx_L1_error));
51895
51896 /* "pysam/libcbcf.pyx":2523
51897 *
51898 * cdef VariantRecordFormat makeVariantRecordFormat(VariantRecord record):
51899 * if not record: # <<<<<<<<<<<<<<
51900 * raise ValueError('invalid VariantRecord')
51901 *
51902 */
51903 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_record)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2523, __pyx_L1_error)
51904 __pyx_t_2 = (!__pyx_t_1);
51905 if (unlikely(__pyx_t_2)) {
51906
51907 /* "pysam/libcbcf.pyx":2524
51908 * cdef VariantRecordFormat makeVariantRecordFormat(VariantRecord record):
51909 * if not record:
51910 * raise ValueError('invalid VariantRecord') # <<<<<<<<<<<<<<
51911 *
51912 * cdef VariantRecordFormat format = VariantRecordFormat.__new__(VariantRecordFormat)
51913 */
51914 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2524, __pyx_L1_error)
51915 __Pyx_GOTREF(__pyx_t_3);
51916 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
51917 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51918 __PYX_ERR(0, 2524, __pyx_L1_error)
51919
51920 /* "pysam/libcbcf.pyx":2523
51921 *
51922 * cdef VariantRecordFormat makeVariantRecordFormat(VariantRecord record):
51923 * if not record: # <<<<<<<<<<<<<<
51924 * raise ValueError('invalid VariantRecord')
51925 *
51926 */
51927 }
51928
51929 /* "pysam/libcbcf.pyx":2526
51930 * raise ValueError('invalid VariantRecord')
51931 *
51932 * cdef VariantRecordFormat format = VariantRecordFormat.__new__(VariantRecordFormat) # <<<<<<<<<<<<<<
51933 * format.record = record
51934 *
51935 */
51936 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordFormat(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2526, __pyx_L1_error)
51937 __Pyx_GOTREF((PyObject *)__pyx_t_3);
51938 __pyx_v_format = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_t_3);
51939 __pyx_t_3 = 0;
51940
51941 /* "pysam/libcbcf.pyx":2527
51942 *
51943 * cdef VariantRecordFormat format = VariantRecordFormat.__new__(VariantRecordFormat)
51944 * format.record = record # <<<<<<<<<<<<<<
51945 *
51946 * return format
51947 */
51948 __Pyx_INCREF((PyObject *)__pyx_v_record);
51949 __Pyx_GIVEREF((PyObject *)__pyx_v_record);
51950 __Pyx_GOTREF((PyObject *)__pyx_v_format->record);
51951 __Pyx_DECREF((PyObject *)__pyx_v_format->record);
51952 __pyx_v_format->record = __pyx_v_record;
51953
51954 /* "pysam/libcbcf.pyx":2529
51955 * format.record = record
51956 *
51957 * return format # <<<<<<<<<<<<<<
51958 *
51959 *
51960 */
51961 __Pyx_XDECREF((PyObject *)__pyx_r);
51962 __Pyx_INCREF((PyObject *)__pyx_v_format);
51963 __pyx_r = __pyx_v_format;
51964 goto __pyx_L0;
51965
51966 /* "pysam/libcbcf.pyx":2522
51967 *
51968 *
51969 * cdef VariantRecordFormat makeVariantRecordFormat(VariantRecord record): # <<<<<<<<<<<<<<
51970 * if not record:
51971 * raise ValueError('invalid VariantRecord')
51972 */
51973
51974 /* function exit code */
51975 __pyx_L1_error:;
51976 __Pyx_XDECREF(__pyx_t_3);
51977 __Pyx_AddTraceback("pysam.libcbcf.makeVariantRecordFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
51978 __pyx_r = 0;
51979 __pyx_L0:;
51980 __Pyx_XDECREF((PyObject *)__pyx_v_format);
51981 __Pyx_XGIVEREF((PyObject *)__pyx_r);
51982 __Pyx_TraceReturn(__pyx_r, 0);
51983 __Pyx_RefNannyFinishContext();
51984 return __pyx_r;
51985 }
51986
51987 /* "pysam/libcbcf.pyx":2537
51988 * mapping from info metadata name to value."""
51989 *
51990 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
51991 * raise TypeError('this class cannot be instantiated from Python')
51992 *
51993 */
51994
51995 /* Python wrapper */
51996 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
51997 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
51998 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
51999 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
52000 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
52001 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
52002 int __pyx_r;
52003 __Pyx_RefNannyDeclarations
52004 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
52005 #if CYTHON_ASSUME_SAFE_MACROS
52006 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
52007 #else
52008 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
52009 #endif
52010 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
52011 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
52012 __Pyx_INCREF(__pyx_args);
52013 __pyx_v_args = __pyx_args;
52014 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
52015
52016 /* function exit code */
52017 __Pyx_DECREF(__pyx_v_args);
52018 __Pyx_XDECREF(__pyx_v_kwargs);
52019 __Pyx_RefNannyFinishContext();
52020 return __pyx_r;
52021 }
52022
52023 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
52024 int __pyx_r;
52025 __Pyx_TraceDeclarations
52026 __Pyx_RefNannyDeclarations
52027 PyObject *__pyx_t_1 = NULL;
52028 int __pyx_lineno = 0;
52029 const char *__pyx_filename = NULL;
52030 int __pyx_clineno = 0;
52031 __Pyx_RefNannySetupContext("__init__", 1);
52032 __Pyx_TraceCall("__init__", __pyx_f[0], 2537, 0, __PYX_ERR(0, 2537, __pyx_L1_error));
52033
52034 /* "pysam/libcbcf.pyx":2538
52035 *
52036 * def __init__(self, *args, **kwargs):
52037 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
52038 *
52039 * def __len__(self):
52040 */
52041 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2538, __pyx_L1_error)
52042 __Pyx_GOTREF(__pyx_t_1);
52043 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
52044 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
52045 __PYX_ERR(0, 2538, __pyx_L1_error)
52046
52047 /* "pysam/libcbcf.pyx":2537
52048 * mapping from info metadata name to value."""
52049 *
52050 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
52051 * raise TypeError('this class cannot be instantiated from Python')
52052 *
52053 */
52054
52055 /* function exit code */
52056 __pyx_L1_error:;
52057 __Pyx_XDECREF(__pyx_t_1);
52058 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52059 __pyx_r = -1;
52060 __Pyx_TraceReturn(Py_None, 0);
52061 __Pyx_RefNannyFinishContext();
52062 return __pyx_r;
52063 }
52064
52065 /* "pysam/libcbcf.pyx":2540
52066 * raise TypeError('this class cannot be instantiated from Python')
52067 *
52068 * def __len__(self): # <<<<<<<<<<<<<<
52069 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52070 * cdef bcf1_t *r = self.record.ptr
52071 */
52072
52073 /* Python wrapper */
52074 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_3__len__(PyObject *__pyx_v_self); /*proto*/
52075 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_3__len__(PyObject *__pyx_v_self) {
52076 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
52077 Py_ssize_t __pyx_r;
52078 __Pyx_RefNannyDeclarations
52079 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
52080 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
52081 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
52082
52083 /* function exit code */
52084 __Pyx_RefNannyFinishContext();
52085 return __pyx_r;
52086 }
52087
52088 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
52089 bcf_hdr_t *__pyx_v_hdr;
52090 bcf1_t *__pyx_v_r;
52091 bcf_info_t *__pyx_v_info;
52092 char const *__pyx_v_key;
52093 int __pyx_v_i;
52094 int __pyx_v_count;
52095 Py_ssize_t __pyx_r;
52096 __Pyx_TraceDeclarations
52097 __Pyx_RefNannyDeclarations
52098 bcf_hdr_t *__pyx_t_1;
52099 bcf1_t *__pyx_t_2;
52100 int __pyx_t_3;
52101 PyObject *__pyx_t_4 = NULL;
52102 uint32_t __pyx_t_5;
52103 uint32_t __pyx_t_6;
52104 int __pyx_t_7;
52105 int __pyx_t_8;
52106 int __pyx_lineno = 0;
52107 const char *__pyx_filename = NULL;
52108 int __pyx_clineno = 0;
52109 __Pyx_RefNannySetupContext("__len__", 1);
52110 __Pyx_TraceCall("__len__", __pyx_f[0], 2540, 0, __PYX_ERR(0, 2540, __pyx_L1_error));
52111
52112 /* "pysam/libcbcf.pyx":2541
52113 *
52114 * def __len__(self):
52115 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
52116 * cdef bcf1_t *r = self.record.ptr
52117 * cdef bcf_info_t *info
52118 */
52119 __pyx_t_1 = __pyx_v_self->record->header->ptr;
52120 __pyx_v_hdr = __pyx_t_1;
52121
52122 /* "pysam/libcbcf.pyx":2542
52123 * def __len__(self):
52124 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52125 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
52126 * cdef bcf_info_t *info
52127 * cdef const char *key
52128 */
52129 __pyx_t_2 = __pyx_v_self->record->ptr;
52130 __pyx_v_r = __pyx_t_2;
52131
52132 /* "pysam/libcbcf.pyx":2545
52133 * cdef bcf_info_t *info
52134 * cdef const char *key
52135 * cdef int i, count = 0 # <<<<<<<<<<<<<<
52136 *
52137 * if bcf_unpack(r, BCF_UN_INFO) < 0:
52138 */
52139 __pyx_v_count = 0;
52140
52141 /* "pysam/libcbcf.pyx":2547
52142 * cdef int i, count = 0
52143 *
52144 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
52145 * raise ValueError('Error unpacking VariantRecord')
52146 *
52147 */
52148 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
52149 if (unlikely(__pyx_t_3)) {
52150
52151 /* "pysam/libcbcf.pyx":2548
52152 *
52153 * if bcf_unpack(r, BCF_UN_INFO) < 0:
52154 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
52155 *
52156 * for i in range(r.n_info):
52157 */
52158 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2548, __pyx_L1_error)
52159 __Pyx_GOTREF(__pyx_t_4);
52160 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
52161 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
52162 __PYX_ERR(0, 2548, __pyx_L1_error)
52163
52164 /* "pysam/libcbcf.pyx":2547
52165 * cdef int i, count = 0
52166 *
52167 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
52168 * raise ValueError('Error unpacking VariantRecord')
52169 *
52170 */
52171 }
52172
52173 /* "pysam/libcbcf.pyx":2550
52174 * raise ValueError('Error unpacking VariantRecord')
52175 *
52176 * for i in range(r.n_info): # <<<<<<<<<<<<<<
52177 * info = &r.d.info[i]
52178 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52179 */
52180 __pyx_t_5 = __pyx_v_r->n_info;
52181 __pyx_t_6 = __pyx_t_5;
52182 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
52183 __pyx_v_i = __pyx_t_7;
52184
52185 /* "pysam/libcbcf.pyx":2551
52186 *
52187 * for i in range(r.n_info):
52188 * info = &r.d.info[i] # <<<<<<<<<<<<<<
52189 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52190 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0:
52191 */
52192 __pyx_v_info = (&(__pyx_v_r->d.info[__pyx_v_i]));
52193
52194 /* "pysam/libcbcf.pyx":2552
52195 * for i in range(r.n_info):
52196 * info = &r.d.info[i]
52197 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key) # <<<<<<<<<<<<<<
52198 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0:
52199 * count += 1
52200 */
52201 __pyx_v_key = bcf_hdr_int2id(__pyx_v_hdr, BCF_DT_ID, __pyx_v_info->key);
52202
52203 /* "pysam/libcbcf.pyx":2553
52204 * info = &r.d.info[i]
52205 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52206 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
52207 * count += 1
52208 *
52209 */
52210 __pyx_t_8 = (__pyx_v_info != NULL);
52211 if (__pyx_t_8) {
52212 } else {
52213 __pyx_t_3 = __pyx_t_8;
52214 goto __pyx_L7_bool_binop_done;
52215 }
52216 __pyx_t_8 = (__pyx_v_info->vptr != NULL);
52217 if (__pyx_t_8) {
52218 } else {
52219 __pyx_t_3 = __pyx_t_8;
52220 goto __pyx_L7_bool_binop_done;
52221 }
52222 __pyx_t_8 = (strcmp(__pyx_v_key, ((char const *)"END")) != 0);
52223 __pyx_t_3 = __pyx_t_8;
52224 __pyx_L7_bool_binop_done:;
52225 if (__pyx_t_3) {
52226
52227 /* "pysam/libcbcf.pyx":2554
52228 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52229 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0:
52230 * count += 1 # <<<<<<<<<<<<<<
52231 *
52232 * return count
52233 */
52234 __pyx_v_count = (__pyx_v_count + 1);
52235
52236 /* "pysam/libcbcf.pyx":2553
52237 * info = &r.d.info[i]
52238 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52239 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
52240 * count += 1
52241 *
52242 */
52243 }
52244 }
52245
52246 /* "pysam/libcbcf.pyx":2556
52247 * count += 1
52248 *
52249 * return count # <<<<<<<<<<<<<<
52250 *
52251 * def __bool__(self):
52252 */
52253 __pyx_r = __pyx_v_count;
52254 goto __pyx_L0;
52255
52256 /* "pysam/libcbcf.pyx":2540
52257 * raise TypeError('this class cannot be instantiated from Python')
52258 *
52259 * def __len__(self): # <<<<<<<<<<<<<<
52260 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52261 * cdef bcf1_t *r = self.record.ptr
52262 */
52263
52264 /* function exit code */
52265 __pyx_L1_error:;
52266 __Pyx_XDECREF(__pyx_t_4);
52267 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52268 __pyx_r = -1;
52269 __pyx_L0:;
52270 __Pyx_TraceReturn(Py_None, 0);
52271 __Pyx_RefNannyFinishContext();
52272 return __pyx_r;
52273 }
52274
52275 /* "pysam/libcbcf.pyx":2558
52276 * return count
52277 *
52278 * def __bool__(self): # <<<<<<<<<<<<<<
52279 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52280 * cdef bcf1_t *r = self.record.ptr
52281 */
52282
52283 /* Python wrapper */
52284 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_5__bool__(PyObject *__pyx_v_self); /*proto*/
52285 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_5__bool__(PyObject *__pyx_v_self) {
52286 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
52287 int __pyx_r;
52288 __Pyx_RefNannyDeclarations
52289 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
52290 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
52291 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
52292
52293 /* function exit code */
52294 __Pyx_RefNannyFinishContext();
52295 return __pyx_r;
52296 }
52297
52298 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
52299 bcf_hdr_t *__pyx_v_hdr;
52300 bcf1_t *__pyx_v_r;
52301 bcf_info_t *__pyx_v_info;
52302 char const *__pyx_v_key;
52303 int __pyx_v_i;
52304 int __pyx_r;
52305 __Pyx_TraceDeclarations
52306 __Pyx_RefNannyDeclarations
52307 bcf_hdr_t *__pyx_t_1;
52308 bcf1_t *__pyx_t_2;
52309 int __pyx_t_3;
52310 PyObject *__pyx_t_4 = NULL;
52311 uint32_t __pyx_t_5;
52312 uint32_t __pyx_t_6;
52313 int __pyx_t_7;
52314 int __pyx_t_8;
52315 int __pyx_lineno = 0;
52316 const char *__pyx_filename = NULL;
52317 int __pyx_clineno = 0;
52318 __Pyx_RefNannySetupContext("__bool__", 1);
52319 __Pyx_TraceCall("__bool__", __pyx_f[0], 2558, 0, __PYX_ERR(0, 2558, __pyx_L1_error));
52320
52321 /* "pysam/libcbcf.pyx":2559
52322 *
52323 * def __bool__(self):
52324 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
52325 * cdef bcf1_t *r = self.record.ptr
52326 * cdef bcf_info_t *info
52327 */
52328 __pyx_t_1 = __pyx_v_self->record->header->ptr;
52329 __pyx_v_hdr = __pyx_t_1;
52330
52331 /* "pysam/libcbcf.pyx":2560
52332 * def __bool__(self):
52333 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52334 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
52335 * cdef bcf_info_t *info
52336 * cdef const char *key
52337 */
52338 __pyx_t_2 = __pyx_v_self->record->ptr;
52339 __pyx_v_r = __pyx_t_2;
52340
52341 /* "pysam/libcbcf.pyx":2565
52342 * cdef int i
52343 *
52344 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
52345 * raise ValueError('Error unpacking VariantRecord')
52346 *
52347 */
52348 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
52349 if (unlikely(__pyx_t_3)) {
52350
52351 /* "pysam/libcbcf.pyx":2566
52352 *
52353 * if bcf_unpack(r, BCF_UN_INFO) < 0:
52354 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
52355 *
52356 * for i in range(r.n_info):
52357 */
52358 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2566, __pyx_L1_error)
52359 __Pyx_GOTREF(__pyx_t_4);
52360 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
52361 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
52362 __PYX_ERR(0, 2566, __pyx_L1_error)
52363
52364 /* "pysam/libcbcf.pyx":2565
52365 * cdef int i
52366 *
52367 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
52368 * raise ValueError('Error unpacking VariantRecord')
52369 *
52370 */
52371 }
52372
52373 /* "pysam/libcbcf.pyx":2568
52374 * raise ValueError('Error unpacking VariantRecord')
52375 *
52376 * for i in range(r.n_info): # <<<<<<<<<<<<<<
52377 * info = &r.d.info[i]
52378 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52379 */
52380 __pyx_t_5 = __pyx_v_r->n_info;
52381 __pyx_t_6 = __pyx_t_5;
52382 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
52383 __pyx_v_i = __pyx_t_7;
52384
52385 /* "pysam/libcbcf.pyx":2569
52386 *
52387 * for i in range(r.n_info):
52388 * info = &r.d.info[i] # <<<<<<<<<<<<<<
52389 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52390 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0:
52391 */
52392 __pyx_v_info = (&(__pyx_v_r->d.info[__pyx_v_i]));
52393
52394 /* "pysam/libcbcf.pyx":2570
52395 * for i in range(r.n_info):
52396 * info = &r.d.info[i]
52397 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key) # <<<<<<<<<<<<<<
52398 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0:
52399 * return True
52400 */
52401 __pyx_v_key = bcf_hdr_int2id(__pyx_v_hdr, BCF_DT_ID, __pyx_v_info->key);
52402
52403 /* "pysam/libcbcf.pyx":2571
52404 * info = &r.d.info[i]
52405 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52406 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
52407 * return True
52408 *
52409 */
52410 __pyx_t_8 = (__pyx_v_info != NULL);
52411 if (__pyx_t_8) {
52412 } else {
52413 __pyx_t_3 = __pyx_t_8;
52414 goto __pyx_L7_bool_binop_done;
52415 }
52416 __pyx_t_8 = (__pyx_v_info->vptr != NULL);
52417 if (__pyx_t_8) {
52418 } else {
52419 __pyx_t_3 = __pyx_t_8;
52420 goto __pyx_L7_bool_binop_done;
52421 }
52422 __pyx_t_8 = (strcmp(__pyx_v_key, ((char const *)"END")) != 0);
52423 __pyx_t_3 = __pyx_t_8;
52424 __pyx_L7_bool_binop_done:;
52425 if (__pyx_t_3) {
52426
52427 /* "pysam/libcbcf.pyx":2572
52428 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52429 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0:
52430 * return True # <<<<<<<<<<<<<<
52431 *
52432 * return False
52433 */
52434 __pyx_r = 1;
52435 goto __pyx_L0;
52436
52437 /* "pysam/libcbcf.pyx":2571
52438 * info = &r.d.info[i]
52439 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
52440 * if info != NULL and info.vptr != NULL and strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
52441 * return True
52442 *
52443 */
52444 }
52445 }
52446
52447 /* "pysam/libcbcf.pyx":2574
52448 * return True
52449 *
52450 * return False # <<<<<<<<<<<<<<
52451 *
52452 * def __getitem__(self, key):
52453 */
52454 __pyx_r = 0;
52455 goto __pyx_L0;
52456
52457 /* "pysam/libcbcf.pyx":2558
52458 * return count
52459 *
52460 * def __bool__(self): # <<<<<<<<<<<<<<
52461 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52462 * cdef bcf1_t *r = self.record.ptr
52463 */
52464
52465 /* function exit code */
52466 __pyx_L1_error:;
52467 __Pyx_XDECREF(__pyx_t_4);
52468 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52469 __pyx_r = -1;
52470 __pyx_L0:;
52471 __Pyx_TraceReturn(Py_None, 0);
52472 __Pyx_RefNannyFinishContext();
52473 return __pyx_r;
52474 }
52475
52476 /* "pysam/libcbcf.pyx":2576
52477 * return False
52478 *
52479 * def __getitem__(self, key): # <<<<<<<<<<<<<<
52480 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52481 * cdef bcf1_t *r = self.record.ptr
52482 */
52483
52484 /* Python wrapper */
52485 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
52486 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
52487 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
52488 PyObject *__pyx_r = 0;
52489 __Pyx_RefNannyDeclarations
52490 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
52491 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
52492 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), ((PyObject *)__pyx_v_key));
52493
52494 /* function exit code */
52495 __Pyx_RefNannyFinishContext();
52496 return __pyx_r;
52497 }
52498
52499 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key) {
52500 bcf_hdr_t *__pyx_v_hdr;
52501 bcf1_t *__pyx_v_r;
52502 PyObject *__pyx_v_bkey = 0;
52503 bcf_info_t *__pyx_v_info;
52504 int __pyx_v_info_id;
52505 PyObject *__pyx_r = NULL;
52506 __Pyx_TraceDeclarations
52507 __Pyx_RefNannyDeclarations
52508 bcf_hdr_t *__pyx_t_1;
52509 bcf1_t *__pyx_t_2;
52510 int __pyx_t_3;
52511 PyObject *__pyx_t_4 = NULL;
52512 char const *__pyx_t_5;
52513 char const *__pyx_t_6;
52514 int __pyx_t_7;
52515 int __pyx_t_8;
52516 PyObject *__pyx_t_9 = NULL;
52517 PyObject *__pyx_t_10 = NULL;
52518 unsigned int __pyx_t_11;
52519 int __pyx_t_12;
52520 int __pyx_lineno = 0;
52521 const char *__pyx_filename = NULL;
52522 int __pyx_clineno = 0;
52523 __Pyx_RefNannySetupContext("__getitem__", 1);
52524 __Pyx_TraceCall("__getitem__", __pyx_f[0], 2576, 0, __PYX_ERR(0, 2576, __pyx_L1_error));
52525
52526 /* "pysam/libcbcf.pyx":2577
52527 *
52528 * def __getitem__(self, key):
52529 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
52530 * cdef bcf1_t *r = self.record.ptr
52531 *
52532 */
52533 __pyx_t_1 = __pyx_v_self->record->header->ptr;
52534 __pyx_v_hdr = __pyx_t_1;
52535
52536 /* "pysam/libcbcf.pyx":2578
52537 * def __getitem__(self, key):
52538 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52539 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
52540 *
52541 * if bcf_unpack(r, BCF_UN_INFO) < 0:
52542 */
52543 __pyx_t_2 = __pyx_v_self->record->ptr;
52544 __pyx_v_r = __pyx_t_2;
52545
52546 /* "pysam/libcbcf.pyx":2580
52547 * cdef bcf1_t *r = self.record.ptr
52548 *
52549 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
52550 * raise ValueError('Error unpacking VariantRecord')
52551 *
52552 */
52553 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
52554 if (unlikely(__pyx_t_3)) {
52555
52556 /* "pysam/libcbcf.pyx":2581
52557 *
52558 * if bcf_unpack(r, BCF_UN_INFO) < 0:
52559 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
52560 *
52561 * cdef bytes bkey = force_bytes(key)
52562 */
52563 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2581, __pyx_L1_error)
52564 __Pyx_GOTREF(__pyx_t_4);
52565 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
52566 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
52567 __PYX_ERR(0, 2581, __pyx_L1_error)
52568
52569 /* "pysam/libcbcf.pyx":2580
52570 * cdef bcf1_t *r = self.record.ptr
52571 *
52572 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
52573 * raise ValueError('Error unpacking VariantRecord')
52574 *
52575 */
52576 }
52577
52578 /* "pysam/libcbcf.pyx":2583
52579 * raise ValueError('Error unpacking VariantRecord')
52580 *
52581 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
52582 *
52583 * if strcmp(bkey, b'END') == 0:
52584 */
52585 __pyx_t_4 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
52586 __Pyx_GOTREF(__pyx_t_4);
52587 __pyx_v_bkey = ((PyObject*)__pyx_t_4);
52588 __pyx_t_4 = 0;
52589
52590 /* "pysam/libcbcf.pyx":2585
52591 * cdef bytes bkey = force_bytes(key)
52592 *
52593 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
52594 * raise KeyError('END is a reserved attribute; access is via record.stop')
52595 *
52596 */
52597 if (unlikely(__pyx_v_bkey == Py_None)) {
52598 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
52599 __PYX_ERR(0, 2585, __pyx_L1_error)
52600 }
52601 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2585, __pyx_L1_error)
52602 __pyx_t_3 = (strcmp(__pyx_t_5, ((char const *)"END")) == 0);
52603 if (unlikely(__pyx_t_3)) {
52604
52605 /* "pysam/libcbcf.pyx":2586
52606 *
52607 * if strcmp(bkey, b'END') == 0:
52608 * raise KeyError('END is a reserved attribute; access is via record.stop') # <<<<<<<<<<<<<<
52609 *
52610 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
52611 */
52612 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
52613 __Pyx_GOTREF(__pyx_t_4);
52614 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
52615 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
52616 __PYX_ERR(0, 2586, __pyx_L1_error)
52617
52618 /* "pysam/libcbcf.pyx":2585
52619 * cdef bytes bkey = force_bytes(key)
52620 *
52621 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
52622 * raise KeyError('END is a reserved attribute; access is via record.stop')
52623 *
52624 */
52625 }
52626
52627 /* "pysam/libcbcf.pyx":2588
52628 * raise KeyError('END is a reserved attribute; access is via record.stop')
52629 *
52630 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey) # <<<<<<<<<<<<<<
52631 *
52632 * # Cannot stop here if info == NULL, since flags must return False
52633 */
52634 if (unlikely(__pyx_v_bkey == Py_None)) {
52635 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
52636 __PYX_ERR(0, 2588, __pyx_L1_error)
52637 }
52638 __pyx_t_6 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 2588, __pyx_L1_error)
52639 __pyx_v_info = bcf_get_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_6);
52640
52641 /* "pysam/libcbcf.pyx":2591
52642 *
52643 * # Cannot stop here if info == NULL, since flags must return False
52644 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key # <<<<<<<<<<<<<<
52645 *
52646 * if info_id < 0:
52647 */
52648 __pyx_t_3 = (!(__pyx_v_info != 0));
52649 if (__pyx_t_3) {
52650 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_bcf_header_get_info_id(__pyx_v_hdr, __pyx_v_bkey); if (unlikely(__pyx_t_8 == ((int)-2) && PyErr_Occurred())) __PYX_ERR(0, 2591, __pyx_L1_error)
52651 __pyx_t_7 = __pyx_t_8;
52652 } else {
52653 __pyx_t_7 = __pyx_v_info->key;
52654 }
52655 __pyx_v_info_id = __pyx_t_7;
52656
52657 /* "pysam/libcbcf.pyx":2593
52658 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key
52659 *
52660 * if info_id < 0: # <<<<<<<<<<<<<<
52661 * raise KeyError('Unknown INFO field: {}'.format(key))
52662 *
52663 */
52664 __pyx_t_3 = (__pyx_v_info_id < 0);
52665 if (unlikely(__pyx_t_3)) {
52666
52667 /* "pysam/libcbcf.pyx":2594
52668 *
52669 * if info_id < 0:
52670 * raise KeyError('Unknown INFO field: {}'.format(key)) # <<<<<<<<<<<<<<
52671 *
52672 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
52673 */
52674 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_INFO_field, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2594, __pyx_L1_error)
52675 __Pyx_GOTREF(__pyx_t_9);
52676 __pyx_t_10 = NULL;
52677 __pyx_t_11 = 0;
52678 #if CYTHON_UNPACK_METHODS
52679 if (likely(PyMethod_Check(__pyx_t_9))) {
52680 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
52681 if (likely(__pyx_t_10)) {
52682 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
52683 __Pyx_INCREF(__pyx_t_10);
52684 __Pyx_INCREF(function);
52685 __Pyx_DECREF_SET(__pyx_t_9, function);
52686 __pyx_t_11 = 1;
52687 }
52688 }
52689 #endif
52690 {
52691 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_key};
52692 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
52693 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
52694 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2594, __pyx_L1_error)
52695 __Pyx_GOTREF(__pyx_t_4);
52696 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
52697 }
52698 __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2594, __pyx_L1_error)
52699 __Pyx_GOTREF(__pyx_t_9);
52700 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
52701 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
52702 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
52703 __PYX_ERR(0, 2594, __pyx_L1_error)
52704
52705 /* "pysam/libcbcf.pyx":2593
52706 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key
52707 *
52708 * if info_id < 0: # <<<<<<<<<<<<<<
52709 * raise KeyError('Unknown INFO field: {}'.format(key))
52710 *
52711 */
52712 }
52713
52714 /* "pysam/libcbcf.pyx":2596
52715 * raise KeyError('Unknown INFO field: {}'.format(key))
52716 *
52717 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
52718 * raise ValueError('Invalid header')
52719 *
52720 */
52721 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2596, __pyx_L1_error)
52722 __pyx_t_12 = (!__pyx_t_3);
52723 if (unlikely(__pyx_t_12)) {
52724
52725 /* "pysam/libcbcf.pyx":2597
52726 *
52727 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
52728 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
52729 *
52730 * # Handle type=Flag values
52731 */
52732 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2597, __pyx_L1_error)
52733 __Pyx_GOTREF(__pyx_t_9);
52734 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
52735 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
52736 __PYX_ERR(0, 2597, __pyx_L1_error)
52737
52738 /* "pysam/libcbcf.pyx":2596
52739 * raise KeyError('Unknown INFO field: {}'.format(key))
52740 *
52741 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
52742 * raise ValueError('Invalid header')
52743 *
52744 */
52745 }
52746
52747 /* "pysam/libcbcf.pyx":2600
52748 *
52749 * # Handle type=Flag values
52750 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG: # <<<<<<<<<<<<<<
52751 * return info != NULL and info.vptr != NULL
52752 *
52753 */
52754 __pyx_t_12 = (bcf_hdr_id2type(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id) == BCF_HT_FLAG);
52755 if (__pyx_t_12) {
52756
52757 /* "pysam/libcbcf.pyx":2601
52758 * # Handle type=Flag values
52759 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG:
52760 * return info != NULL and info.vptr != NULL # <<<<<<<<<<<<<<
52761 *
52762 * if not info or not info.vptr:
52763 */
52764 __Pyx_XDECREF(__pyx_r);
52765 __pyx_t_12 = (__pyx_v_info != NULL);
52766 if (__pyx_t_12) {
52767 } else {
52768 __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2601, __pyx_L1_error)
52769 __Pyx_GOTREF(__pyx_t_4);
52770 __pyx_t_9 = __pyx_t_4;
52771 __pyx_t_4 = 0;
52772 goto __pyx_L8_bool_binop_done;
52773 }
52774 __pyx_t_12 = (__pyx_v_info->vptr != NULL);
52775 __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2601, __pyx_L1_error)
52776 __Pyx_GOTREF(__pyx_t_4);
52777 __pyx_t_9 = __pyx_t_4;
52778 __pyx_t_4 = 0;
52779 __pyx_L8_bool_binop_done:;
52780 __pyx_r = __pyx_t_9;
52781 __pyx_t_9 = 0;
52782 goto __pyx_L0;
52783
52784 /* "pysam/libcbcf.pyx":2600
52785 *
52786 * # Handle type=Flag values
52787 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG: # <<<<<<<<<<<<<<
52788 * return info != NULL and info.vptr != NULL
52789 *
52790 */
52791 }
52792
52793 /* "pysam/libcbcf.pyx":2603
52794 * return info != NULL and info.vptr != NULL
52795 *
52796 * if not info or not info.vptr: # <<<<<<<<<<<<<<
52797 * raise KeyError('Invalid INFO field: {}'.format(key))
52798 *
52799 */
52800 __pyx_t_3 = (!(__pyx_v_info != 0));
52801 if (!__pyx_t_3) {
52802 } else {
52803 __pyx_t_12 = __pyx_t_3;
52804 goto __pyx_L11_bool_binop_done;
52805 }
52806 __pyx_t_3 = (!(__pyx_v_info->vptr != 0));
52807 __pyx_t_12 = __pyx_t_3;
52808 __pyx_L11_bool_binop_done:;
52809 if (unlikely(__pyx_t_12)) {
52810
52811 /* "pysam/libcbcf.pyx":2604
52812 *
52813 * if not info or not info.vptr:
52814 * raise KeyError('Invalid INFO field: {}'.format(key)) # <<<<<<<<<<<<<<
52815 *
52816 * return bcf_info_get_value(self.record, info)
52817 */
52818 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Invalid_INFO_field, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2604, __pyx_L1_error)
52819 __Pyx_GOTREF(__pyx_t_4);
52820 __pyx_t_10 = NULL;
52821 __pyx_t_11 = 0;
52822 #if CYTHON_UNPACK_METHODS
52823 if (likely(PyMethod_Check(__pyx_t_4))) {
52824 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
52825 if (likely(__pyx_t_10)) {
52826 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
52827 __Pyx_INCREF(__pyx_t_10);
52828 __Pyx_INCREF(function);
52829 __Pyx_DECREF_SET(__pyx_t_4, function);
52830 __pyx_t_11 = 1;
52831 }
52832 }
52833 #endif
52834 {
52835 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_key};
52836 __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
52837 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
52838 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2604, __pyx_L1_error)
52839 __Pyx_GOTREF(__pyx_t_9);
52840 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
52841 }
52842 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2604, __pyx_L1_error)
52843 __Pyx_GOTREF(__pyx_t_4);
52844 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
52845 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
52846 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
52847 __PYX_ERR(0, 2604, __pyx_L1_error)
52848
52849 /* "pysam/libcbcf.pyx":2603
52850 * return info != NULL and info.vptr != NULL
52851 *
52852 * if not info or not info.vptr: # <<<<<<<<<<<<<<
52853 * raise KeyError('Invalid INFO field: {}'.format(key))
52854 *
52855 */
52856 }
52857
52858 /* "pysam/libcbcf.pyx":2606
52859 * raise KeyError('Invalid INFO field: {}'.format(key))
52860 *
52861 * return bcf_info_get_value(self.record, info) # <<<<<<<<<<<<<<
52862 *
52863 * def __setitem__(self, key, value):
52864 */
52865 __Pyx_XDECREF(__pyx_r);
52866 __pyx_t_4 = ((PyObject *)__pyx_v_self->record);
52867 __Pyx_INCREF(__pyx_t_4);
52868 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_info_get_value(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_4), __pyx_v_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2606, __pyx_L1_error)
52869 __Pyx_GOTREF(__pyx_t_9);
52870 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
52871 __pyx_r = __pyx_t_9;
52872 __pyx_t_9 = 0;
52873 goto __pyx_L0;
52874
52875 /* "pysam/libcbcf.pyx":2576
52876 * return False
52877 *
52878 * def __getitem__(self, key): # <<<<<<<<<<<<<<
52879 * cdef bcf_hdr_t *hdr = self.record.header.ptr
52880 * cdef bcf1_t *r = self.record.ptr
52881 */
52882
52883 /* function exit code */
52884 __pyx_L1_error:;
52885 __Pyx_XDECREF(__pyx_t_4);
52886 __Pyx_XDECREF(__pyx_t_9);
52887 __Pyx_XDECREF(__pyx_t_10);
52888 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52889 __pyx_r = NULL;
52890 __pyx_L0:;
52891 __Pyx_XDECREF(__pyx_v_bkey);
52892 __Pyx_XGIVEREF(__pyx_r);
52893 __Pyx_TraceReturn(__pyx_r, 0);
52894 __Pyx_RefNannyFinishContext();
52895 return __pyx_r;
52896 }
52897
52898 /* "pysam/libcbcf.pyx":2608
52899 * return bcf_info_get_value(self.record, info)
52900 *
52901 * def __setitem__(self, key, value): # <<<<<<<<<<<<<<
52902 * cdef bytes bkey = force_bytes(key)
52903 *
52904 */
52905
52906 /* Python wrapper */
52907 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
52908 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
52909 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
52910 int __pyx_r;
52911 __Pyx_RefNannyDeclarations
52912 __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
52913 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
52914 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_8__setitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));
52915
52916 /* function exit code */
52917 __Pyx_RefNannyFinishContext();
52918 return __pyx_r;
52919 }
52920
52921 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_8__setitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
52922 PyObject *__pyx_v_bkey = 0;
52923 int __pyx_r;
52924 __Pyx_TraceDeclarations
52925 __Pyx_RefNannyDeclarations
52926 PyObject *__pyx_t_1 = NULL;
52927 char const *__pyx_t_2;
52928 int __pyx_t_3;
52929 PyObject *__pyx_t_4 = NULL;
52930 int __pyx_lineno = 0;
52931 const char *__pyx_filename = NULL;
52932 int __pyx_clineno = 0;
52933 __Pyx_RefNannySetupContext("__setitem__", 1);
52934 __Pyx_TraceCall("__setitem__", __pyx_f[0], 2608, 0, __PYX_ERR(0, 2608, __pyx_L1_error));
52935
52936 /* "pysam/libcbcf.pyx":2609
52937 *
52938 * def __setitem__(self, key, value):
52939 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
52940 *
52941 * if strcmp(bkey, b'END') == 0:
52942 */
52943 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2609, __pyx_L1_error)
52944 __Pyx_GOTREF(__pyx_t_1);
52945 __pyx_v_bkey = ((PyObject*)__pyx_t_1);
52946 __pyx_t_1 = 0;
52947
52948 /* "pysam/libcbcf.pyx":2611
52949 * cdef bytes bkey = force_bytes(key)
52950 *
52951 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
52952 * raise KeyError('END is a reserved attribute; access is via record.stop')
52953 *
52954 */
52955 if (unlikely(__pyx_v_bkey == Py_None)) {
52956 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
52957 __PYX_ERR(0, 2611, __pyx_L1_error)
52958 }
52959 __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L1_error)
52960 __pyx_t_3 = (strcmp(__pyx_t_2, ((char const *)"END")) == 0);
52961 if (unlikely(__pyx_t_3)) {
52962
52963 /* "pysam/libcbcf.pyx":2612
52964 *
52965 * if strcmp(bkey, b'END') == 0:
52966 * raise KeyError('END is a reserved attribute; access is via record.stop') # <<<<<<<<<<<<<<
52967 *
52968 * if bcf_unpack(self.record.ptr, BCF_UN_INFO) < 0:
52969 */
52970 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2612, __pyx_L1_error)
52971 __Pyx_GOTREF(__pyx_t_1);
52972 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
52973 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
52974 __PYX_ERR(0, 2612, __pyx_L1_error)
52975
52976 /* "pysam/libcbcf.pyx":2611
52977 * cdef bytes bkey = force_bytes(key)
52978 *
52979 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
52980 * raise KeyError('END is a reserved attribute; access is via record.stop')
52981 *
52982 */
52983 }
52984
52985 /* "pysam/libcbcf.pyx":2614
52986 * raise KeyError('END is a reserved attribute; access is via record.stop')
52987 *
52988 * if bcf_unpack(self.record.ptr, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
52989 * raise ValueError('Error unpacking VariantRecord')
52990 *
52991 */
52992 __pyx_t_3 = (bcf_unpack(__pyx_v_self->record->ptr, BCF_UN_INFO) < 0);
52993 if (unlikely(__pyx_t_3)) {
52994
52995 /* "pysam/libcbcf.pyx":2615
52996 *
52997 * if bcf_unpack(self.record.ptr, BCF_UN_INFO) < 0:
52998 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
52999 *
53000 * bcf_info_set_value(self.record, key, value)
53001 */
53002 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
53003 __Pyx_GOTREF(__pyx_t_1);
53004 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
53005 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53006 __PYX_ERR(0, 2615, __pyx_L1_error)
53007
53008 /* "pysam/libcbcf.pyx":2614
53009 * raise KeyError('END is a reserved attribute; access is via record.stop')
53010 *
53011 * if bcf_unpack(self.record.ptr, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
53012 * raise ValueError('Error unpacking VariantRecord')
53013 *
53014 */
53015 }
53016
53017 /* "pysam/libcbcf.pyx":2617
53018 * raise ValueError('Error unpacking VariantRecord')
53019 *
53020 * bcf_info_set_value(self.record, key, value) # <<<<<<<<<<<<<<
53021 *
53022 * def __delitem__(self, key):
53023 */
53024 __pyx_t_1 = ((PyObject *)__pyx_v_self->record);
53025 __Pyx_INCREF(__pyx_t_1);
53026 __pyx_t_4 = __pyx_f_5pysam_7libcbcf_bcf_info_set_value(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_1), __pyx_v_key, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2617, __pyx_L1_error)
53027 __Pyx_GOTREF(__pyx_t_4);
53028 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53029 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
53030
53031 /* "pysam/libcbcf.pyx":2608
53032 * return bcf_info_get_value(self.record, info)
53033 *
53034 * def __setitem__(self, key, value): # <<<<<<<<<<<<<<
53035 * cdef bytes bkey = force_bytes(key)
53036 *
53037 */
53038
53039 /* function exit code */
53040 __pyx_r = 0;
53041 goto __pyx_L0;
53042 __pyx_L1_error:;
53043 __Pyx_XDECREF(__pyx_t_1);
53044 __Pyx_XDECREF(__pyx_t_4);
53045 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53046 __pyx_r = -1;
53047 __pyx_L0:;
53048 __Pyx_XDECREF(__pyx_v_bkey);
53049 __Pyx_TraceReturn(Py_None, 0);
53050 __Pyx_RefNannyFinishContext();
53051 return __pyx_r;
53052 }
53053
53054 /* "pysam/libcbcf.pyx":2619
53055 * bcf_info_set_value(self.record, key, value)
53056 *
53057 * def __delitem__(self, key): # <<<<<<<<<<<<<<
53058 * cdef bcf_hdr_t *hdr = self.record.header.ptr
53059 * cdef bcf1_t *r = self.record.ptr
53060 */
53061
53062 /* Python wrapper */
53063 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_11__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
53064 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_11__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
53065 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
53066 int __pyx_r;
53067 __Pyx_RefNannyDeclarations
53068 __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
53069 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
53070 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_10__delitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), ((PyObject *)__pyx_v_key));
53071
53072 /* function exit code */
53073 __Pyx_RefNannyFinishContext();
53074 return __pyx_r;
53075 }
53076
53077 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_10__delitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key) {
53078 bcf_hdr_t *__pyx_v_hdr;
53079 bcf1_t *__pyx_v_r;
53080 PyObject *__pyx_v_bkey = 0;
53081 bcf_info_t *__pyx_v_info;
53082 int __pyx_v_info_id;
53083 int __pyx_r;
53084 __Pyx_TraceDeclarations
53085 __Pyx_RefNannyDeclarations
53086 bcf_hdr_t *__pyx_t_1;
53087 bcf1_t *__pyx_t_2;
53088 PyObject *__pyx_t_3 = NULL;
53089 char const *__pyx_t_4;
53090 int __pyx_t_5;
53091 char const *__pyx_t_6;
53092 int __pyx_t_7;
53093 int __pyx_t_8;
53094 PyObject *__pyx_t_9 = NULL;
53095 PyObject *__pyx_t_10 = NULL;
53096 unsigned int __pyx_t_11;
53097 int __pyx_t_12;
53098 char const *__pyx_t_13;
53099 int __pyx_lineno = 0;
53100 const char *__pyx_filename = NULL;
53101 int __pyx_clineno = 0;
53102 __Pyx_RefNannySetupContext("__delitem__", 1);
53103 __Pyx_TraceCall("__delitem__", __pyx_f[0], 2619, 0, __PYX_ERR(0, 2619, __pyx_L1_error));
53104
53105 /* "pysam/libcbcf.pyx":2620
53106 *
53107 * def __delitem__(self, key):
53108 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
53109 * cdef bcf1_t *r = self.record.ptr
53110 *
53111 */
53112 __pyx_t_1 = __pyx_v_self->record->header->ptr;
53113 __pyx_v_hdr = __pyx_t_1;
53114
53115 /* "pysam/libcbcf.pyx":2621
53116 * def __delitem__(self, key):
53117 * cdef bcf_hdr_t *hdr = self.record.header.ptr
53118 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
53119 *
53120 * cdef bytes bkey = force_bytes(key)
53121 */
53122 __pyx_t_2 = __pyx_v_self->record->ptr;
53123 __pyx_v_r = __pyx_t_2;
53124
53125 /* "pysam/libcbcf.pyx":2623
53126 * cdef bcf1_t *r = self.record.ptr
53127 *
53128 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
53129 * if strcmp(bkey, b'END') == 0:
53130 * raise KeyError('END is a reserved attribute; access is via record.stop')
53131 */
53132 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error)
53133 __Pyx_GOTREF(__pyx_t_3);
53134 __pyx_v_bkey = ((PyObject*)__pyx_t_3);
53135 __pyx_t_3 = 0;
53136
53137 /* "pysam/libcbcf.pyx":2624
53138 *
53139 * cdef bytes bkey = force_bytes(key)
53140 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
53141 * raise KeyError('END is a reserved attribute; access is via record.stop')
53142 *
53143 */
53144 if (unlikely(__pyx_v_bkey == Py_None)) {
53145 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
53146 __PYX_ERR(0, 2624, __pyx_L1_error)
53147 }
53148 __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2624, __pyx_L1_error)
53149 __pyx_t_5 = (strcmp(__pyx_t_4, ((char const *)"END")) == 0);
53150 if (unlikely(__pyx_t_5)) {
53151
53152 /* "pysam/libcbcf.pyx":2625
53153 * cdef bytes bkey = force_bytes(key)
53154 * if strcmp(bkey, b'END') == 0:
53155 * raise KeyError('END is a reserved attribute; access is via record.stop') # <<<<<<<<<<<<<<
53156 *
53157 * if bcf_unpack(r, BCF_UN_INFO) < 0:
53158 */
53159 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __pyx_L1_error)
53160 __Pyx_GOTREF(__pyx_t_3);
53161 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
53162 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
53163 __PYX_ERR(0, 2625, __pyx_L1_error)
53164
53165 /* "pysam/libcbcf.pyx":2624
53166 *
53167 * cdef bytes bkey = force_bytes(key)
53168 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
53169 * raise KeyError('END is a reserved attribute; access is via record.stop')
53170 *
53171 */
53172 }
53173
53174 /* "pysam/libcbcf.pyx":2627
53175 * raise KeyError('END is a reserved attribute; access is via record.stop')
53176 *
53177 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
53178 * raise ValueError('Error unpacking VariantRecord')
53179 *
53180 */
53181 __pyx_t_5 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
53182 if (unlikely(__pyx_t_5)) {
53183
53184 /* "pysam/libcbcf.pyx":2628
53185 *
53186 * if bcf_unpack(r, BCF_UN_INFO) < 0:
53187 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
53188 *
53189 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
53190 */
53191 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2628, __pyx_L1_error)
53192 __Pyx_GOTREF(__pyx_t_3);
53193 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
53194 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
53195 __PYX_ERR(0, 2628, __pyx_L1_error)
53196
53197 /* "pysam/libcbcf.pyx":2627
53198 * raise KeyError('END is a reserved attribute; access is via record.stop')
53199 *
53200 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
53201 * raise ValueError('Error unpacking VariantRecord')
53202 *
53203 */
53204 }
53205
53206 /* "pysam/libcbcf.pyx":2630
53207 * raise ValueError('Error unpacking VariantRecord')
53208 *
53209 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey) # <<<<<<<<<<<<<<
53210 *
53211 * # Cannot stop here if info == NULL, since flags must return False
53212 */
53213 if (unlikely(__pyx_v_bkey == Py_None)) {
53214 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
53215 __PYX_ERR(0, 2630, __pyx_L1_error)
53216 }
53217 __pyx_t_6 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 2630, __pyx_L1_error)
53218 __pyx_v_info = bcf_get_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_6);
53219
53220 /* "pysam/libcbcf.pyx":2633
53221 *
53222 * # Cannot stop here if info == NULL, since flags must return False
53223 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key # <<<<<<<<<<<<<<
53224 *
53225 * if info_id < 0:
53226 */
53227 __pyx_t_5 = (!(__pyx_v_info != 0));
53228 if (__pyx_t_5) {
53229 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_bcf_header_get_info_id(__pyx_v_hdr, __pyx_v_bkey); if (unlikely(__pyx_t_8 == ((int)-2) && PyErr_Occurred())) __PYX_ERR(0, 2633, __pyx_L1_error)
53230 __pyx_t_7 = __pyx_t_8;
53231 } else {
53232 __pyx_t_7 = __pyx_v_info->key;
53233 }
53234 __pyx_v_info_id = __pyx_t_7;
53235
53236 /* "pysam/libcbcf.pyx":2635
53237 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key
53238 *
53239 * if info_id < 0: # <<<<<<<<<<<<<<
53240 * raise KeyError('Unknown INFO field: {}'.format(key))
53241 *
53242 */
53243 __pyx_t_5 = (__pyx_v_info_id < 0);
53244 if (unlikely(__pyx_t_5)) {
53245
53246 /* "pysam/libcbcf.pyx":2636
53247 *
53248 * if info_id < 0:
53249 * raise KeyError('Unknown INFO field: {}'.format(key)) # <<<<<<<<<<<<<<
53250 *
53251 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
53252 */
53253 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_INFO_field, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2636, __pyx_L1_error)
53254 __Pyx_GOTREF(__pyx_t_9);
53255 __pyx_t_10 = NULL;
53256 __pyx_t_11 = 0;
53257 #if CYTHON_UNPACK_METHODS
53258 if (likely(PyMethod_Check(__pyx_t_9))) {
53259 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
53260 if (likely(__pyx_t_10)) {
53261 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
53262 __Pyx_INCREF(__pyx_t_10);
53263 __Pyx_INCREF(function);
53264 __Pyx_DECREF_SET(__pyx_t_9, function);
53265 __pyx_t_11 = 1;
53266 }
53267 }
53268 #endif
53269 {
53270 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_key};
53271 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
53272 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
53273 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2636, __pyx_L1_error)
53274 __Pyx_GOTREF(__pyx_t_3);
53275 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
53276 }
53277 __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2636, __pyx_L1_error)
53278 __Pyx_GOTREF(__pyx_t_9);
53279 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
53280 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
53281 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
53282 __PYX_ERR(0, 2636, __pyx_L1_error)
53283
53284 /* "pysam/libcbcf.pyx":2635
53285 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key
53286 *
53287 * if info_id < 0: # <<<<<<<<<<<<<<
53288 * raise KeyError('Unknown INFO field: {}'.format(key))
53289 *
53290 */
53291 }
53292
53293 /* "pysam/libcbcf.pyx":2638
53294 * raise KeyError('Unknown INFO field: {}'.format(key))
53295 *
53296 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
53297 * raise ValueError('Invalid header')
53298 *
53299 */
53300 __pyx_t_5 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id); if (unlikely(__pyx_t_5 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2638, __pyx_L1_error)
53301 __pyx_t_12 = (!__pyx_t_5);
53302 if (unlikely(__pyx_t_12)) {
53303
53304 /* "pysam/libcbcf.pyx":2639
53305 *
53306 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
53307 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
53308 *
53309 * # Handle flags
53310 */
53311 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2639, __pyx_L1_error)
53312 __Pyx_GOTREF(__pyx_t_9);
53313 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
53314 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
53315 __PYX_ERR(0, 2639, __pyx_L1_error)
53316
53317 /* "pysam/libcbcf.pyx":2638
53318 * raise KeyError('Unknown INFO field: {}'.format(key))
53319 *
53320 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
53321 * raise ValueError('Invalid header')
53322 *
53323 */
53324 }
53325
53326 /* "pysam/libcbcf.pyx":2642
53327 *
53328 * # Handle flags
53329 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG and (not info or not info.vptr): # <<<<<<<<<<<<<<
53330 * return
53331 *
53332 */
53333 __pyx_t_5 = (bcf_hdr_id2type(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id) == BCF_HT_FLAG);
53334 if (__pyx_t_5) {
53335 } else {
53336 __pyx_t_12 = __pyx_t_5;
53337 goto __pyx_L8_bool_binop_done;
53338 }
53339 __pyx_t_5 = (!(__pyx_v_info != 0));
53340 if (!__pyx_t_5) {
53341 } else {
53342 __pyx_t_12 = __pyx_t_5;
53343 goto __pyx_L8_bool_binop_done;
53344 }
53345 __pyx_t_5 = (!(__pyx_v_info->vptr != 0));
53346 __pyx_t_12 = __pyx_t_5;
53347 __pyx_L8_bool_binop_done:;
53348 if (__pyx_t_12) {
53349
53350 /* "pysam/libcbcf.pyx":2643
53351 * # Handle flags
53352 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG and (not info or not info.vptr):
53353 * return # <<<<<<<<<<<<<<
53354 *
53355 * if not info or not info.vptr:
53356 */
53357 __pyx_r = 0;
53358 goto __pyx_L0;
53359
53360 /* "pysam/libcbcf.pyx":2642
53361 *
53362 * # Handle flags
53363 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG and (not info or not info.vptr): # <<<<<<<<<<<<<<
53364 * return
53365 *
53366 */
53367 }
53368
53369 /* "pysam/libcbcf.pyx":2645
53370 * return
53371 *
53372 * if not info or not info.vptr: # <<<<<<<<<<<<<<
53373 * raise KeyError('Unknown INFO field: {}'.format(key))
53374 *
53375 */
53376 __pyx_t_5 = (!(__pyx_v_info != 0));
53377 if (!__pyx_t_5) {
53378 } else {
53379 __pyx_t_12 = __pyx_t_5;
53380 goto __pyx_L12_bool_binop_done;
53381 }
53382 __pyx_t_5 = (!(__pyx_v_info->vptr != 0));
53383 __pyx_t_12 = __pyx_t_5;
53384 __pyx_L12_bool_binop_done:;
53385 if (unlikely(__pyx_t_12)) {
53386
53387 /* "pysam/libcbcf.pyx":2646
53388 *
53389 * if not info or not info.vptr:
53390 * raise KeyError('Unknown INFO field: {}'.format(key)) # <<<<<<<<<<<<<<
53391 *
53392 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0:
53393 */
53394 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_INFO_field, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2646, __pyx_L1_error)
53395 __Pyx_GOTREF(__pyx_t_3);
53396 __pyx_t_10 = NULL;
53397 __pyx_t_11 = 0;
53398 #if CYTHON_UNPACK_METHODS
53399 if (likely(PyMethod_Check(__pyx_t_3))) {
53400 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
53401 if (likely(__pyx_t_10)) {
53402 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
53403 __Pyx_INCREF(__pyx_t_10);
53404 __Pyx_INCREF(function);
53405 __Pyx_DECREF_SET(__pyx_t_3, function);
53406 __pyx_t_11 = 1;
53407 }
53408 }
53409 #endif
53410 {
53411 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_key};
53412 __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
53413 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
53414 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2646, __pyx_L1_error)
53415 __Pyx_GOTREF(__pyx_t_9);
53416 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
53417 }
53418 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2646, __pyx_L1_error)
53419 __Pyx_GOTREF(__pyx_t_3);
53420 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
53421 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
53422 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
53423 __PYX_ERR(0, 2646, __pyx_L1_error)
53424
53425 /* "pysam/libcbcf.pyx":2645
53426 * return
53427 *
53428 * if not info or not info.vptr: # <<<<<<<<<<<<<<
53429 * raise KeyError('Unknown INFO field: {}'.format(key))
53430 *
53431 */
53432 }
53433
53434 /* "pysam/libcbcf.pyx":2648
53435 * raise KeyError('Unknown INFO field: {}'.format(key))
53436 *
53437 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0: # <<<<<<<<<<<<<<
53438 * raise ValueError('Unable to delete INFO')
53439 *
53440 */
53441 if (unlikely(__pyx_v_bkey == Py_None)) {
53442 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
53443 __PYX_ERR(0, 2648, __pyx_L1_error)
53444 }
53445 __pyx_t_13 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 2648, __pyx_L1_error)
53446 __pyx_t_12 = (bcf_update_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_13, NULL, 0, __pyx_v_info->type) < 0);
53447 if (unlikely(__pyx_t_12)) {
53448
53449 /* "pysam/libcbcf.pyx":2649
53450 *
53451 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0:
53452 * raise ValueError('Unable to delete INFO') # <<<<<<<<<<<<<<
53453 *
53454 * def clear(self):
53455 */
53456 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error)
53457 __Pyx_GOTREF(__pyx_t_3);
53458 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
53459 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
53460 __PYX_ERR(0, 2649, __pyx_L1_error)
53461
53462 /* "pysam/libcbcf.pyx":2648
53463 * raise KeyError('Unknown INFO field: {}'.format(key))
53464 *
53465 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0: # <<<<<<<<<<<<<<
53466 * raise ValueError('Unable to delete INFO')
53467 *
53468 */
53469 }
53470
53471 /* "pysam/libcbcf.pyx":2619
53472 * bcf_info_set_value(self.record, key, value)
53473 *
53474 * def __delitem__(self, key): # <<<<<<<<<<<<<<
53475 * cdef bcf_hdr_t *hdr = self.record.header.ptr
53476 * cdef bcf1_t *r = self.record.ptr
53477 */
53478
53479 /* function exit code */
53480 __pyx_r = 0;
53481 goto __pyx_L0;
53482 __pyx_L1_error:;
53483 __Pyx_XDECREF(__pyx_t_3);
53484 __Pyx_XDECREF(__pyx_t_9);
53485 __Pyx_XDECREF(__pyx_t_10);
53486 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53487 __pyx_r = -1;
53488 __pyx_L0:;
53489 __Pyx_XDECREF(__pyx_v_bkey);
53490 __Pyx_TraceReturn(Py_None, 0);
53491 __Pyx_RefNannyFinishContext();
53492 return __pyx_r;
53493 }
53494
53495 /* "pysam/libcbcf.pyx":2651
53496 * raise ValueError('Unable to delete INFO')
53497 *
53498 * def clear(self): # <<<<<<<<<<<<<<
53499 * """Clear all info data"""
53500 * cdef bcf_hdr_t *hdr = self.record.header.ptr
53501 */
53502
53503 /* Python wrapper */
53504 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_13clear(PyObject *__pyx_v_self,
53505 #if CYTHON_METH_FASTCALL
53506 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
53507 #else
53508 PyObject *__pyx_args, PyObject *__pyx_kwds
53509 #endif
53510 ); /*proto*/
53511 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_12clear, "VariantRecordInfo.clear(self)\nClear all info data");
53512 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_13clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_13clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_12clear};
53513 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_13clear(PyObject *__pyx_v_self,
53514 #if CYTHON_METH_FASTCALL
53515 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
53516 #else
53517 PyObject *__pyx_args, PyObject *__pyx_kwds
53518 #endif
53519 ) {
53520 #if !CYTHON_METH_FASTCALL
53521 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
53522 #endif
53523 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
53524 PyObject *__pyx_r = 0;
53525 __Pyx_RefNannyDeclarations
53526 __Pyx_RefNannySetupContext("clear (wrapper)", 0);
53527 #if !CYTHON_METH_FASTCALL
53528 #if CYTHON_ASSUME_SAFE_MACROS
53529 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
53530 #else
53531 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
53532 #endif
53533 #endif
53534 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
53535 if (unlikely(__pyx_nargs > 0)) {
53536 __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, __pyx_nargs); return NULL;}
53537 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear", 0))) return NULL;
53538 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_12clear(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
53539
53540 /* function exit code */
53541 __Pyx_RefNannyFinishContext();
53542 return __pyx_r;
53543 }
53544
53545 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_12clear(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
53546 bcf_hdr_t *__pyx_v_hdr;
53547 bcf1_t *__pyx_v_r;
53548 bcf_info_t *__pyx_v_info;
53549 char const *__pyx_v_key;
53550 int __pyx_v_i;
53551 PyObject *__pyx_r = NULL;
53552 __Pyx_TraceDeclarations
53553 __Pyx_RefNannyDeclarations
53554 bcf_hdr_t *__pyx_t_1;
53555 bcf1_t *__pyx_t_2;
53556 int __pyx_t_3;
53557 PyObject *__pyx_t_4 = NULL;
53558 uint32_t __pyx_t_5;
53559 uint32_t __pyx_t_6;
53560 int __pyx_t_7;
53561 int __pyx_t_8;
53562 int __pyx_lineno = 0;
53563 const char *__pyx_filename = NULL;
53564 int __pyx_clineno = 0;
53565 __Pyx_TraceFrameInit(__pyx_codeobj__137)
53566 __Pyx_RefNannySetupContext("clear", 1);
53567 __Pyx_TraceCall("clear", __pyx_f[0], 2651, 0, __PYX_ERR(0, 2651, __pyx_L1_error));
53568
53569 /* "pysam/libcbcf.pyx":2653
53570 * def clear(self):
53571 * """Clear all info data"""
53572 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
53573 * cdef bcf1_t *r = self.record.ptr
53574 * cdef bcf_info_t *info
53575 */
53576 __pyx_t_1 = __pyx_v_self->record->header->ptr;
53577 __pyx_v_hdr = __pyx_t_1;
53578
53579 /* "pysam/libcbcf.pyx":2654
53580 * """Clear all info data"""
53581 * cdef bcf_hdr_t *hdr = self.record.header.ptr
53582 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
53583 * cdef bcf_info_t *info
53584 * cdef const char *key
53585 */
53586 __pyx_t_2 = __pyx_v_self->record->ptr;
53587 __pyx_v_r = __pyx_t_2;
53588
53589 /* "pysam/libcbcf.pyx":2659
53590 * cdef int i
53591 *
53592 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
53593 * raise ValueError('Error unpacking VariantRecord')
53594 *
53595 */
53596 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
53597 if (unlikely(__pyx_t_3)) {
53598
53599 /* "pysam/libcbcf.pyx":2660
53600 *
53601 * if bcf_unpack(r, BCF_UN_INFO) < 0:
53602 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
53603 *
53604 * for i in range(r.n_info):
53605 */
53606 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2660, __pyx_L1_error)
53607 __Pyx_GOTREF(__pyx_t_4);
53608 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
53609 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
53610 __PYX_ERR(0, 2660, __pyx_L1_error)
53611
53612 /* "pysam/libcbcf.pyx":2659
53613 * cdef int i
53614 *
53615 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
53616 * raise ValueError('Error unpacking VariantRecord')
53617 *
53618 */
53619 }
53620
53621 /* "pysam/libcbcf.pyx":2662
53622 * raise ValueError('Error unpacking VariantRecord')
53623 *
53624 * for i in range(r.n_info): # <<<<<<<<<<<<<<
53625 * info = &r.d.info[i]
53626 * if info and info.vptr:
53627 */
53628 __pyx_t_5 = __pyx_v_r->n_info;
53629 __pyx_t_6 = __pyx_t_5;
53630 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
53631 __pyx_v_i = __pyx_t_7;
53632
53633 /* "pysam/libcbcf.pyx":2663
53634 *
53635 * for i in range(r.n_info):
53636 * info = &r.d.info[i] # <<<<<<<<<<<<<<
53637 * if info and info.vptr:
53638 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53639 */
53640 __pyx_v_info = (&(__pyx_v_r->d.info[__pyx_v_i]));
53641
53642 /* "pysam/libcbcf.pyx":2664
53643 * for i in range(r.n_info):
53644 * info = &r.d.info[i]
53645 * if info and info.vptr: # <<<<<<<<<<<<<<
53646 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53647 * if strcmp(key, b'END') == 0:
53648 */
53649 __pyx_t_8 = (__pyx_v_info != 0);
53650 if (__pyx_t_8) {
53651 } else {
53652 __pyx_t_3 = __pyx_t_8;
53653 goto __pyx_L7_bool_binop_done;
53654 }
53655 __pyx_t_8 = (__pyx_v_info->vptr != 0);
53656 __pyx_t_3 = __pyx_t_8;
53657 __pyx_L7_bool_binop_done:;
53658 if (__pyx_t_3) {
53659
53660 /* "pysam/libcbcf.pyx":2665
53661 * info = &r.d.info[i]
53662 * if info and info.vptr:
53663 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key) # <<<<<<<<<<<<<<
53664 * if strcmp(key, b'END') == 0:
53665 * continue
53666 */
53667 __pyx_v_key = bcf_hdr_int2id(__pyx_v_hdr, BCF_DT_ID, __pyx_v_info->key);
53668
53669 /* "pysam/libcbcf.pyx":2666
53670 * if info and info.vptr:
53671 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53672 * if strcmp(key, b'END') == 0: # <<<<<<<<<<<<<<
53673 * continue
53674 * if bcf_update_info(hdr, r, key, NULL, 0, info.type) < 0:
53675 */
53676 __pyx_t_3 = (strcmp(__pyx_v_key, ((char const *)"END")) == 0);
53677 if (__pyx_t_3) {
53678
53679 /* "pysam/libcbcf.pyx":2667
53680 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53681 * if strcmp(key, b'END') == 0:
53682 * continue # <<<<<<<<<<<<<<
53683 * if bcf_update_info(hdr, r, key, NULL, 0, info.type) < 0:
53684 * raise ValueError('Unable to delete INFO')
53685 */
53686 goto __pyx_L4_continue;
53687
53688 /* "pysam/libcbcf.pyx":2666
53689 * if info and info.vptr:
53690 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53691 * if strcmp(key, b'END') == 0: # <<<<<<<<<<<<<<
53692 * continue
53693 * if bcf_update_info(hdr, r, key, NULL, 0, info.type) < 0:
53694 */
53695 }
53696
53697 /* "pysam/libcbcf.pyx":2668
53698 * if strcmp(key, b'END') == 0:
53699 * continue
53700 * if bcf_update_info(hdr, r, key, NULL, 0, info.type) < 0: # <<<<<<<<<<<<<<
53701 * raise ValueError('Unable to delete INFO')
53702 *
53703 */
53704 __pyx_t_3 = (bcf_update_info(__pyx_v_hdr, __pyx_v_r, __pyx_v_key, NULL, 0, __pyx_v_info->type) < 0);
53705 if (unlikely(__pyx_t_3)) {
53706
53707 /* "pysam/libcbcf.pyx":2669
53708 * continue
53709 * if bcf_update_info(hdr, r, key, NULL, 0, info.type) < 0:
53710 * raise ValueError('Unable to delete INFO') # <<<<<<<<<<<<<<
53711 *
53712 * def __iter__(self):
53713 */
53714 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2669, __pyx_L1_error)
53715 __Pyx_GOTREF(__pyx_t_4);
53716 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
53717 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
53718 __PYX_ERR(0, 2669, __pyx_L1_error)
53719
53720 /* "pysam/libcbcf.pyx":2668
53721 * if strcmp(key, b'END') == 0:
53722 * continue
53723 * if bcf_update_info(hdr, r, key, NULL, 0, info.type) < 0: # <<<<<<<<<<<<<<
53724 * raise ValueError('Unable to delete INFO')
53725 *
53726 */
53727 }
53728
53729 /* "pysam/libcbcf.pyx":2664
53730 * for i in range(r.n_info):
53731 * info = &r.d.info[i]
53732 * if info and info.vptr: # <<<<<<<<<<<<<<
53733 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53734 * if strcmp(key, b'END') == 0:
53735 */
53736 }
53737 __pyx_L4_continue:;
53738 }
53739
53740 /* "pysam/libcbcf.pyx":2651
53741 * raise ValueError('Unable to delete INFO')
53742 *
53743 * def clear(self): # <<<<<<<<<<<<<<
53744 * """Clear all info data"""
53745 * cdef bcf_hdr_t *hdr = self.record.header.ptr
53746 */
53747
53748 /* function exit code */
53749 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
53750 goto __pyx_L0;
53751 __pyx_L1_error:;
53752 __Pyx_XDECREF(__pyx_t_4);
53753 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
53754 __pyx_r = NULL;
53755 __pyx_L0:;
53756 __Pyx_XGIVEREF(__pyx_r);
53757 __Pyx_TraceReturn(__pyx_r, 0);
53758 __Pyx_RefNannyFinishContext();
53759 return __pyx_r;
53760 }
53761 static PyObject *__pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_16generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
53762
53763 /* "pysam/libcbcf.pyx":2671
53764 * raise ValueError('Unable to delete INFO')
53765 *
53766 * def __iter__(self): # <<<<<<<<<<<<<<
53767 * cdef bcf_hdr_t *hdr = self.record.header.ptr
53768 * cdef bcf1_t *r = self.record.ptr
53769 */
53770
53771 /* Python wrapper */
53772 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_15__iter__(PyObject *__pyx_v_self); /*proto*/
53773 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_15__iter__(PyObject *__pyx_v_self) {
53774 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
53775 PyObject *__pyx_r = 0;
53776 __Pyx_RefNannyDeclarations
53777 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
53778 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
53779 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_14__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
53780
53781 /* function exit code */
53782 __Pyx_RefNannyFinishContext();
53783 return __pyx_r;
53784 }
53785
53786 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_14__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
53787 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *__pyx_cur_scope;
53788 PyObject *__pyx_r = NULL;
53789 __Pyx_RefNannyDeclarations
53790 int __pyx_lineno = 0;
53791 const char *__pyx_filename = NULL;
53792 int __pyx_clineno = 0;
53793 __Pyx_RefNannySetupContext("__iter__", 0);
53794 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_24___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__, __pyx_empty_tuple, NULL);
53795 if (unlikely(!__pyx_cur_scope)) {
53796 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *)Py_None);
53797 __Pyx_INCREF(Py_None);
53798 __PYX_ERR(0, 2671, __pyx_L1_error)
53799 } else {
53800 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
53801 }
53802 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
53803 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
53804 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
53805 {
53806 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_16generator17, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantRecordInfo___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2671, __pyx_L1_error)
53807 __Pyx_DECREF(__pyx_cur_scope);
53808 __Pyx_RefNannyFinishContext();
53809 return (PyObject *) gen;
53810 }
53811
53812 /* function exit code */
53813 __pyx_L1_error:;
53814 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53815 __pyx_r = NULL;
53816 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
53817 __Pyx_XGIVEREF(__pyx_r);
53818 __Pyx_RefNannyFinishContext();
53819 return __pyx_r;
53820 }
53821
53822 static PyObject *__pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_16generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
53823 {
53824 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *)__pyx_generator->closure);
53825 PyObject *__pyx_r = NULL;
53826 __Pyx_TraceDeclarations
53827 bcf_hdr_t *__pyx_t_1;
53828 bcf1_t *__pyx_t_2;
53829 int __pyx_t_3;
53830 PyObject *__pyx_t_4 = NULL;
53831 uint32_t __pyx_t_5;
53832 uint32_t __pyx_t_6;
53833 int __pyx_t_7;
53834 int __pyx_t_8;
53835 int __pyx_lineno = 0;
53836 const char *__pyx_filename = NULL;
53837 int __pyx_clineno = 0;
53838 __Pyx_RefNannyDeclarations
53839 __Pyx_RefNannySetupContext("__iter__", 0);
53840 __Pyx_TraceCall("__iter__", __pyx_f[0], 2671, 0, __PYX_ERR(0, 2671, __pyx_L1_error));
53841 switch (__pyx_generator->resume_label) {
53842 case 0: goto __pyx_L3_first_run;
53843 case 1: goto __pyx_L11_resume_from_yield;
53844 default: /* CPython raises the right error here */
53845 __Pyx_TraceReturn(Py_None, 0);
53846 __Pyx_RefNannyFinishContext();
53847 return NULL;
53848 }
53849 __pyx_L3_first_run:;
53850 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2671, __pyx_L1_error)
53851
53852 /* "pysam/libcbcf.pyx":2672
53853 *
53854 * def __iter__(self):
53855 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
53856 * cdef bcf1_t *r = self.record.ptr
53857 * cdef bcf_info_t *info
53858 */
53859 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
53860 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
53861
53862 /* "pysam/libcbcf.pyx":2673
53863 * def __iter__(self):
53864 * cdef bcf_hdr_t *hdr = self.record.header.ptr
53865 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
53866 * cdef bcf_info_t *info
53867 * cdef const char *key
53868 */
53869 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
53870 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
53871
53872 /* "pysam/libcbcf.pyx":2678
53873 * cdef int i
53874 *
53875 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
53876 * raise ValueError('Error unpacking VariantRecord')
53877 *
53878 */
53879 __pyx_t_3 = (bcf_unpack(__pyx_cur_scope->__pyx_v_r, BCF_UN_INFO) < 0);
53880 if (unlikely(__pyx_t_3)) {
53881
53882 /* "pysam/libcbcf.pyx":2679
53883 *
53884 * if bcf_unpack(r, BCF_UN_INFO) < 0:
53885 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
53886 *
53887 * for i in range(r.n_info):
53888 */
53889 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2679, __pyx_L1_error)
53890 __Pyx_GOTREF(__pyx_t_4);
53891 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
53892 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
53893 __PYX_ERR(0, 2679, __pyx_L1_error)
53894
53895 /* "pysam/libcbcf.pyx":2678
53896 * cdef int i
53897 *
53898 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
53899 * raise ValueError('Error unpacking VariantRecord')
53900 *
53901 */
53902 }
53903
53904 /* "pysam/libcbcf.pyx":2681
53905 * raise ValueError('Error unpacking VariantRecord')
53906 *
53907 * for i in range(r.n_info): # <<<<<<<<<<<<<<
53908 * info = &r.d.info[i]
53909 * if info and info.vptr:
53910 */
53911 __pyx_t_5 = __pyx_cur_scope->__pyx_v_r->n_info;
53912 __pyx_t_6 = __pyx_t_5;
53913 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
53914 __pyx_cur_scope->__pyx_v_i = __pyx_t_7;
53915
53916 /* "pysam/libcbcf.pyx":2682
53917 *
53918 * for i in range(r.n_info):
53919 * info = &r.d.info[i] # <<<<<<<<<<<<<<
53920 * if info and info.vptr:
53921 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53922 */
53923 __pyx_cur_scope->__pyx_v_info = (&(__pyx_cur_scope->__pyx_v_r->d.info[__pyx_cur_scope->__pyx_v_i]));
53924
53925 /* "pysam/libcbcf.pyx":2683
53926 * for i in range(r.n_info):
53927 * info = &r.d.info[i]
53928 * if info and info.vptr: # <<<<<<<<<<<<<<
53929 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53930 * if strcmp(key, b'END') != 0:
53931 */
53932 __pyx_t_8 = (__pyx_cur_scope->__pyx_v_info != 0);
53933 if (__pyx_t_8) {
53934 } else {
53935 __pyx_t_3 = __pyx_t_8;
53936 goto __pyx_L8_bool_binop_done;
53937 }
53938 __pyx_t_8 = (__pyx_cur_scope->__pyx_v_info->vptr != 0);
53939 __pyx_t_3 = __pyx_t_8;
53940 __pyx_L8_bool_binop_done:;
53941 if (__pyx_t_3) {
53942
53943 /* "pysam/libcbcf.pyx":2684
53944 * info = &r.d.info[i]
53945 * if info and info.vptr:
53946 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key) # <<<<<<<<<<<<<<
53947 * if strcmp(key, b'END') != 0:
53948 * yield bcf_str_cache_get_charptr(key)
53949 */
53950 __pyx_cur_scope->__pyx_v_key = bcf_hdr_int2id(__pyx_cur_scope->__pyx_v_hdr, BCF_DT_ID, __pyx_cur_scope->__pyx_v_info->key);
53951
53952 /* "pysam/libcbcf.pyx":2685
53953 * if info and info.vptr:
53954 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53955 * if strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
53956 * yield bcf_str_cache_get_charptr(key)
53957 *
53958 */
53959 __pyx_t_3 = (strcmp(__pyx_cur_scope->__pyx_v_key, ((char const *)"END")) != 0);
53960 if (__pyx_t_3) {
53961
53962 /* "pysam/libcbcf.pyx":2686
53963 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53964 * if strcmp(key, b'END') != 0:
53965 * yield bcf_str_cache_get_charptr(key) # <<<<<<<<<<<<<<
53966 *
53967 * def get(self, key, default=None):
53968 */
53969 __pyx_t_4 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(__pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2686, __pyx_L1_error)
53970 __Pyx_GOTREF(__pyx_t_4);
53971 __pyx_r = __pyx_t_4;
53972 __pyx_t_4 = 0;
53973 __pyx_cur_scope->__pyx_t_0 = __pyx_t_5;
53974 __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
53975 __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
53976 __Pyx_XGIVEREF(__pyx_r);
53977 __Pyx_TraceReturn(__pyx_r, 0);
53978 __Pyx_RefNannyFinishContext();
53979 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
53980 /* return from generator, yielding value */
53981 __pyx_generator->resume_label = 1;
53982 return __pyx_r;
53983 __pyx_L11_resume_from_yield:;
53984 __pyx_t_5 = __pyx_cur_scope->__pyx_t_0;
53985 __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
53986 __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
53987 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2686, __pyx_L1_error)
53988
53989 /* "pysam/libcbcf.pyx":2685
53990 * if info and info.vptr:
53991 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
53992 * if strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
53993 * yield bcf_str_cache_get_charptr(key)
53994 *
53995 */
53996 }
53997
53998 /* "pysam/libcbcf.pyx":2683
53999 * for i in range(r.n_info):
54000 * info = &r.d.info[i]
54001 * if info and info.vptr: # <<<<<<<<<<<<<<
54002 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
54003 * if strcmp(key, b'END') != 0:
54004 */
54005 }
54006 }
54007 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
54008
54009 /* "pysam/libcbcf.pyx":2671
54010 * raise ValueError('Unable to delete INFO')
54011 *
54012 * def __iter__(self): # <<<<<<<<<<<<<<
54013 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54014 * cdef bcf1_t *r = self.record.ptr
54015 */
54016
54017 /* function exit code */
54018 PyErr_SetNone(PyExc_StopIteration);
54019 goto __pyx_L0;
54020 __pyx_L1_error:;
54021 __Pyx_Generator_Replace_StopIteration(0);
54022 __Pyx_XDECREF(__pyx_t_4);
54023 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54024 __pyx_L0:;
54025 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
54026 #if !CYTHON_USE_EXC_INFO_STACK
54027 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
54028 #endif
54029 __pyx_generator->resume_label = -1;
54030 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
54031 __Pyx_TraceReturn(__pyx_r, 0);
54032 __Pyx_RefNannyFinishContext();
54033 return __pyx_r;
54034 }
54035
54036 /* "pysam/libcbcf.pyx":2688
54037 * yield bcf_str_cache_get_charptr(key)
54038 *
54039 * def get(self, key, default=None): # <<<<<<<<<<<<<<
54040 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
54041 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54042 */
54043
54044 /* Python wrapper */
54045 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_18get(PyObject *__pyx_v_self,
54046 #if CYTHON_METH_FASTCALL
54047 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
54048 #else
54049 PyObject *__pyx_args, PyObject *__pyx_kwds
54050 #endif
54051 ); /*proto*/
54052 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_17get, "VariantRecordInfo.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
54053 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_18get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_18get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_17get};
54054 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_18get(PyObject *__pyx_v_self,
54055 #if CYTHON_METH_FASTCALL
54056 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
54057 #else
54058 PyObject *__pyx_args, PyObject *__pyx_kwds
54059 #endif
54060 ) {
54061 PyObject *__pyx_v_key = 0;
54062 PyObject *__pyx_v_default = 0;
54063 #if !CYTHON_METH_FASTCALL
54064 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
54065 #endif
54066 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
54067 PyObject* values[2] = {0,0};
54068 int __pyx_lineno = 0;
54069 const char *__pyx_filename = NULL;
54070 int __pyx_clineno = 0;
54071 PyObject *__pyx_r = 0;
54072 __Pyx_RefNannyDeclarations
54073 __Pyx_RefNannySetupContext("get (wrapper)", 0);
54074 #if !CYTHON_METH_FASTCALL
54075 #if CYTHON_ASSUME_SAFE_MACROS
54076 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
54077 #else
54078 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
54079 #endif
54080 #endif
54081 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
54082 {
54083 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
54084 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
54085 if (__pyx_kwds) {
54086 Py_ssize_t kw_args;
54087 switch (__pyx_nargs) {
54088 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
54089 CYTHON_FALLTHROUGH;
54090 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
54091 CYTHON_FALLTHROUGH;
54092 case 0: break;
54093 default: goto __pyx_L5_argtuple_error;
54094 }
54095 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
54096 switch (__pyx_nargs) {
54097 case 0:
54098 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
54099 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
54100 kw_args--;
54101 }
54102 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2688, __pyx_L3_error)
54103 else goto __pyx_L5_argtuple_error;
54104 CYTHON_FALLTHROUGH;
54105 case 1:
54106 if (kw_args > 0) {
54107 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
54108 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
54109 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2688, __pyx_L3_error)
54110 }
54111 }
54112 if (unlikely(kw_args > 0)) {
54113 const Py_ssize_t kwd_pos_args = __pyx_nargs;
54114 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 2688, __pyx_L3_error)
54115 }
54116 } else {
54117 switch (__pyx_nargs) {
54118 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
54119 CYTHON_FALLTHROUGH;
54120 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
54121 break;
54122 default: goto __pyx_L5_argtuple_error;
54123 }
54124 }
54125 __pyx_v_key = values[0];
54126 __pyx_v_default = values[1];
54127 }
54128 goto __pyx_L6_skip;
54129 __pyx_L5_argtuple_error:;
54130 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2688, __pyx_L3_error)
54131 __pyx_L6_skip:;
54132 goto __pyx_L4_argument_unpacking_done;
54133 __pyx_L3_error:;
54134 {
54135 Py_ssize_t __pyx_temp;
54136 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
54137 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
54138 }
54139 }
54140 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
54141 __Pyx_RefNannyFinishContext();
54142 return NULL;
54143 __pyx_L4_argument_unpacking_done:;
54144 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_17get(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
54145
54146 /* function exit code */
54147 {
54148 Py_ssize_t __pyx_temp;
54149 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
54150 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
54151 }
54152 }
54153 __Pyx_RefNannyFinishContext();
54154 return __pyx_r;
54155 }
54156
54157 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_17get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
54158 bcf_hdr_t *__pyx_v_hdr;
54159 bcf1_t *__pyx_v_r;
54160 PyObject *__pyx_v_bkey = 0;
54161 bcf_info_t *__pyx_v_info;
54162 int __pyx_v_info_id;
54163 PyObject *__pyx_r = NULL;
54164 __Pyx_TraceDeclarations
54165 __Pyx_RefNannyDeclarations
54166 bcf_hdr_t *__pyx_t_1;
54167 bcf1_t *__pyx_t_2;
54168 int __pyx_t_3;
54169 PyObject *__pyx_t_4 = NULL;
54170 char const *__pyx_t_5;
54171 char const *__pyx_t_6;
54172 int __pyx_t_7;
54173 int __pyx_t_8;
54174 int __pyx_t_9;
54175 PyObject *__pyx_t_10 = NULL;
54176 int __pyx_lineno = 0;
54177 const char *__pyx_filename = NULL;
54178 int __pyx_clineno = 0;
54179 __Pyx_TraceFrameInit(__pyx_codeobj__138)
54180 __Pyx_RefNannySetupContext("get", 1);
54181 __Pyx_TraceCall("get", __pyx_f[0], 2688, 0, __PYX_ERR(0, 2688, __pyx_L1_error));
54182
54183 /* "pysam/libcbcf.pyx":2690
54184 * def get(self, key, default=None):
54185 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
54186 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
54187 * cdef bcf1_t *r = self.record.ptr
54188 *
54189 */
54190 __pyx_t_1 = __pyx_v_self->record->header->ptr;
54191 __pyx_v_hdr = __pyx_t_1;
54192
54193 /* "pysam/libcbcf.pyx":2691
54194 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
54195 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54196 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
54197 *
54198 * if bcf_unpack(r, BCF_UN_INFO) < 0:
54199 */
54200 __pyx_t_2 = __pyx_v_self->record->ptr;
54201 __pyx_v_r = __pyx_t_2;
54202
54203 /* "pysam/libcbcf.pyx":2693
54204 * cdef bcf1_t *r = self.record.ptr
54205 *
54206 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
54207 * raise ValueError('Error unpacking VariantRecord')
54208 *
54209 */
54210 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
54211 if (unlikely(__pyx_t_3)) {
54212
54213 /* "pysam/libcbcf.pyx":2694
54214 *
54215 * if bcf_unpack(r, BCF_UN_INFO) < 0:
54216 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
54217 *
54218 * cdef bytes bkey = force_bytes(key)
54219 */
54220 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2694, __pyx_L1_error)
54221 __Pyx_GOTREF(__pyx_t_4);
54222 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
54223 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
54224 __PYX_ERR(0, 2694, __pyx_L1_error)
54225
54226 /* "pysam/libcbcf.pyx":2693
54227 * cdef bcf1_t *r = self.record.ptr
54228 *
54229 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
54230 * raise ValueError('Error unpacking VariantRecord')
54231 *
54232 */
54233 }
54234
54235 /* "pysam/libcbcf.pyx":2696
54236 * raise ValueError('Error unpacking VariantRecord')
54237 *
54238 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
54239 *
54240 * if strcmp(bkey, b'END') == 0:
54241 */
54242 __pyx_t_4 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2696, __pyx_L1_error)
54243 __Pyx_GOTREF(__pyx_t_4);
54244 __pyx_v_bkey = ((PyObject*)__pyx_t_4);
54245 __pyx_t_4 = 0;
54246
54247 /* "pysam/libcbcf.pyx":2698
54248 * cdef bytes bkey = force_bytes(key)
54249 *
54250 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
54251 * return default
54252 *
54253 */
54254 if (unlikely(__pyx_v_bkey == Py_None)) {
54255 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
54256 __PYX_ERR(0, 2698, __pyx_L1_error)
54257 }
54258 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2698, __pyx_L1_error)
54259 __pyx_t_3 = (strcmp(__pyx_t_5, ((char const *)"END")) == 0);
54260 if (__pyx_t_3) {
54261
54262 /* "pysam/libcbcf.pyx":2699
54263 *
54264 * if strcmp(bkey, b'END') == 0:
54265 * return default # <<<<<<<<<<<<<<
54266 *
54267 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
54268 */
54269 __Pyx_XDECREF(__pyx_r);
54270 __Pyx_INCREF(__pyx_v_default);
54271 __pyx_r = __pyx_v_default;
54272 goto __pyx_L0;
54273
54274 /* "pysam/libcbcf.pyx":2698
54275 * cdef bytes bkey = force_bytes(key)
54276 *
54277 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
54278 * return default
54279 *
54280 */
54281 }
54282
54283 /* "pysam/libcbcf.pyx":2701
54284 * return default
54285 *
54286 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey) # <<<<<<<<<<<<<<
54287 *
54288 * # Cannot stop here if info == NULL, since flags must return False
54289 */
54290 if (unlikely(__pyx_v_bkey == Py_None)) {
54291 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
54292 __PYX_ERR(0, 2701, __pyx_L1_error)
54293 }
54294 __pyx_t_6 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 2701, __pyx_L1_error)
54295 __pyx_v_info = bcf_get_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_6);
54296
54297 /* "pysam/libcbcf.pyx":2704
54298 *
54299 * # Cannot stop here if info == NULL, since flags must return False
54300 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key # <<<<<<<<<<<<<<
54301 *
54302 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
54303 */
54304 __pyx_t_3 = (!(__pyx_v_info != 0));
54305 if (__pyx_t_3) {
54306 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_bcf_header_get_info_id(__pyx_v_hdr, __pyx_v_bkey); if (unlikely(__pyx_t_8 == ((int)-2) && PyErr_Occurred())) __PYX_ERR(0, 2704, __pyx_L1_error)
54307 __pyx_t_7 = __pyx_t_8;
54308 } else {
54309 __pyx_t_7 = __pyx_v_info->key;
54310 }
54311 __pyx_v_info_id = __pyx_t_7;
54312
54313 /* "pysam/libcbcf.pyx":2706
54314 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key
54315 *
54316 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
54317 * raise ValueError('Invalid header')
54318 *
54319 */
54320 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2706, __pyx_L1_error)
54321 __pyx_t_9 = (!__pyx_t_3);
54322 if (unlikely(__pyx_t_9)) {
54323
54324 /* "pysam/libcbcf.pyx":2707
54325 *
54326 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
54327 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
54328 *
54329 * # Handle flags
54330 */
54331 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2707, __pyx_L1_error)
54332 __Pyx_GOTREF(__pyx_t_4);
54333 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
54334 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
54335 __PYX_ERR(0, 2707, __pyx_L1_error)
54336
54337 /* "pysam/libcbcf.pyx":2706
54338 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key
54339 *
54340 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
54341 * raise ValueError('Invalid header')
54342 *
54343 */
54344 }
54345
54346 /* "pysam/libcbcf.pyx":2710
54347 *
54348 * # Handle flags
54349 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG: # <<<<<<<<<<<<<<
54350 * return info != NULL and info.vptr != NULL
54351 *
54352 */
54353 __pyx_t_9 = (bcf_hdr_id2type(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id) == BCF_HT_FLAG);
54354 if (__pyx_t_9) {
54355
54356 /* "pysam/libcbcf.pyx":2711
54357 * # Handle flags
54358 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG:
54359 * return info != NULL and info.vptr != NULL # <<<<<<<<<<<<<<
54360 *
54361 * if not info or not info.vptr:
54362 */
54363 __Pyx_XDECREF(__pyx_r);
54364 __pyx_t_9 = (__pyx_v_info != NULL);
54365 if (__pyx_t_9) {
54366 } else {
54367 __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2711, __pyx_L1_error)
54368 __Pyx_GOTREF(__pyx_t_10);
54369 __pyx_t_4 = __pyx_t_10;
54370 __pyx_t_10 = 0;
54371 goto __pyx_L7_bool_binop_done;
54372 }
54373 __pyx_t_9 = (__pyx_v_info->vptr != NULL);
54374 __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2711, __pyx_L1_error)
54375 __Pyx_GOTREF(__pyx_t_10);
54376 __pyx_t_4 = __pyx_t_10;
54377 __pyx_t_10 = 0;
54378 __pyx_L7_bool_binop_done:;
54379 __pyx_r = __pyx_t_4;
54380 __pyx_t_4 = 0;
54381 goto __pyx_L0;
54382
54383 /* "pysam/libcbcf.pyx":2710
54384 *
54385 * # Handle flags
54386 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG: # <<<<<<<<<<<<<<
54387 * return info != NULL and info.vptr != NULL
54388 *
54389 */
54390 }
54391
54392 /* "pysam/libcbcf.pyx":2713
54393 * return info != NULL and info.vptr != NULL
54394 *
54395 * if not info or not info.vptr: # <<<<<<<<<<<<<<
54396 * return default
54397 *
54398 */
54399 __pyx_t_3 = (!(__pyx_v_info != 0));
54400 if (!__pyx_t_3) {
54401 } else {
54402 __pyx_t_9 = __pyx_t_3;
54403 goto __pyx_L10_bool_binop_done;
54404 }
54405 __pyx_t_3 = (!(__pyx_v_info->vptr != 0));
54406 __pyx_t_9 = __pyx_t_3;
54407 __pyx_L10_bool_binop_done:;
54408 if (__pyx_t_9) {
54409
54410 /* "pysam/libcbcf.pyx":2714
54411 *
54412 * if not info or not info.vptr:
54413 * return default # <<<<<<<<<<<<<<
54414 *
54415 * return bcf_info_get_value(self.record, info)
54416 */
54417 __Pyx_XDECREF(__pyx_r);
54418 __Pyx_INCREF(__pyx_v_default);
54419 __pyx_r = __pyx_v_default;
54420 goto __pyx_L0;
54421
54422 /* "pysam/libcbcf.pyx":2713
54423 * return info != NULL and info.vptr != NULL
54424 *
54425 * if not info or not info.vptr: # <<<<<<<<<<<<<<
54426 * return default
54427 *
54428 */
54429 }
54430
54431 /* "pysam/libcbcf.pyx":2716
54432 * return default
54433 *
54434 * return bcf_info_get_value(self.record, info) # <<<<<<<<<<<<<<
54435 *
54436 * def __contains__(self, key):
54437 */
54438 __Pyx_XDECREF(__pyx_r);
54439 __pyx_t_4 = ((PyObject *)__pyx_v_self->record);
54440 __Pyx_INCREF(__pyx_t_4);
54441 __pyx_t_10 = __pyx_f_5pysam_7libcbcf_bcf_info_get_value(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_4), __pyx_v_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2716, __pyx_L1_error)
54442 __Pyx_GOTREF(__pyx_t_10);
54443 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
54444 __pyx_r = __pyx_t_10;
54445 __pyx_t_10 = 0;
54446 goto __pyx_L0;
54447
54448 /* "pysam/libcbcf.pyx":2688
54449 * yield bcf_str_cache_get_charptr(key)
54450 *
54451 * def get(self, key, default=None): # <<<<<<<<<<<<<<
54452 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
54453 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54454 */
54455
54456 /* function exit code */
54457 __pyx_L1_error:;
54458 __Pyx_XDECREF(__pyx_t_4);
54459 __Pyx_XDECREF(__pyx_t_10);
54460 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
54461 __pyx_r = NULL;
54462 __pyx_L0:;
54463 __Pyx_XDECREF(__pyx_v_bkey);
54464 __Pyx_XGIVEREF(__pyx_r);
54465 __Pyx_TraceReturn(__pyx_r, 0);
54466 __Pyx_RefNannyFinishContext();
54467 return __pyx_r;
54468 }
54469
54470 /* "pysam/libcbcf.pyx":2718
54471 * return bcf_info_get_value(self.record, info)
54472 *
54473 * def __contains__(self, key): # <<<<<<<<<<<<<<
54474 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54475 * cdef bcf1_t *r = self.record.ptr
54476 */
54477
54478 /* Python wrapper */
54479 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
54480 static int __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
54481 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
54482 int __pyx_r;
54483 __Pyx_RefNannyDeclarations
54484 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
54485 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
54486 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_19__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), ((PyObject *)__pyx_v_key));
54487
54488 /* function exit code */
54489 __Pyx_RefNannyFinishContext();
54490 return __pyx_r;
54491 }
54492
54493 static int __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_19__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key) {
54494 bcf_hdr_t *__pyx_v_hdr;
54495 bcf1_t *__pyx_v_r;
54496 PyObject *__pyx_v_bkey = 0;
54497 bcf_info_t *__pyx_v_info;
54498 int __pyx_r;
54499 __Pyx_TraceDeclarations
54500 __Pyx_RefNannyDeclarations
54501 bcf_hdr_t *__pyx_t_1;
54502 bcf1_t *__pyx_t_2;
54503 int __pyx_t_3;
54504 PyObject *__pyx_t_4 = NULL;
54505 char const *__pyx_t_5;
54506 char const *__pyx_t_6;
54507 int __pyx_t_7;
54508 int __pyx_lineno = 0;
54509 const char *__pyx_filename = NULL;
54510 int __pyx_clineno = 0;
54511 __Pyx_RefNannySetupContext("__contains__", 1);
54512 __Pyx_TraceCall("__contains__", __pyx_f[0], 2718, 0, __PYX_ERR(0, 2718, __pyx_L1_error));
54513
54514 /* "pysam/libcbcf.pyx":2719
54515 *
54516 * def __contains__(self, key):
54517 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
54518 * cdef bcf1_t *r = self.record.ptr
54519 *
54520 */
54521 __pyx_t_1 = __pyx_v_self->record->header->ptr;
54522 __pyx_v_hdr = __pyx_t_1;
54523
54524 /* "pysam/libcbcf.pyx":2720
54525 * def __contains__(self, key):
54526 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54527 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
54528 *
54529 * if bcf_unpack(r, BCF_UN_INFO) < 0:
54530 */
54531 __pyx_t_2 = __pyx_v_self->record->ptr;
54532 __pyx_v_r = __pyx_t_2;
54533
54534 /* "pysam/libcbcf.pyx":2722
54535 * cdef bcf1_t *r = self.record.ptr
54536 *
54537 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
54538 * raise ValueError('Error unpacking VariantRecord')
54539 *
54540 */
54541 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
54542 if (unlikely(__pyx_t_3)) {
54543
54544 /* "pysam/libcbcf.pyx":2723
54545 *
54546 * if bcf_unpack(r, BCF_UN_INFO) < 0:
54547 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
54548 *
54549 * cdef bytes bkey = force_bytes(key)
54550 */
54551 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2723, __pyx_L1_error)
54552 __Pyx_GOTREF(__pyx_t_4);
54553 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
54554 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
54555 __PYX_ERR(0, 2723, __pyx_L1_error)
54556
54557 /* "pysam/libcbcf.pyx":2722
54558 * cdef bcf1_t *r = self.record.ptr
54559 *
54560 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
54561 * raise ValueError('Error unpacking VariantRecord')
54562 *
54563 */
54564 }
54565
54566 /* "pysam/libcbcf.pyx":2725
54567 * raise ValueError('Error unpacking VariantRecord')
54568 *
54569 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
54570 *
54571 * if strcmp(bkey, b'END') == 0:
54572 */
54573 __pyx_t_4 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2725, __pyx_L1_error)
54574 __Pyx_GOTREF(__pyx_t_4);
54575 __pyx_v_bkey = ((PyObject*)__pyx_t_4);
54576 __pyx_t_4 = 0;
54577
54578 /* "pysam/libcbcf.pyx":2727
54579 * cdef bytes bkey = force_bytes(key)
54580 *
54581 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
54582 * return False
54583 *
54584 */
54585 if (unlikely(__pyx_v_bkey == Py_None)) {
54586 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
54587 __PYX_ERR(0, 2727, __pyx_L1_error)
54588 }
54589 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2727, __pyx_L1_error)
54590 __pyx_t_3 = (strcmp(__pyx_t_5, ((char const *)"END")) == 0);
54591 if (__pyx_t_3) {
54592
54593 /* "pysam/libcbcf.pyx":2728
54594 *
54595 * if strcmp(bkey, b'END') == 0:
54596 * return False # <<<<<<<<<<<<<<
54597 *
54598 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
54599 */
54600 __pyx_r = 0;
54601 goto __pyx_L0;
54602
54603 /* "pysam/libcbcf.pyx":2727
54604 * cdef bytes bkey = force_bytes(key)
54605 *
54606 * if strcmp(bkey, b'END') == 0: # <<<<<<<<<<<<<<
54607 * return False
54608 *
54609 */
54610 }
54611
54612 /* "pysam/libcbcf.pyx":2730
54613 * return False
54614 *
54615 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey) # <<<<<<<<<<<<<<
54616 *
54617 * return info != NULL and info.vptr != NULL
54618 */
54619 if (unlikely(__pyx_v_bkey == Py_None)) {
54620 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
54621 __PYX_ERR(0, 2730, __pyx_L1_error)
54622 }
54623 __pyx_t_6 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 2730, __pyx_L1_error)
54624 __pyx_v_info = bcf_get_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_6);
54625
54626 /* "pysam/libcbcf.pyx":2732
54627 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
54628 *
54629 * return info != NULL and info.vptr != NULL # <<<<<<<<<<<<<<
54630 *
54631 * def iterkeys(self):
54632 */
54633 __pyx_t_3 = (__pyx_v_info != NULL);
54634 if (__pyx_t_3) {
54635 } else {
54636 __pyx_t_7 = __pyx_t_3;
54637 goto __pyx_L5_bool_binop_done;
54638 }
54639 __pyx_t_3 = (__pyx_v_info->vptr != NULL);
54640 __pyx_t_7 = __pyx_t_3;
54641 __pyx_L5_bool_binop_done:;
54642 __pyx_r = __pyx_t_7;
54643 goto __pyx_L0;
54644
54645 /* "pysam/libcbcf.pyx":2718
54646 * return bcf_info_get_value(self.record, info)
54647 *
54648 * def __contains__(self, key): # <<<<<<<<<<<<<<
54649 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54650 * cdef bcf1_t *r = self.record.ptr
54651 */
54652
54653 /* function exit code */
54654 __pyx_L1_error:;
54655 __Pyx_XDECREF(__pyx_t_4);
54656 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54657 __pyx_r = -1;
54658 __pyx_L0:;
54659 __Pyx_XDECREF(__pyx_v_bkey);
54660 __Pyx_TraceReturn(Py_None, 0);
54661 __Pyx_RefNannyFinishContext();
54662 return __pyx_r;
54663 }
54664
54665 /* "pysam/libcbcf.pyx":2734
54666 * return info != NULL and info.vptr != NULL
54667 *
54668 * def iterkeys(self): # <<<<<<<<<<<<<<
54669 * """D.iterkeys() -> an iterator over the keys of D"""
54670 * return iter(self)
54671 */
54672
54673 /* Python wrapper */
54674 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_22iterkeys(PyObject *__pyx_v_self,
54675 #if CYTHON_METH_FASTCALL
54676 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
54677 #else
54678 PyObject *__pyx_args, PyObject *__pyx_kwds
54679 #endif
54680 ); /*proto*/
54681 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_21iterkeys, "VariantRecordInfo.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
54682 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_22iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_22iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_21iterkeys};
54683 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_22iterkeys(PyObject *__pyx_v_self,
54684 #if CYTHON_METH_FASTCALL
54685 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
54686 #else
54687 PyObject *__pyx_args, PyObject *__pyx_kwds
54688 #endif
54689 ) {
54690 #if !CYTHON_METH_FASTCALL
54691 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
54692 #endif
54693 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
54694 PyObject *__pyx_r = 0;
54695 __Pyx_RefNannyDeclarations
54696 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
54697 #if !CYTHON_METH_FASTCALL
54698 #if CYTHON_ASSUME_SAFE_MACROS
54699 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
54700 #else
54701 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
54702 #endif
54703 #endif
54704 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
54705 if (unlikely(__pyx_nargs > 0)) {
54706 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
54707 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
54708 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_21iterkeys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
54709
54710 /* function exit code */
54711 __Pyx_RefNannyFinishContext();
54712 return __pyx_r;
54713 }
54714
54715 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_21iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
54716 PyObject *__pyx_r = NULL;
54717 __Pyx_TraceDeclarations
54718 __Pyx_RefNannyDeclarations
54719 PyObject *__pyx_t_1 = NULL;
54720 int __pyx_lineno = 0;
54721 const char *__pyx_filename = NULL;
54722 int __pyx_clineno = 0;
54723 __Pyx_TraceFrameInit(__pyx_codeobj__139)
54724 __Pyx_RefNannySetupContext("iterkeys", 1);
54725 __Pyx_TraceCall("iterkeys", __pyx_f[0], 2734, 0, __PYX_ERR(0, 2734, __pyx_L1_error));
54726
54727 /* "pysam/libcbcf.pyx":2736
54728 * def iterkeys(self):
54729 * """D.iterkeys() -> an iterator over the keys of D"""
54730 * return iter(self) # <<<<<<<<<<<<<<
54731 *
54732 * def itervalues(self):
54733 */
54734 __Pyx_XDECREF(__pyx_r);
54735 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2736, __pyx_L1_error)
54736 __Pyx_GOTREF(__pyx_t_1);
54737 __pyx_r = __pyx_t_1;
54738 __pyx_t_1 = 0;
54739 goto __pyx_L0;
54740
54741 /* "pysam/libcbcf.pyx":2734
54742 * return info != NULL and info.vptr != NULL
54743 *
54744 * def iterkeys(self): # <<<<<<<<<<<<<<
54745 * """D.iterkeys() -> an iterator over the keys of D"""
54746 * return iter(self)
54747 */
54748
54749 /* function exit code */
54750 __pyx_L1_error:;
54751 __Pyx_XDECREF(__pyx_t_1);
54752 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
54753 __pyx_r = NULL;
54754 __pyx_L0:;
54755 __Pyx_XGIVEREF(__pyx_r);
54756 __Pyx_TraceReturn(__pyx_r, 0);
54757 __Pyx_RefNannyFinishContext();
54758 return __pyx_r;
54759 }
54760 static PyObject *__pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_25generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
54761
54762 /* "pysam/libcbcf.pyx":2738
54763 * return iter(self)
54764 *
54765 * def itervalues(self): # <<<<<<<<<<<<<<
54766 * """D.itervalues() -> an iterator over the values of D"""
54767 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54768 */
54769
54770 /* Python wrapper */
54771 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_24itervalues(PyObject *__pyx_v_self,
54772 #if CYTHON_METH_FASTCALL
54773 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
54774 #else
54775 PyObject *__pyx_args, PyObject *__pyx_kwds
54776 #endif
54777 ); /*proto*/
54778 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_23itervalues, "VariantRecordInfo.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
54779 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_24itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_24itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_23itervalues};
54780 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_24itervalues(PyObject *__pyx_v_self,
54781 #if CYTHON_METH_FASTCALL
54782 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
54783 #else
54784 PyObject *__pyx_args, PyObject *__pyx_kwds
54785 #endif
54786 ) {
54787 #if !CYTHON_METH_FASTCALL
54788 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
54789 #endif
54790 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
54791 PyObject *__pyx_r = 0;
54792 __Pyx_RefNannyDeclarations
54793 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
54794 #if !CYTHON_METH_FASTCALL
54795 #if CYTHON_ASSUME_SAFE_MACROS
54796 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
54797 #else
54798 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
54799 #endif
54800 #endif
54801 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
54802 if (unlikely(__pyx_nargs > 0)) {
54803 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
54804 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
54805 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_23itervalues(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
54806
54807 /* function exit code */
54808 __Pyx_RefNannyFinishContext();
54809 return __pyx_r;
54810 }
54811
54812 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_23itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
54813 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *__pyx_cur_scope;
54814 PyObject *__pyx_r = NULL;
54815 __Pyx_RefNannyDeclarations
54816 int __pyx_lineno = 0;
54817 const char *__pyx_filename = NULL;
54818 int __pyx_clineno = 0;
54819 __Pyx_RefNannySetupContext("itervalues", 0);
54820 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_25_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues, __pyx_empty_tuple, NULL);
54821 if (unlikely(!__pyx_cur_scope)) {
54822 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *)Py_None);
54823 __Pyx_INCREF(Py_None);
54824 __PYX_ERR(0, 2738, __pyx_L1_error)
54825 } else {
54826 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
54827 }
54828 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
54829 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
54830 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
54831 {
54832 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_25generator18, __pyx_codeobj__140, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_VariantRecordInfo_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2738, __pyx_L1_error)
54833 __Pyx_DECREF(__pyx_cur_scope);
54834 __Pyx_RefNannyFinishContext();
54835 return (PyObject *) gen;
54836 }
54837
54838 /* function exit code */
54839 __pyx_L1_error:;
54840 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
54841 __pyx_r = NULL;
54842 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
54843 __Pyx_XGIVEREF(__pyx_r);
54844 __Pyx_RefNannyFinishContext();
54845 return __pyx_r;
54846 }
54847
54848 static PyObject *__pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_25generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
54849 {
54850 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *)__pyx_generator->closure);
54851 PyObject *__pyx_r = NULL;
54852 __Pyx_TraceDeclarations
54853 bcf_hdr_t *__pyx_t_1;
54854 bcf1_t *__pyx_t_2;
54855 int __pyx_t_3;
54856 PyObject *__pyx_t_4 = NULL;
54857 uint32_t __pyx_t_5;
54858 uint32_t __pyx_t_6;
54859 int __pyx_t_7;
54860 int __pyx_t_8;
54861 PyObject *__pyx_t_9 = NULL;
54862 int __pyx_lineno = 0;
54863 const char *__pyx_filename = NULL;
54864 int __pyx_clineno = 0;
54865 __Pyx_RefNannyDeclarations
54866 __Pyx_RefNannySetupContext("itervalues", 0);
54867 __Pyx_TraceFrameInit(__pyx_codeobj__140)
54868 __Pyx_TraceCall("itervalues", __pyx_f[0], 2738, 0, __PYX_ERR(0, 2738, __pyx_L1_error));
54869 switch (__pyx_generator->resume_label) {
54870 case 0: goto __pyx_L3_first_run;
54871 case 1: goto __pyx_L11_resume_from_yield;
54872 default: /* CPython raises the right error here */
54873 __Pyx_TraceReturn(Py_None, 0);
54874 __Pyx_RefNannyFinishContext();
54875 return NULL;
54876 }
54877 __pyx_L3_first_run:;
54878 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2738, __pyx_L1_error)
54879
54880 /* "pysam/libcbcf.pyx":2740
54881 * def itervalues(self):
54882 * """D.itervalues() -> an iterator over the values of D"""
54883 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
54884 * cdef bcf1_t *r = self.record.ptr
54885 * cdef bcf_info_t *info
54886 */
54887 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
54888 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
54889
54890 /* "pysam/libcbcf.pyx":2741
54891 * """D.itervalues() -> an iterator over the values of D"""
54892 * cdef bcf_hdr_t *hdr = self.record.header.ptr
54893 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
54894 * cdef bcf_info_t *info
54895 * cdef const char *key
54896 */
54897 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
54898 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
54899
54900 /* "pysam/libcbcf.pyx":2746
54901 * cdef int i
54902 *
54903 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
54904 * raise ValueError('Error unpacking VariantRecord')
54905 *
54906 */
54907 __pyx_t_3 = (bcf_unpack(__pyx_cur_scope->__pyx_v_r, BCF_UN_INFO) < 0);
54908 if (unlikely(__pyx_t_3)) {
54909
54910 /* "pysam/libcbcf.pyx":2747
54911 *
54912 * if bcf_unpack(r, BCF_UN_INFO) < 0:
54913 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
54914 *
54915 * for i in range(r.n_info):
54916 */
54917 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2747, __pyx_L1_error)
54918 __Pyx_GOTREF(__pyx_t_4);
54919 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
54920 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
54921 __PYX_ERR(0, 2747, __pyx_L1_error)
54922
54923 /* "pysam/libcbcf.pyx":2746
54924 * cdef int i
54925 *
54926 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
54927 * raise ValueError('Error unpacking VariantRecord')
54928 *
54929 */
54930 }
54931
54932 /* "pysam/libcbcf.pyx":2749
54933 * raise ValueError('Error unpacking VariantRecord')
54934 *
54935 * for i in range(r.n_info): # <<<<<<<<<<<<<<
54936 * info = &r.d.info[i]
54937 * if info and info.vptr:
54938 */
54939 __pyx_t_5 = __pyx_cur_scope->__pyx_v_r->n_info;
54940 __pyx_t_6 = __pyx_t_5;
54941 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
54942 __pyx_cur_scope->__pyx_v_i = __pyx_t_7;
54943
54944 /* "pysam/libcbcf.pyx":2750
54945 *
54946 * for i in range(r.n_info):
54947 * info = &r.d.info[i] # <<<<<<<<<<<<<<
54948 * if info and info.vptr:
54949 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
54950 */
54951 __pyx_cur_scope->__pyx_v_info = (&(__pyx_cur_scope->__pyx_v_r->d.info[__pyx_cur_scope->__pyx_v_i]));
54952
54953 /* "pysam/libcbcf.pyx":2751
54954 * for i in range(r.n_info):
54955 * info = &r.d.info[i]
54956 * if info and info.vptr: # <<<<<<<<<<<<<<
54957 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
54958 * if strcmp(key, b'END') != 0:
54959 */
54960 __pyx_t_8 = (__pyx_cur_scope->__pyx_v_info != 0);
54961 if (__pyx_t_8) {
54962 } else {
54963 __pyx_t_3 = __pyx_t_8;
54964 goto __pyx_L8_bool_binop_done;
54965 }
54966 __pyx_t_8 = (__pyx_cur_scope->__pyx_v_info->vptr != 0);
54967 __pyx_t_3 = __pyx_t_8;
54968 __pyx_L8_bool_binop_done:;
54969 if (__pyx_t_3) {
54970
54971 /* "pysam/libcbcf.pyx":2752
54972 * info = &r.d.info[i]
54973 * if info and info.vptr:
54974 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key) # <<<<<<<<<<<<<<
54975 * if strcmp(key, b'END') != 0:
54976 * yield bcf_info_get_value(self.record, info)
54977 */
54978 __pyx_cur_scope->__pyx_v_key = bcf_hdr_int2id(__pyx_cur_scope->__pyx_v_hdr, BCF_DT_ID, __pyx_cur_scope->__pyx_v_info->key);
54979
54980 /* "pysam/libcbcf.pyx":2753
54981 * if info and info.vptr:
54982 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
54983 * if strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
54984 * yield bcf_info_get_value(self.record, info)
54985 *
54986 */
54987 __pyx_t_3 = (strcmp(__pyx_cur_scope->__pyx_v_key, ((char const *)"END")) != 0);
54988 if (__pyx_t_3) {
54989
54990 /* "pysam/libcbcf.pyx":2754
54991 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
54992 * if strcmp(key, b'END') != 0:
54993 * yield bcf_info_get_value(self.record, info) # <<<<<<<<<<<<<<
54994 *
54995 * def iteritems(self):
54996 */
54997 __pyx_t_4 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->record);
54998 __Pyx_INCREF(__pyx_t_4);
54999 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_info_get_value(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_4), __pyx_cur_scope->__pyx_v_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2754, __pyx_L1_error)
55000 __Pyx_GOTREF(__pyx_t_9);
55001 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
55002 __pyx_r = __pyx_t_9;
55003 __pyx_t_9 = 0;
55004 __pyx_cur_scope->__pyx_t_0 = __pyx_t_5;
55005 __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
55006 __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
55007 __Pyx_XGIVEREF(__pyx_r);
55008 __Pyx_TraceReturn(__pyx_r, 0);
55009 __Pyx_RefNannyFinishContext();
55010 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
55011 /* return from generator, yielding value */
55012 __pyx_generator->resume_label = 1;
55013 return __pyx_r;
55014 __pyx_L11_resume_from_yield:;
55015 __pyx_t_5 = __pyx_cur_scope->__pyx_t_0;
55016 __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
55017 __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
55018 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2754, __pyx_L1_error)
55019
55020 /* "pysam/libcbcf.pyx":2753
55021 * if info and info.vptr:
55022 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
55023 * if strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
55024 * yield bcf_info_get_value(self.record, info)
55025 *
55026 */
55027 }
55028
55029 /* "pysam/libcbcf.pyx":2751
55030 * for i in range(r.n_info):
55031 * info = &r.d.info[i]
55032 * if info and info.vptr: # <<<<<<<<<<<<<<
55033 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
55034 * if strcmp(key, b'END') != 0:
55035 */
55036 }
55037 }
55038 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
55039
55040 /* "pysam/libcbcf.pyx":2738
55041 * return iter(self)
55042 *
55043 * def itervalues(self): # <<<<<<<<<<<<<<
55044 * """D.itervalues() -> an iterator over the values of D"""
55045 * cdef bcf_hdr_t *hdr = self.record.header.ptr
55046 */
55047
55048 /* function exit code */
55049 PyErr_SetNone(PyExc_StopIteration);
55050 goto __pyx_L0;
55051 __pyx_L1_error:;
55052 __Pyx_Generator_Replace_StopIteration(0);
55053 __Pyx_XDECREF(__pyx_t_4);
55054 __Pyx_XDECREF(__pyx_t_9);
55055 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
55056 __pyx_L0:;
55057 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
55058 #if !CYTHON_USE_EXC_INFO_STACK
55059 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
55060 #endif
55061 __pyx_generator->resume_label = -1;
55062 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
55063 __Pyx_TraceReturn(__pyx_r, 0);
55064 __Pyx_RefNannyFinishContext();
55065 return __pyx_r;
55066 }
55067 static PyObject *__pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_28generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
55068
55069 /* "pysam/libcbcf.pyx":2756
55070 * yield bcf_info_get_value(self.record, info)
55071 *
55072 * def iteritems(self): # <<<<<<<<<<<<<<
55073 * """D.iteritems() -> an iterator over the (key, value) items of D"""
55074 * cdef bcf_hdr_t *hdr = self.record.header.ptr
55075 */
55076
55077 /* Python wrapper */
55078 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_27iteritems(PyObject *__pyx_v_self,
55079 #if CYTHON_METH_FASTCALL
55080 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55081 #else
55082 PyObject *__pyx_args, PyObject *__pyx_kwds
55083 #endif
55084 ); /*proto*/
55085 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_26iteritems, "VariantRecordInfo.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
55086 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_27iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_27iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_26iteritems};
55087 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_27iteritems(PyObject *__pyx_v_self,
55088 #if CYTHON_METH_FASTCALL
55089 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55090 #else
55091 PyObject *__pyx_args, PyObject *__pyx_kwds
55092 #endif
55093 ) {
55094 #if !CYTHON_METH_FASTCALL
55095 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
55096 #endif
55097 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
55098 PyObject *__pyx_r = 0;
55099 __Pyx_RefNannyDeclarations
55100 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
55101 #if !CYTHON_METH_FASTCALL
55102 #if CYTHON_ASSUME_SAFE_MACROS
55103 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
55104 #else
55105 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
55106 #endif
55107 #endif
55108 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
55109 if (unlikely(__pyx_nargs > 0)) {
55110 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
55111 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
55112 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_26iteritems(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
55113
55114 /* function exit code */
55115 __Pyx_RefNannyFinishContext();
55116 return __pyx_r;
55117 }
55118
55119 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_26iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
55120 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *__pyx_cur_scope;
55121 PyObject *__pyx_r = NULL;
55122 __Pyx_RefNannyDeclarations
55123 int __pyx_lineno = 0;
55124 const char *__pyx_filename = NULL;
55125 int __pyx_clineno = 0;
55126 __Pyx_RefNannySetupContext("iteritems", 0);
55127 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_26_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems, __pyx_empty_tuple, NULL);
55128 if (unlikely(!__pyx_cur_scope)) {
55129 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *)Py_None);
55130 __Pyx_INCREF(Py_None);
55131 __PYX_ERR(0, 2756, __pyx_L1_error)
55132 } else {
55133 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
55134 }
55135 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
55136 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
55137 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
55138 {
55139 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_28generator19, __pyx_codeobj__141, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_VariantRecordInfo_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2756, __pyx_L1_error)
55140 __Pyx_DECREF(__pyx_cur_scope);
55141 __Pyx_RefNannyFinishContext();
55142 return (PyObject *) gen;
55143 }
55144
55145 /* function exit code */
55146 __pyx_L1_error:;
55147 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
55148 __pyx_r = NULL;
55149 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
55150 __Pyx_XGIVEREF(__pyx_r);
55151 __Pyx_RefNannyFinishContext();
55152 return __pyx_r;
55153 }
55154
55155 static PyObject *__pyx_gb_5pysam_7libcbcf_17VariantRecordInfo_28generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
55156 {
55157 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *)__pyx_generator->closure);
55158 PyObject *__pyx_r = NULL;
55159 __Pyx_TraceDeclarations
55160 bcf_hdr_t *__pyx_t_1;
55161 bcf1_t *__pyx_t_2;
55162 int __pyx_t_3;
55163 PyObject *__pyx_t_4 = NULL;
55164 uint32_t __pyx_t_5;
55165 uint32_t __pyx_t_6;
55166 int __pyx_t_7;
55167 int __pyx_t_8;
55168 PyObject *__pyx_t_9 = NULL;
55169 int __pyx_lineno = 0;
55170 const char *__pyx_filename = NULL;
55171 int __pyx_clineno = 0;
55172 __Pyx_RefNannyDeclarations
55173 __Pyx_RefNannySetupContext("iteritems", 0);
55174 __Pyx_TraceFrameInit(__pyx_codeobj__141)
55175 __Pyx_TraceCall("iteritems", __pyx_f[0], 2756, 0, __PYX_ERR(0, 2756, __pyx_L1_error));
55176 switch (__pyx_generator->resume_label) {
55177 case 0: goto __pyx_L3_first_run;
55178 case 1: goto __pyx_L11_resume_from_yield;
55179 default: /* CPython raises the right error here */
55180 __Pyx_TraceReturn(Py_None, 0);
55181 __Pyx_RefNannyFinishContext();
55182 return NULL;
55183 }
55184 __pyx_L3_first_run:;
55185 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2756, __pyx_L1_error)
55186
55187 /* "pysam/libcbcf.pyx":2758
55188 * def iteritems(self):
55189 * """D.iteritems() -> an iterator over the (key, value) items of D"""
55190 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
55191 * cdef bcf1_t *r = self.record.ptr
55192 * cdef bcf_info_t *info
55193 */
55194 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
55195 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
55196
55197 /* "pysam/libcbcf.pyx":2759
55198 * """D.iteritems() -> an iterator over the (key, value) items of D"""
55199 * cdef bcf_hdr_t *hdr = self.record.header.ptr
55200 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
55201 * cdef bcf_info_t *info
55202 * cdef const char *key
55203 */
55204 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
55205 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
55206
55207 /* "pysam/libcbcf.pyx":2764
55208 * cdef int i
55209 *
55210 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
55211 * raise ValueError('Error unpacking VariantRecord')
55212 *
55213 */
55214 __pyx_t_3 = (bcf_unpack(__pyx_cur_scope->__pyx_v_r, BCF_UN_INFO) < 0);
55215 if (unlikely(__pyx_t_3)) {
55216
55217 /* "pysam/libcbcf.pyx":2765
55218 *
55219 * if bcf_unpack(r, BCF_UN_INFO) < 0:
55220 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
55221 *
55222 * for i in range(r.n_info):
55223 */
55224 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2765, __pyx_L1_error)
55225 __Pyx_GOTREF(__pyx_t_4);
55226 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
55227 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
55228 __PYX_ERR(0, 2765, __pyx_L1_error)
55229
55230 /* "pysam/libcbcf.pyx":2764
55231 * cdef int i
55232 *
55233 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
55234 * raise ValueError('Error unpacking VariantRecord')
55235 *
55236 */
55237 }
55238
55239 /* "pysam/libcbcf.pyx":2767
55240 * raise ValueError('Error unpacking VariantRecord')
55241 *
55242 * for i in range(r.n_info): # <<<<<<<<<<<<<<
55243 * info = &r.d.info[i]
55244 * if info and info.vptr:
55245 */
55246 __pyx_t_5 = __pyx_cur_scope->__pyx_v_r->n_info;
55247 __pyx_t_6 = __pyx_t_5;
55248 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
55249 __pyx_cur_scope->__pyx_v_i = __pyx_t_7;
55250
55251 /* "pysam/libcbcf.pyx":2768
55252 *
55253 * for i in range(r.n_info):
55254 * info = &r.d.info[i] # <<<<<<<<<<<<<<
55255 * if info and info.vptr:
55256 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
55257 */
55258 __pyx_cur_scope->__pyx_v_info = (&(__pyx_cur_scope->__pyx_v_r->d.info[__pyx_cur_scope->__pyx_v_i]));
55259
55260 /* "pysam/libcbcf.pyx":2769
55261 * for i in range(r.n_info):
55262 * info = &r.d.info[i]
55263 * if info and info.vptr: # <<<<<<<<<<<<<<
55264 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
55265 * if strcmp(key, b'END') != 0:
55266 */
55267 __pyx_t_8 = (__pyx_cur_scope->__pyx_v_info != 0);
55268 if (__pyx_t_8) {
55269 } else {
55270 __pyx_t_3 = __pyx_t_8;
55271 goto __pyx_L8_bool_binop_done;
55272 }
55273 __pyx_t_8 = (__pyx_cur_scope->__pyx_v_info->vptr != 0);
55274 __pyx_t_3 = __pyx_t_8;
55275 __pyx_L8_bool_binop_done:;
55276 if (__pyx_t_3) {
55277
55278 /* "pysam/libcbcf.pyx":2770
55279 * info = &r.d.info[i]
55280 * if info and info.vptr:
55281 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key) # <<<<<<<<<<<<<<
55282 * if strcmp(key, b'END') != 0:
55283 * value = bcf_info_get_value(self.record, info)
55284 */
55285 __pyx_cur_scope->__pyx_v_key = bcf_hdr_int2id(__pyx_cur_scope->__pyx_v_hdr, BCF_DT_ID, __pyx_cur_scope->__pyx_v_info->key);
55286
55287 /* "pysam/libcbcf.pyx":2771
55288 * if info and info.vptr:
55289 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
55290 * if strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
55291 * value = bcf_info_get_value(self.record, info)
55292 * yield bcf_str_cache_get_charptr(key), value
55293 */
55294 __pyx_t_3 = (strcmp(__pyx_cur_scope->__pyx_v_key, ((char const *)"END")) != 0);
55295 if (__pyx_t_3) {
55296
55297 /* "pysam/libcbcf.pyx":2772
55298 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
55299 * if strcmp(key, b'END') != 0:
55300 * value = bcf_info_get_value(self.record, info) # <<<<<<<<<<<<<<
55301 * yield bcf_str_cache_get_charptr(key), value
55302 *
55303 */
55304 __pyx_t_4 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->record);
55305 __Pyx_INCREF(__pyx_t_4);
55306 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_info_get_value(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_4), __pyx_cur_scope->__pyx_v_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2772, __pyx_L1_error)
55307 __Pyx_GOTREF(__pyx_t_9);
55308 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
55309 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_value);
55310 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_9);
55311 __Pyx_GIVEREF(__pyx_t_9);
55312 __pyx_t_9 = 0;
55313
55314 /* "pysam/libcbcf.pyx":2773
55315 * if strcmp(key, b'END') != 0:
55316 * value = bcf_info_get_value(self.record, info)
55317 * yield bcf_str_cache_get_charptr(key), value # <<<<<<<<<<<<<<
55318 *
55319 * def keys(self):
55320 */
55321 __pyx_t_9 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(__pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2773, __pyx_L1_error)
55322 __Pyx_GOTREF(__pyx_t_9);
55323 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2773, __pyx_L1_error)
55324 __Pyx_GOTREF(__pyx_t_4);
55325 __Pyx_GIVEREF(__pyx_t_9);
55326 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9)) __PYX_ERR(0, 2773, __pyx_L1_error);
55327 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
55328 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value);
55329 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v_value)) __PYX_ERR(0, 2773, __pyx_L1_error);
55330 __pyx_t_9 = 0;
55331 __pyx_r = __pyx_t_4;
55332 __pyx_t_4 = 0;
55333 __pyx_cur_scope->__pyx_t_0 = __pyx_t_5;
55334 __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
55335 __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
55336 __Pyx_XGIVEREF(__pyx_r);
55337 __Pyx_TraceReturn(__pyx_r, 0);
55338 __Pyx_RefNannyFinishContext();
55339 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
55340 /* return from generator, yielding value */
55341 __pyx_generator->resume_label = 1;
55342 return __pyx_r;
55343 __pyx_L11_resume_from_yield:;
55344 __pyx_t_5 = __pyx_cur_scope->__pyx_t_0;
55345 __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
55346 __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
55347 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2773, __pyx_L1_error)
55348
55349 /* "pysam/libcbcf.pyx":2771
55350 * if info and info.vptr:
55351 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
55352 * if strcmp(key, b'END') != 0: # <<<<<<<<<<<<<<
55353 * value = bcf_info_get_value(self.record, info)
55354 * yield bcf_str_cache_get_charptr(key), value
55355 */
55356 }
55357
55358 /* "pysam/libcbcf.pyx":2769
55359 * for i in range(r.n_info):
55360 * info = &r.d.info[i]
55361 * if info and info.vptr: # <<<<<<<<<<<<<<
55362 * key = bcf_hdr_int2id(hdr, BCF_DT_ID, info.key)
55363 * if strcmp(key, b'END') != 0:
55364 */
55365 }
55366 }
55367 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
55368
55369 /* "pysam/libcbcf.pyx":2756
55370 * yield bcf_info_get_value(self.record, info)
55371 *
55372 * def iteritems(self): # <<<<<<<<<<<<<<
55373 * """D.iteritems() -> an iterator over the (key, value) items of D"""
55374 * cdef bcf_hdr_t *hdr = self.record.header.ptr
55375 */
55376
55377 /* function exit code */
55378 PyErr_SetNone(PyExc_StopIteration);
55379 goto __pyx_L0;
55380 __pyx_L1_error:;
55381 __Pyx_Generator_Replace_StopIteration(0);
55382 __Pyx_XDECREF(__pyx_t_4);
55383 __Pyx_XDECREF(__pyx_t_9);
55384 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
55385 __pyx_L0:;
55386 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
55387 #if !CYTHON_USE_EXC_INFO_STACK
55388 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
55389 #endif
55390 __pyx_generator->resume_label = -1;
55391 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
55392 __Pyx_TraceReturn(__pyx_r, 0);
55393 __Pyx_RefNannyFinishContext();
55394 return __pyx_r;
55395 }
55396
55397 /* "pysam/libcbcf.pyx":2775
55398 * yield bcf_str_cache_get_charptr(key), value
55399 *
55400 * def keys(self): # <<<<<<<<<<<<<<
55401 * """D.keys() -> list of D's keys"""
55402 * return list(self)
55403 */
55404
55405 /* Python wrapper */
55406 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_30keys(PyObject *__pyx_v_self,
55407 #if CYTHON_METH_FASTCALL
55408 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55409 #else
55410 PyObject *__pyx_args, PyObject *__pyx_kwds
55411 #endif
55412 ); /*proto*/
55413 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_29keys, "VariantRecordInfo.keys(self)\nD.keys() -> list of D's keys");
55414 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_30keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_30keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_29keys};
55415 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_30keys(PyObject *__pyx_v_self,
55416 #if CYTHON_METH_FASTCALL
55417 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55418 #else
55419 PyObject *__pyx_args, PyObject *__pyx_kwds
55420 #endif
55421 ) {
55422 #if !CYTHON_METH_FASTCALL
55423 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
55424 #endif
55425 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
55426 PyObject *__pyx_r = 0;
55427 __Pyx_RefNannyDeclarations
55428 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
55429 #if !CYTHON_METH_FASTCALL
55430 #if CYTHON_ASSUME_SAFE_MACROS
55431 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
55432 #else
55433 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
55434 #endif
55435 #endif
55436 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
55437 if (unlikely(__pyx_nargs > 0)) {
55438 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
55439 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
55440 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_29keys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
55441
55442 /* function exit code */
55443 __Pyx_RefNannyFinishContext();
55444 return __pyx_r;
55445 }
55446
55447 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_29keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
55448 PyObject *__pyx_r = NULL;
55449 __Pyx_TraceDeclarations
55450 __Pyx_RefNannyDeclarations
55451 PyObject *__pyx_t_1 = NULL;
55452 int __pyx_lineno = 0;
55453 const char *__pyx_filename = NULL;
55454 int __pyx_clineno = 0;
55455 __Pyx_TraceFrameInit(__pyx_codeobj__142)
55456 __Pyx_RefNannySetupContext("keys", 1);
55457 __Pyx_TraceCall("keys", __pyx_f[0], 2775, 0, __PYX_ERR(0, 2775, __pyx_L1_error));
55458
55459 /* "pysam/libcbcf.pyx":2777
55460 * def keys(self):
55461 * """D.keys() -> list of D's keys"""
55462 * return list(self) # <<<<<<<<<<<<<<
55463 *
55464 * def items(self):
55465 */
55466 __Pyx_XDECREF(__pyx_r);
55467 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2777, __pyx_L1_error)
55468 __Pyx_GOTREF(__pyx_t_1);
55469 __pyx_r = __pyx_t_1;
55470 __pyx_t_1 = 0;
55471 goto __pyx_L0;
55472
55473 /* "pysam/libcbcf.pyx":2775
55474 * yield bcf_str_cache_get_charptr(key), value
55475 *
55476 * def keys(self): # <<<<<<<<<<<<<<
55477 * """D.keys() -> list of D's keys"""
55478 * return list(self)
55479 */
55480
55481 /* function exit code */
55482 __pyx_L1_error:;
55483 __Pyx_XDECREF(__pyx_t_1);
55484 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
55485 __pyx_r = NULL;
55486 __pyx_L0:;
55487 __Pyx_XGIVEREF(__pyx_r);
55488 __Pyx_TraceReturn(__pyx_r, 0);
55489 __Pyx_RefNannyFinishContext();
55490 return __pyx_r;
55491 }
55492
55493 /* "pysam/libcbcf.pyx":2779
55494 * return list(self)
55495 *
55496 * def items(self): # <<<<<<<<<<<<<<
55497 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
55498 * return list(self.iteritems())
55499 */
55500
55501 /* Python wrapper */
55502 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_32items(PyObject *__pyx_v_self,
55503 #if CYTHON_METH_FASTCALL
55504 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55505 #else
55506 PyObject *__pyx_args, PyObject *__pyx_kwds
55507 #endif
55508 ); /*proto*/
55509 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_31items, "VariantRecordInfo.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
55510 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_32items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_32items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_31items};
55511 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_32items(PyObject *__pyx_v_self,
55512 #if CYTHON_METH_FASTCALL
55513 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55514 #else
55515 PyObject *__pyx_args, PyObject *__pyx_kwds
55516 #endif
55517 ) {
55518 #if !CYTHON_METH_FASTCALL
55519 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
55520 #endif
55521 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
55522 PyObject *__pyx_r = 0;
55523 __Pyx_RefNannyDeclarations
55524 __Pyx_RefNannySetupContext("items (wrapper)", 0);
55525 #if !CYTHON_METH_FASTCALL
55526 #if CYTHON_ASSUME_SAFE_MACROS
55527 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
55528 #else
55529 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
55530 #endif
55531 #endif
55532 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
55533 if (unlikely(__pyx_nargs > 0)) {
55534 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
55535 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
55536 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_31items(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
55537
55538 /* function exit code */
55539 __Pyx_RefNannyFinishContext();
55540 return __pyx_r;
55541 }
55542
55543 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_31items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
55544 PyObject *__pyx_r = NULL;
55545 __Pyx_TraceDeclarations
55546 __Pyx_RefNannyDeclarations
55547 PyObject *__pyx_t_1 = NULL;
55548 PyObject *__pyx_t_2 = NULL;
55549 PyObject *__pyx_t_3 = NULL;
55550 unsigned int __pyx_t_4;
55551 int __pyx_lineno = 0;
55552 const char *__pyx_filename = NULL;
55553 int __pyx_clineno = 0;
55554 __Pyx_TraceFrameInit(__pyx_codeobj__143)
55555 __Pyx_RefNannySetupContext("items", 1);
55556 __Pyx_TraceCall("items", __pyx_f[0], 2779, 0, __PYX_ERR(0, 2779, __pyx_L1_error));
55557
55558 /* "pysam/libcbcf.pyx":2781
55559 * def items(self):
55560 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
55561 * return list(self.iteritems()) # <<<<<<<<<<<<<<
55562 *
55563 * def values(self):
55564 */
55565 __Pyx_XDECREF(__pyx_r);
55566 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2781, __pyx_L1_error)
55567 __Pyx_GOTREF(__pyx_t_2);
55568 __pyx_t_3 = NULL;
55569 __pyx_t_4 = 0;
55570 #if CYTHON_UNPACK_METHODS
55571 if (likely(PyMethod_Check(__pyx_t_2))) {
55572 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
55573 if (likely(__pyx_t_3)) {
55574 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
55575 __Pyx_INCREF(__pyx_t_3);
55576 __Pyx_INCREF(function);
55577 __Pyx_DECREF_SET(__pyx_t_2, function);
55578 __pyx_t_4 = 1;
55579 }
55580 }
55581 #endif
55582 {
55583 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
55584 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
55585 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
55586 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __pyx_L1_error)
55587 __Pyx_GOTREF(__pyx_t_1);
55588 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55589 }
55590 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2781, __pyx_L1_error)
55591 __Pyx_GOTREF(__pyx_t_2);
55592 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55593 __pyx_r = __pyx_t_2;
55594 __pyx_t_2 = 0;
55595 goto __pyx_L0;
55596
55597 /* "pysam/libcbcf.pyx":2779
55598 * return list(self)
55599 *
55600 * def items(self): # <<<<<<<<<<<<<<
55601 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
55602 * return list(self.iteritems())
55603 */
55604
55605 /* function exit code */
55606 __pyx_L1_error:;
55607 __Pyx_XDECREF(__pyx_t_1);
55608 __Pyx_XDECREF(__pyx_t_2);
55609 __Pyx_XDECREF(__pyx_t_3);
55610 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
55611 __pyx_r = NULL;
55612 __pyx_L0:;
55613 __Pyx_XGIVEREF(__pyx_r);
55614 __Pyx_TraceReturn(__pyx_r, 0);
55615 __Pyx_RefNannyFinishContext();
55616 return __pyx_r;
55617 }
55618
55619 /* "pysam/libcbcf.pyx":2783
55620 * return list(self.iteritems())
55621 *
55622 * def values(self): # <<<<<<<<<<<<<<
55623 * """D.values() -> list of D's values"""
55624 * return list(self.itervalues())
55625 */
55626
55627 /* Python wrapper */
55628 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_34values(PyObject *__pyx_v_self,
55629 #if CYTHON_METH_FASTCALL
55630 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55631 #else
55632 PyObject *__pyx_args, PyObject *__pyx_kwds
55633 #endif
55634 ); /*proto*/
55635 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_33values, "VariantRecordInfo.values(self)\nD.values() -> list of D's values");
55636 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_34values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_34values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_33values};
55637 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_34values(PyObject *__pyx_v_self,
55638 #if CYTHON_METH_FASTCALL
55639 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55640 #else
55641 PyObject *__pyx_args, PyObject *__pyx_kwds
55642 #endif
55643 ) {
55644 #if !CYTHON_METH_FASTCALL
55645 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
55646 #endif
55647 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
55648 PyObject *__pyx_r = 0;
55649 __Pyx_RefNannyDeclarations
55650 __Pyx_RefNannySetupContext("values (wrapper)", 0);
55651 #if !CYTHON_METH_FASTCALL
55652 #if CYTHON_ASSUME_SAFE_MACROS
55653 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
55654 #else
55655 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
55656 #endif
55657 #endif
55658 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
55659 if (unlikely(__pyx_nargs > 0)) {
55660 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
55661 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
55662 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_33values(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
55663
55664 /* function exit code */
55665 __Pyx_RefNannyFinishContext();
55666 return __pyx_r;
55667 }
55668
55669 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_33values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
55670 PyObject *__pyx_r = NULL;
55671 __Pyx_TraceDeclarations
55672 __Pyx_RefNannyDeclarations
55673 PyObject *__pyx_t_1 = NULL;
55674 PyObject *__pyx_t_2 = NULL;
55675 PyObject *__pyx_t_3 = NULL;
55676 unsigned int __pyx_t_4;
55677 int __pyx_lineno = 0;
55678 const char *__pyx_filename = NULL;
55679 int __pyx_clineno = 0;
55680 __Pyx_TraceFrameInit(__pyx_codeobj__144)
55681 __Pyx_RefNannySetupContext("values", 1);
55682 __Pyx_TraceCall("values", __pyx_f[0], 2783, 0, __PYX_ERR(0, 2783, __pyx_L1_error));
55683
55684 /* "pysam/libcbcf.pyx":2785
55685 * def values(self):
55686 * """D.values() -> list of D's values"""
55687 * return list(self.itervalues()) # <<<<<<<<<<<<<<
55688 *
55689 * def update(self, items=None, **kwargs):
55690 */
55691 __Pyx_XDECREF(__pyx_r);
55692 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2785, __pyx_L1_error)
55693 __Pyx_GOTREF(__pyx_t_2);
55694 __pyx_t_3 = NULL;
55695 __pyx_t_4 = 0;
55696 #if CYTHON_UNPACK_METHODS
55697 if (likely(PyMethod_Check(__pyx_t_2))) {
55698 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
55699 if (likely(__pyx_t_3)) {
55700 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
55701 __Pyx_INCREF(__pyx_t_3);
55702 __Pyx_INCREF(function);
55703 __Pyx_DECREF_SET(__pyx_t_2, function);
55704 __pyx_t_4 = 1;
55705 }
55706 }
55707 #endif
55708 {
55709 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
55710 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
55711 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
55712 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2785, __pyx_L1_error)
55713 __Pyx_GOTREF(__pyx_t_1);
55714 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55715 }
55716 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2785, __pyx_L1_error)
55717 __Pyx_GOTREF(__pyx_t_2);
55718 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55719 __pyx_r = __pyx_t_2;
55720 __pyx_t_2 = 0;
55721 goto __pyx_L0;
55722
55723 /* "pysam/libcbcf.pyx":2783
55724 * return list(self.iteritems())
55725 *
55726 * def values(self): # <<<<<<<<<<<<<<
55727 * """D.values() -> list of D's values"""
55728 * return list(self.itervalues())
55729 */
55730
55731 /* function exit code */
55732 __pyx_L1_error:;
55733 __Pyx_XDECREF(__pyx_t_1);
55734 __Pyx_XDECREF(__pyx_t_2);
55735 __Pyx_XDECREF(__pyx_t_3);
55736 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
55737 __pyx_r = NULL;
55738 __pyx_L0:;
55739 __Pyx_XGIVEREF(__pyx_r);
55740 __Pyx_TraceReturn(__pyx_r, 0);
55741 __Pyx_RefNannyFinishContext();
55742 return __pyx_r;
55743 }
55744
55745 /* "pysam/libcbcf.pyx":2787
55746 * return list(self.itervalues())
55747 *
55748 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
55749 * """D.update([E, ]**F) -> None.
55750 *
55751 */
55752
55753 /* Python wrapper */
55754 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_36update(PyObject *__pyx_v_self,
55755 #if CYTHON_METH_FASTCALL
55756 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55757 #else
55758 PyObject *__pyx_args, PyObject *__pyx_kwds
55759 #endif
55760 ); /*proto*/
55761 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_35update, "VariantRecordInfo.update(self, items=None, **kwargs)\nD.update([E, ]**F) -> None.\n\n Update D from dict/iterable E and F.\n ");
55762 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_36update = {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_36update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_35update};
55763 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_36update(PyObject *__pyx_v_self,
55764 #if CYTHON_METH_FASTCALL
55765 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
55766 #else
55767 PyObject *__pyx_args, PyObject *__pyx_kwds
55768 #endif
55769 ) {
55770 PyObject *__pyx_v_items = 0;
55771 PyObject *__pyx_v_kwargs = 0;
55772 #if !CYTHON_METH_FASTCALL
55773 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
55774 #endif
55775 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
55776 PyObject* values[1] = {0};
55777 int __pyx_lineno = 0;
55778 const char *__pyx_filename = NULL;
55779 int __pyx_clineno = 0;
55780 PyObject *__pyx_r = 0;
55781 __Pyx_RefNannyDeclarations
55782 __Pyx_RefNannySetupContext("update (wrapper)", 0);
55783 #if !CYTHON_METH_FASTCALL
55784 #if CYTHON_ASSUME_SAFE_MACROS
55785 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
55786 #else
55787 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
55788 #endif
55789 #endif
55790 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
55791 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
55792 __Pyx_GOTREF(__pyx_v_kwargs);
55793 {
55794 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
55795 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
55796 if (__pyx_kwds) {
55797 Py_ssize_t kw_args;
55798 switch (__pyx_nargs) {
55799 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
55800 CYTHON_FALLTHROUGH;
55801 case 0: break;
55802 default: goto __pyx_L5_argtuple_error;
55803 }
55804 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
55805 switch (__pyx_nargs) {
55806 case 0:
55807 if (kw_args > 0) {
55808 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
55809 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
55810 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2787, __pyx_L3_error)
55811 }
55812 }
55813 if (unlikely(kw_args > 0)) {
55814 const Py_ssize_t kwd_pos_args = __pyx_nargs;
55815 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "update") < 0)) __PYX_ERR(0, 2787, __pyx_L3_error)
55816 }
55817 } else {
55818 switch (__pyx_nargs) {
55819 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
55820 CYTHON_FALLTHROUGH;
55821 case 0: break;
55822 default: goto __pyx_L5_argtuple_error;
55823 }
55824 }
55825 __pyx_v_items = values[0];
55826 }
55827 goto __pyx_L6_skip;
55828 __pyx_L5_argtuple_error:;
55829 __Pyx_RaiseArgtupleInvalid("update", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2787, __pyx_L3_error)
55830 __pyx_L6_skip:;
55831 goto __pyx_L4_argument_unpacking_done;
55832 __pyx_L3_error:;
55833 {
55834 Py_ssize_t __pyx_temp;
55835 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
55836 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
55837 }
55838 }
55839 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
55840 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
55841 __Pyx_RefNannyFinishContext();
55842 return NULL;
55843 __pyx_L4_argument_unpacking_done:;
55844 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_35update(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), __pyx_v_items, __pyx_v_kwargs);
55845
55846 /* function exit code */
55847 __Pyx_DECREF(__pyx_v_kwargs);
55848 {
55849 Py_ssize_t __pyx_temp;
55850 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
55851 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
55852 }
55853 }
55854 __Pyx_RefNannyFinishContext();
55855 return __pyx_r;
55856 }
55857
55858 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_35update(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs) {
55859 PyObject *__pyx_v_k = NULL;
55860 PyObject *__pyx_v_v = NULL;
55861 PyObject *__pyx_r = NULL;
55862 __Pyx_TraceDeclarations
55863 __Pyx_RefNannyDeclarations
55864 PyObject *__pyx_t_1 = NULL;
55865 Py_ssize_t __pyx_t_2;
55866 Py_ssize_t __pyx_t_3;
55867 int __pyx_t_4;
55868 PyObject *__pyx_t_5 = NULL;
55869 PyObject *__pyx_t_6 = NULL;
55870 int __pyx_t_7;
55871 int __pyx_t_8;
55872 int __pyx_lineno = 0;
55873 const char *__pyx_filename = NULL;
55874 int __pyx_clineno = 0;
55875 __Pyx_TraceFrameInit(__pyx_codeobj__145)
55876 __Pyx_RefNannySetupContext("update", 1);
55877 __Pyx_TraceCall("update", __pyx_f[0], 2787, 0, __PYX_ERR(0, 2787, __pyx_L1_error));
55878
55879 /* "pysam/libcbcf.pyx":2792
55880 * Update D from dict/iterable E and F.
55881 * """
55882 * for k, v in items.items(): # <<<<<<<<<<<<<<
55883 * if k != 'END':
55884 * self[k] = v
55885 */
55886 __pyx_t_2 = 0;
55887 if (unlikely(__pyx_v_items == Py_None)) {
55888 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
55889 __PYX_ERR(0, 2792, __pyx_L1_error)
55890 }
55891 __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_items, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2792, __pyx_L1_error)
55892 __Pyx_GOTREF(__pyx_t_5);
55893 __Pyx_XDECREF(__pyx_t_1);
55894 __pyx_t_1 = __pyx_t_5;
55895 __pyx_t_5 = 0;
55896 while (1) {
55897 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
55898 if (unlikely(__pyx_t_7 == 0)) break;
55899 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 2792, __pyx_L1_error)
55900 __Pyx_GOTREF(__pyx_t_5);
55901 __Pyx_GOTREF(__pyx_t_6);
55902 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5);
55903 __pyx_t_5 = 0;
55904 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
55905 __pyx_t_6 = 0;
55906
55907 /* "pysam/libcbcf.pyx":2793
55908 * """
55909 * for k, v in items.items():
55910 * if k != 'END': # <<<<<<<<<<<<<<
55911 * self[k] = v
55912 *
55913 */
55914 __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_k, __pyx_n_u_END, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2793, __pyx_L1_error)
55915 if (__pyx_t_8) {
55916
55917 /* "pysam/libcbcf.pyx":2794
55918 * for k, v in items.items():
55919 * if k != 'END':
55920 * self[k] = v # <<<<<<<<<<<<<<
55921 *
55922 * if kwargs:
55923 */
55924 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 2794, __pyx_L1_error)
55925
55926 /* "pysam/libcbcf.pyx":2793
55927 * """
55928 * for k, v in items.items():
55929 * if k != 'END': # <<<<<<<<<<<<<<
55930 * self[k] = v
55931 *
55932 */
55933 }
55934 }
55935 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55936
55937 /* "pysam/libcbcf.pyx":2796
55938 * self[k] = v
55939 *
55940 * if kwargs: # <<<<<<<<<<<<<<
55941 * kwargs.pop('END', None)
55942 * for k, v in kwargs.items():
55943 */
55944 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2796, __pyx_L1_error)
55945 if (__pyx_t_8) {
55946
55947 /* "pysam/libcbcf.pyx":2797
55948 *
55949 * if kwargs:
55950 * kwargs.pop('END', None) # <<<<<<<<<<<<<<
55951 * for k, v in kwargs.items():
55952 * self[k] = v
55953 */
55954 __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kwargs, __pyx_n_u_END, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2797, __pyx_L1_error)
55955 __Pyx_GOTREF(__pyx_t_1);
55956 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55957
55958 /* "pysam/libcbcf.pyx":2798
55959 * if kwargs:
55960 * kwargs.pop('END', None)
55961 * for k, v in kwargs.items(): # <<<<<<<<<<<<<<
55962 * self[k] = v
55963 *
55964 */
55965 __pyx_t_3 = 0;
55966 __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_2), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2798, __pyx_L1_error)
55967 __Pyx_GOTREF(__pyx_t_6);
55968 __Pyx_XDECREF(__pyx_t_1);
55969 __pyx_t_1 = __pyx_t_6;
55970 __pyx_t_6 = 0;
55971 while (1) {
55972 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_2, &__pyx_t_3, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4);
55973 if (unlikely(__pyx_t_7 == 0)) break;
55974 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 2798, __pyx_L1_error)
55975 __Pyx_GOTREF(__pyx_t_6);
55976 __Pyx_GOTREF(__pyx_t_5);
55977 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
55978 __pyx_t_6 = 0;
55979 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
55980 __pyx_t_5 = 0;
55981
55982 /* "pysam/libcbcf.pyx":2799
55983 * kwargs.pop('END', None)
55984 * for k, v in kwargs.items():
55985 * self[k] = v # <<<<<<<<<<<<<<
55986 *
55987 * def pop(self, key, default=_nothing):
55988 */
55989 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 2799, __pyx_L1_error)
55990 }
55991 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55992
55993 /* "pysam/libcbcf.pyx":2796
55994 * self[k] = v
55995 *
55996 * if kwargs: # <<<<<<<<<<<<<<
55997 * kwargs.pop('END', None)
55998 * for k, v in kwargs.items():
55999 */
56000 }
56001
56002 /* "pysam/libcbcf.pyx":2787
56003 * return list(self.itervalues())
56004 *
56005 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
56006 * """D.update([E, ]**F) -> None.
56007 *
56008 */
56009
56010 /* function exit code */
56011 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
56012 goto __pyx_L0;
56013 __pyx_L1_error:;
56014 __Pyx_XDECREF(__pyx_t_1);
56015 __Pyx_XDECREF(__pyx_t_5);
56016 __Pyx_XDECREF(__pyx_t_6);
56017 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
56018 __pyx_r = NULL;
56019 __pyx_L0:;
56020 __Pyx_XDECREF(__pyx_v_k);
56021 __Pyx_XDECREF(__pyx_v_v);
56022 __Pyx_XGIVEREF(__pyx_r);
56023 __Pyx_TraceReturn(__pyx_r, 0);
56024 __Pyx_RefNannyFinishContext();
56025 return __pyx_r;
56026 }
56027
56028 /* "pysam/libcbcf.pyx":2801
56029 * self[k] = v
56030 *
56031 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
56032 * cdef bcf_hdr_t *hdr = self.record.header.ptr
56033 * cdef bcf1_t *r = self.record.ptr
56034 */
56035
56036 /* Python wrapper */
56037 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_38pop(PyObject *__pyx_v_self,
56038 #if CYTHON_METH_FASTCALL
56039 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
56040 #else
56041 PyObject *__pyx_args, PyObject *__pyx_kwds
56042 #endif
56043 ); /*proto*/
56044 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_37pop, "VariantRecordInfo.pop(self, key, default=_nothing)");
56045 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_38pop = {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_38pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_37pop};
56046 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_38pop(PyObject *__pyx_v_self,
56047 #if CYTHON_METH_FASTCALL
56048 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
56049 #else
56050 PyObject *__pyx_args, PyObject *__pyx_kwds
56051 #endif
56052 ) {
56053 PyObject *__pyx_v_key = 0;
56054 PyObject *__pyx_v_default = 0;
56055 #if !CYTHON_METH_FASTCALL
56056 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
56057 #endif
56058 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
56059 PyObject* values[2] = {0,0};
56060 int __pyx_lineno = 0;
56061 const char *__pyx_filename = NULL;
56062 int __pyx_clineno = 0;
56063 PyObject *__pyx_r = 0;
56064 __Pyx_RefNannyDeclarations
56065 __Pyx_RefNannySetupContext("pop (wrapper)", 0);
56066 #if !CYTHON_METH_FASTCALL
56067 #if CYTHON_ASSUME_SAFE_MACROS
56068 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
56069 #else
56070 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
56071 #endif
56072 #endif
56073 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
56074 {
56075 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
56076 values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__146);
56077 if (__pyx_kwds) {
56078 Py_ssize_t kw_args;
56079 switch (__pyx_nargs) {
56080 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
56081 CYTHON_FALLTHROUGH;
56082 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
56083 CYTHON_FALLTHROUGH;
56084 case 0: break;
56085 default: goto __pyx_L5_argtuple_error;
56086 }
56087 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
56088 switch (__pyx_nargs) {
56089 case 0:
56090 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
56091 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
56092 kw_args--;
56093 }
56094 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2801, __pyx_L3_error)
56095 else goto __pyx_L5_argtuple_error;
56096 CYTHON_FALLTHROUGH;
56097 case 1:
56098 if (kw_args > 0) {
56099 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
56100 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
56101 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2801, __pyx_L3_error)
56102 }
56103 }
56104 if (unlikely(kw_args > 0)) {
56105 const Py_ssize_t kwd_pos_args = __pyx_nargs;
56106 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pop") < 0)) __PYX_ERR(0, 2801, __pyx_L3_error)
56107 }
56108 } else {
56109 switch (__pyx_nargs) {
56110 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
56111 CYTHON_FALLTHROUGH;
56112 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
56113 break;
56114 default: goto __pyx_L5_argtuple_error;
56115 }
56116 }
56117 __pyx_v_key = values[0];
56118 __pyx_v_default = values[1];
56119 }
56120 goto __pyx_L6_skip;
56121 __pyx_L5_argtuple_error:;
56122 __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2801, __pyx_L3_error)
56123 __pyx_L6_skip:;
56124 goto __pyx_L4_argument_unpacking_done;
56125 __pyx_L3_error:;
56126 {
56127 Py_ssize_t __pyx_temp;
56128 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
56129 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
56130 }
56131 }
56132 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
56133 __Pyx_RefNannyFinishContext();
56134 return NULL;
56135 __pyx_L4_argument_unpacking_done:;
56136 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_37pop(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
56137
56138 /* function exit code */
56139 {
56140 Py_ssize_t __pyx_temp;
56141 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
56142 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
56143 }
56144 }
56145 __Pyx_RefNannyFinishContext();
56146 return __pyx_r;
56147 }
56148
56149 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_37pop(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
56150 bcf_hdr_t *__pyx_v_hdr;
56151 bcf1_t *__pyx_v_r;
56152 PyObject *__pyx_v_bkey = 0;
56153 bcf_info_t *__pyx_v_info;
56154 int __pyx_v_info_id;
56155 PyObject *__pyx_v_value = NULL;
56156 PyObject *__pyx_r = NULL;
56157 __Pyx_TraceDeclarations
56158 __Pyx_RefNannyDeclarations
56159 bcf_hdr_t *__pyx_t_1;
56160 bcf1_t *__pyx_t_2;
56161 int __pyx_t_3;
56162 PyObject *__pyx_t_4 = NULL;
56163 char const *__pyx_t_5;
56164 int __pyx_t_6;
56165 int __pyx_t_7;
56166 PyObject *__pyx_t_8 = NULL;
56167 PyObject *__pyx_t_9 = NULL;
56168 unsigned int __pyx_t_10;
56169 int __pyx_t_11;
56170 char const *__pyx_t_12;
56171 int __pyx_lineno = 0;
56172 const char *__pyx_filename = NULL;
56173 int __pyx_clineno = 0;
56174 __Pyx_TraceFrameInit(__pyx_codeobj__147)
56175 __Pyx_RefNannySetupContext("pop", 1);
56176 __Pyx_TraceCall("pop", __pyx_f[0], 2801, 0, __PYX_ERR(0, 2801, __pyx_L1_error));
56177
56178 /* "pysam/libcbcf.pyx":2802
56179 *
56180 * def pop(self, key, default=_nothing):
56181 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
56182 * cdef bcf1_t *r = self.record.ptr
56183 *
56184 */
56185 __pyx_t_1 = __pyx_v_self->record->header->ptr;
56186 __pyx_v_hdr = __pyx_t_1;
56187
56188 /* "pysam/libcbcf.pyx":2803
56189 * def pop(self, key, default=_nothing):
56190 * cdef bcf_hdr_t *hdr = self.record.header.ptr
56191 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
56192 *
56193 * if bcf_unpack(r, BCF_UN_INFO) < 0:
56194 */
56195 __pyx_t_2 = __pyx_v_self->record->ptr;
56196 __pyx_v_r = __pyx_t_2;
56197
56198 /* "pysam/libcbcf.pyx":2805
56199 * cdef bcf1_t *r = self.record.ptr
56200 *
56201 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
56202 * raise ValueError('Error unpacking VariantRecord')
56203 *
56204 */
56205 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_INFO) < 0);
56206 if (unlikely(__pyx_t_3)) {
56207
56208 /* "pysam/libcbcf.pyx":2806
56209 *
56210 * if bcf_unpack(r, BCF_UN_INFO) < 0:
56211 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
56212 *
56213 * cdef bytes bkey = force_bytes(key)
56214 */
56215 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2806, __pyx_L1_error)
56216 __Pyx_GOTREF(__pyx_t_4);
56217 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
56218 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
56219 __PYX_ERR(0, 2806, __pyx_L1_error)
56220
56221 /* "pysam/libcbcf.pyx":2805
56222 * cdef bcf1_t *r = self.record.ptr
56223 *
56224 * if bcf_unpack(r, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
56225 * raise ValueError('Error unpacking VariantRecord')
56226 *
56227 */
56228 }
56229
56230 /* "pysam/libcbcf.pyx":2808
56231 * raise ValueError('Error unpacking VariantRecord')
56232 *
56233 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
56234 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
56235 *
56236 */
56237 __pyx_t_4 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2808, __pyx_L1_error)
56238 __Pyx_GOTREF(__pyx_t_4);
56239 __pyx_v_bkey = ((PyObject*)__pyx_t_4);
56240 __pyx_t_4 = 0;
56241
56242 /* "pysam/libcbcf.pyx":2809
56243 *
56244 * cdef bytes bkey = force_bytes(key)
56245 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey) # <<<<<<<<<<<<<<
56246 *
56247 * # Cannot stop here if info == NULL, since flags must return False
56248 */
56249 if (unlikely(__pyx_v_bkey == Py_None)) {
56250 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
56251 __PYX_ERR(0, 2809, __pyx_L1_error)
56252 }
56253 __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2809, __pyx_L1_error)
56254 __pyx_v_info = bcf_get_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_5);
56255
56256 /* "pysam/libcbcf.pyx":2812
56257 *
56258 * # Cannot stop here if info == NULL, since flags must return False
56259 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key # <<<<<<<<<<<<<<
56260 *
56261 * if info_id < 0:
56262 */
56263 __pyx_t_3 = (!(__pyx_v_info != 0));
56264 if (__pyx_t_3) {
56265 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_header_get_info_id(__pyx_v_hdr, __pyx_v_bkey); if (unlikely(__pyx_t_7 == ((int)-2) && PyErr_Occurred())) __PYX_ERR(0, 2812, __pyx_L1_error)
56266 __pyx_t_6 = __pyx_t_7;
56267 } else {
56268 __pyx_t_6 = __pyx_v_info->key;
56269 }
56270 __pyx_v_info_id = __pyx_t_6;
56271
56272 /* "pysam/libcbcf.pyx":2814
56273 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key
56274 *
56275 * if info_id < 0: # <<<<<<<<<<<<<<
56276 * if default is _nothing:
56277 * raise KeyError('Unknown INFO field: {}'.format(key))
56278 */
56279 __pyx_t_3 = (__pyx_v_info_id < 0);
56280 if (__pyx_t_3) {
56281
56282 /* "pysam/libcbcf.pyx":2815
56283 *
56284 * if info_id < 0:
56285 * if default is _nothing: # <<<<<<<<<<<<<<
56286 * raise KeyError('Unknown INFO field: {}'.format(key))
56287 * return default
56288 */
56289 __pyx_t_3 = (__pyx_v_default == __pyx_v_5pysam_7libcbcf__nothing);
56290 if (unlikely(__pyx_t_3)) {
56291
56292 /* "pysam/libcbcf.pyx":2816
56293 * if info_id < 0:
56294 * if default is _nothing:
56295 * raise KeyError('Unknown INFO field: {}'.format(key)) # <<<<<<<<<<<<<<
56296 * return default
56297 *
56298 */
56299 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_INFO_field, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2816, __pyx_L1_error)
56300 __Pyx_GOTREF(__pyx_t_8);
56301 __pyx_t_9 = NULL;
56302 __pyx_t_10 = 0;
56303 #if CYTHON_UNPACK_METHODS
56304 if (likely(PyMethod_Check(__pyx_t_8))) {
56305 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
56306 if (likely(__pyx_t_9)) {
56307 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
56308 __Pyx_INCREF(__pyx_t_9);
56309 __Pyx_INCREF(function);
56310 __Pyx_DECREF_SET(__pyx_t_8, function);
56311 __pyx_t_10 = 1;
56312 }
56313 }
56314 #endif
56315 {
56316 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_key};
56317 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
56318 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
56319 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2816, __pyx_L1_error)
56320 __Pyx_GOTREF(__pyx_t_4);
56321 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
56322 }
56323 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2816, __pyx_L1_error)
56324 __Pyx_GOTREF(__pyx_t_8);
56325 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
56326 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
56327 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
56328 __PYX_ERR(0, 2816, __pyx_L1_error)
56329
56330 /* "pysam/libcbcf.pyx":2815
56331 *
56332 * if info_id < 0:
56333 * if default is _nothing: # <<<<<<<<<<<<<<
56334 * raise KeyError('Unknown INFO field: {}'.format(key))
56335 * return default
56336 */
56337 }
56338
56339 /* "pysam/libcbcf.pyx":2817
56340 * if default is _nothing:
56341 * raise KeyError('Unknown INFO field: {}'.format(key))
56342 * return default # <<<<<<<<<<<<<<
56343 *
56344 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
56345 */
56346 __Pyx_XDECREF(__pyx_r);
56347 __Pyx_INCREF(__pyx_v_default);
56348 __pyx_r = __pyx_v_default;
56349 goto __pyx_L0;
56350
56351 /* "pysam/libcbcf.pyx":2814
56352 * cdef int info_id = bcf_header_get_info_id(hdr, bkey) if not info else info.key
56353 *
56354 * if info_id < 0: # <<<<<<<<<<<<<<
56355 * if default is _nothing:
56356 * raise KeyError('Unknown INFO field: {}'.format(key))
56357 */
56358 }
56359
56360 /* "pysam/libcbcf.pyx":2819
56361 * return default
56362 *
56363 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
56364 * raise ValueError('Invalid header')
56365 *
56366 */
56367 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_check_header_id(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2819, __pyx_L1_error)
56368 __pyx_t_11 = (!__pyx_t_3);
56369 if (unlikely(__pyx_t_11)) {
56370
56371 /* "pysam/libcbcf.pyx":2820
56372 *
56373 * if not check_header_id(hdr, BCF_HL_INFO, info_id):
56374 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
56375 *
56376 * # Handle flags
56377 */
56378 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2820, __pyx_L1_error)
56379 __Pyx_GOTREF(__pyx_t_8);
56380 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
56381 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
56382 __PYX_ERR(0, 2820, __pyx_L1_error)
56383
56384 /* "pysam/libcbcf.pyx":2819
56385 * return default
56386 *
56387 * if not check_header_id(hdr, BCF_HL_INFO, info_id): # <<<<<<<<<<<<<<
56388 * raise ValueError('Invalid header')
56389 *
56390 */
56391 }
56392
56393 /* "pysam/libcbcf.pyx":2823
56394 *
56395 * # Handle flags
56396 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG and (not info or not info.vptr): # <<<<<<<<<<<<<<
56397 * return
56398 *
56399 */
56400 __pyx_t_3 = (bcf_hdr_id2type(__pyx_v_hdr, BCF_HL_INFO, __pyx_v_info_id) == BCF_HT_FLAG);
56401 if (__pyx_t_3) {
56402 } else {
56403 __pyx_t_11 = __pyx_t_3;
56404 goto __pyx_L8_bool_binop_done;
56405 }
56406 __pyx_t_3 = (!(__pyx_v_info != 0));
56407 if (!__pyx_t_3) {
56408 } else {
56409 __pyx_t_11 = __pyx_t_3;
56410 goto __pyx_L8_bool_binop_done;
56411 }
56412 __pyx_t_3 = (!(__pyx_v_info->vptr != 0));
56413 __pyx_t_11 = __pyx_t_3;
56414 __pyx_L8_bool_binop_done:;
56415 if (__pyx_t_11) {
56416
56417 /* "pysam/libcbcf.pyx":2824
56418 * # Handle flags
56419 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG and (not info or not info.vptr):
56420 * return # <<<<<<<<<<<<<<
56421 *
56422 * if not info or not info.vptr:
56423 */
56424 __Pyx_XDECREF(__pyx_r);
56425 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
56426 goto __pyx_L0;
56427
56428 /* "pysam/libcbcf.pyx":2823
56429 *
56430 * # Handle flags
56431 * if bcf_hdr_id2type(hdr, BCF_HL_INFO, info_id) == BCF_HT_FLAG and (not info or not info.vptr): # <<<<<<<<<<<<<<
56432 * return
56433 *
56434 */
56435 }
56436
56437 /* "pysam/libcbcf.pyx":2826
56438 * return
56439 *
56440 * if not info or not info.vptr: # <<<<<<<<<<<<<<
56441 * if default is _nothing:
56442 * raise KeyError('Unknown INFO field: {}'.format(key))
56443 */
56444 __pyx_t_3 = (!(__pyx_v_info != 0));
56445 if (!__pyx_t_3) {
56446 } else {
56447 __pyx_t_11 = __pyx_t_3;
56448 goto __pyx_L12_bool_binop_done;
56449 }
56450 __pyx_t_3 = (!(__pyx_v_info->vptr != 0));
56451 __pyx_t_11 = __pyx_t_3;
56452 __pyx_L12_bool_binop_done:;
56453 if (__pyx_t_11) {
56454
56455 /* "pysam/libcbcf.pyx":2827
56456 *
56457 * if not info or not info.vptr:
56458 * if default is _nothing: # <<<<<<<<<<<<<<
56459 * raise KeyError('Unknown INFO field: {}'.format(key))
56460 * return default
56461 */
56462 __pyx_t_11 = (__pyx_v_default == __pyx_v_5pysam_7libcbcf__nothing);
56463 if (unlikely(__pyx_t_11)) {
56464
56465 /* "pysam/libcbcf.pyx":2828
56466 * if not info or not info.vptr:
56467 * if default is _nothing:
56468 * raise KeyError('Unknown INFO field: {}'.format(key)) # <<<<<<<<<<<<<<
56469 * return default
56470 *
56471 */
56472 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_INFO_field, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2828, __pyx_L1_error)
56473 __Pyx_GOTREF(__pyx_t_4);
56474 __pyx_t_9 = NULL;
56475 __pyx_t_10 = 0;
56476 #if CYTHON_UNPACK_METHODS
56477 if (likely(PyMethod_Check(__pyx_t_4))) {
56478 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
56479 if (likely(__pyx_t_9)) {
56480 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
56481 __Pyx_INCREF(__pyx_t_9);
56482 __Pyx_INCREF(function);
56483 __Pyx_DECREF_SET(__pyx_t_4, function);
56484 __pyx_t_10 = 1;
56485 }
56486 }
56487 #endif
56488 {
56489 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_key};
56490 __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
56491 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
56492 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2828, __pyx_L1_error)
56493 __Pyx_GOTREF(__pyx_t_8);
56494 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
56495 }
56496 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2828, __pyx_L1_error)
56497 __Pyx_GOTREF(__pyx_t_4);
56498 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
56499 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
56500 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
56501 __PYX_ERR(0, 2828, __pyx_L1_error)
56502
56503 /* "pysam/libcbcf.pyx":2827
56504 *
56505 * if not info or not info.vptr:
56506 * if default is _nothing: # <<<<<<<<<<<<<<
56507 * raise KeyError('Unknown INFO field: {}'.format(key))
56508 * return default
56509 */
56510 }
56511
56512 /* "pysam/libcbcf.pyx":2829
56513 * if default is _nothing:
56514 * raise KeyError('Unknown INFO field: {}'.format(key))
56515 * return default # <<<<<<<<<<<<<<
56516 *
56517 * value = bcf_info_get_value(self.record, info)
56518 */
56519 __Pyx_XDECREF(__pyx_r);
56520 __Pyx_INCREF(__pyx_v_default);
56521 __pyx_r = __pyx_v_default;
56522 goto __pyx_L0;
56523
56524 /* "pysam/libcbcf.pyx":2826
56525 * return
56526 *
56527 * if not info or not info.vptr: # <<<<<<<<<<<<<<
56528 * if default is _nothing:
56529 * raise KeyError('Unknown INFO field: {}'.format(key))
56530 */
56531 }
56532
56533 /* "pysam/libcbcf.pyx":2831
56534 * return default
56535 *
56536 * value = bcf_info_get_value(self.record, info) # <<<<<<<<<<<<<<
56537 *
56538 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0:
56539 */
56540 __pyx_t_4 = ((PyObject *)__pyx_v_self->record);
56541 __Pyx_INCREF(__pyx_t_4);
56542 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_bcf_info_get_value(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_4), __pyx_v_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2831, __pyx_L1_error)
56543 __Pyx_GOTREF(__pyx_t_8);
56544 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
56545 __pyx_v_value = __pyx_t_8;
56546 __pyx_t_8 = 0;
56547
56548 /* "pysam/libcbcf.pyx":2833
56549 * value = bcf_info_get_value(self.record, info)
56550 *
56551 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0: # <<<<<<<<<<<<<<
56552 * raise ValueError('Unable to delete INFO')
56553 *
56554 */
56555 if (unlikely(__pyx_v_bkey == Py_None)) {
56556 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
56557 __PYX_ERR(0, 2833, __pyx_L1_error)
56558 }
56559 __pyx_t_12 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 2833, __pyx_L1_error)
56560 __pyx_t_11 = (bcf_update_info(__pyx_v_hdr, __pyx_v_r, __pyx_t_12, NULL, 0, __pyx_v_info->type) < 0);
56561 if (unlikely(__pyx_t_11)) {
56562
56563 /* "pysam/libcbcf.pyx":2834
56564 *
56565 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0:
56566 * raise ValueError('Unable to delete INFO') # <<<<<<<<<<<<<<
56567 *
56568 * return value
56569 */
56570 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2834, __pyx_L1_error)
56571 __Pyx_GOTREF(__pyx_t_8);
56572 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
56573 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
56574 __PYX_ERR(0, 2834, __pyx_L1_error)
56575
56576 /* "pysam/libcbcf.pyx":2833
56577 * value = bcf_info_get_value(self.record, info)
56578 *
56579 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0: # <<<<<<<<<<<<<<
56580 * raise ValueError('Unable to delete INFO')
56581 *
56582 */
56583 }
56584
56585 /* "pysam/libcbcf.pyx":2836
56586 * raise ValueError('Unable to delete INFO')
56587 *
56588 * return value # <<<<<<<<<<<<<<
56589 *
56590 * def __richcmp__(VariantRecordInfo self not None, VariantRecordInfo other not None, int op):
56591 */
56592 __Pyx_XDECREF(__pyx_r);
56593 __Pyx_INCREF(__pyx_v_value);
56594 __pyx_r = __pyx_v_value;
56595 goto __pyx_L0;
56596
56597 /* "pysam/libcbcf.pyx":2801
56598 * self[k] = v
56599 *
56600 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
56601 * cdef bcf_hdr_t *hdr = self.record.header.ptr
56602 * cdef bcf1_t *r = self.record.ptr
56603 */
56604
56605 /* function exit code */
56606 __pyx_L1_error:;
56607 __Pyx_XDECREF(__pyx_t_4);
56608 __Pyx_XDECREF(__pyx_t_8);
56609 __Pyx_XDECREF(__pyx_t_9);
56610 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
56611 __pyx_r = NULL;
56612 __pyx_L0:;
56613 __Pyx_XDECREF(__pyx_v_bkey);
56614 __Pyx_XDECREF(__pyx_v_value);
56615 __Pyx_XGIVEREF(__pyx_r);
56616 __Pyx_TraceReturn(__pyx_r, 0);
56617 __Pyx_RefNannyFinishContext();
56618 return __pyx_r;
56619 }
56620
56621 /* "pysam/libcbcf.pyx":2838
56622 * return value
56623 *
56624 * def __richcmp__(VariantRecordInfo self not None, VariantRecordInfo other not None, int op): # <<<<<<<<<<<<<<
56625 * if op != 2 and op != 3:
56626 * return NotImplemented
56627 */
56628
56629 /* Python wrapper */
56630 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_40__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
56631 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_40__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
56632 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
56633 int __pyx_lineno = 0;
56634 const char *__pyx_filename = NULL;
56635 int __pyx_clineno = 0;
56636 PyObject *__pyx_r = 0;
56637 __Pyx_RefNannyDeclarations
56638 __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
56639 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
56640 if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
56641 PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 2838, __pyx_L1_error)
56642 }
56643 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, 0, "other", 0))) __PYX_ERR(0, 2838, __pyx_L1_error)
56644 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_39__richcmp__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_other), ((int)__pyx_v_op));
56645
56646 /* function exit code */
56647 goto __pyx_L0;
56648 __pyx_L1_error:;
56649 __pyx_r = NULL;
56650 __pyx_L0:;
56651 __Pyx_RefNannyFinishContext();
56652 return __pyx_r;
56653 }
56654
56655 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_39__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_other, int __pyx_v_op) {
56656 CYTHON_UNUSED bcf1_t *__pyx_v_s;
56657 CYTHON_UNUSED bcf1_t *__pyx_v_o;
56658 int __pyx_v_cmp;
56659 PyObject *__pyx_r = NULL;
56660 __Pyx_TraceDeclarations
56661 __Pyx_RefNannyDeclarations
56662 int __pyx_t_1;
56663 bcf1_t *__pyx_t_2;
56664 PyObject *__pyx_t_3 = NULL;
56665 PyObject *__pyx_t_4 = NULL;
56666 PyObject *__pyx_t_5 = NULL;
56667 int __pyx_lineno = 0;
56668 const char *__pyx_filename = NULL;
56669 int __pyx_clineno = 0;
56670 __Pyx_RefNannySetupContext("__richcmp__", 1);
56671 __Pyx_TraceCall("__richcmp__", __pyx_f[0], 2838, 0, __PYX_ERR(0, 2838, __pyx_L1_error));
56672
56673 /* "pysam/libcbcf.pyx":2839
56674 *
56675 * def __richcmp__(VariantRecordInfo self not None, VariantRecordInfo other not None, int op):
56676 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
56677 * return NotImplemented
56678 *
56679 */
56680 switch (__pyx_v_op) {
56681 case 2:
56682 case 3:
56683 __pyx_t_1 = 0;
56684 break;
56685 default:
56686 __pyx_t_1 = 1;
56687 break;
56688 }
56689 if (__pyx_t_1) {
56690
56691 /* "pysam/libcbcf.pyx":2840
56692 * def __richcmp__(VariantRecordInfo self not None, VariantRecordInfo other not None, int op):
56693 * if op != 2 and op != 3:
56694 * return NotImplemented # <<<<<<<<<<<<<<
56695 *
56696 * cdef bcf1_t *s = self.record.ptr
56697 */
56698 __Pyx_XDECREF(__pyx_r);
56699 __Pyx_INCREF(__pyx_builtin_NotImplemented);
56700 __pyx_r = __pyx_builtin_NotImplemented;
56701 goto __pyx_L0;
56702
56703 /* "pysam/libcbcf.pyx":2839
56704 *
56705 * def __richcmp__(VariantRecordInfo self not None, VariantRecordInfo other not None, int op):
56706 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
56707 * return NotImplemented
56708 *
56709 */
56710 }
56711
56712 /* "pysam/libcbcf.pyx":2842
56713 * return NotImplemented
56714 *
56715 * cdef bcf1_t *s = self.record.ptr # <<<<<<<<<<<<<<
56716 * cdef bcf1_t *o = other.record.ptr
56717 *
56718 */
56719 __pyx_t_2 = __pyx_v_self->record->ptr;
56720 __pyx_v_s = __pyx_t_2;
56721
56722 /* "pysam/libcbcf.pyx":2843
56723 *
56724 * cdef bcf1_t *s = self.record.ptr
56725 * cdef bcf1_t *o = other.record.ptr # <<<<<<<<<<<<<<
56726 *
56727 * # Cannot use n_info as shortcut logic, since null values may remain
56728 */
56729 __pyx_t_2 = __pyx_v_other->record->ptr;
56730 __pyx_v_o = __pyx_t_2;
56731
56732 /* "pysam/libcbcf.pyx":2846
56733 *
56734 * # Cannot use n_info as shortcut logic, since null values may remain
56735 * cdef bint cmp = dict(self) == dict(other) # <<<<<<<<<<<<<<
56736 *
56737 * if op == 3:
56738 */
56739 __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2846, __pyx_L1_error)
56740 __Pyx_GOTREF(__pyx_t_3);
56741 __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), ((PyObject *)__pyx_v_other)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2846, __pyx_L1_error)
56742 __Pyx_GOTREF(__pyx_t_4);
56743 __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2846, __pyx_L1_error)
56744 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
56745 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
56746 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2846, __pyx_L1_error)
56747 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
56748 __pyx_v_cmp = __pyx_t_1;
56749
56750 /* "pysam/libcbcf.pyx":2848
56751 * cdef bint cmp = dict(self) == dict(other)
56752 *
56753 * if op == 3: # <<<<<<<<<<<<<<
56754 * cmp = not cmp
56755 *
56756 */
56757 __pyx_t_1 = (__pyx_v_op == 3);
56758 if (__pyx_t_1) {
56759
56760 /* "pysam/libcbcf.pyx":2849
56761 *
56762 * if op == 3:
56763 * cmp = not cmp # <<<<<<<<<<<<<<
56764 *
56765 * return cmp
56766 */
56767 __pyx_v_cmp = (!__pyx_v_cmp);
56768
56769 /* "pysam/libcbcf.pyx":2848
56770 * cdef bint cmp = dict(self) == dict(other)
56771 *
56772 * if op == 3: # <<<<<<<<<<<<<<
56773 * cmp = not cmp
56774 *
56775 */
56776 }
56777
56778 /* "pysam/libcbcf.pyx":2851
56779 * cmp = not cmp
56780 *
56781 * return cmp # <<<<<<<<<<<<<<
56782 *
56783 * # Mappings are not hashable by default, but subclasses can change this
56784 */
56785 __Pyx_XDECREF(__pyx_r);
56786 __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_cmp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2851, __pyx_L1_error)
56787 __Pyx_GOTREF(__pyx_t_5);
56788 __pyx_r = __pyx_t_5;
56789 __pyx_t_5 = 0;
56790 goto __pyx_L0;
56791
56792 /* "pysam/libcbcf.pyx":2838
56793 * return value
56794 *
56795 * def __richcmp__(VariantRecordInfo self not None, VariantRecordInfo other not None, int op): # <<<<<<<<<<<<<<
56796 * if op != 2 and op != 3:
56797 * return NotImplemented
56798 */
56799
56800 /* function exit code */
56801 __pyx_L1_error:;
56802 __Pyx_XDECREF(__pyx_t_3);
56803 __Pyx_XDECREF(__pyx_t_4);
56804 __Pyx_XDECREF(__pyx_t_5);
56805 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56806 __pyx_r = NULL;
56807 __pyx_L0:;
56808 __Pyx_XGIVEREF(__pyx_r);
56809 __Pyx_TraceReturn(__pyx_r, 0);
56810 __Pyx_RefNannyFinishContext();
56811 return __pyx_r;
56812 }
56813
56814 /* "(tree fragment)":1
56815 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
56816 * cdef tuple state
56817 * cdef object _dict
56818 */
56819
56820 /* Python wrapper */
56821 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_42__reduce_cython__(PyObject *__pyx_v_self,
56822 #if CYTHON_METH_FASTCALL
56823 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
56824 #else
56825 PyObject *__pyx_args, PyObject *__pyx_kwds
56826 #endif
56827 ); /*proto*/
56828 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_41__reduce_cython__, "VariantRecordInfo.__reduce_cython__(self)");
56829 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_42__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_42__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_41__reduce_cython__};
56830 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_42__reduce_cython__(PyObject *__pyx_v_self,
56831 #if CYTHON_METH_FASTCALL
56832 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
56833 #else
56834 PyObject *__pyx_args, PyObject *__pyx_kwds
56835 #endif
56836 ) {
56837 #if !CYTHON_METH_FASTCALL
56838 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
56839 #endif
56840 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
56841 PyObject *__pyx_r = 0;
56842 __Pyx_RefNannyDeclarations
56843 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
56844 #if !CYTHON_METH_FASTCALL
56845 #if CYTHON_ASSUME_SAFE_MACROS
56846 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
56847 #else
56848 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
56849 #endif
56850 #endif
56851 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
56852 if (unlikely(__pyx_nargs > 0)) {
56853 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
56854 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
56855 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_41__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self));
56856
56857 /* function exit code */
56858 __Pyx_RefNannyFinishContext();
56859 return __pyx_r;
56860 }
56861
56862 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_41__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self) {
56863 PyObject *__pyx_v_state = 0;
56864 PyObject *__pyx_v__dict = 0;
56865 int __pyx_v_use_setstate;
56866 PyObject *__pyx_r = NULL;
56867 __Pyx_TraceDeclarations
56868 __Pyx_RefNannyDeclarations
56869 PyObject *__pyx_t_1 = NULL;
56870 int __pyx_t_2;
56871 PyObject *__pyx_t_3 = NULL;
56872 PyObject *__pyx_t_4 = NULL;
56873 int __pyx_lineno = 0;
56874 const char *__pyx_filename = NULL;
56875 int __pyx_clineno = 0;
56876 __Pyx_TraceFrameInit(__pyx_codeobj__148)
56877 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
56878 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
56879
56880 /* "(tree fragment)":5
56881 * cdef object _dict
56882 * cdef bint use_setstate
56883 * state = (self.record,) # <<<<<<<<<<<<<<
56884 * _dict = getattr(self, '__dict__', None)
56885 * if _dict is not None:
56886 */
56887 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
56888 __Pyx_GOTREF(__pyx_t_1);
56889 __Pyx_INCREF((PyObject *)__pyx_v_self->record);
56890 __Pyx_GIVEREF((PyObject *)__pyx_v_self->record);
56891 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->record))) __PYX_ERR(4, 5, __pyx_L1_error);
56892 __pyx_v_state = ((PyObject*)__pyx_t_1);
56893 __pyx_t_1 = 0;
56894
56895 /* "(tree fragment)":6
56896 * cdef bint use_setstate
56897 * state = (self.record,)
56898 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
56899 * if _dict is not None:
56900 * state += (_dict,)
56901 */
56902 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
56903 __Pyx_GOTREF(__pyx_t_1);
56904 __pyx_v__dict = __pyx_t_1;
56905 __pyx_t_1 = 0;
56906
56907 /* "(tree fragment)":7
56908 * state = (self.record,)
56909 * _dict = getattr(self, '__dict__', None)
56910 * if _dict is not None: # <<<<<<<<<<<<<<
56911 * state += (_dict,)
56912 * use_setstate = True
56913 */
56914 __pyx_t_2 = (__pyx_v__dict != Py_None);
56915 if (__pyx_t_2) {
56916
56917 /* "(tree fragment)":8
56918 * _dict = getattr(self, '__dict__', None)
56919 * if _dict is not None:
56920 * state += (_dict,) # <<<<<<<<<<<<<<
56921 * use_setstate = True
56922 * else:
56923 */
56924 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
56925 __Pyx_GOTREF(__pyx_t_1);
56926 __Pyx_INCREF(__pyx_v__dict);
56927 __Pyx_GIVEREF(__pyx_v__dict);
56928 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
56929 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
56930 __Pyx_GOTREF(__pyx_t_3);
56931 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56932 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
56933 __pyx_t_3 = 0;
56934
56935 /* "(tree fragment)":9
56936 * if _dict is not None:
56937 * state += (_dict,)
56938 * use_setstate = True # <<<<<<<<<<<<<<
56939 * else:
56940 * use_setstate = self.record is not None
56941 */
56942 __pyx_v_use_setstate = 1;
56943
56944 /* "(tree fragment)":7
56945 * state = (self.record,)
56946 * _dict = getattr(self, '__dict__', None)
56947 * if _dict is not None: # <<<<<<<<<<<<<<
56948 * state += (_dict,)
56949 * use_setstate = True
56950 */
56951 goto __pyx_L3;
56952 }
56953
56954 /* "(tree fragment)":11
56955 * use_setstate = True
56956 * else:
56957 * use_setstate = self.record is not None # <<<<<<<<<<<<<<
56958 * if use_setstate:
56959 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, None), state
56960 */
56961 /*else*/ {
56962 __pyx_t_2 = (((PyObject *)__pyx_v_self->record) != Py_None);
56963 __pyx_v_use_setstate = __pyx_t_2;
56964 }
56965 __pyx_L3:;
56966
56967 /* "(tree fragment)":12
56968 * else:
56969 * use_setstate = self.record is not None
56970 * if use_setstate: # <<<<<<<<<<<<<<
56971 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, None), state
56972 * else:
56973 */
56974 if (__pyx_v_use_setstate) {
56975
56976 /* "(tree fragment)":13
56977 * use_setstate = self.record is not None
56978 * if use_setstate:
56979 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, None), state # <<<<<<<<<<<<<<
56980 * else:
56981 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, state)
56982 */
56983 __Pyx_XDECREF(__pyx_r);
56984 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_VariantRecordInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
56985 __Pyx_GOTREF(__pyx_t_3);
56986 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
56987 __Pyx_GOTREF(__pyx_t_1);
56988 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
56989 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
56990 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
56991 __Pyx_INCREF(__pyx_int_118286449);
56992 __Pyx_GIVEREF(__pyx_int_118286449);
56993 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_118286449)) __PYX_ERR(4, 13, __pyx_L1_error);
56994 __Pyx_INCREF(Py_None);
56995 __Pyx_GIVEREF(Py_None);
56996 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
56997 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
56998 __Pyx_GOTREF(__pyx_t_4);
56999 __Pyx_GIVEREF(__pyx_t_3);
57000 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
57001 __Pyx_GIVEREF(__pyx_t_1);
57002 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
57003 __Pyx_INCREF(__pyx_v_state);
57004 __Pyx_GIVEREF(__pyx_v_state);
57005 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
57006 __pyx_t_3 = 0;
57007 __pyx_t_1 = 0;
57008 __pyx_r = __pyx_t_4;
57009 __pyx_t_4 = 0;
57010 goto __pyx_L0;
57011
57012 /* "(tree fragment)":12
57013 * else:
57014 * use_setstate = self.record is not None
57015 * if use_setstate: # <<<<<<<<<<<<<<
57016 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, None), state
57017 * else:
57018 */
57019 }
57020
57021 /* "(tree fragment)":15
57022 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, None), state
57023 * else:
57024 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, state) # <<<<<<<<<<<<<<
57025 * def __setstate_cython__(self, __pyx_state):
57026 * __pyx_unpickle_VariantRecordInfo__set_state(self, __pyx_state)
57027 */
57028 /*else*/ {
57029 __Pyx_XDECREF(__pyx_r);
57030 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantRecordInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
57031 __Pyx_GOTREF(__pyx_t_4);
57032 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
57033 __Pyx_GOTREF(__pyx_t_1);
57034 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
57035 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
57036 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
57037 __Pyx_INCREF(__pyx_int_118286449);
57038 __Pyx_GIVEREF(__pyx_int_118286449);
57039 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_118286449)) __PYX_ERR(4, 15, __pyx_L1_error);
57040 __Pyx_INCREF(__pyx_v_state);
57041 __Pyx_GIVEREF(__pyx_v_state);
57042 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
57043 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
57044 __Pyx_GOTREF(__pyx_t_3);
57045 __Pyx_GIVEREF(__pyx_t_4);
57046 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
57047 __Pyx_GIVEREF(__pyx_t_1);
57048 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
57049 __pyx_t_4 = 0;
57050 __pyx_t_1 = 0;
57051 __pyx_r = __pyx_t_3;
57052 __pyx_t_3 = 0;
57053 goto __pyx_L0;
57054 }
57055
57056 /* "(tree fragment)":1
57057 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
57058 * cdef tuple state
57059 * cdef object _dict
57060 */
57061
57062 /* function exit code */
57063 __pyx_L1_error:;
57064 __Pyx_XDECREF(__pyx_t_1);
57065 __Pyx_XDECREF(__pyx_t_3);
57066 __Pyx_XDECREF(__pyx_t_4);
57067 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57068 __pyx_r = NULL;
57069 __pyx_L0:;
57070 __Pyx_XDECREF(__pyx_v_state);
57071 __Pyx_XDECREF(__pyx_v__dict);
57072 __Pyx_XGIVEREF(__pyx_r);
57073 __Pyx_TraceReturn(__pyx_r, 0);
57074 __Pyx_RefNannyFinishContext();
57075 return __pyx_r;
57076 }
57077
57078 /* "(tree fragment)":16
57079 * else:
57080 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, state)
57081 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
57082 * __pyx_unpickle_VariantRecordInfo__set_state(self, __pyx_state)
57083 */
57084
57085 /* Python wrapper */
57086 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_44__setstate_cython__(PyObject *__pyx_v_self,
57087 #if CYTHON_METH_FASTCALL
57088 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
57089 #else
57090 PyObject *__pyx_args, PyObject *__pyx_kwds
57091 #endif
57092 ); /*proto*/
57093 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_43__setstate_cython__, "VariantRecordInfo.__setstate_cython__(self, __pyx_state)");
57094 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_44__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_44__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_43__setstate_cython__};
57095 static PyObject *__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_44__setstate_cython__(PyObject *__pyx_v_self,
57096 #if CYTHON_METH_FASTCALL
57097 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
57098 #else
57099 PyObject *__pyx_args, PyObject *__pyx_kwds
57100 #endif
57101 ) {
57102 PyObject *__pyx_v___pyx_state = 0;
57103 #if !CYTHON_METH_FASTCALL
57104 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
57105 #endif
57106 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
57107 PyObject* values[1] = {0};
57108 int __pyx_lineno = 0;
57109 const char *__pyx_filename = NULL;
57110 int __pyx_clineno = 0;
57111 PyObject *__pyx_r = 0;
57112 __Pyx_RefNannyDeclarations
57113 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
57114 #if !CYTHON_METH_FASTCALL
57115 #if CYTHON_ASSUME_SAFE_MACROS
57116 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
57117 #else
57118 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
57119 #endif
57120 #endif
57121 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
57122 {
57123 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
57124 if (__pyx_kwds) {
57125 Py_ssize_t kw_args;
57126 switch (__pyx_nargs) {
57127 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
57128 CYTHON_FALLTHROUGH;
57129 case 0: break;
57130 default: goto __pyx_L5_argtuple_error;
57131 }
57132 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
57133 switch (__pyx_nargs) {
57134 case 0:
57135 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
57136 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
57137 kw_args--;
57138 }
57139 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
57140 else goto __pyx_L5_argtuple_error;
57141 }
57142 if (unlikely(kw_args > 0)) {
57143 const Py_ssize_t kwd_pos_args = __pyx_nargs;
57144 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
57145 }
57146 } else if (unlikely(__pyx_nargs != 1)) {
57147 goto __pyx_L5_argtuple_error;
57148 } else {
57149 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
57150 }
57151 __pyx_v___pyx_state = values[0];
57152 }
57153 goto __pyx_L6_skip;
57154 __pyx_L5_argtuple_error:;
57155 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
57156 __pyx_L6_skip:;
57157 goto __pyx_L4_argument_unpacking_done;
57158 __pyx_L3_error:;
57159 {
57160 Py_ssize_t __pyx_temp;
57161 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
57162 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
57163 }
57164 }
57165 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57166 __Pyx_RefNannyFinishContext();
57167 return NULL;
57168 __pyx_L4_argument_unpacking_done:;
57169 __pyx_r = __pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_43__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v_self), __pyx_v___pyx_state);
57170
57171 /* function exit code */
57172 {
57173 Py_ssize_t __pyx_temp;
57174 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
57175 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
57176 }
57177 }
57178 __Pyx_RefNannyFinishContext();
57179 return __pyx_r;
57180 }
57181
57182 static PyObject *__pyx_pf_5pysam_7libcbcf_17VariantRecordInfo_43__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
57183 PyObject *__pyx_r = NULL;
57184 __Pyx_TraceDeclarations
57185 __Pyx_RefNannyDeclarations
57186 PyObject *__pyx_t_1 = NULL;
57187 int __pyx_lineno = 0;
57188 const char *__pyx_filename = NULL;
57189 int __pyx_clineno = 0;
57190 __Pyx_TraceFrameInit(__pyx_codeobj__149)
57191 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
57192 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
57193
57194 /* "(tree fragment)":17
57195 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, state)
57196 * def __setstate_cython__(self, __pyx_state):
57197 * __pyx_unpickle_VariantRecordInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
57198 */
57199 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
57200 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
57201 __Pyx_GOTREF(__pyx_t_1);
57202 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57203
57204 /* "(tree fragment)":16
57205 * else:
57206 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, state)
57207 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
57208 * __pyx_unpickle_VariantRecordInfo__set_state(self, __pyx_state)
57209 */
57210
57211 /* function exit code */
57212 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
57213 goto __pyx_L0;
57214 __pyx_L1_error:;
57215 __Pyx_XDECREF(__pyx_t_1);
57216 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57217 __pyx_r = NULL;
57218 __pyx_L0:;
57219 __Pyx_XGIVEREF(__pyx_r);
57220 __Pyx_TraceReturn(__pyx_r, 0);
57221 __Pyx_RefNannyFinishContext();
57222 return __pyx_r;
57223 }
57224
57225 /* "pysam/libcbcf.pyx":2857
57226 *
57227 *
57228 * cdef VariantRecordInfo makeVariantRecordInfo(VariantRecord record): # <<<<<<<<<<<<<<
57229 * if not record:
57230 * raise ValueError('invalid VariantRecord')
57231 */
57232
57233 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_f_5pysam_7libcbcf_makeVariantRecordInfo(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record) {
57234 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v_info = 0;
57235 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_r = NULL;
57236 __Pyx_TraceDeclarations
57237 __Pyx_RefNannyDeclarations
57238 int __pyx_t_1;
57239 int __pyx_t_2;
57240 PyObject *__pyx_t_3 = NULL;
57241 int __pyx_lineno = 0;
57242 const char *__pyx_filename = NULL;
57243 int __pyx_clineno = 0;
57244 __Pyx_RefNannySetupContext("makeVariantRecordInfo", 1);
57245 __Pyx_TraceCall("makeVariantRecordInfo", __pyx_f[0], 2857, 0, __PYX_ERR(0, 2857, __pyx_L1_error));
57246
57247 /* "pysam/libcbcf.pyx":2858
57248 *
57249 * cdef VariantRecordInfo makeVariantRecordInfo(VariantRecord record):
57250 * if not record: # <<<<<<<<<<<<<<
57251 * raise ValueError('invalid VariantRecord')
57252 *
57253 */
57254 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_record)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2858, __pyx_L1_error)
57255 __pyx_t_2 = (!__pyx_t_1);
57256 if (unlikely(__pyx_t_2)) {
57257
57258 /* "pysam/libcbcf.pyx":2859
57259 * cdef VariantRecordInfo makeVariantRecordInfo(VariantRecord record):
57260 * if not record:
57261 * raise ValueError('invalid VariantRecord') # <<<<<<<<<<<<<<
57262 *
57263 * cdef VariantRecordInfo info = VariantRecordInfo.__new__(VariantRecordInfo)
57264 */
57265 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2859, __pyx_L1_error)
57266 __Pyx_GOTREF(__pyx_t_3);
57267 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
57268 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57269 __PYX_ERR(0, 2859, __pyx_L1_error)
57270
57271 /* "pysam/libcbcf.pyx":2858
57272 *
57273 * cdef VariantRecordInfo makeVariantRecordInfo(VariantRecord record):
57274 * if not record: # <<<<<<<<<<<<<<
57275 * raise ValueError('invalid VariantRecord')
57276 *
57277 */
57278 }
57279
57280 /* "pysam/libcbcf.pyx":2861
57281 * raise ValueError('invalid VariantRecord')
57282 *
57283 * cdef VariantRecordInfo info = VariantRecordInfo.__new__(VariantRecordInfo) # <<<<<<<<<<<<<<
57284 * info.record = record
57285 *
57286 */
57287 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordInfo(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2861, __pyx_L1_error)
57288 __Pyx_GOTREF((PyObject *)__pyx_t_3);
57289 __pyx_v_info = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_t_3);
57290 __pyx_t_3 = 0;
57291
57292 /* "pysam/libcbcf.pyx":2862
57293 *
57294 * cdef VariantRecordInfo info = VariantRecordInfo.__new__(VariantRecordInfo)
57295 * info.record = record # <<<<<<<<<<<<<<
57296 *
57297 * return info
57298 */
57299 __Pyx_INCREF((PyObject *)__pyx_v_record);
57300 __Pyx_GIVEREF((PyObject *)__pyx_v_record);
57301 __Pyx_GOTREF((PyObject *)__pyx_v_info->record);
57302 __Pyx_DECREF((PyObject *)__pyx_v_info->record);
57303 __pyx_v_info->record = __pyx_v_record;
57304
57305 /* "pysam/libcbcf.pyx":2864
57306 * info.record = record
57307 *
57308 * return info # <<<<<<<<<<<<<<
57309 *
57310 *
57311 */
57312 __Pyx_XDECREF((PyObject *)__pyx_r);
57313 __Pyx_INCREF((PyObject *)__pyx_v_info);
57314 __pyx_r = __pyx_v_info;
57315 goto __pyx_L0;
57316
57317 /* "pysam/libcbcf.pyx":2857
57318 *
57319 *
57320 * cdef VariantRecordInfo makeVariantRecordInfo(VariantRecord record): # <<<<<<<<<<<<<<
57321 * if not record:
57322 * raise ValueError('invalid VariantRecord')
57323 */
57324
57325 /* function exit code */
57326 __pyx_L1_error:;
57327 __Pyx_XDECREF(__pyx_t_3);
57328 __Pyx_AddTraceback("pysam.libcbcf.makeVariantRecordInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
57329 __pyx_r = 0;
57330 __pyx_L0:;
57331 __Pyx_XDECREF((PyObject *)__pyx_v_info);
57332 __Pyx_XGIVEREF((PyObject *)__pyx_r);
57333 __Pyx_TraceReturn(__pyx_r, 0);
57334 __Pyx_RefNannyFinishContext();
57335 return __pyx_r;
57336 }
57337
57338 /* "pysam/libcbcf.pyx":2869
57339 * cdef class VariantRecordSamples(object):
57340 * """mapping from sample index or name to :class:`VariantRecordSample` object."""
57341 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
57342 * raise TypeError('this class cannot be instantiated from Python')
57343 *
57344 */
57345
57346 /* Python wrapper */
57347 static int __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
57348 static int __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
57349 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
57350 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
57351 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
57352 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
57353 int __pyx_r;
57354 __Pyx_RefNannyDeclarations
57355 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
57356 #if CYTHON_ASSUME_SAFE_MACROS
57357 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
57358 #else
57359 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
57360 #endif
57361 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
57362 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
57363 __Pyx_INCREF(__pyx_args);
57364 __pyx_v_args = __pyx_args;
57365 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
57366
57367 /* function exit code */
57368 __Pyx_DECREF(__pyx_v_args);
57369 __Pyx_XDECREF(__pyx_v_kwargs);
57370 __Pyx_RefNannyFinishContext();
57371 return __pyx_r;
57372 }
57373
57374 static int __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
57375 int __pyx_r;
57376 __Pyx_TraceDeclarations
57377 __Pyx_RefNannyDeclarations
57378 PyObject *__pyx_t_1 = NULL;
57379 int __pyx_lineno = 0;
57380 const char *__pyx_filename = NULL;
57381 int __pyx_clineno = 0;
57382 __Pyx_RefNannySetupContext("__init__", 1);
57383 __Pyx_TraceCall("__init__", __pyx_f[0], 2869, 0, __PYX_ERR(0, 2869, __pyx_L1_error));
57384
57385 /* "pysam/libcbcf.pyx":2870
57386 * """mapping from sample index or name to :class:`VariantRecordSample` object."""
57387 * def __init__(self, *args, **kwargs):
57388 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
57389 *
57390 * def __len__(self):
57391 */
57392 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2870, __pyx_L1_error)
57393 __Pyx_GOTREF(__pyx_t_1);
57394 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
57395 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57396 __PYX_ERR(0, 2870, __pyx_L1_error)
57397
57398 /* "pysam/libcbcf.pyx":2869
57399 * cdef class VariantRecordSamples(object):
57400 * """mapping from sample index or name to :class:`VariantRecordSample` object."""
57401 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
57402 * raise TypeError('this class cannot be instantiated from Python')
57403 *
57404 */
57405
57406 /* function exit code */
57407 __pyx_L1_error:;
57408 __Pyx_XDECREF(__pyx_t_1);
57409 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57410 __pyx_r = -1;
57411 __Pyx_TraceReturn(Py_None, 0);
57412 __Pyx_RefNannyFinishContext();
57413 return __pyx_r;
57414 }
57415
57416 /* "pysam/libcbcf.pyx":2872
57417 * raise TypeError('this class cannot be instantiated from Python')
57418 *
57419 * def __len__(self): # <<<<<<<<<<<<<<
57420 * return self.record.ptr.n_sample # bcf_hdr_nsamples(self.record.header.ptr)
57421 *
57422 */
57423
57424 /* Python wrapper */
57425 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_3__len__(PyObject *__pyx_v_self); /*proto*/
57426 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_3__len__(PyObject *__pyx_v_self) {
57427 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
57428 Py_ssize_t __pyx_r;
57429 __Pyx_RefNannyDeclarations
57430 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
57431 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
57432 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
57433
57434 /* function exit code */
57435 __Pyx_RefNannyFinishContext();
57436 return __pyx_r;
57437 }
57438
57439 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
57440 Py_ssize_t __pyx_r;
57441 __Pyx_TraceDeclarations
57442 int __pyx_lineno = 0;
57443 const char *__pyx_filename = NULL;
57444 int __pyx_clineno = 0;
57445 __Pyx_TraceCall("__len__", __pyx_f[0], 2872, 0, __PYX_ERR(0, 2872, __pyx_L1_error));
57446
57447 /* "pysam/libcbcf.pyx":2873
57448 *
57449 * def __len__(self):
57450 * return self.record.ptr.n_sample # bcf_hdr_nsamples(self.record.header.ptr) # <<<<<<<<<<<<<<
57451 *
57452 * def __bool__(self):
57453 */
57454 __pyx_r = __pyx_v_self->record->ptr->n_sample;
57455 goto __pyx_L0;
57456
57457 /* "pysam/libcbcf.pyx":2872
57458 * raise TypeError('this class cannot be instantiated from Python')
57459 *
57460 * def __len__(self): # <<<<<<<<<<<<<<
57461 * return self.record.ptr.n_sample # bcf_hdr_nsamples(self.record.header.ptr)
57462 *
57463 */
57464
57465 /* function exit code */
57466 __pyx_L1_error:;
57467 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57468 __pyx_r = -1;
57469 __pyx_L0:;
57470 __Pyx_TraceReturn(Py_None, 0);
57471 return __pyx_r;
57472 }
57473
57474 /* "pysam/libcbcf.pyx":2875
57475 * return self.record.ptr.n_sample # bcf_hdr_nsamples(self.record.header.ptr)
57476 *
57477 * def __bool__(self): # <<<<<<<<<<<<<<
57478 * return self.record.ptr.n_sample != 0 # bcf_hdr_nsamples(self.record.header.ptr) != 0
57479 *
57480 */
57481
57482 /* Python wrapper */
57483 static int __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_5__bool__(PyObject *__pyx_v_self); /*proto*/
57484 static int __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_5__bool__(PyObject *__pyx_v_self) {
57485 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
57486 int __pyx_r;
57487 __Pyx_RefNannyDeclarations
57488 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
57489 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
57490 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
57491
57492 /* function exit code */
57493 __Pyx_RefNannyFinishContext();
57494 return __pyx_r;
57495 }
57496
57497 static int __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
57498 int __pyx_r;
57499 __Pyx_TraceDeclarations
57500 int __pyx_lineno = 0;
57501 const char *__pyx_filename = NULL;
57502 int __pyx_clineno = 0;
57503 __Pyx_TraceCall("__bool__", __pyx_f[0], 2875, 0, __PYX_ERR(0, 2875, __pyx_L1_error));
57504
57505 /* "pysam/libcbcf.pyx":2876
57506 *
57507 * def __bool__(self):
57508 * return self.record.ptr.n_sample != 0 # bcf_hdr_nsamples(self.record.header.ptr) != 0 # <<<<<<<<<<<<<<
57509 *
57510 * def __getitem__(self, key):
57511 */
57512 __pyx_r = (__pyx_v_self->record->ptr->n_sample != 0);
57513 goto __pyx_L0;
57514
57515 /* "pysam/libcbcf.pyx":2875
57516 * return self.record.ptr.n_sample # bcf_hdr_nsamples(self.record.header.ptr)
57517 *
57518 * def __bool__(self): # <<<<<<<<<<<<<<
57519 * return self.record.ptr.n_sample != 0 # bcf_hdr_nsamples(self.record.header.ptr) != 0
57520 *
57521 */
57522
57523 /* function exit code */
57524 __pyx_L1_error:;
57525 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57526 __pyx_r = -1;
57527 __pyx_L0:;
57528 __Pyx_TraceReturn(Py_None, 0);
57529 return __pyx_r;
57530 }
57531
57532 /* "pysam/libcbcf.pyx":2878
57533 * return self.record.ptr.n_sample != 0 # bcf_hdr_nsamples(self.record.header.ptr) != 0
57534 *
57535 * def __getitem__(self, key): # <<<<<<<<<<<<<<
57536 * cdef bcf_hdr_t *hdr = self.record.header.ptr
57537 * cdef bcf1_t *r = self.record.ptr
57538 */
57539
57540 /* Python wrapper */
57541 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
57542 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
57543 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
57544 PyObject *__pyx_r = 0;
57545 __Pyx_RefNannyDeclarations
57546 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
57547 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
57548 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self), ((PyObject *)__pyx_v_key));
57549
57550 /* function exit code */
57551 __Pyx_RefNannyFinishContext();
57552 return __pyx_r;
57553 }
57554
57555 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_key) {
57556 bcf_hdr_t *__pyx_v_hdr;
57557 CYTHON_UNUSED bcf1_t *__pyx_v_r;
57558 int __pyx_v_n;
57559 int __pyx_v_sample_index;
57560 PyObject *__pyx_v_bkey = NULL;
57561 PyObject *__pyx_r = NULL;
57562 __Pyx_TraceDeclarations
57563 __Pyx_RefNannyDeclarations
57564 bcf_hdr_t *__pyx_t_1;
57565 bcf1_t *__pyx_t_2;
57566 uint32_t __pyx_t_3;
57567 int __pyx_t_4;
57568 int __pyx_t_5;
57569 PyObject *__pyx_t_6 = NULL;
57570 char const *__pyx_t_7;
57571 PyObject *__pyx_t_8 = NULL;
57572 PyObject *__pyx_t_9 = NULL;
57573 unsigned int __pyx_t_10;
57574 int __pyx_t_11;
57575 int __pyx_lineno = 0;
57576 const char *__pyx_filename = NULL;
57577 int __pyx_clineno = 0;
57578 __Pyx_RefNannySetupContext("__getitem__", 1);
57579 __Pyx_TraceCall("__getitem__", __pyx_f[0], 2878, 0, __PYX_ERR(0, 2878, __pyx_L1_error));
57580
57581 /* "pysam/libcbcf.pyx":2879
57582 *
57583 * def __getitem__(self, key):
57584 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
57585 * cdef bcf1_t *r = self.record.ptr
57586 * cdef int n = self.record.ptr.n_sample
57587 */
57588 __pyx_t_1 = __pyx_v_self->record->header->ptr;
57589 __pyx_v_hdr = __pyx_t_1;
57590
57591 /* "pysam/libcbcf.pyx":2880
57592 * def __getitem__(self, key):
57593 * cdef bcf_hdr_t *hdr = self.record.header.ptr
57594 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
57595 * cdef int n = self.record.ptr.n_sample
57596 * cdef int sample_index
57597 */
57598 __pyx_t_2 = __pyx_v_self->record->ptr;
57599 __pyx_v_r = __pyx_t_2;
57600
57601 /* "pysam/libcbcf.pyx":2881
57602 * cdef bcf_hdr_t *hdr = self.record.header.ptr
57603 * cdef bcf1_t *r = self.record.ptr
57604 * cdef int n = self.record.ptr.n_sample # <<<<<<<<<<<<<<
57605 * cdef int sample_index
57606 * cdef vdict_t *d
57607 */
57608 __pyx_t_3 = __pyx_v_self->record->ptr->n_sample;
57609 __pyx_v_n = __pyx_t_3;
57610
57611 /* "pysam/libcbcf.pyx":2886
57612 * cdef khiter_t k
57613 *
57614 * if isinstance(key, int): # <<<<<<<<<<<<<<
57615 * sample_index = key
57616 * else:
57617 */
57618 __pyx_t_4 = PyInt_Check(__pyx_v_key);
57619 if (__pyx_t_4) {
57620
57621 /* "pysam/libcbcf.pyx":2887
57622 *
57623 * if isinstance(key, int):
57624 * sample_index = key # <<<<<<<<<<<<<<
57625 * else:
57626 * bkey = force_bytes(key)
57627 */
57628 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_key); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2887, __pyx_L1_error)
57629 __pyx_v_sample_index = __pyx_t_5;
57630
57631 /* "pysam/libcbcf.pyx":2886
57632 * cdef khiter_t k
57633 *
57634 * if isinstance(key, int): # <<<<<<<<<<<<<<
57635 * sample_index = key
57636 * else:
57637 */
57638 goto __pyx_L3;
57639 }
57640
57641 /* "pysam/libcbcf.pyx":2889
57642 * sample_index = key
57643 * else:
57644 * bkey = force_bytes(key) # <<<<<<<<<<<<<<
57645 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey)
57646 * if sample_index < 0:
57647 */
57648 /*else*/ {
57649 __pyx_t_6 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2889, __pyx_L1_error)
57650 __Pyx_GOTREF(__pyx_t_6);
57651 __pyx_v_bkey = ((PyObject*)__pyx_t_6);
57652 __pyx_t_6 = 0;
57653
57654 /* "pysam/libcbcf.pyx":2890
57655 * else:
57656 * bkey = force_bytes(key)
57657 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey) # <<<<<<<<<<<<<<
57658 * if sample_index < 0:
57659 * raise KeyError('invalid sample name: {}'.format(key))
57660 */
57661 if (unlikely(__pyx_v_bkey == Py_None)) {
57662 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
57663 __PYX_ERR(0, 2890, __pyx_L1_error)
57664 }
57665 __pyx_t_7 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2890, __pyx_L1_error)
57666 __pyx_v_sample_index = bcf_hdr_id2int(__pyx_v_hdr, BCF_DT_SAMPLE, __pyx_t_7);
57667
57668 /* "pysam/libcbcf.pyx":2891
57669 * bkey = force_bytes(key)
57670 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey)
57671 * if sample_index < 0: # <<<<<<<<<<<<<<
57672 * raise KeyError('invalid sample name: {}'.format(key))
57673 *
57674 */
57675 __pyx_t_4 = (__pyx_v_sample_index < 0);
57676 if (unlikely(__pyx_t_4)) {
57677
57678 /* "pysam/libcbcf.pyx":2892
57679 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey)
57680 * if sample_index < 0:
57681 * raise KeyError('invalid sample name: {}'.format(key)) # <<<<<<<<<<<<<<
57682 *
57683 * if sample_index < 0 or sample_index >= n:
57684 */
57685 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_sample_name, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2892, __pyx_L1_error)
57686 __Pyx_GOTREF(__pyx_t_8);
57687 __pyx_t_9 = NULL;
57688 __pyx_t_10 = 0;
57689 #if CYTHON_UNPACK_METHODS
57690 if (likely(PyMethod_Check(__pyx_t_8))) {
57691 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
57692 if (likely(__pyx_t_9)) {
57693 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
57694 __Pyx_INCREF(__pyx_t_9);
57695 __Pyx_INCREF(function);
57696 __Pyx_DECREF_SET(__pyx_t_8, function);
57697 __pyx_t_10 = 1;
57698 }
57699 }
57700 #endif
57701 {
57702 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_key};
57703 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
57704 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
57705 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2892, __pyx_L1_error)
57706 __Pyx_GOTREF(__pyx_t_6);
57707 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57708 }
57709 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2892, __pyx_L1_error)
57710 __Pyx_GOTREF(__pyx_t_8);
57711 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
57712 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
57713 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57714 __PYX_ERR(0, 2892, __pyx_L1_error)
57715
57716 /* "pysam/libcbcf.pyx":2891
57717 * bkey = force_bytes(key)
57718 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey)
57719 * if sample_index < 0: # <<<<<<<<<<<<<<
57720 * raise KeyError('invalid sample name: {}'.format(key))
57721 *
57722 */
57723 }
57724 }
57725 __pyx_L3:;
57726
57727 /* "pysam/libcbcf.pyx":2894
57728 * raise KeyError('invalid sample name: {}'.format(key))
57729 *
57730 * if sample_index < 0 or sample_index >= n: # <<<<<<<<<<<<<<
57731 * raise IndexError('invalid sample index')
57732 *
57733 */
57734 __pyx_t_11 = (__pyx_v_sample_index < 0);
57735 if (!__pyx_t_11) {
57736 } else {
57737 __pyx_t_4 = __pyx_t_11;
57738 goto __pyx_L6_bool_binop_done;
57739 }
57740 __pyx_t_11 = (__pyx_v_sample_index >= __pyx_v_n);
57741 __pyx_t_4 = __pyx_t_11;
57742 __pyx_L6_bool_binop_done:;
57743 if (unlikely(__pyx_t_4)) {
57744
57745 /* "pysam/libcbcf.pyx":2895
57746 *
57747 * if sample_index < 0 or sample_index >= n:
57748 * raise IndexError('invalid sample index') # <<<<<<<<<<<<<<
57749 *
57750 * return makeVariantRecordSample(self.record, sample_index)
57751 */
57752 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2895, __pyx_L1_error)
57753 __Pyx_GOTREF(__pyx_t_8);
57754 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
57755 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57756 __PYX_ERR(0, 2895, __pyx_L1_error)
57757
57758 /* "pysam/libcbcf.pyx":2894
57759 * raise KeyError('invalid sample name: {}'.format(key))
57760 *
57761 * if sample_index < 0 or sample_index >= n: # <<<<<<<<<<<<<<
57762 * raise IndexError('invalid sample index')
57763 *
57764 */
57765 }
57766
57767 /* "pysam/libcbcf.pyx":2897
57768 * raise IndexError('invalid sample index')
57769 *
57770 * return makeVariantRecordSample(self.record, sample_index) # <<<<<<<<<<<<<<
57771 *
57772 * def __iter__(self):
57773 */
57774 __Pyx_XDECREF(__pyx_r);
57775 __pyx_t_8 = ((PyObject *)__pyx_v_self->record);
57776 __Pyx_INCREF(__pyx_t_8);
57777 __pyx_t_6 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecordSample(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_8), __pyx_v_sample_index)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2897, __pyx_L1_error)
57778 __Pyx_GOTREF(__pyx_t_6);
57779 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57780 __pyx_r = __pyx_t_6;
57781 __pyx_t_6 = 0;
57782 goto __pyx_L0;
57783
57784 /* "pysam/libcbcf.pyx":2878
57785 * return self.record.ptr.n_sample != 0 # bcf_hdr_nsamples(self.record.header.ptr) != 0
57786 *
57787 * def __getitem__(self, key): # <<<<<<<<<<<<<<
57788 * cdef bcf_hdr_t *hdr = self.record.header.ptr
57789 * cdef bcf1_t *r = self.record.ptr
57790 */
57791
57792 /* function exit code */
57793 __pyx_L1_error:;
57794 __Pyx_XDECREF(__pyx_t_6);
57795 __Pyx_XDECREF(__pyx_t_8);
57796 __Pyx_XDECREF(__pyx_t_9);
57797 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57798 __pyx_r = NULL;
57799 __pyx_L0:;
57800 __Pyx_XDECREF(__pyx_v_bkey);
57801 __Pyx_XGIVEREF(__pyx_r);
57802 __Pyx_TraceReturn(__pyx_r, 0);
57803 __Pyx_RefNannyFinishContext();
57804 return __pyx_r;
57805 }
57806 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_10generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
57807
57808 /* "pysam/libcbcf.pyx":2899
57809 * return makeVariantRecordSample(self.record, sample_index)
57810 *
57811 * def __iter__(self): # <<<<<<<<<<<<<<
57812 * cdef bcf_hdr_t *hdr = self.record.header.ptr
57813 * cdef bcf1_t *r = self.record.ptr
57814 */
57815
57816 /* Python wrapper */
57817 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_9__iter__(PyObject *__pyx_v_self); /*proto*/
57818 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_9__iter__(PyObject *__pyx_v_self) {
57819 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
57820 PyObject *__pyx_r = 0;
57821 __Pyx_RefNannyDeclarations
57822 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
57823 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
57824 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_8__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
57825
57826 /* function exit code */
57827 __Pyx_RefNannyFinishContext();
57828 return __pyx_r;
57829 }
57830
57831 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
57832 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *__pyx_cur_scope;
57833 PyObject *__pyx_r = NULL;
57834 __Pyx_RefNannyDeclarations
57835 int __pyx_lineno = 0;
57836 const char *__pyx_filename = NULL;
57837 int __pyx_clineno = 0;
57838 __Pyx_RefNannySetupContext("__iter__", 0);
57839 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_27___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__, __pyx_empty_tuple, NULL);
57840 if (unlikely(!__pyx_cur_scope)) {
57841 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *)Py_None);
57842 __Pyx_INCREF(Py_None);
57843 __PYX_ERR(0, 2899, __pyx_L1_error)
57844 } else {
57845 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
57846 }
57847 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
57848 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
57849 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
57850 {
57851 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_10generator20, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantRecordSamples___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2899, __pyx_L1_error)
57852 __Pyx_DECREF(__pyx_cur_scope);
57853 __Pyx_RefNannyFinishContext();
57854 return (PyObject *) gen;
57855 }
57856
57857 /* function exit code */
57858 __pyx_L1_error:;
57859 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57860 __pyx_r = NULL;
57861 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
57862 __Pyx_XGIVEREF(__pyx_r);
57863 __Pyx_RefNannyFinishContext();
57864 return __pyx_r;
57865 }
57866
57867 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_10generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
57868 {
57869 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *)__pyx_generator->closure);
57870 PyObject *__pyx_r = NULL;
57871 __Pyx_TraceDeclarations
57872 bcf_hdr_t *__pyx_t_1;
57873 bcf1_t *__pyx_t_2;
57874 uint32_t __pyx_t_3;
57875 int32_t __pyx_t_4;
57876 int32_t __pyx_t_5;
57877 int32_t __pyx_t_6;
57878 PyObject *__pyx_t_7 = NULL;
57879 int __pyx_lineno = 0;
57880 const char *__pyx_filename = NULL;
57881 int __pyx_clineno = 0;
57882 __Pyx_RefNannyDeclarations
57883 __Pyx_RefNannySetupContext("__iter__", 0);
57884 __Pyx_TraceCall("__iter__", __pyx_f[0], 2899, 0, __PYX_ERR(0, 2899, __pyx_L1_error));
57885 switch (__pyx_generator->resume_label) {
57886 case 0: goto __pyx_L3_first_run;
57887 case 1: goto __pyx_L6_resume_from_yield;
57888 default: /* CPython raises the right error here */
57889 __Pyx_TraceReturn(Py_None, 0);
57890 __Pyx_RefNannyFinishContext();
57891 return NULL;
57892 }
57893 __pyx_L3_first_run:;
57894 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2899, __pyx_L1_error)
57895
57896 /* "pysam/libcbcf.pyx":2900
57897 *
57898 * def __iter__(self):
57899 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
57900 * cdef bcf1_t *r = self.record.ptr
57901 * cdef int32_t i, n = self.record.ptr.n_sample
57902 */
57903 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
57904 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
57905
57906 /* "pysam/libcbcf.pyx":2901
57907 * def __iter__(self):
57908 * cdef bcf_hdr_t *hdr = self.record.header.ptr
57909 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
57910 * cdef int32_t i, n = self.record.ptr.n_sample
57911 *
57912 */
57913 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
57914 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
57915
57916 /* "pysam/libcbcf.pyx":2902
57917 * cdef bcf_hdr_t *hdr = self.record.header.ptr
57918 * cdef bcf1_t *r = self.record.ptr
57919 * cdef int32_t i, n = self.record.ptr.n_sample # <<<<<<<<<<<<<<
57920 *
57921 * for i in range(n):
57922 */
57923 __pyx_t_3 = __pyx_cur_scope->__pyx_v_self->record->ptr->n_sample;
57924 __pyx_cur_scope->__pyx_v_n = __pyx_t_3;
57925
57926 /* "pysam/libcbcf.pyx":2904
57927 * cdef int32_t i, n = self.record.ptr.n_sample
57928 *
57929 * for i in range(n): # <<<<<<<<<<<<<<
57930 * yield charptr_to_str(hdr.samples[i])
57931 *
57932 */
57933 __pyx_t_4 = __pyx_cur_scope->__pyx_v_n;
57934 __pyx_t_5 = __pyx_t_4;
57935 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
57936 __pyx_cur_scope->__pyx_v_i = __pyx_t_6;
57937
57938 /* "pysam/libcbcf.pyx":2905
57939 *
57940 * for i in range(n):
57941 * yield charptr_to_str(hdr.samples[i]) # <<<<<<<<<<<<<<
57942 *
57943 * def get(self, key, default=None):
57944 */
57945 __pyx_t_7 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_cur_scope->__pyx_v_hdr->samples[__pyx_cur_scope->__pyx_v_i]), NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2905, __pyx_L1_error)
57946 __Pyx_GOTREF(__pyx_t_7);
57947 __pyx_r = __pyx_t_7;
57948 __pyx_t_7 = 0;
57949 __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
57950 __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
57951 __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
57952 __Pyx_XGIVEREF(__pyx_r);
57953 __Pyx_TraceReturn(__pyx_r, 0);
57954 __Pyx_RefNannyFinishContext();
57955 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
57956 /* return from generator, yielding value */
57957 __pyx_generator->resume_label = 1;
57958 return __pyx_r;
57959 __pyx_L6_resume_from_yield:;
57960 __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
57961 __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
57962 __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
57963 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2905, __pyx_L1_error)
57964 }
57965 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
57966
57967 /* "pysam/libcbcf.pyx":2899
57968 * return makeVariantRecordSample(self.record, sample_index)
57969 *
57970 * def __iter__(self): # <<<<<<<<<<<<<<
57971 * cdef bcf_hdr_t *hdr = self.record.header.ptr
57972 * cdef bcf1_t *r = self.record.ptr
57973 */
57974
57975 /* function exit code */
57976 PyErr_SetNone(PyExc_StopIteration);
57977 goto __pyx_L0;
57978 __pyx_L1_error:;
57979 __Pyx_Generator_Replace_StopIteration(0);
57980 __Pyx_XDECREF(__pyx_t_7);
57981 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57982 __pyx_L0:;
57983 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
57984 #if !CYTHON_USE_EXC_INFO_STACK
57985 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
57986 #endif
57987 __pyx_generator->resume_label = -1;
57988 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
57989 __Pyx_TraceReturn(__pyx_r, 0);
57990 __Pyx_RefNannyFinishContext();
57991 return __pyx_r;
57992 }
57993
57994 /* "pysam/libcbcf.pyx":2907
57995 * yield charptr_to_str(hdr.samples[i])
57996 *
57997 * def get(self, key, default=None): # <<<<<<<<<<<<<<
57998 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
57999 * try:
58000 */
58001
58002 /* Python wrapper */
58003 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_12get(PyObject *__pyx_v_self,
58004 #if CYTHON_METH_FASTCALL
58005 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
58006 #else
58007 PyObject *__pyx_args, PyObject *__pyx_kwds
58008 #endif
58009 ); /*proto*/
58010 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_11get, "VariantRecordSamples.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
58011 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_12get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_12get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_11get};
58012 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_12get(PyObject *__pyx_v_self,
58013 #if CYTHON_METH_FASTCALL
58014 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
58015 #else
58016 PyObject *__pyx_args, PyObject *__pyx_kwds
58017 #endif
58018 ) {
58019 PyObject *__pyx_v_key = 0;
58020 PyObject *__pyx_v_default = 0;
58021 #if !CYTHON_METH_FASTCALL
58022 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
58023 #endif
58024 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
58025 PyObject* values[2] = {0,0};
58026 int __pyx_lineno = 0;
58027 const char *__pyx_filename = NULL;
58028 int __pyx_clineno = 0;
58029 PyObject *__pyx_r = 0;
58030 __Pyx_RefNannyDeclarations
58031 __Pyx_RefNannySetupContext("get (wrapper)", 0);
58032 #if !CYTHON_METH_FASTCALL
58033 #if CYTHON_ASSUME_SAFE_MACROS
58034 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
58035 #else
58036 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
58037 #endif
58038 #endif
58039 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
58040 {
58041 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
58042 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
58043 if (__pyx_kwds) {
58044 Py_ssize_t kw_args;
58045 switch (__pyx_nargs) {
58046 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
58047 CYTHON_FALLTHROUGH;
58048 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
58049 CYTHON_FALLTHROUGH;
58050 case 0: break;
58051 default: goto __pyx_L5_argtuple_error;
58052 }
58053 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
58054 switch (__pyx_nargs) {
58055 case 0:
58056 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
58057 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
58058 kw_args--;
58059 }
58060 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2907, __pyx_L3_error)
58061 else goto __pyx_L5_argtuple_error;
58062 CYTHON_FALLTHROUGH;
58063 case 1:
58064 if (kw_args > 0) {
58065 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
58066 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
58067 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2907, __pyx_L3_error)
58068 }
58069 }
58070 if (unlikely(kw_args > 0)) {
58071 const Py_ssize_t kwd_pos_args = __pyx_nargs;
58072 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 2907, __pyx_L3_error)
58073 }
58074 } else {
58075 switch (__pyx_nargs) {
58076 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
58077 CYTHON_FALLTHROUGH;
58078 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
58079 break;
58080 default: goto __pyx_L5_argtuple_error;
58081 }
58082 }
58083 __pyx_v_key = values[0];
58084 __pyx_v_default = values[1];
58085 }
58086 goto __pyx_L6_skip;
58087 __pyx_L5_argtuple_error:;
58088 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2907, __pyx_L3_error)
58089 __pyx_L6_skip:;
58090 goto __pyx_L4_argument_unpacking_done;
58091 __pyx_L3_error:;
58092 {
58093 Py_ssize_t __pyx_temp;
58094 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
58095 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
58096 }
58097 }
58098 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
58099 __Pyx_RefNannyFinishContext();
58100 return NULL;
58101 __pyx_L4_argument_unpacking_done:;
58102 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_11get(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
58103
58104 /* function exit code */
58105 {
58106 Py_ssize_t __pyx_temp;
58107 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
58108 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
58109 }
58110 }
58111 __Pyx_RefNannyFinishContext();
58112 return __pyx_r;
58113 }
58114
58115 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_11get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
58116 PyObject *__pyx_r = NULL;
58117 __Pyx_TraceDeclarations
58118 __Pyx_RefNannyDeclarations
58119 PyObject *__pyx_t_1 = NULL;
58120 PyObject *__pyx_t_2 = NULL;
58121 PyObject *__pyx_t_3 = NULL;
58122 PyObject *__pyx_t_4 = NULL;
58123 int __pyx_t_5;
58124 PyObject *__pyx_t_6 = NULL;
58125 PyObject *__pyx_t_7 = NULL;
58126 int __pyx_lineno = 0;
58127 const char *__pyx_filename = NULL;
58128 int __pyx_clineno = 0;
58129 __Pyx_TraceFrameInit(__pyx_codeobj__150)
58130 __Pyx_RefNannySetupContext("get", 1);
58131 __Pyx_TraceCall("get", __pyx_f[0], 2907, 0, __PYX_ERR(0, 2907, __pyx_L1_error));
58132
58133 /* "pysam/libcbcf.pyx":2909
58134 * def get(self, key, default=None):
58135 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
58136 * try: # <<<<<<<<<<<<<<
58137 * return self[key]
58138 * except KeyError:
58139 */
58140 {
58141 __Pyx_PyThreadState_declare
58142 __Pyx_PyThreadState_assign
58143 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
58144 __Pyx_XGOTREF(__pyx_t_1);
58145 __Pyx_XGOTREF(__pyx_t_2);
58146 __Pyx_XGOTREF(__pyx_t_3);
58147 /*try:*/ {
58148
58149 /* "pysam/libcbcf.pyx":2910
58150 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
58151 * try:
58152 * return self[key] # <<<<<<<<<<<<<<
58153 * except KeyError:
58154 * return default
58155 */
58156 __Pyx_XDECREF(__pyx_r);
58157 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2910, __pyx_L3_error)
58158 __Pyx_GOTREF(__pyx_t_4);
58159 __pyx_r = __pyx_t_4;
58160 __pyx_t_4 = 0;
58161 goto __pyx_L7_try_return;
58162
58163 /* "pysam/libcbcf.pyx":2909
58164 * def get(self, key, default=None):
58165 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
58166 * try: # <<<<<<<<<<<<<<
58167 * return self[key]
58168 * except KeyError:
58169 */
58170 }
58171 __pyx_L3_error:;
58172 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
58173
58174 /* "pysam/libcbcf.pyx":2911
58175 * try:
58176 * return self[key]
58177 * except KeyError: # <<<<<<<<<<<<<<
58178 * return default
58179 *
58180 */
58181 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
58182 if (__pyx_t_5) {
58183 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
58184 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 2911, __pyx_L5_except_error)
58185 __Pyx_XGOTREF(__pyx_t_4);
58186 __Pyx_XGOTREF(__pyx_t_6);
58187 __Pyx_XGOTREF(__pyx_t_7);
58188
58189 /* "pysam/libcbcf.pyx":2912
58190 * return self[key]
58191 * except KeyError:
58192 * return default # <<<<<<<<<<<<<<
58193 *
58194 * def __contains__(self, key):
58195 */
58196 __Pyx_XDECREF(__pyx_r);
58197 __Pyx_INCREF(__pyx_v_default);
58198 __pyx_r = __pyx_v_default;
58199 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
58200 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58201 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
58202 goto __pyx_L6_except_return;
58203 }
58204 goto __pyx_L5_except_error;
58205
58206 /* "pysam/libcbcf.pyx":2909
58207 * def get(self, key, default=None):
58208 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
58209 * try: # <<<<<<<<<<<<<<
58210 * return self[key]
58211 * except KeyError:
58212 */
58213 __pyx_L5_except_error:;
58214 __Pyx_XGIVEREF(__pyx_t_1);
58215 __Pyx_XGIVEREF(__pyx_t_2);
58216 __Pyx_XGIVEREF(__pyx_t_3);
58217 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
58218 goto __pyx_L1_error;
58219 __pyx_L7_try_return:;
58220 __Pyx_XGIVEREF(__pyx_t_1);
58221 __Pyx_XGIVEREF(__pyx_t_2);
58222 __Pyx_XGIVEREF(__pyx_t_3);
58223 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
58224 goto __pyx_L0;
58225 __pyx_L6_except_return:;
58226 __Pyx_XGIVEREF(__pyx_t_1);
58227 __Pyx_XGIVEREF(__pyx_t_2);
58228 __Pyx_XGIVEREF(__pyx_t_3);
58229 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
58230 goto __pyx_L0;
58231 }
58232
58233 /* "pysam/libcbcf.pyx":2907
58234 * yield charptr_to_str(hdr.samples[i])
58235 *
58236 * def get(self, key, default=None): # <<<<<<<<<<<<<<
58237 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
58238 * try:
58239 */
58240
58241 /* function exit code */
58242 __pyx_L1_error:;
58243 __Pyx_XDECREF(__pyx_t_4);
58244 __Pyx_XDECREF(__pyx_t_6);
58245 __Pyx_XDECREF(__pyx_t_7);
58246 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
58247 __pyx_r = NULL;
58248 __pyx_L0:;
58249 __Pyx_XGIVEREF(__pyx_r);
58250 __Pyx_TraceReturn(__pyx_r, 0);
58251 __Pyx_RefNannyFinishContext();
58252 return __pyx_r;
58253 }
58254
58255 /* "pysam/libcbcf.pyx":2914
58256 * return default
58257 *
58258 * def __contains__(self, key): # <<<<<<<<<<<<<<
58259 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58260 * cdef bcf1_t *r = self.record.ptr
58261 */
58262
58263 /* Python wrapper */
58264 static int __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_14__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
58265 static int __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_14__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
58266 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
58267 int __pyx_r;
58268 __Pyx_RefNannyDeclarations
58269 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
58270 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
58271 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_13__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self), ((PyObject *)__pyx_v_key));
58272
58273 /* function exit code */
58274 __Pyx_RefNannyFinishContext();
58275 return __pyx_r;
58276 }
58277
58278 static int __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_13__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_key) {
58279 bcf_hdr_t *__pyx_v_hdr;
58280 CYTHON_UNUSED bcf1_t *__pyx_v_r;
58281 int __pyx_v_n;
58282 int __pyx_v_sample_index;
58283 PyObject *__pyx_v_bkey = NULL;
58284 int __pyx_r;
58285 __Pyx_TraceDeclarations
58286 __Pyx_RefNannyDeclarations
58287 bcf_hdr_t *__pyx_t_1;
58288 bcf1_t *__pyx_t_2;
58289 uint32_t __pyx_t_3;
58290 int __pyx_t_4;
58291 int __pyx_t_5;
58292 PyObject *__pyx_t_6 = NULL;
58293 char const *__pyx_t_7;
58294 PyObject *__pyx_t_8 = NULL;
58295 PyObject *__pyx_t_9 = NULL;
58296 unsigned int __pyx_t_10;
58297 int __pyx_lineno = 0;
58298 const char *__pyx_filename = NULL;
58299 int __pyx_clineno = 0;
58300 __Pyx_RefNannySetupContext("__contains__", 1);
58301 __Pyx_TraceCall("__contains__", __pyx_f[0], 2914, 0, __PYX_ERR(0, 2914, __pyx_L1_error));
58302
58303 /* "pysam/libcbcf.pyx":2915
58304 *
58305 * def __contains__(self, key):
58306 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
58307 * cdef bcf1_t *r = self.record.ptr
58308 * cdef int n = self.record.ptr.n_sample
58309 */
58310 __pyx_t_1 = __pyx_v_self->record->header->ptr;
58311 __pyx_v_hdr = __pyx_t_1;
58312
58313 /* "pysam/libcbcf.pyx":2916
58314 * def __contains__(self, key):
58315 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58316 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
58317 * cdef int n = self.record.ptr.n_sample
58318 * cdef int sample_index
58319 */
58320 __pyx_t_2 = __pyx_v_self->record->ptr;
58321 __pyx_v_r = __pyx_t_2;
58322
58323 /* "pysam/libcbcf.pyx":2917
58324 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58325 * cdef bcf1_t *r = self.record.ptr
58326 * cdef int n = self.record.ptr.n_sample # <<<<<<<<<<<<<<
58327 * cdef int sample_index
58328 * cdef vdict_t *d
58329 */
58330 __pyx_t_3 = __pyx_v_self->record->ptr->n_sample;
58331 __pyx_v_n = __pyx_t_3;
58332
58333 /* "pysam/libcbcf.pyx":2922
58334 * cdef khiter_t k
58335 *
58336 * if isinstance(key, int): # <<<<<<<<<<<<<<
58337 * sample_index = key
58338 * else:
58339 */
58340 __pyx_t_4 = PyInt_Check(__pyx_v_key);
58341 if (__pyx_t_4) {
58342
58343 /* "pysam/libcbcf.pyx":2923
58344 *
58345 * if isinstance(key, int):
58346 * sample_index = key # <<<<<<<<<<<<<<
58347 * else:
58348 * bkey = force_bytes(key)
58349 */
58350 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_key); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2923, __pyx_L1_error)
58351 __pyx_v_sample_index = __pyx_t_5;
58352
58353 /* "pysam/libcbcf.pyx":2922
58354 * cdef khiter_t k
58355 *
58356 * if isinstance(key, int): # <<<<<<<<<<<<<<
58357 * sample_index = key
58358 * else:
58359 */
58360 goto __pyx_L3;
58361 }
58362
58363 /* "pysam/libcbcf.pyx":2925
58364 * sample_index = key
58365 * else:
58366 * bkey = force_bytes(key) # <<<<<<<<<<<<<<
58367 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey)
58368 * if sample_index < 0:
58369 */
58370 /*else*/ {
58371 __pyx_t_6 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2925, __pyx_L1_error)
58372 __Pyx_GOTREF(__pyx_t_6);
58373 __pyx_v_bkey = ((PyObject*)__pyx_t_6);
58374 __pyx_t_6 = 0;
58375
58376 /* "pysam/libcbcf.pyx":2926
58377 * else:
58378 * bkey = force_bytes(key)
58379 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey) # <<<<<<<<<<<<<<
58380 * if sample_index < 0:
58381 * raise KeyError('invalid sample name: {}'.format(key))
58382 */
58383 if (unlikely(__pyx_v_bkey == Py_None)) {
58384 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
58385 __PYX_ERR(0, 2926, __pyx_L1_error)
58386 }
58387 __pyx_t_7 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2926, __pyx_L1_error)
58388 __pyx_v_sample_index = bcf_hdr_id2int(__pyx_v_hdr, BCF_DT_SAMPLE, __pyx_t_7);
58389
58390 /* "pysam/libcbcf.pyx":2927
58391 * bkey = force_bytes(key)
58392 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey)
58393 * if sample_index < 0: # <<<<<<<<<<<<<<
58394 * raise KeyError('invalid sample name: {}'.format(key))
58395 *
58396 */
58397 __pyx_t_4 = (__pyx_v_sample_index < 0);
58398 if (unlikely(__pyx_t_4)) {
58399
58400 /* "pysam/libcbcf.pyx":2928
58401 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey)
58402 * if sample_index < 0:
58403 * raise KeyError('invalid sample name: {}'.format(key)) # <<<<<<<<<<<<<<
58404 *
58405 * return 0 <= sample_index < n
58406 */
58407 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_sample_name, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2928, __pyx_L1_error)
58408 __Pyx_GOTREF(__pyx_t_8);
58409 __pyx_t_9 = NULL;
58410 __pyx_t_10 = 0;
58411 #if CYTHON_UNPACK_METHODS
58412 if (likely(PyMethod_Check(__pyx_t_8))) {
58413 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
58414 if (likely(__pyx_t_9)) {
58415 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
58416 __Pyx_INCREF(__pyx_t_9);
58417 __Pyx_INCREF(function);
58418 __Pyx_DECREF_SET(__pyx_t_8, function);
58419 __pyx_t_10 = 1;
58420 }
58421 }
58422 #endif
58423 {
58424 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_key};
58425 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
58426 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
58427 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2928, __pyx_L1_error)
58428 __Pyx_GOTREF(__pyx_t_6);
58429 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58430 }
58431 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2928, __pyx_L1_error)
58432 __Pyx_GOTREF(__pyx_t_8);
58433 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58434 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
58435 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58436 __PYX_ERR(0, 2928, __pyx_L1_error)
58437
58438 /* "pysam/libcbcf.pyx":2927
58439 * bkey = force_bytes(key)
58440 * sample_index = bcf_hdr_id2int(hdr, BCF_DT_SAMPLE, bkey)
58441 * if sample_index < 0: # <<<<<<<<<<<<<<
58442 * raise KeyError('invalid sample name: {}'.format(key))
58443 *
58444 */
58445 }
58446 }
58447 __pyx_L3:;
58448
58449 /* "pysam/libcbcf.pyx":2930
58450 * raise KeyError('invalid sample name: {}'.format(key))
58451 *
58452 * return 0 <= sample_index < n # <<<<<<<<<<<<<<
58453 *
58454 * def iterkeys(self):
58455 */
58456 __pyx_t_4 = (0 <= __pyx_v_sample_index);
58457 if (__pyx_t_4) {
58458 __pyx_t_4 = (__pyx_v_sample_index < __pyx_v_n);
58459 }
58460 __pyx_r = __pyx_t_4;
58461 goto __pyx_L0;
58462
58463 /* "pysam/libcbcf.pyx":2914
58464 * return default
58465 *
58466 * def __contains__(self, key): # <<<<<<<<<<<<<<
58467 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58468 * cdef bcf1_t *r = self.record.ptr
58469 */
58470
58471 /* function exit code */
58472 __pyx_L1_error:;
58473 __Pyx_XDECREF(__pyx_t_6);
58474 __Pyx_XDECREF(__pyx_t_8);
58475 __Pyx_XDECREF(__pyx_t_9);
58476 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58477 __pyx_r = -1;
58478 __pyx_L0:;
58479 __Pyx_XDECREF(__pyx_v_bkey);
58480 __Pyx_TraceReturn(Py_None, 0);
58481 __Pyx_RefNannyFinishContext();
58482 return __pyx_r;
58483 }
58484
58485 /* "pysam/libcbcf.pyx":2932
58486 * return 0 <= sample_index < n
58487 *
58488 * def iterkeys(self): # <<<<<<<<<<<<<<
58489 * """D.iterkeys() -> an iterator over the keys of D"""
58490 * return iter(self)
58491 */
58492
58493 /* Python wrapper */
58494 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_16iterkeys(PyObject *__pyx_v_self,
58495 #if CYTHON_METH_FASTCALL
58496 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
58497 #else
58498 PyObject *__pyx_args, PyObject *__pyx_kwds
58499 #endif
58500 ); /*proto*/
58501 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_15iterkeys, "VariantRecordSamples.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
58502 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_16iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_16iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_15iterkeys};
58503 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_16iterkeys(PyObject *__pyx_v_self,
58504 #if CYTHON_METH_FASTCALL
58505 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
58506 #else
58507 PyObject *__pyx_args, PyObject *__pyx_kwds
58508 #endif
58509 ) {
58510 #if !CYTHON_METH_FASTCALL
58511 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
58512 #endif
58513 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
58514 PyObject *__pyx_r = 0;
58515 __Pyx_RefNannyDeclarations
58516 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
58517 #if !CYTHON_METH_FASTCALL
58518 #if CYTHON_ASSUME_SAFE_MACROS
58519 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
58520 #else
58521 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
58522 #endif
58523 #endif
58524 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
58525 if (unlikely(__pyx_nargs > 0)) {
58526 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
58527 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
58528 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_15iterkeys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
58529
58530 /* function exit code */
58531 __Pyx_RefNannyFinishContext();
58532 return __pyx_r;
58533 }
58534
58535 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_15iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
58536 PyObject *__pyx_r = NULL;
58537 __Pyx_TraceDeclarations
58538 __Pyx_RefNannyDeclarations
58539 PyObject *__pyx_t_1 = NULL;
58540 int __pyx_lineno = 0;
58541 const char *__pyx_filename = NULL;
58542 int __pyx_clineno = 0;
58543 __Pyx_TraceFrameInit(__pyx_codeobj__151)
58544 __Pyx_RefNannySetupContext("iterkeys", 1);
58545 __Pyx_TraceCall("iterkeys", __pyx_f[0], 2932, 0, __PYX_ERR(0, 2932, __pyx_L1_error));
58546
58547 /* "pysam/libcbcf.pyx":2934
58548 * def iterkeys(self):
58549 * """D.iterkeys() -> an iterator over the keys of D"""
58550 * return iter(self) # <<<<<<<<<<<<<<
58551 *
58552 * def itervalues(self):
58553 */
58554 __Pyx_XDECREF(__pyx_r);
58555 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2934, __pyx_L1_error)
58556 __Pyx_GOTREF(__pyx_t_1);
58557 __pyx_r = __pyx_t_1;
58558 __pyx_t_1 = 0;
58559 goto __pyx_L0;
58560
58561 /* "pysam/libcbcf.pyx":2932
58562 * return 0 <= sample_index < n
58563 *
58564 * def iterkeys(self): # <<<<<<<<<<<<<<
58565 * """D.iterkeys() -> an iterator over the keys of D"""
58566 * return iter(self)
58567 */
58568
58569 /* function exit code */
58570 __pyx_L1_error:;
58571 __Pyx_XDECREF(__pyx_t_1);
58572 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
58573 __pyx_r = NULL;
58574 __pyx_L0:;
58575 __Pyx_XGIVEREF(__pyx_r);
58576 __Pyx_TraceReturn(__pyx_r, 0);
58577 __Pyx_RefNannyFinishContext();
58578 return __pyx_r;
58579 }
58580 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_19generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
58581
58582 /* "pysam/libcbcf.pyx":2936
58583 * return iter(self)
58584 *
58585 * def itervalues(self): # <<<<<<<<<<<<<<
58586 * """D.itervalues() -> an iterator over the values of D"""
58587 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58588 */
58589
58590 /* Python wrapper */
58591 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_18itervalues(PyObject *__pyx_v_self,
58592 #if CYTHON_METH_FASTCALL
58593 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
58594 #else
58595 PyObject *__pyx_args, PyObject *__pyx_kwds
58596 #endif
58597 ); /*proto*/
58598 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_17itervalues, "VariantRecordSamples.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
58599 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_18itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_18itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_17itervalues};
58600 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_18itervalues(PyObject *__pyx_v_self,
58601 #if CYTHON_METH_FASTCALL
58602 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
58603 #else
58604 PyObject *__pyx_args, PyObject *__pyx_kwds
58605 #endif
58606 ) {
58607 #if !CYTHON_METH_FASTCALL
58608 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
58609 #endif
58610 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
58611 PyObject *__pyx_r = 0;
58612 __Pyx_RefNannyDeclarations
58613 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
58614 #if !CYTHON_METH_FASTCALL
58615 #if CYTHON_ASSUME_SAFE_MACROS
58616 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
58617 #else
58618 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
58619 #endif
58620 #endif
58621 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
58622 if (unlikely(__pyx_nargs > 0)) {
58623 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
58624 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
58625 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_17itervalues(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
58626
58627 /* function exit code */
58628 __Pyx_RefNannyFinishContext();
58629 return __pyx_r;
58630 }
58631
58632 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_17itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
58633 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *__pyx_cur_scope;
58634 PyObject *__pyx_r = NULL;
58635 __Pyx_RefNannyDeclarations
58636 int __pyx_lineno = 0;
58637 const char *__pyx_filename = NULL;
58638 int __pyx_clineno = 0;
58639 __Pyx_RefNannySetupContext("itervalues", 0);
58640 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_28_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues, __pyx_empty_tuple, NULL);
58641 if (unlikely(!__pyx_cur_scope)) {
58642 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *)Py_None);
58643 __Pyx_INCREF(Py_None);
58644 __PYX_ERR(0, 2936, __pyx_L1_error)
58645 } else {
58646 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
58647 }
58648 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
58649 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
58650 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
58651 {
58652 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_19generator21, __pyx_codeobj__152, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_VariantRecordSamples_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2936, __pyx_L1_error)
58653 __Pyx_DECREF(__pyx_cur_scope);
58654 __Pyx_RefNannyFinishContext();
58655 return (PyObject *) gen;
58656 }
58657
58658 /* function exit code */
58659 __pyx_L1_error:;
58660 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
58661 __pyx_r = NULL;
58662 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
58663 __Pyx_XGIVEREF(__pyx_r);
58664 __Pyx_RefNannyFinishContext();
58665 return __pyx_r;
58666 }
58667
58668 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_19generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
58669 {
58670 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *)__pyx_generator->closure);
58671 PyObject *__pyx_r = NULL;
58672 __Pyx_TraceDeclarations
58673 bcf_hdr_t *__pyx_t_1;
58674 bcf1_t *__pyx_t_2;
58675 uint32_t __pyx_t_3;
58676 int32_t __pyx_t_4;
58677 int32_t __pyx_t_5;
58678 int32_t __pyx_t_6;
58679 PyObject *__pyx_t_7 = NULL;
58680 PyObject *__pyx_t_8 = NULL;
58681 int __pyx_lineno = 0;
58682 const char *__pyx_filename = NULL;
58683 int __pyx_clineno = 0;
58684 __Pyx_RefNannyDeclarations
58685 __Pyx_RefNannySetupContext("itervalues", 0);
58686 __Pyx_TraceFrameInit(__pyx_codeobj__152)
58687 __Pyx_TraceCall("itervalues", __pyx_f[0], 2936, 0, __PYX_ERR(0, 2936, __pyx_L1_error));
58688 switch (__pyx_generator->resume_label) {
58689 case 0: goto __pyx_L3_first_run;
58690 case 1: goto __pyx_L6_resume_from_yield;
58691 default: /* CPython raises the right error here */
58692 __Pyx_TraceReturn(Py_None, 0);
58693 __Pyx_RefNannyFinishContext();
58694 return NULL;
58695 }
58696 __pyx_L3_first_run:;
58697 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2936, __pyx_L1_error)
58698
58699 /* "pysam/libcbcf.pyx":2938
58700 * def itervalues(self):
58701 * """D.itervalues() -> an iterator over the values of D"""
58702 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
58703 * cdef bcf1_t *r = self.record.ptr
58704 * cdef int32_t i, n = self.record.ptr.n_sample
58705 */
58706 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
58707 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
58708
58709 /* "pysam/libcbcf.pyx":2939
58710 * """D.itervalues() -> an iterator over the values of D"""
58711 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58712 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
58713 * cdef int32_t i, n = self.record.ptr.n_sample
58714 *
58715 */
58716 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
58717 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
58718
58719 /* "pysam/libcbcf.pyx":2940
58720 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58721 * cdef bcf1_t *r = self.record.ptr
58722 * cdef int32_t i, n = self.record.ptr.n_sample # <<<<<<<<<<<<<<
58723 *
58724 * for i in range(n):
58725 */
58726 __pyx_t_3 = __pyx_cur_scope->__pyx_v_self->record->ptr->n_sample;
58727 __pyx_cur_scope->__pyx_v_n = __pyx_t_3;
58728
58729 /* "pysam/libcbcf.pyx":2942
58730 * cdef int32_t i, n = self.record.ptr.n_sample
58731 *
58732 * for i in range(n): # <<<<<<<<<<<<<<
58733 * yield makeVariantRecordSample(self.record, i)
58734 *
58735 */
58736 __pyx_t_4 = __pyx_cur_scope->__pyx_v_n;
58737 __pyx_t_5 = __pyx_t_4;
58738 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
58739 __pyx_cur_scope->__pyx_v_i = __pyx_t_6;
58740
58741 /* "pysam/libcbcf.pyx":2943
58742 *
58743 * for i in range(n):
58744 * yield makeVariantRecordSample(self.record, i) # <<<<<<<<<<<<<<
58745 *
58746 * def iteritems(self):
58747 */
58748 __pyx_t_7 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->record);
58749 __Pyx_INCREF(__pyx_t_7);
58750 __pyx_t_8 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecordSample(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_7), __pyx_cur_scope->__pyx_v_i)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2943, __pyx_L1_error)
58751 __Pyx_GOTREF(__pyx_t_8);
58752 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
58753 __pyx_r = __pyx_t_8;
58754 __pyx_t_8 = 0;
58755 __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
58756 __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
58757 __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
58758 __Pyx_XGIVEREF(__pyx_r);
58759 __Pyx_TraceReturn(__pyx_r, 0);
58760 __Pyx_RefNannyFinishContext();
58761 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
58762 /* return from generator, yielding value */
58763 __pyx_generator->resume_label = 1;
58764 return __pyx_r;
58765 __pyx_L6_resume_from_yield:;
58766 __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
58767 __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
58768 __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
58769 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2943, __pyx_L1_error)
58770 }
58771 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
58772
58773 /* "pysam/libcbcf.pyx":2936
58774 * return iter(self)
58775 *
58776 * def itervalues(self): # <<<<<<<<<<<<<<
58777 * """D.itervalues() -> an iterator over the values of D"""
58778 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58779 */
58780
58781 /* function exit code */
58782 PyErr_SetNone(PyExc_StopIteration);
58783 goto __pyx_L0;
58784 __pyx_L1_error:;
58785 __Pyx_Generator_Replace_StopIteration(0);
58786 __Pyx_XDECREF(__pyx_t_7);
58787 __Pyx_XDECREF(__pyx_t_8);
58788 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
58789 __pyx_L0:;
58790 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
58791 #if !CYTHON_USE_EXC_INFO_STACK
58792 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
58793 #endif
58794 __pyx_generator->resume_label = -1;
58795 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
58796 __Pyx_TraceReturn(__pyx_r, 0);
58797 __Pyx_RefNannyFinishContext();
58798 return __pyx_r;
58799 }
58800 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_22generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
58801
58802 /* "pysam/libcbcf.pyx":2945
58803 * yield makeVariantRecordSample(self.record, i)
58804 *
58805 * def iteritems(self): # <<<<<<<<<<<<<<
58806 * """D.iteritems() -> an iterator over the (key, value) items of D"""
58807 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58808 */
58809
58810 /* Python wrapper */
58811 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_21iteritems(PyObject *__pyx_v_self,
58812 #if CYTHON_METH_FASTCALL
58813 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
58814 #else
58815 PyObject *__pyx_args, PyObject *__pyx_kwds
58816 #endif
58817 ); /*proto*/
58818 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_20iteritems, "VariantRecordSamples.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
58819 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_21iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_21iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_20iteritems};
58820 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_21iteritems(PyObject *__pyx_v_self,
58821 #if CYTHON_METH_FASTCALL
58822 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
58823 #else
58824 PyObject *__pyx_args, PyObject *__pyx_kwds
58825 #endif
58826 ) {
58827 #if !CYTHON_METH_FASTCALL
58828 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
58829 #endif
58830 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
58831 PyObject *__pyx_r = 0;
58832 __Pyx_RefNannyDeclarations
58833 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
58834 #if !CYTHON_METH_FASTCALL
58835 #if CYTHON_ASSUME_SAFE_MACROS
58836 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
58837 #else
58838 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
58839 #endif
58840 #endif
58841 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
58842 if (unlikely(__pyx_nargs > 0)) {
58843 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
58844 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
58845 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_20iteritems(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
58846
58847 /* function exit code */
58848 __Pyx_RefNannyFinishContext();
58849 return __pyx_r;
58850 }
58851
58852 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_20iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
58853 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *__pyx_cur_scope;
58854 PyObject *__pyx_r = NULL;
58855 __Pyx_RefNannyDeclarations
58856 int __pyx_lineno = 0;
58857 const char *__pyx_filename = NULL;
58858 int __pyx_clineno = 0;
58859 __Pyx_RefNannySetupContext("iteritems", 0);
58860 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_29_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems, __pyx_empty_tuple, NULL);
58861 if (unlikely(!__pyx_cur_scope)) {
58862 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *)Py_None);
58863 __Pyx_INCREF(Py_None);
58864 __PYX_ERR(0, 2945, __pyx_L1_error)
58865 } else {
58866 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
58867 }
58868 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
58869 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
58870 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
58871 {
58872 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_22generator22, __pyx_codeobj__153, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_VariantRecordSamples_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 2945, __pyx_L1_error)
58873 __Pyx_DECREF(__pyx_cur_scope);
58874 __Pyx_RefNannyFinishContext();
58875 return (PyObject *) gen;
58876 }
58877
58878 /* function exit code */
58879 __pyx_L1_error:;
58880 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
58881 __pyx_r = NULL;
58882 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
58883 __Pyx_XGIVEREF(__pyx_r);
58884 __Pyx_RefNannyFinishContext();
58885 return __pyx_r;
58886 }
58887
58888 static PyObject *__pyx_gb_5pysam_7libcbcf_20VariantRecordSamples_22generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
58889 {
58890 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *)__pyx_generator->closure);
58891 PyObject *__pyx_r = NULL;
58892 __Pyx_TraceDeclarations
58893 bcf_hdr_t *__pyx_t_1;
58894 bcf1_t *__pyx_t_2;
58895 uint32_t __pyx_t_3;
58896 int32_t __pyx_t_4;
58897 int32_t __pyx_t_5;
58898 int32_t __pyx_t_6;
58899 PyObject *__pyx_t_7 = NULL;
58900 PyObject *__pyx_t_8 = NULL;
58901 PyObject *__pyx_t_9 = NULL;
58902 int __pyx_lineno = 0;
58903 const char *__pyx_filename = NULL;
58904 int __pyx_clineno = 0;
58905 __Pyx_RefNannyDeclarations
58906 __Pyx_RefNannySetupContext("iteritems", 0);
58907 __Pyx_TraceFrameInit(__pyx_codeobj__153)
58908 __Pyx_TraceCall("iteritems", __pyx_f[0], 2945, 0, __PYX_ERR(0, 2945, __pyx_L1_error));
58909 switch (__pyx_generator->resume_label) {
58910 case 0: goto __pyx_L3_first_run;
58911 case 1: goto __pyx_L6_resume_from_yield;
58912 default: /* CPython raises the right error here */
58913 __Pyx_TraceReturn(Py_None, 0);
58914 __Pyx_RefNannyFinishContext();
58915 return NULL;
58916 }
58917 __pyx_L3_first_run:;
58918 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2945, __pyx_L1_error)
58919
58920 /* "pysam/libcbcf.pyx":2947
58921 * def iteritems(self):
58922 * """D.iteritems() -> an iterator over the (key, value) items of D"""
58923 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
58924 * cdef bcf1_t *r = self.record.ptr
58925 * cdef int32_t i, n = self.record.ptr.n_sample
58926 */
58927 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
58928 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
58929
58930 /* "pysam/libcbcf.pyx":2948
58931 * """D.iteritems() -> an iterator over the (key, value) items of D"""
58932 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58933 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
58934 * cdef int32_t i, n = self.record.ptr.n_sample
58935 *
58936 */
58937 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
58938 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
58939
58940 /* "pysam/libcbcf.pyx":2949
58941 * cdef bcf_hdr_t *hdr = self.record.header.ptr
58942 * cdef bcf1_t *r = self.record.ptr
58943 * cdef int32_t i, n = self.record.ptr.n_sample # <<<<<<<<<<<<<<
58944 *
58945 * for i in range(n):
58946 */
58947 __pyx_t_3 = __pyx_cur_scope->__pyx_v_self->record->ptr->n_sample;
58948 __pyx_cur_scope->__pyx_v_n = __pyx_t_3;
58949
58950 /* "pysam/libcbcf.pyx":2951
58951 * cdef int32_t i, n = self.record.ptr.n_sample
58952 *
58953 * for i in range(n): # <<<<<<<<<<<<<<
58954 * yield (charptr_to_str(hdr.samples[i]), makeVariantRecordSample(self.record, i))
58955 *
58956 */
58957 __pyx_t_4 = __pyx_cur_scope->__pyx_v_n;
58958 __pyx_t_5 = __pyx_t_4;
58959 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
58960 __pyx_cur_scope->__pyx_v_i = __pyx_t_6;
58961
58962 /* "pysam/libcbcf.pyx":2952
58963 *
58964 * for i in range(n):
58965 * yield (charptr_to_str(hdr.samples[i]), makeVariantRecordSample(self.record, i)) # <<<<<<<<<<<<<<
58966 *
58967 * def keys(self):
58968 */
58969 __pyx_t_7 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_cur_scope->__pyx_v_hdr->samples[__pyx_cur_scope->__pyx_v_i]), NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2952, __pyx_L1_error)
58970 __Pyx_GOTREF(__pyx_t_7);
58971 __pyx_t_8 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->record);
58972 __Pyx_INCREF(__pyx_t_8);
58973 __pyx_t_9 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecordSample(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_8), __pyx_cur_scope->__pyx_v_i)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2952, __pyx_L1_error)
58974 __Pyx_GOTREF(__pyx_t_9);
58975 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58976 __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2952, __pyx_L1_error)
58977 __Pyx_GOTREF(__pyx_t_8);
58978 __Pyx_GIVEREF(__pyx_t_7);
58979 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)) __PYX_ERR(0, 2952, __pyx_L1_error);
58980 __Pyx_GIVEREF(__pyx_t_9);
58981 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9)) __PYX_ERR(0, 2952, __pyx_L1_error);
58982 __pyx_t_7 = 0;
58983 __pyx_t_9 = 0;
58984 __pyx_r = __pyx_t_8;
58985 __pyx_t_8 = 0;
58986 __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
58987 __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
58988 __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
58989 __Pyx_XGIVEREF(__pyx_r);
58990 __Pyx_TraceReturn(__pyx_r, 0);
58991 __Pyx_RefNannyFinishContext();
58992 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
58993 /* return from generator, yielding value */
58994 __pyx_generator->resume_label = 1;
58995 return __pyx_r;
58996 __pyx_L6_resume_from_yield:;
58997 __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
58998 __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
58999 __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
59000 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2952, __pyx_L1_error)
59001 }
59002 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
59003
59004 /* "pysam/libcbcf.pyx":2945
59005 * yield makeVariantRecordSample(self.record, i)
59006 *
59007 * def iteritems(self): # <<<<<<<<<<<<<<
59008 * """D.iteritems() -> an iterator over the (key, value) items of D"""
59009 * cdef bcf_hdr_t *hdr = self.record.header.ptr
59010 */
59011
59012 /* function exit code */
59013 PyErr_SetNone(PyExc_StopIteration);
59014 goto __pyx_L0;
59015 __pyx_L1_error:;
59016 __Pyx_Generator_Replace_StopIteration(0);
59017 __Pyx_XDECREF(__pyx_t_7);
59018 __Pyx_XDECREF(__pyx_t_8);
59019 __Pyx_XDECREF(__pyx_t_9);
59020 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
59021 __pyx_L0:;
59022 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
59023 #if !CYTHON_USE_EXC_INFO_STACK
59024 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
59025 #endif
59026 __pyx_generator->resume_label = -1;
59027 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
59028 __Pyx_TraceReturn(__pyx_r, 0);
59029 __Pyx_RefNannyFinishContext();
59030 return __pyx_r;
59031 }
59032
59033 /* "pysam/libcbcf.pyx":2954
59034 * yield (charptr_to_str(hdr.samples[i]), makeVariantRecordSample(self.record, i))
59035 *
59036 * def keys(self): # <<<<<<<<<<<<<<
59037 * """D.keys() -> list of D's keys"""
59038 * return list(self)
59039 */
59040
59041 /* Python wrapper */
59042 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_24keys(PyObject *__pyx_v_self,
59043 #if CYTHON_METH_FASTCALL
59044 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59045 #else
59046 PyObject *__pyx_args, PyObject *__pyx_kwds
59047 #endif
59048 ); /*proto*/
59049 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_23keys, "VariantRecordSamples.keys(self)\nD.keys() -> list of D's keys");
59050 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_24keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_24keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_23keys};
59051 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_24keys(PyObject *__pyx_v_self,
59052 #if CYTHON_METH_FASTCALL
59053 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59054 #else
59055 PyObject *__pyx_args, PyObject *__pyx_kwds
59056 #endif
59057 ) {
59058 #if !CYTHON_METH_FASTCALL
59059 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
59060 #endif
59061 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
59062 PyObject *__pyx_r = 0;
59063 __Pyx_RefNannyDeclarations
59064 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
59065 #if !CYTHON_METH_FASTCALL
59066 #if CYTHON_ASSUME_SAFE_MACROS
59067 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
59068 #else
59069 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
59070 #endif
59071 #endif
59072 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
59073 if (unlikely(__pyx_nargs > 0)) {
59074 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
59075 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
59076 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_23keys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
59077
59078 /* function exit code */
59079 __Pyx_RefNannyFinishContext();
59080 return __pyx_r;
59081 }
59082
59083 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_23keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
59084 PyObject *__pyx_r = NULL;
59085 __Pyx_TraceDeclarations
59086 __Pyx_RefNannyDeclarations
59087 PyObject *__pyx_t_1 = NULL;
59088 int __pyx_lineno = 0;
59089 const char *__pyx_filename = NULL;
59090 int __pyx_clineno = 0;
59091 __Pyx_TraceFrameInit(__pyx_codeobj__154)
59092 __Pyx_RefNannySetupContext("keys", 1);
59093 __Pyx_TraceCall("keys", __pyx_f[0], 2954, 0, __PYX_ERR(0, 2954, __pyx_L1_error));
59094
59095 /* "pysam/libcbcf.pyx":2956
59096 * def keys(self):
59097 * """D.keys() -> list of D's keys"""
59098 * return list(self) # <<<<<<<<<<<<<<
59099 *
59100 * def items(self):
59101 */
59102 __Pyx_XDECREF(__pyx_r);
59103 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2956, __pyx_L1_error)
59104 __Pyx_GOTREF(__pyx_t_1);
59105 __pyx_r = __pyx_t_1;
59106 __pyx_t_1 = 0;
59107 goto __pyx_L0;
59108
59109 /* "pysam/libcbcf.pyx":2954
59110 * yield (charptr_to_str(hdr.samples[i]), makeVariantRecordSample(self.record, i))
59111 *
59112 * def keys(self): # <<<<<<<<<<<<<<
59113 * """D.keys() -> list of D's keys"""
59114 * return list(self)
59115 */
59116
59117 /* function exit code */
59118 __pyx_L1_error:;
59119 __Pyx_XDECREF(__pyx_t_1);
59120 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
59121 __pyx_r = NULL;
59122 __pyx_L0:;
59123 __Pyx_XGIVEREF(__pyx_r);
59124 __Pyx_TraceReturn(__pyx_r, 0);
59125 __Pyx_RefNannyFinishContext();
59126 return __pyx_r;
59127 }
59128
59129 /* "pysam/libcbcf.pyx":2958
59130 * return list(self)
59131 *
59132 * def items(self): # <<<<<<<<<<<<<<
59133 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
59134 * return list(self.iteritems())
59135 */
59136
59137 /* Python wrapper */
59138 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_26items(PyObject *__pyx_v_self,
59139 #if CYTHON_METH_FASTCALL
59140 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59141 #else
59142 PyObject *__pyx_args, PyObject *__pyx_kwds
59143 #endif
59144 ); /*proto*/
59145 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_25items, "VariantRecordSamples.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
59146 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_26items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_26items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_25items};
59147 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_26items(PyObject *__pyx_v_self,
59148 #if CYTHON_METH_FASTCALL
59149 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59150 #else
59151 PyObject *__pyx_args, PyObject *__pyx_kwds
59152 #endif
59153 ) {
59154 #if !CYTHON_METH_FASTCALL
59155 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
59156 #endif
59157 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
59158 PyObject *__pyx_r = 0;
59159 __Pyx_RefNannyDeclarations
59160 __Pyx_RefNannySetupContext("items (wrapper)", 0);
59161 #if !CYTHON_METH_FASTCALL
59162 #if CYTHON_ASSUME_SAFE_MACROS
59163 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
59164 #else
59165 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
59166 #endif
59167 #endif
59168 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
59169 if (unlikely(__pyx_nargs > 0)) {
59170 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
59171 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
59172 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_25items(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
59173
59174 /* function exit code */
59175 __Pyx_RefNannyFinishContext();
59176 return __pyx_r;
59177 }
59178
59179 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_25items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
59180 PyObject *__pyx_r = NULL;
59181 __Pyx_TraceDeclarations
59182 __Pyx_RefNannyDeclarations
59183 PyObject *__pyx_t_1 = NULL;
59184 PyObject *__pyx_t_2 = NULL;
59185 PyObject *__pyx_t_3 = NULL;
59186 unsigned int __pyx_t_4;
59187 int __pyx_lineno = 0;
59188 const char *__pyx_filename = NULL;
59189 int __pyx_clineno = 0;
59190 __Pyx_TraceFrameInit(__pyx_codeobj__155)
59191 __Pyx_RefNannySetupContext("items", 1);
59192 __Pyx_TraceCall("items", __pyx_f[0], 2958, 0, __PYX_ERR(0, 2958, __pyx_L1_error));
59193
59194 /* "pysam/libcbcf.pyx":2960
59195 * def items(self):
59196 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
59197 * return list(self.iteritems()) # <<<<<<<<<<<<<<
59198 *
59199 * def values(self):
59200 */
59201 __Pyx_XDECREF(__pyx_r);
59202 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2960, __pyx_L1_error)
59203 __Pyx_GOTREF(__pyx_t_2);
59204 __pyx_t_3 = NULL;
59205 __pyx_t_4 = 0;
59206 #if CYTHON_UNPACK_METHODS
59207 if (likely(PyMethod_Check(__pyx_t_2))) {
59208 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
59209 if (likely(__pyx_t_3)) {
59210 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
59211 __Pyx_INCREF(__pyx_t_3);
59212 __Pyx_INCREF(function);
59213 __Pyx_DECREF_SET(__pyx_t_2, function);
59214 __pyx_t_4 = 1;
59215 }
59216 }
59217 #endif
59218 {
59219 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
59220 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
59221 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
59222 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2960, __pyx_L1_error)
59223 __Pyx_GOTREF(__pyx_t_1);
59224 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
59225 }
59226 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2960, __pyx_L1_error)
59227 __Pyx_GOTREF(__pyx_t_2);
59228 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59229 __pyx_r = __pyx_t_2;
59230 __pyx_t_2 = 0;
59231 goto __pyx_L0;
59232
59233 /* "pysam/libcbcf.pyx":2958
59234 * return list(self)
59235 *
59236 * def items(self): # <<<<<<<<<<<<<<
59237 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
59238 * return list(self.iteritems())
59239 */
59240
59241 /* function exit code */
59242 __pyx_L1_error:;
59243 __Pyx_XDECREF(__pyx_t_1);
59244 __Pyx_XDECREF(__pyx_t_2);
59245 __Pyx_XDECREF(__pyx_t_3);
59246 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
59247 __pyx_r = NULL;
59248 __pyx_L0:;
59249 __Pyx_XGIVEREF(__pyx_r);
59250 __Pyx_TraceReturn(__pyx_r, 0);
59251 __Pyx_RefNannyFinishContext();
59252 return __pyx_r;
59253 }
59254
59255 /* "pysam/libcbcf.pyx":2962
59256 * return list(self.iteritems())
59257 *
59258 * def values(self): # <<<<<<<<<<<<<<
59259 * """D.values() -> list of D's values"""
59260 * return list(self.itervalues())
59261 */
59262
59263 /* Python wrapper */
59264 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_28values(PyObject *__pyx_v_self,
59265 #if CYTHON_METH_FASTCALL
59266 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59267 #else
59268 PyObject *__pyx_args, PyObject *__pyx_kwds
59269 #endif
59270 ); /*proto*/
59271 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_27values, "VariantRecordSamples.values(self)\nD.values() -> list of D's values");
59272 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_28values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_28values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_27values};
59273 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_28values(PyObject *__pyx_v_self,
59274 #if CYTHON_METH_FASTCALL
59275 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59276 #else
59277 PyObject *__pyx_args, PyObject *__pyx_kwds
59278 #endif
59279 ) {
59280 #if !CYTHON_METH_FASTCALL
59281 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
59282 #endif
59283 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
59284 PyObject *__pyx_r = 0;
59285 __Pyx_RefNannyDeclarations
59286 __Pyx_RefNannySetupContext("values (wrapper)", 0);
59287 #if !CYTHON_METH_FASTCALL
59288 #if CYTHON_ASSUME_SAFE_MACROS
59289 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
59290 #else
59291 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
59292 #endif
59293 #endif
59294 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
59295 if (unlikely(__pyx_nargs > 0)) {
59296 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
59297 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
59298 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_27values(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
59299
59300 /* function exit code */
59301 __Pyx_RefNannyFinishContext();
59302 return __pyx_r;
59303 }
59304
59305 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_27values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
59306 PyObject *__pyx_r = NULL;
59307 __Pyx_TraceDeclarations
59308 __Pyx_RefNannyDeclarations
59309 PyObject *__pyx_t_1 = NULL;
59310 PyObject *__pyx_t_2 = NULL;
59311 PyObject *__pyx_t_3 = NULL;
59312 unsigned int __pyx_t_4;
59313 int __pyx_lineno = 0;
59314 const char *__pyx_filename = NULL;
59315 int __pyx_clineno = 0;
59316 __Pyx_TraceFrameInit(__pyx_codeobj__156)
59317 __Pyx_RefNannySetupContext("values", 1);
59318 __Pyx_TraceCall("values", __pyx_f[0], 2962, 0, __PYX_ERR(0, 2962, __pyx_L1_error));
59319
59320 /* "pysam/libcbcf.pyx":2964
59321 * def values(self):
59322 * """D.values() -> list of D's values"""
59323 * return list(self.itervalues()) # <<<<<<<<<<<<<<
59324 *
59325 * def update(self, items=None, **kwargs):
59326 */
59327 __Pyx_XDECREF(__pyx_r);
59328 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2964, __pyx_L1_error)
59329 __Pyx_GOTREF(__pyx_t_2);
59330 __pyx_t_3 = NULL;
59331 __pyx_t_4 = 0;
59332 #if CYTHON_UNPACK_METHODS
59333 if (likely(PyMethod_Check(__pyx_t_2))) {
59334 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
59335 if (likely(__pyx_t_3)) {
59336 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
59337 __Pyx_INCREF(__pyx_t_3);
59338 __Pyx_INCREF(function);
59339 __Pyx_DECREF_SET(__pyx_t_2, function);
59340 __pyx_t_4 = 1;
59341 }
59342 }
59343 #endif
59344 {
59345 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
59346 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
59347 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
59348 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2964, __pyx_L1_error)
59349 __Pyx_GOTREF(__pyx_t_1);
59350 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
59351 }
59352 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2964, __pyx_L1_error)
59353 __Pyx_GOTREF(__pyx_t_2);
59354 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59355 __pyx_r = __pyx_t_2;
59356 __pyx_t_2 = 0;
59357 goto __pyx_L0;
59358
59359 /* "pysam/libcbcf.pyx":2962
59360 * return list(self.iteritems())
59361 *
59362 * def values(self): # <<<<<<<<<<<<<<
59363 * """D.values() -> list of D's values"""
59364 * return list(self.itervalues())
59365 */
59366
59367 /* function exit code */
59368 __pyx_L1_error:;
59369 __Pyx_XDECREF(__pyx_t_1);
59370 __Pyx_XDECREF(__pyx_t_2);
59371 __Pyx_XDECREF(__pyx_t_3);
59372 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
59373 __pyx_r = NULL;
59374 __pyx_L0:;
59375 __Pyx_XGIVEREF(__pyx_r);
59376 __Pyx_TraceReturn(__pyx_r, 0);
59377 __Pyx_RefNannyFinishContext();
59378 return __pyx_r;
59379 }
59380
59381 /* "pysam/libcbcf.pyx":2966
59382 * return list(self.itervalues())
59383 *
59384 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
59385 * """D.update([E, ]**F) -> None.
59386 *
59387 */
59388
59389 /* Python wrapper */
59390 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_30update(PyObject *__pyx_v_self,
59391 #if CYTHON_METH_FASTCALL
59392 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59393 #else
59394 PyObject *__pyx_args, PyObject *__pyx_kwds
59395 #endif
59396 ); /*proto*/
59397 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_29update, "VariantRecordSamples.update(self, items=None, **kwargs)\nD.update([E, ]**F) -> None.\n\n Update D from dict/iterable E and F.\n ");
59398 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_30update = {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_30update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_29update};
59399 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_30update(PyObject *__pyx_v_self,
59400 #if CYTHON_METH_FASTCALL
59401 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59402 #else
59403 PyObject *__pyx_args, PyObject *__pyx_kwds
59404 #endif
59405 ) {
59406 PyObject *__pyx_v_items = 0;
59407 PyObject *__pyx_v_kwargs = 0;
59408 #if !CYTHON_METH_FASTCALL
59409 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
59410 #endif
59411 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
59412 PyObject* values[1] = {0};
59413 int __pyx_lineno = 0;
59414 const char *__pyx_filename = NULL;
59415 int __pyx_clineno = 0;
59416 PyObject *__pyx_r = 0;
59417 __Pyx_RefNannyDeclarations
59418 __Pyx_RefNannySetupContext("update (wrapper)", 0);
59419 #if !CYTHON_METH_FASTCALL
59420 #if CYTHON_ASSUME_SAFE_MACROS
59421 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
59422 #else
59423 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
59424 #endif
59425 #endif
59426 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
59427 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
59428 __Pyx_GOTREF(__pyx_v_kwargs);
59429 {
59430 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
59431 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
59432 if (__pyx_kwds) {
59433 Py_ssize_t kw_args;
59434 switch (__pyx_nargs) {
59435 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
59436 CYTHON_FALLTHROUGH;
59437 case 0: break;
59438 default: goto __pyx_L5_argtuple_error;
59439 }
59440 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
59441 switch (__pyx_nargs) {
59442 case 0:
59443 if (kw_args > 0) {
59444 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
59445 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
59446 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2966, __pyx_L3_error)
59447 }
59448 }
59449 if (unlikely(kw_args > 0)) {
59450 const Py_ssize_t kwd_pos_args = __pyx_nargs;
59451 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "update") < 0)) __PYX_ERR(0, 2966, __pyx_L3_error)
59452 }
59453 } else {
59454 switch (__pyx_nargs) {
59455 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
59456 CYTHON_FALLTHROUGH;
59457 case 0: break;
59458 default: goto __pyx_L5_argtuple_error;
59459 }
59460 }
59461 __pyx_v_items = values[0];
59462 }
59463 goto __pyx_L6_skip;
59464 __pyx_L5_argtuple_error:;
59465 __Pyx_RaiseArgtupleInvalid("update", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2966, __pyx_L3_error)
59466 __pyx_L6_skip:;
59467 goto __pyx_L4_argument_unpacking_done;
59468 __pyx_L3_error:;
59469 {
59470 Py_ssize_t __pyx_temp;
59471 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
59472 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
59473 }
59474 }
59475 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
59476 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
59477 __Pyx_RefNannyFinishContext();
59478 return NULL;
59479 __pyx_L4_argument_unpacking_done:;
59480 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_29update(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self), __pyx_v_items, __pyx_v_kwargs);
59481
59482 /* function exit code */
59483 __Pyx_DECREF(__pyx_v_kwargs);
59484 {
59485 Py_ssize_t __pyx_temp;
59486 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
59487 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
59488 }
59489 }
59490 __Pyx_RefNannyFinishContext();
59491 return __pyx_r;
59492 }
59493
59494 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_29update(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs) {
59495 PyObject *__pyx_v_k = NULL;
59496 PyObject *__pyx_v_v = NULL;
59497 PyObject *__pyx_r = NULL;
59498 __Pyx_TraceDeclarations
59499 __Pyx_RefNannyDeclarations
59500 PyObject *__pyx_t_1 = NULL;
59501 Py_ssize_t __pyx_t_2;
59502 Py_ssize_t __pyx_t_3;
59503 int __pyx_t_4;
59504 PyObject *__pyx_t_5 = NULL;
59505 PyObject *__pyx_t_6 = NULL;
59506 int __pyx_t_7;
59507 int __pyx_t_8;
59508 int __pyx_lineno = 0;
59509 const char *__pyx_filename = NULL;
59510 int __pyx_clineno = 0;
59511 __Pyx_TraceFrameInit(__pyx_codeobj__157)
59512 __Pyx_RefNannySetupContext("update", 1);
59513 __Pyx_TraceCall("update", __pyx_f[0], 2966, 0, __PYX_ERR(0, 2966, __pyx_L1_error));
59514
59515 /* "pysam/libcbcf.pyx":2971
59516 * Update D from dict/iterable E and F.
59517 * """
59518 * for k, v in items.items(): # <<<<<<<<<<<<<<
59519 * self[k] = v
59520 *
59521 */
59522 __pyx_t_2 = 0;
59523 if (unlikely(__pyx_v_items == Py_None)) {
59524 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
59525 __PYX_ERR(0, 2971, __pyx_L1_error)
59526 }
59527 __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_items, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2971, __pyx_L1_error)
59528 __Pyx_GOTREF(__pyx_t_5);
59529 __Pyx_XDECREF(__pyx_t_1);
59530 __pyx_t_1 = __pyx_t_5;
59531 __pyx_t_5 = 0;
59532 while (1) {
59533 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
59534 if (unlikely(__pyx_t_7 == 0)) break;
59535 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 2971, __pyx_L1_error)
59536 __Pyx_GOTREF(__pyx_t_5);
59537 __Pyx_GOTREF(__pyx_t_6);
59538 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5);
59539 __pyx_t_5 = 0;
59540 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
59541 __pyx_t_6 = 0;
59542
59543 /* "pysam/libcbcf.pyx":2972
59544 * """
59545 * for k, v in items.items():
59546 * self[k] = v # <<<<<<<<<<<<<<
59547 *
59548 * if kwargs:
59549 */
59550 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 2972, __pyx_L1_error)
59551 }
59552 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59553
59554 /* "pysam/libcbcf.pyx":2974
59555 * self[k] = v
59556 *
59557 * if kwargs: # <<<<<<<<<<<<<<
59558 * for k, v in kwargs.items():
59559 * self[k] = v
59560 */
59561 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2974, __pyx_L1_error)
59562 if (__pyx_t_8) {
59563
59564 /* "pysam/libcbcf.pyx":2975
59565 *
59566 * if kwargs:
59567 * for k, v in kwargs.items(): # <<<<<<<<<<<<<<
59568 * self[k] = v
59569 *
59570 */
59571 __pyx_t_3 = 0;
59572 __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_2), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2975, __pyx_L1_error)
59573 __Pyx_GOTREF(__pyx_t_6);
59574 __Pyx_XDECREF(__pyx_t_1);
59575 __pyx_t_1 = __pyx_t_6;
59576 __pyx_t_6 = 0;
59577 while (1) {
59578 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_2, &__pyx_t_3, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4);
59579 if (unlikely(__pyx_t_7 == 0)) break;
59580 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 2975, __pyx_L1_error)
59581 __Pyx_GOTREF(__pyx_t_6);
59582 __Pyx_GOTREF(__pyx_t_5);
59583 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
59584 __pyx_t_6 = 0;
59585 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
59586 __pyx_t_5 = 0;
59587
59588 /* "pysam/libcbcf.pyx":2976
59589 * if kwargs:
59590 * for k, v in kwargs.items():
59591 * self[k] = v # <<<<<<<<<<<<<<
59592 *
59593 * def pop(self, key, default=_nothing):
59594 */
59595 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 2976, __pyx_L1_error)
59596 }
59597 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59598
59599 /* "pysam/libcbcf.pyx":2974
59600 * self[k] = v
59601 *
59602 * if kwargs: # <<<<<<<<<<<<<<
59603 * for k, v in kwargs.items():
59604 * self[k] = v
59605 */
59606 }
59607
59608 /* "pysam/libcbcf.pyx":2966
59609 * return list(self.itervalues())
59610 *
59611 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
59612 * """D.update([E, ]**F) -> None.
59613 *
59614 */
59615
59616 /* function exit code */
59617 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
59618 goto __pyx_L0;
59619 __pyx_L1_error:;
59620 __Pyx_XDECREF(__pyx_t_1);
59621 __Pyx_XDECREF(__pyx_t_5);
59622 __Pyx_XDECREF(__pyx_t_6);
59623 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
59624 __pyx_r = NULL;
59625 __pyx_L0:;
59626 __Pyx_XDECREF(__pyx_v_k);
59627 __Pyx_XDECREF(__pyx_v_v);
59628 __Pyx_XGIVEREF(__pyx_r);
59629 __Pyx_TraceReturn(__pyx_r, 0);
59630 __Pyx_RefNannyFinishContext();
59631 return __pyx_r;
59632 }
59633
59634 /* "pysam/libcbcf.pyx":2978
59635 * self[k] = v
59636 *
59637 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
59638 * try:
59639 * value = self[key]
59640 */
59641
59642 /* Python wrapper */
59643 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_32pop(PyObject *__pyx_v_self,
59644 #if CYTHON_METH_FASTCALL
59645 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59646 #else
59647 PyObject *__pyx_args, PyObject *__pyx_kwds
59648 #endif
59649 ); /*proto*/
59650 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_31pop, "VariantRecordSamples.pop(self, key, default=_nothing)");
59651 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_32pop = {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_32pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_31pop};
59652 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_32pop(PyObject *__pyx_v_self,
59653 #if CYTHON_METH_FASTCALL
59654 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
59655 #else
59656 PyObject *__pyx_args, PyObject *__pyx_kwds
59657 #endif
59658 ) {
59659 PyObject *__pyx_v_key = 0;
59660 PyObject *__pyx_v_default = 0;
59661 #if !CYTHON_METH_FASTCALL
59662 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
59663 #endif
59664 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
59665 PyObject* values[2] = {0,0};
59666 int __pyx_lineno = 0;
59667 const char *__pyx_filename = NULL;
59668 int __pyx_clineno = 0;
59669 PyObject *__pyx_r = 0;
59670 __Pyx_RefNannyDeclarations
59671 __Pyx_RefNannySetupContext("pop (wrapper)", 0);
59672 #if !CYTHON_METH_FASTCALL
59673 #if CYTHON_ASSUME_SAFE_MACROS
59674 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
59675 #else
59676 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
59677 #endif
59678 #endif
59679 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
59680 {
59681 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
59682 values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__158);
59683 if (__pyx_kwds) {
59684 Py_ssize_t kw_args;
59685 switch (__pyx_nargs) {
59686 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
59687 CYTHON_FALLTHROUGH;
59688 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
59689 CYTHON_FALLTHROUGH;
59690 case 0: break;
59691 default: goto __pyx_L5_argtuple_error;
59692 }
59693 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
59694 switch (__pyx_nargs) {
59695 case 0:
59696 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
59697 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
59698 kw_args--;
59699 }
59700 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2978, __pyx_L3_error)
59701 else goto __pyx_L5_argtuple_error;
59702 CYTHON_FALLTHROUGH;
59703 case 1:
59704 if (kw_args > 0) {
59705 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
59706 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
59707 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2978, __pyx_L3_error)
59708 }
59709 }
59710 if (unlikely(kw_args > 0)) {
59711 const Py_ssize_t kwd_pos_args = __pyx_nargs;
59712 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pop") < 0)) __PYX_ERR(0, 2978, __pyx_L3_error)
59713 }
59714 } else {
59715 switch (__pyx_nargs) {
59716 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
59717 CYTHON_FALLTHROUGH;
59718 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
59719 break;
59720 default: goto __pyx_L5_argtuple_error;
59721 }
59722 }
59723 __pyx_v_key = values[0];
59724 __pyx_v_default = values[1];
59725 }
59726 goto __pyx_L6_skip;
59727 __pyx_L5_argtuple_error:;
59728 __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2978, __pyx_L3_error)
59729 __pyx_L6_skip:;
59730 goto __pyx_L4_argument_unpacking_done;
59731 __pyx_L3_error:;
59732 {
59733 Py_ssize_t __pyx_temp;
59734 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
59735 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
59736 }
59737 }
59738 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
59739 __Pyx_RefNannyFinishContext();
59740 return NULL;
59741 __pyx_L4_argument_unpacking_done:;
59742 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_31pop(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
59743
59744 /* function exit code */
59745 {
59746 Py_ssize_t __pyx_temp;
59747 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
59748 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
59749 }
59750 }
59751 __Pyx_RefNannyFinishContext();
59752 return __pyx_r;
59753 }
59754
59755 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_31pop(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
59756 PyObject *__pyx_v_value = NULL;
59757 PyObject *__pyx_r = NULL;
59758 __Pyx_TraceDeclarations
59759 __Pyx_RefNannyDeclarations
59760 PyObject *__pyx_t_1 = NULL;
59761 PyObject *__pyx_t_2 = NULL;
59762 PyObject *__pyx_t_3 = NULL;
59763 PyObject *__pyx_t_4 = NULL;
59764 int __pyx_t_5;
59765 PyObject *__pyx_t_6 = NULL;
59766 PyObject *__pyx_t_7 = NULL;
59767 int __pyx_t_8;
59768 int __pyx_lineno = 0;
59769 const char *__pyx_filename = NULL;
59770 int __pyx_clineno = 0;
59771 __Pyx_TraceFrameInit(__pyx_codeobj__159)
59772 __Pyx_RefNannySetupContext("pop", 1);
59773 __Pyx_TraceCall("pop", __pyx_f[0], 2978, 0, __PYX_ERR(0, 2978, __pyx_L1_error));
59774
59775 /* "pysam/libcbcf.pyx":2979
59776 *
59777 * def pop(self, key, default=_nothing):
59778 * try: # <<<<<<<<<<<<<<
59779 * value = self[key]
59780 * del self[key]
59781 */
59782 {
59783 __Pyx_PyThreadState_declare
59784 __Pyx_PyThreadState_assign
59785 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
59786 __Pyx_XGOTREF(__pyx_t_1);
59787 __Pyx_XGOTREF(__pyx_t_2);
59788 __Pyx_XGOTREF(__pyx_t_3);
59789 /*try:*/ {
59790
59791 /* "pysam/libcbcf.pyx":2980
59792 * def pop(self, key, default=_nothing):
59793 * try:
59794 * value = self[key] # <<<<<<<<<<<<<<
59795 * del self[key]
59796 * return value
59797 */
59798 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2980, __pyx_L3_error)
59799 __Pyx_GOTREF(__pyx_t_4);
59800 __pyx_v_value = __pyx_t_4;
59801 __pyx_t_4 = 0;
59802
59803 /* "pysam/libcbcf.pyx":2981
59804 * try:
59805 * value = self[key]
59806 * del self[key] # <<<<<<<<<<<<<<
59807 * return value
59808 * except KeyError:
59809 */
59810 if (unlikely((PyObject_DelItem(((PyObject *)__pyx_v_self), __pyx_v_key) < 0))) __PYX_ERR(0, 2981, __pyx_L3_error)
59811
59812 /* "pysam/libcbcf.pyx":2982
59813 * value = self[key]
59814 * del self[key]
59815 * return value # <<<<<<<<<<<<<<
59816 * except KeyError:
59817 * if default is not _nothing:
59818 */
59819 __Pyx_XDECREF(__pyx_r);
59820 __Pyx_INCREF(__pyx_v_value);
59821 __pyx_r = __pyx_v_value;
59822 goto __pyx_L7_try_return;
59823
59824 /* "pysam/libcbcf.pyx":2979
59825 *
59826 * def pop(self, key, default=_nothing):
59827 * try: # <<<<<<<<<<<<<<
59828 * value = self[key]
59829 * del self[key]
59830 */
59831 }
59832 __pyx_L3_error:;
59833 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
59834
59835 /* "pysam/libcbcf.pyx":2983
59836 * del self[key]
59837 * return value
59838 * except KeyError: # <<<<<<<<<<<<<<
59839 * if default is not _nothing:
59840 * return default
59841 */
59842 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
59843 if (__pyx_t_5) {
59844 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
59845 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 2983, __pyx_L5_except_error)
59846 __Pyx_XGOTREF(__pyx_t_4);
59847 __Pyx_XGOTREF(__pyx_t_6);
59848 __Pyx_XGOTREF(__pyx_t_7);
59849
59850 /* "pysam/libcbcf.pyx":2984
59851 * return value
59852 * except KeyError:
59853 * if default is not _nothing: # <<<<<<<<<<<<<<
59854 * return default
59855 * raise
59856 */
59857 __pyx_t_8 = (__pyx_v_default != __pyx_v_5pysam_7libcbcf__nothing);
59858 if (__pyx_t_8) {
59859
59860 /* "pysam/libcbcf.pyx":2985
59861 * except KeyError:
59862 * if default is not _nothing:
59863 * return default # <<<<<<<<<<<<<<
59864 * raise
59865 *
59866 */
59867 __Pyx_XDECREF(__pyx_r);
59868 __Pyx_INCREF(__pyx_v_default);
59869 __pyx_r = __pyx_v_default;
59870 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59871 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59872 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
59873 goto __pyx_L6_except_return;
59874
59875 /* "pysam/libcbcf.pyx":2984
59876 * return value
59877 * except KeyError:
59878 * if default is not _nothing: # <<<<<<<<<<<<<<
59879 * return default
59880 * raise
59881 */
59882 }
59883
59884 /* "pysam/libcbcf.pyx":2986
59885 * if default is not _nothing:
59886 * return default
59887 * raise # <<<<<<<<<<<<<<
59888 *
59889 * def __richcmp__(VariantRecordSamples self not None, VariantRecordSamples other not None, int op):
59890 */
59891 __Pyx_GIVEREF(__pyx_t_4);
59892 __Pyx_GIVEREF(__pyx_t_6);
59893 __Pyx_XGIVEREF(__pyx_t_7);
59894 __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_6, __pyx_t_7);
59895 __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0;
59896 __PYX_ERR(0, 2986, __pyx_L5_except_error)
59897 }
59898 goto __pyx_L5_except_error;
59899
59900 /* "pysam/libcbcf.pyx":2979
59901 *
59902 * def pop(self, key, default=_nothing):
59903 * try: # <<<<<<<<<<<<<<
59904 * value = self[key]
59905 * del self[key]
59906 */
59907 __pyx_L5_except_error:;
59908 __Pyx_XGIVEREF(__pyx_t_1);
59909 __Pyx_XGIVEREF(__pyx_t_2);
59910 __Pyx_XGIVEREF(__pyx_t_3);
59911 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
59912 goto __pyx_L1_error;
59913 __pyx_L7_try_return:;
59914 __Pyx_XGIVEREF(__pyx_t_1);
59915 __Pyx_XGIVEREF(__pyx_t_2);
59916 __Pyx_XGIVEREF(__pyx_t_3);
59917 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
59918 goto __pyx_L0;
59919 __pyx_L6_except_return:;
59920 __Pyx_XGIVEREF(__pyx_t_1);
59921 __Pyx_XGIVEREF(__pyx_t_2);
59922 __Pyx_XGIVEREF(__pyx_t_3);
59923 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
59924 goto __pyx_L0;
59925 }
59926
59927 /* "pysam/libcbcf.pyx":2978
59928 * self[k] = v
59929 *
59930 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
59931 * try:
59932 * value = self[key]
59933 */
59934
59935 /* function exit code */
59936 __pyx_L1_error:;
59937 __Pyx_XDECREF(__pyx_t_4);
59938 __Pyx_XDECREF(__pyx_t_6);
59939 __Pyx_XDECREF(__pyx_t_7);
59940 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
59941 __pyx_r = NULL;
59942 __pyx_L0:;
59943 __Pyx_XDECREF(__pyx_v_value);
59944 __Pyx_XGIVEREF(__pyx_r);
59945 __Pyx_TraceReturn(__pyx_r, 0);
59946 __Pyx_RefNannyFinishContext();
59947 return __pyx_r;
59948 }
59949
59950 /* "pysam/libcbcf.pyx":2988
59951 * raise
59952 *
59953 * def __richcmp__(VariantRecordSamples self not None, VariantRecordSamples other not None, int op): # <<<<<<<<<<<<<<
59954 * if op != 2 and op != 3:
59955 * return NotImplemented
59956 */
59957
59958 /* Python wrapper */
59959 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_34__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
59960 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_34__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
59961 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
59962 int __pyx_lineno = 0;
59963 const char *__pyx_filename = NULL;
59964 int __pyx_clineno = 0;
59965 PyObject *__pyx_r = 0;
59966 __Pyx_RefNannyDeclarations
59967 __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
59968 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
59969 if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
59970 PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 2988, __pyx_L1_error)
59971 }
59972 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, 0, "other", 0))) __PYX_ERR(0, 2988, __pyx_L1_error)
59973 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_33__richcmp__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self), ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_other), ((int)__pyx_v_op));
59974
59975 /* function exit code */
59976 goto __pyx_L0;
59977 __pyx_L1_error:;
59978 __pyx_r = NULL;
59979 __pyx_L0:;
59980 __Pyx_RefNannyFinishContext();
59981 return __pyx_r;
59982 }
59983
59984 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_33__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_other, int __pyx_v_op) {
59985 bcf1_t *__pyx_v_s;
59986 bcf1_t *__pyx_v_o;
59987 int __pyx_v_cmp;
59988 PyObject *__pyx_r = NULL;
59989 __Pyx_TraceDeclarations
59990 __Pyx_RefNannyDeclarations
59991 int __pyx_t_1;
59992 bcf1_t *__pyx_t_2;
59993 int __pyx_t_3;
59994 PyObject *__pyx_t_4 = NULL;
59995 PyObject *__pyx_t_5 = NULL;
59996 PyObject *__pyx_t_6 = NULL;
59997 unsigned int __pyx_t_7;
59998 PyObject *__pyx_t_8 = NULL;
59999 int __pyx_lineno = 0;
60000 const char *__pyx_filename = NULL;
60001 int __pyx_clineno = 0;
60002 __Pyx_RefNannySetupContext("__richcmp__", 1);
60003 __Pyx_TraceCall("__richcmp__", __pyx_f[0], 2988, 0, __PYX_ERR(0, 2988, __pyx_L1_error));
60004
60005 /* "pysam/libcbcf.pyx":2989
60006 *
60007 * def __richcmp__(VariantRecordSamples self not None, VariantRecordSamples other not None, int op):
60008 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
60009 * return NotImplemented
60010 *
60011 */
60012 switch (__pyx_v_op) {
60013 case 2:
60014 case 3:
60015 __pyx_t_1 = 0;
60016 break;
60017 default:
60018 __pyx_t_1 = 1;
60019 break;
60020 }
60021 if (__pyx_t_1) {
60022
60023 /* "pysam/libcbcf.pyx":2990
60024 * def __richcmp__(VariantRecordSamples self not None, VariantRecordSamples other not None, int op):
60025 * if op != 2 and op != 3:
60026 * return NotImplemented # <<<<<<<<<<<<<<
60027 *
60028 * cdef bcf1_t *s = self.record.ptr
60029 */
60030 __Pyx_XDECREF(__pyx_r);
60031 __Pyx_INCREF(__pyx_builtin_NotImplemented);
60032 __pyx_r = __pyx_builtin_NotImplemented;
60033 goto __pyx_L0;
60034
60035 /* "pysam/libcbcf.pyx":2989
60036 *
60037 * def __richcmp__(VariantRecordSamples self not None, VariantRecordSamples other not None, int op):
60038 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
60039 * return NotImplemented
60040 *
60041 */
60042 }
60043
60044 /* "pysam/libcbcf.pyx":2992
60045 * return NotImplemented
60046 *
60047 * cdef bcf1_t *s = self.record.ptr # <<<<<<<<<<<<<<
60048 * cdef bcf1_t *o = other.record.ptr
60049 *
60050 */
60051 __pyx_t_2 = __pyx_v_self->record->ptr;
60052 __pyx_v_s = __pyx_t_2;
60053
60054 /* "pysam/libcbcf.pyx":2993
60055 *
60056 * cdef bcf1_t *s = self.record.ptr
60057 * cdef bcf1_t *o = other.record.ptr # <<<<<<<<<<<<<<
60058 *
60059 * cdef bint cmp = (s.n_sample == o.n_sample and self.values() == other.values())
60060 */
60061 __pyx_t_2 = __pyx_v_other->record->ptr;
60062 __pyx_v_o = __pyx_t_2;
60063
60064 /* "pysam/libcbcf.pyx":2995
60065 * cdef bcf1_t *o = other.record.ptr
60066 *
60067 * cdef bint cmp = (s.n_sample == o.n_sample and self.values() == other.values()) # <<<<<<<<<<<<<<
60068 *
60069 * if op == 3:
60070 */
60071 __pyx_t_3 = (__pyx_v_s->n_sample == __pyx_v_o->n_sample);
60072 if (__pyx_t_3) {
60073 } else {
60074 __pyx_t_1 = __pyx_t_3;
60075 goto __pyx_L4_bool_binop_done;
60076 }
60077 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2995, __pyx_L1_error)
60078 __Pyx_GOTREF(__pyx_t_5);
60079 __pyx_t_6 = NULL;
60080 __pyx_t_7 = 0;
60081 #if CYTHON_UNPACK_METHODS
60082 if (likely(PyMethod_Check(__pyx_t_5))) {
60083 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
60084 if (likely(__pyx_t_6)) {
60085 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
60086 __Pyx_INCREF(__pyx_t_6);
60087 __Pyx_INCREF(function);
60088 __Pyx_DECREF_SET(__pyx_t_5, function);
60089 __pyx_t_7 = 1;
60090 }
60091 }
60092 #endif
60093 {
60094 PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
60095 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
60096 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
60097 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2995, __pyx_L1_error)
60098 __Pyx_GOTREF(__pyx_t_4);
60099 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
60100 }
60101 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2995, __pyx_L1_error)
60102 __Pyx_GOTREF(__pyx_t_6);
60103 __pyx_t_8 = NULL;
60104 __pyx_t_7 = 0;
60105 #if CYTHON_UNPACK_METHODS
60106 if (likely(PyMethod_Check(__pyx_t_6))) {
60107 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
60108 if (likely(__pyx_t_8)) {
60109 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
60110 __Pyx_INCREF(__pyx_t_8);
60111 __Pyx_INCREF(function);
60112 __Pyx_DECREF_SET(__pyx_t_6, function);
60113 __pyx_t_7 = 1;
60114 }
60115 }
60116 #endif
60117 {
60118 PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
60119 __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
60120 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
60121 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2995, __pyx_L1_error)
60122 __Pyx_GOTREF(__pyx_t_5);
60123 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60124 }
60125 __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2995, __pyx_L1_error)
60126 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60127 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
60128 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2995, __pyx_L1_error)
60129 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60130 __pyx_t_1 = __pyx_t_3;
60131 __pyx_L4_bool_binop_done:;
60132 __pyx_v_cmp = __pyx_t_1;
60133
60134 /* "pysam/libcbcf.pyx":2997
60135 * cdef bint cmp = (s.n_sample == o.n_sample and self.values() == other.values())
60136 *
60137 * if op == 3: # <<<<<<<<<<<<<<
60138 * cmp = not cmp
60139 *
60140 */
60141 __pyx_t_1 = (__pyx_v_op == 3);
60142 if (__pyx_t_1) {
60143
60144 /* "pysam/libcbcf.pyx":2998
60145 *
60146 * if op == 3:
60147 * cmp = not cmp # <<<<<<<<<<<<<<
60148 *
60149 * return cmp
60150 */
60151 __pyx_v_cmp = (!__pyx_v_cmp);
60152
60153 /* "pysam/libcbcf.pyx":2997
60154 * cdef bint cmp = (s.n_sample == o.n_sample and self.values() == other.values())
60155 *
60156 * if op == 3: # <<<<<<<<<<<<<<
60157 * cmp = not cmp
60158 *
60159 */
60160 }
60161
60162 /* "pysam/libcbcf.pyx":3000
60163 * cmp = not cmp
60164 *
60165 * return cmp # <<<<<<<<<<<<<<
60166 *
60167 * # Mappings are not hashable by default, but subclasses can change this
60168 */
60169 __Pyx_XDECREF(__pyx_r);
60170 __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_cmp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3000, __pyx_L1_error)
60171 __Pyx_GOTREF(__pyx_t_6);
60172 __pyx_r = __pyx_t_6;
60173 __pyx_t_6 = 0;
60174 goto __pyx_L0;
60175
60176 /* "pysam/libcbcf.pyx":2988
60177 * raise
60178 *
60179 * def __richcmp__(VariantRecordSamples self not None, VariantRecordSamples other not None, int op): # <<<<<<<<<<<<<<
60180 * if op != 2 and op != 3:
60181 * return NotImplemented
60182 */
60183
60184 /* function exit code */
60185 __pyx_L1_error:;
60186 __Pyx_XDECREF(__pyx_t_4);
60187 __Pyx_XDECREF(__pyx_t_5);
60188 __Pyx_XDECREF(__pyx_t_6);
60189 __Pyx_XDECREF(__pyx_t_8);
60190 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
60191 __pyx_r = NULL;
60192 __pyx_L0:;
60193 __Pyx_XGIVEREF(__pyx_r);
60194 __Pyx_TraceReturn(__pyx_r, 0);
60195 __Pyx_RefNannyFinishContext();
60196 return __pyx_r;
60197 }
60198
60199 /* "(tree fragment)":1
60200 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
60201 * cdef tuple state
60202 * cdef object _dict
60203 */
60204
60205 /* Python wrapper */
60206 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_36__reduce_cython__(PyObject *__pyx_v_self,
60207 #if CYTHON_METH_FASTCALL
60208 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
60209 #else
60210 PyObject *__pyx_args, PyObject *__pyx_kwds
60211 #endif
60212 ); /*proto*/
60213 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_35__reduce_cython__, "VariantRecordSamples.__reduce_cython__(self)");
60214 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_36__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_36__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_35__reduce_cython__};
60215 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_36__reduce_cython__(PyObject *__pyx_v_self,
60216 #if CYTHON_METH_FASTCALL
60217 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
60218 #else
60219 PyObject *__pyx_args, PyObject *__pyx_kwds
60220 #endif
60221 ) {
60222 #if !CYTHON_METH_FASTCALL
60223 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
60224 #endif
60225 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
60226 PyObject *__pyx_r = 0;
60227 __Pyx_RefNannyDeclarations
60228 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
60229 #if !CYTHON_METH_FASTCALL
60230 #if CYTHON_ASSUME_SAFE_MACROS
60231 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
60232 #else
60233 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
60234 #endif
60235 #endif
60236 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
60237 if (unlikely(__pyx_nargs > 0)) {
60238 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
60239 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
60240 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_35__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self));
60241
60242 /* function exit code */
60243 __Pyx_RefNannyFinishContext();
60244 return __pyx_r;
60245 }
60246
60247 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_35__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self) {
60248 PyObject *__pyx_v_state = 0;
60249 PyObject *__pyx_v__dict = 0;
60250 int __pyx_v_use_setstate;
60251 PyObject *__pyx_r = NULL;
60252 __Pyx_TraceDeclarations
60253 __Pyx_RefNannyDeclarations
60254 PyObject *__pyx_t_1 = NULL;
60255 int __pyx_t_2;
60256 PyObject *__pyx_t_3 = NULL;
60257 PyObject *__pyx_t_4 = NULL;
60258 int __pyx_lineno = 0;
60259 const char *__pyx_filename = NULL;
60260 int __pyx_clineno = 0;
60261 __Pyx_TraceFrameInit(__pyx_codeobj__160)
60262 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
60263 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
60264
60265 /* "(tree fragment)":5
60266 * cdef object _dict
60267 * cdef bint use_setstate
60268 * state = (self.record,) # <<<<<<<<<<<<<<
60269 * _dict = getattr(self, '__dict__', None)
60270 * if _dict is not None:
60271 */
60272 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
60273 __Pyx_GOTREF(__pyx_t_1);
60274 __Pyx_INCREF((PyObject *)__pyx_v_self->record);
60275 __Pyx_GIVEREF((PyObject *)__pyx_v_self->record);
60276 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->record))) __PYX_ERR(4, 5, __pyx_L1_error);
60277 __pyx_v_state = ((PyObject*)__pyx_t_1);
60278 __pyx_t_1 = 0;
60279
60280 /* "(tree fragment)":6
60281 * cdef bint use_setstate
60282 * state = (self.record,)
60283 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
60284 * if _dict is not None:
60285 * state += (_dict,)
60286 */
60287 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
60288 __Pyx_GOTREF(__pyx_t_1);
60289 __pyx_v__dict = __pyx_t_1;
60290 __pyx_t_1 = 0;
60291
60292 /* "(tree fragment)":7
60293 * state = (self.record,)
60294 * _dict = getattr(self, '__dict__', None)
60295 * if _dict is not None: # <<<<<<<<<<<<<<
60296 * state += (_dict,)
60297 * use_setstate = True
60298 */
60299 __pyx_t_2 = (__pyx_v__dict != Py_None);
60300 if (__pyx_t_2) {
60301
60302 /* "(tree fragment)":8
60303 * _dict = getattr(self, '__dict__', None)
60304 * if _dict is not None:
60305 * state += (_dict,) # <<<<<<<<<<<<<<
60306 * use_setstate = True
60307 * else:
60308 */
60309 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
60310 __Pyx_GOTREF(__pyx_t_1);
60311 __Pyx_INCREF(__pyx_v__dict);
60312 __Pyx_GIVEREF(__pyx_v__dict);
60313 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
60314 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
60315 __Pyx_GOTREF(__pyx_t_3);
60316 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60317 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
60318 __pyx_t_3 = 0;
60319
60320 /* "(tree fragment)":9
60321 * if _dict is not None:
60322 * state += (_dict,)
60323 * use_setstate = True # <<<<<<<<<<<<<<
60324 * else:
60325 * use_setstate = self.record is not None
60326 */
60327 __pyx_v_use_setstate = 1;
60328
60329 /* "(tree fragment)":7
60330 * state = (self.record,)
60331 * _dict = getattr(self, '__dict__', None)
60332 * if _dict is not None: # <<<<<<<<<<<<<<
60333 * state += (_dict,)
60334 * use_setstate = True
60335 */
60336 goto __pyx_L3;
60337 }
60338
60339 /* "(tree fragment)":11
60340 * use_setstate = True
60341 * else:
60342 * use_setstate = self.record is not None # <<<<<<<<<<<<<<
60343 * if use_setstate:
60344 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, None), state
60345 */
60346 /*else*/ {
60347 __pyx_t_2 = (((PyObject *)__pyx_v_self->record) != Py_None);
60348 __pyx_v_use_setstate = __pyx_t_2;
60349 }
60350 __pyx_L3:;
60351
60352 /* "(tree fragment)":12
60353 * else:
60354 * use_setstate = self.record is not None
60355 * if use_setstate: # <<<<<<<<<<<<<<
60356 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, None), state
60357 * else:
60358 */
60359 if (__pyx_v_use_setstate) {
60360
60361 /* "(tree fragment)":13
60362 * use_setstate = self.record is not None
60363 * if use_setstate:
60364 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, None), state # <<<<<<<<<<<<<<
60365 * else:
60366 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, state)
60367 */
60368 __Pyx_XDECREF(__pyx_r);
60369 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_VariantRecordSamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
60370 __Pyx_GOTREF(__pyx_t_3);
60371 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
60372 __Pyx_GOTREF(__pyx_t_1);
60373 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
60374 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
60375 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
60376 __Pyx_INCREF(__pyx_int_118286449);
60377 __Pyx_GIVEREF(__pyx_int_118286449);
60378 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_118286449)) __PYX_ERR(4, 13, __pyx_L1_error);
60379 __Pyx_INCREF(Py_None);
60380 __Pyx_GIVEREF(Py_None);
60381 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
60382 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
60383 __Pyx_GOTREF(__pyx_t_4);
60384 __Pyx_GIVEREF(__pyx_t_3);
60385 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
60386 __Pyx_GIVEREF(__pyx_t_1);
60387 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
60388 __Pyx_INCREF(__pyx_v_state);
60389 __Pyx_GIVEREF(__pyx_v_state);
60390 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
60391 __pyx_t_3 = 0;
60392 __pyx_t_1 = 0;
60393 __pyx_r = __pyx_t_4;
60394 __pyx_t_4 = 0;
60395 goto __pyx_L0;
60396
60397 /* "(tree fragment)":12
60398 * else:
60399 * use_setstate = self.record is not None
60400 * if use_setstate: # <<<<<<<<<<<<<<
60401 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, None), state
60402 * else:
60403 */
60404 }
60405
60406 /* "(tree fragment)":15
60407 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, None), state
60408 * else:
60409 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, state) # <<<<<<<<<<<<<<
60410 * def __setstate_cython__(self, __pyx_state):
60411 * __pyx_unpickle_VariantRecordSamples__set_state(self, __pyx_state)
60412 */
60413 /*else*/ {
60414 __Pyx_XDECREF(__pyx_r);
60415 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantRecordSamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
60416 __Pyx_GOTREF(__pyx_t_4);
60417 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
60418 __Pyx_GOTREF(__pyx_t_1);
60419 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
60420 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
60421 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
60422 __Pyx_INCREF(__pyx_int_118286449);
60423 __Pyx_GIVEREF(__pyx_int_118286449);
60424 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_118286449)) __PYX_ERR(4, 15, __pyx_L1_error);
60425 __Pyx_INCREF(__pyx_v_state);
60426 __Pyx_GIVEREF(__pyx_v_state);
60427 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
60428 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
60429 __Pyx_GOTREF(__pyx_t_3);
60430 __Pyx_GIVEREF(__pyx_t_4);
60431 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
60432 __Pyx_GIVEREF(__pyx_t_1);
60433 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
60434 __pyx_t_4 = 0;
60435 __pyx_t_1 = 0;
60436 __pyx_r = __pyx_t_3;
60437 __pyx_t_3 = 0;
60438 goto __pyx_L0;
60439 }
60440
60441 /* "(tree fragment)":1
60442 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
60443 * cdef tuple state
60444 * cdef object _dict
60445 */
60446
60447 /* function exit code */
60448 __pyx_L1_error:;
60449 __Pyx_XDECREF(__pyx_t_1);
60450 __Pyx_XDECREF(__pyx_t_3);
60451 __Pyx_XDECREF(__pyx_t_4);
60452 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
60453 __pyx_r = NULL;
60454 __pyx_L0:;
60455 __Pyx_XDECREF(__pyx_v_state);
60456 __Pyx_XDECREF(__pyx_v__dict);
60457 __Pyx_XGIVEREF(__pyx_r);
60458 __Pyx_TraceReturn(__pyx_r, 0);
60459 __Pyx_RefNannyFinishContext();
60460 return __pyx_r;
60461 }
60462
60463 /* "(tree fragment)":16
60464 * else:
60465 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, state)
60466 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
60467 * __pyx_unpickle_VariantRecordSamples__set_state(self, __pyx_state)
60468 */
60469
60470 /* Python wrapper */
60471 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_38__setstate_cython__(PyObject *__pyx_v_self,
60472 #if CYTHON_METH_FASTCALL
60473 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
60474 #else
60475 PyObject *__pyx_args, PyObject *__pyx_kwds
60476 #endif
60477 ); /*proto*/
60478 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_37__setstate_cython__, "VariantRecordSamples.__setstate_cython__(self, __pyx_state)");
60479 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_38__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_38__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_37__setstate_cython__};
60480 static PyObject *__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_38__setstate_cython__(PyObject *__pyx_v_self,
60481 #if CYTHON_METH_FASTCALL
60482 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
60483 #else
60484 PyObject *__pyx_args, PyObject *__pyx_kwds
60485 #endif
60486 ) {
60487 PyObject *__pyx_v___pyx_state = 0;
60488 #if !CYTHON_METH_FASTCALL
60489 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
60490 #endif
60491 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
60492 PyObject* values[1] = {0};
60493 int __pyx_lineno = 0;
60494 const char *__pyx_filename = NULL;
60495 int __pyx_clineno = 0;
60496 PyObject *__pyx_r = 0;
60497 __Pyx_RefNannyDeclarations
60498 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
60499 #if !CYTHON_METH_FASTCALL
60500 #if CYTHON_ASSUME_SAFE_MACROS
60501 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
60502 #else
60503 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
60504 #endif
60505 #endif
60506 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
60507 {
60508 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
60509 if (__pyx_kwds) {
60510 Py_ssize_t kw_args;
60511 switch (__pyx_nargs) {
60512 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
60513 CYTHON_FALLTHROUGH;
60514 case 0: break;
60515 default: goto __pyx_L5_argtuple_error;
60516 }
60517 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
60518 switch (__pyx_nargs) {
60519 case 0:
60520 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
60521 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
60522 kw_args--;
60523 }
60524 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
60525 else goto __pyx_L5_argtuple_error;
60526 }
60527 if (unlikely(kw_args > 0)) {
60528 const Py_ssize_t kwd_pos_args = __pyx_nargs;
60529 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
60530 }
60531 } else if (unlikely(__pyx_nargs != 1)) {
60532 goto __pyx_L5_argtuple_error;
60533 } else {
60534 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
60535 }
60536 __pyx_v___pyx_state = values[0];
60537 }
60538 goto __pyx_L6_skip;
60539 __pyx_L5_argtuple_error:;
60540 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
60541 __pyx_L6_skip:;
60542 goto __pyx_L4_argument_unpacking_done;
60543 __pyx_L3_error:;
60544 {
60545 Py_ssize_t __pyx_temp;
60546 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
60547 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
60548 }
60549 }
60550 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
60551 __Pyx_RefNannyFinishContext();
60552 return NULL;
60553 __pyx_L4_argument_unpacking_done:;
60554 __pyx_r = __pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_37__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v_self), __pyx_v___pyx_state);
60555
60556 /* function exit code */
60557 {
60558 Py_ssize_t __pyx_temp;
60559 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
60560 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
60561 }
60562 }
60563 __Pyx_RefNannyFinishContext();
60564 return __pyx_r;
60565 }
60566
60567 static PyObject *__pyx_pf_5pysam_7libcbcf_20VariantRecordSamples_37__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
60568 PyObject *__pyx_r = NULL;
60569 __Pyx_TraceDeclarations
60570 __Pyx_RefNannyDeclarations
60571 PyObject *__pyx_t_1 = NULL;
60572 int __pyx_lineno = 0;
60573 const char *__pyx_filename = NULL;
60574 int __pyx_clineno = 0;
60575 __Pyx_TraceFrameInit(__pyx_codeobj__161)
60576 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
60577 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
60578
60579 /* "(tree fragment)":17
60580 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, state)
60581 * def __setstate_cython__(self, __pyx_state):
60582 * __pyx_unpickle_VariantRecordSamples__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
60583 */
60584 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
60585 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordSamples__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
60586 __Pyx_GOTREF(__pyx_t_1);
60587 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60588
60589 /* "(tree fragment)":16
60590 * else:
60591 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, state)
60592 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
60593 * __pyx_unpickle_VariantRecordSamples__set_state(self, __pyx_state)
60594 */
60595
60596 /* function exit code */
60597 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
60598 goto __pyx_L0;
60599 __pyx_L1_error:;
60600 __Pyx_XDECREF(__pyx_t_1);
60601 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSamples.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
60602 __pyx_r = NULL;
60603 __pyx_L0:;
60604 __Pyx_XGIVEREF(__pyx_r);
60605 __Pyx_TraceReturn(__pyx_r, 0);
60606 __Pyx_RefNannyFinishContext();
60607 return __pyx_r;
60608 }
60609
60610 /* "pysam/libcbcf.pyx":3006
60611 *
60612 *
60613 * cdef VariantRecordSamples makeVariantRecordSamples(VariantRecord record): # <<<<<<<<<<<<<<
60614 * if not record:
60615 * raise ValueError('invalid VariantRecord')
60616 */
60617
60618 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_f_5pysam_7libcbcf_makeVariantRecordSamples(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record) {
60619 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v_samples = 0;
60620 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_r = NULL;
60621 __Pyx_TraceDeclarations
60622 __Pyx_RefNannyDeclarations
60623 int __pyx_t_1;
60624 int __pyx_t_2;
60625 PyObject *__pyx_t_3 = NULL;
60626 int __pyx_lineno = 0;
60627 const char *__pyx_filename = NULL;
60628 int __pyx_clineno = 0;
60629 __Pyx_RefNannySetupContext("makeVariantRecordSamples", 1);
60630 __Pyx_TraceCall("makeVariantRecordSamples", __pyx_f[0], 3006, 0, __PYX_ERR(0, 3006, __pyx_L1_error));
60631
60632 /* "pysam/libcbcf.pyx":3007
60633 *
60634 * cdef VariantRecordSamples makeVariantRecordSamples(VariantRecord record):
60635 * if not record: # <<<<<<<<<<<<<<
60636 * raise ValueError('invalid VariantRecord')
60637 *
60638 */
60639 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_record)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3007, __pyx_L1_error)
60640 __pyx_t_2 = (!__pyx_t_1);
60641 if (unlikely(__pyx_t_2)) {
60642
60643 /* "pysam/libcbcf.pyx":3008
60644 * cdef VariantRecordSamples makeVariantRecordSamples(VariantRecord record):
60645 * if not record:
60646 * raise ValueError('invalid VariantRecord') # <<<<<<<<<<<<<<
60647 *
60648 * cdef VariantRecordSamples samples = VariantRecordSamples.__new__(
60649 */
60650 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3008, __pyx_L1_error)
60651 __Pyx_GOTREF(__pyx_t_3);
60652 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
60653 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60654 __PYX_ERR(0, 3008, __pyx_L1_error)
60655
60656 /* "pysam/libcbcf.pyx":3007
60657 *
60658 * cdef VariantRecordSamples makeVariantRecordSamples(VariantRecord record):
60659 * if not record: # <<<<<<<<<<<<<<
60660 * raise ValueError('invalid VariantRecord')
60661 *
60662 */
60663 }
60664
60665 /* "pysam/libcbcf.pyx":3010
60666 * raise ValueError('invalid VariantRecord')
60667 *
60668 * cdef VariantRecordSamples samples = VariantRecordSamples.__new__( # <<<<<<<<<<<<<<
60669 * VariantRecordSamples)
60670 * samples.record = record
60671 */
60672 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordSamples(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3010, __pyx_L1_error)
60673 __Pyx_GOTREF((PyObject *)__pyx_t_3);
60674 __pyx_v_samples = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_t_3);
60675 __pyx_t_3 = 0;
60676
60677 /* "pysam/libcbcf.pyx":3012
60678 * cdef VariantRecordSamples samples = VariantRecordSamples.__new__(
60679 * VariantRecordSamples)
60680 * samples.record = record # <<<<<<<<<<<<<<
60681 *
60682 * return samples
60683 */
60684 __Pyx_INCREF((PyObject *)__pyx_v_record);
60685 __Pyx_GIVEREF((PyObject *)__pyx_v_record);
60686 __Pyx_GOTREF((PyObject *)__pyx_v_samples->record);
60687 __Pyx_DECREF((PyObject *)__pyx_v_samples->record);
60688 __pyx_v_samples->record = __pyx_v_record;
60689
60690 /* "pysam/libcbcf.pyx":3014
60691 * samples.record = record
60692 *
60693 * return samples # <<<<<<<<<<<<<<
60694 *
60695 *
60696 */
60697 __Pyx_XDECREF((PyObject *)__pyx_r);
60698 __Pyx_INCREF((PyObject *)__pyx_v_samples);
60699 __pyx_r = __pyx_v_samples;
60700 goto __pyx_L0;
60701
60702 /* "pysam/libcbcf.pyx":3006
60703 *
60704 *
60705 * cdef VariantRecordSamples makeVariantRecordSamples(VariantRecord record): # <<<<<<<<<<<<<<
60706 * if not record:
60707 * raise ValueError('invalid VariantRecord')
60708 */
60709
60710 /* function exit code */
60711 __pyx_L1_error:;
60712 __Pyx_XDECREF(__pyx_t_3);
60713 __Pyx_AddTraceback("pysam.libcbcf.makeVariantRecordSamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
60714 __pyx_r = 0;
60715 __pyx_L0:;
60716 __Pyx_XDECREF((PyObject *)__pyx_v_samples);
60717 __Pyx_XGIVEREF((PyObject *)__pyx_r);
60718 __Pyx_TraceReturn(__pyx_r, 0);
60719 __Pyx_RefNannyFinishContext();
60720 return __pyx_r;
60721 }
60722
60723 /* "pysam/libcbcf.pyx":3019
60724 * cdef class VariantRecord(object):
60725 * """Variant record"""
60726 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
60727 * raise TypeError('this class cannot be instantiated from Python')
60728 *
60729 */
60730
60731 /* Python wrapper */
60732 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
60733 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
60734 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
60735 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
60736 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
60737 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
60738 int __pyx_r;
60739 __Pyx_RefNannyDeclarations
60740 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
60741 #if CYTHON_ASSUME_SAFE_MACROS
60742 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
60743 #else
60744 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
60745 #endif
60746 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
60747 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
60748 __Pyx_INCREF(__pyx_args);
60749 __pyx_v_args = __pyx_args;
60750 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
60751
60752 /* function exit code */
60753 __Pyx_DECREF(__pyx_v_args);
60754 __Pyx_XDECREF(__pyx_v_kwargs);
60755 __Pyx_RefNannyFinishContext();
60756 return __pyx_r;
60757 }
60758
60759 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
60760 int __pyx_r;
60761 __Pyx_TraceDeclarations
60762 __Pyx_RefNannyDeclarations
60763 PyObject *__pyx_t_1 = NULL;
60764 int __pyx_lineno = 0;
60765 const char *__pyx_filename = NULL;
60766 int __pyx_clineno = 0;
60767 __Pyx_RefNannySetupContext("__init__", 1);
60768 __Pyx_TraceCall("__init__", __pyx_f[0], 3019, 0, __PYX_ERR(0, 3019, __pyx_L1_error));
60769
60770 /* "pysam/libcbcf.pyx":3020
60771 * """Variant record"""
60772 * def __init__(self, *args, **kwargs):
60773 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
60774 *
60775 * def __dealloc__(self):
60776 */
60777 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3020, __pyx_L1_error)
60778 __Pyx_GOTREF(__pyx_t_1);
60779 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
60780 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60781 __PYX_ERR(0, 3020, __pyx_L1_error)
60782
60783 /* "pysam/libcbcf.pyx":3019
60784 * cdef class VariantRecord(object):
60785 * """Variant record"""
60786 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
60787 * raise TypeError('this class cannot be instantiated from Python')
60788 *
60789 */
60790
60791 /* function exit code */
60792 __pyx_L1_error:;
60793 __Pyx_XDECREF(__pyx_t_1);
60794 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
60795 __pyx_r = -1;
60796 __Pyx_TraceReturn(Py_None, 0);
60797 __Pyx_RefNannyFinishContext();
60798 return __pyx_r;
60799 }
60800
60801 /* "pysam/libcbcf.pyx":3022
60802 * raise TypeError('this class cannot be instantiated from Python')
60803 *
60804 * def __dealloc__(self): # <<<<<<<<<<<<<<
60805 * if self.ptr:
60806 * bcf_destroy1(self.ptr)
60807 */
60808
60809 /* Python wrapper */
60810 static void __pyx_pw_5pysam_7libcbcf_13VariantRecord_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
60811 static void __pyx_pw_5pysam_7libcbcf_13VariantRecord_3__dealloc__(PyObject *__pyx_v_self) {
60812 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
60813 __Pyx_RefNannyDeclarations
60814 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
60815 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
60816 __pyx_pf_5pysam_7libcbcf_13VariantRecord_2__dealloc__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
60817
60818 /* function exit code */
60819 __Pyx_RefNannyFinishContext();
60820 }
60821
60822 static void __pyx_pf_5pysam_7libcbcf_13VariantRecord_2__dealloc__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
60823 __Pyx_TraceDeclarations
60824 int __pyx_t_1;
60825 int __pyx_lineno = 0;
60826 const char *__pyx_filename = NULL;
60827 int __pyx_clineno = 0;
60828 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3022, 0, __PYX_ERR(0, 3022, __pyx_L1_error));
60829
60830 /* "pysam/libcbcf.pyx":3023
60831 *
60832 * def __dealloc__(self):
60833 * if self.ptr: # <<<<<<<<<<<<<<
60834 * bcf_destroy1(self.ptr)
60835 * self.ptr = NULL
60836 */
60837 __pyx_t_1 = (__pyx_v_self->ptr != 0);
60838 if (__pyx_t_1) {
60839
60840 /* "pysam/libcbcf.pyx":3024
60841 * def __dealloc__(self):
60842 * if self.ptr:
60843 * bcf_destroy1(self.ptr) # <<<<<<<<<<<<<<
60844 * self.ptr = NULL
60845 *
60846 */
60847 bcf_destroy1(__pyx_v_self->ptr);
60848
60849 /* "pysam/libcbcf.pyx":3025
60850 * if self.ptr:
60851 * bcf_destroy1(self.ptr)
60852 * self.ptr = NULL # <<<<<<<<<<<<<<
60853 *
60854 * def copy(self):
60855 */
60856 __pyx_v_self->ptr = NULL;
60857
60858 /* "pysam/libcbcf.pyx":3023
60859 *
60860 * def __dealloc__(self):
60861 * if self.ptr: # <<<<<<<<<<<<<<
60862 * bcf_destroy1(self.ptr)
60863 * self.ptr = NULL
60864 */
60865 }
60866
60867 /* "pysam/libcbcf.pyx":3022
60868 * raise TypeError('this class cannot be instantiated from Python')
60869 *
60870 * def __dealloc__(self): # <<<<<<<<<<<<<<
60871 * if self.ptr:
60872 * bcf_destroy1(self.ptr)
60873 */
60874
60875 /* function exit code */
60876 goto __pyx_L0;
60877 __pyx_L1_error:;
60878 __Pyx_WriteUnraisable("pysam.libcbcf.VariantRecord.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
60879 __pyx_L0:;
60880 __Pyx_TraceReturn(Py_None, 0);
60881 }
60882
60883 /* "pysam/libcbcf.pyx":3027
60884 * self.ptr = NULL
60885 *
60886 * def copy(self): # <<<<<<<<<<<<<<
60887 * """return a copy of this VariantRecord object"""
60888 * return makeVariantRecord(self.header, bcf_dup(self.ptr))
60889 */
60890
60891 /* Python wrapper */
60892 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_5copy(PyObject *__pyx_v_self,
60893 #if CYTHON_METH_FASTCALL
60894 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
60895 #else
60896 PyObject *__pyx_args, PyObject *__pyx_kwds
60897 #endif
60898 ); /*proto*/
60899 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantRecord_4copy, "VariantRecord.copy(self)\nreturn a copy of this VariantRecord object");
60900 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantRecord_5copy = {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantRecord_5copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantRecord_4copy};
60901 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_5copy(PyObject *__pyx_v_self,
60902 #if CYTHON_METH_FASTCALL
60903 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
60904 #else
60905 PyObject *__pyx_args, PyObject *__pyx_kwds
60906 #endif
60907 ) {
60908 #if !CYTHON_METH_FASTCALL
60909 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
60910 #endif
60911 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
60912 PyObject *__pyx_r = 0;
60913 __Pyx_RefNannyDeclarations
60914 __Pyx_RefNannySetupContext("copy (wrapper)", 0);
60915 #if !CYTHON_METH_FASTCALL
60916 #if CYTHON_ASSUME_SAFE_MACROS
60917 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
60918 #else
60919 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
60920 #endif
60921 #endif
60922 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
60923 if (unlikely(__pyx_nargs > 0)) {
60924 __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
60925 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
60926 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4copy(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
60927
60928 /* function exit code */
60929 __Pyx_RefNannyFinishContext();
60930 return __pyx_r;
60931 }
60932
60933 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4copy(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
60934 PyObject *__pyx_r = NULL;
60935 __Pyx_TraceDeclarations
60936 __Pyx_RefNannyDeclarations
60937 PyObject *__pyx_t_1 = NULL;
60938 PyObject *__pyx_t_2 = NULL;
60939 int __pyx_lineno = 0;
60940 const char *__pyx_filename = NULL;
60941 int __pyx_clineno = 0;
60942 __Pyx_TraceFrameInit(__pyx_codeobj__162)
60943 __Pyx_RefNannySetupContext("copy", 1);
60944 __Pyx_TraceCall("copy", __pyx_f[0], 3027, 0, __PYX_ERR(0, 3027, __pyx_L1_error));
60945
60946 /* "pysam/libcbcf.pyx":3029
60947 * def copy(self):
60948 * """return a copy of this VariantRecord object"""
60949 * return makeVariantRecord(self.header, bcf_dup(self.ptr)) # <<<<<<<<<<<<<<
60950 *
60951 * def translate(self, VariantHeader dst_header):
60952 */
60953 __Pyx_XDECREF(__pyx_r);
60954 __pyx_t_1 = ((PyObject *)__pyx_v_self->header);
60955 __Pyx_INCREF(__pyx_t_1);
60956 __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecord(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_1), bcf_dup(__pyx_v_self->ptr))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3029, __pyx_L1_error)
60957 __Pyx_GOTREF(__pyx_t_2);
60958 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60959 __pyx_r = __pyx_t_2;
60960 __pyx_t_2 = 0;
60961 goto __pyx_L0;
60962
60963 /* "pysam/libcbcf.pyx":3027
60964 * self.ptr = NULL
60965 *
60966 * def copy(self): # <<<<<<<<<<<<<<
60967 * """return a copy of this VariantRecord object"""
60968 * return makeVariantRecord(self.header, bcf_dup(self.ptr))
60969 */
60970
60971 /* function exit code */
60972 __pyx_L1_error:;
60973 __Pyx_XDECREF(__pyx_t_1);
60974 __Pyx_XDECREF(__pyx_t_2);
60975 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
60976 __pyx_r = NULL;
60977 __pyx_L0:;
60978 __Pyx_XGIVEREF(__pyx_r);
60979 __Pyx_TraceReturn(__pyx_r, 0);
60980 __Pyx_RefNannyFinishContext();
60981 return __pyx_r;
60982 }
60983
60984 /* "pysam/libcbcf.pyx":3031
60985 * return makeVariantRecord(self.header, bcf_dup(self.ptr))
60986 *
60987 * def translate(self, VariantHeader dst_header): # <<<<<<<<<<<<<<
60988 * if dst_header is None:
60989 * raise ValueError('dst_header must not be None')
60990 */
60991
60992 /* Python wrapper */
60993 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_7translate(PyObject *__pyx_v_self,
60994 #if CYTHON_METH_FASTCALL
60995 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
60996 #else
60997 PyObject *__pyx_args, PyObject *__pyx_kwds
60998 #endif
60999 ); /*proto*/
61000 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantRecord_6translate, "VariantRecord.translate(self, VariantHeader dst_header)");
61001 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantRecord_7translate = {"translate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantRecord_7translate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantRecord_6translate};
61002 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_7translate(PyObject *__pyx_v_self,
61003 #if CYTHON_METH_FASTCALL
61004 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
61005 #else
61006 PyObject *__pyx_args, PyObject *__pyx_kwds
61007 #endif
61008 ) {
61009 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_dst_header = 0;
61010 #if !CYTHON_METH_FASTCALL
61011 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
61012 #endif
61013 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
61014 PyObject* values[1] = {0};
61015 int __pyx_lineno = 0;
61016 const char *__pyx_filename = NULL;
61017 int __pyx_clineno = 0;
61018 PyObject *__pyx_r = 0;
61019 __Pyx_RefNannyDeclarations
61020 __Pyx_RefNannySetupContext("translate (wrapper)", 0);
61021 #if !CYTHON_METH_FASTCALL
61022 #if CYTHON_ASSUME_SAFE_MACROS
61023 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
61024 #else
61025 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
61026 #endif
61027 #endif
61028 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
61029 {
61030 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dst_header,0};
61031 if (__pyx_kwds) {
61032 Py_ssize_t kw_args;
61033 switch (__pyx_nargs) {
61034 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
61035 CYTHON_FALLTHROUGH;
61036 case 0: break;
61037 default: goto __pyx_L5_argtuple_error;
61038 }
61039 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
61040 switch (__pyx_nargs) {
61041 case 0:
61042 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dst_header)) != 0)) {
61043 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
61044 kw_args--;
61045 }
61046 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3031, __pyx_L3_error)
61047 else goto __pyx_L5_argtuple_error;
61048 }
61049 if (unlikely(kw_args > 0)) {
61050 const Py_ssize_t kwd_pos_args = __pyx_nargs;
61051 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "translate") < 0)) __PYX_ERR(0, 3031, __pyx_L3_error)
61052 }
61053 } else if (unlikely(__pyx_nargs != 1)) {
61054 goto __pyx_L5_argtuple_error;
61055 } else {
61056 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
61057 }
61058 __pyx_v_dst_header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)values[0]);
61059 }
61060 goto __pyx_L6_skip;
61061 __pyx_L5_argtuple_error:;
61062 __Pyx_RaiseArgtupleInvalid("translate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3031, __pyx_L3_error)
61063 __pyx_L6_skip:;
61064 goto __pyx_L4_argument_unpacking_done;
61065 __pyx_L3_error:;
61066 {
61067 Py_ssize_t __pyx_temp;
61068 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
61069 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
61070 }
61071 }
61072 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.translate", __pyx_clineno, __pyx_lineno, __pyx_filename);
61073 __Pyx_RefNannyFinishContext();
61074 return NULL;
61075 __pyx_L4_argument_unpacking_done:;
61076 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst_header), __pyx_ptype_5pysam_7libcbcf_VariantHeader, 1, "dst_header", 0))) __PYX_ERR(0, 3031, __pyx_L1_error)
61077 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_6translate(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), __pyx_v_dst_header);
61078
61079 /* function exit code */
61080 goto __pyx_L0;
61081 __pyx_L1_error:;
61082 __pyx_r = NULL;
61083 __pyx_L0:;
61084 {
61085 Py_ssize_t __pyx_temp;
61086 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
61087 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
61088 }
61089 }
61090 __Pyx_RefNannyFinishContext();
61091 return __pyx_r;
61092 }
61093
61094 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6translate(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_dst_header) {
61095 bcf_hdr_t *__pyx_v_src_hdr;
61096 bcf_hdr_t *__pyx_v_dst_hdr;
61097 PyObject *__pyx_v_msg = NULL;
61098 PyObject *__pyx_r = NULL;
61099 __Pyx_TraceDeclarations
61100 __Pyx_RefNannyDeclarations
61101 int __pyx_t_1;
61102 PyObject *__pyx_t_2 = NULL;
61103 bcf_hdr_t *__pyx_t_3;
61104 PyObject *__pyx_t_4 = NULL;
61105 PyObject *__pyx_t_5 = NULL;
61106 int __pyx_lineno = 0;
61107 const char *__pyx_filename = NULL;
61108 int __pyx_clineno = 0;
61109 __Pyx_TraceFrameInit(__pyx_codeobj__163)
61110 __Pyx_RefNannySetupContext("translate", 1);
61111 __Pyx_TraceCall("translate", __pyx_f[0], 3031, 0, __PYX_ERR(0, 3031, __pyx_L1_error));
61112
61113 /* "pysam/libcbcf.pyx":3032
61114 *
61115 * def translate(self, VariantHeader dst_header):
61116 * if dst_header is None: # <<<<<<<<<<<<<<
61117 * raise ValueError('dst_header must not be None')
61118 *
61119 */
61120 __pyx_t_1 = (((PyObject *)__pyx_v_dst_header) == Py_None);
61121 if (unlikely(__pyx_t_1)) {
61122
61123 /* "pysam/libcbcf.pyx":3033
61124 * def translate(self, VariantHeader dst_header):
61125 * if dst_header is None:
61126 * raise ValueError('dst_header must not be None') # <<<<<<<<<<<<<<
61127 *
61128 * cdef bcf_hdr_t *src_hdr = self.header.ptr
61129 */
61130 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__164, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3033, __pyx_L1_error)
61131 __Pyx_GOTREF(__pyx_t_2);
61132 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
61133 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61134 __PYX_ERR(0, 3033, __pyx_L1_error)
61135
61136 /* "pysam/libcbcf.pyx":3032
61137 *
61138 * def translate(self, VariantHeader dst_header):
61139 * if dst_header is None: # <<<<<<<<<<<<<<
61140 * raise ValueError('dst_header must not be None')
61141 *
61142 */
61143 }
61144
61145 /* "pysam/libcbcf.pyx":3035
61146 * raise ValueError('dst_header must not be None')
61147 *
61148 * cdef bcf_hdr_t *src_hdr = self.header.ptr # <<<<<<<<<<<<<<
61149 * cdef bcf_hdr_t *dst_hdr = dst_header.ptr
61150 *
61151 */
61152 __pyx_t_3 = __pyx_v_self->header->ptr;
61153 __pyx_v_src_hdr = __pyx_t_3;
61154
61155 /* "pysam/libcbcf.pyx":3036
61156 *
61157 * cdef bcf_hdr_t *src_hdr = self.header.ptr
61158 * cdef bcf_hdr_t *dst_hdr = dst_header.ptr # <<<<<<<<<<<<<<
61159 *
61160 * if src_hdr != dst_hdr:
61161 */
61162 __pyx_t_3 = __pyx_v_dst_header->ptr;
61163 __pyx_v_dst_hdr = __pyx_t_3;
61164
61165 /* "pysam/libcbcf.pyx":3038
61166 * cdef bcf_hdr_t *dst_hdr = dst_header.ptr
61167 *
61168 * if src_hdr != dst_hdr: # <<<<<<<<<<<<<<
61169 * if self.ptr.n_sample != bcf_hdr_nsamples(dst_hdr):
61170 * msg = 'Cannot translate record. Number of samples does not match header ({} vs {})'
61171 */
61172 __pyx_t_1 = (__pyx_v_src_hdr != __pyx_v_dst_hdr);
61173 if (__pyx_t_1) {
61174
61175 /* "pysam/libcbcf.pyx":3039
61176 *
61177 * if src_hdr != dst_hdr:
61178 * if self.ptr.n_sample != bcf_hdr_nsamples(dst_hdr): # <<<<<<<<<<<<<<
61179 * msg = 'Cannot translate record. Number of samples does not match header ({} vs {})'
61180 * raise ValueError(msg.format(self.ptr.n_sample, bcf_hdr_nsamples(dst_hdr)))
61181 */
61182 __pyx_t_1 = (__pyx_v_self->ptr->n_sample != bcf_hdr_nsamples(__pyx_v_dst_hdr));
61183 if (unlikely(__pyx_t_1)) {
61184
61185 /* "pysam/libcbcf.pyx":3040
61186 * if src_hdr != dst_hdr:
61187 * if self.ptr.n_sample != bcf_hdr_nsamples(dst_hdr):
61188 * msg = 'Cannot translate record. Number of samples does not match header ({} vs {})' # <<<<<<<<<<<<<<
61189 * raise ValueError(msg.format(self.ptr.n_sample, bcf_hdr_nsamples(dst_hdr)))
61190 *
61191 */
61192 __Pyx_INCREF(__pyx_kp_u_Cannot_translate_record_Number_o);
61193 __pyx_v_msg = __pyx_kp_u_Cannot_translate_record_Number_o;
61194
61195 /* "pysam/libcbcf.pyx":3041
61196 * if self.ptr.n_sample != bcf_hdr_nsamples(dst_hdr):
61197 * msg = 'Cannot translate record. Number of samples does not match header ({} vs {})'
61198 * raise ValueError(msg.format(self.ptr.n_sample, bcf_hdr_nsamples(dst_hdr))) # <<<<<<<<<<<<<<
61199 *
61200 * bcf_translate(dst_hdr, src_hdr, self.ptr)
61201 */
61202 __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->ptr->n_sample); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3041, __pyx_L1_error)
61203 __Pyx_GOTREF(__pyx_t_2);
61204 __pyx_t_4 = __Pyx_PyInt_From_int32_t(bcf_hdr_nsamples(__pyx_v_dst_hdr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3041, __pyx_L1_error)
61205 __Pyx_GOTREF(__pyx_t_4);
61206 __pyx_t_5 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyUnicode_Type_format, __pyx_v_msg, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3041, __pyx_L1_error)
61207 __Pyx_GOTREF(__pyx_t_5);
61208 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61209 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61210 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3041, __pyx_L1_error)
61211 __Pyx_GOTREF(__pyx_t_4);
61212 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
61213 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
61214 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61215 __PYX_ERR(0, 3041, __pyx_L1_error)
61216
61217 /* "pysam/libcbcf.pyx":3039
61218 *
61219 * if src_hdr != dst_hdr:
61220 * if self.ptr.n_sample != bcf_hdr_nsamples(dst_hdr): # <<<<<<<<<<<<<<
61221 * msg = 'Cannot translate record. Number of samples does not match header ({} vs {})'
61222 * raise ValueError(msg.format(self.ptr.n_sample, bcf_hdr_nsamples(dst_hdr)))
61223 */
61224 }
61225
61226 /* "pysam/libcbcf.pyx":3043
61227 * raise ValueError(msg.format(self.ptr.n_sample, bcf_hdr_nsamples(dst_hdr)))
61228 *
61229 * bcf_translate(dst_hdr, src_hdr, self.ptr) # <<<<<<<<<<<<<<
61230 * self.header = dst_header
61231 *
61232 */
61233 (void)(bcf_translate(__pyx_v_dst_hdr, __pyx_v_src_hdr, __pyx_v_self->ptr));
61234
61235 /* "pysam/libcbcf.pyx":3044
61236 *
61237 * bcf_translate(dst_hdr, src_hdr, self.ptr)
61238 * self.header = dst_header # <<<<<<<<<<<<<<
61239 *
61240 * @property
61241 */
61242 __Pyx_INCREF((PyObject *)__pyx_v_dst_header);
61243 __Pyx_GIVEREF((PyObject *)__pyx_v_dst_header);
61244 __Pyx_GOTREF((PyObject *)__pyx_v_self->header);
61245 __Pyx_DECREF((PyObject *)__pyx_v_self->header);
61246 __pyx_v_self->header = __pyx_v_dst_header;
61247
61248 /* "pysam/libcbcf.pyx":3038
61249 * cdef bcf_hdr_t *dst_hdr = dst_header.ptr
61250 *
61251 * if src_hdr != dst_hdr: # <<<<<<<<<<<<<<
61252 * if self.ptr.n_sample != bcf_hdr_nsamples(dst_hdr):
61253 * msg = 'Cannot translate record. Number of samples does not match header ({} vs {})'
61254 */
61255 }
61256
61257 /* "pysam/libcbcf.pyx":3031
61258 * return makeVariantRecord(self.header, bcf_dup(self.ptr))
61259 *
61260 * def translate(self, VariantHeader dst_header): # <<<<<<<<<<<<<<
61261 * if dst_header is None:
61262 * raise ValueError('dst_header must not be None')
61263 */
61264
61265 /* function exit code */
61266 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
61267 goto __pyx_L0;
61268 __pyx_L1_error:;
61269 __Pyx_XDECREF(__pyx_t_2);
61270 __Pyx_XDECREF(__pyx_t_4);
61271 __Pyx_XDECREF(__pyx_t_5);
61272 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.translate", __pyx_clineno, __pyx_lineno, __pyx_filename);
61273 __pyx_r = NULL;
61274 __pyx_L0:;
61275 __Pyx_XDECREF(__pyx_v_msg);
61276 __Pyx_XGIVEREF(__pyx_r);
61277 __Pyx_TraceReturn(__pyx_r, 0);
61278 __Pyx_RefNannyFinishContext();
61279 return __pyx_r;
61280 }
61281
61282 /* "pysam/libcbcf.pyx":3046
61283 * self.header = dst_header
61284 *
61285 * @property # <<<<<<<<<<<<<<
61286 * def rid(self):
61287 * """internal reference id number"""
61288 */
61289
61290 /* Python wrapper */
61291 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_3rid_1__get__(PyObject *__pyx_v_self); /*proto*/
61292 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_3rid_1__get__(PyObject *__pyx_v_self) {
61293 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
61294 PyObject *__pyx_r = 0;
61295 __Pyx_RefNannyDeclarations
61296 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
61297 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
61298 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_3rid___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
61299
61300 /* function exit code */
61301 __Pyx_RefNannyFinishContext();
61302 return __pyx_r;
61303 }
61304
61305 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_3rid___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
61306 PyObject *__pyx_r = NULL;
61307 __Pyx_TraceDeclarations
61308 __Pyx_RefNannyDeclarations
61309 PyObject *__pyx_t_1 = NULL;
61310 int __pyx_lineno = 0;
61311 const char *__pyx_filename = NULL;
61312 int __pyx_clineno = 0;
61313 __Pyx_RefNannySetupContext("__get__", 1);
61314 __Pyx_TraceCall("__get__", __pyx_f[0], 3046, 0, __PYX_ERR(0, 3046, __pyx_L1_error));
61315
61316 /* "pysam/libcbcf.pyx":3049
61317 * def rid(self):
61318 * """internal reference id number"""
61319 * return self.ptr.rid # <<<<<<<<<<<<<<
61320 *
61321 * @rid.setter
61322 */
61323 __Pyx_XDECREF(__pyx_r);
61324 __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->ptr->rid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L1_error)
61325 __Pyx_GOTREF(__pyx_t_1);
61326 __pyx_r = __pyx_t_1;
61327 __pyx_t_1 = 0;
61328 goto __pyx_L0;
61329
61330 /* "pysam/libcbcf.pyx":3046
61331 * self.header = dst_header
61332 *
61333 * @property # <<<<<<<<<<<<<<
61334 * def rid(self):
61335 * """internal reference id number"""
61336 */
61337
61338 /* function exit code */
61339 __pyx_L1_error:;
61340 __Pyx_XDECREF(__pyx_t_1);
61341 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.rid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
61342 __pyx_r = NULL;
61343 __pyx_L0:;
61344 __Pyx_XGIVEREF(__pyx_r);
61345 __Pyx_TraceReturn(__pyx_r, 0);
61346 __Pyx_RefNannyFinishContext();
61347 return __pyx_r;
61348 }
61349
61350 /* "pysam/libcbcf.pyx":3051
61351 * return self.ptr.rid
61352 *
61353 * @rid.setter # <<<<<<<<<<<<<<
61354 * def rid(self, value):
61355 * cdef bcf_hdr_t *hdr = self.header.ptr
61356 */
61357
61358 /* Python wrapper */
61359 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_3rid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
61360 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_3rid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
61361 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
61362 int __pyx_r;
61363 __Pyx_RefNannyDeclarations
61364 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
61365 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
61366 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_3rid_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
61367
61368 /* function exit code */
61369 __Pyx_RefNannyFinishContext();
61370 return __pyx_r;
61371 }
61372
61373 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_3rid_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
61374 bcf_hdr_t *__pyx_v_hdr;
61375 int __pyx_v_r;
61376 int __pyx_r;
61377 __Pyx_TraceDeclarations
61378 __Pyx_RefNannyDeclarations
61379 bcf_hdr_t *__pyx_t_1;
61380 int __pyx_t_2;
61381 int __pyx_t_3;
61382 int __pyx_t_4;
61383 PyObject *__pyx_t_5 = NULL;
61384 int __pyx_lineno = 0;
61385 const char *__pyx_filename = NULL;
61386 int __pyx_clineno = 0;
61387 __Pyx_RefNannySetupContext("__set__", 1);
61388 __Pyx_TraceCall("__set__", __pyx_f[0], 3051, 0, __PYX_ERR(0, 3051, __pyx_L1_error));
61389
61390 /* "pysam/libcbcf.pyx":3053
61391 * @rid.setter
61392 * def rid(self, value):
61393 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
61394 * cdef int r = value
61395 * if r < 0 or r >= hdr.n[BCF_DT_CTG] or not hdr.id[BCF_DT_CTG][r].val:
61396 */
61397 __pyx_t_1 = __pyx_v_self->header->ptr;
61398 __pyx_v_hdr = __pyx_t_1;
61399
61400 /* "pysam/libcbcf.pyx":3054
61401 * def rid(self, value):
61402 * cdef bcf_hdr_t *hdr = self.header.ptr
61403 * cdef int r = value # <<<<<<<<<<<<<<
61404 * if r < 0 or r >= hdr.n[BCF_DT_CTG] or not hdr.id[BCF_DT_CTG][r].val:
61405 * raise ValueError('invalid reference id')
61406 */
61407 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3054, __pyx_L1_error)
61408 __pyx_v_r = __pyx_t_2;
61409
61410 /* "pysam/libcbcf.pyx":3055
61411 * cdef bcf_hdr_t *hdr = self.header.ptr
61412 * cdef int r = value
61413 * if r < 0 or r >= hdr.n[BCF_DT_CTG] or not hdr.id[BCF_DT_CTG][r].val: # <<<<<<<<<<<<<<
61414 * raise ValueError('invalid reference id')
61415 * self.ptr.rid = r
61416 */
61417 __pyx_t_4 = (__pyx_v_r < 0);
61418 if (!__pyx_t_4) {
61419 } else {
61420 __pyx_t_3 = __pyx_t_4;
61421 goto __pyx_L4_bool_binop_done;
61422 }
61423 __pyx_t_4 = (__pyx_v_r >= (__pyx_v_hdr->n[BCF_DT_CTG]));
61424 if (!__pyx_t_4) {
61425 } else {
61426 __pyx_t_3 = __pyx_t_4;
61427 goto __pyx_L4_bool_binop_done;
61428 }
61429 __pyx_t_4 = (!(((__pyx_v_hdr->id[BCF_DT_CTG])[__pyx_v_r]).val != 0));
61430 __pyx_t_3 = __pyx_t_4;
61431 __pyx_L4_bool_binop_done:;
61432 if (unlikely(__pyx_t_3)) {
61433
61434 /* "pysam/libcbcf.pyx":3056
61435 * cdef int r = value
61436 * if r < 0 or r >= hdr.n[BCF_DT_CTG] or not hdr.id[BCF_DT_CTG][r].val:
61437 * raise ValueError('invalid reference id') # <<<<<<<<<<<<<<
61438 * self.ptr.rid = r
61439 *
61440 */
61441 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__165, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3056, __pyx_L1_error)
61442 __Pyx_GOTREF(__pyx_t_5);
61443 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
61444 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
61445 __PYX_ERR(0, 3056, __pyx_L1_error)
61446
61447 /* "pysam/libcbcf.pyx":3055
61448 * cdef bcf_hdr_t *hdr = self.header.ptr
61449 * cdef int r = value
61450 * if r < 0 or r >= hdr.n[BCF_DT_CTG] or not hdr.id[BCF_DT_CTG][r].val: # <<<<<<<<<<<<<<
61451 * raise ValueError('invalid reference id')
61452 * self.ptr.rid = r
61453 */
61454 }
61455
61456 /* "pysam/libcbcf.pyx":3057
61457 * if r < 0 or r >= hdr.n[BCF_DT_CTG] or not hdr.id[BCF_DT_CTG][r].val:
61458 * raise ValueError('invalid reference id')
61459 * self.ptr.rid = r # <<<<<<<<<<<<<<
61460 *
61461 * @property
61462 */
61463 __pyx_v_self->ptr->rid = __pyx_v_r;
61464
61465 /* "pysam/libcbcf.pyx":3051
61466 * return self.ptr.rid
61467 *
61468 * @rid.setter # <<<<<<<<<<<<<<
61469 * def rid(self, value):
61470 * cdef bcf_hdr_t *hdr = self.header.ptr
61471 */
61472
61473 /* function exit code */
61474 __pyx_r = 0;
61475 goto __pyx_L0;
61476 __pyx_L1_error:;
61477 __Pyx_XDECREF(__pyx_t_5);
61478 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.rid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
61479 __pyx_r = -1;
61480 __pyx_L0:;
61481 __Pyx_TraceReturn(Py_None, 0);
61482 __Pyx_RefNannyFinishContext();
61483 return __pyx_r;
61484 }
61485
61486 /* "pysam/libcbcf.pyx":3059
61487 * self.ptr.rid = r
61488 *
61489 * @property # <<<<<<<<<<<<<<
61490 * def chrom(self):
61491 * """chromosome/contig name"""
61492 */
61493
61494 /* Python wrapper */
61495 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_5chrom_1__get__(PyObject *__pyx_v_self); /*proto*/
61496 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_5chrom_1__get__(PyObject *__pyx_v_self) {
61497 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
61498 PyObject *__pyx_r = 0;
61499 __Pyx_RefNannyDeclarations
61500 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
61501 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
61502 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_5chrom___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
61503
61504 /* function exit code */
61505 __Pyx_RefNannyFinishContext();
61506 return __pyx_r;
61507 }
61508
61509 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_5chrom___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
61510 bcf_hdr_t *__pyx_v_hdr;
61511 int __pyx_v_rid;
61512 PyObject *__pyx_r = NULL;
61513 __Pyx_TraceDeclarations
61514 __Pyx_RefNannyDeclarations
61515 bcf_hdr_t *__pyx_t_1;
61516 int32_t __pyx_t_2;
61517 int __pyx_t_3;
61518 int __pyx_t_4;
61519 PyObject *__pyx_t_5 = NULL;
61520 int __pyx_lineno = 0;
61521 const char *__pyx_filename = NULL;
61522 int __pyx_clineno = 0;
61523 __Pyx_RefNannySetupContext("__get__", 1);
61524 __Pyx_TraceCall("__get__", __pyx_f[0], 3059, 0, __PYX_ERR(0, 3059, __pyx_L1_error));
61525
61526 /* "pysam/libcbcf.pyx":3062
61527 * def chrom(self):
61528 * """chromosome/contig name"""
61529 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
61530 * cdef int rid = self.ptr.rid
61531 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
61532 */
61533 __pyx_t_1 = __pyx_v_self->header->ptr;
61534 __pyx_v_hdr = __pyx_t_1;
61535
61536 /* "pysam/libcbcf.pyx":3063
61537 * """chromosome/contig name"""
61538 * cdef bcf_hdr_t *hdr = self.header.ptr
61539 * cdef int rid = self.ptr.rid # <<<<<<<<<<<<<<
61540 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
61541 * raise ValueError('Invalid header')
61542 */
61543 __pyx_t_2 = __pyx_v_self->ptr->rid;
61544 __pyx_v_rid = __pyx_t_2;
61545
61546 /* "pysam/libcbcf.pyx":3064
61547 * cdef bcf_hdr_t *hdr = self.header.ptr
61548 * cdef int rid = self.ptr.rid
61549 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
61550 * raise ValueError('Invalid header')
61551 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61552 */
61553 __pyx_t_4 = (__pyx_v_rid < 0);
61554 if (!__pyx_t_4) {
61555 } else {
61556 __pyx_t_3 = __pyx_t_4;
61557 goto __pyx_L4_bool_binop_done;
61558 }
61559 __pyx_t_4 = (__pyx_v_rid >= (__pyx_v_hdr->n[BCF_DT_CTG]));
61560 __pyx_t_3 = __pyx_t_4;
61561 __pyx_L4_bool_binop_done:;
61562 if (unlikely(__pyx_t_3)) {
61563
61564 /* "pysam/libcbcf.pyx":3065
61565 * cdef int rid = self.ptr.rid
61566 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
61567 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
61568 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61569 *
61570 */
61571 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3065, __pyx_L1_error)
61572 __Pyx_GOTREF(__pyx_t_5);
61573 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
61574 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
61575 __PYX_ERR(0, 3065, __pyx_L1_error)
61576
61577 /* "pysam/libcbcf.pyx":3064
61578 * cdef bcf_hdr_t *hdr = self.header.ptr
61579 * cdef int rid = self.ptr.rid
61580 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
61581 * raise ValueError('Invalid header')
61582 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61583 */
61584 }
61585
61586 /* "pysam/libcbcf.pyx":3066
61587 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
61588 * raise ValueError('Invalid header')
61589 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid)) # <<<<<<<<<<<<<<
61590 *
61591 * @chrom.setter
61592 */
61593 __Pyx_XDECREF(__pyx_r);
61594 __pyx_t_5 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(bcf_hdr_id2name(__pyx_v_hdr, __pyx_v_rid)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3066, __pyx_L1_error)
61595 __Pyx_GOTREF(__pyx_t_5);
61596 __pyx_r = __pyx_t_5;
61597 __pyx_t_5 = 0;
61598 goto __pyx_L0;
61599
61600 /* "pysam/libcbcf.pyx":3059
61601 * self.ptr.rid = r
61602 *
61603 * @property # <<<<<<<<<<<<<<
61604 * def chrom(self):
61605 * """chromosome/contig name"""
61606 */
61607
61608 /* function exit code */
61609 __pyx_L1_error:;
61610 __Pyx_XDECREF(__pyx_t_5);
61611 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.chrom.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
61612 __pyx_r = NULL;
61613 __pyx_L0:;
61614 __Pyx_XGIVEREF(__pyx_r);
61615 __Pyx_TraceReturn(__pyx_r, 0);
61616 __Pyx_RefNannyFinishContext();
61617 return __pyx_r;
61618 }
61619
61620 /* "pysam/libcbcf.pyx":3068
61621 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61622 *
61623 * @chrom.setter # <<<<<<<<<<<<<<
61624 * def chrom(self, value):
61625 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
61626 */
61627
61628 /* Python wrapper */
61629 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_5chrom_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
61630 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_5chrom_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
61631 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
61632 int __pyx_r;
61633 __Pyx_RefNannyDeclarations
61634 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
61635 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
61636 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_5chrom_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
61637
61638 /* function exit code */
61639 __Pyx_RefNannyFinishContext();
61640 return __pyx_r;
61641 }
61642
61643 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_5chrom_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
61644 vdict_t *__pyx_v_d;
61645 PyObject *__pyx_v_bchrom = NULL;
61646 khint_t __pyx_v_k;
61647 int __pyx_r;
61648 __Pyx_TraceDeclarations
61649 __Pyx_RefNannyDeclarations
61650 PyObject *__pyx_t_1 = NULL;
61651 char const *__pyx_t_2;
61652 int __pyx_t_3;
61653 int __pyx_t_4;
61654 int __pyx_lineno = 0;
61655 const char *__pyx_filename = NULL;
61656 int __pyx_clineno = 0;
61657 __Pyx_RefNannySetupContext("__set__", 1);
61658 __Pyx_TraceCall("__set__", __pyx_f[0], 3068, 0, __PYX_ERR(0, 3068, __pyx_L1_error));
61659
61660 /* "pysam/libcbcf.pyx":3070
61661 * @chrom.setter
61662 * def chrom(self, value):
61663 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG] # <<<<<<<<<<<<<<
61664 * bchrom = force_bytes(value)
61665 * cdef khint_t k = kh_get_vdict(d, bchrom)
61666 */
61667 __pyx_v_d = ((vdict_t *)(__pyx_v_self->header->ptr->dict[BCF_DT_CTG]));
61668
61669 /* "pysam/libcbcf.pyx":3071
61670 * def chrom(self, value):
61671 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
61672 * bchrom = force_bytes(value) # <<<<<<<<<<<<<<
61673 * cdef khint_t k = kh_get_vdict(d, bchrom)
61674 * if k == kh_end(d):
61675 */
61676 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_value, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3071, __pyx_L1_error)
61677 __Pyx_GOTREF(__pyx_t_1);
61678 __pyx_v_bchrom = ((PyObject*)__pyx_t_1);
61679 __pyx_t_1 = 0;
61680
61681 /* "pysam/libcbcf.pyx":3072
61682 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
61683 * bchrom = force_bytes(value)
61684 * cdef khint_t k = kh_get_vdict(d, bchrom) # <<<<<<<<<<<<<<
61685 * if k == kh_end(d):
61686 * raise ValueError('Invalid chromosome/contig')
61687 */
61688 if (unlikely(__pyx_v_bchrom == Py_None)) {
61689 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
61690 __PYX_ERR(0, 3072, __pyx_L1_error)
61691 }
61692 __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_bchrom); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3072, __pyx_L1_error)
61693 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_2);
61694
61695 /* "pysam/libcbcf.pyx":3073
61696 * bchrom = force_bytes(value)
61697 * cdef khint_t k = kh_get_vdict(d, bchrom)
61698 * if k == kh_end(d): # <<<<<<<<<<<<<<
61699 * raise ValueError('Invalid chromosome/contig')
61700 * self.ptr.rid = kh_val_vdict(d, k).id
61701 */
61702 __pyx_t_3 = (__pyx_v_k == kh_end(__pyx_v_d));
61703 if (unlikely(__pyx_t_3)) {
61704
61705 /* "pysam/libcbcf.pyx":3074
61706 * cdef khint_t k = kh_get_vdict(d, bchrom)
61707 * if k == kh_end(d):
61708 * raise ValueError('Invalid chromosome/contig') # <<<<<<<<<<<<<<
61709 * self.ptr.rid = kh_val_vdict(d, k).id
61710 *
61711 */
61712 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__166, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3074, __pyx_L1_error)
61713 __Pyx_GOTREF(__pyx_t_1);
61714 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
61715 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61716 __PYX_ERR(0, 3074, __pyx_L1_error)
61717
61718 /* "pysam/libcbcf.pyx":3073
61719 * bchrom = force_bytes(value)
61720 * cdef khint_t k = kh_get_vdict(d, bchrom)
61721 * if k == kh_end(d): # <<<<<<<<<<<<<<
61722 * raise ValueError('Invalid chromosome/contig')
61723 * self.ptr.rid = kh_val_vdict(d, k).id
61724 */
61725 }
61726
61727 /* "pysam/libcbcf.pyx":3075
61728 * if k == kh_end(d):
61729 * raise ValueError('Invalid chromosome/contig')
61730 * self.ptr.rid = kh_val_vdict(d, k).id # <<<<<<<<<<<<<<
61731 *
61732 * @property
61733 */
61734 __pyx_t_4 = kh_val(__pyx_v_d, __pyx_v_k).id;
61735 __pyx_v_self->ptr->rid = __pyx_t_4;
61736
61737 /* "pysam/libcbcf.pyx":3068
61738 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61739 *
61740 * @chrom.setter # <<<<<<<<<<<<<<
61741 * def chrom(self, value):
61742 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
61743 */
61744
61745 /* function exit code */
61746 __pyx_r = 0;
61747 goto __pyx_L0;
61748 __pyx_L1_error:;
61749 __Pyx_XDECREF(__pyx_t_1);
61750 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.chrom.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
61751 __pyx_r = -1;
61752 __pyx_L0:;
61753 __Pyx_XDECREF(__pyx_v_bchrom);
61754 __Pyx_TraceReturn(Py_None, 0);
61755 __Pyx_RefNannyFinishContext();
61756 return __pyx_r;
61757 }
61758
61759 /* "pysam/libcbcf.pyx":3077
61760 * self.ptr.rid = kh_val_vdict(d, k).id
61761 *
61762 * @property # <<<<<<<<<<<<<<
61763 * def contig(self):
61764 * """chromosome/contig name"""
61765 */
61766
61767 /* Python wrapper */
61768 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_6contig_1__get__(PyObject *__pyx_v_self); /*proto*/
61769 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_6contig_1__get__(PyObject *__pyx_v_self) {
61770 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
61771 PyObject *__pyx_r = 0;
61772 __Pyx_RefNannyDeclarations
61773 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
61774 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
61775 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_6contig___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
61776
61777 /* function exit code */
61778 __Pyx_RefNannyFinishContext();
61779 return __pyx_r;
61780 }
61781
61782 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6contig___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
61783 bcf_hdr_t *__pyx_v_hdr;
61784 int __pyx_v_rid;
61785 PyObject *__pyx_r = NULL;
61786 __Pyx_TraceDeclarations
61787 __Pyx_RefNannyDeclarations
61788 bcf_hdr_t *__pyx_t_1;
61789 int32_t __pyx_t_2;
61790 int __pyx_t_3;
61791 int __pyx_t_4;
61792 PyObject *__pyx_t_5 = NULL;
61793 int __pyx_lineno = 0;
61794 const char *__pyx_filename = NULL;
61795 int __pyx_clineno = 0;
61796 __Pyx_RefNannySetupContext("__get__", 1);
61797 __Pyx_TraceCall("__get__", __pyx_f[0], 3077, 0, __PYX_ERR(0, 3077, __pyx_L1_error));
61798
61799 /* "pysam/libcbcf.pyx":3080
61800 * def contig(self):
61801 * """chromosome/contig name"""
61802 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
61803 * cdef int rid = self.ptr.rid
61804 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
61805 */
61806 __pyx_t_1 = __pyx_v_self->header->ptr;
61807 __pyx_v_hdr = __pyx_t_1;
61808
61809 /* "pysam/libcbcf.pyx":3081
61810 * """chromosome/contig name"""
61811 * cdef bcf_hdr_t *hdr = self.header.ptr
61812 * cdef int rid = self.ptr.rid # <<<<<<<<<<<<<<
61813 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
61814 * raise ValueError('Invalid header')
61815 */
61816 __pyx_t_2 = __pyx_v_self->ptr->rid;
61817 __pyx_v_rid = __pyx_t_2;
61818
61819 /* "pysam/libcbcf.pyx":3082
61820 * cdef bcf_hdr_t *hdr = self.header.ptr
61821 * cdef int rid = self.ptr.rid
61822 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
61823 * raise ValueError('Invalid header')
61824 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61825 */
61826 __pyx_t_4 = (__pyx_v_rid < 0);
61827 if (!__pyx_t_4) {
61828 } else {
61829 __pyx_t_3 = __pyx_t_4;
61830 goto __pyx_L4_bool_binop_done;
61831 }
61832 __pyx_t_4 = (__pyx_v_rid >= (__pyx_v_hdr->n[BCF_DT_CTG]));
61833 __pyx_t_3 = __pyx_t_4;
61834 __pyx_L4_bool_binop_done:;
61835 if (unlikely(__pyx_t_3)) {
61836
61837 /* "pysam/libcbcf.pyx":3083
61838 * cdef int rid = self.ptr.rid
61839 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
61840 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
61841 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61842 *
61843 */
61844 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3083, __pyx_L1_error)
61845 __Pyx_GOTREF(__pyx_t_5);
61846 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
61847 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
61848 __PYX_ERR(0, 3083, __pyx_L1_error)
61849
61850 /* "pysam/libcbcf.pyx":3082
61851 * cdef bcf_hdr_t *hdr = self.header.ptr
61852 * cdef int rid = self.ptr.rid
61853 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
61854 * raise ValueError('Invalid header')
61855 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61856 */
61857 }
61858
61859 /* "pysam/libcbcf.pyx":3084
61860 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
61861 * raise ValueError('Invalid header')
61862 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid)) # <<<<<<<<<<<<<<
61863 *
61864 * @contig.setter
61865 */
61866 __Pyx_XDECREF(__pyx_r);
61867 __pyx_t_5 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(bcf_hdr_id2name(__pyx_v_hdr, __pyx_v_rid)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3084, __pyx_L1_error)
61868 __Pyx_GOTREF(__pyx_t_5);
61869 __pyx_r = __pyx_t_5;
61870 __pyx_t_5 = 0;
61871 goto __pyx_L0;
61872
61873 /* "pysam/libcbcf.pyx":3077
61874 * self.ptr.rid = kh_val_vdict(d, k).id
61875 *
61876 * @property # <<<<<<<<<<<<<<
61877 * def contig(self):
61878 * """chromosome/contig name"""
61879 */
61880
61881 /* function exit code */
61882 __pyx_L1_error:;
61883 __Pyx_XDECREF(__pyx_t_5);
61884 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.contig.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
61885 __pyx_r = NULL;
61886 __pyx_L0:;
61887 __Pyx_XGIVEREF(__pyx_r);
61888 __Pyx_TraceReturn(__pyx_r, 0);
61889 __Pyx_RefNannyFinishContext();
61890 return __pyx_r;
61891 }
61892
61893 /* "pysam/libcbcf.pyx":3086
61894 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
61895 *
61896 * @contig.setter # <<<<<<<<<<<<<<
61897 * def contig(self, value):
61898 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
61899 */
61900
61901 /* Python wrapper */
61902 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_6contig_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
61903 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_6contig_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
61904 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
61905 int __pyx_r;
61906 __Pyx_RefNannyDeclarations
61907 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
61908 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
61909 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_6contig_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
61910
61911 /* function exit code */
61912 __Pyx_RefNannyFinishContext();
61913 return __pyx_r;
61914 }
61915
61916 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_6contig_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
61917 vdict_t *__pyx_v_d;
61918 PyObject *__pyx_v_bchrom = NULL;
61919 khint_t __pyx_v_k;
61920 int __pyx_r;
61921 __Pyx_TraceDeclarations
61922 __Pyx_RefNannyDeclarations
61923 PyObject *__pyx_t_1 = NULL;
61924 char const *__pyx_t_2;
61925 int __pyx_t_3;
61926 int __pyx_t_4;
61927 int __pyx_lineno = 0;
61928 const char *__pyx_filename = NULL;
61929 int __pyx_clineno = 0;
61930 __Pyx_RefNannySetupContext("__set__", 1);
61931 __Pyx_TraceCall("__set__", __pyx_f[0], 3086, 0, __PYX_ERR(0, 3086, __pyx_L1_error));
61932
61933 /* "pysam/libcbcf.pyx":3088
61934 * @contig.setter
61935 * def contig(self, value):
61936 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG] # <<<<<<<<<<<<<<
61937 * bchrom = force_bytes(value)
61938 * cdef khint_t k = kh_get_vdict(d, bchrom)
61939 */
61940 __pyx_v_d = ((vdict_t *)(__pyx_v_self->header->ptr->dict[BCF_DT_CTG]));
61941
61942 /* "pysam/libcbcf.pyx":3089
61943 * def contig(self, value):
61944 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
61945 * bchrom = force_bytes(value) # <<<<<<<<<<<<<<
61946 * cdef khint_t k = kh_get_vdict(d, bchrom)
61947 * if k == kh_end(d):
61948 */
61949 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_value, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3089, __pyx_L1_error)
61950 __Pyx_GOTREF(__pyx_t_1);
61951 __pyx_v_bchrom = ((PyObject*)__pyx_t_1);
61952 __pyx_t_1 = 0;
61953
61954 /* "pysam/libcbcf.pyx":3090
61955 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
61956 * bchrom = force_bytes(value)
61957 * cdef khint_t k = kh_get_vdict(d, bchrom) # <<<<<<<<<<<<<<
61958 * if k == kh_end(d):
61959 * raise ValueError('Invalid chromosome/contig')
61960 */
61961 if (unlikely(__pyx_v_bchrom == Py_None)) {
61962 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
61963 __PYX_ERR(0, 3090, __pyx_L1_error)
61964 }
61965 __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_bchrom); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3090, __pyx_L1_error)
61966 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_2);
61967
61968 /* "pysam/libcbcf.pyx":3091
61969 * bchrom = force_bytes(value)
61970 * cdef khint_t k = kh_get_vdict(d, bchrom)
61971 * if k == kh_end(d): # <<<<<<<<<<<<<<
61972 * raise ValueError('Invalid chromosome/contig')
61973 * self.ptr.rid = kh_val_vdict(d, k).id
61974 */
61975 __pyx_t_3 = (__pyx_v_k == kh_end(__pyx_v_d));
61976 if (unlikely(__pyx_t_3)) {
61977
61978 /* "pysam/libcbcf.pyx":3092
61979 * cdef khint_t k = kh_get_vdict(d, bchrom)
61980 * if k == kh_end(d):
61981 * raise ValueError('Invalid chromosome/contig') # <<<<<<<<<<<<<<
61982 * self.ptr.rid = kh_val_vdict(d, k).id
61983 *
61984 */
61985 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__166, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3092, __pyx_L1_error)
61986 __Pyx_GOTREF(__pyx_t_1);
61987 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
61988 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61989 __PYX_ERR(0, 3092, __pyx_L1_error)
61990
61991 /* "pysam/libcbcf.pyx":3091
61992 * bchrom = force_bytes(value)
61993 * cdef khint_t k = kh_get_vdict(d, bchrom)
61994 * if k == kh_end(d): # <<<<<<<<<<<<<<
61995 * raise ValueError('Invalid chromosome/contig')
61996 * self.ptr.rid = kh_val_vdict(d, k).id
61997 */
61998 }
61999
62000 /* "pysam/libcbcf.pyx":3093
62001 * if k == kh_end(d):
62002 * raise ValueError('Invalid chromosome/contig')
62003 * self.ptr.rid = kh_val_vdict(d, k).id # <<<<<<<<<<<<<<
62004 *
62005 * @property
62006 */
62007 __pyx_t_4 = kh_val(__pyx_v_d, __pyx_v_k).id;
62008 __pyx_v_self->ptr->rid = __pyx_t_4;
62009
62010 /* "pysam/libcbcf.pyx":3086
62011 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
62012 *
62013 * @contig.setter # <<<<<<<<<<<<<<
62014 * def contig(self, value):
62015 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
62016 */
62017
62018 /* function exit code */
62019 __pyx_r = 0;
62020 goto __pyx_L0;
62021 __pyx_L1_error:;
62022 __Pyx_XDECREF(__pyx_t_1);
62023 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.contig.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62024 __pyx_r = -1;
62025 __pyx_L0:;
62026 __Pyx_XDECREF(__pyx_v_bchrom);
62027 __Pyx_TraceReturn(Py_None, 0);
62028 __Pyx_RefNannyFinishContext();
62029 return __pyx_r;
62030 }
62031
62032 /* "pysam/libcbcf.pyx":3095
62033 * self.ptr.rid = kh_val_vdict(d, k).id
62034 *
62035 * @property # <<<<<<<<<<<<<<
62036 * def pos(self):
62037 * """record start position on chrom/contig (1-based inclusive)"""
62038 */
62039
62040 /* Python wrapper */
62041 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
62042 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_3pos_1__get__(PyObject *__pyx_v_self) {
62043 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62044 PyObject *__pyx_r = 0;
62045 __Pyx_RefNannyDeclarations
62046 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
62047 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62048 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_3pos___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
62049
62050 /* function exit code */
62051 __Pyx_RefNannyFinishContext();
62052 return __pyx_r;
62053 }
62054
62055 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_3pos___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
62056 PyObject *__pyx_r = NULL;
62057 __Pyx_TraceDeclarations
62058 __Pyx_RefNannyDeclarations
62059 PyObject *__pyx_t_1 = NULL;
62060 int __pyx_lineno = 0;
62061 const char *__pyx_filename = NULL;
62062 int __pyx_clineno = 0;
62063 __Pyx_RefNannySetupContext("__get__", 1);
62064 __Pyx_TraceCall("__get__", __pyx_f[0], 3095, 0, __PYX_ERR(0, 3095, __pyx_L1_error));
62065
62066 /* "pysam/libcbcf.pyx":3098
62067 * def pos(self):
62068 * """record start position on chrom/contig (1-based inclusive)"""
62069 * return self.ptr.pos + 1 # <<<<<<<<<<<<<<
62070 *
62071 * @pos.setter
62072 */
62073 __Pyx_XDECREF(__pyx_r);
62074 __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_self->ptr->pos + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3098, __pyx_L1_error)
62075 __Pyx_GOTREF(__pyx_t_1);
62076 __pyx_r = __pyx_t_1;
62077 __pyx_t_1 = 0;
62078 goto __pyx_L0;
62079
62080 /* "pysam/libcbcf.pyx":3095
62081 * self.ptr.rid = kh_val_vdict(d, k).id
62082 *
62083 * @property # <<<<<<<<<<<<<<
62084 * def pos(self):
62085 * """record start position on chrom/contig (1-based inclusive)"""
62086 */
62087
62088 /* function exit code */
62089 __pyx_L1_error:;
62090 __Pyx_XDECREF(__pyx_t_1);
62091 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62092 __pyx_r = NULL;
62093 __pyx_L0:;
62094 __Pyx_XGIVEREF(__pyx_r);
62095 __Pyx_TraceReturn(__pyx_r, 0);
62096 __Pyx_RefNannyFinishContext();
62097 return __pyx_r;
62098 }
62099
62100 /* "pysam/libcbcf.pyx":3100
62101 * return self.ptr.pos + 1
62102 *
62103 * @pos.setter # <<<<<<<<<<<<<<
62104 * def pos(self, value):
62105 * cdef int p = value
62106 */
62107
62108 /* Python wrapper */
62109 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
62110 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
62111 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62112 int __pyx_r;
62113 __Pyx_RefNannyDeclarations
62114 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
62115 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62116 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_3pos_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
62117
62118 /* function exit code */
62119 __Pyx_RefNannyFinishContext();
62120 return __pyx_r;
62121 }
62122
62123 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_3pos_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
62124 int __pyx_v_p;
62125 int __pyx_r;
62126 __Pyx_TraceDeclarations
62127 __Pyx_RefNannyDeclarations
62128 int __pyx_t_1;
62129 int __pyx_t_2;
62130 PyObject *__pyx_t_3 = NULL;
62131 int __pyx_lineno = 0;
62132 const char *__pyx_filename = NULL;
62133 int __pyx_clineno = 0;
62134 __Pyx_RefNannySetupContext("__set__", 1);
62135 __Pyx_TraceCall("__set__", __pyx_f[0], 3100, 0, __PYX_ERR(0, 3100, __pyx_L1_error));
62136
62137 /* "pysam/libcbcf.pyx":3102
62138 * @pos.setter
62139 * def pos(self, value):
62140 * cdef int p = value # <<<<<<<<<<<<<<
62141 * if p < 1:
62142 * raise ValueError('Position must be positive')
62143 */
62144 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3102, __pyx_L1_error)
62145 __pyx_v_p = __pyx_t_1;
62146
62147 /* "pysam/libcbcf.pyx":3103
62148 * def pos(self, value):
62149 * cdef int p = value
62150 * if p < 1: # <<<<<<<<<<<<<<
62151 * raise ValueError('Position must be positive')
62152 * self.ptr.pos = p - 1
62153 */
62154 __pyx_t_2 = (__pyx_v_p < 1);
62155 if (unlikely(__pyx_t_2)) {
62156
62157 /* "pysam/libcbcf.pyx":3104
62158 * cdef int p = value
62159 * if p < 1:
62160 * raise ValueError('Position must be positive') # <<<<<<<<<<<<<<
62161 * self.ptr.pos = p - 1
62162 * bcf_sync_end(self)
62163 */
62164 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3104, __pyx_L1_error)
62165 __Pyx_GOTREF(__pyx_t_3);
62166 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
62167 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62168 __PYX_ERR(0, 3104, __pyx_L1_error)
62169
62170 /* "pysam/libcbcf.pyx":3103
62171 * def pos(self, value):
62172 * cdef int p = value
62173 * if p < 1: # <<<<<<<<<<<<<<
62174 * raise ValueError('Position must be positive')
62175 * self.ptr.pos = p - 1
62176 */
62177 }
62178
62179 /* "pysam/libcbcf.pyx":3105
62180 * if p < 1:
62181 * raise ValueError('Position must be positive')
62182 * self.ptr.pos = p - 1 # <<<<<<<<<<<<<<
62183 * bcf_sync_end(self)
62184 *
62185 */
62186 __pyx_v_self->ptr->pos = (__pyx_v_p - 1);
62187
62188 /* "pysam/libcbcf.pyx":3106
62189 * raise ValueError('Position must be positive')
62190 * self.ptr.pos = p - 1
62191 * bcf_sync_end(self) # <<<<<<<<<<<<<<
62192 *
62193 * @property
62194 */
62195 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_bcf_sync_end(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3106, __pyx_L1_error)
62196 __Pyx_GOTREF(__pyx_t_3);
62197 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62198
62199 /* "pysam/libcbcf.pyx":3100
62200 * return self.ptr.pos + 1
62201 *
62202 * @pos.setter # <<<<<<<<<<<<<<
62203 * def pos(self, value):
62204 * cdef int p = value
62205 */
62206
62207 /* function exit code */
62208 __pyx_r = 0;
62209 goto __pyx_L0;
62210 __pyx_L1_error:;
62211 __Pyx_XDECREF(__pyx_t_3);
62212 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62213 __pyx_r = -1;
62214 __pyx_L0:;
62215 __Pyx_TraceReturn(Py_None, 0);
62216 __Pyx_RefNannyFinishContext();
62217 return __pyx_r;
62218 }
62219
62220 /* "pysam/libcbcf.pyx":3108
62221 * bcf_sync_end(self)
62222 *
62223 * @property # <<<<<<<<<<<<<<
62224 * def start(self):
62225 * """record start position on chrom/contig (0-based inclusive)"""
62226 */
62227
62228 /* Python wrapper */
62229 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_5start_1__get__(PyObject *__pyx_v_self); /*proto*/
62230 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_5start_1__get__(PyObject *__pyx_v_self) {
62231 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62232 PyObject *__pyx_r = 0;
62233 __Pyx_RefNannyDeclarations
62234 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
62235 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62236 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_5start___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
62237
62238 /* function exit code */
62239 __Pyx_RefNannyFinishContext();
62240 return __pyx_r;
62241 }
62242
62243 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_5start___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
62244 PyObject *__pyx_r = NULL;
62245 __Pyx_TraceDeclarations
62246 __Pyx_RefNannyDeclarations
62247 PyObject *__pyx_t_1 = NULL;
62248 int __pyx_lineno = 0;
62249 const char *__pyx_filename = NULL;
62250 int __pyx_clineno = 0;
62251 __Pyx_RefNannySetupContext("__get__", 1);
62252 __Pyx_TraceCall("__get__", __pyx_f[0], 3108, 0, __PYX_ERR(0, 3108, __pyx_L1_error));
62253
62254 /* "pysam/libcbcf.pyx":3111
62255 * def start(self):
62256 * """record start position on chrom/contig (0-based inclusive)"""
62257 * return self.ptr.pos # <<<<<<<<<<<<<<
62258 *
62259 * @start.setter
62260 */
62261 __Pyx_XDECREF(__pyx_r);
62262 __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->ptr->pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3111, __pyx_L1_error)
62263 __Pyx_GOTREF(__pyx_t_1);
62264 __pyx_r = __pyx_t_1;
62265 __pyx_t_1 = 0;
62266 goto __pyx_L0;
62267
62268 /* "pysam/libcbcf.pyx":3108
62269 * bcf_sync_end(self)
62270 *
62271 * @property # <<<<<<<<<<<<<<
62272 * def start(self):
62273 * """record start position on chrom/contig (0-based inclusive)"""
62274 */
62275
62276 /* function exit code */
62277 __pyx_L1_error:;
62278 __Pyx_XDECREF(__pyx_t_1);
62279 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.start.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62280 __pyx_r = NULL;
62281 __pyx_L0:;
62282 __Pyx_XGIVEREF(__pyx_r);
62283 __Pyx_TraceReturn(__pyx_r, 0);
62284 __Pyx_RefNannyFinishContext();
62285 return __pyx_r;
62286 }
62287
62288 /* "pysam/libcbcf.pyx":3113
62289 * return self.ptr.pos
62290 *
62291 * @start.setter # <<<<<<<<<<<<<<
62292 * def start(self, value):
62293 * cdef int s = value
62294 */
62295
62296 /* Python wrapper */
62297 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_5start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
62298 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_5start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
62299 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62300 int __pyx_r;
62301 __Pyx_RefNannyDeclarations
62302 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
62303 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62304 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_5start_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
62305
62306 /* function exit code */
62307 __Pyx_RefNannyFinishContext();
62308 return __pyx_r;
62309 }
62310
62311 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_5start_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
62312 int __pyx_v_s;
62313 int __pyx_r;
62314 __Pyx_TraceDeclarations
62315 __Pyx_RefNannyDeclarations
62316 int __pyx_t_1;
62317 int __pyx_t_2;
62318 PyObject *__pyx_t_3 = NULL;
62319 int __pyx_lineno = 0;
62320 const char *__pyx_filename = NULL;
62321 int __pyx_clineno = 0;
62322 __Pyx_RefNannySetupContext("__set__", 1);
62323 __Pyx_TraceCall("__set__", __pyx_f[0], 3113, 0, __PYX_ERR(0, 3113, __pyx_L1_error));
62324
62325 /* "pysam/libcbcf.pyx":3115
62326 * @start.setter
62327 * def start(self, value):
62328 * cdef int s = value # <<<<<<<<<<<<<<
62329 * if s < 0:
62330 * raise ValueError('Start coordinate must be non-negative')
62331 */
62332 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3115, __pyx_L1_error)
62333 __pyx_v_s = __pyx_t_1;
62334
62335 /* "pysam/libcbcf.pyx":3116
62336 * def start(self, value):
62337 * cdef int s = value
62338 * if s < 0: # <<<<<<<<<<<<<<
62339 * raise ValueError('Start coordinate must be non-negative')
62340 * self.ptr.pos = s
62341 */
62342 __pyx_t_2 = (__pyx_v_s < 0);
62343 if (unlikely(__pyx_t_2)) {
62344
62345 /* "pysam/libcbcf.pyx":3117
62346 * cdef int s = value
62347 * if s < 0:
62348 * raise ValueError('Start coordinate must be non-negative') # <<<<<<<<<<<<<<
62349 * self.ptr.pos = s
62350 * bcf_sync_end(self)
62351 */
62352 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3117, __pyx_L1_error)
62353 __Pyx_GOTREF(__pyx_t_3);
62354 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
62355 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62356 __PYX_ERR(0, 3117, __pyx_L1_error)
62357
62358 /* "pysam/libcbcf.pyx":3116
62359 * def start(self, value):
62360 * cdef int s = value
62361 * if s < 0: # <<<<<<<<<<<<<<
62362 * raise ValueError('Start coordinate must be non-negative')
62363 * self.ptr.pos = s
62364 */
62365 }
62366
62367 /* "pysam/libcbcf.pyx":3118
62368 * if s < 0:
62369 * raise ValueError('Start coordinate must be non-negative')
62370 * self.ptr.pos = s # <<<<<<<<<<<<<<
62371 * bcf_sync_end(self)
62372 *
62373 */
62374 __pyx_v_self->ptr->pos = __pyx_v_s;
62375
62376 /* "pysam/libcbcf.pyx":3119
62377 * raise ValueError('Start coordinate must be non-negative')
62378 * self.ptr.pos = s
62379 * bcf_sync_end(self) # <<<<<<<<<<<<<<
62380 *
62381 * @property
62382 */
62383 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_bcf_sync_end(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3119, __pyx_L1_error)
62384 __Pyx_GOTREF(__pyx_t_3);
62385 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62386
62387 /* "pysam/libcbcf.pyx":3113
62388 * return self.ptr.pos
62389 *
62390 * @start.setter # <<<<<<<<<<<<<<
62391 * def start(self, value):
62392 * cdef int s = value
62393 */
62394
62395 /* function exit code */
62396 __pyx_r = 0;
62397 goto __pyx_L0;
62398 __pyx_L1_error:;
62399 __Pyx_XDECREF(__pyx_t_3);
62400 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.start.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62401 __pyx_r = -1;
62402 __pyx_L0:;
62403 __Pyx_TraceReturn(Py_None, 0);
62404 __Pyx_RefNannyFinishContext();
62405 return __pyx_r;
62406 }
62407
62408 /* "pysam/libcbcf.pyx":3121
62409 * bcf_sync_end(self)
62410 *
62411 * @property # <<<<<<<<<<<<<<
62412 * def stop(self):
62413 * """record stop position on chrom/contig (0-based exclusive)"""
62414 */
62415
62416 /* Python wrapper */
62417 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4stop_1__get__(PyObject *__pyx_v_self); /*proto*/
62418 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4stop_1__get__(PyObject *__pyx_v_self) {
62419 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62420 PyObject *__pyx_r = 0;
62421 __Pyx_RefNannyDeclarations
62422 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
62423 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62424 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4stop___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
62425
62426 /* function exit code */
62427 __Pyx_RefNannyFinishContext();
62428 return __pyx_r;
62429 }
62430
62431 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4stop___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
62432 PyObject *__pyx_r = NULL;
62433 __Pyx_TraceDeclarations
62434 __Pyx_RefNannyDeclarations
62435 PyObject *__pyx_t_1 = NULL;
62436 int __pyx_lineno = 0;
62437 const char *__pyx_filename = NULL;
62438 int __pyx_clineno = 0;
62439 __Pyx_RefNannySetupContext("__get__", 1);
62440 __Pyx_TraceCall("__get__", __pyx_f[0], 3121, 0, __PYX_ERR(0, 3121, __pyx_L1_error));
62441
62442 /* "pysam/libcbcf.pyx":3124
62443 * def stop(self):
62444 * """record stop position on chrom/contig (0-based exclusive)"""
62445 * return self.ptr.pos + self.ptr.rlen # <<<<<<<<<<<<<<
62446 *
62447 * @stop.setter
62448 */
62449 __Pyx_XDECREF(__pyx_r);
62450 __pyx_t_1 = __Pyx_PyInt_From_int32_t((__pyx_v_self->ptr->pos + __pyx_v_self->ptr->rlen)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3124, __pyx_L1_error)
62451 __Pyx_GOTREF(__pyx_t_1);
62452 __pyx_r = __pyx_t_1;
62453 __pyx_t_1 = 0;
62454 goto __pyx_L0;
62455
62456 /* "pysam/libcbcf.pyx":3121
62457 * bcf_sync_end(self)
62458 *
62459 * @property # <<<<<<<<<<<<<<
62460 * def stop(self):
62461 * """record stop position on chrom/contig (0-based exclusive)"""
62462 */
62463
62464 /* function exit code */
62465 __pyx_L1_error:;
62466 __Pyx_XDECREF(__pyx_t_1);
62467 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.stop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62468 __pyx_r = NULL;
62469 __pyx_L0:;
62470 __Pyx_XGIVEREF(__pyx_r);
62471 __Pyx_TraceReturn(__pyx_r, 0);
62472 __Pyx_RefNannyFinishContext();
62473 return __pyx_r;
62474 }
62475
62476 /* "pysam/libcbcf.pyx":3126
62477 * return self.ptr.pos + self.ptr.rlen
62478 *
62479 * @stop.setter # <<<<<<<<<<<<<<
62480 * def stop(self, value):
62481 * cdef int s = value
62482 */
62483
62484 /* Python wrapper */
62485 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_4stop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
62486 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_4stop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
62487 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62488 int __pyx_r;
62489 __Pyx_RefNannyDeclarations
62490 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
62491 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62492 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4stop_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
62493
62494 /* function exit code */
62495 __Pyx_RefNannyFinishContext();
62496 return __pyx_r;
62497 }
62498
62499 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_4stop_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
62500 int __pyx_v_s;
62501 int __pyx_r;
62502 __Pyx_TraceDeclarations
62503 __Pyx_RefNannyDeclarations
62504 int __pyx_t_1;
62505 int __pyx_t_2;
62506 PyObject *__pyx_t_3 = NULL;
62507 int __pyx_lineno = 0;
62508 const char *__pyx_filename = NULL;
62509 int __pyx_clineno = 0;
62510 __Pyx_RefNannySetupContext("__set__", 1);
62511 __Pyx_TraceCall("__set__", __pyx_f[0], 3126, 0, __PYX_ERR(0, 3126, __pyx_L1_error));
62512
62513 /* "pysam/libcbcf.pyx":3128
62514 * @stop.setter
62515 * def stop(self, value):
62516 * cdef int s = value # <<<<<<<<<<<<<<
62517 * if s < 0:
62518 * raise ValueError('Stop coordinate must be non-negative')
62519 */
62520 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3128, __pyx_L1_error)
62521 __pyx_v_s = __pyx_t_1;
62522
62523 /* "pysam/libcbcf.pyx":3129
62524 * def stop(self, value):
62525 * cdef int s = value
62526 * if s < 0: # <<<<<<<<<<<<<<
62527 * raise ValueError('Stop coordinate must be non-negative')
62528 * self.ptr.rlen = s - self.ptr.pos
62529 */
62530 __pyx_t_2 = (__pyx_v_s < 0);
62531 if (unlikely(__pyx_t_2)) {
62532
62533 /* "pysam/libcbcf.pyx":3130
62534 * cdef int s = value
62535 * if s < 0:
62536 * raise ValueError('Stop coordinate must be non-negative') # <<<<<<<<<<<<<<
62537 * self.ptr.rlen = s - self.ptr.pos
62538 * bcf_sync_end(self)
62539 */
62540 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__169, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3130, __pyx_L1_error)
62541 __Pyx_GOTREF(__pyx_t_3);
62542 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
62543 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62544 __PYX_ERR(0, 3130, __pyx_L1_error)
62545
62546 /* "pysam/libcbcf.pyx":3129
62547 * def stop(self, value):
62548 * cdef int s = value
62549 * if s < 0: # <<<<<<<<<<<<<<
62550 * raise ValueError('Stop coordinate must be non-negative')
62551 * self.ptr.rlen = s - self.ptr.pos
62552 */
62553 }
62554
62555 /* "pysam/libcbcf.pyx":3131
62556 * if s < 0:
62557 * raise ValueError('Stop coordinate must be non-negative')
62558 * self.ptr.rlen = s - self.ptr.pos # <<<<<<<<<<<<<<
62559 * bcf_sync_end(self)
62560 *
62561 */
62562 __pyx_v_self->ptr->rlen = (__pyx_v_s - __pyx_v_self->ptr->pos);
62563
62564 /* "pysam/libcbcf.pyx":3132
62565 * raise ValueError('Stop coordinate must be non-negative')
62566 * self.ptr.rlen = s - self.ptr.pos
62567 * bcf_sync_end(self) # <<<<<<<<<<<<<<
62568 *
62569 * @property
62570 */
62571 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_bcf_sync_end(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3132, __pyx_L1_error)
62572 __Pyx_GOTREF(__pyx_t_3);
62573 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62574
62575 /* "pysam/libcbcf.pyx":3126
62576 * return self.ptr.pos + self.ptr.rlen
62577 *
62578 * @stop.setter # <<<<<<<<<<<<<<
62579 * def stop(self, value):
62580 * cdef int s = value
62581 */
62582
62583 /* function exit code */
62584 __pyx_r = 0;
62585 goto __pyx_L0;
62586 __pyx_L1_error:;
62587 __Pyx_XDECREF(__pyx_t_3);
62588 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.stop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62589 __pyx_r = -1;
62590 __pyx_L0:;
62591 __Pyx_TraceReturn(Py_None, 0);
62592 __Pyx_RefNannyFinishContext();
62593 return __pyx_r;
62594 }
62595
62596 /* "pysam/libcbcf.pyx":3134
62597 * bcf_sync_end(self)
62598 *
62599 * @property # <<<<<<<<<<<<<<
62600 * def rlen(self):
62601 * """record length on chrom/contig (aka rec.stop - rec.start)"""
62602 */
62603
62604 /* Python wrapper */
62605 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4rlen_1__get__(PyObject *__pyx_v_self); /*proto*/
62606 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4rlen_1__get__(PyObject *__pyx_v_self) {
62607 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62608 PyObject *__pyx_r = 0;
62609 __Pyx_RefNannyDeclarations
62610 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
62611 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62612 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4rlen___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
62613
62614 /* function exit code */
62615 __Pyx_RefNannyFinishContext();
62616 return __pyx_r;
62617 }
62618
62619 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4rlen___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
62620 PyObject *__pyx_r = NULL;
62621 __Pyx_TraceDeclarations
62622 __Pyx_RefNannyDeclarations
62623 PyObject *__pyx_t_1 = NULL;
62624 int __pyx_lineno = 0;
62625 const char *__pyx_filename = NULL;
62626 int __pyx_clineno = 0;
62627 __Pyx_RefNannySetupContext("__get__", 1);
62628 __Pyx_TraceCall("__get__", __pyx_f[0], 3134, 0, __PYX_ERR(0, 3134, __pyx_L1_error));
62629
62630 /* "pysam/libcbcf.pyx":3137
62631 * def rlen(self):
62632 * """record length on chrom/contig (aka rec.stop - rec.start)"""
62633 * return self.ptr.rlen # <<<<<<<<<<<<<<
62634 *
62635 * @rlen.setter
62636 */
62637 __Pyx_XDECREF(__pyx_r);
62638 __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->ptr->rlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3137, __pyx_L1_error)
62639 __Pyx_GOTREF(__pyx_t_1);
62640 __pyx_r = __pyx_t_1;
62641 __pyx_t_1 = 0;
62642 goto __pyx_L0;
62643
62644 /* "pysam/libcbcf.pyx":3134
62645 * bcf_sync_end(self)
62646 *
62647 * @property # <<<<<<<<<<<<<<
62648 * def rlen(self):
62649 * """record length on chrom/contig (aka rec.stop - rec.start)"""
62650 */
62651
62652 /* function exit code */
62653 __pyx_L1_error:;
62654 __Pyx_XDECREF(__pyx_t_1);
62655 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.rlen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62656 __pyx_r = NULL;
62657 __pyx_L0:;
62658 __Pyx_XGIVEREF(__pyx_r);
62659 __Pyx_TraceReturn(__pyx_r, 0);
62660 __Pyx_RefNannyFinishContext();
62661 return __pyx_r;
62662 }
62663
62664 /* "pysam/libcbcf.pyx":3139
62665 * return self.ptr.rlen
62666 *
62667 * @rlen.setter # <<<<<<<<<<<<<<
62668 * def rlen(self, value):
62669 * cdef int r = value
62670 */
62671
62672 /* Python wrapper */
62673 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_4rlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
62674 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_4rlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
62675 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62676 int __pyx_r;
62677 __Pyx_RefNannyDeclarations
62678 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
62679 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62680 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4rlen_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
62681
62682 /* function exit code */
62683 __Pyx_RefNannyFinishContext();
62684 return __pyx_r;
62685 }
62686
62687 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_4rlen_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
62688 int __pyx_v_r;
62689 int __pyx_r;
62690 __Pyx_TraceDeclarations
62691 __Pyx_RefNannyDeclarations
62692 int __pyx_t_1;
62693 PyObject *__pyx_t_2 = NULL;
62694 int __pyx_lineno = 0;
62695 const char *__pyx_filename = NULL;
62696 int __pyx_clineno = 0;
62697 __Pyx_RefNannySetupContext("__set__", 1);
62698 __Pyx_TraceCall("__set__", __pyx_f[0], 3139, 0, __PYX_ERR(0, 3139, __pyx_L1_error));
62699
62700 /* "pysam/libcbcf.pyx":3141
62701 * @rlen.setter
62702 * def rlen(self, value):
62703 * cdef int r = value # <<<<<<<<<<<<<<
62704 * self.ptr.rlen = r
62705 * bcf_sync_end(self)
62706 */
62707 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3141, __pyx_L1_error)
62708 __pyx_v_r = __pyx_t_1;
62709
62710 /* "pysam/libcbcf.pyx":3142
62711 * def rlen(self, value):
62712 * cdef int r = value
62713 * self.ptr.rlen = r # <<<<<<<<<<<<<<
62714 * bcf_sync_end(self)
62715 *
62716 */
62717 __pyx_v_self->ptr->rlen = __pyx_v_r;
62718
62719 /* "pysam/libcbcf.pyx":3143
62720 * cdef int r = value
62721 * self.ptr.rlen = r
62722 * bcf_sync_end(self) # <<<<<<<<<<<<<<
62723 *
62724 * @property
62725 */
62726 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_sync_end(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3143, __pyx_L1_error)
62727 __Pyx_GOTREF(__pyx_t_2);
62728 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62729
62730 /* "pysam/libcbcf.pyx":3139
62731 * return self.ptr.rlen
62732 *
62733 * @rlen.setter # <<<<<<<<<<<<<<
62734 * def rlen(self, value):
62735 * cdef int r = value
62736 */
62737
62738 /* function exit code */
62739 __pyx_r = 0;
62740 goto __pyx_L0;
62741 __pyx_L1_error:;
62742 __Pyx_XDECREF(__pyx_t_2);
62743 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.rlen.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62744 __pyx_r = -1;
62745 __pyx_L0:;
62746 __Pyx_TraceReturn(Py_None, 0);
62747 __Pyx_RefNannyFinishContext();
62748 return __pyx_r;
62749 }
62750
62751 /* "pysam/libcbcf.pyx":3145
62752 * bcf_sync_end(self)
62753 *
62754 * @property # <<<<<<<<<<<<<<
62755 * def qual(self):
62756 * """phred scaled quality score or None if not available"""
62757 */
62758
62759 /* Python wrapper */
62760 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4qual_1__get__(PyObject *__pyx_v_self); /*proto*/
62761 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4qual_1__get__(PyObject *__pyx_v_self) {
62762 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62763 PyObject *__pyx_r = 0;
62764 __Pyx_RefNannyDeclarations
62765 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
62766 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62767 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4qual___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
62768
62769 /* function exit code */
62770 __Pyx_RefNannyFinishContext();
62771 return __pyx_r;
62772 }
62773
62774 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4qual___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
62775 PyObject *__pyx_r = NULL;
62776 __Pyx_TraceDeclarations
62777 __Pyx_RefNannyDeclarations
62778 PyObject *__pyx_t_1 = NULL;
62779 int __pyx_t_2;
62780 PyObject *__pyx_t_3 = NULL;
62781 int __pyx_lineno = 0;
62782 const char *__pyx_filename = NULL;
62783 int __pyx_clineno = 0;
62784 __Pyx_RefNannySetupContext("__get__", 1);
62785 __Pyx_TraceCall("__get__", __pyx_f[0], 3145, 0, __PYX_ERR(0, 3145, __pyx_L1_error));
62786
62787 /* "pysam/libcbcf.pyx":3148
62788 * def qual(self):
62789 * """phred scaled quality score or None if not available"""
62790 * return self.ptr.qual if not bcf_float_is_missing(self.ptr.qual) else None # <<<<<<<<<<<<<<
62791 *
62792 * @qual.setter
62793 */
62794 __Pyx_XDECREF(__pyx_r);
62795 __pyx_t_2 = (!(bcf_float_is_missing(__pyx_v_self->ptr->qual) != 0));
62796 if (__pyx_t_2) {
62797 __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->ptr->qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3148, __pyx_L1_error)
62798 __Pyx_GOTREF(__pyx_t_3);
62799 __pyx_t_1 = __pyx_t_3;
62800 __pyx_t_3 = 0;
62801 } else {
62802 __Pyx_INCREF(Py_None);
62803 __pyx_t_1 = Py_None;
62804 }
62805 __pyx_r = __pyx_t_1;
62806 __pyx_t_1 = 0;
62807 goto __pyx_L0;
62808
62809 /* "pysam/libcbcf.pyx":3145
62810 * bcf_sync_end(self)
62811 *
62812 * @property # <<<<<<<<<<<<<<
62813 * def qual(self):
62814 * """phred scaled quality score or None if not available"""
62815 */
62816
62817 /* function exit code */
62818 __pyx_L1_error:;
62819 __Pyx_XDECREF(__pyx_t_1);
62820 __Pyx_XDECREF(__pyx_t_3);
62821 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.qual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62822 __pyx_r = NULL;
62823 __pyx_L0:;
62824 __Pyx_XGIVEREF(__pyx_r);
62825 __Pyx_TraceReturn(__pyx_r, 0);
62826 __Pyx_RefNannyFinishContext();
62827 return __pyx_r;
62828 }
62829
62830 /* "pysam/libcbcf.pyx":3150
62831 * return self.ptr.qual if not bcf_float_is_missing(self.ptr.qual) else None
62832 *
62833 * @qual.setter # <<<<<<<<<<<<<<
62834 * def qual(self, value):
62835 * if value is not None:
62836 */
62837
62838 /* Python wrapper */
62839 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_4qual_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
62840 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_4qual_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
62841 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62842 int __pyx_r;
62843 __Pyx_RefNannyDeclarations
62844 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
62845 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62846 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4qual_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
62847
62848 /* function exit code */
62849 __Pyx_RefNannyFinishContext();
62850 return __pyx_r;
62851 }
62852
62853 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_4qual_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
62854 int __pyx_r;
62855 __Pyx_TraceDeclarations
62856 int __pyx_t_1;
62857 float __pyx_t_2;
62858 int __pyx_lineno = 0;
62859 const char *__pyx_filename = NULL;
62860 int __pyx_clineno = 0;
62861 __Pyx_TraceCall("__set__", __pyx_f[0], 3150, 0, __PYX_ERR(0, 3150, __pyx_L1_error));
62862
62863 /* "pysam/libcbcf.pyx":3152
62864 * @qual.setter
62865 * def qual(self, value):
62866 * if value is not None: # <<<<<<<<<<<<<<
62867 * self.ptr.qual = value
62868 * else:
62869 */
62870 __pyx_t_1 = (__pyx_v_value != Py_None);
62871 if (__pyx_t_1) {
62872
62873 /* "pysam/libcbcf.pyx":3153
62874 * def qual(self, value):
62875 * if value is not None:
62876 * self.ptr.qual = value # <<<<<<<<<<<<<<
62877 * else:
62878 * bcf_float_set(&self.ptr.qual, bcf_float_missing)
62879 */
62880 __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3153, __pyx_L1_error)
62881 __pyx_v_self->ptr->qual = __pyx_t_2;
62882
62883 /* "pysam/libcbcf.pyx":3152
62884 * @qual.setter
62885 * def qual(self, value):
62886 * if value is not None: # <<<<<<<<<<<<<<
62887 * self.ptr.qual = value
62888 * else:
62889 */
62890 goto __pyx_L3;
62891 }
62892
62893 /* "pysam/libcbcf.pyx":3155
62894 * self.ptr.qual = value
62895 * else:
62896 * bcf_float_set(&self.ptr.qual, bcf_float_missing) # <<<<<<<<<<<<<<
62897 *
62898 *
62899 */
62900 /*else*/ {
62901 bcf_float_set((&__pyx_v_self->ptr->qual), bcf_float_missing);
62902 }
62903 __pyx_L3:;
62904
62905 /* "pysam/libcbcf.pyx":3150
62906 * return self.ptr.qual if not bcf_float_is_missing(self.ptr.qual) else None
62907 *
62908 * @qual.setter # <<<<<<<<<<<<<<
62909 * def qual(self, value):
62910 * if value is not None:
62911 */
62912
62913 /* function exit code */
62914 __pyx_r = 0;
62915 goto __pyx_L0;
62916 __pyx_L1_error:;
62917 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.qual.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
62918 __pyx_r = -1;
62919 __pyx_L0:;
62920 __Pyx_TraceReturn(Py_None, 0);
62921 return __pyx_r;
62922 }
62923
62924 /* "pysam/libcbcf.pyx":3166
62925 * # return self.ptr.n_sample
62926 *
62927 * @property # <<<<<<<<<<<<<<
62928 * def id(self):
62929 * """record identifier or None if not available"""
62930 */
62931
62932 /* Python wrapper */
62933 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
62934 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_2id_1__get__(PyObject *__pyx_v_self) {
62935 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
62936 PyObject *__pyx_r = 0;
62937 __Pyx_RefNannyDeclarations
62938 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
62939 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
62940 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_2id___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
62941
62942 /* function exit code */
62943 __Pyx_RefNannyFinishContext();
62944 return __pyx_r;
62945 }
62946
62947 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_2id___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
62948 bcf1_t *__pyx_v_r;
62949 PyObject *__pyx_r = NULL;
62950 __Pyx_TraceDeclarations
62951 __Pyx_RefNannyDeclarations
62952 bcf1_t *__pyx_t_1;
62953 int __pyx_t_2;
62954 PyObject *__pyx_t_3 = NULL;
62955 PyObject *__pyx_t_4 = NULL;
62956 int __pyx_lineno = 0;
62957 const char *__pyx_filename = NULL;
62958 int __pyx_clineno = 0;
62959 __Pyx_RefNannySetupContext("__get__", 1);
62960 __Pyx_TraceCall("__get__", __pyx_f[0], 3166, 0, __PYX_ERR(0, 3166, __pyx_L1_error));
62961
62962 /* "pysam/libcbcf.pyx":3169
62963 * def id(self):
62964 * """record identifier or None if not available"""
62965 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
62966 * if bcf_unpack(r, BCF_UN_STR) < 0:
62967 * raise ValueError('Error unpacking VariantRecord')
62968 */
62969 __pyx_t_1 = __pyx_v_self->ptr;
62970 __pyx_v_r = __pyx_t_1;
62971
62972 /* "pysam/libcbcf.pyx":3170
62973 * """record identifier or None if not available"""
62974 * cdef bcf1_t *r = self.ptr
62975 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
62976 * raise ValueError('Error unpacking VariantRecord')
62977 * # causes a memory leak https://github.com/pysam-developers/pysam/issues/773
62978 */
62979 __pyx_t_2 = (bcf_unpack(__pyx_v_r, BCF_UN_STR) < 0);
62980 if (unlikely(__pyx_t_2)) {
62981
62982 /* "pysam/libcbcf.pyx":3171
62983 * cdef bcf1_t *r = self.ptr
62984 * if bcf_unpack(r, BCF_UN_STR) < 0:
62985 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
62986 * # causes a memory leak https://github.com/pysam-developers/pysam/issues/773
62987 * # return bcf_str_cache_get_charptr(r.d.id) if r.d.id != b'.' else None
62988 */
62989 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L1_error)
62990 __Pyx_GOTREF(__pyx_t_3);
62991 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
62992 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62993 __PYX_ERR(0, 3171, __pyx_L1_error)
62994
62995 /* "pysam/libcbcf.pyx":3170
62996 * """record identifier or None if not available"""
62997 * cdef bcf1_t *r = self.ptr
62998 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
62999 * raise ValueError('Error unpacking VariantRecord')
63000 * # causes a memory leak https://github.com/pysam-developers/pysam/issues/773
63001 */
63002 }
63003
63004 /* "pysam/libcbcf.pyx":3174
63005 * # causes a memory leak https://github.com/pysam-developers/pysam/issues/773
63006 * # return bcf_str_cache_get_charptr(r.d.id) if r.d.id != b'.' else None
63007 * if (r.d.m_id == 0): # <<<<<<<<<<<<<<
63008 * raise ValueError('Error extracting ID')
63009 * return charptr_to_str(r.d.id) if r.d.id != b'.' else None
63010 */
63011 __pyx_t_2 = (__pyx_v_r->d.m_id == 0);
63012 if (unlikely(__pyx_t_2)) {
63013
63014 /* "pysam/libcbcf.pyx":3175
63015 * # return bcf_str_cache_get_charptr(r.d.id) if r.d.id != b'.' else None
63016 * if (r.d.m_id == 0):
63017 * raise ValueError('Error extracting ID') # <<<<<<<<<<<<<<
63018 * return charptr_to_str(r.d.id) if r.d.id != b'.' else None
63019 *
63020 */
63021 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__170, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3175, __pyx_L1_error)
63022 __Pyx_GOTREF(__pyx_t_3);
63023 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
63024 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63025 __PYX_ERR(0, 3175, __pyx_L1_error)
63026
63027 /* "pysam/libcbcf.pyx":3174
63028 * # causes a memory leak https://github.com/pysam-developers/pysam/issues/773
63029 * # return bcf_str_cache_get_charptr(r.d.id) if r.d.id != b'.' else None
63030 * if (r.d.m_id == 0): # <<<<<<<<<<<<<<
63031 * raise ValueError('Error extracting ID')
63032 * return charptr_to_str(r.d.id) if r.d.id != b'.' else None
63033 */
63034 }
63035
63036 /* "pysam/libcbcf.pyx":3176
63037 * if (r.d.m_id == 0):
63038 * raise ValueError('Error extracting ID')
63039 * return charptr_to_str(r.d.id) if r.d.id != b'.' else None # <<<<<<<<<<<<<<
63040 *
63041 * @id.setter
63042 */
63043 __Pyx_XDECREF(__pyx_r);
63044 __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_r->d.id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3176, __pyx_L1_error)
63045 __Pyx_GOTREF(__pyx_t_4);
63046 __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_t_4, __pyx_kp_b__52, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 3176, __pyx_L1_error)
63047 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63048 if (__pyx_t_2) {
63049 __pyx_t_4 = __pyx_f_5pysam_9libcutils_charptr_to_str(__pyx_v_r->d.id, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3176, __pyx_L1_error)
63050 __Pyx_GOTREF(__pyx_t_4);
63051 __pyx_t_3 = __pyx_t_4;
63052 __pyx_t_4 = 0;
63053 } else {
63054 __Pyx_INCREF(Py_None);
63055 __pyx_t_3 = Py_None;
63056 }
63057 __pyx_r = __pyx_t_3;
63058 __pyx_t_3 = 0;
63059 goto __pyx_L0;
63060
63061 /* "pysam/libcbcf.pyx":3166
63062 * # return self.ptr.n_sample
63063 *
63064 * @property # <<<<<<<<<<<<<<
63065 * def id(self):
63066 * """record identifier or None if not available"""
63067 */
63068
63069 /* function exit code */
63070 __pyx_L1_error:;
63071 __Pyx_XDECREF(__pyx_t_3);
63072 __Pyx_XDECREF(__pyx_t_4);
63073 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
63074 __pyx_r = NULL;
63075 __pyx_L0:;
63076 __Pyx_XGIVEREF(__pyx_r);
63077 __Pyx_TraceReturn(__pyx_r, 0);
63078 __Pyx_RefNannyFinishContext();
63079 return __pyx_r;
63080 }
63081
63082 /* "pysam/libcbcf.pyx":3178
63083 * return charptr_to_str(r.d.id) if r.d.id != b'.' else None
63084 *
63085 * @id.setter # <<<<<<<<<<<<<<
63086 * def id(self, value):
63087 * cdef bcf1_t *r = self.ptr
63088 */
63089
63090 /* Python wrapper */
63091 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
63092 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
63093 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
63094 int __pyx_r;
63095 __Pyx_RefNannyDeclarations
63096 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
63097 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
63098 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_2id_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
63099
63100 /* function exit code */
63101 __Pyx_RefNannyFinishContext();
63102 return __pyx_r;
63103 }
63104
63105 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_2id_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
63106 bcf1_t *__pyx_v_r;
63107 char *__pyx_v_idstr;
63108 PyObject *__pyx_v_bid = NULL;
63109 int __pyx_r;
63110 __Pyx_TraceDeclarations
63111 __Pyx_RefNannyDeclarations
63112 bcf1_t *__pyx_t_1;
63113 int __pyx_t_2;
63114 PyObject *__pyx_t_3 = NULL;
63115 char *__pyx_t_4;
63116 int __pyx_lineno = 0;
63117 const char *__pyx_filename = NULL;
63118 int __pyx_clineno = 0;
63119 __Pyx_RefNannySetupContext("__set__", 1);
63120 __Pyx_TraceCall("__set__", __pyx_f[0], 3178, 0, __PYX_ERR(0, 3178, __pyx_L1_error));
63121
63122 /* "pysam/libcbcf.pyx":3180
63123 * @id.setter
63124 * def id(self, value):
63125 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
63126 * if bcf_unpack(r, BCF_UN_STR) < 0:
63127 * raise ValueError('Error unpacking VariantRecord')
63128 */
63129 __pyx_t_1 = __pyx_v_self->ptr;
63130 __pyx_v_r = __pyx_t_1;
63131
63132 /* "pysam/libcbcf.pyx":3181
63133 * def id(self, value):
63134 * cdef bcf1_t *r = self.ptr
63135 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63136 * raise ValueError('Error unpacking VariantRecord')
63137 * cdef char *idstr = NULL
63138 */
63139 __pyx_t_2 = (bcf_unpack(__pyx_v_r, BCF_UN_STR) < 0);
63140 if (unlikely(__pyx_t_2)) {
63141
63142 /* "pysam/libcbcf.pyx":3182
63143 * cdef bcf1_t *r = self.ptr
63144 * if bcf_unpack(r, BCF_UN_STR) < 0:
63145 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
63146 * cdef char *idstr = NULL
63147 * if value is not None:
63148 */
63149 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error)
63150 __Pyx_GOTREF(__pyx_t_3);
63151 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
63152 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63153 __PYX_ERR(0, 3182, __pyx_L1_error)
63154
63155 /* "pysam/libcbcf.pyx":3181
63156 * def id(self, value):
63157 * cdef bcf1_t *r = self.ptr
63158 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63159 * raise ValueError('Error unpacking VariantRecord')
63160 * cdef char *idstr = NULL
63161 */
63162 }
63163
63164 /* "pysam/libcbcf.pyx":3183
63165 * if bcf_unpack(r, BCF_UN_STR) < 0:
63166 * raise ValueError('Error unpacking VariantRecord')
63167 * cdef char *idstr = NULL # <<<<<<<<<<<<<<
63168 * if value is not None:
63169 * bid = force_bytes(value)
63170 */
63171 __pyx_v_idstr = NULL;
63172
63173 /* "pysam/libcbcf.pyx":3184
63174 * raise ValueError('Error unpacking VariantRecord')
63175 * cdef char *idstr = NULL
63176 * if value is not None: # <<<<<<<<<<<<<<
63177 * bid = force_bytes(value)
63178 * idstr = bid
63179 */
63180 __pyx_t_2 = (__pyx_v_value != Py_None);
63181 if (__pyx_t_2) {
63182
63183 /* "pysam/libcbcf.pyx":3185
63184 * cdef char *idstr = NULL
63185 * if value is not None:
63186 * bid = force_bytes(value) # <<<<<<<<<<<<<<
63187 * idstr = bid
63188 * if bcf_update_id(self.header.ptr, self.ptr, idstr) < 0:
63189 */
63190 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_value, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3185, __pyx_L1_error)
63191 __Pyx_GOTREF(__pyx_t_3);
63192 __pyx_v_bid = ((PyObject*)__pyx_t_3);
63193 __pyx_t_3 = 0;
63194
63195 /* "pysam/libcbcf.pyx":3186
63196 * if value is not None:
63197 * bid = force_bytes(value)
63198 * idstr = bid # <<<<<<<<<<<<<<
63199 * if bcf_update_id(self.header.ptr, self.ptr, idstr) < 0:
63200 * raise ValueError('Error updating id')
63201 */
63202 if (unlikely(__pyx_v_bid == Py_None)) {
63203 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
63204 __PYX_ERR(0, 3186, __pyx_L1_error)
63205 }
63206 __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_bid); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 3186, __pyx_L1_error)
63207 __pyx_v_idstr = __pyx_t_4;
63208
63209 /* "pysam/libcbcf.pyx":3184
63210 * raise ValueError('Error unpacking VariantRecord')
63211 * cdef char *idstr = NULL
63212 * if value is not None: # <<<<<<<<<<<<<<
63213 * bid = force_bytes(value)
63214 * idstr = bid
63215 */
63216 }
63217
63218 /* "pysam/libcbcf.pyx":3187
63219 * bid = force_bytes(value)
63220 * idstr = bid
63221 * if bcf_update_id(self.header.ptr, self.ptr, idstr) < 0: # <<<<<<<<<<<<<<
63222 * raise ValueError('Error updating id')
63223 *
63224 */
63225 __pyx_t_2 = (bcf_update_id(__pyx_v_self->header->ptr, __pyx_v_self->ptr, __pyx_v_idstr) < 0);
63226 if (unlikely(__pyx_t_2)) {
63227
63228 /* "pysam/libcbcf.pyx":3188
63229 * idstr = bid
63230 * if bcf_update_id(self.header.ptr, self.ptr, idstr) < 0:
63231 * raise ValueError('Error updating id') # <<<<<<<<<<<<<<
63232 *
63233 * @property
63234 */
63235 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__171, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3188, __pyx_L1_error)
63236 __Pyx_GOTREF(__pyx_t_3);
63237 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
63238 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63239 __PYX_ERR(0, 3188, __pyx_L1_error)
63240
63241 /* "pysam/libcbcf.pyx":3187
63242 * bid = force_bytes(value)
63243 * idstr = bid
63244 * if bcf_update_id(self.header.ptr, self.ptr, idstr) < 0: # <<<<<<<<<<<<<<
63245 * raise ValueError('Error updating id')
63246 *
63247 */
63248 }
63249
63250 /* "pysam/libcbcf.pyx":3178
63251 * return charptr_to_str(r.d.id) if r.d.id != b'.' else None
63252 *
63253 * @id.setter # <<<<<<<<<<<<<<
63254 * def id(self, value):
63255 * cdef bcf1_t *r = self.ptr
63256 */
63257
63258 /* function exit code */
63259 __pyx_r = 0;
63260 goto __pyx_L0;
63261 __pyx_L1_error:;
63262 __Pyx_XDECREF(__pyx_t_3);
63263 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
63264 __pyx_r = -1;
63265 __pyx_L0:;
63266 __Pyx_XDECREF(__pyx_v_bid);
63267 __Pyx_TraceReturn(Py_None, 0);
63268 __Pyx_RefNannyFinishContext();
63269 return __pyx_r;
63270 }
63271
63272 /* "pysam/libcbcf.pyx":3190
63273 * raise ValueError('Error updating id')
63274 *
63275 * @property # <<<<<<<<<<<<<<
63276 * def ref(self):
63277 * """reference allele"""
63278 */
63279
63280 /* Python wrapper */
63281 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
63282 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_3ref_1__get__(PyObject *__pyx_v_self) {
63283 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
63284 PyObject *__pyx_r = 0;
63285 __Pyx_RefNannyDeclarations
63286 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
63287 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
63288 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_3ref___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
63289
63290 /* function exit code */
63291 __Pyx_RefNannyFinishContext();
63292 return __pyx_r;
63293 }
63294
63295 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_3ref___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
63296 bcf1_t *__pyx_v_r;
63297 PyObject *__pyx_r = NULL;
63298 __Pyx_TraceDeclarations
63299 __Pyx_RefNannyDeclarations
63300 bcf1_t *__pyx_t_1;
63301 int __pyx_t_2;
63302 PyObject *__pyx_t_3 = NULL;
63303 PyObject *__pyx_t_4 = NULL;
63304 int __pyx_lineno = 0;
63305 const char *__pyx_filename = NULL;
63306 int __pyx_clineno = 0;
63307 __Pyx_RefNannySetupContext("__get__", 1);
63308 __Pyx_TraceCall("__get__", __pyx_f[0], 3190, 0, __PYX_ERR(0, 3190, __pyx_L1_error));
63309
63310 /* "pysam/libcbcf.pyx":3193
63311 * def ref(self):
63312 * """reference allele"""
63313 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
63314 * if bcf_unpack(r, BCF_UN_STR) < 0:
63315 * raise ValueError('Error unpacking VariantRecord')
63316 */
63317 __pyx_t_1 = __pyx_v_self->ptr;
63318 __pyx_v_r = __pyx_t_1;
63319
63320 /* "pysam/libcbcf.pyx":3194
63321 * """reference allele"""
63322 * cdef bcf1_t *r = self.ptr
63323 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63324 * raise ValueError('Error unpacking VariantRecord')
63325 * return charptr_to_str(r.d.allele[0]) if r.d.allele else None
63326 */
63327 __pyx_t_2 = (bcf_unpack(__pyx_v_r, BCF_UN_STR) < 0);
63328 if (unlikely(__pyx_t_2)) {
63329
63330 /* "pysam/libcbcf.pyx":3195
63331 * cdef bcf1_t *r = self.ptr
63332 * if bcf_unpack(r, BCF_UN_STR) < 0:
63333 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
63334 * return charptr_to_str(r.d.allele[0]) if r.d.allele else None
63335 *
63336 */
63337 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3195, __pyx_L1_error)
63338 __Pyx_GOTREF(__pyx_t_3);
63339 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
63340 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63341 __PYX_ERR(0, 3195, __pyx_L1_error)
63342
63343 /* "pysam/libcbcf.pyx":3194
63344 * """reference allele"""
63345 * cdef bcf1_t *r = self.ptr
63346 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63347 * raise ValueError('Error unpacking VariantRecord')
63348 * return charptr_to_str(r.d.allele[0]) if r.d.allele else None
63349 */
63350 }
63351
63352 /* "pysam/libcbcf.pyx":3196
63353 * if bcf_unpack(r, BCF_UN_STR) < 0:
63354 * raise ValueError('Error unpacking VariantRecord')
63355 * return charptr_to_str(r.d.allele[0]) if r.d.allele else None # <<<<<<<<<<<<<<
63356 *
63357 * @ref.setter
63358 */
63359 __Pyx_XDECREF(__pyx_r);
63360 __pyx_t_2 = (__pyx_v_r->d.allele != 0);
63361 if (__pyx_t_2) {
63362 __pyx_t_4 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_r->d.allele[0]), NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3196, __pyx_L1_error)
63363 __Pyx_GOTREF(__pyx_t_4);
63364 __pyx_t_3 = __pyx_t_4;
63365 __pyx_t_4 = 0;
63366 } else {
63367 __Pyx_INCREF(Py_None);
63368 __pyx_t_3 = Py_None;
63369 }
63370 __pyx_r = __pyx_t_3;
63371 __pyx_t_3 = 0;
63372 goto __pyx_L0;
63373
63374 /* "pysam/libcbcf.pyx":3190
63375 * raise ValueError('Error updating id')
63376 *
63377 * @property # <<<<<<<<<<<<<<
63378 * def ref(self):
63379 * """reference allele"""
63380 */
63381
63382 /* function exit code */
63383 __pyx_L1_error:;
63384 __Pyx_XDECREF(__pyx_t_3);
63385 __Pyx_XDECREF(__pyx_t_4);
63386 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
63387 __pyx_r = NULL;
63388 __pyx_L0:;
63389 __Pyx_XGIVEREF(__pyx_r);
63390 __Pyx_TraceReturn(__pyx_r, 0);
63391 __Pyx_RefNannyFinishContext();
63392 return __pyx_r;
63393 }
63394
63395 /* "pysam/libcbcf.pyx":3198
63396 * return charptr_to_str(r.d.allele[0]) if r.d.allele else None
63397 *
63398 * @ref.setter # <<<<<<<<<<<<<<
63399 * def ref(self, value):
63400 * cdef bcf1_t *r = self.ptr
63401 */
63402
63403 /* Python wrapper */
63404 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
63405 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
63406 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
63407 int __pyx_r;
63408 __Pyx_RefNannyDeclarations
63409 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
63410 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
63411 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_3ref_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
63412
63413 /* function exit code */
63414 __Pyx_RefNannyFinishContext();
63415 return __pyx_r;
63416 }
63417
63418 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_3ref_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
63419 bcf1_t *__pyx_v_r;
63420 PyObject *__pyx_v_alleles = NULL;
63421 uint32_t __pyx_8genexpr6__pyx_v_i;
63422 int __pyx_r;
63423 __Pyx_TraceDeclarations
63424 __Pyx_RefNannyDeclarations
63425 bcf1_t *__pyx_t_1;
63426 int __pyx_t_2;
63427 PyObject *__pyx_t_3 = NULL;
63428 int __pyx_t_4;
63429 uint32_t __pyx_t_5;
63430 uint32_t __pyx_t_6;
63431 uint32_t __pyx_t_7;
63432 PyObject *__pyx_t_8 = NULL;
63433 int __pyx_lineno = 0;
63434 const char *__pyx_filename = NULL;
63435 int __pyx_clineno = 0;
63436 __Pyx_RefNannySetupContext("__set__", 0);
63437 __Pyx_TraceCall("__set__", __pyx_f[0], 3198, 0, __PYX_ERR(0, 3198, __pyx_L1_error));
63438 __Pyx_INCREF(__pyx_v_value);
63439
63440 /* "pysam/libcbcf.pyx":3200
63441 * @ref.setter
63442 * def ref(self, value):
63443 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
63444 * if bcf_unpack(r, BCF_UN_STR) < 0:
63445 * raise ValueError('Error unpacking VariantRecord')
63446 */
63447 __pyx_t_1 = __pyx_v_self->ptr;
63448 __pyx_v_r = __pyx_t_1;
63449
63450 /* "pysam/libcbcf.pyx":3201
63451 * def ref(self, value):
63452 * cdef bcf1_t *r = self.ptr
63453 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63454 * raise ValueError('Error unpacking VariantRecord')
63455 * #FIXME: Set alleles directly -- this is stupid
63456 */
63457 __pyx_t_2 = (bcf_unpack(__pyx_v_r, BCF_UN_STR) < 0);
63458 if (unlikely(__pyx_t_2)) {
63459
63460 /* "pysam/libcbcf.pyx":3202
63461 * cdef bcf1_t *r = self.ptr
63462 * if bcf_unpack(r, BCF_UN_STR) < 0:
63463 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
63464 * #FIXME: Set alleles directly -- this is stupid
63465 * if not value:
63466 */
63467 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3202, __pyx_L1_error)
63468 __Pyx_GOTREF(__pyx_t_3);
63469 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
63470 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63471 __PYX_ERR(0, 3202, __pyx_L1_error)
63472
63473 /* "pysam/libcbcf.pyx":3201
63474 * def ref(self, value):
63475 * cdef bcf1_t *r = self.ptr
63476 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63477 * raise ValueError('Error unpacking VariantRecord')
63478 * #FIXME: Set alleles directly -- this is stupid
63479 */
63480 }
63481
63482 /* "pysam/libcbcf.pyx":3204
63483 * raise ValueError('Error unpacking VariantRecord')
63484 * #FIXME: Set alleles directly -- this is stupid
63485 * if not value: # <<<<<<<<<<<<<<
63486 * raise ValueError('ref allele must not be null')
63487 * value = force_bytes(value)
63488 */
63489 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 3204, __pyx_L1_error)
63490 __pyx_t_4 = (!__pyx_t_2);
63491 if (unlikely(__pyx_t_4)) {
63492
63493 /* "pysam/libcbcf.pyx":3205
63494 * #FIXME: Set alleles directly -- this is stupid
63495 * if not value:
63496 * raise ValueError('ref allele must not be null') # <<<<<<<<<<<<<<
63497 * value = force_bytes(value)
63498 * if r.d.allele and r.n_allele:
63499 */
63500 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__172, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3205, __pyx_L1_error)
63501 __Pyx_GOTREF(__pyx_t_3);
63502 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
63503 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63504 __PYX_ERR(0, 3205, __pyx_L1_error)
63505
63506 /* "pysam/libcbcf.pyx":3204
63507 * raise ValueError('Error unpacking VariantRecord')
63508 * #FIXME: Set alleles directly -- this is stupid
63509 * if not value: # <<<<<<<<<<<<<<
63510 * raise ValueError('ref allele must not be null')
63511 * value = force_bytes(value)
63512 */
63513 }
63514
63515 /* "pysam/libcbcf.pyx":3206
63516 * if not value:
63517 * raise ValueError('ref allele must not be null')
63518 * value = force_bytes(value) # <<<<<<<<<<<<<<
63519 * if r.d.allele and r.n_allele:
63520 * alleles = [r.d.allele[i] for i in range(r.n_allele)]
63521 */
63522 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_value, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3206, __pyx_L1_error)
63523 __Pyx_GOTREF(__pyx_t_3);
63524 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
63525 __pyx_t_3 = 0;
63526
63527 /* "pysam/libcbcf.pyx":3207
63528 * raise ValueError('ref allele must not be null')
63529 * value = force_bytes(value)
63530 * if r.d.allele and r.n_allele: # <<<<<<<<<<<<<<
63531 * alleles = [r.d.allele[i] for i in range(r.n_allele)]
63532 * alleles[0] = value
63533 */
63534 __pyx_t_2 = (__pyx_v_r->d.allele != 0);
63535 if (__pyx_t_2) {
63536 } else {
63537 __pyx_t_4 = __pyx_t_2;
63538 goto __pyx_L6_bool_binop_done;
63539 }
63540 __pyx_t_2 = (__pyx_v_r->n_allele != 0);
63541 __pyx_t_4 = __pyx_t_2;
63542 __pyx_L6_bool_binop_done:;
63543 if (__pyx_t_4) {
63544
63545 /* "pysam/libcbcf.pyx":3208
63546 * value = force_bytes(value)
63547 * if r.d.allele and r.n_allele:
63548 * alleles = [r.d.allele[i] for i in range(r.n_allele)] # <<<<<<<<<<<<<<
63549 * alleles[0] = value
63550 * else:
63551 */
63552 { /* enter inner scope */
63553 __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __pyx_L1_error)
63554 __Pyx_GOTREF(__pyx_t_3);
63555 __pyx_t_5 = __pyx_v_r->n_allele;
63556 __pyx_t_6 = __pyx_t_5;
63557 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
63558 __pyx_8genexpr6__pyx_v_i = __pyx_t_7;
63559 __pyx_t_8 = __Pyx_PyBytes_FromString((__pyx_v_r->d.allele[__pyx_8genexpr6__pyx_v_i])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3208, __pyx_L1_error)
63560 __Pyx_GOTREF(__pyx_t_8);
63561 if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 3208, __pyx_L1_error)
63562 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
63563 }
63564 } /* exit inner scope */
63565 __pyx_v_alleles = ((PyObject*)__pyx_t_3);
63566 __pyx_t_3 = 0;
63567
63568 /* "pysam/libcbcf.pyx":3209
63569 * if r.d.allele and r.n_allele:
63570 * alleles = [r.d.allele[i] for i in range(r.n_allele)]
63571 * alleles[0] = value # <<<<<<<<<<<<<<
63572 * else:
63573 * alleles = [value, '<NON_REF>']
63574 */
63575 if (unlikely((__Pyx_SetItemInt(__pyx_v_alleles, 0, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0))) __PYX_ERR(0, 3209, __pyx_L1_error)
63576
63577 /* "pysam/libcbcf.pyx":3207
63578 * raise ValueError('ref allele must not be null')
63579 * value = force_bytes(value)
63580 * if r.d.allele and r.n_allele: # <<<<<<<<<<<<<<
63581 * alleles = [r.d.allele[i] for i in range(r.n_allele)]
63582 * alleles[0] = value
63583 */
63584 goto __pyx_L5;
63585 }
63586
63587 /* "pysam/libcbcf.pyx":3211
63588 * alleles[0] = value
63589 * else:
63590 * alleles = [value, '<NON_REF>'] # <<<<<<<<<<<<<<
63591 * self.alleles = alleles
63592 * bcf_sync_end(self)
63593 */
63594 /*else*/ {
63595 __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3211, __pyx_L1_error)
63596 __Pyx_GOTREF(__pyx_t_3);
63597 __Pyx_INCREF(__pyx_v_value);
63598 __Pyx_GIVEREF(__pyx_v_value);
63599 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_value)) __PYX_ERR(0, 3211, __pyx_L1_error);
63600 __Pyx_INCREF(__pyx_kp_u_NON_REF);
63601 __Pyx_GIVEREF(__pyx_kp_u_NON_REF);
63602 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_NON_REF)) __PYX_ERR(0, 3211, __pyx_L1_error);
63603 __pyx_v_alleles = ((PyObject*)__pyx_t_3);
63604 __pyx_t_3 = 0;
63605 }
63606 __pyx_L5:;
63607
63608 /* "pysam/libcbcf.pyx":3212
63609 * else:
63610 * alleles = [value, '<NON_REF>']
63611 * self.alleles = alleles # <<<<<<<<<<<<<<
63612 * bcf_sync_end(self)
63613 *
63614 */
63615 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alleles, __pyx_v_alleles) < 0) __PYX_ERR(0, 3212, __pyx_L1_error)
63616
63617 /* "pysam/libcbcf.pyx":3213
63618 * alleles = [value, '<NON_REF>']
63619 * self.alleles = alleles
63620 * bcf_sync_end(self) # <<<<<<<<<<<<<<
63621 *
63622 * @property
63623 */
63624 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_bcf_sync_end(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3213, __pyx_L1_error)
63625 __Pyx_GOTREF(__pyx_t_3);
63626 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63627
63628 /* "pysam/libcbcf.pyx":3198
63629 * return charptr_to_str(r.d.allele[0]) if r.d.allele else None
63630 *
63631 * @ref.setter # <<<<<<<<<<<<<<
63632 * def ref(self, value):
63633 * cdef bcf1_t *r = self.ptr
63634 */
63635
63636 /* function exit code */
63637 __pyx_r = 0;
63638 goto __pyx_L0;
63639 __pyx_L1_error:;
63640 __Pyx_XDECREF(__pyx_t_3);
63641 __Pyx_XDECREF(__pyx_t_8);
63642 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
63643 __pyx_r = -1;
63644 __pyx_L0:;
63645 __Pyx_XDECREF(__pyx_v_alleles);
63646 __Pyx_XDECREF(__pyx_v_value);
63647 __Pyx_TraceReturn(Py_None, 0);
63648 __Pyx_RefNannyFinishContext();
63649 return __pyx_r;
63650 }
63651
63652 /* "pysam/libcbcf.pyx":3215
63653 * bcf_sync_end(self)
63654 *
63655 * @property # <<<<<<<<<<<<<<
63656 * def alleles(self):
63657 * """tuple of reference allele followed by alt alleles"""
63658 */
63659
63660 /* Python wrapper */
63661 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_7alleles_1__get__(PyObject *__pyx_v_self); /*proto*/
63662 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_7alleles_1__get__(PyObject *__pyx_v_self) {
63663 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
63664 PyObject *__pyx_r = 0;
63665 __Pyx_RefNannyDeclarations
63666 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
63667 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
63668 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_7alleles___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
63669
63670 /* function exit code */
63671 __Pyx_RefNannyFinishContext();
63672 return __pyx_r;
63673 }
63674
63675 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_7alleles___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
63676 bcf1_t *__pyx_v_r;
63677 PyObject *__pyx_v_res = 0;
63678 uint32_t __pyx_v_i;
63679 PyObject *__pyx_v_a = NULL;
63680 PyObject *__pyx_r = NULL;
63681 __Pyx_TraceDeclarations
63682 __Pyx_RefNannyDeclarations
63683 bcf1_t *__pyx_t_1;
63684 int __pyx_t_2;
63685 PyObject *__pyx_t_3 = NULL;
63686 uint32_t __pyx_t_4;
63687 uint32_t __pyx_t_5;
63688 uint32_t __pyx_t_6;
63689 int __pyx_lineno = 0;
63690 const char *__pyx_filename = NULL;
63691 int __pyx_clineno = 0;
63692 __Pyx_RefNannySetupContext("__get__", 1);
63693 __Pyx_TraceCall("__get__", __pyx_f[0], 3215, 0, __PYX_ERR(0, 3215, __pyx_L1_error));
63694
63695 /* "pysam/libcbcf.pyx":3218
63696 * def alleles(self):
63697 * """tuple of reference allele followed by alt alleles"""
63698 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
63699 * if bcf_unpack(r, BCF_UN_STR) < 0:
63700 * raise ValueError('Error unpacking VariantRecord')
63701 */
63702 __pyx_t_1 = __pyx_v_self->ptr;
63703 __pyx_v_r = __pyx_t_1;
63704
63705 /* "pysam/libcbcf.pyx":3219
63706 * """tuple of reference allele followed by alt alleles"""
63707 * cdef bcf1_t *r = self.ptr
63708 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63709 * raise ValueError('Error unpacking VariantRecord')
63710 * if not r.d.allele:
63711 */
63712 __pyx_t_2 = (bcf_unpack(__pyx_v_r, BCF_UN_STR) < 0);
63713 if (unlikely(__pyx_t_2)) {
63714
63715 /* "pysam/libcbcf.pyx":3220
63716 * cdef bcf1_t *r = self.ptr
63717 * if bcf_unpack(r, BCF_UN_STR) < 0:
63718 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
63719 * if not r.d.allele:
63720 * return None
63721 */
63722 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3220, __pyx_L1_error)
63723 __Pyx_GOTREF(__pyx_t_3);
63724 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
63725 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63726 __PYX_ERR(0, 3220, __pyx_L1_error)
63727
63728 /* "pysam/libcbcf.pyx":3219
63729 * """tuple of reference allele followed by alt alleles"""
63730 * cdef bcf1_t *r = self.ptr
63731 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63732 * raise ValueError('Error unpacking VariantRecord')
63733 * if not r.d.allele:
63734 */
63735 }
63736
63737 /* "pysam/libcbcf.pyx":3221
63738 * if bcf_unpack(r, BCF_UN_STR) < 0:
63739 * raise ValueError('Error unpacking VariantRecord')
63740 * if not r.d.allele: # <<<<<<<<<<<<<<
63741 * return None
63742 * cdef tuple res = PyTuple_New(r.n_allele)
63743 */
63744 __pyx_t_2 = (!(__pyx_v_r->d.allele != 0));
63745 if (__pyx_t_2) {
63746
63747 /* "pysam/libcbcf.pyx":3222
63748 * raise ValueError('Error unpacking VariantRecord')
63749 * if not r.d.allele:
63750 * return None # <<<<<<<<<<<<<<
63751 * cdef tuple res = PyTuple_New(r.n_allele)
63752 * for i in range(r.n_allele):
63753 */
63754 __Pyx_XDECREF(__pyx_r);
63755 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
63756 goto __pyx_L0;
63757
63758 /* "pysam/libcbcf.pyx":3221
63759 * if bcf_unpack(r, BCF_UN_STR) < 0:
63760 * raise ValueError('Error unpacking VariantRecord')
63761 * if not r.d.allele: # <<<<<<<<<<<<<<
63762 * return None
63763 * cdef tuple res = PyTuple_New(r.n_allele)
63764 */
63765 }
63766
63767 /* "pysam/libcbcf.pyx":3223
63768 * if not r.d.allele:
63769 * return None
63770 * cdef tuple res = PyTuple_New(r.n_allele) # <<<<<<<<<<<<<<
63771 * for i in range(r.n_allele):
63772 * a = charptr_to_str(r.d.allele[i])
63773 */
63774 __pyx_t_3 = PyTuple_New(__pyx_v_r->n_allele); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3223, __pyx_L1_error)
63775 __Pyx_GOTREF(__pyx_t_3);
63776 __pyx_v_res = ((PyObject*)__pyx_t_3);
63777 __pyx_t_3 = 0;
63778
63779 /* "pysam/libcbcf.pyx":3224
63780 * return None
63781 * cdef tuple res = PyTuple_New(r.n_allele)
63782 * for i in range(r.n_allele): # <<<<<<<<<<<<<<
63783 * a = charptr_to_str(r.d.allele[i])
63784 * PyTuple_SET_ITEM(res, i, a)
63785 */
63786 __pyx_t_4 = __pyx_v_r->n_allele;
63787 __pyx_t_5 = __pyx_t_4;
63788 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
63789 __pyx_v_i = __pyx_t_6;
63790
63791 /* "pysam/libcbcf.pyx":3225
63792 * cdef tuple res = PyTuple_New(r.n_allele)
63793 * for i in range(r.n_allele):
63794 * a = charptr_to_str(r.d.allele[i]) # <<<<<<<<<<<<<<
63795 * PyTuple_SET_ITEM(res, i, a)
63796 * Py_INCREF(a)
63797 */
63798 __pyx_t_3 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_r->d.allele[__pyx_v_i]), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L1_error)
63799 __Pyx_GOTREF(__pyx_t_3);
63800 __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_3);
63801 __pyx_t_3 = 0;
63802
63803 /* "pysam/libcbcf.pyx":3226
63804 * for i in range(r.n_allele):
63805 * a = charptr_to_str(r.d.allele[i])
63806 * PyTuple_SET_ITEM(res, i, a) # <<<<<<<<<<<<<<
63807 * Py_INCREF(a)
63808 * return res
63809 */
63810 PyTuple_SET_ITEM(__pyx_v_res, __pyx_v_i, __pyx_v_a);
63811
63812 /* "pysam/libcbcf.pyx":3227
63813 * a = charptr_to_str(r.d.allele[i])
63814 * PyTuple_SET_ITEM(res, i, a)
63815 * Py_INCREF(a) # <<<<<<<<<<<<<<
63816 * return res
63817 *
63818 */
63819 Py_INCREF(__pyx_v_a);
63820 }
63821
63822 /* "pysam/libcbcf.pyx":3228
63823 * PyTuple_SET_ITEM(res, i, a)
63824 * Py_INCREF(a)
63825 * return res # <<<<<<<<<<<<<<
63826 *
63827 * @alleles.setter
63828 */
63829 __Pyx_XDECREF(__pyx_r);
63830 __Pyx_INCREF(__pyx_v_res);
63831 __pyx_r = __pyx_v_res;
63832 goto __pyx_L0;
63833
63834 /* "pysam/libcbcf.pyx":3215
63835 * bcf_sync_end(self)
63836 *
63837 * @property # <<<<<<<<<<<<<<
63838 * def alleles(self):
63839 * """tuple of reference allele followed by alt alleles"""
63840 */
63841
63842 /* function exit code */
63843 __pyx_L1_error:;
63844 __Pyx_XDECREF(__pyx_t_3);
63845 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.alleles.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
63846 __pyx_r = NULL;
63847 __pyx_L0:;
63848 __Pyx_XDECREF(__pyx_v_res);
63849 __Pyx_XDECREF(__pyx_v_a);
63850 __Pyx_XGIVEREF(__pyx_r);
63851 __Pyx_TraceReturn(__pyx_r, 0);
63852 __Pyx_RefNannyFinishContext();
63853 return __pyx_r;
63854 }
63855
63856 /* "pysam/libcbcf.pyx":3230
63857 * return res
63858 *
63859 * @alleles.setter # <<<<<<<<<<<<<<
63860 * def alleles(self, values):
63861 * cdef bcf1_t *r = self.ptr
63862 */
63863
63864 /* Python wrapper */
63865 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_7alleles_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
63866 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_7alleles_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
63867 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
63868 int __pyx_r;
63869 __Pyx_RefNannyDeclarations
63870 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
63871 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
63872 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_7alleles_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_values));
63873
63874 /* function exit code */
63875 __Pyx_RefNannyFinishContext();
63876 return __pyx_r;
63877 }
63878
63879 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_7alleles_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_values) {
63880 bcf1_t *__pyx_v_r;
63881 int __pyx_v_rlen;
63882 PyObject *__pyx_v_value = NULL;
63883 PyObject *__pyx_8genexpr7__pyx_v_v = NULL;
63884 int __pyx_r;
63885 __Pyx_TraceDeclarations
63886 __Pyx_RefNannyDeclarations
63887 bcf1_t *__pyx_t_1;
63888 int32_t __pyx_t_2;
63889 int __pyx_t_3;
63890 PyObject *__pyx_t_4 = NULL;
63891 PyObject *__pyx_t_5 = NULL;
63892 Py_ssize_t __pyx_t_6;
63893 PyObject *(*__pyx_t_7)(PyObject *);
63894 PyObject *__pyx_t_8 = NULL;
63895 char const *__pyx_t_9;
63896 int __pyx_t_10;
63897 int __pyx_lineno = 0;
63898 const char *__pyx_filename = NULL;
63899 int __pyx_clineno = 0;
63900 __Pyx_RefNannySetupContext("__set__", 0);
63901 __Pyx_TraceCall("__set__", __pyx_f[0], 3230, 0, __PYX_ERR(0, 3230, __pyx_L1_error));
63902 __Pyx_INCREF(__pyx_v_values);
63903
63904 /* "pysam/libcbcf.pyx":3232
63905 * @alleles.setter
63906 * def alleles(self, values):
63907 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
63908 *
63909 * # Cache rlen of symbolic alleles before call to bcf_update_alleles_str
63910 */
63911 __pyx_t_1 = __pyx_v_self->ptr;
63912 __pyx_v_r = __pyx_t_1;
63913
63914 /* "pysam/libcbcf.pyx":3235
63915 *
63916 * # Cache rlen of symbolic alleles before call to bcf_update_alleles_str
63917 * cdef int rlen = r.rlen # <<<<<<<<<<<<<<
63918 *
63919 * if bcf_unpack(r, BCF_UN_STR) < 0:
63920 */
63921 __pyx_t_2 = __pyx_v_r->rlen;
63922 __pyx_v_rlen = __pyx_t_2;
63923
63924 /* "pysam/libcbcf.pyx":3237
63925 * cdef int rlen = r.rlen
63926 *
63927 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63928 * raise ValueError('Error unpacking VariantRecord')
63929 *
63930 */
63931 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_STR) < 0);
63932 if (unlikely(__pyx_t_3)) {
63933
63934 /* "pysam/libcbcf.pyx":3238
63935 *
63936 * if bcf_unpack(r, BCF_UN_STR) < 0:
63937 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
63938 *
63939 * values = [force_bytes(v) for v in values]
63940 */
63941 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3238, __pyx_L1_error)
63942 __Pyx_GOTREF(__pyx_t_4);
63943 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
63944 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63945 __PYX_ERR(0, 3238, __pyx_L1_error)
63946
63947 /* "pysam/libcbcf.pyx":3237
63948 * cdef int rlen = r.rlen
63949 *
63950 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
63951 * raise ValueError('Error unpacking VariantRecord')
63952 *
63953 */
63954 }
63955
63956 /* "pysam/libcbcf.pyx":3240
63957 * raise ValueError('Error unpacking VariantRecord')
63958 *
63959 * values = [force_bytes(v) for v in values] # <<<<<<<<<<<<<<
63960 *
63961 * if len(values) < 2:
63962 */
63963 { /* enter inner scope */
63964 __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3240, __pyx_L6_error)
63965 __Pyx_GOTREF(__pyx_t_4);
63966 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
63967 __pyx_t_5 = __pyx_v_values; __Pyx_INCREF(__pyx_t_5);
63968 __pyx_t_6 = 0;
63969 __pyx_t_7 = NULL;
63970 } else {
63971 __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3240, __pyx_L6_error)
63972 __Pyx_GOTREF(__pyx_t_5);
63973 __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3240, __pyx_L6_error)
63974 }
63975 for (;;) {
63976 if (likely(!__pyx_t_7)) {
63977 if (likely(PyList_CheckExact(__pyx_t_5))) {
63978 {
63979 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
63980 #if !CYTHON_ASSUME_SAFE_MACROS
63981 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3240, __pyx_L6_error)
63982 #endif
63983 if (__pyx_t_6 >= __pyx_temp) break;
63984 }
63985 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
63986 __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 3240, __pyx_L6_error)
63987 #else
63988 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3240, __pyx_L6_error)
63989 __Pyx_GOTREF(__pyx_t_8);
63990 #endif
63991 } else {
63992 {
63993 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
63994 #if !CYTHON_ASSUME_SAFE_MACROS
63995 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3240, __pyx_L6_error)
63996 #endif
63997 if (__pyx_t_6 >= __pyx_temp) break;
63998 }
63999 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
64000 __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 3240, __pyx_L6_error)
64001 #else
64002 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3240, __pyx_L6_error)
64003 __Pyx_GOTREF(__pyx_t_8);
64004 #endif
64005 }
64006 } else {
64007 __pyx_t_8 = __pyx_t_7(__pyx_t_5);
64008 if (unlikely(!__pyx_t_8)) {
64009 PyObject* exc_type = PyErr_Occurred();
64010 if (exc_type) {
64011 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
64012 else __PYX_ERR(0, 3240, __pyx_L6_error)
64013 }
64014 break;
64015 }
64016 __Pyx_GOTREF(__pyx_t_8);
64017 }
64018 __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_v, __pyx_t_8);
64019 __pyx_t_8 = 0;
64020 __pyx_t_8 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_8genexpr7__pyx_v_v, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3240, __pyx_L6_error)
64021 __Pyx_GOTREF(__pyx_t_8);
64022 if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 3240, __pyx_L6_error)
64023 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
64024 }
64025 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
64026 __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_v); __pyx_8genexpr7__pyx_v_v = 0;
64027 goto __pyx_L10_exit_scope;
64028 __pyx_L6_error:;
64029 __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_v); __pyx_8genexpr7__pyx_v_v = 0;
64030 goto __pyx_L1_error;
64031 __pyx_L10_exit_scope:;
64032 } /* exit inner scope */
64033 __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_4);
64034 __pyx_t_4 = 0;
64035
64036 /* "pysam/libcbcf.pyx":3242
64037 * values = [force_bytes(v) for v in values]
64038 *
64039 * if len(values) < 2: # <<<<<<<<<<<<<<
64040 * raise ValueError('must set at least 2 alleles')
64041 *
64042 */
64043 __pyx_t_6 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3242, __pyx_L1_error)
64044 __pyx_t_3 = (__pyx_t_6 < 2);
64045 if (unlikely(__pyx_t_3)) {
64046
64047 /* "pysam/libcbcf.pyx":3243
64048 *
64049 * if len(values) < 2:
64050 * raise ValueError('must set at least 2 alleles') # <<<<<<<<<<<<<<
64051 *
64052 * if b'' in values:
64053 */
64054 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__173, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3243, __pyx_L1_error)
64055 __Pyx_GOTREF(__pyx_t_4);
64056 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
64057 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64058 __PYX_ERR(0, 3243, __pyx_L1_error)
64059
64060 /* "pysam/libcbcf.pyx":3242
64061 * values = [force_bytes(v) for v in values]
64062 *
64063 * if len(values) < 2: # <<<<<<<<<<<<<<
64064 * raise ValueError('must set at least 2 alleles')
64065 *
64066 */
64067 }
64068
64069 /* "pysam/libcbcf.pyx":3245
64070 * raise ValueError('must set at least 2 alleles')
64071 *
64072 * if b'' in values: # <<<<<<<<<<<<<<
64073 * raise ValueError('cannot set null allele')
64074 *
64075 */
64076 __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__12, __pyx_v_values, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3245, __pyx_L1_error)
64077 if (unlikely(__pyx_t_3)) {
64078
64079 /* "pysam/libcbcf.pyx":3246
64080 *
64081 * if b'' in values:
64082 * raise ValueError('cannot set null allele') # <<<<<<<<<<<<<<
64083 *
64084 * value = b','.join(values)
64085 */
64086 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__174, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3246, __pyx_L1_error)
64087 __Pyx_GOTREF(__pyx_t_4);
64088 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
64089 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64090 __PYX_ERR(0, 3246, __pyx_L1_error)
64091
64092 /* "pysam/libcbcf.pyx":3245
64093 * raise ValueError('must set at least 2 alleles')
64094 *
64095 * if b'' in values: # <<<<<<<<<<<<<<
64096 * raise ValueError('cannot set null allele')
64097 *
64098 */
64099 }
64100
64101 /* "pysam/libcbcf.pyx":3248
64102 * raise ValueError('cannot set null allele')
64103 *
64104 * value = b','.join(values) # <<<<<<<<<<<<<<
64105 *
64106 * if bcf_update_alleles_str(self.header.ptr, r, value) < 0:
64107 */
64108 __pyx_t_4 = __Pyx_PyBytes_Join(__pyx_kp_b__2, __pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3248, __pyx_L1_error)
64109 __Pyx_GOTREF(__pyx_t_4);
64110 __pyx_v_value = __pyx_t_4;
64111 __pyx_t_4 = 0;
64112
64113 /* "pysam/libcbcf.pyx":3250
64114 * value = b','.join(values)
64115 *
64116 * if bcf_update_alleles_str(self.header.ptr, r, value) < 0: # <<<<<<<<<<<<<<
64117 * raise ValueError('Error updating alleles')
64118 *
64119 */
64120 __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 3250, __pyx_L1_error)
64121 __pyx_t_3 = (bcf_update_alleles_str(__pyx_v_self->header->ptr, __pyx_v_r, __pyx_t_9) < 0);
64122 if (unlikely(__pyx_t_3)) {
64123
64124 /* "pysam/libcbcf.pyx":3251
64125 *
64126 * if bcf_update_alleles_str(self.header.ptr, r, value) < 0:
64127 * raise ValueError('Error updating alleles') # <<<<<<<<<<<<<<
64128 *
64129 * # Reset rlen if alternate allele isn't symbolic, otherwise used cached
64130 */
64131 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__175, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3251, __pyx_L1_error)
64132 __Pyx_GOTREF(__pyx_t_4);
64133 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
64134 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64135 __PYX_ERR(0, 3251, __pyx_L1_error)
64136
64137 /* "pysam/libcbcf.pyx":3250
64138 * value = b','.join(values)
64139 *
64140 * if bcf_update_alleles_str(self.header.ptr, r, value) < 0: # <<<<<<<<<<<<<<
64141 * raise ValueError('Error updating alleles')
64142 *
64143 */
64144 }
64145
64146 /* "pysam/libcbcf.pyx":3254
64147 *
64148 * # Reset rlen if alternate allele isn't symbolic, otherwise used cached
64149 * if has_symbolic_allele(self): # <<<<<<<<<<<<<<
64150 * self.ptr.rlen = rlen
64151 * else:
64152 */
64153 __pyx_t_10 = __pyx_f_5pysam_7libcbcf_has_symbolic_allele(__pyx_v_self); if (unlikely(__pyx_t_10 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3254, __pyx_L1_error)
64154 __pyx_t_3 = (__pyx_t_10 != 0);
64155 if (__pyx_t_3) {
64156
64157 /* "pysam/libcbcf.pyx":3255
64158 * # Reset rlen if alternate allele isn't symbolic, otherwise used cached
64159 * if has_symbolic_allele(self):
64160 * self.ptr.rlen = rlen # <<<<<<<<<<<<<<
64161 * else:
64162 * self.ptr.rlen = len(values[0])
64163 */
64164 __pyx_v_self->ptr->rlen = __pyx_v_rlen;
64165
64166 /* "pysam/libcbcf.pyx":3254
64167 *
64168 * # Reset rlen if alternate allele isn't symbolic, otherwise used cached
64169 * if has_symbolic_allele(self): # <<<<<<<<<<<<<<
64170 * self.ptr.rlen = rlen
64171 * else:
64172 */
64173 goto __pyx_L14;
64174 }
64175
64176 /* "pysam/libcbcf.pyx":3257
64177 * self.ptr.rlen = rlen
64178 * else:
64179 * self.ptr.rlen = len(values[0]) # <<<<<<<<<<<<<<
64180 * r.d.var_type = -1
64181 * bcf_sync_end(self)
64182 */
64183 /*else*/ {
64184 __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3257, __pyx_L1_error)
64185 __Pyx_GOTREF(__pyx_t_4);
64186 __pyx_t_6 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3257, __pyx_L1_error)
64187 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64188 __pyx_v_self->ptr->rlen = __pyx_t_6;
64189 }
64190 __pyx_L14:;
64191
64192 /* "pysam/libcbcf.pyx":3258
64193 * else:
64194 * self.ptr.rlen = len(values[0])
64195 * r.d.var_type = -1 # <<<<<<<<<<<<<<
64196 * bcf_sync_end(self)
64197 *
64198 */
64199 __pyx_v_r->d.var_type = -1;
64200
64201 /* "pysam/libcbcf.pyx":3259
64202 * self.ptr.rlen = len(values[0])
64203 * r.d.var_type = -1
64204 * bcf_sync_end(self) # <<<<<<<<<<<<<<
64205 *
64206 * @property
64207 */
64208 __pyx_t_4 = __pyx_f_5pysam_7libcbcf_bcf_sync_end(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3259, __pyx_L1_error)
64209 __Pyx_GOTREF(__pyx_t_4);
64210 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64211
64212 /* "pysam/libcbcf.pyx":3230
64213 * return res
64214 *
64215 * @alleles.setter # <<<<<<<<<<<<<<
64216 * def alleles(self, values):
64217 * cdef bcf1_t *r = self.ptr
64218 */
64219
64220 /* function exit code */
64221 __pyx_r = 0;
64222 goto __pyx_L0;
64223 __pyx_L1_error:;
64224 __Pyx_XDECREF(__pyx_t_4);
64225 __Pyx_XDECREF(__pyx_t_5);
64226 __Pyx_XDECREF(__pyx_t_8);
64227 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.alleles.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
64228 __pyx_r = -1;
64229 __pyx_L0:;
64230 __Pyx_XDECREF(__pyx_v_value);
64231 __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_v);
64232 __Pyx_XDECREF(__pyx_v_values);
64233 __Pyx_TraceReturn(Py_None, 0);
64234 __Pyx_RefNannyFinishContext();
64235 return __pyx_r;
64236 }
64237
64238 /* "pysam/libcbcf.pyx":3261
64239 * bcf_sync_end(self)
64240 *
64241 * @property # <<<<<<<<<<<<<<
64242 * def alts(self):
64243 * """tuple of alt alleles"""
64244 */
64245
64246 /* Python wrapper */
64247 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4alts_1__get__(PyObject *__pyx_v_self); /*proto*/
64248 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4alts_1__get__(PyObject *__pyx_v_self) {
64249 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
64250 PyObject *__pyx_r = 0;
64251 __Pyx_RefNannyDeclarations
64252 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
64253 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
64254 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4alts___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
64255
64256 /* function exit code */
64257 __Pyx_RefNannyFinishContext();
64258 return __pyx_r;
64259 }
64260
64261 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4alts___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
64262 bcf1_t *__pyx_v_r;
64263 PyObject *__pyx_v_res = 0;
64264 PyObject *__pyx_v_i = NULL;
64265 PyObject *__pyx_v_a = NULL;
64266 PyObject *__pyx_r = NULL;
64267 __Pyx_TraceDeclarations
64268 __Pyx_RefNannyDeclarations
64269 bcf1_t *__pyx_t_1;
64270 int __pyx_t_2;
64271 PyObject *__pyx_t_3 = NULL;
64272 int __pyx_t_4;
64273 PyObject *__pyx_t_5 = NULL;
64274 Py_ssize_t __pyx_t_6;
64275 PyObject *(*__pyx_t_7)(PyObject *);
64276 Py_ssize_t __pyx_t_8;
64277 int __pyx_lineno = 0;
64278 const char *__pyx_filename = NULL;
64279 int __pyx_clineno = 0;
64280 __Pyx_RefNannySetupContext("__get__", 1);
64281 __Pyx_TraceCall("__get__", __pyx_f[0], 3261, 0, __PYX_ERR(0, 3261, __pyx_L1_error));
64282
64283 /* "pysam/libcbcf.pyx":3264
64284 * def alts(self):
64285 * """tuple of alt alleles"""
64286 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
64287 * if bcf_unpack(r, BCF_UN_STR) < 0:
64288 * raise ValueError('Error unpacking VariantRecord')
64289 */
64290 __pyx_t_1 = __pyx_v_self->ptr;
64291 __pyx_v_r = __pyx_t_1;
64292
64293 /* "pysam/libcbcf.pyx":3265
64294 * """tuple of alt alleles"""
64295 * cdef bcf1_t *r = self.ptr
64296 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
64297 * raise ValueError('Error unpacking VariantRecord')
64298 * if r.n_allele < 2 or not r.d.allele:
64299 */
64300 __pyx_t_2 = (bcf_unpack(__pyx_v_r, BCF_UN_STR) < 0);
64301 if (unlikely(__pyx_t_2)) {
64302
64303 /* "pysam/libcbcf.pyx":3266
64304 * cdef bcf1_t *r = self.ptr
64305 * if bcf_unpack(r, BCF_UN_STR) < 0:
64306 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
64307 * if r.n_allele < 2 or not r.d.allele:
64308 * return None
64309 */
64310 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3266, __pyx_L1_error)
64311 __Pyx_GOTREF(__pyx_t_3);
64312 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
64313 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64314 __PYX_ERR(0, 3266, __pyx_L1_error)
64315
64316 /* "pysam/libcbcf.pyx":3265
64317 * """tuple of alt alleles"""
64318 * cdef bcf1_t *r = self.ptr
64319 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
64320 * raise ValueError('Error unpacking VariantRecord')
64321 * if r.n_allele < 2 or not r.d.allele:
64322 */
64323 }
64324
64325 /* "pysam/libcbcf.pyx":3267
64326 * if bcf_unpack(r, BCF_UN_STR) < 0:
64327 * raise ValueError('Error unpacking VariantRecord')
64328 * if r.n_allele < 2 or not r.d.allele: # <<<<<<<<<<<<<<
64329 * return None
64330 * cdef tuple res = PyTuple_New(r.n_allele - 1)
64331 */
64332 __pyx_t_4 = (__pyx_v_r->n_allele < 2);
64333 if (!__pyx_t_4) {
64334 } else {
64335 __pyx_t_2 = __pyx_t_4;
64336 goto __pyx_L5_bool_binop_done;
64337 }
64338 __pyx_t_4 = (!(__pyx_v_r->d.allele != 0));
64339 __pyx_t_2 = __pyx_t_4;
64340 __pyx_L5_bool_binop_done:;
64341 if (__pyx_t_2) {
64342
64343 /* "pysam/libcbcf.pyx":3268
64344 * raise ValueError('Error unpacking VariantRecord')
64345 * if r.n_allele < 2 or not r.d.allele:
64346 * return None # <<<<<<<<<<<<<<
64347 * cdef tuple res = PyTuple_New(r.n_allele - 1)
64348 * for i in range(1, r.n_allele):
64349 */
64350 __Pyx_XDECREF(__pyx_r);
64351 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
64352 goto __pyx_L0;
64353
64354 /* "pysam/libcbcf.pyx":3267
64355 * if bcf_unpack(r, BCF_UN_STR) < 0:
64356 * raise ValueError('Error unpacking VariantRecord')
64357 * if r.n_allele < 2 or not r.d.allele: # <<<<<<<<<<<<<<
64358 * return None
64359 * cdef tuple res = PyTuple_New(r.n_allele - 1)
64360 */
64361 }
64362
64363 /* "pysam/libcbcf.pyx":3269
64364 * if r.n_allele < 2 or not r.d.allele:
64365 * return None
64366 * cdef tuple res = PyTuple_New(r.n_allele - 1) # <<<<<<<<<<<<<<
64367 * for i in range(1, r.n_allele):
64368 * a = charptr_to_str(r.d.allele[i])
64369 */
64370 __pyx_t_3 = PyTuple_New((__pyx_v_r->n_allele - 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3269, __pyx_L1_error)
64371 __Pyx_GOTREF(__pyx_t_3);
64372 __pyx_v_res = ((PyObject*)__pyx_t_3);
64373 __pyx_t_3 = 0;
64374
64375 /* "pysam/libcbcf.pyx":3270
64376 * return None
64377 * cdef tuple res = PyTuple_New(r.n_allele - 1)
64378 * for i in range(1, r.n_allele): # <<<<<<<<<<<<<<
64379 * a = charptr_to_str(r.d.allele[i])
64380 * PyTuple_SET_ITEM(res, i - 1, a)
64381 */
64382 __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_r->n_allele); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L1_error)
64383 __Pyx_GOTREF(__pyx_t_3);
64384 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3270, __pyx_L1_error)
64385 __Pyx_GOTREF(__pyx_t_5);
64386 __Pyx_INCREF(__pyx_int_1);
64387 __Pyx_GIVEREF(__pyx_int_1);
64388 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_1)) __PYX_ERR(0, 3270, __pyx_L1_error);
64389 __Pyx_GIVEREF(__pyx_t_3);
64390 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L1_error);
64391 __pyx_t_3 = 0;
64392 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L1_error)
64393 __Pyx_GOTREF(__pyx_t_3);
64394 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
64395 if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
64396 __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5);
64397 __pyx_t_6 = 0;
64398 __pyx_t_7 = NULL;
64399 } else {
64400 __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3270, __pyx_L1_error)
64401 __Pyx_GOTREF(__pyx_t_5);
64402 __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3270, __pyx_L1_error)
64403 }
64404 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64405 for (;;) {
64406 if (likely(!__pyx_t_7)) {
64407 if (likely(PyList_CheckExact(__pyx_t_5))) {
64408 {
64409 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
64410 #if !CYTHON_ASSUME_SAFE_MACROS
64411 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3270, __pyx_L1_error)
64412 #endif
64413 if (__pyx_t_6 >= __pyx_temp) break;
64414 }
64415 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
64416 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 3270, __pyx_L1_error)
64417 #else
64418 __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L1_error)
64419 __Pyx_GOTREF(__pyx_t_3);
64420 #endif
64421 } else {
64422 {
64423 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
64424 #if !CYTHON_ASSUME_SAFE_MACROS
64425 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3270, __pyx_L1_error)
64426 #endif
64427 if (__pyx_t_6 >= __pyx_temp) break;
64428 }
64429 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
64430 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 3270, __pyx_L1_error)
64431 #else
64432 __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L1_error)
64433 __Pyx_GOTREF(__pyx_t_3);
64434 #endif
64435 }
64436 } else {
64437 __pyx_t_3 = __pyx_t_7(__pyx_t_5);
64438 if (unlikely(!__pyx_t_3)) {
64439 PyObject* exc_type = PyErr_Occurred();
64440 if (exc_type) {
64441 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
64442 else __PYX_ERR(0, 3270, __pyx_L1_error)
64443 }
64444 break;
64445 }
64446 __Pyx_GOTREF(__pyx_t_3);
64447 }
64448 __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
64449 __pyx_t_3 = 0;
64450
64451 /* "pysam/libcbcf.pyx":3271
64452 * cdef tuple res = PyTuple_New(r.n_allele - 1)
64453 * for i in range(1, r.n_allele):
64454 * a = charptr_to_str(r.d.allele[i]) # <<<<<<<<<<<<<<
64455 * PyTuple_SET_ITEM(res, i - 1, a)
64456 * Py_INCREF(a)
64457 */
64458 __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3271, __pyx_L1_error)
64459 __pyx_t_3 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_r->d.allele[__pyx_t_8]), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3271, __pyx_L1_error)
64460 __Pyx_GOTREF(__pyx_t_3);
64461 __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_3);
64462 __pyx_t_3 = 0;
64463
64464 /* "pysam/libcbcf.pyx":3272
64465 * for i in range(1, r.n_allele):
64466 * a = charptr_to_str(r.d.allele[i])
64467 * PyTuple_SET_ITEM(res, i - 1, a) # <<<<<<<<<<<<<<
64468 * Py_INCREF(a)
64469 * return res
64470 */
64471 __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3272, __pyx_L1_error)
64472 __Pyx_GOTREF(__pyx_t_3);
64473 __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3272, __pyx_L1_error)
64474 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64475 PyTuple_SET_ITEM(__pyx_v_res, __pyx_t_8, __pyx_v_a);
64476
64477 /* "pysam/libcbcf.pyx":3273
64478 * a = charptr_to_str(r.d.allele[i])
64479 * PyTuple_SET_ITEM(res, i - 1, a)
64480 * Py_INCREF(a) # <<<<<<<<<<<<<<
64481 * return res
64482 *
64483 */
64484 Py_INCREF(__pyx_v_a);
64485
64486 /* "pysam/libcbcf.pyx":3270
64487 * return None
64488 * cdef tuple res = PyTuple_New(r.n_allele - 1)
64489 * for i in range(1, r.n_allele): # <<<<<<<<<<<<<<
64490 * a = charptr_to_str(r.d.allele[i])
64491 * PyTuple_SET_ITEM(res, i - 1, a)
64492 */
64493 }
64494 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
64495
64496 /* "pysam/libcbcf.pyx":3274
64497 * PyTuple_SET_ITEM(res, i - 1, a)
64498 * Py_INCREF(a)
64499 * return res # <<<<<<<<<<<<<<
64500 *
64501 * @alts.setter
64502 */
64503 __Pyx_XDECREF(__pyx_r);
64504 __Pyx_INCREF(__pyx_v_res);
64505 __pyx_r = __pyx_v_res;
64506 goto __pyx_L0;
64507
64508 /* "pysam/libcbcf.pyx":3261
64509 * bcf_sync_end(self)
64510 *
64511 * @property # <<<<<<<<<<<<<<
64512 * def alts(self):
64513 * """tuple of alt alleles"""
64514 */
64515
64516 /* function exit code */
64517 __pyx_L1_error:;
64518 __Pyx_XDECREF(__pyx_t_3);
64519 __Pyx_XDECREF(__pyx_t_5);
64520 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.alts.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
64521 __pyx_r = NULL;
64522 __pyx_L0:;
64523 __Pyx_XDECREF(__pyx_v_res);
64524 __Pyx_XDECREF(__pyx_v_i);
64525 __Pyx_XDECREF(__pyx_v_a);
64526 __Pyx_XGIVEREF(__pyx_r);
64527 __Pyx_TraceReturn(__pyx_r, 0);
64528 __Pyx_RefNannyFinishContext();
64529 return __pyx_r;
64530 }
64531
64532 /* "pysam/libcbcf.pyx":3276
64533 * return res
64534 *
64535 * @alts.setter # <<<<<<<<<<<<<<
64536 * def alts(self, value):
64537 * #FIXME: Set alleles directly -- this is stupid
64538 */
64539
64540 /* Python wrapper */
64541 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_4alts_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
64542 static int __pyx_pw_5pysam_7libcbcf_13VariantRecord_4alts_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
64543 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
64544 int __pyx_r;
64545 __Pyx_RefNannyDeclarations
64546 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
64547 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
64548 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4alts_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
64549
64550 /* function exit code */
64551 __Pyx_RefNannyFinishContext();
64552 return __pyx_r;
64553 }
64554
64555 static int __pyx_pf_5pysam_7libcbcf_13VariantRecord_4alts_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, PyObject *__pyx_v_value) {
64556 bcf1_t *__pyx_v_r;
64557 PyObject *__pyx_v_ref = NULL;
64558 PyObject *__pyx_8genexpr8__pyx_v_v = NULL;
64559 int __pyx_r;
64560 __Pyx_TraceDeclarations
64561 __Pyx_RefNannyDeclarations
64562 bcf1_t *__pyx_t_1;
64563 int __pyx_t_2;
64564 PyObject *__pyx_t_3 = NULL;
64565 PyObject *__pyx_t_4 = NULL;
64566 Py_ssize_t __pyx_t_5;
64567 PyObject *(*__pyx_t_6)(PyObject *);
64568 PyObject *__pyx_t_7 = NULL;
64569 int __pyx_t_8;
64570 int __pyx_lineno = 0;
64571 const char *__pyx_filename = NULL;
64572 int __pyx_clineno = 0;
64573 __Pyx_RefNannySetupContext("__set__", 0);
64574 __Pyx_TraceCall("__set__", __pyx_f[0], 3276, 0, __PYX_ERR(0, 3276, __pyx_L1_error));
64575 __Pyx_INCREF(__pyx_v_value);
64576
64577 /* "pysam/libcbcf.pyx":3279
64578 * def alts(self, value):
64579 * #FIXME: Set alleles directly -- this is stupid
64580 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
64581 * if bcf_unpack(r, BCF_UN_STR) < 0:
64582 * raise ValueError('Error unpacking VariantRecord')
64583 */
64584 __pyx_t_1 = __pyx_v_self->ptr;
64585 __pyx_v_r = __pyx_t_1;
64586
64587 /* "pysam/libcbcf.pyx":3280
64588 * #FIXME: Set alleles directly -- this is stupid
64589 * cdef bcf1_t *r = self.ptr
64590 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
64591 * raise ValueError('Error unpacking VariantRecord')
64592 * value = [force_bytes(v) for v in value]
64593 */
64594 __pyx_t_2 = (bcf_unpack(__pyx_v_r, BCF_UN_STR) < 0);
64595 if (unlikely(__pyx_t_2)) {
64596
64597 /* "pysam/libcbcf.pyx":3281
64598 * cdef bcf1_t *r = self.ptr
64599 * if bcf_unpack(r, BCF_UN_STR) < 0:
64600 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
64601 * value = [force_bytes(v) for v in value]
64602 * if b'' in value:
64603 */
64604 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3281, __pyx_L1_error)
64605 __Pyx_GOTREF(__pyx_t_3);
64606 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
64607 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64608 __PYX_ERR(0, 3281, __pyx_L1_error)
64609
64610 /* "pysam/libcbcf.pyx":3280
64611 * #FIXME: Set alleles directly -- this is stupid
64612 * cdef bcf1_t *r = self.ptr
64613 * if bcf_unpack(r, BCF_UN_STR) < 0: # <<<<<<<<<<<<<<
64614 * raise ValueError('Error unpacking VariantRecord')
64615 * value = [force_bytes(v) for v in value]
64616 */
64617 }
64618
64619 /* "pysam/libcbcf.pyx":3282
64620 * if bcf_unpack(r, BCF_UN_STR) < 0:
64621 * raise ValueError('Error unpacking VariantRecord')
64622 * value = [force_bytes(v) for v in value] # <<<<<<<<<<<<<<
64623 * if b'' in value:
64624 * raise ValueError('cannot set null alt allele')
64625 */
64626 { /* enter inner scope */
64627 __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3282, __pyx_L6_error)
64628 __Pyx_GOTREF(__pyx_t_3);
64629 if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
64630 __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4);
64631 __pyx_t_5 = 0;
64632 __pyx_t_6 = NULL;
64633 } else {
64634 __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3282, __pyx_L6_error)
64635 __Pyx_GOTREF(__pyx_t_4);
64636 __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3282, __pyx_L6_error)
64637 }
64638 for (;;) {
64639 if (likely(!__pyx_t_6)) {
64640 if (likely(PyList_CheckExact(__pyx_t_4))) {
64641 {
64642 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
64643 #if !CYTHON_ASSUME_SAFE_MACROS
64644 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3282, __pyx_L6_error)
64645 #endif
64646 if (__pyx_t_5 >= __pyx_temp) break;
64647 }
64648 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
64649 __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3282, __pyx_L6_error)
64650 #else
64651 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3282, __pyx_L6_error)
64652 __Pyx_GOTREF(__pyx_t_7);
64653 #endif
64654 } else {
64655 {
64656 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
64657 #if !CYTHON_ASSUME_SAFE_MACROS
64658 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3282, __pyx_L6_error)
64659 #endif
64660 if (__pyx_t_5 >= __pyx_temp) break;
64661 }
64662 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
64663 __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3282, __pyx_L6_error)
64664 #else
64665 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3282, __pyx_L6_error)
64666 __Pyx_GOTREF(__pyx_t_7);
64667 #endif
64668 }
64669 } else {
64670 __pyx_t_7 = __pyx_t_6(__pyx_t_4);
64671 if (unlikely(!__pyx_t_7)) {
64672 PyObject* exc_type = PyErr_Occurred();
64673 if (exc_type) {
64674 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
64675 else __PYX_ERR(0, 3282, __pyx_L6_error)
64676 }
64677 break;
64678 }
64679 __Pyx_GOTREF(__pyx_t_7);
64680 }
64681 __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_v, __pyx_t_7);
64682 __pyx_t_7 = 0;
64683 __pyx_t_7 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_8genexpr8__pyx_v_v, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3282, __pyx_L6_error)
64684 __Pyx_GOTREF(__pyx_t_7);
64685 if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 3282, __pyx_L6_error)
64686 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
64687 }
64688 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64689 __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_v); __pyx_8genexpr8__pyx_v_v = 0;
64690 goto __pyx_L10_exit_scope;
64691 __pyx_L6_error:;
64692 __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_v); __pyx_8genexpr8__pyx_v_v = 0;
64693 goto __pyx_L1_error;
64694 __pyx_L10_exit_scope:;
64695 } /* exit inner scope */
64696 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
64697 __pyx_t_3 = 0;
64698
64699 /* "pysam/libcbcf.pyx":3283
64700 * raise ValueError('Error unpacking VariantRecord')
64701 * value = [force_bytes(v) for v in value]
64702 * if b'' in value: # <<<<<<<<<<<<<<
64703 * raise ValueError('cannot set null alt allele')
64704 * ref = [r.d.allele[0] if r.d.allele and r.n_allele else b'.']
64705 */
64706 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__12, __pyx_v_value, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 3283, __pyx_L1_error)
64707 if (unlikely(__pyx_t_2)) {
64708
64709 /* "pysam/libcbcf.pyx":3284
64710 * value = [force_bytes(v) for v in value]
64711 * if b'' in value:
64712 * raise ValueError('cannot set null alt allele') # <<<<<<<<<<<<<<
64713 * ref = [r.d.allele[0] if r.d.allele and r.n_allele else b'.']
64714 * self.alleles = ref + value
64715 */
64716 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__176, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3284, __pyx_L1_error)
64717 __Pyx_GOTREF(__pyx_t_3);
64718 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
64719 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64720 __PYX_ERR(0, 3284, __pyx_L1_error)
64721
64722 /* "pysam/libcbcf.pyx":3283
64723 * raise ValueError('Error unpacking VariantRecord')
64724 * value = [force_bytes(v) for v in value]
64725 * if b'' in value: # <<<<<<<<<<<<<<
64726 * raise ValueError('cannot set null alt allele')
64727 * ref = [r.d.allele[0] if r.d.allele and r.n_allele else b'.']
64728 */
64729 }
64730
64731 /* "pysam/libcbcf.pyx":3285
64732 * if b'' in value:
64733 * raise ValueError('cannot set null alt allele')
64734 * ref = [r.d.allele[0] if r.d.allele and r.n_allele else b'.'] # <<<<<<<<<<<<<<
64735 * self.alleles = ref + value
64736 * r.d.var_type = -1
64737 */
64738 __pyx_t_8 = (__pyx_v_r->d.allele != 0);
64739 if (__pyx_t_8) {
64740 } else {
64741 __pyx_t_2 = __pyx_t_8;
64742 goto __pyx_L12_bool_binop_done;
64743 }
64744 __pyx_t_8 = (__pyx_v_r->n_allele != 0);
64745 __pyx_t_2 = __pyx_t_8;
64746 __pyx_L12_bool_binop_done:;
64747 if (__pyx_t_2) {
64748 __pyx_t_4 = __Pyx_PyBytes_FromString((__pyx_v_r->d.allele[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3285, __pyx_L1_error)
64749 __Pyx_GOTREF(__pyx_t_4);
64750 __pyx_t_3 = __pyx_t_4;
64751 __pyx_t_4 = 0;
64752 } else {
64753 __Pyx_INCREF(__pyx_kp_b__52);
64754 __pyx_t_3 = __pyx_kp_b__52;
64755 }
64756 __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3285, __pyx_L1_error)
64757 __Pyx_GOTREF(__pyx_t_4);
64758 __Pyx_GIVEREF(__pyx_t_3);
64759 if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 3285, __pyx_L1_error);
64760 __pyx_t_3 = 0;
64761 __pyx_v_ref = ((PyObject*)__pyx_t_4);
64762 __pyx_t_4 = 0;
64763
64764 /* "pysam/libcbcf.pyx":3286
64765 * raise ValueError('cannot set null alt allele')
64766 * ref = [r.d.allele[0] if r.d.allele and r.n_allele else b'.']
64767 * self.alleles = ref + value # <<<<<<<<<<<<<<
64768 * r.d.var_type = -1
64769 *
64770 */
64771 __pyx_t_4 = PyNumber_Add(__pyx_v_ref, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3286, __pyx_L1_error)
64772 __Pyx_GOTREF(__pyx_t_4);
64773 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alleles, __pyx_t_4) < 0) __PYX_ERR(0, 3286, __pyx_L1_error)
64774 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64775
64776 /* "pysam/libcbcf.pyx":3287
64777 * ref = [r.d.allele[0] if r.d.allele and r.n_allele else b'.']
64778 * self.alleles = ref + value
64779 * r.d.var_type = -1 # <<<<<<<<<<<<<<
64780 *
64781 * @property
64782 */
64783 __pyx_v_r->d.var_type = -1;
64784
64785 /* "pysam/libcbcf.pyx":3276
64786 * return res
64787 *
64788 * @alts.setter # <<<<<<<<<<<<<<
64789 * def alts(self, value):
64790 * #FIXME: Set alleles directly -- this is stupid
64791 */
64792
64793 /* function exit code */
64794 __pyx_r = 0;
64795 goto __pyx_L0;
64796 __pyx_L1_error:;
64797 __Pyx_XDECREF(__pyx_t_3);
64798 __Pyx_XDECREF(__pyx_t_4);
64799 __Pyx_XDECREF(__pyx_t_7);
64800 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.alts.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
64801 __pyx_r = -1;
64802 __pyx_L0:;
64803 __Pyx_XDECREF(__pyx_v_ref);
64804 __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_v);
64805 __Pyx_XDECREF(__pyx_v_value);
64806 __Pyx_TraceReturn(Py_None, 0);
64807 __Pyx_RefNannyFinishContext();
64808 return __pyx_r;
64809 }
64810
64811 /* "pysam/libcbcf.pyx":3289
64812 * r.d.var_type = -1
64813 *
64814 * @property # <<<<<<<<<<<<<<
64815 * def filter(self):
64816 * """filter information (see :class:`VariantRecordFilter`)"""
64817 */
64818
64819 /* Python wrapper */
64820 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_6filter_1__get__(PyObject *__pyx_v_self); /*proto*/
64821 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_6filter_1__get__(PyObject *__pyx_v_self) {
64822 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
64823 PyObject *__pyx_r = 0;
64824 __Pyx_RefNannyDeclarations
64825 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
64826 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
64827 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_6filter___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
64828
64829 /* function exit code */
64830 __Pyx_RefNannyFinishContext();
64831 return __pyx_r;
64832 }
64833
64834 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6filter___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
64835 PyObject *__pyx_r = NULL;
64836 __Pyx_TraceDeclarations
64837 __Pyx_RefNannyDeclarations
64838 int __pyx_t_1;
64839 PyObject *__pyx_t_2 = NULL;
64840 int __pyx_lineno = 0;
64841 const char *__pyx_filename = NULL;
64842 int __pyx_clineno = 0;
64843 __Pyx_RefNannySetupContext("__get__", 1);
64844 __Pyx_TraceCall("__get__", __pyx_f[0], 3289, 0, __PYX_ERR(0, 3289, __pyx_L1_error));
64845
64846 /* "pysam/libcbcf.pyx":3292
64847 * def filter(self):
64848 * """filter information (see :class:`VariantRecordFilter`)"""
64849 * if bcf_unpack(self.ptr, BCF_UN_FLT) < 0: # <<<<<<<<<<<<<<
64850 * raise ValueError('Error unpacking VariantRecord')
64851 * return makeVariantRecordFilter(self)
64852 */
64853 __pyx_t_1 = (bcf_unpack(__pyx_v_self->ptr, BCF_UN_FLT) < 0);
64854 if (unlikely(__pyx_t_1)) {
64855
64856 /* "pysam/libcbcf.pyx":3293
64857 * """filter information (see :class:`VariantRecordFilter`)"""
64858 * if bcf_unpack(self.ptr, BCF_UN_FLT) < 0:
64859 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
64860 * return makeVariantRecordFilter(self)
64861 *
64862 */
64863 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3293, __pyx_L1_error)
64864 __Pyx_GOTREF(__pyx_t_2);
64865 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
64866 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
64867 __PYX_ERR(0, 3293, __pyx_L1_error)
64868
64869 /* "pysam/libcbcf.pyx":3292
64870 * def filter(self):
64871 * """filter information (see :class:`VariantRecordFilter`)"""
64872 * if bcf_unpack(self.ptr, BCF_UN_FLT) < 0: # <<<<<<<<<<<<<<
64873 * raise ValueError('Error unpacking VariantRecord')
64874 * return makeVariantRecordFilter(self)
64875 */
64876 }
64877
64878 /* "pysam/libcbcf.pyx":3294
64879 * if bcf_unpack(self.ptr, BCF_UN_FLT) < 0:
64880 * raise ValueError('Error unpacking VariantRecord')
64881 * return makeVariantRecordFilter(self) # <<<<<<<<<<<<<<
64882 *
64883 * @property
64884 */
64885 __Pyx_XDECREF(__pyx_r);
64886 __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecordFilter(__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3294, __pyx_L1_error)
64887 __Pyx_GOTREF(__pyx_t_2);
64888 __pyx_r = __pyx_t_2;
64889 __pyx_t_2 = 0;
64890 goto __pyx_L0;
64891
64892 /* "pysam/libcbcf.pyx":3289
64893 * r.d.var_type = -1
64894 *
64895 * @property # <<<<<<<<<<<<<<
64896 * def filter(self):
64897 * """filter information (see :class:`VariantRecordFilter`)"""
64898 */
64899
64900 /* function exit code */
64901 __pyx_L1_error:;
64902 __Pyx_XDECREF(__pyx_t_2);
64903 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.filter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
64904 __pyx_r = NULL;
64905 __pyx_L0:;
64906 __Pyx_XGIVEREF(__pyx_r);
64907 __Pyx_TraceReturn(__pyx_r, 0);
64908 __Pyx_RefNannyFinishContext();
64909 return __pyx_r;
64910 }
64911
64912 /* "pysam/libcbcf.pyx":3296
64913 * return makeVariantRecordFilter(self)
64914 *
64915 * @property # <<<<<<<<<<<<<<
64916 * def info(self):
64917 * """info data (see :class:`VariantRecordInfo`)"""
64918 */
64919
64920 /* Python wrapper */
64921 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4info_1__get__(PyObject *__pyx_v_self); /*proto*/
64922 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_4info_1__get__(PyObject *__pyx_v_self) {
64923 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
64924 PyObject *__pyx_r = 0;
64925 __Pyx_RefNannyDeclarations
64926 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
64927 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
64928 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_4info___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
64929
64930 /* function exit code */
64931 __Pyx_RefNannyFinishContext();
64932 return __pyx_r;
64933 }
64934
64935 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_4info___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
64936 PyObject *__pyx_r = NULL;
64937 __Pyx_TraceDeclarations
64938 __Pyx_RefNannyDeclarations
64939 int __pyx_t_1;
64940 PyObject *__pyx_t_2 = NULL;
64941 int __pyx_lineno = 0;
64942 const char *__pyx_filename = NULL;
64943 int __pyx_clineno = 0;
64944 __Pyx_RefNannySetupContext("__get__", 1);
64945 __Pyx_TraceCall("__get__", __pyx_f[0], 3296, 0, __PYX_ERR(0, 3296, __pyx_L1_error));
64946
64947 /* "pysam/libcbcf.pyx":3299
64948 * def info(self):
64949 * """info data (see :class:`VariantRecordInfo`)"""
64950 * if bcf_unpack(self.ptr, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
64951 * raise ValueError('Error unpacking VariantRecord')
64952 * return makeVariantRecordInfo(self)
64953 */
64954 __pyx_t_1 = (bcf_unpack(__pyx_v_self->ptr, BCF_UN_INFO) < 0);
64955 if (unlikely(__pyx_t_1)) {
64956
64957 /* "pysam/libcbcf.pyx":3300
64958 * """info data (see :class:`VariantRecordInfo`)"""
64959 * if bcf_unpack(self.ptr, BCF_UN_INFO) < 0:
64960 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
64961 * return makeVariantRecordInfo(self)
64962 *
64963 */
64964 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3300, __pyx_L1_error)
64965 __Pyx_GOTREF(__pyx_t_2);
64966 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
64967 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
64968 __PYX_ERR(0, 3300, __pyx_L1_error)
64969
64970 /* "pysam/libcbcf.pyx":3299
64971 * def info(self):
64972 * """info data (see :class:`VariantRecordInfo`)"""
64973 * if bcf_unpack(self.ptr, BCF_UN_INFO) < 0: # <<<<<<<<<<<<<<
64974 * raise ValueError('Error unpacking VariantRecord')
64975 * return makeVariantRecordInfo(self)
64976 */
64977 }
64978
64979 /* "pysam/libcbcf.pyx":3301
64980 * if bcf_unpack(self.ptr, BCF_UN_INFO) < 0:
64981 * raise ValueError('Error unpacking VariantRecord')
64982 * return makeVariantRecordInfo(self) # <<<<<<<<<<<<<<
64983 *
64984 * @property
64985 */
64986 __Pyx_XDECREF(__pyx_r);
64987 __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecordInfo(__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3301, __pyx_L1_error)
64988 __Pyx_GOTREF(__pyx_t_2);
64989 __pyx_r = __pyx_t_2;
64990 __pyx_t_2 = 0;
64991 goto __pyx_L0;
64992
64993 /* "pysam/libcbcf.pyx":3296
64994 * return makeVariantRecordFilter(self)
64995 *
64996 * @property # <<<<<<<<<<<<<<
64997 * def info(self):
64998 * """info data (see :class:`VariantRecordInfo`)"""
64999 */
65000
65001 /* function exit code */
65002 __pyx_L1_error:;
65003 __Pyx_XDECREF(__pyx_t_2);
65004 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
65005 __pyx_r = NULL;
65006 __pyx_L0:;
65007 __Pyx_XGIVEREF(__pyx_r);
65008 __Pyx_TraceReturn(__pyx_r, 0);
65009 __Pyx_RefNannyFinishContext();
65010 return __pyx_r;
65011 }
65012
65013 /* "pysam/libcbcf.pyx":3303
65014 * return makeVariantRecordInfo(self)
65015 *
65016 * @property # <<<<<<<<<<<<<<
65017 * def format(self):
65018 * """sample format metadata (see :class:`VariantRecordFormat`)"""
65019 */
65020
65021 /* Python wrapper */
65022 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
65023 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_6format_1__get__(PyObject *__pyx_v_self) {
65024 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
65025 PyObject *__pyx_r = 0;
65026 __Pyx_RefNannyDeclarations
65027 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
65028 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
65029 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_6format___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
65030
65031 /* function exit code */
65032 __Pyx_RefNannyFinishContext();
65033 return __pyx_r;
65034 }
65035
65036 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6format___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
65037 PyObject *__pyx_r = NULL;
65038 __Pyx_TraceDeclarations
65039 __Pyx_RefNannyDeclarations
65040 int __pyx_t_1;
65041 PyObject *__pyx_t_2 = NULL;
65042 int __pyx_lineno = 0;
65043 const char *__pyx_filename = NULL;
65044 int __pyx_clineno = 0;
65045 __Pyx_RefNannySetupContext("__get__", 1);
65046 __Pyx_TraceCall("__get__", __pyx_f[0], 3303, 0, __PYX_ERR(0, 3303, __pyx_L1_error));
65047
65048 /* "pysam/libcbcf.pyx":3306
65049 * def format(self):
65050 * """sample format metadata (see :class:`VariantRecordFormat`)"""
65051 * if bcf_unpack(self.ptr, BCF_UN_FMT) < 0: # <<<<<<<<<<<<<<
65052 * raise ValueError('Error unpacking VariantRecord')
65053 * return makeVariantRecordFormat(self)
65054 */
65055 __pyx_t_1 = (bcf_unpack(__pyx_v_self->ptr, BCF_UN_FMT) < 0);
65056 if (unlikely(__pyx_t_1)) {
65057
65058 /* "pysam/libcbcf.pyx":3307
65059 * """sample format metadata (see :class:`VariantRecordFormat`)"""
65060 * if bcf_unpack(self.ptr, BCF_UN_FMT) < 0:
65061 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
65062 * return makeVariantRecordFormat(self)
65063 *
65064 */
65065 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3307, __pyx_L1_error)
65066 __Pyx_GOTREF(__pyx_t_2);
65067 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
65068 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
65069 __PYX_ERR(0, 3307, __pyx_L1_error)
65070
65071 /* "pysam/libcbcf.pyx":3306
65072 * def format(self):
65073 * """sample format metadata (see :class:`VariantRecordFormat`)"""
65074 * if bcf_unpack(self.ptr, BCF_UN_FMT) < 0: # <<<<<<<<<<<<<<
65075 * raise ValueError('Error unpacking VariantRecord')
65076 * return makeVariantRecordFormat(self)
65077 */
65078 }
65079
65080 /* "pysam/libcbcf.pyx":3308
65081 * if bcf_unpack(self.ptr, BCF_UN_FMT) < 0:
65082 * raise ValueError('Error unpacking VariantRecord')
65083 * return makeVariantRecordFormat(self) # <<<<<<<<<<<<<<
65084 *
65085 * @property
65086 */
65087 __Pyx_XDECREF(__pyx_r);
65088 __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecordFormat(__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3308, __pyx_L1_error)
65089 __Pyx_GOTREF(__pyx_t_2);
65090 __pyx_r = __pyx_t_2;
65091 __pyx_t_2 = 0;
65092 goto __pyx_L0;
65093
65094 /* "pysam/libcbcf.pyx":3303
65095 * return makeVariantRecordInfo(self)
65096 *
65097 * @property # <<<<<<<<<<<<<<
65098 * def format(self):
65099 * """sample format metadata (see :class:`VariantRecordFormat`)"""
65100 */
65101
65102 /* function exit code */
65103 __pyx_L1_error:;
65104 __Pyx_XDECREF(__pyx_t_2);
65105 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
65106 __pyx_r = NULL;
65107 __pyx_L0:;
65108 __Pyx_XGIVEREF(__pyx_r);
65109 __Pyx_TraceReturn(__pyx_r, 0);
65110 __Pyx_RefNannyFinishContext();
65111 return __pyx_r;
65112 }
65113
65114 /* "pysam/libcbcf.pyx":3310
65115 * return makeVariantRecordFormat(self)
65116 *
65117 * @property # <<<<<<<<<<<<<<
65118 * def samples(self):
65119 * """sample data (see :class:`VariantRecordSamples`)"""
65120 */
65121
65122 /* Python wrapper */
65123 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_7samples_1__get__(PyObject *__pyx_v_self); /*proto*/
65124 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_7samples_1__get__(PyObject *__pyx_v_self) {
65125 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
65126 PyObject *__pyx_r = 0;
65127 __Pyx_RefNannyDeclarations
65128 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
65129 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
65130 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_7samples___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
65131
65132 /* function exit code */
65133 __Pyx_RefNannyFinishContext();
65134 return __pyx_r;
65135 }
65136
65137 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_7samples___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
65138 PyObject *__pyx_r = NULL;
65139 __Pyx_TraceDeclarations
65140 __Pyx_RefNannyDeclarations
65141 int __pyx_t_1;
65142 PyObject *__pyx_t_2 = NULL;
65143 int __pyx_lineno = 0;
65144 const char *__pyx_filename = NULL;
65145 int __pyx_clineno = 0;
65146 __Pyx_RefNannySetupContext("__get__", 1);
65147 __Pyx_TraceCall("__get__", __pyx_f[0], 3310, 0, __PYX_ERR(0, 3310, __pyx_L1_error));
65148
65149 /* "pysam/libcbcf.pyx":3313
65150 * def samples(self):
65151 * """sample data (see :class:`VariantRecordSamples`)"""
65152 * if bcf_unpack(self.ptr, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
65153 * raise ValueError('Error unpacking VariantRecord')
65154 * return makeVariantRecordSamples(self)
65155 */
65156 __pyx_t_1 = (bcf_unpack(__pyx_v_self->ptr, BCF_UN_ALL) < 0);
65157 if (unlikely(__pyx_t_1)) {
65158
65159 /* "pysam/libcbcf.pyx":3314
65160 * """sample data (see :class:`VariantRecordSamples`)"""
65161 * if bcf_unpack(self.ptr, BCF_UN_ALL) < 0:
65162 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
65163 * return makeVariantRecordSamples(self)
65164 *
65165 */
65166 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3314, __pyx_L1_error)
65167 __Pyx_GOTREF(__pyx_t_2);
65168 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
65169 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
65170 __PYX_ERR(0, 3314, __pyx_L1_error)
65171
65172 /* "pysam/libcbcf.pyx":3313
65173 * def samples(self):
65174 * """sample data (see :class:`VariantRecordSamples`)"""
65175 * if bcf_unpack(self.ptr, BCF_UN_ALL) < 0: # <<<<<<<<<<<<<<
65176 * raise ValueError('Error unpacking VariantRecord')
65177 * return makeVariantRecordSamples(self)
65178 */
65179 }
65180
65181 /* "pysam/libcbcf.pyx":3315
65182 * if bcf_unpack(self.ptr, BCF_UN_ALL) < 0:
65183 * raise ValueError('Error unpacking VariantRecord')
65184 * return makeVariantRecordSamples(self) # <<<<<<<<<<<<<<
65185 *
65186 * property alleles_variant_types:
65187 */
65188 __Pyx_XDECREF(__pyx_r);
65189 __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecordSamples(__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3315, __pyx_L1_error)
65190 __Pyx_GOTREF(__pyx_t_2);
65191 __pyx_r = __pyx_t_2;
65192 __pyx_t_2 = 0;
65193 goto __pyx_L0;
65194
65195 /* "pysam/libcbcf.pyx":3310
65196 * return makeVariantRecordFormat(self)
65197 *
65198 * @property # <<<<<<<<<<<<<<
65199 * def samples(self):
65200 * """sample data (see :class:`VariantRecordSamples`)"""
65201 */
65202
65203 /* function exit code */
65204 __pyx_L1_error:;
65205 __Pyx_XDECREF(__pyx_t_2);
65206 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.samples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
65207 __pyx_r = NULL;
65208 __pyx_L0:;
65209 __Pyx_XGIVEREF(__pyx_r);
65210 __Pyx_TraceReturn(__pyx_r, 0);
65211 __Pyx_RefNannyFinishContext();
65212 return __pyx_r;
65213 }
65214
65215 /* "pysam/libcbcf.pyx":3318
65216 *
65217 * property alleles_variant_types:
65218 * def __get__(self): # <<<<<<<<<<<<<<
65219 * cdef bcf1_t *r = self.ptr
65220 * cdef tuple result = PyTuple_New(r.n_allele)
65221 */
65222
65223 /* Python wrapper */
65224 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_21alleles_variant_types_1__get__(PyObject *__pyx_v_self); /*proto*/
65225 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_21alleles_variant_types_1__get__(PyObject *__pyx_v_self) {
65226 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
65227 PyObject *__pyx_r = 0;
65228 __Pyx_RefNannyDeclarations
65229 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
65230 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
65231 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_21alleles_variant_types___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
65232
65233 /* function exit code */
65234 __Pyx_RefNannyFinishContext();
65235 return __pyx_r;
65236 }
65237
65238 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_21alleles_variant_types___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
65239 bcf1_t *__pyx_v_r;
65240 PyObject *__pyx_v_result = 0;
65241 uint32_t __pyx_v_i;
65242 int __pyx_v_tp;
65243 PyObject *__pyx_v_v_type = NULL;
65244 PyObject *__pyx_r = NULL;
65245 __Pyx_TraceDeclarations
65246 __Pyx_RefNannyDeclarations
65247 bcf1_t *__pyx_t_1;
65248 PyObject *__pyx_t_2 = NULL;
65249 uint32_t __pyx_t_3;
65250 uint32_t __pyx_t_4;
65251 uint32_t __pyx_t_5;
65252 int __pyx_t_6;
65253 int __pyx_lineno = 0;
65254 const char *__pyx_filename = NULL;
65255 int __pyx_clineno = 0;
65256 __Pyx_RefNannySetupContext("__get__", 1);
65257 __Pyx_TraceCall("__get__", __pyx_f[0], 3318, 0, __PYX_ERR(0, 3318, __pyx_L1_error));
65258
65259 /* "pysam/libcbcf.pyx":3319
65260 * property alleles_variant_types:
65261 * def __get__(self):
65262 * cdef bcf1_t *r = self.ptr # <<<<<<<<<<<<<<
65263 * cdef tuple result = PyTuple_New(r.n_allele)
65264 *
65265 */
65266 __pyx_t_1 = __pyx_v_self->ptr;
65267 __pyx_v_r = __pyx_t_1;
65268
65269 /* "pysam/libcbcf.pyx":3320
65270 * def __get__(self):
65271 * cdef bcf1_t *r = self.ptr
65272 * cdef tuple result = PyTuple_New(r.n_allele) # <<<<<<<<<<<<<<
65273 *
65274 * for i in range(r.n_allele):
65275 */
65276 __pyx_t_2 = PyTuple_New(__pyx_v_r->n_allele); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3320, __pyx_L1_error)
65277 __Pyx_GOTREF(__pyx_t_2);
65278 __pyx_v_result = ((PyObject*)__pyx_t_2);
65279 __pyx_t_2 = 0;
65280
65281 /* "pysam/libcbcf.pyx":3322
65282 * cdef tuple result = PyTuple_New(r.n_allele)
65283 *
65284 * for i in range(r.n_allele): # <<<<<<<<<<<<<<
65285 * tp = bcf_get_variant_type(r, i)
65286 *
65287 */
65288 __pyx_t_3 = __pyx_v_r->n_allele;
65289 __pyx_t_4 = __pyx_t_3;
65290 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
65291 __pyx_v_i = __pyx_t_5;
65292
65293 /* "pysam/libcbcf.pyx":3323
65294 *
65295 * for i in range(r.n_allele):
65296 * tp = bcf_get_variant_type(r, i) # <<<<<<<<<<<<<<
65297 *
65298 * if tp == VCF_REF:
65299 */
65300 __pyx_v_tp = bcf_get_variant_type(__pyx_v_r, __pyx_v_i);
65301
65302 /* "pysam/libcbcf.pyx":3325
65303 * tp = bcf_get_variant_type(r, i)
65304 *
65305 * if tp == VCF_REF: # <<<<<<<<<<<<<<
65306 * v_type = "REF"
65307 * elif tp == VCF_SNP:
65308 */
65309 __pyx_t_6 = (__pyx_v_tp == VCF_REF);
65310 if (__pyx_t_6) {
65311
65312 /* "pysam/libcbcf.pyx":3326
65313 *
65314 * if tp == VCF_REF:
65315 * v_type = "REF" # <<<<<<<<<<<<<<
65316 * elif tp == VCF_SNP:
65317 * v_type = "SNP"
65318 */
65319 __Pyx_INCREF(__pyx_n_u_REF);
65320 __Pyx_XDECREF_SET(__pyx_v_v_type, __pyx_n_u_REF);
65321
65322 /* "pysam/libcbcf.pyx":3325
65323 * tp = bcf_get_variant_type(r, i)
65324 *
65325 * if tp == VCF_REF: # <<<<<<<<<<<<<<
65326 * v_type = "REF"
65327 * elif tp == VCF_SNP:
65328 */
65329 goto __pyx_L5;
65330 }
65331
65332 /* "pysam/libcbcf.pyx":3327
65333 * if tp == VCF_REF:
65334 * v_type = "REF"
65335 * elif tp == VCF_SNP: # <<<<<<<<<<<<<<
65336 * v_type = "SNP"
65337 * elif tp == VCF_MNP:
65338 */
65339 __pyx_t_6 = (__pyx_v_tp == VCF_SNP);
65340 if (__pyx_t_6) {
65341
65342 /* "pysam/libcbcf.pyx":3328
65343 * v_type = "REF"
65344 * elif tp == VCF_SNP:
65345 * v_type = "SNP" # <<<<<<<<<<<<<<
65346 * elif tp == VCF_MNP:
65347 * v_type = "MNP"
65348 */
65349 __Pyx_INCREF(__pyx_n_u_SNP);
65350 __Pyx_XDECREF_SET(__pyx_v_v_type, __pyx_n_u_SNP);
65351
65352 /* "pysam/libcbcf.pyx":3327
65353 * if tp == VCF_REF:
65354 * v_type = "REF"
65355 * elif tp == VCF_SNP: # <<<<<<<<<<<<<<
65356 * v_type = "SNP"
65357 * elif tp == VCF_MNP:
65358 */
65359 goto __pyx_L5;
65360 }
65361
65362 /* "pysam/libcbcf.pyx":3329
65363 * elif tp == VCF_SNP:
65364 * v_type = "SNP"
65365 * elif tp == VCF_MNP: # <<<<<<<<<<<<<<
65366 * v_type = "MNP"
65367 * elif tp == VCF_INDEL:
65368 */
65369 __pyx_t_6 = (__pyx_v_tp == VCF_MNP);
65370 if (__pyx_t_6) {
65371
65372 /* "pysam/libcbcf.pyx":3330
65373 * v_type = "SNP"
65374 * elif tp == VCF_MNP:
65375 * v_type = "MNP" # <<<<<<<<<<<<<<
65376 * elif tp == VCF_INDEL:
65377 * v_type = "INDEL"
65378 */
65379 __Pyx_INCREF(__pyx_n_u_MNP);
65380 __Pyx_XDECREF_SET(__pyx_v_v_type, __pyx_n_u_MNP);
65381
65382 /* "pysam/libcbcf.pyx":3329
65383 * elif tp == VCF_SNP:
65384 * v_type = "SNP"
65385 * elif tp == VCF_MNP: # <<<<<<<<<<<<<<
65386 * v_type = "MNP"
65387 * elif tp == VCF_INDEL:
65388 */
65389 goto __pyx_L5;
65390 }
65391
65392 /* "pysam/libcbcf.pyx":3331
65393 * elif tp == VCF_MNP:
65394 * v_type = "MNP"
65395 * elif tp == VCF_INDEL: # <<<<<<<<<<<<<<
65396 * v_type = "INDEL"
65397 * elif tp == VCF_BND:
65398 */
65399 __pyx_t_6 = (__pyx_v_tp == VCF_INDEL);
65400 if (__pyx_t_6) {
65401
65402 /* "pysam/libcbcf.pyx":3332
65403 * v_type = "MNP"
65404 * elif tp == VCF_INDEL:
65405 * v_type = "INDEL" # <<<<<<<<<<<<<<
65406 * elif tp == VCF_BND:
65407 * v_type = "BND"
65408 */
65409 __Pyx_INCREF(__pyx_n_u_INDEL);
65410 __Pyx_XDECREF_SET(__pyx_v_v_type, __pyx_n_u_INDEL);
65411
65412 /* "pysam/libcbcf.pyx":3331
65413 * elif tp == VCF_MNP:
65414 * v_type = "MNP"
65415 * elif tp == VCF_INDEL: # <<<<<<<<<<<<<<
65416 * v_type = "INDEL"
65417 * elif tp == VCF_BND:
65418 */
65419 goto __pyx_L5;
65420 }
65421
65422 /* "pysam/libcbcf.pyx":3333
65423 * elif tp == VCF_INDEL:
65424 * v_type = "INDEL"
65425 * elif tp == VCF_BND: # <<<<<<<<<<<<<<
65426 * v_type = "BND"
65427 * elif tp == VCF_OVERLAP:
65428 */
65429 __pyx_t_6 = (__pyx_v_tp == VCF_BND);
65430 if (__pyx_t_6) {
65431
65432 /* "pysam/libcbcf.pyx":3334
65433 * v_type = "INDEL"
65434 * elif tp == VCF_BND:
65435 * v_type = "BND" # <<<<<<<<<<<<<<
65436 * elif tp == VCF_OVERLAP:
65437 * v_type = "OVERLAP"
65438 */
65439 __Pyx_INCREF(__pyx_n_u_BND);
65440 __Pyx_XDECREF_SET(__pyx_v_v_type, __pyx_n_u_BND);
65441
65442 /* "pysam/libcbcf.pyx":3333
65443 * elif tp == VCF_INDEL:
65444 * v_type = "INDEL"
65445 * elif tp == VCF_BND: # <<<<<<<<<<<<<<
65446 * v_type = "BND"
65447 * elif tp == VCF_OVERLAP:
65448 */
65449 goto __pyx_L5;
65450 }
65451
65452 /* "pysam/libcbcf.pyx":3335
65453 * elif tp == VCF_BND:
65454 * v_type = "BND"
65455 * elif tp == VCF_OVERLAP: # <<<<<<<<<<<<<<
65456 * v_type = "OVERLAP"
65457 * else:
65458 */
65459 __pyx_t_6 = (__pyx_v_tp == VCF_OVERLAP);
65460 if (__pyx_t_6) {
65461
65462 /* "pysam/libcbcf.pyx":3336
65463 * v_type = "BND"
65464 * elif tp == VCF_OVERLAP:
65465 * v_type = "OVERLAP" # <<<<<<<<<<<<<<
65466 * else:
65467 * v_type = "OTHER"
65468 */
65469 __Pyx_INCREF(__pyx_n_u_OVERLAP);
65470 __Pyx_XDECREF_SET(__pyx_v_v_type, __pyx_n_u_OVERLAP);
65471
65472 /* "pysam/libcbcf.pyx":3335
65473 * elif tp == VCF_BND:
65474 * v_type = "BND"
65475 * elif tp == VCF_OVERLAP: # <<<<<<<<<<<<<<
65476 * v_type = "OVERLAP"
65477 * else:
65478 */
65479 goto __pyx_L5;
65480 }
65481
65482 /* "pysam/libcbcf.pyx":3338
65483 * v_type = "OVERLAP"
65484 * else:
65485 * v_type = "OTHER" # <<<<<<<<<<<<<<
65486 *
65487 * PyTuple_SET_ITEM(result, i, v_type)
65488 */
65489 /*else*/ {
65490 __Pyx_INCREF(__pyx_n_u_OTHER);
65491 __Pyx_XDECREF_SET(__pyx_v_v_type, __pyx_n_u_OTHER);
65492 }
65493 __pyx_L5:;
65494
65495 /* "pysam/libcbcf.pyx":3340
65496 * v_type = "OTHER"
65497 *
65498 * PyTuple_SET_ITEM(result, i, v_type) # <<<<<<<<<<<<<<
65499 * Py_INCREF(v_type)
65500 *
65501 */
65502 PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_v_type);
65503
65504 /* "pysam/libcbcf.pyx":3341
65505 *
65506 * PyTuple_SET_ITEM(result, i, v_type)
65507 * Py_INCREF(v_type) # <<<<<<<<<<<<<<
65508 *
65509 * return result
65510 */
65511 Py_INCREF(__pyx_v_v_type);
65512 }
65513
65514 /* "pysam/libcbcf.pyx":3343
65515 * Py_INCREF(v_type)
65516 *
65517 * return result # <<<<<<<<<<<<<<
65518 *
65519 * def __richcmp__(VariantRecord self not None, VariantRecord other not None, int op):
65520 */
65521 __Pyx_XDECREF(__pyx_r);
65522 __Pyx_INCREF(__pyx_v_result);
65523 __pyx_r = __pyx_v_result;
65524 goto __pyx_L0;
65525
65526 /* "pysam/libcbcf.pyx":3318
65527 *
65528 * property alleles_variant_types:
65529 * def __get__(self): # <<<<<<<<<<<<<<
65530 * cdef bcf1_t *r = self.ptr
65531 * cdef tuple result = PyTuple_New(r.n_allele)
65532 */
65533
65534 /* function exit code */
65535 __pyx_L1_error:;
65536 __Pyx_XDECREF(__pyx_t_2);
65537 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.alleles_variant_types.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
65538 __pyx_r = NULL;
65539 __pyx_L0:;
65540 __Pyx_XDECREF(__pyx_v_result);
65541 __Pyx_XDECREF(__pyx_v_v_type);
65542 __Pyx_XGIVEREF(__pyx_r);
65543 __Pyx_TraceReturn(__pyx_r, 0);
65544 __Pyx_RefNannyFinishContext();
65545 return __pyx_r;
65546 }
65547
65548 /* "pysam/libcbcf.pyx":3345
65549 * return result
65550 *
65551 * def __richcmp__(VariantRecord self not None, VariantRecord other not None, int op): # <<<<<<<<<<<<<<
65552 * if op != 2 and op != 3:
65553 * return NotImplemented
65554 */
65555
65556 /* Python wrapper */
65557 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_9__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
65558 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_9__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
65559 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
65560 int __pyx_lineno = 0;
65561 const char *__pyx_filename = NULL;
65562 int __pyx_clineno = 0;
65563 PyObject *__pyx_r = 0;
65564 __Pyx_RefNannyDeclarations
65565 __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
65566 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
65567 if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
65568 PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 3345, __pyx_L1_error)
65569 }
65570 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_7libcbcf_VariantRecord, 0, "other", 0))) __PYX_ERR(0, 3345, __pyx_L1_error)
65571 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_8__richcmp__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_other), ((int)__pyx_v_op));
65572
65573 /* function exit code */
65574 goto __pyx_L0;
65575 __pyx_L1_error:;
65576 __pyx_r = NULL;
65577 __pyx_L0:;
65578 __Pyx_RefNannyFinishContext();
65579 return __pyx_r;
65580 }
65581
65582 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_8__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_other, int __pyx_v_op) {
65583 bcf1_t *__pyx_v_s;
65584 bcf1_t *__pyx_v_o;
65585 int __pyx_v_cmp;
65586 PyObject *__pyx_r = NULL;
65587 __Pyx_TraceDeclarations
65588 __Pyx_RefNannyDeclarations
65589 int __pyx_t_1;
65590 bcf1_t *__pyx_t_2;
65591 int __pyx_t_3;
65592 PyObject *__pyx_t_4 = NULL;
65593 PyObject *__pyx_t_5 = NULL;
65594 PyObject *__pyx_t_6 = NULL;
65595 int __pyx_lineno = 0;
65596 const char *__pyx_filename = NULL;
65597 int __pyx_clineno = 0;
65598 __Pyx_RefNannySetupContext("__richcmp__", 1);
65599 __Pyx_TraceCall("__richcmp__", __pyx_f[0], 3345, 0, __PYX_ERR(0, 3345, __pyx_L1_error));
65600
65601 /* "pysam/libcbcf.pyx":3346
65602 *
65603 * def __richcmp__(VariantRecord self not None, VariantRecord other not None, int op):
65604 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
65605 * return NotImplemented
65606 *
65607 */
65608 switch (__pyx_v_op) {
65609 case 2:
65610 case 3:
65611 __pyx_t_1 = 0;
65612 break;
65613 default:
65614 __pyx_t_1 = 1;
65615 break;
65616 }
65617 if (__pyx_t_1) {
65618
65619 /* "pysam/libcbcf.pyx":3347
65620 * def __richcmp__(VariantRecord self not None, VariantRecord other not None, int op):
65621 * if op != 2 and op != 3:
65622 * return NotImplemented # <<<<<<<<<<<<<<
65623 *
65624 * cdef bcf1_t *s = self.ptr
65625 */
65626 __Pyx_XDECREF(__pyx_r);
65627 __Pyx_INCREF(__pyx_builtin_NotImplemented);
65628 __pyx_r = __pyx_builtin_NotImplemented;
65629 goto __pyx_L0;
65630
65631 /* "pysam/libcbcf.pyx":3346
65632 *
65633 * def __richcmp__(VariantRecord self not None, VariantRecord other not None, int op):
65634 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
65635 * return NotImplemented
65636 *
65637 */
65638 }
65639
65640 /* "pysam/libcbcf.pyx":3349
65641 * return NotImplemented
65642 *
65643 * cdef bcf1_t *s = self.ptr # <<<<<<<<<<<<<<
65644 * cdef bcf1_t *o = other.ptr
65645 *
65646 */
65647 __pyx_t_2 = __pyx_v_self->ptr;
65648 __pyx_v_s = __pyx_t_2;
65649
65650 /* "pysam/libcbcf.pyx":3350
65651 *
65652 * cdef bcf1_t *s = self.ptr
65653 * cdef bcf1_t *o = other.ptr # <<<<<<<<<<<<<<
65654 *
65655 * cdef bint cmp = self is other or (
65656 */
65657 __pyx_t_2 = __pyx_v_other->ptr;
65658 __pyx_v_o = __pyx_t_2;
65659
65660 /* "pysam/libcbcf.pyx":3352
65661 * cdef bcf1_t *o = other.ptr
65662 *
65663 * cdef bint cmp = self is other or ( # <<<<<<<<<<<<<<
65664 * s.pos == o.pos
65665 * and s.rlen == o.rlen
65666 */
65667 __pyx_t_3 = (__pyx_v_self == __pyx_v_other);
65668 if (!__pyx_t_3) {
65669 } else {
65670 __pyx_t_1 = __pyx_t_3;
65671 goto __pyx_L4_bool_binop_done;
65672 }
65673
65674 /* "pysam/libcbcf.pyx":3353
65675 *
65676 * cdef bint cmp = self is other or (
65677 * s.pos == o.pos # <<<<<<<<<<<<<<
65678 * and s.rlen == o.rlen
65679 * and ((bcf_float_is_missing(s.qual) and bcf_float_is_missing(o.qual))
65680 */
65681 __pyx_t_3 = (__pyx_v_s->pos == __pyx_v_o->pos);
65682 if (__pyx_t_3) {
65683 } else {
65684 __pyx_t_1 = __pyx_t_3;
65685 goto __pyx_L4_bool_binop_done;
65686 }
65687
65688 /* "pysam/libcbcf.pyx":3354
65689 * cdef bint cmp = self is other or (
65690 * s.pos == o.pos
65691 * and s.rlen == o.rlen # <<<<<<<<<<<<<<
65692 * and ((bcf_float_is_missing(s.qual) and bcf_float_is_missing(o.qual))
65693 * or s.qual == o.qual)
65694 */
65695 __pyx_t_3 = (__pyx_v_s->rlen == __pyx_v_o->rlen);
65696 if (__pyx_t_3) {
65697 } else {
65698 __pyx_t_1 = __pyx_t_3;
65699 goto __pyx_L4_bool_binop_done;
65700 }
65701
65702 /* "pysam/libcbcf.pyx":3355
65703 * s.pos == o.pos
65704 * and s.rlen == o.rlen
65705 * and ((bcf_float_is_missing(s.qual) and bcf_float_is_missing(o.qual)) # <<<<<<<<<<<<<<
65706 * or s.qual == o.qual)
65707 * and s.n_sample == o.n_sample
65708 */
65709 __pyx_t_3 = (bcf_float_is_missing(__pyx_v_s->qual) != 0);
65710 if (!__pyx_t_3) {
65711 goto __pyx_L9_next_or;
65712 } else {
65713 }
65714 __pyx_t_3 = (bcf_float_is_missing(__pyx_v_o->qual) != 0);
65715 if (!__pyx_t_3) {
65716 } else {
65717 goto __pyx_L8_next_and;
65718 }
65719 __pyx_L9_next_or:;
65720
65721 /* "pysam/libcbcf.pyx":3356
65722 * and s.rlen == o.rlen
65723 * and ((bcf_float_is_missing(s.qual) and bcf_float_is_missing(o.qual))
65724 * or s.qual == o.qual) # <<<<<<<<<<<<<<
65725 * and s.n_sample == o.n_sample
65726 * and s.n_allele == o.n_allele
65727 */
65728 __pyx_t_3 = (__pyx_v_s->qual == __pyx_v_o->qual);
65729 if (__pyx_t_3) {
65730 } else {
65731 __pyx_t_1 = __pyx_t_3;
65732 goto __pyx_L4_bool_binop_done;
65733 }
65734 __pyx_L8_next_and:;
65735
65736 /* "pysam/libcbcf.pyx":3357
65737 * and ((bcf_float_is_missing(s.qual) and bcf_float_is_missing(o.qual))
65738 * or s.qual == o.qual)
65739 * and s.n_sample == o.n_sample # <<<<<<<<<<<<<<
65740 * and s.n_allele == o.n_allele
65741 * and self.contig == other.contig
65742 */
65743 __pyx_t_3 = (__pyx_v_s->n_sample == __pyx_v_o->n_sample);
65744 if (__pyx_t_3) {
65745 } else {
65746 __pyx_t_1 = __pyx_t_3;
65747 goto __pyx_L4_bool_binop_done;
65748 }
65749
65750 /* "pysam/libcbcf.pyx":3358
65751 * or s.qual == o.qual)
65752 * and s.n_sample == o.n_sample
65753 * and s.n_allele == o.n_allele # <<<<<<<<<<<<<<
65754 * and self.contig == other.contig
65755 * and self.alleles == other.alleles
65756 */
65757 __pyx_t_3 = (__pyx_v_s->n_allele == __pyx_v_o->n_allele);
65758 if (__pyx_t_3) {
65759 } else {
65760 __pyx_t_1 = __pyx_t_3;
65761 goto __pyx_L4_bool_binop_done;
65762 }
65763
65764 /* "pysam/libcbcf.pyx":3359
65765 * and s.n_sample == o.n_sample
65766 * and s.n_allele == o.n_allele
65767 * and self.contig == other.contig # <<<<<<<<<<<<<<
65768 * and self.alleles == other.alleles
65769 * and self.id == other.id
65770 */
65771 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3359, __pyx_L1_error)
65772 __Pyx_GOTREF(__pyx_t_4);
65773 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_contig); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3359, __pyx_L1_error)
65774 __Pyx_GOTREF(__pyx_t_5);
65775 __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3359, __pyx_L1_error)
65776 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65777 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65778 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3359, __pyx_L1_error)
65779 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65780 if (__pyx_t_3) {
65781 } else {
65782 __pyx_t_1 = __pyx_t_3;
65783 goto __pyx_L4_bool_binop_done;
65784 }
65785
65786 /* "pysam/libcbcf.pyx":3360
65787 * and s.n_allele == o.n_allele
65788 * and self.contig == other.contig
65789 * and self.alleles == other.alleles # <<<<<<<<<<<<<<
65790 * and self.id == other.id
65791 * and self.info == other.info
65792 */
65793 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alleles); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3360, __pyx_L1_error)
65794 __Pyx_GOTREF(__pyx_t_6);
65795 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_alleles); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3360, __pyx_L1_error)
65796 __Pyx_GOTREF(__pyx_t_5);
65797 __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3360, __pyx_L1_error)
65798 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65799 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65800 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3360, __pyx_L1_error)
65801 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65802 if (__pyx_t_3) {
65803 } else {
65804 __pyx_t_1 = __pyx_t_3;
65805 goto __pyx_L4_bool_binop_done;
65806 }
65807
65808 /* "pysam/libcbcf.pyx":3361
65809 * and self.contig == other.contig
65810 * and self.alleles == other.alleles
65811 * and self.id == other.id # <<<<<<<<<<<<<<
65812 * and self.info == other.info
65813 * and self.filter == other.filter
65814 */
65815 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3361, __pyx_L1_error)
65816 __Pyx_GOTREF(__pyx_t_4);
65817 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3361, __pyx_L1_error)
65818 __Pyx_GOTREF(__pyx_t_5);
65819 __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3361, __pyx_L1_error)
65820 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65821 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65822 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3361, __pyx_L1_error)
65823 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65824 if (__pyx_t_3) {
65825 } else {
65826 __pyx_t_1 = __pyx_t_3;
65827 goto __pyx_L4_bool_binop_done;
65828 }
65829
65830 /* "pysam/libcbcf.pyx":3362
65831 * and self.alleles == other.alleles
65832 * and self.id == other.id
65833 * and self.info == other.info # <<<<<<<<<<<<<<
65834 * and self.filter == other.filter
65835 * and self.samples == other.samples)
65836 */
65837 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3362, __pyx_L1_error)
65838 __Pyx_GOTREF(__pyx_t_6);
65839 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3362, __pyx_L1_error)
65840 __Pyx_GOTREF(__pyx_t_5);
65841 __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3362, __pyx_L1_error)
65842 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65843 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65844 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3362, __pyx_L1_error)
65845 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65846 if (__pyx_t_3) {
65847 } else {
65848 __pyx_t_1 = __pyx_t_3;
65849 goto __pyx_L4_bool_binop_done;
65850 }
65851
65852 /* "pysam/libcbcf.pyx":3363
65853 * and self.id == other.id
65854 * and self.info == other.info
65855 * and self.filter == other.filter # <<<<<<<<<<<<<<
65856 * and self.samples == other.samples)
65857 *
65858 */
65859 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3363, __pyx_L1_error)
65860 __Pyx_GOTREF(__pyx_t_4);
65861 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3363, __pyx_L1_error)
65862 __Pyx_GOTREF(__pyx_t_5);
65863 __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3363, __pyx_L1_error)
65864 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65865 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65866 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3363, __pyx_L1_error)
65867 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65868 if (__pyx_t_3) {
65869 } else {
65870 __pyx_t_1 = __pyx_t_3;
65871 goto __pyx_L4_bool_binop_done;
65872 }
65873
65874 /* "pysam/libcbcf.pyx":3364
65875 * and self.info == other.info
65876 * and self.filter == other.filter
65877 * and self.samples == other.samples) # <<<<<<<<<<<<<<
65878 *
65879 * if op == 3:
65880 */
65881 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_samples); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3364, __pyx_L1_error)
65882 __Pyx_GOTREF(__pyx_t_6);
65883 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3364, __pyx_L1_error)
65884 __Pyx_GOTREF(__pyx_t_5);
65885 __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3364, __pyx_L1_error)
65886 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65887 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65888 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3364, __pyx_L1_error)
65889 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65890 __pyx_t_1 = __pyx_t_3;
65891 __pyx_L4_bool_binop_done:;
65892 __pyx_v_cmp = __pyx_t_1;
65893
65894 /* "pysam/libcbcf.pyx":3366
65895 * and self.samples == other.samples)
65896 *
65897 * if op == 3: # <<<<<<<<<<<<<<
65898 * cmp = not cmp
65899 *
65900 */
65901 __pyx_t_1 = (__pyx_v_op == 3);
65902 if (__pyx_t_1) {
65903
65904 /* "pysam/libcbcf.pyx":3367
65905 *
65906 * if op == 3:
65907 * cmp = not cmp # <<<<<<<<<<<<<<
65908 *
65909 * return cmp
65910 */
65911 __pyx_v_cmp = (!__pyx_v_cmp);
65912
65913 /* "pysam/libcbcf.pyx":3366
65914 * and self.samples == other.samples)
65915 *
65916 * if op == 3: # <<<<<<<<<<<<<<
65917 * cmp = not cmp
65918 *
65919 */
65920 }
65921
65922 /* "pysam/libcbcf.pyx":3369
65923 * cmp = not cmp
65924 *
65925 * return cmp # <<<<<<<<<<<<<<
65926 *
65927 * def __str__(self):
65928 */
65929 __Pyx_XDECREF(__pyx_r);
65930 __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cmp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3369, __pyx_L1_error)
65931 __Pyx_GOTREF(__pyx_t_4);
65932 __pyx_r = __pyx_t_4;
65933 __pyx_t_4 = 0;
65934 goto __pyx_L0;
65935
65936 /* "pysam/libcbcf.pyx":3345
65937 * return result
65938 *
65939 * def __richcmp__(VariantRecord self not None, VariantRecord other not None, int op): # <<<<<<<<<<<<<<
65940 * if op != 2 and op != 3:
65941 * return NotImplemented
65942 */
65943
65944 /* function exit code */
65945 __pyx_L1_error:;
65946 __Pyx_XDECREF(__pyx_t_4);
65947 __Pyx_XDECREF(__pyx_t_5);
65948 __Pyx_XDECREF(__pyx_t_6);
65949 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
65950 __pyx_r = NULL;
65951 __pyx_L0:;
65952 __Pyx_XGIVEREF(__pyx_r);
65953 __Pyx_TraceReturn(__pyx_r, 0);
65954 __Pyx_RefNannyFinishContext();
65955 return __pyx_r;
65956 }
65957
65958 /* "pysam/libcbcf.pyx":3371
65959 * return cmp
65960 *
65961 * def __str__(self): # <<<<<<<<<<<<<<
65962 * cdef kstring_t line
65963 * cdef char c
65964 */
65965
65966 /* Python wrapper */
65967 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_11__str__(PyObject *__pyx_v_self); /*proto*/
65968 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_11__str__(PyObject *__pyx_v_self) {
65969 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
65970 PyObject *__pyx_r = 0;
65971 __Pyx_RefNannyDeclarations
65972 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
65973 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
65974 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_10__str__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
65975
65976 /* function exit code */
65977 __Pyx_RefNannyFinishContext();
65978 return __pyx_r;
65979 }
65980
65981 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_10__str__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
65982 kstring_t __pyx_v_line;
65983 PyObject *__pyx_v_ret = NULL;
65984 PyObject *__pyx_r = NULL;
65985 __Pyx_TraceDeclarations
65986 __Pyx_RefNannyDeclarations
65987 int __pyx_t_1;
65988 PyObject *__pyx_t_2 = NULL;
65989 int __pyx_lineno = 0;
65990 const char *__pyx_filename = NULL;
65991 int __pyx_clineno = 0;
65992 __Pyx_RefNannySetupContext("__str__", 1);
65993 __Pyx_TraceCall("__str__", __pyx_f[0], 3371, 0, __PYX_ERR(0, 3371, __pyx_L1_error));
65994
65995 /* "pysam/libcbcf.pyx":3375
65996 * cdef char c
65997 *
65998 * line.l = line.m = 0 # <<<<<<<<<<<<<<
65999 * line.s = NULL
66000 *
66001 */
66002 __pyx_v_line.l = 0;
66003 __pyx_v_line.m = 0;
66004
66005 /* "pysam/libcbcf.pyx":3376
66006 *
66007 * line.l = line.m = 0
66008 * line.s = NULL # <<<<<<<<<<<<<<
66009 *
66010 * if vcf_format(self.header.ptr, self.ptr, &line) < 0:
66011 */
66012 __pyx_v_line.s = NULL;
66013
66014 /* "pysam/libcbcf.pyx":3378
66015 * line.s = NULL
66016 *
66017 * if vcf_format(self.header.ptr, self.ptr, &line) < 0: # <<<<<<<<<<<<<<
66018 * if line.m:
66019 * free(line.s)
66020 */
66021 __pyx_t_1 = (vcf_format(__pyx_v_self->header->ptr, __pyx_v_self->ptr, (&__pyx_v_line)) < 0);
66022 if (__pyx_t_1) {
66023
66024 /* "pysam/libcbcf.pyx":3379
66025 *
66026 * if vcf_format(self.header.ptr, self.ptr, &line) < 0:
66027 * if line.m: # <<<<<<<<<<<<<<
66028 * free(line.s)
66029 * raise ValueError('vcf_format failed')
66030 */
66031 __pyx_t_1 = (__pyx_v_line.m != 0);
66032 if (__pyx_t_1) {
66033
66034 /* "pysam/libcbcf.pyx":3380
66035 * if vcf_format(self.header.ptr, self.ptr, &line) < 0:
66036 * if line.m:
66037 * free(line.s) # <<<<<<<<<<<<<<
66038 * raise ValueError('vcf_format failed')
66039 *
66040 */
66041 free(__pyx_v_line.s);
66042
66043 /* "pysam/libcbcf.pyx":3379
66044 *
66045 * if vcf_format(self.header.ptr, self.ptr, &line) < 0:
66046 * if line.m: # <<<<<<<<<<<<<<
66047 * free(line.s)
66048 * raise ValueError('vcf_format failed')
66049 */
66050 }
66051
66052 /* "pysam/libcbcf.pyx":3381
66053 * if line.m:
66054 * free(line.s)
66055 * raise ValueError('vcf_format failed') # <<<<<<<<<<<<<<
66056 *
66057 * # Strip CR/LF?
66058 */
66059 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__177, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3381, __pyx_L1_error)
66060 __Pyx_GOTREF(__pyx_t_2);
66061 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
66062 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
66063 __PYX_ERR(0, 3381, __pyx_L1_error)
66064
66065 /* "pysam/libcbcf.pyx":3378
66066 * line.s = NULL
66067 *
66068 * if vcf_format(self.header.ptr, self.ptr, &line) < 0: # <<<<<<<<<<<<<<
66069 * if line.m:
66070 * free(line.s)
66071 */
66072 }
66073
66074 /* "pysam/libcbcf.pyx":3390
66075 * # line.l -= 1
66076 *
66077 * ret = charptr_to_str_w_len(line.s, line.l) # <<<<<<<<<<<<<<
66078 *
66079 * if line.m:
66080 */
66081 __pyx_t_2 = __pyx_f_5pysam_9libcutils_charptr_to_str_w_len(__pyx_v_line.s, __pyx_v_line.l, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3390, __pyx_L1_error)
66082 __Pyx_GOTREF(__pyx_t_2);
66083 __pyx_v_ret = __pyx_t_2;
66084 __pyx_t_2 = 0;
66085
66086 /* "pysam/libcbcf.pyx":3392
66087 * ret = charptr_to_str_w_len(line.s, line.l)
66088 *
66089 * if line.m: # <<<<<<<<<<<<<<
66090 * free(line.s)
66091 *
66092 */
66093 __pyx_t_1 = (__pyx_v_line.m != 0);
66094 if (__pyx_t_1) {
66095
66096 /* "pysam/libcbcf.pyx":3393
66097 *
66098 * if line.m:
66099 * free(line.s) # <<<<<<<<<<<<<<
66100 *
66101 * return ret
66102 */
66103 free(__pyx_v_line.s);
66104
66105 /* "pysam/libcbcf.pyx":3392
66106 * ret = charptr_to_str_w_len(line.s, line.l)
66107 *
66108 * if line.m: # <<<<<<<<<<<<<<
66109 * free(line.s)
66110 *
66111 */
66112 }
66113
66114 /* "pysam/libcbcf.pyx":3395
66115 * free(line.s)
66116 *
66117 * return ret # <<<<<<<<<<<<<<
66118 *
66119 *
66120 */
66121 __Pyx_XDECREF(__pyx_r);
66122 __Pyx_INCREF(__pyx_v_ret);
66123 __pyx_r = __pyx_v_ret;
66124 goto __pyx_L0;
66125
66126 /* "pysam/libcbcf.pyx":3371
66127 * return cmp
66128 *
66129 * def __str__(self): # <<<<<<<<<<<<<<
66130 * cdef kstring_t line
66131 * cdef char c
66132 */
66133
66134 /* function exit code */
66135 __pyx_L1_error:;
66136 __Pyx_XDECREF(__pyx_t_2);
66137 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
66138 __pyx_r = NULL;
66139 __pyx_L0:;
66140 __Pyx_XDECREF(__pyx_v_ret);
66141 __Pyx_XGIVEREF(__pyx_r);
66142 __Pyx_TraceReturn(__pyx_r, 0);
66143 __Pyx_RefNannyFinishContext();
66144 return __pyx_r;
66145 }
66146
66147 /* "pysam/libcbcf.pxd":81
66148 *
66149 * cdef class VariantRecord(object):
66150 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
66151 * cdef bcf1_t *ptr
66152 *
66153 */
66154
66155 /* Python wrapper */
66156 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
66157 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_6header_1__get__(PyObject *__pyx_v_self) {
66158 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
66159 PyObject *__pyx_r = 0;
66160 __Pyx_RefNannyDeclarations
66161 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
66162 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
66163 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
66164
66165 /* function exit code */
66166 __Pyx_RefNannyFinishContext();
66167 return __pyx_r;
66168 }
66169
66170 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
66171 PyObject *__pyx_r = NULL;
66172 __Pyx_TraceDeclarations
66173 __Pyx_RefNannyDeclarations
66174 int __pyx_lineno = 0;
66175 const char *__pyx_filename = NULL;
66176 int __pyx_clineno = 0;
66177 __Pyx_RefNannySetupContext("__get__", 1);
66178 __Pyx_TraceCall("__get__", __pyx_f[3], 81, 0, __PYX_ERR(3, 81, __pyx_L1_error));
66179 __Pyx_XDECREF(__pyx_r);
66180 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
66181 __pyx_r = ((PyObject *)__pyx_v_self->header);
66182 goto __pyx_L0;
66183
66184 /* function exit code */
66185 __pyx_L1_error:;
66186 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
66187 __pyx_r = NULL;
66188 __pyx_L0:;
66189 __Pyx_XGIVEREF(__pyx_r);
66190 __Pyx_TraceReturn(__pyx_r, 0);
66191 __Pyx_RefNannyFinishContext();
66192 return __pyx_r;
66193 }
66194
66195 /* "(tree fragment)":1
66196 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
66197 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
66198 * def __setstate_cython__(self, __pyx_state):
66199 */
66200
66201 /* Python wrapper */
66202 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_13__reduce_cython__(PyObject *__pyx_v_self,
66203 #if CYTHON_METH_FASTCALL
66204 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
66205 #else
66206 PyObject *__pyx_args, PyObject *__pyx_kwds
66207 #endif
66208 ); /*proto*/
66209 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantRecord_12__reduce_cython__, "VariantRecord.__reduce_cython__(self)");
66210 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantRecord_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantRecord_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantRecord_12__reduce_cython__};
66211 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_13__reduce_cython__(PyObject *__pyx_v_self,
66212 #if CYTHON_METH_FASTCALL
66213 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
66214 #else
66215 PyObject *__pyx_args, PyObject *__pyx_kwds
66216 #endif
66217 ) {
66218 #if !CYTHON_METH_FASTCALL
66219 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
66220 #endif
66221 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
66222 PyObject *__pyx_r = 0;
66223 __Pyx_RefNannyDeclarations
66224 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
66225 #if !CYTHON_METH_FASTCALL
66226 #if CYTHON_ASSUME_SAFE_MACROS
66227 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
66228 #else
66229 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
66230 #endif
66231 #endif
66232 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
66233 if (unlikely(__pyx_nargs > 0)) {
66234 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
66235 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
66236 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_12__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self));
66237
66238 /* function exit code */
66239 __Pyx_RefNannyFinishContext();
66240 return __pyx_r;
66241 }
66242
66243 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self) {
66244 PyObject *__pyx_r = NULL;
66245 __Pyx_TraceDeclarations
66246 __Pyx_RefNannyDeclarations
66247 int __pyx_lineno = 0;
66248 const char *__pyx_filename = NULL;
66249 int __pyx_clineno = 0;
66250 __Pyx_TraceFrameInit(__pyx_codeobj__178)
66251 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
66252 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
66253
66254 /* "(tree fragment)":2
66255 * def __reduce_cython__(self):
66256 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
66257 * def __setstate_cython__(self, __pyx_state):
66258 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
66259 */
66260 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_ptr_cannot_be_converted_to, 0, 0);
66261 __PYX_ERR(4, 2, __pyx_L1_error)
66262
66263 /* "(tree fragment)":1
66264 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
66265 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
66266 * def __setstate_cython__(self, __pyx_state):
66267 */
66268
66269 /* function exit code */
66270 __pyx_L1_error:;
66271 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
66272 __pyx_r = NULL;
66273 __Pyx_XGIVEREF(__pyx_r);
66274 __Pyx_TraceReturn(__pyx_r, 0);
66275 __Pyx_RefNannyFinishContext();
66276 return __pyx_r;
66277 }
66278
66279 /* "(tree fragment)":3
66280 * def __reduce_cython__(self):
66281 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
66282 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
66283 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
66284 */
66285
66286 /* Python wrapper */
66287 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_15__setstate_cython__(PyObject *__pyx_v_self,
66288 #if CYTHON_METH_FASTCALL
66289 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
66290 #else
66291 PyObject *__pyx_args, PyObject *__pyx_kwds
66292 #endif
66293 ); /*proto*/
66294 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13VariantRecord_14__setstate_cython__, "VariantRecord.__setstate_cython__(self, __pyx_state)");
66295 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13VariantRecord_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantRecord_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantRecord_14__setstate_cython__};
66296 static PyObject *__pyx_pw_5pysam_7libcbcf_13VariantRecord_15__setstate_cython__(PyObject *__pyx_v_self,
66297 #if CYTHON_METH_FASTCALL
66298 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
66299 #else
66300 PyObject *__pyx_args, PyObject *__pyx_kwds
66301 #endif
66302 ) {
66303 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
66304 #if !CYTHON_METH_FASTCALL
66305 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
66306 #endif
66307 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
66308 PyObject* values[1] = {0};
66309 int __pyx_lineno = 0;
66310 const char *__pyx_filename = NULL;
66311 int __pyx_clineno = 0;
66312 PyObject *__pyx_r = 0;
66313 __Pyx_RefNannyDeclarations
66314 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
66315 #if !CYTHON_METH_FASTCALL
66316 #if CYTHON_ASSUME_SAFE_MACROS
66317 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
66318 #else
66319 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
66320 #endif
66321 #endif
66322 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
66323 {
66324 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
66325 if (__pyx_kwds) {
66326 Py_ssize_t kw_args;
66327 switch (__pyx_nargs) {
66328 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
66329 CYTHON_FALLTHROUGH;
66330 case 0: break;
66331 default: goto __pyx_L5_argtuple_error;
66332 }
66333 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
66334 switch (__pyx_nargs) {
66335 case 0:
66336 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
66337 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
66338 kw_args--;
66339 }
66340 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
66341 else goto __pyx_L5_argtuple_error;
66342 }
66343 if (unlikely(kw_args > 0)) {
66344 const Py_ssize_t kwd_pos_args = __pyx_nargs;
66345 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
66346 }
66347 } else if (unlikely(__pyx_nargs != 1)) {
66348 goto __pyx_L5_argtuple_error;
66349 } else {
66350 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
66351 }
66352 __pyx_v___pyx_state = values[0];
66353 }
66354 goto __pyx_L6_skip;
66355 __pyx_L5_argtuple_error:;
66356 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
66357 __pyx_L6_skip:;
66358 goto __pyx_L4_argument_unpacking_done;
66359 __pyx_L3_error:;
66360 {
66361 Py_ssize_t __pyx_temp;
66362 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
66363 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
66364 }
66365 }
66366 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
66367 __Pyx_RefNannyFinishContext();
66368 return NULL;
66369 __pyx_L4_argument_unpacking_done:;
66370 __pyx_r = __pyx_pf_5pysam_7libcbcf_13VariantRecord_14__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_v_self), __pyx_v___pyx_state);
66371
66372 /* function exit code */
66373 {
66374 Py_ssize_t __pyx_temp;
66375 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
66376 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
66377 }
66378 }
66379 __Pyx_RefNannyFinishContext();
66380 return __pyx_r;
66381 }
66382
66383 static PyObject *__pyx_pf_5pysam_7libcbcf_13VariantRecord_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
66384 PyObject *__pyx_r = NULL;
66385 __Pyx_TraceDeclarations
66386 __Pyx_RefNannyDeclarations
66387 int __pyx_lineno = 0;
66388 const char *__pyx_filename = NULL;
66389 int __pyx_clineno = 0;
66390 __Pyx_TraceFrameInit(__pyx_codeobj__179)
66391 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
66392 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
66393
66394 /* "(tree fragment)":4
66395 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
66396 * def __setstate_cython__(self, __pyx_state):
66397 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
66398 */
66399 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_ptr_cannot_be_converted_to, 0, 0);
66400 __PYX_ERR(4, 4, __pyx_L1_error)
66401
66402 /* "(tree fragment)":3
66403 * def __reduce_cython__(self):
66404 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
66405 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
66406 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
66407 */
66408
66409 /* function exit code */
66410 __pyx_L1_error:;
66411 __Pyx_AddTraceback("pysam.libcbcf.VariantRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
66412 __pyx_r = NULL;
66413 __Pyx_XGIVEREF(__pyx_r);
66414 __Pyx_TraceReturn(__pyx_r, 0);
66415 __Pyx_RefNannyFinishContext();
66416 return __pyx_r;
66417 }
66418
66419 /* "pysam/libcbcf.pyx":3398
66420 *
66421 *
66422 * cdef VariantRecord makeVariantRecord(VariantHeader header, bcf1_t *r): # <<<<<<<<<<<<<<
66423 * if not header:
66424 * raise ValueError('invalid VariantHeader')
66425 */
66426
66427 static struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_f_5pysam_7libcbcf_makeVariantRecord(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, bcf1_t *__pyx_v_r) {
66428 PyObject *__pyx_v_msg = NULL;
66429 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record = 0;
66430 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_r = NULL;
66431 __Pyx_TraceDeclarations
66432 __Pyx_RefNannyDeclarations
66433 int __pyx_t_1;
66434 int __pyx_t_2;
66435 PyObject *__pyx_t_3 = NULL;
66436 int __pyx_t_4;
66437 PyObject *__pyx_t_5 = NULL;
66438 PyObject *__pyx_t_6 = NULL;
66439 unsigned int __pyx_t_7;
66440 int __pyx_lineno = 0;
66441 const char *__pyx_filename = NULL;
66442 int __pyx_clineno = 0;
66443 __Pyx_RefNannySetupContext("makeVariantRecord", 1);
66444 __Pyx_TraceCall("makeVariantRecord", __pyx_f[0], 3398, 0, __PYX_ERR(0, 3398, __pyx_L1_error));
66445
66446 /* "pysam/libcbcf.pyx":3399
66447 *
66448 * cdef VariantRecord makeVariantRecord(VariantHeader header, bcf1_t *r):
66449 * if not header: # <<<<<<<<<<<<<<
66450 * raise ValueError('invalid VariantHeader')
66451 *
66452 */
66453 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3399, __pyx_L1_error)
66454 __pyx_t_2 = (!__pyx_t_1);
66455 if (unlikely(__pyx_t_2)) {
66456
66457 /* "pysam/libcbcf.pyx":3400
66458 * cdef VariantRecord makeVariantRecord(VariantHeader header, bcf1_t *r):
66459 * if not header:
66460 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
66461 *
66462 * if not r:
66463 */
66464 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3400, __pyx_L1_error)
66465 __Pyx_GOTREF(__pyx_t_3);
66466 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
66467 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
66468 __PYX_ERR(0, 3400, __pyx_L1_error)
66469
66470 /* "pysam/libcbcf.pyx":3399
66471 *
66472 * cdef VariantRecord makeVariantRecord(VariantHeader header, bcf1_t *r):
66473 * if not header: # <<<<<<<<<<<<<<
66474 * raise ValueError('invalid VariantHeader')
66475 *
66476 */
66477 }
66478
66479 /* "pysam/libcbcf.pyx":3402
66480 * raise ValueError('invalid VariantHeader')
66481 *
66482 * if not r: # <<<<<<<<<<<<<<
66483 * raise ValueError('cannot create VariantRecord')
66484 *
66485 */
66486 __pyx_t_2 = (!(__pyx_v_r != 0));
66487 if (unlikely(__pyx_t_2)) {
66488
66489 /* "pysam/libcbcf.pyx":3403
66490 *
66491 * if not r:
66492 * raise ValueError('cannot create VariantRecord') # <<<<<<<<<<<<<<
66493 *
66494 * if r.errcode:
66495 */
66496 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3403, __pyx_L1_error)
66497 __Pyx_GOTREF(__pyx_t_3);
66498 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
66499 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
66500 __PYX_ERR(0, 3403, __pyx_L1_error)
66501
66502 /* "pysam/libcbcf.pyx":3402
66503 * raise ValueError('invalid VariantHeader')
66504 *
66505 * if not r: # <<<<<<<<<<<<<<
66506 * raise ValueError('cannot create VariantRecord')
66507 *
66508 */
66509 }
66510
66511 /* "pysam/libcbcf.pyx":3405
66512 * raise ValueError('cannot create VariantRecord')
66513 *
66514 * if r.errcode: # <<<<<<<<<<<<<<
66515 * msg = []
66516 * #if r.errcode & BCF_ERR_CTG_UNDEF:
66517 */
66518 __pyx_t_2 = (__pyx_v_r->errcode != 0);
66519 if (__pyx_t_2) {
66520
66521 /* "pysam/libcbcf.pyx":3406
66522 *
66523 * if r.errcode:
66524 * msg = [] # <<<<<<<<<<<<<<
66525 * #if r.errcode & BCF_ERR_CTG_UNDEF:
66526 * # msg.append('undefined contig')
66527 */
66528 __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3406, __pyx_L1_error)
66529 __Pyx_GOTREF(__pyx_t_3);
66530 __pyx_v_msg = __pyx_t_3;
66531 __pyx_t_3 = 0;
66532
66533 /* "pysam/libcbcf.pyx":3411
66534 * #if r.errcode & BCF_ERR_TAG_UNDEF:
66535 * # msg.append('undefined tag')
66536 * if r.errcode & BCF_ERR_NCOLS: # <<<<<<<<<<<<<<
66537 * msg.append('invalid number of columns')
66538 * if r.errcode & BCF_ERR_LIMITS:
66539 */
66540 __pyx_t_2 = ((__pyx_v_r->errcode & BCF_ERR_NCOLS) != 0);
66541 if (__pyx_t_2) {
66542
66543 /* "pysam/libcbcf.pyx":3412
66544 * # msg.append('undefined tag')
66545 * if r.errcode & BCF_ERR_NCOLS:
66546 * msg.append('invalid number of columns') # <<<<<<<<<<<<<<
66547 * if r.errcode & BCF_ERR_LIMITS:
66548 * msg.append('limits violated')
66549 */
66550 __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_msg, __pyx_kp_u_invalid_number_of_columns); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3412, __pyx_L1_error)
66551
66552 /* "pysam/libcbcf.pyx":3411
66553 * #if r.errcode & BCF_ERR_TAG_UNDEF:
66554 * # msg.append('undefined tag')
66555 * if r.errcode & BCF_ERR_NCOLS: # <<<<<<<<<<<<<<
66556 * msg.append('invalid number of columns')
66557 * if r.errcode & BCF_ERR_LIMITS:
66558 */
66559 }
66560
66561 /* "pysam/libcbcf.pyx":3413
66562 * if r.errcode & BCF_ERR_NCOLS:
66563 * msg.append('invalid number of columns')
66564 * if r.errcode & BCF_ERR_LIMITS: # <<<<<<<<<<<<<<
66565 * msg.append('limits violated')
66566 * if r.errcode & BCF_ERR_CHAR:
66567 */
66568 __pyx_t_2 = ((__pyx_v_r->errcode & BCF_ERR_LIMITS) != 0);
66569 if (__pyx_t_2) {
66570
66571 /* "pysam/libcbcf.pyx":3414
66572 * msg.append('invalid number of columns')
66573 * if r.errcode & BCF_ERR_LIMITS:
66574 * msg.append('limits violated') # <<<<<<<<<<<<<<
66575 * if r.errcode & BCF_ERR_CHAR:
66576 * msg.append('invalid character found')
66577 */
66578 __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_msg, __pyx_kp_u_limits_violated); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3414, __pyx_L1_error)
66579
66580 /* "pysam/libcbcf.pyx":3413
66581 * if r.errcode & BCF_ERR_NCOLS:
66582 * msg.append('invalid number of columns')
66583 * if r.errcode & BCF_ERR_LIMITS: # <<<<<<<<<<<<<<
66584 * msg.append('limits violated')
66585 * if r.errcode & BCF_ERR_CHAR:
66586 */
66587 }
66588
66589 /* "pysam/libcbcf.pyx":3415
66590 * if r.errcode & BCF_ERR_LIMITS:
66591 * msg.append('limits violated')
66592 * if r.errcode & BCF_ERR_CHAR: # <<<<<<<<<<<<<<
66593 * msg.append('invalid character found')
66594 * if r.errcode & BCF_ERR_CTG_INVALID:
66595 */
66596 __pyx_t_2 = ((__pyx_v_r->errcode & BCF_ERR_CHAR) != 0);
66597 if (__pyx_t_2) {
66598
66599 /* "pysam/libcbcf.pyx":3416
66600 * msg.append('limits violated')
66601 * if r.errcode & BCF_ERR_CHAR:
66602 * msg.append('invalid character found') # <<<<<<<<<<<<<<
66603 * if r.errcode & BCF_ERR_CTG_INVALID:
66604 * msg.append('invalid contig')
66605 */
66606 __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_msg, __pyx_kp_u_invalid_character_found); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3416, __pyx_L1_error)
66607
66608 /* "pysam/libcbcf.pyx":3415
66609 * if r.errcode & BCF_ERR_LIMITS:
66610 * msg.append('limits violated')
66611 * if r.errcode & BCF_ERR_CHAR: # <<<<<<<<<<<<<<
66612 * msg.append('invalid character found')
66613 * if r.errcode & BCF_ERR_CTG_INVALID:
66614 */
66615 }
66616
66617 /* "pysam/libcbcf.pyx":3417
66618 * if r.errcode & BCF_ERR_CHAR:
66619 * msg.append('invalid character found')
66620 * if r.errcode & BCF_ERR_CTG_INVALID: # <<<<<<<<<<<<<<
66621 * msg.append('invalid contig')
66622 * if r.errcode & BCF_ERR_TAG_INVALID:
66623 */
66624 __pyx_t_2 = ((__pyx_v_r->errcode & BCF_ERR_CTG_INVALID) != 0);
66625 if (__pyx_t_2) {
66626
66627 /* "pysam/libcbcf.pyx":3418
66628 * msg.append('invalid character found')
66629 * if r.errcode & BCF_ERR_CTG_INVALID:
66630 * msg.append('invalid contig') # <<<<<<<<<<<<<<
66631 * if r.errcode & BCF_ERR_TAG_INVALID:
66632 * msg.append('invalid tag')
66633 */
66634 __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_msg, __pyx_kp_u_invalid_contig_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3418, __pyx_L1_error)
66635
66636 /* "pysam/libcbcf.pyx":3417
66637 * if r.errcode & BCF_ERR_CHAR:
66638 * msg.append('invalid character found')
66639 * if r.errcode & BCF_ERR_CTG_INVALID: # <<<<<<<<<<<<<<
66640 * msg.append('invalid contig')
66641 * if r.errcode & BCF_ERR_TAG_INVALID:
66642 */
66643 }
66644
66645 /* "pysam/libcbcf.pyx":3419
66646 * if r.errcode & BCF_ERR_CTG_INVALID:
66647 * msg.append('invalid contig')
66648 * if r.errcode & BCF_ERR_TAG_INVALID: # <<<<<<<<<<<<<<
66649 * msg.append('invalid tag')
66650 *
66651 */
66652 __pyx_t_2 = ((__pyx_v_r->errcode & BCF_ERR_TAG_INVALID) != 0);
66653 if (__pyx_t_2) {
66654
66655 /* "pysam/libcbcf.pyx":3420
66656 * msg.append('invalid contig')
66657 * if r.errcode & BCF_ERR_TAG_INVALID:
66658 * msg.append('invalid tag') # <<<<<<<<<<<<<<
66659 *
66660 * if msg:
66661 */
66662 __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_msg, __pyx_kp_u_invalid_tag); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3420, __pyx_L1_error)
66663
66664 /* "pysam/libcbcf.pyx":3419
66665 * if r.errcode & BCF_ERR_CTG_INVALID:
66666 * msg.append('invalid contig')
66667 * if r.errcode & BCF_ERR_TAG_INVALID: # <<<<<<<<<<<<<<
66668 * msg.append('invalid tag')
66669 *
66670 */
66671 }
66672
66673 /* "pysam/libcbcf.pyx":3422
66674 * msg.append('invalid tag')
66675 *
66676 * if msg: # <<<<<<<<<<<<<<
66677 * msg = ', '.join(msg)
66678 * raise ValueError('Error(s) reading record: {}'.format(msg))
66679 */
66680 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_msg); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 3422, __pyx_L1_error)
66681 if (unlikely(__pyx_t_2)) {
66682
66683 /* "pysam/libcbcf.pyx":3423
66684 *
66685 * if msg:
66686 * msg = ', '.join(msg) # <<<<<<<<<<<<<<
66687 * raise ValueError('Error(s) reading record: {}'.format(msg))
66688 *
66689 */
66690 __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__181, __pyx_v_msg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3423, __pyx_L1_error)
66691 __Pyx_GOTREF(__pyx_t_3);
66692 __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_3);
66693 __pyx_t_3 = 0;
66694
66695 /* "pysam/libcbcf.pyx":3424
66696 * if msg:
66697 * msg = ', '.join(msg)
66698 * raise ValueError('Error(s) reading record: {}'.format(msg)) # <<<<<<<<<<<<<<
66699 *
66700 * cdef VariantRecord record = VariantRecord.__new__(VariantRecord)
66701 */
66702 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Error_s_reading_record, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3424, __pyx_L1_error)
66703 __Pyx_GOTREF(__pyx_t_5);
66704 __pyx_t_6 = NULL;
66705 __pyx_t_7 = 0;
66706 #if CYTHON_UNPACK_METHODS
66707 if (likely(PyMethod_Check(__pyx_t_5))) {
66708 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
66709 if (likely(__pyx_t_6)) {
66710 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
66711 __Pyx_INCREF(__pyx_t_6);
66712 __Pyx_INCREF(function);
66713 __Pyx_DECREF_SET(__pyx_t_5, function);
66714 __pyx_t_7 = 1;
66715 }
66716 }
66717 #endif
66718 {
66719 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_msg};
66720 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
66721 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
66722 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3424, __pyx_L1_error)
66723 __Pyx_GOTREF(__pyx_t_3);
66724 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
66725 }
66726 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3424, __pyx_L1_error)
66727 __Pyx_GOTREF(__pyx_t_5);
66728 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
66729 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
66730 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
66731 __PYX_ERR(0, 3424, __pyx_L1_error)
66732
66733 /* "pysam/libcbcf.pyx":3422
66734 * msg.append('invalid tag')
66735 *
66736 * if msg: # <<<<<<<<<<<<<<
66737 * msg = ', '.join(msg)
66738 * raise ValueError('Error(s) reading record: {}'.format(msg))
66739 */
66740 }
66741
66742 /* "pysam/libcbcf.pyx":3405
66743 * raise ValueError('cannot create VariantRecord')
66744 *
66745 * if r.errcode: # <<<<<<<<<<<<<<
66746 * msg = []
66747 * #if r.errcode & BCF_ERR_CTG_UNDEF:
66748 */
66749 }
66750
66751 /* "pysam/libcbcf.pyx":3426
66752 * raise ValueError('Error(s) reading record: {}'.format(msg))
66753 *
66754 * cdef VariantRecord record = VariantRecord.__new__(VariantRecord) # <<<<<<<<<<<<<<
66755 * record.header = header
66756 * record.ptr = r
66757 */
66758 __pyx_t_5 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantRecord(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecord), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3426, __pyx_L1_error)
66759 __Pyx_GOTREF((PyObject *)__pyx_t_5);
66760 __pyx_v_record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_5);
66761 __pyx_t_5 = 0;
66762
66763 /* "pysam/libcbcf.pyx":3427
66764 *
66765 * cdef VariantRecord record = VariantRecord.__new__(VariantRecord)
66766 * record.header = header # <<<<<<<<<<<<<<
66767 * record.ptr = r
66768 *
66769 */
66770 __Pyx_INCREF((PyObject *)__pyx_v_header);
66771 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
66772 __Pyx_GOTREF((PyObject *)__pyx_v_record->header);
66773 __Pyx_DECREF((PyObject *)__pyx_v_record->header);
66774 __pyx_v_record->header = __pyx_v_header;
66775
66776 /* "pysam/libcbcf.pyx":3428
66777 * cdef VariantRecord record = VariantRecord.__new__(VariantRecord)
66778 * record.header = header
66779 * record.ptr = r # <<<<<<<<<<<<<<
66780 *
66781 * return record
66782 */
66783 __pyx_v_record->ptr = __pyx_v_r;
66784
66785 /* "pysam/libcbcf.pyx":3430
66786 * record.ptr = r
66787 *
66788 * return record # <<<<<<<<<<<<<<
66789 *
66790 *
66791 */
66792 __Pyx_XDECREF((PyObject *)__pyx_r);
66793 __Pyx_INCREF((PyObject *)__pyx_v_record);
66794 __pyx_r = __pyx_v_record;
66795 goto __pyx_L0;
66796
66797 /* "pysam/libcbcf.pyx":3398
66798 *
66799 *
66800 * cdef VariantRecord makeVariantRecord(VariantHeader header, bcf1_t *r): # <<<<<<<<<<<<<<
66801 * if not header:
66802 * raise ValueError('invalid VariantHeader')
66803 */
66804
66805 /* function exit code */
66806 __pyx_L1_error:;
66807 __Pyx_XDECREF(__pyx_t_3);
66808 __Pyx_XDECREF(__pyx_t_5);
66809 __Pyx_XDECREF(__pyx_t_6);
66810 __Pyx_AddTraceback("pysam.libcbcf.makeVariantRecord", __pyx_clineno, __pyx_lineno, __pyx_filename);
66811 __pyx_r = 0;
66812 __pyx_L0:;
66813 __Pyx_XDECREF(__pyx_v_msg);
66814 __Pyx_XDECREF((PyObject *)__pyx_v_record);
66815 __Pyx_XGIVEREF((PyObject *)__pyx_r);
66816 __Pyx_TraceReturn(__pyx_r, 0);
66817 __Pyx_RefNannyFinishContext();
66818 return __pyx_r;
66819 }
66820
66821 /* "pysam/libcbcf.pyx":3444
66822 * from format name to values.
66823 * """
66824 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
66825 * raise TypeError('this class cannot be instantiated from Python')
66826 *
66827 */
66828
66829 /* Python wrapper */
66830 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
66831 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
66832 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
66833 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
66834 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
66835 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
66836 int __pyx_r;
66837 __Pyx_RefNannyDeclarations
66838 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
66839 #if CYTHON_ASSUME_SAFE_MACROS
66840 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
66841 #else
66842 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
66843 #endif
66844 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
66845 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
66846 __Pyx_INCREF(__pyx_args);
66847 __pyx_v_args = __pyx_args;
66848 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample___init__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
66849
66850 /* function exit code */
66851 __Pyx_DECREF(__pyx_v_args);
66852 __Pyx_XDECREF(__pyx_v_kwargs);
66853 __Pyx_RefNannyFinishContext();
66854 return __pyx_r;
66855 }
66856
66857 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
66858 int __pyx_r;
66859 __Pyx_TraceDeclarations
66860 __Pyx_RefNannyDeclarations
66861 PyObject *__pyx_t_1 = NULL;
66862 int __pyx_lineno = 0;
66863 const char *__pyx_filename = NULL;
66864 int __pyx_clineno = 0;
66865 __Pyx_RefNannySetupContext("__init__", 1);
66866 __Pyx_TraceCall("__init__", __pyx_f[0], 3444, 0, __PYX_ERR(0, 3444, __pyx_L1_error));
66867
66868 /* "pysam/libcbcf.pyx":3445
66869 * """
66870 * def __init__(self, *args, **kwargs):
66871 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
66872 *
66873 * @property
66874 */
66875 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3445, __pyx_L1_error)
66876 __Pyx_GOTREF(__pyx_t_1);
66877 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
66878 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
66879 __PYX_ERR(0, 3445, __pyx_L1_error)
66880
66881 /* "pysam/libcbcf.pyx":3444
66882 * from format name to values.
66883 * """
66884 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
66885 * raise TypeError('this class cannot be instantiated from Python')
66886 *
66887 */
66888
66889 /* function exit code */
66890 __pyx_L1_error:;
66891 __Pyx_XDECREF(__pyx_t_1);
66892 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
66893 __pyx_r = -1;
66894 __Pyx_TraceReturn(Py_None, 0);
66895 __Pyx_RefNannyFinishContext();
66896 return __pyx_r;
66897 }
66898
66899 /* "pysam/libcbcf.pyx":3447
66900 * raise TypeError('this class cannot be instantiated from Python')
66901 *
66902 * @property # <<<<<<<<<<<<<<
66903 * def name(self):
66904 * """sample name"""
66905 */
66906
66907 /* Python wrapper */
66908 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
66909 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_4name_1__get__(PyObject *__pyx_v_self) {
66910 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
66911 PyObject *__pyx_r = 0;
66912 __Pyx_RefNannyDeclarations
66913 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
66914 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
66915 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_4name___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
66916
66917 /* function exit code */
66918 __Pyx_RefNannyFinishContext();
66919 return __pyx_r;
66920 }
66921
66922 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_4name___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
66923 bcf_hdr_t *__pyx_v_hdr;
66924 bcf1_t *__pyx_v_r;
66925 int32_t __pyx_v_n;
66926 PyObject *__pyx_r = NULL;
66927 __Pyx_TraceDeclarations
66928 __Pyx_RefNannyDeclarations
66929 bcf_hdr_t *__pyx_t_1;
66930 bcf1_t *__pyx_t_2;
66931 uint32_t __pyx_t_3;
66932 int __pyx_t_4;
66933 int __pyx_t_5;
66934 PyObject *__pyx_t_6 = NULL;
66935 int __pyx_lineno = 0;
66936 const char *__pyx_filename = NULL;
66937 int __pyx_clineno = 0;
66938 __Pyx_RefNannySetupContext("__get__", 1);
66939 __Pyx_TraceCall("__get__", __pyx_f[0], 3447, 0, __PYX_ERR(0, 3447, __pyx_L1_error));
66940
66941 /* "pysam/libcbcf.pyx":3450
66942 * def name(self):
66943 * """sample name"""
66944 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
66945 * cdef bcf1_t *r = self.record.ptr
66946 * cdef int32_t n = r.n_sample
66947 */
66948 __pyx_t_1 = __pyx_v_self->record->header->ptr;
66949 __pyx_v_hdr = __pyx_t_1;
66950
66951 /* "pysam/libcbcf.pyx":3451
66952 * """sample name"""
66953 * cdef bcf_hdr_t *hdr = self.record.header.ptr
66954 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
66955 * cdef int32_t n = r.n_sample
66956 *
66957 */
66958 __pyx_t_2 = __pyx_v_self->record->ptr;
66959 __pyx_v_r = __pyx_t_2;
66960
66961 /* "pysam/libcbcf.pyx":3452
66962 * cdef bcf_hdr_t *hdr = self.record.header.ptr
66963 * cdef bcf1_t *r = self.record.ptr
66964 * cdef int32_t n = r.n_sample # <<<<<<<<<<<<<<
66965 *
66966 * if self.index < 0 or self.index >= n:
66967 */
66968 __pyx_t_3 = __pyx_v_r->n_sample;
66969 __pyx_v_n = __pyx_t_3;
66970
66971 /* "pysam/libcbcf.pyx":3454
66972 * cdef int32_t n = r.n_sample
66973 *
66974 * if self.index < 0 or self.index >= n: # <<<<<<<<<<<<<<
66975 * raise ValueError('invalid sample index')
66976 *
66977 */
66978 __pyx_t_5 = (__pyx_v_self->index < 0);
66979 if (!__pyx_t_5) {
66980 } else {
66981 __pyx_t_4 = __pyx_t_5;
66982 goto __pyx_L4_bool_binop_done;
66983 }
66984 __pyx_t_5 = (__pyx_v_self->index >= __pyx_v_n);
66985 __pyx_t_4 = __pyx_t_5;
66986 __pyx_L4_bool_binop_done:;
66987 if (unlikely(__pyx_t_4)) {
66988
66989 /* "pysam/libcbcf.pyx":3455
66990 *
66991 * if self.index < 0 or self.index >= n:
66992 * raise ValueError('invalid sample index') # <<<<<<<<<<<<<<
66993 *
66994 * return charptr_to_str(hdr.samples[self.index])
66995 */
66996 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3455, __pyx_L1_error)
66997 __Pyx_GOTREF(__pyx_t_6);
66998 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
66999 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
67000 __PYX_ERR(0, 3455, __pyx_L1_error)
67001
67002 /* "pysam/libcbcf.pyx":3454
67003 * cdef int32_t n = r.n_sample
67004 *
67005 * if self.index < 0 or self.index >= n: # <<<<<<<<<<<<<<
67006 * raise ValueError('invalid sample index')
67007 *
67008 */
67009 }
67010
67011 /* "pysam/libcbcf.pyx":3457
67012 * raise ValueError('invalid sample index')
67013 *
67014 * return charptr_to_str(hdr.samples[self.index]) # <<<<<<<<<<<<<<
67015 *
67016 * @property
67017 */
67018 __Pyx_XDECREF(__pyx_r);
67019 __pyx_t_6 = __pyx_f_5pysam_9libcutils_charptr_to_str((__pyx_v_hdr->samples[__pyx_v_self->index]), NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3457, __pyx_L1_error)
67020 __Pyx_GOTREF(__pyx_t_6);
67021 __pyx_r = __pyx_t_6;
67022 __pyx_t_6 = 0;
67023 goto __pyx_L0;
67024
67025 /* "pysam/libcbcf.pyx":3447
67026 * raise TypeError('this class cannot be instantiated from Python')
67027 *
67028 * @property # <<<<<<<<<<<<<<
67029 * def name(self):
67030 * """sample name"""
67031 */
67032
67033 /* function exit code */
67034 __pyx_L1_error:;
67035 __Pyx_XDECREF(__pyx_t_6);
67036 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
67037 __pyx_r = NULL;
67038 __pyx_L0:;
67039 __Pyx_XGIVEREF(__pyx_r);
67040 __Pyx_TraceReturn(__pyx_r, 0);
67041 __Pyx_RefNannyFinishContext();
67042 return __pyx_r;
67043 }
67044
67045 /* "pysam/libcbcf.pyx":3459
67046 * return charptr_to_str(hdr.samples[self.index])
67047 *
67048 * @property # <<<<<<<<<<<<<<
67049 * def allele_indices(self):
67050 * """allele indices for called genotype, if present. Otherwise None"""
67051 */
67052
67053 /* Python wrapper */
67054 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_1__get__(PyObject *__pyx_v_self); /*proto*/
67055 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_1__get__(PyObject *__pyx_v_self) {
67056 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
67057 PyObject *__pyx_r = 0;
67058 __Pyx_RefNannyDeclarations
67059 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
67060 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
67061 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
67062
67063 /* function exit code */
67064 __Pyx_RefNannyFinishContext();
67065 return __pyx_r;
67066 }
67067
67068 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
67069 PyObject *__pyx_r = NULL;
67070 __Pyx_TraceDeclarations
67071 __Pyx_RefNannyDeclarations
67072 PyObject *__pyx_t_1 = NULL;
67073 int __pyx_lineno = 0;
67074 const char *__pyx_filename = NULL;
67075 int __pyx_clineno = 0;
67076 __Pyx_RefNannySetupContext("__get__", 1);
67077 __Pyx_TraceCall("__get__", __pyx_f[0], 3459, 0, __PYX_ERR(0, 3459, __pyx_L1_error));
67078
67079 /* "pysam/libcbcf.pyx":3462
67080 * def allele_indices(self):
67081 * """allele indices for called genotype, if present. Otherwise None"""
67082 * return bcf_format_get_allele_indices(self) # <<<<<<<<<<<<<<
67083 *
67084 * @allele_indices.setter
67085 */
67086 __Pyx_XDECREF(__pyx_r);
67087 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_bcf_format_get_allele_indices(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3462, __pyx_L1_error)
67088 __Pyx_GOTREF(__pyx_t_1);
67089 __pyx_r = __pyx_t_1;
67090 __pyx_t_1 = 0;
67091 goto __pyx_L0;
67092
67093 /* "pysam/libcbcf.pyx":3459
67094 * return charptr_to_str(hdr.samples[self.index])
67095 *
67096 * @property # <<<<<<<<<<<<<<
67097 * def allele_indices(self):
67098 * """allele indices for called genotype, if present. Otherwise None"""
67099 */
67100
67101 /* function exit code */
67102 __pyx_L1_error:;
67103 __Pyx_XDECREF(__pyx_t_1);
67104 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.allele_indices.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
67105 __pyx_r = NULL;
67106 __pyx_L0:;
67107 __Pyx_XGIVEREF(__pyx_r);
67108 __Pyx_TraceReturn(__pyx_r, 0);
67109 __Pyx_RefNannyFinishContext();
67110 return __pyx_r;
67111 }
67112
67113 /* "pysam/libcbcf.pyx":3464
67114 * return bcf_format_get_allele_indices(self)
67115 *
67116 * @allele_indices.setter # <<<<<<<<<<<<<<
67117 * def allele_indices(self, value):
67118 * self['GT'] = value
67119 */
67120
67121 /* Python wrapper */
67122 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
67123 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
67124 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
67125 int __pyx_r;
67126 __Pyx_RefNannyDeclarations
67127 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
67128 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
67129 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), ((PyObject *)__pyx_v_value));
67130
67131 /* function exit code */
67132 __Pyx_RefNannyFinishContext();
67133 return __pyx_r;
67134 }
67135
67136 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_value) {
67137 int __pyx_r;
67138 __Pyx_TraceDeclarations
67139 int __pyx_lineno = 0;
67140 const char *__pyx_filename = NULL;
67141 int __pyx_clineno = 0;
67142 __Pyx_TraceCall("__set__", __pyx_f[0], 3464, 0, __PYX_ERR(0, 3464, __pyx_L1_error));
67143
67144 /* "pysam/libcbcf.pyx":3466
67145 * @allele_indices.setter
67146 * def allele_indices(self, value):
67147 * self['GT'] = value # <<<<<<<<<<<<<<
67148 *
67149 * @allele_indices.deleter
67150 */
67151 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_n_u_GT, __pyx_v_value) < 0))) __PYX_ERR(0, 3466, __pyx_L1_error)
67152
67153 /* "pysam/libcbcf.pyx":3464
67154 * return bcf_format_get_allele_indices(self)
67155 *
67156 * @allele_indices.setter # <<<<<<<<<<<<<<
67157 * def allele_indices(self, value):
67158 * self['GT'] = value
67159 */
67160
67161 /* function exit code */
67162 __pyx_r = 0;
67163 goto __pyx_L0;
67164 __pyx_L1_error:;
67165 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.allele_indices.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
67166 __pyx_r = -1;
67167 __pyx_L0:;
67168 __Pyx_TraceReturn(Py_None, 0);
67169 return __pyx_r;
67170 }
67171
67172 /* "pysam/libcbcf.pyx":3468
67173 * self['GT'] = value
67174 *
67175 * @allele_indices.deleter # <<<<<<<<<<<<<<
67176 * def allele_indices(self):
67177 * self['GT'] = ()
67178 */
67179
67180 /* Python wrapper */
67181 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_5__del__(PyObject *__pyx_v_self); /*proto*/
67182 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_5__del__(PyObject *__pyx_v_self) {
67183 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
67184 int __pyx_r;
67185 __Pyx_RefNannyDeclarations
67186 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
67187 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
67188 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_4__del__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
67189
67190 /* function exit code */
67191 __Pyx_RefNannyFinishContext();
67192 return __pyx_r;
67193 }
67194
67195 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_4__del__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
67196 int __pyx_r;
67197 __Pyx_TraceDeclarations
67198 int __pyx_lineno = 0;
67199 const char *__pyx_filename = NULL;
67200 int __pyx_clineno = 0;
67201 __Pyx_TraceCall("__del__", __pyx_f[0], 3468, 0, __PYX_ERR(0, 3468, __pyx_L1_error));
67202
67203 /* "pysam/libcbcf.pyx":3470
67204 * @allele_indices.deleter
67205 * def allele_indices(self):
67206 * self['GT'] = () # <<<<<<<<<<<<<<
67207 *
67208 * @property
67209 */
67210 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_n_u_GT, __pyx_empty_tuple) < 0))) __PYX_ERR(0, 3470, __pyx_L1_error)
67211
67212 /* "pysam/libcbcf.pyx":3468
67213 * self['GT'] = value
67214 *
67215 * @allele_indices.deleter # <<<<<<<<<<<<<<
67216 * def allele_indices(self):
67217 * self['GT'] = ()
67218 */
67219
67220 /* function exit code */
67221 __pyx_r = 0;
67222 goto __pyx_L0;
67223 __pyx_L1_error:;
67224 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.allele_indices.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
67225 __pyx_r = -1;
67226 __pyx_L0:;
67227 __Pyx_TraceReturn(Py_None, 0);
67228 return __pyx_r;
67229 }
67230
67231 /* "pysam/libcbcf.pyx":3472
67232 * self['GT'] = ()
67233 *
67234 * @property # <<<<<<<<<<<<<<
67235 * def alleles(self):
67236 * """alleles for called genotype, if present. Otherwise None"""
67237 */
67238
67239 /* Python wrapper */
67240 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_1__get__(PyObject *__pyx_v_self); /*proto*/
67241 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_1__get__(PyObject *__pyx_v_self) {
67242 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
67243 PyObject *__pyx_r = 0;
67244 __Pyx_RefNannyDeclarations
67245 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
67246 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
67247 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
67248
67249 /* function exit code */
67250 __Pyx_RefNannyFinishContext();
67251 return __pyx_r;
67252 }
67253
67254 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
67255 PyObject *__pyx_r = NULL;
67256 __Pyx_TraceDeclarations
67257 __Pyx_RefNannyDeclarations
67258 PyObject *__pyx_t_1 = NULL;
67259 int __pyx_lineno = 0;
67260 const char *__pyx_filename = NULL;
67261 int __pyx_clineno = 0;
67262 __Pyx_RefNannySetupContext("__get__", 1);
67263 __Pyx_TraceCall("__get__", __pyx_f[0], 3472, 0, __PYX_ERR(0, 3472, __pyx_L1_error));
67264
67265 /* "pysam/libcbcf.pyx":3475
67266 * def alleles(self):
67267 * """alleles for called genotype, if present. Otherwise None"""
67268 * return bcf_format_get_alleles(self) # <<<<<<<<<<<<<<
67269 *
67270 * @alleles.setter
67271 */
67272 __Pyx_XDECREF(__pyx_r);
67273 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_bcf_format_get_alleles(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3475, __pyx_L1_error)
67274 __Pyx_GOTREF(__pyx_t_1);
67275 __pyx_r = __pyx_t_1;
67276 __pyx_t_1 = 0;
67277 goto __pyx_L0;
67278
67279 /* "pysam/libcbcf.pyx":3472
67280 * self['GT'] = ()
67281 *
67282 * @property # <<<<<<<<<<<<<<
67283 * def alleles(self):
67284 * """alleles for called genotype, if present. Otherwise None"""
67285 */
67286
67287 /* function exit code */
67288 __pyx_L1_error:;
67289 __Pyx_XDECREF(__pyx_t_1);
67290 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.alleles.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
67291 __pyx_r = NULL;
67292 __pyx_L0:;
67293 __Pyx_XGIVEREF(__pyx_r);
67294 __Pyx_TraceReturn(__pyx_r, 0);
67295 __Pyx_RefNannyFinishContext();
67296 return __pyx_r;
67297 }
67298
67299 /* "pysam/libcbcf.pyx":3477
67300 * return bcf_format_get_alleles(self)
67301 *
67302 * @alleles.setter # <<<<<<<<<<<<<<
67303 * def alleles(self, value):
67304 * # Sets the genotype, supply a tuple of alleles to set.
67305 */
67306
67307 /* Python wrapper */
67308 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
67309 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
67310 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
67311 int __pyx_r;
67312 __Pyx_RefNannyDeclarations
67313 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
67314 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
67315 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), ((PyObject *)__pyx_v_value));
67316
67317 /* function exit code */
67318 __Pyx_RefNannyFinishContext();
67319 return __pyx_r;
67320 }
67321 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___2generator33(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
67322
67323 /* "pysam/libcbcf.pyx":3487
67324 * return
67325 *
67326 * if any((type(x) == int for x in value)): # <<<<<<<<<<<<<<
67327 * raise ValueError('Use .allele_indices to set integer allele indices')
67328 *
67329 */
67330
67331 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
67332 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *__pyx_cur_scope;
67333 PyObject *__pyx_r = NULL;
67334 __Pyx_RefNannyDeclarations
67335 int __pyx_lineno = 0;
67336 const char *__pyx_filename = NULL;
67337 int __pyx_clineno = 0;
67338 __Pyx_RefNannySetupContext("genexpr", 0);
67339 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_31_genexpr(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr, __pyx_empty_tuple, NULL);
67340 if (unlikely(!__pyx_cur_scope)) {
67341 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *)Py_None);
67342 __Pyx_INCREF(Py_None);
67343 __PYX_ERR(0, 3487, __pyx_L1_error)
67344 } else {
67345 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
67346 }
67347 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
67348 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
67349 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
67350 {
67351 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___2generator33, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_VariantRecordSample___set___loca, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 3487, __pyx_L1_error)
67352 __Pyx_DECREF(__pyx_cur_scope);
67353 __Pyx_RefNannyFinishContext();
67354 return (PyObject *) gen;
67355 }
67356
67357 /* function exit code */
67358 __pyx_L1_error:;
67359 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.alleles.__set__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
67360 __pyx_r = NULL;
67361 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
67362 __Pyx_XGIVEREF(__pyx_r);
67363 __Pyx_RefNannyFinishContext();
67364 return __pyx_r;
67365 }
67366
67367 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___2generator33(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
67368 {
67369 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *)__pyx_generator->closure);
67370 PyObject *__pyx_r = NULL;
67371 __Pyx_TraceDeclarations
67372 PyObject *__pyx_t_1 = NULL;
67373 Py_ssize_t __pyx_t_2;
67374 PyObject *(*__pyx_t_3)(PyObject *);
67375 PyObject *__pyx_t_4 = NULL;
67376 int __pyx_t_5;
67377 int __pyx_lineno = 0;
67378 const char *__pyx_filename = NULL;
67379 int __pyx_clineno = 0;
67380 __Pyx_RefNannyDeclarations
67381 __Pyx_RefNannySetupContext("genexpr", 0);
67382 __Pyx_TraceCall("genexpr", __pyx_f[0], 3487, 0, __PYX_ERR(0, 3487, __pyx_L1_error));
67383 switch (__pyx_generator->resume_label) {
67384 case 0: goto __pyx_L3_first_run;
67385 default: /* CPython raises the right error here */
67386 __Pyx_TraceReturn(Py_None, 0);
67387 __Pyx_RefNannyFinishContext();
67388 return NULL;
67389 }
67390 __pyx_L3_first_run:;
67391 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3487, __pyx_L1_error)
67392 if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 3487, __pyx_L1_error) }
67393 if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
67394 __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
67395 __pyx_t_2 = 0;
67396 __pyx_t_3 = NULL;
67397 } else {
67398 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3487, __pyx_L1_error)
67399 __Pyx_GOTREF(__pyx_t_1);
67400 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3487, __pyx_L1_error)
67401 }
67402 for (;;) {
67403 if (likely(!__pyx_t_3)) {
67404 if (likely(PyList_CheckExact(__pyx_t_1))) {
67405 {
67406 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
67407 #if !CYTHON_ASSUME_SAFE_MACROS
67408 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
67409 #endif
67410 if (__pyx_t_2 >= __pyx_temp) break;
67411 }
67412 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
67413 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
67414 #else
67415 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3487, __pyx_L1_error)
67416 __Pyx_GOTREF(__pyx_t_4);
67417 #endif
67418 } else {
67419 {
67420 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
67421 #if !CYTHON_ASSUME_SAFE_MACROS
67422 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
67423 #endif
67424 if (__pyx_t_2 >= __pyx_temp) break;
67425 }
67426 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
67427 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
67428 #else
67429 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3487, __pyx_L1_error)
67430 __Pyx_GOTREF(__pyx_t_4);
67431 #endif
67432 }
67433 } else {
67434 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
67435 if (unlikely(!__pyx_t_4)) {
67436 PyObject* exc_type = PyErr_Occurred();
67437 if (exc_type) {
67438 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
67439 else __PYX_ERR(0, 3487, __pyx_L1_error)
67440 }
67441 break;
67442 }
67443 __Pyx_GOTREF(__pyx_t_4);
67444 }
67445 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
67446 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_4);
67447 __Pyx_GIVEREF(__pyx_t_4);
67448 __pyx_t_4 = 0;
67449 __pyx_t_4 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_x)), ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3487, __pyx_L1_error)
67450 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
67451 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
67452 if (__pyx_t_5) {
67453 __Pyx_XDECREF(__pyx_r);
67454 __Pyx_INCREF(Py_True);
67455 __pyx_r = Py_True;
67456 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
67457 goto __pyx_L0;
67458 }
67459 }
67460 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
67461 /*else*/ {
67462 __Pyx_XDECREF(__pyx_r);
67463 __Pyx_INCREF(Py_False);
67464 __pyx_r = Py_False;
67465 goto __pyx_L0;
67466 }
67467 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
67468
67469 /* function exit code */
67470 goto __pyx_L0;
67471 __pyx_L1_error:;
67472 __Pyx_Generator_Replace_StopIteration(0);
67473 __Pyx_XDECREF(__pyx_t_1);
67474 __Pyx_XDECREF(__pyx_t_4);
67475 __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
67476 __pyx_L0:;
67477 __Pyx_XGIVEREF(__pyx_r);
67478 #if !CYTHON_USE_EXC_INFO_STACK
67479 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
67480 #endif
67481 __pyx_generator->resume_label = -1;
67482 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
67483 __Pyx_TraceReturn(__pyx_r, 0);
67484 __Pyx_RefNannyFinishContext();
67485 return __pyx_r;
67486 }
67487 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___5generator34(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
67488
67489 /* "pysam/libcbcf.pyx":3492
67490 * # determine and set allele indices:
67491 * try:
67492 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) ) # <<<<<<<<<<<<<<
67493 * except ValueError:
67494 * raise ValueError("One or more of the supplied sample alleles are not defined as alleles of the corresponding pysam.libcbcf.VariantRecord."
67495 */
67496
67497 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___3genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
67498 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *__pyx_cur_scope;
67499 PyObject *__pyx_r = NULL;
67500 __Pyx_RefNannyDeclarations
67501 int __pyx_lineno = 0;
67502 const char *__pyx_filename = NULL;
67503 int __pyx_clineno = 0;
67504 __Pyx_RefNannySetupContext("genexpr", 0);
67505 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_32_genexpr(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr, __pyx_empty_tuple, NULL);
67506 if (unlikely(!__pyx_cur_scope)) {
67507 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *)Py_None);
67508 __Pyx_INCREF(Py_None);
67509 __PYX_ERR(0, 3492, __pyx_L1_error)
67510 } else {
67511 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
67512 }
67513 __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *) __pyx_self;
67514 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
67515 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
67516 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
67517 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
67518 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
67519 {
67520 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___5generator34, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_VariantRecordSample___set___loca, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 3492, __pyx_L1_error)
67521 __Pyx_DECREF(__pyx_cur_scope);
67522 __Pyx_RefNannyFinishContext();
67523 return (PyObject *) gen;
67524 }
67525
67526 /* function exit code */
67527 __pyx_L1_error:;
67528 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.alleles.__set__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
67529 __pyx_r = NULL;
67530 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
67531 __Pyx_XGIVEREF(__pyx_r);
67532 __Pyx_RefNannyFinishContext();
67533 return __pyx_r;
67534 }
67535
67536 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___5generator34(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
67537 {
67538 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *)__pyx_generator->closure);
67539 PyObject *__pyx_r = NULL;
67540 __Pyx_TraceDeclarations
67541 PyObject *__pyx_t_1 = NULL;
67542 Py_ssize_t __pyx_t_2;
67543 PyObject *(*__pyx_t_3)(PyObject *);
67544 PyObject *__pyx_t_4 = NULL;
67545 PyObject *__pyx_t_5 = NULL;
67546 PyObject *__pyx_t_6 = NULL;
67547 unsigned int __pyx_t_7;
67548 int __pyx_lineno = 0;
67549 const char *__pyx_filename = NULL;
67550 int __pyx_clineno = 0;
67551 __Pyx_RefNannyDeclarations
67552 __Pyx_RefNannySetupContext("genexpr", 0);
67553 __Pyx_TraceCall("genexpr", __pyx_f[0], 3492, 0, __PYX_ERR(0, 3492, __pyx_L1_error));
67554 switch (__pyx_generator->resume_label) {
67555 case 0: goto __pyx_L3_first_run;
67556 case 1: goto __pyx_L6_resume_from_yield;
67557 default: /* CPython raises the right error here */
67558 __Pyx_TraceReturn(Py_None, 0);
67559 __Pyx_RefNannyFinishContext();
67560 return NULL;
67561 }
67562 __pyx_L3_first_run:;
67563 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3492, __pyx_L1_error)
67564 if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 3492, __pyx_L1_error) }
67565 if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
67566 __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
67567 __pyx_t_2 = 0;
67568 __pyx_t_3 = NULL;
67569 } else {
67570 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3492, __pyx_L1_error)
67571 __Pyx_GOTREF(__pyx_t_1);
67572 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3492, __pyx_L1_error)
67573 }
67574 for (;;) {
67575 if (likely(!__pyx_t_3)) {
67576 if (likely(PyList_CheckExact(__pyx_t_1))) {
67577 {
67578 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
67579 #if !CYTHON_ASSUME_SAFE_MACROS
67580 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3492, __pyx_L1_error)
67581 #endif
67582 if (__pyx_t_2 >= __pyx_temp) break;
67583 }
67584 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
67585 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3492, __pyx_L1_error)
67586 #else
67587 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3492, __pyx_L1_error)
67588 __Pyx_GOTREF(__pyx_t_4);
67589 #endif
67590 } else {
67591 {
67592 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
67593 #if !CYTHON_ASSUME_SAFE_MACROS
67594 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3492, __pyx_L1_error)
67595 #endif
67596 if (__pyx_t_2 >= __pyx_temp) break;
67597 }
67598 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
67599 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3492, __pyx_L1_error)
67600 #else
67601 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3492, __pyx_L1_error)
67602 __Pyx_GOTREF(__pyx_t_4);
67603 #endif
67604 }
67605 } else {
67606 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
67607 if (unlikely(!__pyx_t_4)) {
67608 PyObject* exc_type = PyErr_Occurred();
67609 if (exc_type) {
67610 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
67611 else __PYX_ERR(0, 3492, __pyx_L1_error)
67612 }
67613 break;
67614 }
67615 __Pyx_GOTREF(__pyx_t_4);
67616 }
67617 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_allele);
67618 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_allele, __pyx_t_4);
67619 __Pyx_GIVEREF(__pyx_t_4);
67620 __pyx_t_4 = 0;
67621 if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3492, __pyx_L1_error) }
67622 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->record), __pyx_n_s_alleles); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3492, __pyx_L1_error)
67623 __Pyx_GOTREF(__pyx_t_5);
67624 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3492, __pyx_L1_error)
67625 __Pyx_GOTREF(__pyx_t_6);
67626 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
67627 __pyx_t_5 = NULL;
67628 __pyx_t_7 = 0;
67629 #if CYTHON_UNPACK_METHODS
67630 if (likely(PyMethod_Check(__pyx_t_6))) {
67631 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
67632 if (likely(__pyx_t_5)) {
67633 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
67634 __Pyx_INCREF(__pyx_t_5);
67635 __Pyx_INCREF(function);
67636 __Pyx_DECREF_SET(__pyx_t_6, function);
67637 __pyx_t_7 = 1;
67638 }
67639 }
67640 #endif
67641 {
67642 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_allele};
67643 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
67644 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
67645 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3492, __pyx_L1_error)
67646 __Pyx_GOTREF(__pyx_t_4);
67647 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
67648 }
67649 __pyx_r = __pyx_t_4;
67650 __pyx_t_4 = 0;
67651 __Pyx_XGIVEREF(__pyx_t_1);
67652 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
67653 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
67654 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
67655 __Pyx_XGIVEREF(__pyx_r);
67656 __Pyx_TraceReturn(__pyx_r, 0);
67657 __Pyx_RefNannyFinishContext();
67658 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
67659 /* return from generator, yielding value */
67660 __pyx_generator->resume_label = 1;
67661 return __pyx_r;
67662 __pyx_L6_resume_from_yield:;
67663 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
67664 __pyx_cur_scope->__pyx_t_0 = 0;
67665 __Pyx_XGOTREF(__pyx_t_1);
67666 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
67667 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
67668 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3492, __pyx_L1_error)
67669 }
67670 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
67671 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
67672
67673 /* function exit code */
67674 PyErr_SetNone(PyExc_StopIteration);
67675 goto __pyx_L0;
67676 __pyx_L1_error:;
67677 __Pyx_Generator_Replace_StopIteration(0);
67678 __Pyx_XDECREF(__pyx_t_1);
67679 __Pyx_XDECREF(__pyx_t_4);
67680 __Pyx_XDECREF(__pyx_t_5);
67681 __Pyx_XDECREF(__pyx_t_6);
67682 __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
67683 __pyx_L0:;
67684 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
67685 #if !CYTHON_USE_EXC_INFO_STACK
67686 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
67687 #endif
67688 __pyx_generator->resume_label = -1;
67689 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
67690 __Pyx_TraceReturn(__pyx_r, 0);
67691 __Pyx_RefNannyFinishContext();
67692 return __pyx_r;
67693 }
67694
67695 /* "pysam/libcbcf.pyx":3477
67696 * return bcf_format_get_alleles(self)
67697 *
67698 * @alleles.setter # <<<<<<<<<<<<<<
67699 * def alleles(self, value):
67700 * # Sets the genotype, supply a tuple of alleles to set.
67701 */
67702
67703 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_value) {
67704 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *__pyx_cur_scope;
67705 PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___2generator33 = 0;
67706 PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___5generator34 = 0;
67707 int __pyx_r;
67708 __Pyx_TraceDeclarations
67709 __Pyx_RefNannyDeclarations
67710 int __pyx_t_1;
67711 PyObject *__pyx_t_2 = NULL;
67712 int __pyx_t_3;
67713 PyObject *__pyx_t_4 = NULL;
67714 PyObject *__pyx_t_5 = NULL;
67715 PyObject *__pyx_t_6 = NULL;
67716 PyObject *__pyx_t_7 = NULL;
67717 int __pyx_t_8;
67718 PyObject *__pyx_t_9 = NULL;
67719 PyObject *__pyx_t_10 = NULL;
67720 int __pyx_lineno = 0;
67721 const char *__pyx_filename = NULL;
67722 int __pyx_clineno = 0;
67723 __Pyx_RefNannySetupContext("__set__", 0);
67724 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_30___set__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__, __pyx_empty_tuple, NULL);
67725 if (unlikely(!__pyx_cur_scope)) {
67726 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *)Py_None);
67727 __Pyx_INCREF(Py_None);
67728 __PYX_ERR(0, 3477, __pyx_L1_error)
67729 } else {
67730 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
67731 }
67732 __Pyx_TraceCall("__set__", __pyx_f[0], 3477, 0, __PYX_ERR(0, 3477, __pyx_L1_error));
67733 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
67734 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
67735 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
67736
67737 /* "pysam/libcbcf.pyx":3483
67738 * # The genotype is reset when an empty tuple, None or (None,) is supplied
67739 *
67740 * if value==(None,) or value==tuple() or value is None: # <<<<<<<<<<<<<<
67741 * self['GT'] = ()
67742 * return
67743 */
67744 __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, __pyx_tuple__4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3483, __pyx_L1_error)
67745 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3483, __pyx_L1_error)
67746 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
67747 if (!__pyx_t_3) {
67748 } else {
67749 __pyx_t_1 = __pyx_t_3;
67750 goto __pyx_L4_bool_binop_done;
67751 }
67752 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3483, __pyx_L1_error)
67753 __Pyx_GOTREF(__pyx_t_2);
67754 __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3483, __pyx_L1_error)
67755 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
67756 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3483, __pyx_L1_error)
67757 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
67758 if (!__pyx_t_3) {
67759 } else {
67760 __pyx_t_1 = __pyx_t_3;
67761 goto __pyx_L4_bool_binop_done;
67762 }
67763 __pyx_t_3 = (__pyx_v_value == Py_None);
67764 __pyx_t_1 = __pyx_t_3;
67765 __pyx_L4_bool_binop_done:;
67766 if (__pyx_t_1) {
67767
67768 /* "pysam/libcbcf.pyx":3484
67769 *
67770 * if value==(None,) or value==tuple() or value is None:
67771 * self['GT'] = () # <<<<<<<<<<<<<<
67772 * return
67773 *
67774 */
67775 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_u_GT, __pyx_empty_tuple) < 0))) __PYX_ERR(0, 3484, __pyx_L1_error)
67776
67777 /* "pysam/libcbcf.pyx":3485
67778 * if value==(None,) or value==tuple() or value is None:
67779 * self['GT'] = ()
67780 * return # <<<<<<<<<<<<<<
67781 *
67782 * if any((type(x) == int for x in value)):
67783 */
67784 __pyx_r = 0;
67785 goto __pyx_L0;
67786
67787 /* "pysam/libcbcf.pyx":3483
67788 * # The genotype is reset when an empty tuple, None or (None,) is supplied
67789 *
67790 * if value==(None,) or value==tuple() or value is None: # <<<<<<<<<<<<<<
67791 * self['GT'] = ()
67792 * return
67793 */
67794 }
67795
67796 /* "pysam/libcbcf.pyx":3487
67797 * return
67798 *
67799 * if any((type(x) == int for x in value)): # <<<<<<<<<<<<<<
67800 * raise ValueError('Use .allele_indices to set integer allele indices')
67801 *
67802 */
67803 __pyx_t_4 = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___genexpr(NULL, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3487, __pyx_L1_error)
67804 __Pyx_GOTREF(__pyx_t_4);
67805 __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3487, __pyx_L1_error)
67806 __Pyx_GOTREF(__pyx_t_2);
67807 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
67808 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
67809 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
67810 if (unlikely(__pyx_t_1)) {
67811
67812 /* "pysam/libcbcf.pyx":3488
67813 *
67814 * if any((type(x) == int for x in value)):
67815 * raise ValueError('Use .allele_indices to set integer allele indices') # <<<<<<<<<<<<<<
67816 *
67817 * # determine and set allele indices:
67818 */
67819 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__182, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3488, __pyx_L1_error)
67820 __Pyx_GOTREF(__pyx_t_2);
67821 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
67822 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
67823 __PYX_ERR(0, 3488, __pyx_L1_error)
67824
67825 /* "pysam/libcbcf.pyx":3487
67826 * return
67827 *
67828 * if any((type(x) == int for x in value)): # <<<<<<<<<<<<<<
67829 * raise ValueError('Use .allele_indices to set integer allele indices')
67830 *
67831 */
67832 }
67833
67834 /* "pysam/libcbcf.pyx":3491
67835 *
67836 * # determine and set allele indices:
67837 * try: # <<<<<<<<<<<<<<
67838 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) )
67839 * except ValueError:
67840 */
67841 {
67842 __Pyx_PyThreadState_declare
67843 __Pyx_PyThreadState_assign
67844 __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
67845 __Pyx_XGOTREF(__pyx_t_5);
67846 __Pyx_XGOTREF(__pyx_t_6);
67847 __Pyx_XGOTREF(__pyx_t_7);
67848 /*try:*/ {
67849
67850 /* "pysam/libcbcf.pyx":3492
67851 * # determine and set allele indices:
67852 * try:
67853 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) ) # <<<<<<<<<<<<<<
67854 * except ValueError:
67855 * raise ValueError("One or more of the supplied sample alleles are not defined as alleles of the corresponding pysam.libcbcf.VariantRecord."
67856 */
67857 __pyx_t_2 = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___3genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3492, __pyx_L8_error)
67858 __Pyx_GOTREF(__pyx_t_2);
67859 __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3492, __pyx_L8_error)
67860 __Pyx_GOTREF(__pyx_t_4);
67861 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
67862 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_u_GT, __pyx_t_4) < 0))) __PYX_ERR(0, 3492, __pyx_L8_error)
67863 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
67864
67865 /* "pysam/libcbcf.pyx":3491
67866 *
67867 * # determine and set allele indices:
67868 * try: # <<<<<<<<<<<<<<
67869 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) )
67870 * except ValueError:
67871 */
67872 }
67873 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
67874 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
67875 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
67876 goto __pyx_L13_try_end;
67877 __pyx_L8_error:;
67878 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
67879 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
67880
67881 /* "pysam/libcbcf.pyx":3493
67882 * try:
67883 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) )
67884 * except ValueError: # <<<<<<<<<<<<<<
67885 * raise ValueError("One or more of the supplied sample alleles are not defined as alleles of the corresponding pysam.libcbcf.VariantRecord."
67886 * "First set the .alleles of this record to define the alleles")
67887 */
67888 __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
67889 if (__pyx_t_8) {
67890 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.alleles.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
67891 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(0, 3493, __pyx_L10_except_error)
67892 __Pyx_XGOTREF(__pyx_t_4);
67893 __Pyx_XGOTREF(__pyx_t_2);
67894 __Pyx_XGOTREF(__pyx_t_9);
67895
67896 /* "pysam/libcbcf.pyx":3494
67897 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) )
67898 * except ValueError:
67899 * raise ValueError("One or more of the supplied sample alleles are not defined as alleles of the corresponding pysam.libcbcf.VariantRecord." # <<<<<<<<<<<<<<
67900 * "First set the .alleles of this record to define the alleles")
67901 *
67902 */
67903 __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3494, __pyx_L10_except_error)
67904 __Pyx_GOTREF(__pyx_t_10);
67905 __Pyx_Raise(__pyx_t_10, 0, 0, 0);
67906 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
67907 __PYX_ERR(0, 3494, __pyx_L10_except_error)
67908 }
67909 goto __pyx_L10_except_error;
67910
67911 /* "pysam/libcbcf.pyx":3491
67912 *
67913 * # determine and set allele indices:
67914 * try: # <<<<<<<<<<<<<<
67915 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) )
67916 * except ValueError:
67917 */
67918 __pyx_L10_except_error:;
67919 __Pyx_XGIVEREF(__pyx_t_5);
67920 __Pyx_XGIVEREF(__pyx_t_6);
67921 __Pyx_XGIVEREF(__pyx_t_7);
67922 __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
67923 goto __pyx_L1_error;
67924 __pyx_L13_try_end:;
67925 }
67926
67927 /* "pysam/libcbcf.pyx":3477
67928 * return bcf_format_get_alleles(self)
67929 *
67930 * @alleles.setter # <<<<<<<<<<<<<<
67931 * def alleles(self, value):
67932 * # Sets the genotype, supply a tuple of alleles to set.
67933 */
67934
67935 /* function exit code */
67936 __pyx_r = 0;
67937 goto __pyx_L0;
67938 __pyx_L1_error:;
67939 __Pyx_XDECREF(__pyx_t_2);
67940 __Pyx_XDECREF(__pyx_t_4);
67941 __Pyx_XDECREF(__pyx_t_9);
67942 __Pyx_XDECREF(__pyx_t_10);
67943 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.alleles.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
67944 __pyx_r = -1;
67945 __pyx_L0:;
67946 __Pyx_XDECREF(__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___2generator33);
67947 __Pyx_XDECREF(__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_7alleles_7__set___5generator34);
67948 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
67949 __Pyx_TraceReturn(Py_None, 0);
67950 __Pyx_RefNannyFinishContext();
67951 return __pyx_r;
67952 }
67953
67954 /* "pysam/libcbcf.pyx":3497
67955 * "First set the .alleles of this record to define the alleles")
67956 *
67957 * @alleles.deleter # <<<<<<<<<<<<<<
67958 * def alleles(self):
67959 * self['GT'] = ()
67960 */
67961
67962 /* Python wrapper */
67963 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_5__del__(PyObject *__pyx_v_self); /*proto*/
67964 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_5__del__(PyObject *__pyx_v_self) {
67965 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
67966 int __pyx_r;
67967 __Pyx_RefNannyDeclarations
67968 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
67969 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
67970 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_4__del__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
67971
67972 /* function exit code */
67973 __Pyx_RefNannyFinishContext();
67974 return __pyx_r;
67975 }
67976
67977 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_7alleles_4__del__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
67978 int __pyx_r;
67979 __Pyx_TraceDeclarations
67980 int __pyx_lineno = 0;
67981 const char *__pyx_filename = NULL;
67982 int __pyx_clineno = 0;
67983 __Pyx_TraceCall("__del__", __pyx_f[0], 3497, 0, __PYX_ERR(0, 3497, __pyx_L1_error));
67984
67985 /* "pysam/libcbcf.pyx":3499
67986 * @alleles.deleter
67987 * def alleles(self):
67988 * self['GT'] = () # <<<<<<<<<<<<<<
67989 *
67990 * @property
67991 */
67992 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_n_u_GT, __pyx_empty_tuple) < 0))) __PYX_ERR(0, 3499, __pyx_L1_error)
67993
67994 /* "pysam/libcbcf.pyx":3497
67995 * "First set the .alleles of this record to define the alleles")
67996 *
67997 * @alleles.deleter # <<<<<<<<<<<<<<
67998 * def alleles(self):
67999 * self['GT'] = ()
68000 */
68001
68002 /* function exit code */
68003 __pyx_r = 0;
68004 goto __pyx_L0;
68005 __pyx_L1_error:;
68006 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.alleles.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68007 __pyx_r = -1;
68008 __pyx_L0:;
68009 __Pyx_TraceReturn(Py_None, 0);
68010 return __pyx_r;
68011 }
68012
68013 /* "pysam/libcbcf.pyx":3501
68014 * self['GT'] = ()
68015 *
68016 * @property # <<<<<<<<<<<<<<
68017 * def phased(self):
68018 * """False if genotype is missing or any allele is unphased. Otherwise True."""
68019 */
68020
68021 /* Python wrapper */
68022 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_6phased_1__get__(PyObject *__pyx_v_self); /*proto*/
68023 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_6phased_1__get__(PyObject *__pyx_v_self) {
68024 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68025 PyObject *__pyx_r = 0;
68026 __Pyx_RefNannyDeclarations
68027 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
68028 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
68029 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6phased___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
68030
68031 /* function exit code */
68032 __Pyx_RefNannyFinishContext();
68033 return __pyx_r;
68034 }
68035
68036 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6phased___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
68037 PyObject *__pyx_r = NULL;
68038 __Pyx_TraceDeclarations
68039 __Pyx_RefNannyDeclarations
68040 int __pyx_t_1;
68041 PyObject *__pyx_t_2 = NULL;
68042 int __pyx_lineno = 0;
68043 const char *__pyx_filename = NULL;
68044 int __pyx_clineno = 0;
68045 __Pyx_RefNannySetupContext("__get__", 1);
68046 __Pyx_TraceCall("__get__", __pyx_f[0], 3501, 0, __PYX_ERR(0, 3501, __pyx_L1_error));
68047
68048 /* "pysam/libcbcf.pyx":3504
68049 * def phased(self):
68050 * """False if genotype is missing or any allele is unphased. Otherwise True."""
68051 * return bcf_sample_get_phased(self) # <<<<<<<<<<<<<<
68052 *
68053 * @phased.setter
68054 */
68055 __Pyx_XDECREF(__pyx_r);
68056 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_bcf_sample_get_phased(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3504, __pyx_L1_error)
68057 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3504, __pyx_L1_error)
68058 __Pyx_GOTREF(__pyx_t_2);
68059 __pyx_r = __pyx_t_2;
68060 __pyx_t_2 = 0;
68061 goto __pyx_L0;
68062
68063 /* "pysam/libcbcf.pyx":3501
68064 * self['GT'] = ()
68065 *
68066 * @property # <<<<<<<<<<<<<<
68067 * def phased(self):
68068 * """False if genotype is missing or any allele is unphased. Otherwise True."""
68069 */
68070
68071 /* function exit code */
68072 __pyx_L1_error:;
68073 __Pyx_XDECREF(__pyx_t_2);
68074 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.phased.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68075 __pyx_r = NULL;
68076 __pyx_L0:;
68077 __Pyx_XGIVEREF(__pyx_r);
68078 __Pyx_TraceReturn(__pyx_r, 0);
68079 __Pyx_RefNannyFinishContext();
68080 return __pyx_r;
68081 }
68082
68083 /* "pysam/libcbcf.pyx":3506
68084 * return bcf_sample_get_phased(self)
68085 *
68086 * @phased.setter # <<<<<<<<<<<<<<
68087 * def phased(self, value):
68088 * bcf_sample_set_phased(self, value)
68089 */
68090
68091 /* Python wrapper */
68092 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_6phased_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
68093 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_6phased_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
68094 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68095 int __pyx_r;
68096 __Pyx_RefNannyDeclarations
68097 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
68098 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
68099 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6phased_2__set__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), ((PyObject *)__pyx_v_value));
68100
68101 /* function exit code */
68102 __Pyx_RefNannyFinishContext();
68103 return __pyx_r;
68104 }
68105
68106 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6phased_2__set__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_value) {
68107 int __pyx_r;
68108 __Pyx_TraceDeclarations
68109 __Pyx_RefNannyDeclarations
68110 int __pyx_t_1;
68111 PyObject *__pyx_t_2 = NULL;
68112 int __pyx_lineno = 0;
68113 const char *__pyx_filename = NULL;
68114 int __pyx_clineno = 0;
68115 __Pyx_RefNannySetupContext("__set__", 1);
68116 __Pyx_TraceCall("__set__", __pyx_f[0], 3506, 0, __PYX_ERR(0, 3506, __pyx_L1_error));
68117
68118 /* "pysam/libcbcf.pyx":3508
68119 * @phased.setter
68120 * def phased(self, value):
68121 * bcf_sample_set_phased(self, value) # <<<<<<<<<<<<<<
68122 *
68123 * def __len__(self):
68124 */
68125 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3508, __pyx_L1_error)
68126 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_sample_set_phased(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3508, __pyx_L1_error)
68127 __Pyx_GOTREF(__pyx_t_2);
68128 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
68129
68130 /* "pysam/libcbcf.pyx":3506
68131 * return bcf_sample_get_phased(self)
68132 *
68133 * @phased.setter # <<<<<<<<<<<<<<
68134 * def phased(self, value):
68135 * bcf_sample_set_phased(self, value)
68136 */
68137
68138 /* function exit code */
68139 __pyx_r = 0;
68140 goto __pyx_L0;
68141 __pyx_L1_error:;
68142 __Pyx_XDECREF(__pyx_t_2);
68143 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.phased.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68144 __pyx_r = -1;
68145 __pyx_L0:;
68146 __Pyx_TraceReturn(Py_None, 0);
68147 __Pyx_RefNannyFinishContext();
68148 return __pyx_r;
68149 }
68150
68151 /* "pysam/libcbcf.pyx":3510
68152 * bcf_sample_set_phased(self, value)
68153 *
68154 * def __len__(self): # <<<<<<<<<<<<<<
68155 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68156 * cdef bcf1_t *r = self.record.ptr
68157 */
68158
68159 /* Python wrapper */
68160 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_3__len__(PyObject *__pyx_v_self); /*proto*/
68161 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_3__len__(PyObject *__pyx_v_self) {
68162 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68163 Py_ssize_t __pyx_r;
68164 __Pyx_RefNannyDeclarations
68165 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
68166 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
68167 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_2__len__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
68168
68169 /* function exit code */
68170 __Pyx_RefNannyFinishContext();
68171 return __pyx_r;
68172 }
68173
68174 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_2__len__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
68175 CYTHON_UNUSED bcf_hdr_t *__pyx_v_hdr;
68176 bcf1_t *__pyx_v_r;
68177 int __pyx_v_i;
68178 int __pyx_v_n;
68179 Py_ssize_t __pyx_r;
68180 __Pyx_TraceDeclarations
68181 __Pyx_RefNannyDeclarations
68182 bcf_hdr_t *__pyx_t_1;
68183 bcf1_t *__pyx_t_2;
68184 int __pyx_t_3;
68185 PyObject *__pyx_t_4 = NULL;
68186 uint32_t __pyx_t_5;
68187 uint32_t __pyx_t_6;
68188 int __pyx_t_7;
68189 int __pyx_lineno = 0;
68190 const char *__pyx_filename = NULL;
68191 int __pyx_clineno = 0;
68192 __Pyx_RefNannySetupContext("__len__", 1);
68193 __Pyx_TraceCall("__len__", __pyx_f[0], 3510, 0, __PYX_ERR(0, 3510, __pyx_L1_error));
68194
68195 /* "pysam/libcbcf.pyx":3511
68196 *
68197 * def __len__(self):
68198 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
68199 * cdef bcf1_t *r = self.record.ptr
68200 * cdef int i, n = 0
68201 */
68202 __pyx_t_1 = __pyx_v_self->record->header->ptr;
68203 __pyx_v_hdr = __pyx_t_1;
68204
68205 /* "pysam/libcbcf.pyx":3512
68206 * def __len__(self):
68207 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68208 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
68209 * cdef int i, n = 0
68210 *
68211 */
68212 __pyx_t_2 = __pyx_v_self->record->ptr;
68213 __pyx_v_r = __pyx_t_2;
68214
68215 /* "pysam/libcbcf.pyx":3513
68216 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68217 * cdef bcf1_t *r = self.record.ptr
68218 * cdef int i, n = 0 # <<<<<<<<<<<<<<
68219 *
68220 * if bcf_unpack(r, BCF_UN_FMT) < 0:
68221 */
68222 __pyx_v_n = 0;
68223
68224 /* "pysam/libcbcf.pyx":3515
68225 * cdef int i, n = 0
68226 *
68227 * if bcf_unpack(r, BCF_UN_FMT) < 0: # <<<<<<<<<<<<<<
68228 * raise ValueError('Error unpacking VariantRecord')
68229 *
68230 */
68231 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_FMT) < 0);
68232 if (unlikely(__pyx_t_3)) {
68233
68234 /* "pysam/libcbcf.pyx":3516
68235 *
68236 * if bcf_unpack(r, BCF_UN_FMT) < 0:
68237 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
68238 *
68239 * for i in range(r.n_fmt):
68240 */
68241 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3516, __pyx_L1_error)
68242 __Pyx_GOTREF(__pyx_t_4);
68243 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
68244 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
68245 __PYX_ERR(0, 3516, __pyx_L1_error)
68246
68247 /* "pysam/libcbcf.pyx":3515
68248 * cdef int i, n = 0
68249 *
68250 * if bcf_unpack(r, BCF_UN_FMT) < 0: # <<<<<<<<<<<<<<
68251 * raise ValueError('Error unpacking VariantRecord')
68252 *
68253 */
68254 }
68255
68256 /* "pysam/libcbcf.pyx":3518
68257 * raise ValueError('Error unpacking VariantRecord')
68258 *
68259 * for i in range(r.n_fmt): # <<<<<<<<<<<<<<
68260 * if r.d.fmt[i].p:
68261 * n += 1
68262 */
68263 __pyx_t_5 = __pyx_v_r->n_fmt;
68264 __pyx_t_6 = __pyx_t_5;
68265 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
68266 __pyx_v_i = __pyx_t_7;
68267
68268 /* "pysam/libcbcf.pyx":3519
68269 *
68270 * for i in range(r.n_fmt):
68271 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
68272 * n += 1
68273 * return n
68274 */
68275 __pyx_t_3 = ((__pyx_v_r->d.fmt[__pyx_v_i]).p != 0);
68276 if (__pyx_t_3) {
68277
68278 /* "pysam/libcbcf.pyx":3520
68279 * for i in range(r.n_fmt):
68280 * if r.d.fmt[i].p:
68281 * n += 1 # <<<<<<<<<<<<<<
68282 * return n
68283 *
68284 */
68285 __pyx_v_n = (__pyx_v_n + 1);
68286
68287 /* "pysam/libcbcf.pyx":3519
68288 *
68289 * for i in range(r.n_fmt):
68290 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
68291 * n += 1
68292 * return n
68293 */
68294 }
68295 }
68296
68297 /* "pysam/libcbcf.pyx":3521
68298 * if r.d.fmt[i].p:
68299 * n += 1
68300 * return n # <<<<<<<<<<<<<<
68301 *
68302 * def __bool__(self):
68303 */
68304 __pyx_r = __pyx_v_n;
68305 goto __pyx_L0;
68306
68307 /* "pysam/libcbcf.pyx":3510
68308 * bcf_sample_set_phased(self, value)
68309 *
68310 * def __len__(self): # <<<<<<<<<<<<<<
68311 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68312 * cdef bcf1_t *r = self.record.ptr
68313 */
68314
68315 /* function exit code */
68316 __pyx_L1_error:;
68317 __Pyx_XDECREF(__pyx_t_4);
68318 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68319 __pyx_r = -1;
68320 __pyx_L0:;
68321 __Pyx_TraceReturn(Py_None, 0);
68322 __Pyx_RefNannyFinishContext();
68323 return __pyx_r;
68324 }
68325
68326 /* "pysam/libcbcf.pyx":3523
68327 * return n
68328 *
68329 * def __bool__(self): # <<<<<<<<<<<<<<
68330 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68331 * cdef bcf1_t *r = self.record.ptr
68332 */
68333
68334 /* Python wrapper */
68335 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_5__bool__(PyObject *__pyx_v_self); /*proto*/
68336 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_5__bool__(PyObject *__pyx_v_self) {
68337 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68338 int __pyx_r;
68339 __Pyx_RefNannyDeclarations
68340 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
68341 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
68342 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
68343
68344 /* function exit code */
68345 __Pyx_RefNannyFinishContext();
68346 return __pyx_r;
68347 }
68348
68349 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_4__bool__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
68350 CYTHON_UNUSED bcf_hdr_t *__pyx_v_hdr;
68351 bcf1_t *__pyx_v_r;
68352 int __pyx_v_i;
68353 int __pyx_r;
68354 __Pyx_TraceDeclarations
68355 __Pyx_RefNannyDeclarations
68356 bcf_hdr_t *__pyx_t_1;
68357 bcf1_t *__pyx_t_2;
68358 int __pyx_t_3;
68359 PyObject *__pyx_t_4 = NULL;
68360 uint32_t __pyx_t_5;
68361 uint32_t __pyx_t_6;
68362 int __pyx_t_7;
68363 int __pyx_lineno = 0;
68364 const char *__pyx_filename = NULL;
68365 int __pyx_clineno = 0;
68366 __Pyx_RefNannySetupContext("__bool__", 1);
68367 __Pyx_TraceCall("__bool__", __pyx_f[0], 3523, 0, __PYX_ERR(0, 3523, __pyx_L1_error));
68368
68369 /* "pysam/libcbcf.pyx":3524
68370 *
68371 * def __bool__(self):
68372 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
68373 * cdef bcf1_t *r = self.record.ptr
68374 * cdef int i
68375 */
68376 __pyx_t_1 = __pyx_v_self->record->header->ptr;
68377 __pyx_v_hdr = __pyx_t_1;
68378
68379 /* "pysam/libcbcf.pyx":3525
68380 * def __bool__(self):
68381 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68382 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
68383 * cdef int i
68384 *
68385 */
68386 __pyx_t_2 = __pyx_v_self->record->ptr;
68387 __pyx_v_r = __pyx_t_2;
68388
68389 /* "pysam/libcbcf.pyx":3528
68390 * cdef int i
68391 *
68392 * if bcf_unpack(r, BCF_UN_FMT) < 0: # <<<<<<<<<<<<<<
68393 * raise ValueError('Error unpacking VariantRecord')
68394 *
68395 */
68396 __pyx_t_3 = (bcf_unpack(__pyx_v_r, BCF_UN_FMT) < 0);
68397 if (unlikely(__pyx_t_3)) {
68398
68399 /* "pysam/libcbcf.pyx":3529
68400 *
68401 * if bcf_unpack(r, BCF_UN_FMT) < 0:
68402 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
68403 *
68404 * for i in range(r.n_fmt):
68405 */
68406 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3529, __pyx_L1_error)
68407 __Pyx_GOTREF(__pyx_t_4);
68408 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
68409 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
68410 __PYX_ERR(0, 3529, __pyx_L1_error)
68411
68412 /* "pysam/libcbcf.pyx":3528
68413 * cdef int i
68414 *
68415 * if bcf_unpack(r, BCF_UN_FMT) < 0: # <<<<<<<<<<<<<<
68416 * raise ValueError('Error unpacking VariantRecord')
68417 *
68418 */
68419 }
68420
68421 /* "pysam/libcbcf.pyx":3531
68422 * raise ValueError('Error unpacking VariantRecord')
68423 *
68424 * for i in range(r.n_fmt): # <<<<<<<<<<<<<<
68425 * if r.d.fmt[i].p:
68426 * return True
68427 */
68428 __pyx_t_5 = __pyx_v_r->n_fmt;
68429 __pyx_t_6 = __pyx_t_5;
68430 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
68431 __pyx_v_i = __pyx_t_7;
68432
68433 /* "pysam/libcbcf.pyx":3532
68434 *
68435 * for i in range(r.n_fmt):
68436 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
68437 * return True
68438 * return False
68439 */
68440 __pyx_t_3 = ((__pyx_v_r->d.fmt[__pyx_v_i]).p != 0);
68441 if (__pyx_t_3) {
68442
68443 /* "pysam/libcbcf.pyx":3533
68444 * for i in range(r.n_fmt):
68445 * if r.d.fmt[i].p:
68446 * return True # <<<<<<<<<<<<<<
68447 * return False
68448 *
68449 */
68450 __pyx_r = 1;
68451 goto __pyx_L0;
68452
68453 /* "pysam/libcbcf.pyx":3532
68454 *
68455 * for i in range(r.n_fmt):
68456 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
68457 * return True
68458 * return False
68459 */
68460 }
68461 }
68462
68463 /* "pysam/libcbcf.pyx":3534
68464 * if r.d.fmt[i].p:
68465 * return True
68466 * return False # <<<<<<<<<<<<<<
68467 *
68468 * def __getitem__(self, key):
68469 */
68470 __pyx_r = 0;
68471 goto __pyx_L0;
68472
68473 /* "pysam/libcbcf.pyx":3523
68474 * return n
68475 *
68476 * def __bool__(self): # <<<<<<<<<<<<<<
68477 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68478 * cdef bcf1_t *r = self.record.ptr
68479 */
68480
68481 /* function exit code */
68482 __pyx_L1_error:;
68483 __Pyx_XDECREF(__pyx_t_4);
68484 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68485 __pyx_r = -1;
68486 __pyx_L0:;
68487 __Pyx_TraceReturn(Py_None, 0);
68488 __Pyx_RefNannyFinishContext();
68489 return __pyx_r;
68490 }
68491
68492 /* "pysam/libcbcf.pyx":3536
68493 * return False
68494 *
68495 * def __getitem__(self, key): # <<<<<<<<<<<<<<
68496 * return bcf_format_get_value(self, key)
68497 *
68498 */
68499
68500 /* Python wrapper */
68501 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
68502 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
68503 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68504 PyObject *__pyx_r = 0;
68505 __Pyx_RefNannyDeclarations
68506 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
68507 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
68508 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), ((PyObject *)__pyx_v_key));
68509
68510 /* function exit code */
68511 __Pyx_RefNannyFinishContext();
68512 return __pyx_r;
68513 }
68514
68515 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key) {
68516 PyObject *__pyx_r = NULL;
68517 __Pyx_TraceDeclarations
68518 __Pyx_RefNannyDeclarations
68519 PyObject *__pyx_t_1 = NULL;
68520 int __pyx_lineno = 0;
68521 const char *__pyx_filename = NULL;
68522 int __pyx_clineno = 0;
68523 __Pyx_RefNannySetupContext("__getitem__", 1);
68524 __Pyx_TraceCall("__getitem__", __pyx_f[0], 3536, 0, __PYX_ERR(0, 3536, __pyx_L1_error));
68525
68526 /* "pysam/libcbcf.pyx":3537
68527 *
68528 * def __getitem__(self, key):
68529 * return bcf_format_get_value(self, key) # <<<<<<<<<<<<<<
68530 *
68531 * def __setitem__(self, key, value):
68532 */
68533 __Pyx_XDECREF(__pyx_r);
68534 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_bcf_format_get_value(__pyx_v_self, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3537, __pyx_L1_error)
68535 __Pyx_GOTREF(__pyx_t_1);
68536 __pyx_r = __pyx_t_1;
68537 __pyx_t_1 = 0;
68538 goto __pyx_L0;
68539
68540 /* "pysam/libcbcf.pyx":3536
68541 * return False
68542 *
68543 * def __getitem__(self, key): # <<<<<<<<<<<<<<
68544 * return bcf_format_get_value(self, key)
68545 *
68546 */
68547
68548 /* function exit code */
68549 __pyx_L1_error:;
68550 __Pyx_XDECREF(__pyx_t_1);
68551 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68552 __pyx_r = NULL;
68553 __pyx_L0:;
68554 __Pyx_XGIVEREF(__pyx_r);
68555 __Pyx_TraceReturn(__pyx_r, 0);
68556 __Pyx_RefNannyFinishContext();
68557 return __pyx_r;
68558 }
68559
68560 /* "pysam/libcbcf.pyx":3539
68561 * return bcf_format_get_value(self, key)
68562 *
68563 * def __setitem__(self, key, value): # <<<<<<<<<<<<<<
68564 * bcf_format_set_value(self, key, value)
68565 *
68566 */
68567
68568 /* Python wrapper */
68569 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
68570 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
68571 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68572 int __pyx_r;
68573 __Pyx_RefNannyDeclarations
68574 __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
68575 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
68576 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_8__setitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));
68577
68578 /* function exit code */
68579 __Pyx_RefNannyFinishContext();
68580 return __pyx_r;
68581 }
68582
68583 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_8__setitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
68584 int __pyx_r;
68585 __Pyx_TraceDeclarations
68586 __Pyx_RefNannyDeclarations
68587 PyObject *__pyx_t_1 = NULL;
68588 int __pyx_lineno = 0;
68589 const char *__pyx_filename = NULL;
68590 int __pyx_clineno = 0;
68591 __Pyx_RefNannySetupContext("__setitem__", 1);
68592 __Pyx_TraceCall("__setitem__", __pyx_f[0], 3539, 0, __PYX_ERR(0, 3539, __pyx_L1_error));
68593
68594 /* "pysam/libcbcf.pyx":3540
68595 *
68596 * def __setitem__(self, key, value):
68597 * bcf_format_set_value(self, key, value) # <<<<<<<<<<<<<<
68598 *
68599 * def __delitem__(self, key):
68600 */
68601 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_bcf_format_set_value(__pyx_v_self, __pyx_v_key, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3540, __pyx_L1_error)
68602 __Pyx_GOTREF(__pyx_t_1);
68603 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68604
68605 /* "pysam/libcbcf.pyx":3539
68606 * return bcf_format_get_value(self, key)
68607 *
68608 * def __setitem__(self, key, value): # <<<<<<<<<<<<<<
68609 * bcf_format_set_value(self, key, value)
68610 *
68611 */
68612
68613 /* function exit code */
68614 __pyx_r = 0;
68615 goto __pyx_L0;
68616 __pyx_L1_error:;
68617 __Pyx_XDECREF(__pyx_t_1);
68618 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68619 __pyx_r = -1;
68620 __pyx_L0:;
68621 __Pyx_TraceReturn(Py_None, 0);
68622 __Pyx_RefNannyFinishContext();
68623 return __pyx_r;
68624 }
68625
68626 /* "pysam/libcbcf.pyx":3542
68627 * bcf_format_set_value(self, key, value)
68628 *
68629 * def __delitem__(self, key): # <<<<<<<<<<<<<<
68630 * bcf_format_del_value(self, key)
68631 *
68632 */
68633
68634 /* Python wrapper */
68635 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_11__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
68636 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_11__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
68637 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68638 int __pyx_r;
68639 __Pyx_RefNannyDeclarations
68640 __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
68641 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
68642 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_10__delitem__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), ((PyObject *)__pyx_v_key));
68643
68644 /* function exit code */
68645 __Pyx_RefNannyFinishContext();
68646 return __pyx_r;
68647 }
68648
68649 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_10__delitem__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key) {
68650 int __pyx_r;
68651 __Pyx_TraceDeclarations
68652 __Pyx_RefNannyDeclarations
68653 PyObject *__pyx_t_1 = NULL;
68654 int __pyx_lineno = 0;
68655 const char *__pyx_filename = NULL;
68656 int __pyx_clineno = 0;
68657 __Pyx_RefNannySetupContext("__delitem__", 1);
68658 __Pyx_TraceCall("__delitem__", __pyx_f[0], 3542, 0, __PYX_ERR(0, 3542, __pyx_L1_error));
68659
68660 /* "pysam/libcbcf.pyx":3543
68661 *
68662 * def __delitem__(self, key):
68663 * bcf_format_del_value(self, key) # <<<<<<<<<<<<<<
68664 *
68665 * def clear(self):
68666 */
68667 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_bcf_format_del_value(__pyx_v_self, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3543, __pyx_L1_error)
68668 __Pyx_GOTREF(__pyx_t_1);
68669 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68670
68671 /* "pysam/libcbcf.pyx":3542
68672 * bcf_format_set_value(self, key, value)
68673 *
68674 * def __delitem__(self, key): # <<<<<<<<<<<<<<
68675 * bcf_format_del_value(self, key)
68676 *
68677 */
68678
68679 /* function exit code */
68680 __pyx_r = 0;
68681 goto __pyx_L0;
68682 __pyx_L1_error:;
68683 __Pyx_XDECREF(__pyx_t_1);
68684 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68685 __pyx_r = -1;
68686 __pyx_L0:;
68687 __Pyx_TraceReturn(Py_None, 0);
68688 __Pyx_RefNannyFinishContext();
68689 return __pyx_r;
68690 }
68691
68692 /* "pysam/libcbcf.pyx":3545
68693 * bcf_format_del_value(self, key)
68694 *
68695 * def clear(self): # <<<<<<<<<<<<<<
68696 * """Clear all format data (including genotype) for this sample"""
68697 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68698 */
68699
68700 /* Python wrapper */
68701 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_13clear(PyObject *__pyx_v_self,
68702 #if CYTHON_METH_FASTCALL
68703 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
68704 #else
68705 PyObject *__pyx_args, PyObject *__pyx_kwds
68706 #endif
68707 ); /*proto*/
68708 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_12clear, "VariantRecordSample.clear(self)\nClear all format data (including genotype) for this sample");
68709 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_13clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_13clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_12clear};
68710 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_13clear(PyObject *__pyx_v_self,
68711 #if CYTHON_METH_FASTCALL
68712 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
68713 #else
68714 PyObject *__pyx_args, PyObject *__pyx_kwds
68715 #endif
68716 ) {
68717 #if !CYTHON_METH_FASTCALL
68718 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
68719 #endif
68720 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68721 PyObject *__pyx_r = 0;
68722 __Pyx_RefNannyDeclarations
68723 __Pyx_RefNannySetupContext("clear (wrapper)", 0);
68724 #if !CYTHON_METH_FASTCALL
68725 #if CYTHON_ASSUME_SAFE_MACROS
68726 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
68727 #else
68728 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
68729 #endif
68730 #endif
68731 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
68732 if (unlikely(__pyx_nargs > 0)) {
68733 __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, __pyx_nargs); return NULL;}
68734 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear", 0))) return NULL;
68735 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_12clear(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
68736
68737 /* function exit code */
68738 __Pyx_RefNannyFinishContext();
68739 return __pyx_r;
68740 }
68741
68742 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_12clear(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
68743 bcf_hdr_t *__pyx_v_hdr;
68744 bcf1_t *__pyx_v_r;
68745 bcf_fmt_t *__pyx_v_fmt;
68746 int __pyx_v_i;
68747 PyObject *__pyx_r = NULL;
68748 __Pyx_TraceDeclarations
68749 __Pyx_RefNannyDeclarations
68750 bcf_hdr_t *__pyx_t_1;
68751 bcf1_t *__pyx_t_2;
68752 uint32_t __pyx_t_3;
68753 uint32_t __pyx_t_4;
68754 int __pyx_t_5;
68755 int __pyx_t_6;
68756 PyObject *__pyx_t_7 = NULL;
68757 PyObject *__pyx_t_8 = NULL;
68758 int __pyx_lineno = 0;
68759 const char *__pyx_filename = NULL;
68760 int __pyx_clineno = 0;
68761 __Pyx_TraceFrameInit(__pyx_codeobj__184)
68762 __Pyx_RefNannySetupContext("clear", 1);
68763 __Pyx_TraceCall("clear", __pyx_f[0], 3545, 0, __PYX_ERR(0, 3545, __pyx_L1_error));
68764
68765 /* "pysam/libcbcf.pyx":3547
68766 * def clear(self):
68767 * """Clear all format data (including genotype) for this sample"""
68768 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
68769 * cdef bcf1_t *r = self.record.ptr
68770 * cdef bcf_fmt_t *fmt
68771 */
68772 __pyx_t_1 = __pyx_v_self->record->header->ptr;
68773 __pyx_v_hdr = __pyx_t_1;
68774
68775 /* "pysam/libcbcf.pyx":3548
68776 * """Clear all format data (including genotype) for this sample"""
68777 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68778 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
68779 * cdef bcf_fmt_t *fmt
68780 * cdef int i
68781 */
68782 __pyx_t_2 = __pyx_v_self->record->ptr;
68783 __pyx_v_r = __pyx_t_2;
68784
68785 /* "pysam/libcbcf.pyx":3552
68786 * cdef int i
68787 *
68788 * for i in range(r.n_fmt): # <<<<<<<<<<<<<<
68789 * fmt = &r.d.fmt[i]
68790 * if fmt.p:
68791 */
68792 __pyx_t_3 = __pyx_v_r->n_fmt;
68793 __pyx_t_4 = __pyx_t_3;
68794 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
68795 __pyx_v_i = __pyx_t_5;
68796
68797 /* "pysam/libcbcf.pyx":3553
68798 *
68799 * for i in range(r.n_fmt):
68800 * fmt = &r.d.fmt[i] # <<<<<<<<<<<<<<
68801 * if fmt.p:
68802 * bcf_format_del_value(self, bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
68803 */
68804 __pyx_v_fmt = (&(__pyx_v_r->d.fmt[__pyx_v_i]));
68805
68806 /* "pysam/libcbcf.pyx":3554
68807 * for i in range(r.n_fmt):
68808 * fmt = &r.d.fmt[i]
68809 * if fmt.p: # <<<<<<<<<<<<<<
68810 * bcf_format_del_value(self, bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
68811 *
68812 */
68813 __pyx_t_6 = (__pyx_v_fmt->p != 0);
68814 if (__pyx_t_6) {
68815
68816 /* "pysam/libcbcf.pyx":3555
68817 * fmt = &r.d.fmt[i]
68818 * if fmt.p:
68819 * bcf_format_del_value(self, bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)) # <<<<<<<<<<<<<<
68820 *
68821 * def __iter__(self):
68822 */
68823 __pyx_t_7 = __Pyx_PyBytes_FromString(bcf_hdr_int2id(__pyx_v_hdr, BCF_DT_ID, __pyx_v_fmt->id)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3555, __pyx_L1_error)
68824 __Pyx_GOTREF(__pyx_t_7);
68825 __pyx_t_8 = __pyx_f_5pysam_7libcbcf_bcf_format_del_value(__pyx_v_self, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3555, __pyx_L1_error)
68826 __Pyx_GOTREF(__pyx_t_8);
68827 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
68828 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68829
68830 /* "pysam/libcbcf.pyx":3554
68831 * for i in range(r.n_fmt):
68832 * fmt = &r.d.fmt[i]
68833 * if fmt.p: # <<<<<<<<<<<<<<
68834 * bcf_format_del_value(self, bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
68835 *
68836 */
68837 }
68838 }
68839
68840 /* "pysam/libcbcf.pyx":3545
68841 * bcf_format_del_value(self, key)
68842 *
68843 * def clear(self): # <<<<<<<<<<<<<<
68844 * """Clear all format data (including genotype) for this sample"""
68845 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68846 */
68847
68848 /* function exit code */
68849 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
68850 goto __pyx_L0;
68851 __pyx_L1_error:;
68852 __Pyx_XDECREF(__pyx_t_7);
68853 __Pyx_XDECREF(__pyx_t_8);
68854 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
68855 __pyx_r = NULL;
68856 __pyx_L0:;
68857 __Pyx_XGIVEREF(__pyx_r);
68858 __Pyx_TraceReturn(__pyx_r, 0);
68859 __Pyx_RefNannyFinishContext();
68860 return __pyx_r;
68861 }
68862 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_16generator23(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
68863
68864 /* "pysam/libcbcf.pyx":3557
68865 * bcf_format_del_value(self, bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
68866 *
68867 * def __iter__(self): # <<<<<<<<<<<<<<
68868 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68869 * cdef bcf1_t *r = self.record.ptr
68870 */
68871
68872 /* Python wrapper */
68873 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_15__iter__(PyObject *__pyx_v_self); /*proto*/
68874 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_15__iter__(PyObject *__pyx_v_self) {
68875 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
68876 PyObject *__pyx_r = 0;
68877 __Pyx_RefNannyDeclarations
68878 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
68879 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
68880 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
68881
68882 /* function exit code */
68883 __Pyx_RefNannyFinishContext();
68884 return __pyx_r;
68885 }
68886
68887 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_14__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
68888 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *__pyx_cur_scope;
68889 PyObject *__pyx_r = NULL;
68890 __Pyx_RefNannyDeclarations
68891 int __pyx_lineno = 0;
68892 const char *__pyx_filename = NULL;
68893 int __pyx_clineno = 0;
68894 __Pyx_RefNannySetupContext("__iter__", 0);
68895 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_33___iter__(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__, __pyx_empty_tuple, NULL);
68896 if (unlikely(!__pyx_cur_scope)) {
68897 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *)Py_None);
68898 __Pyx_INCREF(Py_None);
68899 __PYX_ERR(0, 3557, __pyx_L1_error)
68900 } else {
68901 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
68902 }
68903 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
68904 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
68905 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
68906 {
68907 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordSample_16generator23, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_VariantRecordSample___iter, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 3557, __pyx_L1_error)
68908 __Pyx_DECREF(__pyx_cur_scope);
68909 __Pyx_RefNannyFinishContext();
68910 return (PyObject *) gen;
68911 }
68912
68913 /* function exit code */
68914 __pyx_L1_error:;
68915 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
68916 __pyx_r = NULL;
68917 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
68918 __Pyx_XGIVEREF(__pyx_r);
68919 __Pyx_RefNannyFinishContext();
68920 return __pyx_r;
68921 }
68922
68923 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_16generator23(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
68924 {
68925 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *)__pyx_generator->closure);
68926 PyObject *__pyx_r = NULL;
68927 __Pyx_TraceDeclarations
68928 bcf_hdr_t *__pyx_t_1;
68929 bcf1_t *__pyx_t_2;
68930 uint32_t __pyx_t_3;
68931 uint32_t __pyx_t_4;
68932 int __pyx_t_5;
68933 int __pyx_t_6;
68934 PyObject *__pyx_t_7 = NULL;
68935 int __pyx_lineno = 0;
68936 const char *__pyx_filename = NULL;
68937 int __pyx_clineno = 0;
68938 __Pyx_RefNannyDeclarations
68939 __Pyx_RefNannySetupContext("__iter__", 0);
68940 __Pyx_TraceCall("__iter__", __pyx_f[0], 3557, 0, __PYX_ERR(0, 3557, __pyx_L1_error));
68941 switch (__pyx_generator->resume_label) {
68942 case 0: goto __pyx_L3_first_run;
68943 case 1: goto __pyx_L7_resume_from_yield;
68944 default: /* CPython raises the right error here */
68945 __Pyx_TraceReturn(Py_None, 0);
68946 __Pyx_RefNannyFinishContext();
68947 return NULL;
68948 }
68949 __pyx_L3_first_run:;
68950 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3557, __pyx_L1_error)
68951
68952 /* "pysam/libcbcf.pyx":3558
68953 *
68954 * def __iter__(self):
68955 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
68956 * cdef bcf1_t *r = self.record.ptr
68957 * cdef bcf_fmt_t *fmt
68958 */
68959 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->record->header->ptr;
68960 __pyx_cur_scope->__pyx_v_hdr = __pyx_t_1;
68961
68962 /* "pysam/libcbcf.pyx":3559
68963 * def __iter__(self):
68964 * cdef bcf_hdr_t *hdr = self.record.header.ptr
68965 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
68966 * cdef bcf_fmt_t *fmt
68967 * cdef int i
68968 */
68969 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->record->ptr;
68970 __pyx_cur_scope->__pyx_v_r = __pyx_t_2;
68971
68972 /* "pysam/libcbcf.pyx":3563
68973 * cdef int i
68974 *
68975 * for i in range(r.n_fmt): # <<<<<<<<<<<<<<
68976 * fmt = &r.d.fmt[i]
68977 * if r.d.fmt[i].p:
68978 */
68979 __pyx_t_3 = __pyx_cur_scope->__pyx_v_r->n_fmt;
68980 __pyx_t_4 = __pyx_t_3;
68981 for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
68982 __pyx_cur_scope->__pyx_v_i = __pyx_t_5;
68983
68984 /* "pysam/libcbcf.pyx":3564
68985 *
68986 * for i in range(r.n_fmt):
68987 * fmt = &r.d.fmt[i] # <<<<<<<<<<<<<<
68988 * if r.d.fmt[i].p:
68989 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
68990 */
68991 __pyx_cur_scope->__pyx_v_fmt = (&(__pyx_cur_scope->__pyx_v_r->d.fmt[__pyx_cur_scope->__pyx_v_i]));
68992
68993 /* "pysam/libcbcf.pyx":3565
68994 * for i in range(r.n_fmt):
68995 * fmt = &r.d.fmt[i]
68996 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
68997 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
68998 *
68999 */
69000 __pyx_t_6 = ((__pyx_cur_scope->__pyx_v_r->d.fmt[__pyx_cur_scope->__pyx_v_i]).p != 0);
69001 if (__pyx_t_6) {
69002
69003 /* "pysam/libcbcf.pyx":3566
69004 * fmt = &r.d.fmt[i]
69005 * if r.d.fmt[i].p:
69006 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id)) # <<<<<<<<<<<<<<
69007 *
69008 * def get(self, key, default=None):
69009 */
69010 __pyx_t_7 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(bcf_hdr_int2id(__pyx_cur_scope->__pyx_v_hdr, BCF_DT_ID, __pyx_cur_scope->__pyx_v_fmt->id)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3566, __pyx_L1_error)
69011 __Pyx_GOTREF(__pyx_t_7);
69012 __pyx_r = __pyx_t_7;
69013 __pyx_t_7 = 0;
69014 __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
69015 __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
69016 __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
69017 __Pyx_XGIVEREF(__pyx_r);
69018 __Pyx_TraceReturn(__pyx_r, 0);
69019 __Pyx_RefNannyFinishContext();
69020 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
69021 /* return from generator, yielding value */
69022 __pyx_generator->resume_label = 1;
69023 return __pyx_r;
69024 __pyx_L7_resume_from_yield:;
69025 __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
69026 __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
69027 __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
69028 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3566, __pyx_L1_error)
69029
69030 /* "pysam/libcbcf.pyx":3565
69031 * for i in range(r.n_fmt):
69032 * fmt = &r.d.fmt[i]
69033 * if r.d.fmt[i].p: # <<<<<<<<<<<<<<
69034 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
69035 *
69036 */
69037 }
69038 }
69039 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
69040
69041 /* "pysam/libcbcf.pyx":3557
69042 * bcf_format_del_value(self, bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
69043 *
69044 * def __iter__(self): # <<<<<<<<<<<<<<
69045 * cdef bcf_hdr_t *hdr = self.record.header.ptr
69046 * cdef bcf1_t *r = self.record.ptr
69047 */
69048
69049 /* function exit code */
69050 PyErr_SetNone(PyExc_StopIteration);
69051 goto __pyx_L0;
69052 __pyx_L1_error:;
69053 __Pyx_Generator_Replace_StopIteration(0);
69054 __Pyx_XDECREF(__pyx_t_7);
69055 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
69056 __pyx_L0:;
69057 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
69058 #if !CYTHON_USE_EXC_INFO_STACK
69059 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
69060 #endif
69061 __pyx_generator->resume_label = -1;
69062 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
69063 __Pyx_TraceReturn(__pyx_r, 0);
69064 __Pyx_RefNannyFinishContext();
69065 return __pyx_r;
69066 }
69067
69068 /* "pysam/libcbcf.pyx":3568
69069 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
69070 *
69071 * def get(self, key, default=None): # <<<<<<<<<<<<<<
69072 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
69073 * try:
69074 */
69075
69076 /* Python wrapper */
69077 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_18get(PyObject *__pyx_v_self,
69078 #if CYTHON_METH_FASTCALL
69079 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
69080 #else
69081 PyObject *__pyx_args, PyObject *__pyx_kwds
69082 #endif
69083 ); /*proto*/
69084 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_17get, "VariantRecordSample.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
69085 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_18get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_18get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_17get};
69086 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_18get(PyObject *__pyx_v_self,
69087 #if CYTHON_METH_FASTCALL
69088 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
69089 #else
69090 PyObject *__pyx_args, PyObject *__pyx_kwds
69091 #endif
69092 ) {
69093 PyObject *__pyx_v_key = 0;
69094 PyObject *__pyx_v_default = 0;
69095 #if !CYTHON_METH_FASTCALL
69096 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
69097 #endif
69098 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
69099 PyObject* values[2] = {0,0};
69100 int __pyx_lineno = 0;
69101 const char *__pyx_filename = NULL;
69102 int __pyx_clineno = 0;
69103 PyObject *__pyx_r = 0;
69104 __Pyx_RefNannyDeclarations
69105 __Pyx_RefNannySetupContext("get (wrapper)", 0);
69106 #if !CYTHON_METH_FASTCALL
69107 #if CYTHON_ASSUME_SAFE_MACROS
69108 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
69109 #else
69110 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
69111 #endif
69112 #endif
69113 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
69114 {
69115 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
69116 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
69117 if (__pyx_kwds) {
69118 Py_ssize_t kw_args;
69119 switch (__pyx_nargs) {
69120 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
69121 CYTHON_FALLTHROUGH;
69122 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
69123 CYTHON_FALLTHROUGH;
69124 case 0: break;
69125 default: goto __pyx_L5_argtuple_error;
69126 }
69127 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
69128 switch (__pyx_nargs) {
69129 case 0:
69130 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
69131 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
69132 kw_args--;
69133 }
69134 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3568, __pyx_L3_error)
69135 else goto __pyx_L5_argtuple_error;
69136 CYTHON_FALLTHROUGH;
69137 case 1:
69138 if (kw_args > 0) {
69139 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
69140 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
69141 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3568, __pyx_L3_error)
69142 }
69143 }
69144 if (unlikely(kw_args > 0)) {
69145 const Py_ssize_t kwd_pos_args = __pyx_nargs;
69146 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 3568, __pyx_L3_error)
69147 }
69148 } else {
69149 switch (__pyx_nargs) {
69150 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
69151 CYTHON_FALLTHROUGH;
69152 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
69153 break;
69154 default: goto __pyx_L5_argtuple_error;
69155 }
69156 }
69157 __pyx_v_key = values[0];
69158 __pyx_v_default = values[1];
69159 }
69160 goto __pyx_L6_skip;
69161 __pyx_L5_argtuple_error:;
69162 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3568, __pyx_L3_error)
69163 __pyx_L6_skip:;
69164 goto __pyx_L4_argument_unpacking_done;
69165 __pyx_L3_error:;
69166 {
69167 Py_ssize_t __pyx_temp;
69168 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
69169 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
69170 }
69171 }
69172 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
69173 __Pyx_RefNannyFinishContext();
69174 return NULL;
69175 __pyx_L4_argument_unpacking_done:;
69176 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_17get(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
69177
69178 /* function exit code */
69179 {
69180 Py_ssize_t __pyx_temp;
69181 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
69182 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
69183 }
69184 }
69185 __Pyx_RefNannyFinishContext();
69186 return __pyx_r;
69187 }
69188
69189 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_17get(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
69190 PyObject *__pyx_r = NULL;
69191 __Pyx_TraceDeclarations
69192 __Pyx_RefNannyDeclarations
69193 PyObject *__pyx_t_1 = NULL;
69194 PyObject *__pyx_t_2 = NULL;
69195 PyObject *__pyx_t_3 = NULL;
69196 PyObject *__pyx_t_4 = NULL;
69197 int __pyx_t_5;
69198 PyObject *__pyx_t_6 = NULL;
69199 PyObject *__pyx_t_7 = NULL;
69200 int __pyx_lineno = 0;
69201 const char *__pyx_filename = NULL;
69202 int __pyx_clineno = 0;
69203 __Pyx_TraceFrameInit(__pyx_codeobj__185)
69204 __Pyx_RefNannySetupContext("get", 1);
69205 __Pyx_TraceCall("get", __pyx_f[0], 3568, 0, __PYX_ERR(0, 3568, __pyx_L1_error));
69206
69207 /* "pysam/libcbcf.pyx":3570
69208 * def get(self, key, default=None):
69209 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
69210 * try: # <<<<<<<<<<<<<<
69211 * return self[key]
69212 * except KeyError:
69213 */
69214 {
69215 __Pyx_PyThreadState_declare
69216 __Pyx_PyThreadState_assign
69217 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
69218 __Pyx_XGOTREF(__pyx_t_1);
69219 __Pyx_XGOTREF(__pyx_t_2);
69220 __Pyx_XGOTREF(__pyx_t_3);
69221 /*try:*/ {
69222
69223 /* "pysam/libcbcf.pyx":3571
69224 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
69225 * try:
69226 * return self[key] # <<<<<<<<<<<<<<
69227 * except KeyError:
69228 * return default
69229 */
69230 __Pyx_XDECREF(__pyx_r);
69231 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3571, __pyx_L3_error)
69232 __Pyx_GOTREF(__pyx_t_4);
69233 __pyx_r = __pyx_t_4;
69234 __pyx_t_4 = 0;
69235 goto __pyx_L7_try_return;
69236
69237 /* "pysam/libcbcf.pyx":3570
69238 * def get(self, key, default=None):
69239 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
69240 * try: # <<<<<<<<<<<<<<
69241 * return self[key]
69242 * except KeyError:
69243 */
69244 }
69245 __pyx_L3_error:;
69246 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
69247
69248 /* "pysam/libcbcf.pyx":3572
69249 * try:
69250 * return self[key]
69251 * except KeyError: # <<<<<<<<<<<<<<
69252 * return default
69253 *
69254 */
69255 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
69256 if (__pyx_t_5) {
69257 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
69258 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3572, __pyx_L5_except_error)
69259 __Pyx_XGOTREF(__pyx_t_4);
69260 __Pyx_XGOTREF(__pyx_t_6);
69261 __Pyx_XGOTREF(__pyx_t_7);
69262
69263 /* "pysam/libcbcf.pyx":3573
69264 * return self[key]
69265 * except KeyError:
69266 * return default # <<<<<<<<<<<<<<
69267 *
69268 * def __contains__(self, key):
69269 */
69270 __Pyx_XDECREF(__pyx_r);
69271 __Pyx_INCREF(__pyx_v_default);
69272 __pyx_r = __pyx_v_default;
69273 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
69274 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
69275 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
69276 goto __pyx_L6_except_return;
69277 }
69278 goto __pyx_L5_except_error;
69279
69280 /* "pysam/libcbcf.pyx":3570
69281 * def get(self, key, default=None):
69282 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
69283 * try: # <<<<<<<<<<<<<<
69284 * return self[key]
69285 * except KeyError:
69286 */
69287 __pyx_L5_except_error:;
69288 __Pyx_XGIVEREF(__pyx_t_1);
69289 __Pyx_XGIVEREF(__pyx_t_2);
69290 __Pyx_XGIVEREF(__pyx_t_3);
69291 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
69292 goto __pyx_L1_error;
69293 __pyx_L7_try_return:;
69294 __Pyx_XGIVEREF(__pyx_t_1);
69295 __Pyx_XGIVEREF(__pyx_t_2);
69296 __Pyx_XGIVEREF(__pyx_t_3);
69297 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
69298 goto __pyx_L0;
69299 __pyx_L6_except_return:;
69300 __Pyx_XGIVEREF(__pyx_t_1);
69301 __Pyx_XGIVEREF(__pyx_t_2);
69302 __Pyx_XGIVEREF(__pyx_t_3);
69303 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
69304 goto __pyx_L0;
69305 }
69306
69307 /* "pysam/libcbcf.pyx":3568
69308 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
69309 *
69310 * def get(self, key, default=None): # <<<<<<<<<<<<<<
69311 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
69312 * try:
69313 */
69314
69315 /* function exit code */
69316 __pyx_L1_error:;
69317 __Pyx_XDECREF(__pyx_t_4);
69318 __Pyx_XDECREF(__pyx_t_6);
69319 __Pyx_XDECREF(__pyx_t_7);
69320 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
69321 __pyx_r = NULL;
69322 __pyx_L0:;
69323 __Pyx_XGIVEREF(__pyx_r);
69324 __Pyx_TraceReturn(__pyx_r, 0);
69325 __Pyx_RefNannyFinishContext();
69326 return __pyx_r;
69327 }
69328
69329 /* "pysam/libcbcf.pyx":3575
69330 * return default
69331 *
69332 * def __contains__(self, key): # <<<<<<<<<<<<<<
69333 * cdef bcf_hdr_t *hdr = self.record.header.ptr
69334 * cdef bcf1_t *r = self.record.ptr
69335 */
69336
69337 /* Python wrapper */
69338 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
69339 static int __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
69340 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
69341 int __pyx_r;
69342 __Pyx_RefNannyDeclarations
69343 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
69344 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
69345 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_19__contains__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), ((PyObject *)__pyx_v_key));
69346
69347 /* function exit code */
69348 __Pyx_RefNannyFinishContext();
69349 return __pyx_r;
69350 }
69351
69352 static int __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_19__contains__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key) {
69353 bcf_hdr_t *__pyx_v_hdr;
69354 bcf1_t *__pyx_v_r;
69355 PyObject *__pyx_v_bkey = 0;
69356 bcf_fmt_t *__pyx_v_fmt;
69357 int __pyx_r;
69358 __Pyx_TraceDeclarations
69359 __Pyx_RefNannyDeclarations
69360 bcf_hdr_t *__pyx_t_1;
69361 bcf1_t *__pyx_t_2;
69362 PyObject *__pyx_t_3 = NULL;
69363 char const *__pyx_t_4;
69364 int __pyx_t_5;
69365 int __pyx_t_6;
69366 int __pyx_lineno = 0;
69367 const char *__pyx_filename = NULL;
69368 int __pyx_clineno = 0;
69369 __Pyx_RefNannySetupContext("__contains__", 1);
69370 __Pyx_TraceCall("__contains__", __pyx_f[0], 3575, 0, __PYX_ERR(0, 3575, __pyx_L1_error));
69371
69372 /* "pysam/libcbcf.pyx":3576
69373 *
69374 * def __contains__(self, key):
69375 * cdef bcf_hdr_t *hdr = self.record.header.ptr # <<<<<<<<<<<<<<
69376 * cdef bcf1_t *r = self.record.ptr
69377 * cdef bytes bkey = force_bytes(key)
69378 */
69379 __pyx_t_1 = __pyx_v_self->record->header->ptr;
69380 __pyx_v_hdr = __pyx_t_1;
69381
69382 /* "pysam/libcbcf.pyx":3577
69383 * def __contains__(self, key):
69384 * cdef bcf_hdr_t *hdr = self.record.header.ptr
69385 * cdef bcf1_t *r = self.record.ptr # <<<<<<<<<<<<<<
69386 * cdef bytes bkey = force_bytes(key)
69387 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
69388 */
69389 __pyx_t_2 = __pyx_v_self->record->ptr;
69390 __pyx_v_r = __pyx_t_2;
69391
69392 /* "pysam/libcbcf.pyx":3578
69393 * cdef bcf_hdr_t *hdr = self.record.header.ptr
69394 * cdef bcf1_t *r = self.record.ptr
69395 * cdef bytes bkey = force_bytes(key) # <<<<<<<<<<<<<<
69396 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
69397 * return fmt != NULL and fmt.p != NULL
69398 */
69399 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_key, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3578, __pyx_L1_error)
69400 __Pyx_GOTREF(__pyx_t_3);
69401 __pyx_v_bkey = ((PyObject*)__pyx_t_3);
69402 __pyx_t_3 = 0;
69403
69404 /* "pysam/libcbcf.pyx":3579
69405 * cdef bcf1_t *r = self.record.ptr
69406 * cdef bytes bkey = force_bytes(key)
69407 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey) # <<<<<<<<<<<<<<
69408 * return fmt != NULL and fmt.p != NULL
69409 *
69410 */
69411 if (unlikely(__pyx_v_bkey == Py_None)) {
69412 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
69413 __PYX_ERR(0, 3579, __pyx_L1_error)
69414 }
69415 __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_bkey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 3579, __pyx_L1_error)
69416 __pyx_v_fmt = bcf_get_fmt(__pyx_v_hdr, __pyx_v_r, __pyx_t_4);
69417
69418 /* "pysam/libcbcf.pyx":3580
69419 * cdef bytes bkey = force_bytes(key)
69420 * cdef bcf_fmt_t *fmt = bcf_get_fmt(hdr, r, bkey)
69421 * return fmt != NULL and fmt.p != NULL # <<<<<<<<<<<<<<
69422 *
69423 * def iterkeys(self):
69424 */
69425 __pyx_t_6 = (__pyx_v_fmt != NULL);
69426 if (__pyx_t_6) {
69427 } else {
69428 __pyx_t_5 = __pyx_t_6;
69429 goto __pyx_L3_bool_binop_done;
69430 }
69431 __pyx_t_6 = (__pyx_v_fmt->p != NULL);
69432 __pyx_t_5 = __pyx_t_6;
69433 __pyx_L3_bool_binop_done:;
69434 __pyx_r = __pyx_t_5;
69435 goto __pyx_L0;
69436
69437 /* "pysam/libcbcf.pyx":3575
69438 * return default
69439 *
69440 * def __contains__(self, key): # <<<<<<<<<<<<<<
69441 * cdef bcf_hdr_t *hdr = self.record.header.ptr
69442 * cdef bcf1_t *r = self.record.ptr
69443 */
69444
69445 /* function exit code */
69446 __pyx_L1_error:;
69447 __Pyx_XDECREF(__pyx_t_3);
69448 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
69449 __pyx_r = -1;
69450 __pyx_L0:;
69451 __Pyx_XDECREF(__pyx_v_bkey);
69452 __Pyx_TraceReturn(Py_None, 0);
69453 __Pyx_RefNannyFinishContext();
69454 return __pyx_r;
69455 }
69456
69457 /* "pysam/libcbcf.pyx":3582
69458 * return fmt != NULL and fmt.p != NULL
69459 *
69460 * def iterkeys(self): # <<<<<<<<<<<<<<
69461 * """D.iterkeys() -> an iterator over the keys of D"""
69462 * return iter(self)
69463 */
69464
69465 /* Python wrapper */
69466 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_22iterkeys(PyObject *__pyx_v_self,
69467 #if CYTHON_METH_FASTCALL
69468 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
69469 #else
69470 PyObject *__pyx_args, PyObject *__pyx_kwds
69471 #endif
69472 ); /*proto*/
69473 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_21iterkeys, "VariantRecordSample.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
69474 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_22iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_22iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_21iterkeys};
69475 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_22iterkeys(PyObject *__pyx_v_self,
69476 #if CYTHON_METH_FASTCALL
69477 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
69478 #else
69479 PyObject *__pyx_args, PyObject *__pyx_kwds
69480 #endif
69481 ) {
69482 #if !CYTHON_METH_FASTCALL
69483 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
69484 #endif
69485 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
69486 PyObject *__pyx_r = 0;
69487 __Pyx_RefNannyDeclarations
69488 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
69489 #if !CYTHON_METH_FASTCALL
69490 #if CYTHON_ASSUME_SAFE_MACROS
69491 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
69492 #else
69493 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
69494 #endif
69495 #endif
69496 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
69497 if (unlikely(__pyx_nargs > 0)) {
69498 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
69499 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
69500 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_21iterkeys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
69501
69502 /* function exit code */
69503 __Pyx_RefNannyFinishContext();
69504 return __pyx_r;
69505 }
69506
69507 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_21iterkeys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
69508 PyObject *__pyx_r = NULL;
69509 __Pyx_TraceDeclarations
69510 __Pyx_RefNannyDeclarations
69511 PyObject *__pyx_t_1 = NULL;
69512 int __pyx_lineno = 0;
69513 const char *__pyx_filename = NULL;
69514 int __pyx_clineno = 0;
69515 __Pyx_TraceFrameInit(__pyx_codeobj__186)
69516 __Pyx_RefNannySetupContext("iterkeys", 1);
69517 __Pyx_TraceCall("iterkeys", __pyx_f[0], 3582, 0, __PYX_ERR(0, 3582, __pyx_L1_error));
69518
69519 /* "pysam/libcbcf.pyx":3584
69520 * def iterkeys(self):
69521 * """D.iterkeys() -> an iterator over the keys of D"""
69522 * return iter(self) # <<<<<<<<<<<<<<
69523 *
69524 * def itervalues(self):
69525 */
69526 __Pyx_XDECREF(__pyx_r);
69527 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3584, __pyx_L1_error)
69528 __Pyx_GOTREF(__pyx_t_1);
69529 __pyx_r = __pyx_t_1;
69530 __pyx_t_1 = 0;
69531 goto __pyx_L0;
69532
69533 /* "pysam/libcbcf.pyx":3582
69534 * return fmt != NULL and fmt.p != NULL
69535 *
69536 * def iterkeys(self): # <<<<<<<<<<<<<<
69537 * """D.iterkeys() -> an iterator over the keys of D"""
69538 * return iter(self)
69539 */
69540
69541 /* function exit code */
69542 __pyx_L1_error:;
69543 __Pyx_XDECREF(__pyx_t_1);
69544 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
69545 __pyx_r = NULL;
69546 __pyx_L0:;
69547 __Pyx_XGIVEREF(__pyx_r);
69548 __Pyx_TraceReturn(__pyx_r, 0);
69549 __Pyx_RefNannyFinishContext();
69550 return __pyx_r;
69551 }
69552 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_25generator24(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
69553
69554 /* "pysam/libcbcf.pyx":3586
69555 * return iter(self)
69556 *
69557 * def itervalues(self): # <<<<<<<<<<<<<<
69558 * """D.itervalues() -> an iterator over the values of D"""
69559 * for key in self:
69560 */
69561
69562 /* Python wrapper */
69563 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_24itervalues(PyObject *__pyx_v_self,
69564 #if CYTHON_METH_FASTCALL
69565 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
69566 #else
69567 PyObject *__pyx_args, PyObject *__pyx_kwds
69568 #endif
69569 ); /*proto*/
69570 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_23itervalues, "VariantRecordSample.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
69571 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_24itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_24itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_23itervalues};
69572 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_24itervalues(PyObject *__pyx_v_self,
69573 #if CYTHON_METH_FASTCALL
69574 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
69575 #else
69576 PyObject *__pyx_args, PyObject *__pyx_kwds
69577 #endif
69578 ) {
69579 #if !CYTHON_METH_FASTCALL
69580 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
69581 #endif
69582 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
69583 PyObject *__pyx_r = 0;
69584 __Pyx_RefNannyDeclarations
69585 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
69586 #if !CYTHON_METH_FASTCALL
69587 #if CYTHON_ASSUME_SAFE_MACROS
69588 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
69589 #else
69590 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
69591 #endif
69592 #endif
69593 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
69594 if (unlikely(__pyx_nargs > 0)) {
69595 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
69596 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
69597 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_23itervalues(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
69598
69599 /* function exit code */
69600 __Pyx_RefNannyFinishContext();
69601 return __pyx_r;
69602 }
69603
69604 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_23itervalues(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
69605 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *__pyx_cur_scope;
69606 PyObject *__pyx_r = NULL;
69607 __Pyx_RefNannyDeclarations
69608 int __pyx_lineno = 0;
69609 const char *__pyx_filename = NULL;
69610 int __pyx_clineno = 0;
69611 __Pyx_RefNannySetupContext("itervalues", 0);
69612 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_34_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues, __pyx_empty_tuple, NULL);
69613 if (unlikely(!__pyx_cur_scope)) {
69614 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *)Py_None);
69615 __Pyx_INCREF(Py_None);
69616 __PYX_ERR(0, 3586, __pyx_L1_error)
69617 } else {
69618 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
69619 }
69620 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
69621 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
69622 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
69623 {
69624 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordSample_25generator24, __pyx_codeobj__187, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_VariantRecordSample_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 3586, __pyx_L1_error)
69625 __Pyx_DECREF(__pyx_cur_scope);
69626 __Pyx_RefNannyFinishContext();
69627 return (PyObject *) gen;
69628 }
69629
69630 /* function exit code */
69631 __pyx_L1_error:;
69632 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
69633 __pyx_r = NULL;
69634 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
69635 __Pyx_XGIVEREF(__pyx_r);
69636 __Pyx_RefNannyFinishContext();
69637 return __pyx_r;
69638 }
69639
69640 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_25generator24(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
69641 {
69642 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *)__pyx_generator->closure);
69643 PyObject *__pyx_r = NULL;
69644 __Pyx_TraceDeclarations
69645 PyObject *__pyx_t_1 = NULL;
69646 Py_ssize_t __pyx_t_2;
69647 PyObject *(*__pyx_t_3)(PyObject *);
69648 PyObject *__pyx_t_4 = NULL;
69649 int __pyx_lineno = 0;
69650 const char *__pyx_filename = NULL;
69651 int __pyx_clineno = 0;
69652 __Pyx_RefNannyDeclarations
69653 __Pyx_RefNannySetupContext("itervalues", 0);
69654 __Pyx_TraceFrameInit(__pyx_codeobj__187)
69655 __Pyx_TraceCall("itervalues", __pyx_f[0], 3586, 0, __PYX_ERR(0, 3586, __pyx_L1_error));
69656 switch (__pyx_generator->resume_label) {
69657 case 0: goto __pyx_L3_first_run;
69658 case 1: goto __pyx_L6_resume_from_yield;
69659 default: /* CPython raises the right error here */
69660 __Pyx_TraceReturn(Py_None, 0);
69661 __Pyx_RefNannyFinishContext();
69662 return NULL;
69663 }
69664 __pyx_L3_first_run:;
69665 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3586, __pyx_L1_error)
69666
69667 /* "pysam/libcbcf.pyx":3588
69668 * def itervalues(self):
69669 * """D.itervalues() -> an iterator over the values of D"""
69670 * for key in self: # <<<<<<<<<<<<<<
69671 * yield self[key]
69672 *
69673 */
69674 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
69675 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
69676 __pyx_t_2 = 0;
69677 __pyx_t_3 = NULL;
69678 } else {
69679 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3588, __pyx_L1_error)
69680 __Pyx_GOTREF(__pyx_t_1);
69681 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3588, __pyx_L1_error)
69682 }
69683 for (;;) {
69684 if (likely(!__pyx_t_3)) {
69685 if (likely(PyList_CheckExact(__pyx_t_1))) {
69686 {
69687 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
69688 #if !CYTHON_ASSUME_SAFE_MACROS
69689 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3588, __pyx_L1_error)
69690 #endif
69691 if (__pyx_t_2 >= __pyx_temp) break;
69692 }
69693 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
69694 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3588, __pyx_L1_error)
69695 #else
69696 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3588, __pyx_L1_error)
69697 __Pyx_GOTREF(__pyx_t_4);
69698 #endif
69699 } else {
69700 {
69701 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
69702 #if !CYTHON_ASSUME_SAFE_MACROS
69703 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3588, __pyx_L1_error)
69704 #endif
69705 if (__pyx_t_2 >= __pyx_temp) break;
69706 }
69707 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
69708 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3588, __pyx_L1_error)
69709 #else
69710 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3588, __pyx_L1_error)
69711 __Pyx_GOTREF(__pyx_t_4);
69712 #endif
69713 }
69714 } else {
69715 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
69716 if (unlikely(!__pyx_t_4)) {
69717 PyObject* exc_type = PyErr_Occurred();
69718 if (exc_type) {
69719 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
69720 else __PYX_ERR(0, 3588, __pyx_L1_error)
69721 }
69722 break;
69723 }
69724 __Pyx_GOTREF(__pyx_t_4);
69725 }
69726 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
69727 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
69728 __Pyx_GIVEREF(__pyx_t_4);
69729 __pyx_t_4 = 0;
69730
69731 /* "pysam/libcbcf.pyx":3589
69732 * """D.itervalues() -> an iterator over the values of D"""
69733 * for key in self:
69734 * yield self[key] # <<<<<<<<<<<<<<
69735 *
69736 * def iteritems(self):
69737 */
69738 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3589, __pyx_L1_error)
69739 __Pyx_GOTREF(__pyx_t_4);
69740 __pyx_r = __pyx_t_4;
69741 __pyx_t_4 = 0;
69742 __Pyx_XGIVEREF(__pyx_t_1);
69743 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
69744 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
69745 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
69746 __Pyx_XGIVEREF(__pyx_r);
69747 __Pyx_TraceReturn(__pyx_r, 0);
69748 __Pyx_RefNannyFinishContext();
69749 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
69750 /* return from generator, yielding value */
69751 __pyx_generator->resume_label = 1;
69752 return __pyx_r;
69753 __pyx_L6_resume_from_yield:;
69754 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
69755 __pyx_cur_scope->__pyx_t_0 = 0;
69756 __Pyx_XGOTREF(__pyx_t_1);
69757 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
69758 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
69759 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3589, __pyx_L1_error)
69760
69761 /* "pysam/libcbcf.pyx":3588
69762 * def itervalues(self):
69763 * """D.itervalues() -> an iterator over the values of D"""
69764 * for key in self: # <<<<<<<<<<<<<<
69765 * yield self[key]
69766 *
69767 */
69768 }
69769 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
69770 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
69771
69772 /* "pysam/libcbcf.pyx":3586
69773 * return iter(self)
69774 *
69775 * def itervalues(self): # <<<<<<<<<<<<<<
69776 * """D.itervalues() -> an iterator over the values of D"""
69777 * for key in self:
69778 */
69779
69780 /* function exit code */
69781 PyErr_SetNone(PyExc_StopIteration);
69782 goto __pyx_L0;
69783 __pyx_L1_error:;
69784 __Pyx_Generator_Replace_StopIteration(0);
69785 __Pyx_XDECREF(__pyx_t_1);
69786 __Pyx_XDECREF(__pyx_t_4);
69787 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
69788 __pyx_L0:;
69789 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
69790 #if !CYTHON_USE_EXC_INFO_STACK
69791 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
69792 #endif
69793 __pyx_generator->resume_label = -1;
69794 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
69795 __Pyx_TraceReturn(__pyx_r, 0);
69796 __Pyx_RefNannyFinishContext();
69797 return __pyx_r;
69798 }
69799 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_28generator25(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
69800
69801 /* "pysam/libcbcf.pyx":3591
69802 * yield self[key]
69803 *
69804 * def iteritems(self): # <<<<<<<<<<<<<<
69805 * """D.iteritems() -> an iterator over the (key, value) items of D"""
69806 * for key in self:
69807 */
69808
69809 /* Python wrapper */
69810 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_27iteritems(PyObject *__pyx_v_self,
69811 #if CYTHON_METH_FASTCALL
69812 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
69813 #else
69814 PyObject *__pyx_args, PyObject *__pyx_kwds
69815 #endif
69816 ); /*proto*/
69817 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_26iteritems, "VariantRecordSample.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
69818 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_27iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_27iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_26iteritems};
69819 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_27iteritems(PyObject *__pyx_v_self,
69820 #if CYTHON_METH_FASTCALL
69821 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
69822 #else
69823 PyObject *__pyx_args, PyObject *__pyx_kwds
69824 #endif
69825 ) {
69826 #if !CYTHON_METH_FASTCALL
69827 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
69828 #endif
69829 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
69830 PyObject *__pyx_r = 0;
69831 __Pyx_RefNannyDeclarations
69832 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
69833 #if !CYTHON_METH_FASTCALL
69834 #if CYTHON_ASSUME_SAFE_MACROS
69835 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
69836 #else
69837 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
69838 #endif
69839 #endif
69840 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
69841 if (unlikely(__pyx_nargs > 0)) {
69842 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
69843 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
69844 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_26iteritems(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
69845
69846 /* function exit code */
69847 __Pyx_RefNannyFinishContext();
69848 return __pyx_r;
69849 }
69850
69851 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_26iteritems(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
69852 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *__pyx_cur_scope;
69853 PyObject *__pyx_r = NULL;
69854 __Pyx_RefNannyDeclarations
69855 int __pyx_lineno = 0;
69856 const char *__pyx_filename = NULL;
69857 int __pyx_clineno = 0;
69858 __Pyx_RefNannySetupContext("iteritems", 0);
69859 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_35_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems, __pyx_empty_tuple, NULL);
69860 if (unlikely(!__pyx_cur_scope)) {
69861 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *)Py_None);
69862 __Pyx_INCREF(Py_None);
69863 __PYX_ERR(0, 3591, __pyx_L1_error)
69864 } else {
69865 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
69866 }
69867 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
69868 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
69869 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
69870 {
69871 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_19VariantRecordSample_28generator25, __pyx_codeobj__188, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_VariantRecordSample_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 3591, __pyx_L1_error)
69872 __Pyx_DECREF(__pyx_cur_scope);
69873 __Pyx_RefNannyFinishContext();
69874 return (PyObject *) gen;
69875 }
69876
69877 /* function exit code */
69878 __pyx_L1_error:;
69879 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
69880 __pyx_r = NULL;
69881 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
69882 __Pyx_XGIVEREF(__pyx_r);
69883 __Pyx_RefNannyFinishContext();
69884 return __pyx_r;
69885 }
69886
69887 static PyObject *__pyx_gb_5pysam_7libcbcf_19VariantRecordSample_28generator25(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
69888 {
69889 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *)__pyx_generator->closure);
69890 PyObject *__pyx_r = NULL;
69891 __Pyx_TraceDeclarations
69892 PyObject *__pyx_t_1 = NULL;
69893 Py_ssize_t __pyx_t_2;
69894 PyObject *(*__pyx_t_3)(PyObject *);
69895 PyObject *__pyx_t_4 = NULL;
69896 PyObject *__pyx_t_5 = NULL;
69897 int __pyx_lineno = 0;
69898 const char *__pyx_filename = NULL;
69899 int __pyx_clineno = 0;
69900 __Pyx_RefNannyDeclarations
69901 __Pyx_RefNannySetupContext("iteritems", 0);
69902 __Pyx_TraceFrameInit(__pyx_codeobj__188)
69903 __Pyx_TraceCall("iteritems", __pyx_f[0], 3591, 0, __PYX_ERR(0, 3591, __pyx_L1_error));
69904 switch (__pyx_generator->resume_label) {
69905 case 0: goto __pyx_L3_first_run;
69906 case 1: goto __pyx_L6_resume_from_yield;
69907 default: /* CPython raises the right error here */
69908 __Pyx_TraceReturn(Py_None, 0);
69909 __Pyx_RefNannyFinishContext();
69910 return NULL;
69911 }
69912 __pyx_L3_first_run:;
69913 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3591, __pyx_L1_error)
69914
69915 /* "pysam/libcbcf.pyx":3593
69916 * def iteritems(self):
69917 * """D.iteritems() -> an iterator over the (key, value) items of D"""
69918 * for key in self: # <<<<<<<<<<<<<<
69919 * yield (key, self[key])
69920 *
69921 */
69922 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
69923 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
69924 __pyx_t_2 = 0;
69925 __pyx_t_3 = NULL;
69926 } else {
69927 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3593, __pyx_L1_error)
69928 __Pyx_GOTREF(__pyx_t_1);
69929 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3593, __pyx_L1_error)
69930 }
69931 for (;;) {
69932 if (likely(!__pyx_t_3)) {
69933 if (likely(PyList_CheckExact(__pyx_t_1))) {
69934 {
69935 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
69936 #if !CYTHON_ASSUME_SAFE_MACROS
69937 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3593, __pyx_L1_error)
69938 #endif
69939 if (__pyx_t_2 >= __pyx_temp) break;
69940 }
69941 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
69942 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3593, __pyx_L1_error)
69943 #else
69944 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3593, __pyx_L1_error)
69945 __Pyx_GOTREF(__pyx_t_4);
69946 #endif
69947 } else {
69948 {
69949 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
69950 #if !CYTHON_ASSUME_SAFE_MACROS
69951 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3593, __pyx_L1_error)
69952 #endif
69953 if (__pyx_t_2 >= __pyx_temp) break;
69954 }
69955 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
69956 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3593, __pyx_L1_error)
69957 #else
69958 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3593, __pyx_L1_error)
69959 __Pyx_GOTREF(__pyx_t_4);
69960 #endif
69961 }
69962 } else {
69963 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
69964 if (unlikely(!__pyx_t_4)) {
69965 PyObject* exc_type = PyErr_Occurred();
69966 if (exc_type) {
69967 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
69968 else __PYX_ERR(0, 3593, __pyx_L1_error)
69969 }
69970 break;
69971 }
69972 __Pyx_GOTREF(__pyx_t_4);
69973 }
69974 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
69975 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
69976 __Pyx_GIVEREF(__pyx_t_4);
69977 __pyx_t_4 = 0;
69978
69979 /* "pysam/libcbcf.pyx":3594
69980 * """D.iteritems() -> an iterator over the (key, value) items of D"""
69981 * for key in self:
69982 * yield (key, self[key]) # <<<<<<<<<<<<<<
69983 *
69984 * def keys(self):
69985 */
69986 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3594, __pyx_L1_error)
69987 __Pyx_GOTREF(__pyx_t_4);
69988 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3594, __pyx_L1_error)
69989 __Pyx_GOTREF(__pyx_t_5);
69990 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
69991 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
69992 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_key)) __PYX_ERR(0, 3594, __pyx_L1_error);
69993 __Pyx_GIVEREF(__pyx_t_4);
69994 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 3594, __pyx_L1_error);
69995 __pyx_t_4 = 0;
69996 __pyx_r = __pyx_t_5;
69997 __pyx_t_5 = 0;
69998 __Pyx_XGIVEREF(__pyx_t_1);
69999 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
70000 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
70001 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
70002 __Pyx_XGIVEREF(__pyx_r);
70003 __Pyx_TraceReturn(__pyx_r, 0);
70004 __Pyx_RefNannyFinishContext();
70005 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
70006 /* return from generator, yielding value */
70007 __pyx_generator->resume_label = 1;
70008 return __pyx_r;
70009 __pyx_L6_resume_from_yield:;
70010 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
70011 __pyx_cur_scope->__pyx_t_0 = 0;
70012 __Pyx_XGOTREF(__pyx_t_1);
70013 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
70014 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
70015 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3594, __pyx_L1_error)
70016
70017 /* "pysam/libcbcf.pyx":3593
70018 * def iteritems(self):
70019 * """D.iteritems() -> an iterator over the (key, value) items of D"""
70020 * for key in self: # <<<<<<<<<<<<<<
70021 * yield (key, self[key])
70022 *
70023 */
70024 }
70025 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
70026 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
70027
70028 /* "pysam/libcbcf.pyx":3591
70029 * yield self[key]
70030 *
70031 * def iteritems(self): # <<<<<<<<<<<<<<
70032 * """D.iteritems() -> an iterator over the (key, value) items of D"""
70033 * for key in self:
70034 */
70035
70036 /* function exit code */
70037 PyErr_SetNone(PyExc_StopIteration);
70038 goto __pyx_L0;
70039 __pyx_L1_error:;
70040 __Pyx_Generator_Replace_StopIteration(0);
70041 __Pyx_XDECREF(__pyx_t_1);
70042 __Pyx_XDECREF(__pyx_t_4);
70043 __Pyx_XDECREF(__pyx_t_5);
70044 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
70045 __pyx_L0:;
70046 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
70047 #if !CYTHON_USE_EXC_INFO_STACK
70048 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
70049 #endif
70050 __pyx_generator->resume_label = -1;
70051 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
70052 __Pyx_TraceReturn(__pyx_r, 0);
70053 __Pyx_RefNannyFinishContext();
70054 return __pyx_r;
70055 }
70056
70057 /* "pysam/libcbcf.pyx":3596
70058 * yield (key, self[key])
70059 *
70060 * def keys(self): # <<<<<<<<<<<<<<
70061 * """D.keys() -> list of D's keys"""
70062 * return list(self)
70063 */
70064
70065 /* Python wrapper */
70066 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_30keys(PyObject *__pyx_v_self,
70067 #if CYTHON_METH_FASTCALL
70068 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70069 #else
70070 PyObject *__pyx_args, PyObject *__pyx_kwds
70071 #endif
70072 ); /*proto*/
70073 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_29keys, "VariantRecordSample.keys(self)\nD.keys() -> list of D's keys");
70074 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_30keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_30keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_29keys};
70075 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_30keys(PyObject *__pyx_v_self,
70076 #if CYTHON_METH_FASTCALL
70077 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70078 #else
70079 PyObject *__pyx_args, PyObject *__pyx_kwds
70080 #endif
70081 ) {
70082 #if !CYTHON_METH_FASTCALL
70083 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
70084 #endif
70085 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
70086 PyObject *__pyx_r = 0;
70087 __Pyx_RefNannyDeclarations
70088 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
70089 #if !CYTHON_METH_FASTCALL
70090 #if CYTHON_ASSUME_SAFE_MACROS
70091 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
70092 #else
70093 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
70094 #endif
70095 #endif
70096 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
70097 if (unlikely(__pyx_nargs > 0)) {
70098 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
70099 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
70100 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_29keys(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
70101
70102 /* function exit code */
70103 __Pyx_RefNannyFinishContext();
70104 return __pyx_r;
70105 }
70106
70107 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_29keys(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
70108 PyObject *__pyx_r = NULL;
70109 __Pyx_TraceDeclarations
70110 __Pyx_RefNannyDeclarations
70111 PyObject *__pyx_t_1 = NULL;
70112 int __pyx_lineno = 0;
70113 const char *__pyx_filename = NULL;
70114 int __pyx_clineno = 0;
70115 __Pyx_TraceFrameInit(__pyx_codeobj__189)
70116 __Pyx_RefNannySetupContext("keys", 1);
70117 __Pyx_TraceCall("keys", __pyx_f[0], 3596, 0, __PYX_ERR(0, 3596, __pyx_L1_error));
70118
70119 /* "pysam/libcbcf.pyx":3598
70120 * def keys(self):
70121 * """D.keys() -> list of D's keys"""
70122 * return list(self) # <<<<<<<<<<<<<<
70123 *
70124 * def items(self):
70125 */
70126 __Pyx_XDECREF(__pyx_r);
70127 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3598, __pyx_L1_error)
70128 __Pyx_GOTREF(__pyx_t_1);
70129 __pyx_r = __pyx_t_1;
70130 __pyx_t_1 = 0;
70131 goto __pyx_L0;
70132
70133 /* "pysam/libcbcf.pyx":3596
70134 * yield (key, self[key])
70135 *
70136 * def keys(self): # <<<<<<<<<<<<<<
70137 * """D.keys() -> list of D's keys"""
70138 * return list(self)
70139 */
70140
70141 /* function exit code */
70142 __pyx_L1_error:;
70143 __Pyx_XDECREF(__pyx_t_1);
70144 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
70145 __pyx_r = NULL;
70146 __pyx_L0:;
70147 __Pyx_XGIVEREF(__pyx_r);
70148 __Pyx_TraceReturn(__pyx_r, 0);
70149 __Pyx_RefNannyFinishContext();
70150 return __pyx_r;
70151 }
70152
70153 /* "pysam/libcbcf.pyx":3600
70154 * return list(self)
70155 *
70156 * def items(self): # <<<<<<<<<<<<<<
70157 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
70158 * return list(self.iteritems())
70159 */
70160
70161 /* Python wrapper */
70162 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_32items(PyObject *__pyx_v_self,
70163 #if CYTHON_METH_FASTCALL
70164 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70165 #else
70166 PyObject *__pyx_args, PyObject *__pyx_kwds
70167 #endif
70168 ); /*proto*/
70169 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_31items, "VariantRecordSample.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
70170 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_32items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_32items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_31items};
70171 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_32items(PyObject *__pyx_v_self,
70172 #if CYTHON_METH_FASTCALL
70173 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70174 #else
70175 PyObject *__pyx_args, PyObject *__pyx_kwds
70176 #endif
70177 ) {
70178 #if !CYTHON_METH_FASTCALL
70179 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
70180 #endif
70181 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
70182 PyObject *__pyx_r = 0;
70183 __Pyx_RefNannyDeclarations
70184 __Pyx_RefNannySetupContext("items (wrapper)", 0);
70185 #if !CYTHON_METH_FASTCALL
70186 #if CYTHON_ASSUME_SAFE_MACROS
70187 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
70188 #else
70189 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
70190 #endif
70191 #endif
70192 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
70193 if (unlikely(__pyx_nargs > 0)) {
70194 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
70195 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
70196 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_31items(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
70197
70198 /* function exit code */
70199 __Pyx_RefNannyFinishContext();
70200 return __pyx_r;
70201 }
70202
70203 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_31items(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
70204 PyObject *__pyx_r = NULL;
70205 __Pyx_TraceDeclarations
70206 __Pyx_RefNannyDeclarations
70207 PyObject *__pyx_t_1 = NULL;
70208 PyObject *__pyx_t_2 = NULL;
70209 PyObject *__pyx_t_3 = NULL;
70210 unsigned int __pyx_t_4;
70211 int __pyx_lineno = 0;
70212 const char *__pyx_filename = NULL;
70213 int __pyx_clineno = 0;
70214 __Pyx_TraceFrameInit(__pyx_codeobj__190)
70215 __Pyx_RefNannySetupContext("items", 1);
70216 __Pyx_TraceCall("items", __pyx_f[0], 3600, 0, __PYX_ERR(0, 3600, __pyx_L1_error));
70217
70218 /* "pysam/libcbcf.pyx":3602
70219 * def items(self):
70220 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
70221 * return list(self.iteritems()) # <<<<<<<<<<<<<<
70222 *
70223 * def values(self):
70224 */
70225 __Pyx_XDECREF(__pyx_r);
70226 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3602, __pyx_L1_error)
70227 __Pyx_GOTREF(__pyx_t_2);
70228 __pyx_t_3 = NULL;
70229 __pyx_t_4 = 0;
70230 #if CYTHON_UNPACK_METHODS
70231 if (likely(PyMethod_Check(__pyx_t_2))) {
70232 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
70233 if (likely(__pyx_t_3)) {
70234 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
70235 __Pyx_INCREF(__pyx_t_3);
70236 __Pyx_INCREF(function);
70237 __Pyx_DECREF_SET(__pyx_t_2, function);
70238 __pyx_t_4 = 1;
70239 }
70240 }
70241 #endif
70242 {
70243 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
70244 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
70245 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
70246 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3602, __pyx_L1_error)
70247 __Pyx_GOTREF(__pyx_t_1);
70248 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
70249 }
70250 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3602, __pyx_L1_error)
70251 __Pyx_GOTREF(__pyx_t_2);
70252 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
70253 __pyx_r = __pyx_t_2;
70254 __pyx_t_2 = 0;
70255 goto __pyx_L0;
70256
70257 /* "pysam/libcbcf.pyx":3600
70258 * return list(self)
70259 *
70260 * def items(self): # <<<<<<<<<<<<<<
70261 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
70262 * return list(self.iteritems())
70263 */
70264
70265 /* function exit code */
70266 __pyx_L1_error:;
70267 __Pyx_XDECREF(__pyx_t_1);
70268 __Pyx_XDECREF(__pyx_t_2);
70269 __Pyx_XDECREF(__pyx_t_3);
70270 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
70271 __pyx_r = NULL;
70272 __pyx_L0:;
70273 __Pyx_XGIVEREF(__pyx_r);
70274 __Pyx_TraceReturn(__pyx_r, 0);
70275 __Pyx_RefNannyFinishContext();
70276 return __pyx_r;
70277 }
70278
70279 /* "pysam/libcbcf.pyx":3604
70280 * return list(self.iteritems())
70281 *
70282 * def values(self): # <<<<<<<<<<<<<<
70283 * """D.values() -> list of D's values"""
70284 * return list(self.itervalues())
70285 */
70286
70287 /* Python wrapper */
70288 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_34values(PyObject *__pyx_v_self,
70289 #if CYTHON_METH_FASTCALL
70290 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70291 #else
70292 PyObject *__pyx_args, PyObject *__pyx_kwds
70293 #endif
70294 ); /*proto*/
70295 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_33values, "VariantRecordSample.values(self)\nD.values() -> list of D's values");
70296 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_34values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_34values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_33values};
70297 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_34values(PyObject *__pyx_v_self,
70298 #if CYTHON_METH_FASTCALL
70299 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70300 #else
70301 PyObject *__pyx_args, PyObject *__pyx_kwds
70302 #endif
70303 ) {
70304 #if !CYTHON_METH_FASTCALL
70305 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
70306 #endif
70307 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
70308 PyObject *__pyx_r = 0;
70309 __Pyx_RefNannyDeclarations
70310 __Pyx_RefNannySetupContext("values (wrapper)", 0);
70311 #if !CYTHON_METH_FASTCALL
70312 #if CYTHON_ASSUME_SAFE_MACROS
70313 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
70314 #else
70315 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
70316 #endif
70317 #endif
70318 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
70319 if (unlikely(__pyx_nargs > 0)) {
70320 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
70321 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
70322 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_33values(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
70323
70324 /* function exit code */
70325 __Pyx_RefNannyFinishContext();
70326 return __pyx_r;
70327 }
70328
70329 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_33values(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
70330 PyObject *__pyx_r = NULL;
70331 __Pyx_TraceDeclarations
70332 __Pyx_RefNannyDeclarations
70333 PyObject *__pyx_t_1 = NULL;
70334 PyObject *__pyx_t_2 = NULL;
70335 PyObject *__pyx_t_3 = NULL;
70336 unsigned int __pyx_t_4;
70337 int __pyx_lineno = 0;
70338 const char *__pyx_filename = NULL;
70339 int __pyx_clineno = 0;
70340 __Pyx_TraceFrameInit(__pyx_codeobj__191)
70341 __Pyx_RefNannySetupContext("values", 1);
70342 __Pyx_TraceCall("values", __pyx_f[0], 3604, 0, __PYX_ERR(0, 3604, __pyx_L1_error));
70343
70344 /* "pysam/libcbcf.pyx":3606
70345 * def values(self):
70346 * """D.values() -> list of D's values"""
70347 * return list(self.itervalues()) # <<<<<<<<<<<<<<
70348 *
70349 * def update(self, items=None, **kwargs):
70350 */
70351 __Pyx_XDECREF(__pyx_r);
70352 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3606, __pyx_L1_error)
70353 __Pyx_GOTREF(__pyx_t_2);
70354 __pyx_t_3 = NULL;
70355 __pyx_t_4 = 0;
70356 #if CYTHON_UNPACK_METHODS
70357 if (likely(PyMethod_Check(__pyx_t_2))) {
70358 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
70359 if (likely(__pyx_t_3)) {
70360 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
70361 __Pyx_INCREF(__pyx_t_3);
70362 __Pyx_INCREF(function);
70363 __Pyx_DECREF_SET(__pyx_t_2, function);
70364 __pyx_t_4 = 1;
70365 }
70366 }
70367 #endif
70368 {
70369 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
70370 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
70371 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
70372 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3606, __pyx_L1_error)
70373 __Pyx_GOTREF(__pyx_t_1);
70374 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
70375 }
70376 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3606, __pyx_L1_error)
70377 __Pyx_GOTREF(__pyx_t_2);
70378 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
70379 __pyx_r = __pyx_t_2;
70380 __pyx_t_2 = 0;
70381 goto __pyx_L0;
70382
70383 /* "pysam/libcbcf.pyx":3604
70384 * return list(self.iteritems())
70385 *
70386 * def values(self): # <<<<<<<<<<<<<<
70387 * """D.values() -> list of D's values"""
70388 * return list(self.itervalues())
70389 */
70390
70391 /* function exit code */
70392 __pyx_L1_error:;
70393 __Pyx_XDECREF(__pyx_t_1);
70394 __Pyx_XDECREF(__pyx_t_2);
70395 __Pyx_XDECREF(__pyx_t_3);
70396 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
70397 __pyx_r = NULL;
70398 __pyx_L0:;
70399 __Pyx_XGIVEREF(__pyx_r);
70400 __Pyx_TraceReturn(__pyx_r, 0);
70401 __Pyx_RefNannyFinishContext();
70402 return __pyx_r;
70403 }
70404
70405 /* "pysam/libcbcf.pyx":3608
70406 * return list(self.itervalues())
70407 *
70408 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
70409 * """D.update([E, ]**F) -> None.
70410 *
70411 */
70412
70413 /* Python wrapper */
70414 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_36update(PyObject *__pyx_v_self,
70415 #if CYTHON_METH_FASTCALL
70416 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70417 #else
70418 PyObject *__pyx_args, PyObject *__pyx_kwds
70419 #endif
70420 ); /*proto*/
70421 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_35update, "VariantRecordSample.update(self, items=None, **kwargs)\nD.update([E, ]**F) -> None.\n\n Update D from dict/iterable E and F.\n ");
70422 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_36update = {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_36update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_35update};
70423 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_36update(PyObject *__pyx_v_self,
70424 #if CYTHON_METH_FASTCALL
70425 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70426 #else
70427 PyObject *__pyx_args, PyObject *__pyx_kwds
70428 #endif
70429 ) {
70430 PyObject *__pyx_v_items = 0;
70431 PyObject *__pyx_v_kwargs = 0;
70432 #if !CYTHON_METH_FASTCALL
70433 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
70434 #endif
70435 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
70436 PyObject* values[1] = {0};
70437 int __pyx_lineno = 0;
70438 const char *__pyx_filename = NULL;
70439 int __pyx_clineno = 0;
70440 PyObject *__pyx_r = 0;
70441 __Pyx_RefNannyDeclarations
70442 __Pyx_RefNannySetupContext("update (wrapper)", 0);
70443 #if !CYTHON_METH_FASTCALL
70444 #if CYTHON_ASSUME_SAFE_MACROS
70445 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
70446 #else
70447 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
70448 #endif
70449 #endif
70450 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
70451 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
70452 __Pyx_GOTREF(__pyx_v_kwargs);
70453 {
70454 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
70455 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
70456 if (__pyx_kwds) {
70457 Py_ssize_t kw_args;
70458 switch (__pyx_nargs) {
70459 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
70460 CYTHON_FALLTHROUGH;
70461 case 0: break;
70462 default: goto __pyx_L5_argtuple_error;
70463 }
70464 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
70465 switch (__pyx_nargs) {
70466 case 0:
70467 if (kw_args > 0) {
70468 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
70469 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
70470 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3608, __pyx_L3_error)
70471 }
70472 }
70473 if (unlikely(kw_args > 0)) {
70474 const Py_ssize_t kwd_pos_args = __pyx_nargs;
70475 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "update") < 0)) __PYX_ERR(0, 3608, __pyx_L3_error)
70476 }
70477 } else {
70478 switch (__pyx_nargs) {
70479 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
70480 CYTHON_FALLTHROUGH;
70481 case 0: break;
70482 default: goto __pyx_L5_argtuple_error;
70483 }
70484 }
70485 __pyx_v_items = values[0];
70486 }
70487 goto __pyx_L6_skip;
70488 __pyx_L5_argtuple_error:;
70489 __Pyx_RaiseArgtupleInvalid("update", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 3608, __pyx_L3_error)
70490 __pyx_L6_skip:;
70491 goto __pyx_L4_argument_unpacking_done;
70492 __pyx_L3_error:;
70493 {
70494 Py_ssize_t __pyx_temp;
70495 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
70496 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
70497 }
70498 }
70499 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
70500 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
70501 __Pyx_RefNannyFinishContext();
70502 return NULL;
70503 __pyx_L4_argument_unpacking_done:;
70504 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_35update(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), __pyx_v_items, __pyx_v_kwargs);
70505
70506 /* function exit code */
70507 __Pyx_DECREF(__pyx_v_kwargs);
70508 {
70509 Py_ssize_t __pyx_temp;
70510 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
70511 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
70512 }
70513 }
70514 __Pyx_RefNannyFinishContext();
70515 return __pyx_r;
70516 }
70517
70518 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_35update(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs) {
70519 PyObject *__pyx_v_k = NULL;
70520 PyObject *__pyx_v_v = NULL;
70521 PyObject *__pyx_r = NULL;
70522 __Pyx_TraceDeclarations
70523 __Pyx_RefNannyDeclarations
70524 PyObject *__pyx_t_1 = NULL;
70525 Py_ssize_t __pyx_t_2;
70526 Py_ssize_t __pyx_t_3;
70527 int __pyx_t_4;
70528 PyObject *__pyx_t_5 = NULL;
70529 PyObject *__pyx_t_6 = NULL;
70530 int __pyx_t_7;
70531 int __pyx_t_8;
70532 int __pyx_lineno = 0;
70533 const char *__pyx_filename = NULL;
70534 int __pyx_clineno = 0;
70535 __Pyx_TraceFrameInit(__pyx_codeobj__192)
70536 __Pyx_RefNannySetupContext("update", 1);
70537 __Pyx_TraceCall("update", __pyx_f[0], 3608, 0, __PYX_ERR(0, 3608, __pyx_L1_error));
70538
70539 /* "pysam/libcbcf.pyx":3613
70540 * Update D from dict/iterable E and F.
70541 * """
70542 * for k, v in items.items(): # <<<<<<<<<<<<<<
70543 * self[k] = v
70544 *
70545 */
70546 __pyx_t_2 = 0;
70547 if (unlikely(__pyx_v_items == Py_None)) {
70548 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
70549 __PYX_ERR(0, 3613, __pyx_L1_error)
70550 }
70551 __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_items, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3613, __pyx_L1_error)
70552 __Pyx_GOTREF(__pyx_t_5);
70553 __Pyx_XDECREF(__pyx_t_1);
70554 __pyx_t_1 = __pyx_t_5;
70555 __pyx_t_5 = 0;
70556 while (1) {
70557 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
70558 if (unlikely(__pyx_t_7 == 0)) break;
70559 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3613, __pyx_L1_error)
70560 __Pyx_GOTREF(__pyx_t_5);
70561 __Pyx_GOTREF(__pyx_t_6);
70562 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5);
70563 __pyx_t_5 = 0;
70564 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
70565 __pyx_t_6 = 0;
70566
70567 /* "pysam/libcbcf.pyx":3614
70568 * """
70569 * for k, v in items.items():
70570 * self[k] = v # <<<<<<<<<<<<<<
70571 *
70572 * if kwargs:
70573 */
70574 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 3614, __pyx_L1_error)
70575 }
70576 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
70577
70578 /* "pysam/libcbcf.pyx":3616
70579 * self[k] = v
70580 *
70581 * if kwargs: # <<<<<<<<<<<<<<
70582 * for k, v in kwargs.items():
70583 * self[k] = v
70584 */
70585 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3616, __pyx_L1_error)
70586 if (__pyx_t_8) {
70587
70588 /* "pysam/libcbcf.pyx":3617
70589 *
70590 * if kwargs:
70591 * for k, v in kwargs.items(): # <<<<<<<<<<<<<<
70592 * self[k] = v
70593 *
70594 */
70595 __pyx_t_3 = 0;
70596 __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_2), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3617, __pyx_L1_error)
70597 __Pyx_GOTREF(__pyx_t_6);
70598 __Pyx_XDECREF(__pyx_t_1);
70599 __pyx_t_1 = __pyx_t_6;
70600 __pyx_t_6 = 0;
70601 while (1) {
70602 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_2, &__pyx_t_3, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4);
70603 if (unlikely(__pyx_t_7 == 0)) break;
70604 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3617, __pyx_L1_error)
70605 __Pyx_GOTREF(__pyx_t_6);
70606 __Pyx_GOTREF(__pyx_t_5);
70607 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
70608 __pyx_t_6 = 0;
70609 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
70610 __pyx_t_5 = 0;
70611
70612 /* "pysam/libcbcf.pyx":3618
70613 * if kwargs:
70614 * for k, v in kwargs.items():
70615 * self[k] = v # <<<<<<<<<<<<<<
70616 *
70617 * def pop(self, key, default=_nothing):
70618 */
70619 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 3618, __pyx_L1_error)
70620 }
70621 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
70622
70623 /* "pysam/libcbcf.pyx":3616
70624 * self[k] = v
70625 *
70626 * if kwargs: # <<<<<<<<<<<<<<
70627 * for k, v in kwargs.items():
70628 * self[k] = v
70629 */
70630 }
70631
70632 /* "pysam/libcbcf.pyx":3608
70633 * return list(self.itervalues())
70634 *
70635 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
70636 * """D.update([E, ]**F) -> None.
70637 *
70638 */
70639
70640 /* function exit code */
70641 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
70642 goto __pyx_L0;
70643 __pyx_L1_error:;
70644 __Pyx_XDECREF(__pyx_t_1);
70645 __Pyx_XDECREF(__pyx_t_5);
70646 __Pyx_XDECREF(__pyx_t_6);
70647 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
70648 __pyx_r = NULL;
70649 __pyx_L0:;
70650 __Pyx_XDECREF(__pyx_v_k);
70651 __Pyx_XDECREF(__pyx_v_v);
70652 __Pyx_XGIVEREF(__pyx_r);
70653 __Pyx_TraceReturn(__pyx_r, 0);
70654 __Pyx_RefNannyFinishContext();
70655 return __pyx_r;
70656 }
70657
70658 /* "pysam/libcbcf.pyx":3620
70659 * self[k] = v
70660 *
70661 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
70662 * try:
70663 * value = self[key]
70664 */
70665
70666 /* Python wrapper */
70667 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_38pop(PyObject *__pyx_v_self,
70668 #if CYTHON_METH_FASTCALL
70669 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70670 #else
70671 PyObject *__pyx_args, PyObject *__pyx_kwds
70672 #endif
70673 ); /*proto*/
70674 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_37pop, "VariantRecordSample.pop(self, key, default=_nothing)");
70675 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_38pop = {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_38pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_37pop};
70676 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_38pop(PyObject *__pyx_v_self,
70677 #if CYTHON_METH_FASTCALL
70678 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
70679 #else
70680 PyObject *__pyx_args, PyObject *__pyx_kwds
70681 #endif
70682 ) {
70683 PyObject *__pyx_v_key = 0;
70684 PyObject *__pyx_v_default = 0;
70685 #if !CYTHON_METH_FASTCALL
70686 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
70687 #endif
70688 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
70689 PyObject* values[2] = {0,0};
70690 int __pyx_lineno = 0;
70691 const char *__pyx_filename = NULL;
70692 int __pyx_clineno = 0;
70693 PyObject *__pyx_r = 0;
70694 __Pyx_RefNannyDeclarations
70695 __Pyx_RefNannySetupContext("pop (wrapper)", 0);
70696 #if !CYTHON_METH_FASTCALL
70697 #if CYTHON_ASSUME_SAFE_MACROS
70698 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
70699 #else
70700 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
70701 #endif
70702 #endif
70703 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
70704 {
70705 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
70706 values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__193);
70707 if (__pyx_kwds) {
70708 Py_ssize_t kw_args;
70709 switch (__pyx_nargs) {
70710 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
70711 CYTHON_FALLTHROUGH;
70712 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
70713 CYTHON_FALLTHROUGH;
70714 case 0: break;
70715 default: goto __pyx_L5_argtuple_error;
70716 }
70717 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
70718 switch (__pyx_nargs) {
70719 case 0:
70720 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
70721 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
70722 kw_args--;
70723 }
70724 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3620, __pyx_L3_error)
70725 else goto __pyx_L5_argtuple_error;
70726 CYTHON_FALLTHROUGH;
70727 case 1:
70728 if (kw_args > 0) {
70729 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
70730 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
70731 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3620, __pyx_L3_error)
70732 }
70733 }
70734 if (unlikely(kw_args > 0)) {
70735 const Py_ssize_t kwd_pos_args = __pyx_nargs;
70736 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pop") < 0)) __PYX_ERR(0, 3620, __pyx_L3_error)
70737 }
70738 } else {
70739 switch (__pyx_nargs) {
70740 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
70741 CYTHON_FALLTHROUGH;
70742 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
70743 break;
70744 default: goto __pyx_L5_argtuple_error;
70745 }
70746 }
70747 __pyx_v_key = values[0];
70748 __pyx_v_default = values[1];
70749 }
70750 goto __pyx_L6_skip;
70751 __pyx_L5_argtuple_error:;
70752 __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3620, __pyx_L3_error)
70753 __pyx_L6_skip:;
70754 goto __pyx_L4_argument_unpacking_done;
70755 __pyx_L3_error:;
70756 {
70757 Py_ssize_t __pyx_temp;
70758 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
70759 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
70760 }
70761 }
70762 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
70763 __Pyx_RefNannyFinishContext();
70764 return NULL;
70765 __pyx_L4_argument_unpacking_done:;
70766 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_37pop(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
70767
70768 /* function exit code */
70769 {
70770 Py_ssize_t __pyx_temp;
70771 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
70772 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
70773 }
70774 }
70775 __Pyx_RefNannyFinishContext();
70776 return __pyx_r;
70777 }
70778
70779 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_37pop(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
70780 PyObject *__pyx_v_value = NULL;
70781 PyObject *__pyx_r = NULL;
70782 __Pyx_TraceDeclarations
70783 __Pyx_RefNannyDeclarations
70784 PyObject *__pyx_t_1 = NULL;
70785 PyObject *__pyx_t_2 = NULL;
70786 PyObject *__pyx_t_3 = NULL;
70787 PyObject *__pyx_t_4 = NULL;
70788 int __pyx_t_5;
70789 PyObject *__pyx_t_6 = NULL;
70790 PyObject *__pyx_t_7 = NULL;
70791 int __pyx_t_8;
70792 int __pyx_lineno = 0;
70793 const char *__pyx_filename = NULL;
70794 int __pyx_clineno = 0;
70795 __Pyx_TraceFrameInit(__pyx_codeobj__194)
70796 __Pyx_RefNannySetupContext("pop", 1);
70797 __Pyx_TraceCall("pop", __pyx_f[0], 3620, 0, __PYX_ERR(0, 3620, __pyx_L1_error));
70798
70799 /* "pysam/libcbcf.pyx":3621
70800 *
70801 * def pop(self, key, default=_nothing):
70802 * try: # <<<<<<<<<<<<<<
70803 * value = self[key]
70804 * del self[key]
70805 */
70806 {
70807 __Pyx_PyThreadState_declare
70808 __Pyx_PyThreadState_assign
70809 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
70810 __Pyx_XGOTREF(__pyx_t_1);
70811 __Pyx_XGOTREF(__pyx_t_2);
70812 __Pyx_XGOTREF(__pyx_t_3);
70813 /*try:*/ {
70814
70815 /* "pysam/libcbcf.pyx":3622
70816 * def pop(self, key, default=_nothing):
70817 * try:
70818 * value = self[key] # <<<<<<<<<<<<<<
70819 * del self[key]
70820 * return value
70821 */
70822 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3622, __pyx_L3_error)
70823 __Pyx_GOTREF(__pyx_t_4);
70824 __pyx_v_value = __pyx_t_4;
70825 __pyx_t_4 = 0;
70826
70827 /* "pysam/libcbcf.pyx":3623
70828 * try:
70829 * value = self[key]
70830 * del self[key] # <<<<<<<<<<<<<<
70831 * return value
70832 * except KeyError:
70833 */
70834 if (unlikely((PyObject_DelItem(((PyObject *)__pyx_v_self), __pyx_v_key) < 0))) __PYX_ERR(0, 3623, __pyx_L3_error)
70835
70836 /* "pysam/libcbcf.pyx":3624
70837 * value = self[key]
70838 * del self[key]
70839 * return value # <<<<<<<<<<<<<<
70840 * except KeyError:
70841 * if default is not _nothing:
70842 */
70843 __Pyx_XDECREF(__pyx_r);
70844 __Pyx_INCREF(__pyx_v_value);
70845 __pyx_r = __pyx_v_value;
70846 goto __pyx_L7_try_return;
70847
70848 /* "pysam/libcbcf.pyx":3621
70849 *
70850 * def pop(self, key, default=_nothing):
70851 * try: # <<<<<<<<<<<<<<
70852 * value = self[key]
70853 * del self[key]
70854 */
70855 }
70856 __pyx_L3_error:;
70857 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
70858
70859 /* "pysam/libcbcf.pyx":3625
70860 * del self[key]
70861 * return value
70862 * except KeyError: # <<<<<<<<<<<<<<
70863 * if default is not _nothing:
70864 * return default
70865 */
70866 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
70867 if (__pyx_t_5) {
70868 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
70869 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3625, __pyx_L5_except_error)
70870 __Pyx_XGOTREF(__pyx_t_4);
70871 __Pyx_XGOTREF(__pyx_t_6);
70872 __Pyx_XGOTREF(__pyx_t_7);
70873
70874 /* "pysam/libcbcf.pyx":3626
70875 * return value
70876 * except KeyError:
70877 * if default is not _nothing: # <<<<<<<<<<<<<<
70878 * return default
70879 * raise
70880 */
70881 __pyx_t_8 = (__pyx_v_default != __pyx_v_5pysam_7libcbcf__nothing);
70882 if (__pyx_t_8) {
70883
70884 /* "pysam/libcbcf.pyx":3627
70885 * except KeyError:
70886 * if default is not _nothing:
70887 * return default # <<<<<<<<<<<<<<
70888 * raise
70889 *
70890 */
70891 __Pyx_XDECREF(__pyx_r);
70892 __Pyx_INCREF(__pyx_v_default);
70893 __pyx_r = __pyx_v_default;
70894 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
70895 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
70896 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
70897 goto __pyx_L6_except_return;
70898
70899 /* "pysam/libcbcf.pyx":3626
70900 * return value
70901 * except KeyError:
70902 * if default is not _nothing: # <<<<<<<<<<<<<<
70903 * return default
70904 * raise
70905 */
70906 }
70907
70908 /* "pysam/libcbcf.pyx":3628
70909 * if default is not _nothing:
70910 * return default
70911 * raise # <<<<<<<<<<<<<<
70912 *
70913 * def __richcmp__(VariantRecordSample self not None, VariantRecordSample other not None, int op):
70914 */
70915 __Pyx_GIVEREF(__pyx_t_4);
70916 __Pyx_GIVEREF(__pyx_t_6);
70917 __Pyx_XGIVEREF(__pyx_t_7);
70918 __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_6, __pyx_t_7);
70919 __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0;
70920 __PYX_ERR(0, 3628, __pyx_L5_except_error)
70921 }
70922 goto __pyx_L5_except_error;
70923
70924 /* "pysam/libcbcf.pyx":3621
70925 *
70926 * def pop(self, key, default=_nothing):
70927 * try: # <<<<<<<<<<<<<<
70928 * value = self[key]
70929 * del self[key]
70930 */
70931 __pyx_L5_except_error:;
70932 __Pyx_XGIVEREF(__pyx_t_1);
70933 __Pyx_XGIVEREF(__pyx_t_2);
70934 __Pyx_XGIVEREF(__pyx_t_3);
70935 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
70936 goto __pyx_L1_error;
70937 __pyx_L7_try_return:;
70938 __Pyx_XGIVEREF(__pyx_t_1);
70939 __Pyx_XGIVEREF(__pyx_t_2);
70940 __Pyx_XGIVEREF(__pyx_t_3);
70941 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
70942 goto __pyx_L0;
70943 __pyx_L6_except_return:;
70944 __Pyx_XGIVEREF(__pyx_t_1);
70945 __Pyx_XGIVEREF(__pyx_t_2);
70946 __Pyx_XGIVEREF(__pyx_t_3);
70947 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
70948 goto __pyx_L0;
70949 }
70950
70951 /* "pysam/libcbcf.pyx":3620
70952 * self[k] = v
70953 *
70954 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
70955 * try:
70956 * value = self[key]
70957 */
70958
70959 /* function exit code */
70960 __pyx_L1_error:;
70961 __Pyx_XDECREF(__pyx_t_4);
70962 __Pyx_XDECREF(__pyx_t_6);
70963 __Pyx_XDECREF(__pyx_t_7);
70964 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
70965 __pyx_r = NULL;
70966 __pyx_L0:;
70967 __Pyx_XDECREF(__pyx_v_value);
70968 __Pyx_XGIVEREF(__pyx_r);
70969 __Pyx_TraceReturn(__pyx_r, 0);
70970 __Pyx_RefNannyFinishContext();
70971 return __pyx_r;
70972 }
70973
70974 /* "pysam/libcbcf.pyx":3630
70975 * raise
70976 *
70977 * def __richcmp__(VariantRecordSample self not None, VariantRecordSample other not None, int op): # <<<<<<<<<<<<<<
70978 * if op != 2 and op != 3:
70979 * return NotImplemented
70980 */
70981
70982 /* Python wrapper */
70983 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_40__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
70984 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_40__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
70985 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
70986 int __pyx_lineno = 0;
70987 const char *__pyx_filename = NULL;
70988 int __pyx_clineno = 0;
70989 PyObject *__pyx_r = 0;
70990 __Pyx_RefNannyDeclarations
70991 __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
70992 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
70993 if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
70994 PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 3630, __pyx_L1_error)
70995 }
70996 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_7libcbcf_VariantRecordSample, 0, "other", 0))) __PYX_ERR(0, 3630, __pyx_L1_error)
70997 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_39__richcmp__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_other), ((int)__pyx_v_op));
70998
70999 /* function exit code */
71000 goto __pyx_L0;
71001 __pyx_L1_error:;
71002 __pyx_r = NULL;
71003 __pyx_L0:;
71004 __Pyx_RefNannyFinishContext();
71005 return __pyx_r;
71006 }
71007
71008 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_39__richcmp__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_other, int __pyx_v_op) {
71009 int __pyx_v_cmp;
71010 PyObject *__pyx_r = NULL;
71011 __Pyx_TraceDeclarations
71012 __Pyx_RefNannyDeclarations
71013 int __pyx_t_1;
71014 PyObject *__pyx_t_2 = NULL;
71015 PyObject *__pyx_t_3 = NULL;
71016 PyObject *__pyx_t_4 = NULL;
71017 int __pyx_lineno = 0;
71018 const char *__pyx_filename = NULL;
71019 int __pyx_clineno = 0;
71020 __Pyx_RefNannySetupContext("__richcmp__", 1);
71021 __Pyx_TraceCall("__richcmp__", __pyx_f[0], 3630, 0, __PYX_ERR(0, 3630, __pyx_L1_error));
71022
71023 /* "pysam/libcbcf.pyx":3631
71024 *
71025 * def __richcmp__(VariantRecordSample self not None, VariantRecordSample other not None, int op):
71026 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
71027 * return NotImplemented
71028 *
71029 */
71030 switch (__pyx_v_op) {
71031 case 2:
71032 case 3:
71033 __pyx_t_1 = 0;
71034 break;
71035 default:
71036 __pyx_t_1 = 1;
71037 break;
71038 }
71039 if (__pyx_t_1) {
71040
71041 /* "pysam/libcbcf.pyx":3632
71042 * def __richcmp__(VariantRecordSample self not None, VariantRecordSample other not None, int op):
71043 * if op != 2 and op != 3:
71044 * return NotImplemented # <<<<<<<<<<<<<<
71045 *
71046 * cdef bint cmp = dict(self) == dict(other)
71047 */
71048 __Pyx_XDECREF(__pyx_r);
71049 __Pyx_INCREF(__pyx_builtin_NotImplemented);
71050 __pyx_r = __pyx_builtin_NotImplemented;
71051 goto __pyx_L0;
71052
71053 /* "pysam/libcbcf.pyx":3631
71054 *
71055 * def __richcmp__(VariantRecordSample self not None, VariantRecordSample other not None, int op):
71056 * if op != 2 and op != 3: # <<<<<<<<<<<<<<
71057 * return NotImplemented
71058 *
71059 */
71060 }
71061
71062 /* "pysam/libcbcf.pyx":3634
71063 * return NotImplemented
71064 *
71065 * cdef bint cmp = dict(self) == dict(other) # <<<<<<<<<<<<<<
71066 *
71067 * if op == 3:
71068 */
71069 __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3634, __pyx_L1_error)
71070 __Pyx_GOTREF(__pyx_t_2);
71071 __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), ((PyObject *)__pyx_v_other)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3634, __pyx_L1_error)
71072 __Pyx_GOTREF(__pyx_t_3);
71073 __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3634, __pyx_L1_error)
71074 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
71075 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
71076 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3634, __pyx_L1_error)
71077 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
71078 __pyx_v_cmp = __pyx_t_1;
71079
71080 /* "pysam/libcbcf.pyx":3636
71081 * cdef bint cmp = dict(self) == dict(other)
71082 *
71083 * if op == 3: # <<<<<<<<<<<<<<
71084 * cmp = not cmp
71085 *
71086 */
71087 __pyx_t_1 = (__pyx_v_op == 3);
71088 if (__pyx_t_1) {
71089
71090 /* "pysam/libcbcf.pyx":3637
71091 *
71092 * if op == 3:
71093 * cmp = not cmp # <<<<<<<<<<<<<<
71094 *
71095 * return cmp
71096 */
71097 __pyx_v_cmp = (!__pyx_v_cmp);
71098
71099 /* "pysam/libcbcf.pyx":3636
71100 * cdef bint cmp = dict(self) == dict(other)
71101 *
71102 * if op == 3: # <<<<<<<<<<<<<<
71103 * cmp = not cmp
71104 *
71105 */
71106 }
71107
71108 /* "pysam/libcbcf.pyx":3639
71109 * cmp = not cmp
71110 *
71111 * return cmp # <<<<<<<<<<<<<<
71112 *
71113 * # Mappings are not hashable by default, but subclasses can change this
71114 */
71115 __Pyx_XDECREF(__pyx_r);
71116 __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cmp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3639, __pyx_L1_error)
71117 __Pyx_GOTREF(__pyx_t_4);
71118 __pyx_r = __pyx_t_4;
71119 __pyx_t_4 = 0;
71120 goto __pyx_L0;
71121
71122 /* "pysam/libcbcf.pyx":3630
71123 * raise
71124 *
71125 * def __richcmp__(VariantRecordSample self not None, VariantRecordSample other not None, int op): # <<<<<<<<<<<<<<
71126 * if op != 2 and op != 3:
71127 * return NotImplemented
71128 */
71129
71130 /* function exit code */
71131 __pyx_L1_error:;
71132 __Pyx_XDECREF(__pyx_t_2);
71133 __Pyx_XDECREF(__pyx_t_3);
71134 __Pyx_XDECREF(__pyx_t_4);
71135 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
71136 __pyx_r = NULL;
71137 __pyx_L0:;
71138 __Pyx_XGIVEREF(__pyx_r);
71139 __Pyx_TraceReturn(__pyx_r, 0);
71140 __Pyx_RefNannyFinishContext();
71141 return __pyx_r;
71142 }
71143
71144 /* "pysam/libcbcf.pxd":103
71145 * cdef class VariantRecordSample(object):
71146 * cdef VariantRecord record
71147 * cdef readonly int32_t index # <<<<<<<<<<<<<<
71148 *
71149 *
71150 */
71151
71152 /* Python wrapper */
71153 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_5index_1__get__(PyObject *__pyx_v_self); /*proto*/
71154 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_5index_1__get__(PyObject *__pyx_v_self) {
71155 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
71156 PyObject *__pyx_r = 0;
71157 __Pyx_RefNannyDeclarations
71158 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
71159 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
71160 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_5index___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
71161
71162 /* function exit code */
71163 __Pyx_RefNannyFinishContext();
71164 return __pyx_r;
71165 }
71166
71167 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_5index___get__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
71168 PyObject *__pyx_r = NULL;
71169 __Pyx_TraceDeclarations
71170 __Pyx_RefNannyDeclarations
71171 PyObject *__pyx_t_1 = NULL;
71172 int __pyx_lineno = 0;
71173 const char *__pyx_filename = NULL;
71174 int __pyx_clineno = 0;
71175 __Pyx_RefNannySetupContext("__get__", 1);
71176 __Pyx_TraceCall("__get__", __pyx_f[3], 103, 0, __PYX_ERR(3, 103, __pyx_L1_error));
71177 __Pyx_XDECREF(__pyx_r);
71178 __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->index); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 103, __pyx_L1_error)
71179 __Pyx_GOTREF(__pyx_t_1);
71180 __pyx_r = __pyx_t_1;
71181 __pyx_t_1 = 0;
71182 goto __pyx_L0;
71183
71184 /* function exit code */
71185 __pyx_L1_error:;
71186 __Pyx_XDECREF(__pyx_t_1);
71187 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
71188 __pyx_r = NULL;
71189 __pyx_L0:;
71190 __Pyx_XGIVEREF(__pyx_r);
71191 __Pyx_TraceReturn(__pyx_r, 0);
71192 __Pyx_RefNannyFinishContext();
71193 return __pyx_r;
71194 }
71195
71196 /* "(tree fragment)":1
71197 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
71198 * cdef tuple state
71199 * cdef object _dict
71200 */
71201
71202 /* Python wrapper */
71203 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_42__reduce_cython__(PyObject *__pyx_v_self,
71204 #if CYTHON_METH_FASTCALL
71205 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
71206 #else
71207 PyObject *__pyx_args, PyObject *__pyx_kwds
71208 #endif
71209 ); /*proto*/
71210 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_41__reduce_cython__, "VariantRecordSample.__reduce_cython__(self)");
71211 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_42__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_42__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_41__reduce_cython__};
71212 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_42__reduce_cython__(PyObject *__pyx_v_self,
71213 #if CYTHON_METH_FASTCALL
71214 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
71215 #else
71216 PyObject *__pyx_args, PyObject *__pyx_kwds
71217 #endif
71218 ) {
71219 #if !CYTHON_METH_FASTCALL
71220 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
71221 #endif
71222 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
71223 PyObject *__pyx_r = 0;
71224 __Pyx_RefNannyDeclarations
71225 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
71226 #if !CYTHON_METH_FASTCALL
71227 #if CYTHON_ASSUME_SAFE_MACROS
71228 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
71229 #else
71230 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
71231 #endif
71232 #endif
71233 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
71234 if (unlikely(__pyx_nargs > 0)) {
71235 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
71236 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
71237 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_41__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self));
71238
71239 /* function exit code */
71240 __Pyx_RefNannyFinishContext();
71241 return __pyx_r;
71242 }
71243
71244 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_41__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self) {
71245 PyObject *__pyx_v_state = 0;
71246 PyObject *__pyx_v__dict = 0;
71247 int __pyx_v_use_setstate;
71248 PyObject *__pyx_r = NULL;
71249 __Pyx_TraceDeclarations
71250 __Pyx_RefNannyDeclarations
71251 PyObject *__pyx_t_1 = NULL;
71252 PyObject *__pyx_t_2 = NULL;
71253 int __pyx_t_3;
71254 PyObject *__pyx_t_4 = NULL;
71255 int __pyx_lineno = 0;
71256 const char *__pyx_filename = NULL;
71257 int __pyx_clineno = 0;
71258 __Pyx_TraceFrameInit(__pyx_codeobj__195)
71259 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
71260 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
71261
71262 /* "(tree fragment)":5
71263 * cdef object _dict
71264 * cdef bint use_setstate
71265 * state = (self.index, self.record) # <<<<<<<<<<<<<<
71266 * _dict = getattr(self, '__dict__', None)
71267 * if _dict is not None:
71268 */
71269 __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->index); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
71270 __Pyx_GOTREF(__pyx_t_1);
71271 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error)
71272 __Pyx_GOTREF(__pyx_t_2);
71273 __Pyx_GIVEREF(__pyx_t_1);
71274 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error);
71275 __Pyx_INCREF((PyObject *)__pyx_v_self->record);
71276 __Pyx_GIVEREF((PyObject *)__pyx_v_self->record);
71277 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->record))) __PYX_ERR(4, 5, __pyx_L1_error);
71278 __pyx_t_1 = 0;
71279 __pyx_v_state = ((PyObject*)__pyx_t_2);
71280 __pyx_t_2 = 0;
71281
71282 /* "(tree fragment)":6
71283 * cdef bint use_setstate
71284 * state = (self.index, self.record)
71285 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
71286 * if _dict is not None:
71287 * state += (_dict,)
71288 */
71289 __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 6, __pyx_L1_error)
71290 __Pyx_GOTREF(__pyx_t_2);
71291 __pyx_v__dict = __pyx_t_2;
71292 __pyx_t_2 = 0;
71293
71294 /* "(tree fragment)":7
71295 * state = (self.index, self.record)
71296 * _dict = getattr(self, '__dict__', None)
71297 * if _dict is not None: # <<<<<<<<<<<<<<
71298 * state += (_dict,)
71299 * use_setstate = True
71300 */
71301 __pyx_t_3 = (__pyx_v__dict != Py_None);
71302 if (__pyx_t_3) {
71303
71304 /* "(tree fragment)":8
71305 * _dict = getattr(self, '__dict__', None)
71306 * if _dict is not None:
71307 * state += (_dict,) # <<<<<<<<<<<<<<
71308 * use_setstate = True
71309 * else:
71310 */
71311 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 8, __pyx_L1_error)
71312 __Pyx_GOTREF(__pyx_t_2);
71313 __Pyx_INCREF(__pyx_v__dict);
71314 __Pyx_GIVEREF(__pyx_v__dict);
71315 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
71316 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
71317 __Pyx_GOTREF(__pyx_t_1);
71318 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
71319 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
71320 __pyx_t_1 = 0;
71321
71322 /* "(tree fragment)":9
71323 * if _dict is not None:
71324 * state += (_dict,)
71325 * use_setstate = True # <<<<<<<<<<<<<<
71326 * else:
71327 * use_setstate = self.record is not None
71328 */
71329 __pyx_v_use_setstate = 1;
71330
71331 /* "(tree fragment)":7
71332 * state = (self.index, self.record)
71333 * _dict = getattr(self, '__dict__', None)
71334 * if _dict is not None: # <<<<<<<<<<<<<<
71335 * state += (_dict,)
71336 * use_setstate = True
71337 */
71338 goto __pyx_L3;
71339 }
71340
71341 /* "(tree fragment)":11
71342 * use_setstate = True
71343 * else:
71344 * use_setstate = self.record is not None # <<<<<<<<<<<<<<
71345 * if use_setstate:
71346 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, None), state
71347 */
71348 /*else*/ {
71349 __pyx_t_3 = (((PyObject *)__pyx_v_self->record) != Py_None);
71350 __pyx_v_use_setstate = __pyx_t_3;
71351 }
71352 __pyx_L3:;
71353
71354 /* "(tree fragment)":12
71355 * else:
71356 * use_setstate = self.record is not None
71357 * if use_setstate: # <<<<<<<<<<<<<<
71358 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, None), state
71359 * else:
71360 */
71361 if (__pyx_v_use_setstate) {
71362
71363 /* "(tree fragment)":13
71364 * use_setstate = self.record is not None
71365 * if use_setstate:
71366 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, None), state # <<<<<<<<<<<<<<
71367 * else:
71368 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, state)
71369 */
71370 __Pyx_XDECREF(__pyx_r);
71371 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_VariantRecordSamp_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
71372 __Pyx_GOTREF(__pyx_t_1);
71373 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error)
71374 __Pyx_GOTREF(__pyx_t_2);
71375 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
71376 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
71377 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
71378 __Pyx_INCREF(__pyx_int_250317299);
71379 __Pyx_GIVEREF(__pyx_int_250317299);
71380 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_250317299)) __PYX_ERR(4, 13, __pyx_L1_error);
71381 __Pyx_INCREF(Py_None);
71382 __Pyx_GIVEREF(Py_None);
71383 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
71384 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error)
71385 __Pyx_GOTREF(__pyx_t_4);
71386 __Pyx_GIVEREF(__pyx_t_1);
71387 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
71388 __Pyx_GIVEREF(__pyx_t_2);
71389 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error);
71390 __Pyx_INCREF(__pyx_v_state);
71391 __Pyx_GIVEREF(__pyx_v_state);
71392 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
71393 __pyx_t_1 = 0;
71394 __pyx_t_2 = 0;
71395 __pyx_r = __pyx_t_4;
71396 __pyx_t_4 = 0;
71397 goto __pyx_L0;
71398
71399 /* "(tree fragment)":12
71400 * else:
71401 * use_setstate = self.record is not None
71402 * if use_setstate: # <<<<<<<<<<<<<<
71403 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, None), state
71404 * else:
71405 */
71406 }
71407
71408 /* "(tree fragment)":15
71409 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, None), state
71410 * else:
71411 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, state) # <<<<<<<<<<<<<<
71412 * def __setstate_cython__(self, __pyx_state):
71413 * __pyx_unpickle_VariantRecordSample__set_state(self, __pyx_state)
71414 */
71415 /*else*/ {
71416 __Pyx_XDECREF(__pyx_r);
71417 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VariantRecordSamp_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error)
71418 __Pyx_GOTREF(__pyx_t_4);
71419 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error)
71420 __Pyx_GOTREF(__pyx_t_2);
71421 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
71422 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
71423 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
71424 __Pyx_INCREF(__pyx_int_250317299);
71425 __Pyx_GIVEREF(__pyx_int_250317299);
71426 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_250317299)) __PYX_ERR(4, 15, __pyx_L1_error);
71427 __Pyx_INCREF(__pyx_v_state);
71428 __Pyx_GIVEREF(__pyx_v_state);
71429 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
71430 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
71431 __Pyx_GOTREF(__pyx_t_1);
71432 __Pyx_GIVEREF(__pyx_t_4);
71433 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error);
71434 __Pyx_GIVEREF(__pyx_t_2);
71435 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error);
71436 __pyx_t_4 = 0;
71437 __pyx_t_2 = 0;
71438 __pyx_r = __pyx_t_1;
71439 __pyx_t_1 = 0;
71440 goto __pyx_L0;
71441 }
71442
71443 /* "(tree fragment)":1
71444 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
71445 * cdef tuple state
71446 * cdef object _dict
71447 */
71448
71449 /* function exit code */
71450 __pyx_L1_error:;
71451 __Pyx_XDECREF(__pyx_t_1);
71452 __Pyx_XDECREF(__pyx_t_2);
71453 __Pyx_XDECREF(__pyx_t_4);
71454 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
71455 __pyx_r = NULL;
71456 __pyx_L0:;
71457 __Pyx_XDECREF(__pyx_v_state);
71458 __Pyx_XDECREF(__pyx_v__dict);
71459 __Pyx_XGIVEREF(__pyx_r);
71460 __Pyx_TraceReturn(__pyx_r, 0);
71461 __Pyx_RefNannyFinishContext();
71462 return __pyx_r;
71463 }
71464
71465 /* "(tree fragment)":16
71466 * else:
71467 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, state)
71468 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
71469 * __pyx_unpickle_VariantRecordSample__set_state(self, __pyx_state)
71470 */
71471
71472 /* Python wrapper */
71473 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_44__setstate_cython__(PyObject *__pyx_v_self,
71474 #if CYTHON_METH_FASTCALL
71475 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
71476 #else
71477 PyObject *__pyx_args, PyObject *__pyx_kwds
71478 #endif
71479 ); /*proto*/
71480 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_19VariantRecordSample_43__setstate_cython__, "VariantRecordSample.__setstate_cython__(self, __pyx_state)");
71481 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_44__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_44__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_43__setstate_cython__};
71482 static PyObject *__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_44__setstate_cython__(PyObject *__pyx_v_self,
71483 #if CYTHON_METH_FASTCALL
71484 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
71485 #else
71486 PyObject *__pyx_args, PyObject *__pyx_kwds
71487 #endif
71488 ) {
71489 PyObject *__pyx_v___pyx_state = 0;
71490 #if !CYTHON_METH_FASTCALL
71491 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
71492 #endif
71493 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
71494 PyObject* values[1] = {0};
71495 int __pyx_lineno = 0;
71496 const char *__pyx_filename = NULL;
71497 int __pyx_clineno = 0;
71498 PyObject *__pyx_r = 0;
71499 __Pyx_RefNannyDeclarations
71500 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
71501 #if !CYTHON_METH_FASTCALL
71502 #if CYTHON_ASSUME_SAFE_MACROS
71503 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
71504 #else
71505 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
71506 #endif
71507 #endif
71508 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
71509 {
71510 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
71511 if (__pyx_kwds) {
71512 Py_ssize_t kw_args;
71513 switch (__pyx_nargs) {
71514 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
71515 CYTHON_FALLTHROUGH;
71516 case 0: break;
71517 default: goto __pyx_L5_argtuple_error;
71518 }
71519 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
71520 switch (__pyx_nargs) {
71521 case 0:
71522 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
71523 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
71524 kw_args--;
71525 }
71526 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
71527 else goto __pyx_L5_argtuple_error;
71528 }
71529 if (unlikely(kw_args > 0)) {
71530 const Py_ssize_t kwd_pos_args = __pyx_nargs;
71531 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
71532 }
71533 } else if (unlikely(__pyx_nargs != 1)) {
71534 goto __pyx_L5_argtuple_error;
71535 } else {
71536 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
71537 }
71538 __pyx_v___pyx_state = values[0];
71539 }
71540 goto __pyx_L6_skip;
71541 __pyx_L5_argtuple_error:;
71542 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
71543 __pyx_L6_skip:;
71544 goto __pyx_L4_argument_unpacking_done;
71545 __pyx_L3_error:;
71546 {
71547 Py_ssize_t __pyx_temp;
71548 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
71549 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
71550 }
71551 }
71552 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
71553 __Pyx_RefNannyFinishContext();
71554 return NULL;
71555 __pyx_L4_argument_unpacking_done:;
71556 __pyx_r = __pyx_pf_5pysam_7libcbcf_19VariantRecordSample_43__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v_self), __pyx_v___pyx_state);
71557
71558 /* function exit code */
71559 {
71560 Py_ssize_t __pyx_temp;
71561 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
71562 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
71563 }
71564 }
71565 __Pyx_RefNannyFinishContext();
71566 return __pyx_r;
71567 }
71568
71569 static PyObject *__pyx_pf_5pysam_7libcbcf_19VariantRecordSample_43__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
71570 PyObject *__pyx_r = NULL;
71571 __Pyx_TraceDeclarations
71572 __Pyx_RefNannyDeclarations
71573 PyObject *__pyx_t_1 = NULL;
71574 int __pyx_lineno = 0;
71575 const char *__pyx_filename = NULL;
71576 int __pyx_clineno = 0;
71577 __Pyx_TraceFrameInit(__pyx_codeobj__196)
71578 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
71579 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
71580
71581 /* "(tree fragment)":17
71582 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, state)
71583 * def __setstate_cython__(self, __pyx_state):
71584 * __pyx_unpickle_VariantRecordSample__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
71585 */
71586 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
71587 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordSample__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
71588 __Pyx_GOTREF(__pyx_t_1);
71589 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
71590
71591 /* "(tree fragment)":16
71592 * else:
71593 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, state)
71594 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
71595 * __pyx_unpickle_VariantRecordSample__set_state(self, __pyx_state)
71596 */
71597
71598 /* function exit code */
71599 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
71600 goto __pyx_L0;
71601 __pyx_L1_error:;
71602 __Pyx_XDECREF(__pyx_t_1);
71603 __Pyx_AddTraceback("pysam.libcbcf.VariantRecordSample.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
71604 __pyx_r = NULL;
71605 __pyx_L0:;
71606 __Pyx_XGIVEREF(__pyx_r);
71607 __Pyx_TraceReturn(__pyx_r, 0);
71608 __Pyx_RefNannyFinishContext();
71609 return __pyx_r;
71610 }
71611
71612 /* "pysam/libcbcf.pyx":3645
71613 *
71614 *
71615 * cdef VariantRecordSample makeVariantRecordSample(VariantRecord record, int32_t sample_index): # <<<<<<<<<<<<<<
71616 * if not record or sample_index < 0:
71617 * raise ValueError('cannot create VariantRecordSample')
71618 */
71619
71620 static struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_f_5pysam_7libcbcf_makeVariantRecordSample(struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, int32_t __pyx_v_sample_index) {
71621 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v_sample = 0;
71622 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_r = NULL;
71623 __Pyx_TraceDeclarations
71624 __Pyx_RefNannyDeclarations
71625 int __pyx_t_1;
71626 int __pyx_t_2;
71627 int __pyx_t_3;
71628 PyObject *__pyx_t_4 = NULL;
71629 int __pyx_lineno = 0;
71630 const char *__pyx_filename = NULL;
71631 int __pyx_clineno = 0;
71632 __Pyx_RefNannySetupContext("makeVariantRecordSample", 1);
71633 __Pyx_TraceCall("makeVariantRecordSample", __pyx_f[0], 3645, 0, __PYX_ERR(0, 3645, __pyx_L1_error));
71634
71635 /* "pysam/libcbcf.pyx":3646
71636 *
71637 * cdef VariantRecordSample makeVariantRecordSample(VariantRecord record, int32_t sample_index):
71638 * if not record or sample_index < 0: # <<<<<<<<<<<<<<
71639 * raise ValueError('cannot create VariantRecordSample')
71640 *
71641 */
71642 __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_record)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 3646, __pyx_L1_error)
71643 __pyx_t_3 = (!__pyx_t_2);
71644 if (!__pyx_t_3) {
71645 } else {
71646 __pyx_t_1 = __pyx_t_3;
71647 goto __pyx_L4_bool_binop_done;
71648 }
71649 __pyx_t_3 = (__pyx_v_sample_index < 0);
71650 __pyx_t_1 = __pyx_t_3;
71651 __pyx_L4_bool_binop_done:;
71652 if (unlikely(__pyx_t_1)) {
71653
71654 /* "pysam/libcbcf.pyx":3647
71655 * cdef VariantRecordSample makeVariantRecordSample(VariantRecord record, int32_t sample_index):
71656 * if not record or sample_index < 0:
71657 * raise ValueError('cannot create VariantRecordSample') # <<<<<<<<<<<<<<
71658 *
71659 * cdef VariantRecordSample sample = VariantRecordSample.__new__(VariantRecordSample)
71660 */
71661 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__197, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3647, __pyx_L1_error)
71662 __Pyx_GOTREF(__pyx_t_4);
71663 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
71664 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
71665 __PYX_ERR(0, 3647, __pyx_L1_error)
71666
71667 /* "pysam/libcbcf.pyx":3646
71668 *
71669 * cdef VariantRecordSample makeVariantRecordSample(VariantRecord record, int32_t sample_index):
71670 * if not record or sample_index < 0: # <<<<<<<<<<<<<<
71671 * raise ValueError('cannot create VariantRecordSample')
71672 *
71673 */
71674 }
71675
71676 /* "pysam/libcbcf.pyx":3649
71677 * raise ValueError('cannot create VariantRecordSample')
71678 *
71679 * cdef VariantRecordSample sample = VariantRecordSample.__new__(VariantRecordSample) # <<<<<<<<<<<<<<
71680 * sample.record = record
71681 * sample.index = sample_index
71682 */
71683 __pyx_t_4 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordSample(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3649, __pyx_L1_error)
71684 __Pyx_GOTREF((PyObject *)__pyx_t_4);
71685 __pyx_v_sample = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_t_4);
71686 __pyx_t_4 = 0;
71687
71688 /* "pysam/libcbcf.pyx":3650
71689 *
71690 * cdef VariantRecordSample sample = VariantRecordSample.__new__(VariantRecordSample)
71691 * sample.record = record # <<<<<<<<<<<<<<
71692 * sample.index = sample_index
71693 *
71694 */
71695 __Pyx_INCREF((PyObject *)__pyx_v_record);
71696 __Pyx_GIVEREF((PyObject *)__pyx_v_record);
71697 __Pyx_GOTREF((PyObject *)__pyx_v_sample->record);
71698 __Pyx_DECREF((PyObject *)__pyx_v_sample->record);
71699 __pyx_v_sample->record = __pyx_v_record;
71700
71701 /* "pysam/libcbcf.pyx":3651
71702 * cdef VariantRecordSample sample = VariantRecordSample.__new__(VariantRecordSample)
71703 * sample.record = record
71704 * sample.index = sample_index # <<<<<<<<<<<<<<
71705 *
71706 * return sample
71707 */
71708 __pyx_v_sample->index = __pyx_v_sample_index;
71709
71710 /* "pysam/libcbcf.pyx":3653
71711 * sample.index = sample_index
71712 *
71713 * return sample # <<<<<<<<<<<<<<
71714 *
71715 *
71716 */
71717 __Pyx_XDECREF((PyObject *)__pyx_r);
71718 __Pyx_INCREF((PyObject *)__pyx_v_sample);
71719 __pyx_r = __pyx_v_sample;
71720 goto __pyx_L0;
71721
71722 /* "pysam/libcbcf.pyx":3645
71723 *
71724 *
71725 * cdef VariantRecordSample makeVariantRecordSample(VariantRecord record, int32_t sample_index): # <<<<<<<<<<<<<<
71726 * if not record or sample_index < 0:
71727 * raise ValueError('cannot create VariantRecordSample')
71728 */
71729
71730 /* function exit code */
71731 __pyx_L1_error:;
71732 __Pyx_XDECREF(__pyx_t_4);
71733 __Pyx_AddTraceback("pysam.libcbcf.makeVariantRecordSample", __pyx_clineno, __pyx_lineno, __pyx_filename);
71734 __pyx_r = 0;
71735 __pyx_L0:;
71736 __Pyx_XDECREF((PyObject *)__pyx_v_sample);
71737 __Pyx_XGIVEREF((PyObject *)__pyx_r);
71738 __Pyx_TraceReturn(__pyx_r, 0);
71739 __Pyx_RefNannyFinishContext();
71740 return __pyx_r;
71741 }
71742
71743 /* "pysam/libcbcf.pyx":3663
71744 *
71745 * cdef class BaseIndex(object):
71746 * def __init__(self): # <<<<<<<<<<<<<<
71747 * self.refs = ()
71748 * self.remap = {}
71749 */
71750
71751 /* Python wrapper */
71752 static int __pyx_pw_5pysam_7libcbcf_9BaseIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
71753 static int __pyx_pw_5pysam_7libcbcf_9BaseIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
71754 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
71755 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
71756 int __pyx_r;
71757 __Pyx_RefNannyDeclarations
71758 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
71759 #if CYTHON_ASSUME_SAFE_MACROS
71760 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
71761 #else
71762 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
71763 #endif
71764 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
71765 if (unlikely(__pyx_nargs > 0)) {
71766 __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
71767 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
71768 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex___init__(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
71769
71770 /* function exit code */
71771 __Pyx_RefNannyFinishContext();
71772 return __pyx_r;
71773 }
71774
71775 static int __pyx_pf_5pysam_7libcbcf_9BaseIndex___init__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
71776 int __pyx_r;
71777 __Pyx_TraceDeclarations
71778 __Pyx_RefNannyDeclarations
71779 PyObject *__pyx_t_1 = NULL;
71780 int __pyx_lineno = 0;
71781 const char *__pyx_filename = NULL;
71782 int __pyx_clineno = 0;
71783 __Pyx_RefNannySetupContext("__init__", 1);
71784 __Pyx_TraceCall("__init__", __pyx_f[0], 3663, 0, __PYX_ERR(0, 3663, __pyx_L1_error));
71785
71786 /* "pysam/libcbcf.pyx":3664
71787 * cdef class BaseIndex(object):
71788 * def __init__(self):
71789 * self.refs = () # <<<<<<<<<<<<<<
71790 * self.remap = {}
71791 *
71792 */
71793 __Pyx_INCREF(__pyx_empty_tuple);
71794 __Pyx_GIVEREF(__pyx_empty_tuple);
71795 __Pyx_GOTREF(__pyx_v_self->refs);
71796 __Pyx_DECREF(__pyx_v_self->refs);
71797 __pyx_v_self->refs = __pyx_empty_tuple;
71798
71799 /* "pysam/libcbcf.pyx":3665
71800 * def __init__(self):
71801 * self.refs = ()
71802 * self.remap = {} # <<<<<<<<<<<<<<
71803 *
71804 * def __len__(self):
71805 */
71806 __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3665, __pyx_L1_error)
71807 __Pyx_GOTREF(__pyx_t_1);
71808 if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remap, __pyx_t_1) < 0) __PYX_ERR(0, 3665, __pyx_L1_error)
71809 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
71810
71811 /* "pysam/libcbcf.pyx":3663
71812 *
71813 * cdef class BaseIndex(object):
71814 * def __init__(self): # <<<<<<<<<<<<<<
71815 * self.refs = ()
71816 * self.remap = {}
71817 */
71818
71819 /* function exit code */
71820 __pyx_r = 0;
71821 goto __pyx_L0;
71822 __pyx_L1_error:;
71823 __Pyx_XDECREF(__pyx_t_1);
71824 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
71825 __pyx_r = -1;
71826 __pyx_L0:;
71827 __Pyx_TraceReturn(Py_None, 0);
71828 __Pyx_RefNannyFinishContext();
71829 return __pyx_r;
71830 }
71831
71832 /* "pysam/libcbcf.pyx":3667
71833 * self.remap = {}
71834 *
71835 * def __len__(self): # <<<<<<<<<<<<<<
71836 * return len(self.refs)
71837 *
71838 */
71839
71840 /* Python wrapper */
71841 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_9BaseIndex_3__len__(PyObject *__pyx_v_self); /*proto*/
71842 static Py_ssize_t __pyx_pw_5pysam_7libcbcf_9BaseIndex_3__len__(PyObject *__pyx_v_self) {
71843 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
71844 Py_ssize_t __pyx_r;
71845 __Pyx_RefNannyDeclarations
71846 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
71847 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
71848 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_2__len__(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
71849
71850 /* function exit code */
71851 __Pyx_RefNannyFinishContext();
71852 return __pyx_r;
71853 }
71854
71855 static Py_ssize_t __pyx_pf_5pysam_7libcbcf_9BaseIndex_2__len__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
71856 Py_ssize_t __pyx_r;
71857 __Pyx_TraceDeclarations
71858 __Pyx_RefNannyDeclarations
71859 PyObject *__pyx_t_1 = NULL;
71860 Py_ssize_t __pyx_t_2;
71861 int __pyx_lineno = 0;
71862 const char *__pyx_filename = NULL;
71863 int __pyx_clineno = 0;
71864 __Pyx_RefNannySetupContext("__len__", 1);
71865 __Pyx_TraceCall("__len__", __pyx_f[0], 3667, 0, __PYX_ERR(0, 3667, __pyx_L1_error));
71866
71867 /* "pysam/libcbcf.pyx":3668
71868 *
71869 * def __len__(self):
71870 * return len(self.refs) # <<<<<<<<<<<<<<
71871 *
71872 * def __bool__(self):
71873 */
71874 __pyx_t_1 = __pyx_v_self->refs;
71875 __Pyx_INCREF(__pyx_t_1);
71876 if (unlikely(__pyx_t_1 == Py_None)) {
71877 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
71878 __PYX_ERR(0, 3668, __pyx_L1_error)
71879 }
71880 __pyx_t_2 = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3668, __pyx_L1_error)
71881 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
71882 __pyx_r = __pyx_t_2;
71883 goto __pyx_L0;
71884
71885 /* "pysam/libcbcf.pyx":3667
71886 * self.remap = {}
71887 *
71888 * def __len__(self): # <<<<<<<<<<<<<<
71889 * return len(self.refs)
71890 *
71891 */
71892
71893 /* function exit code */
71894 __pyx_L1_error:;
71895 __Pyx_XDECREF(__pyx_t_1);
71896 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
71897 __pyx_r = -1;
71898 __pyx_L0:;
71899 __Pyx_TraceReturn(Py_None, 0);
71900 __Pyx_RefNannyFinishContext();
71901 return __pyx_r;
71902 }
71903
71904 /* "pysam/libcbcf.pyx":3670
71905 * return len(self.refs)
71906 *
71907 * def __bool__(self): # <<<<<<<<<<<<<<
71908 * return len(self.refs) != 0
71909 *
71910 */
71911
71912 /* Python wrapper */
71913 static int __pyx_pw_5pysam_7libcbcf_9BaseIndex_5__bool__(PyObject *__pyx_v_self); /*proto*/
71914 static int __pyx_pw_5pysam_7libcbcf_9BaseIndex_5__bool__(PyObject *__pyx_v_self) {
71915 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
71916 int __pyx_r;
71917 __Pyx_RefNannyDeclarations
71918 __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
71919 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
71920 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_4__bool__(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
71921
71922 /* function exit code */
71923 __Pyx_RefNannyFinishContext();
71924 return __pyx_r;
71925 }
71926
71927 static int __pyx_pf_5pysam_7libcbcf_9BaseIndex_4__bool__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
71928 int __pyx_r;
71929 __Pyx_TraceDeclarations
71930 __Pyx_RefNannyDeclarations
71931 PyObject *__pyx_t_1 = NULL;
71932 Py_ssize_t __pyx_t_2;
71933 int __pyx_lineno = 0;
71934 const char *__pyx_filename = NULL;
71935 int __pyx_clineno = 0;
71936 __Pyx_RefNannySetupContext("__bool__", 1);
71937 __Pyx_TraceCall("__bool__", __pyx_f[0], 3670, 0, __PYX_ERR(0, 3670, __pyx_L1_error));
71938
71939 /* "pysam/libcbcf.pyx":3671
71940 *
71941 * def __bool__(self):
71942 * return len(self.refs) != 0 # <<<<<<<<<<<<<<
71943 *
71944 * def __getitem__(self, key):
71945 */
71946 __pyx_t_1 = __pyx_v_self->refs;
71947 __Pyx_INCREF(__pyx_t_1);
71948 if (unlikely(__pyx_t_1 == Py_None)) {
71949 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
71950 __PYX_ERR(0, 3671, __pyx_L1_error)
71951 }
71952 __pyx_t_2 = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3671, __pyx_L1_error)
71953 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
71954 __pyx_r = (__pyx_t_2 != 0);
71955 goto __pyx_L0;
71956
71957 /* "pysam/libcbcf.pyx":3670
71958 * return len(self.refs)
71959 *
71960 * def __bool__(self): # <<<<<<<<<<<<<<
71961 * return len(self.refs) != 0
71962 *
71963 */
71964
71965 /* function exit code */
71966 __pyx_L1_error:;
71967 __Pyx_XDECREF(__pyx_t_1);
71968 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
71969 __pyx_r = -1;
71970 __pyx_L0:;
71971 __Pyx_TraceReturn(Py_None, 0);
71972 __Pyx_RefNannyFinishContext();
71973 return __pyx_r;
71974 }
71975
71976 /* "pysam/libcbcf.pyx":3673
71977 * return len(self.refs) != 0
71978 *
71979 * def __getitem__(self, key): # <<<<<<<<<<<<<<
71980 * if isinstance(key, int):
71981 * return self.refs[key]
71982 */
71983
71984 /* Python wrapper */
71985 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
71986 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
71987 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
71988 PyObject *__pyx_r = 0;
71989 __Pyx_RefNannyDeclarations
71990 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
71991 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
71992 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_6__getitem__(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self), ((PyObject *)__pyx_v_key));
71993
71994 /* function exit code */
71995 __Pyx_RefNannyFinishContext();
71996 return __pyx_r;
71997 }
71998
71999 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_6__getitem__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_key) {
72000 PyObject *__pyx_r = NULL;
72001 __Pyx_TraceDeclarations
72002 __Pyx_RefNannyDeclarations
72003 int __pyx_t_1;
72004 PyObject *__pyx_t_2 = NULL;
72005 int __pyx_lineno = 0;
72006 const char *__pyx_filename = NULL;
72007 int __pyx_clineno = 0;
72008 __Pyx_RefNannySetupContext("__getitem__", 1);
72009 __Pyx_TraceCall("__getitem__", __pyx_f[0], 3673, 0, __PYX_ERR(0, 3673, __pyx_L1_error));
72010
72011 /* "pysam/libcbcf.pyx":3674
72012 *
72013 * def __getitem__(self, key):
72014 * if isinstance(key, int): # <<<<<<<<<<<<<<
72015 * return self.refs[key]
72016 * else:
72017 */
72018 __pyx_t_1 = PyInt_Check(__pyx_v_key);
72019 if (__pyx_t_1) {
72020
72021 /* "pysam/libcbcf.pyx":3675
72022 * def __getitem__(self, key):
72023 * if isinstance(key, int):
72024 * return self.refs[key] # <<<<<<<<<<<<<<
72025 * else:
72026 * return self.refmap[key]
72027 */
72028 __Pyx_XDECREF(__pyx_r);
72029 if (unlikely(__pyx_v_self->refs == Py_None)) {
72030 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
72031 __PYX_ERR(0, 3675, __pyx_L1_error)
72032 }
72033 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->refs, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3675, __pyx_L1_error)
72034 __Pyx_GOTREF(__pyx_t_2);
72035 __pyx_r = __pyx_t_2;
72036 __pyx_t_2 = 0;
72037 goto __pyx_L0;
72038
72039 /* "pysam/libcbcf.pyx":3674
72040 *
72041 * def __getitem__(self, key):
72042 * if isinstance(key, int): # <<<<<<<<<<<<<<
72043 * return self.refs[key]
72044 * else:
72045 */
72046 }
72047
72048 /* "pysam/libcbcf.pyx":3677
72049 * return self.refs[key]
72050 * else:
72051 * return self.refmap[key] # <<<<<<<<<<<<<<
72052 *
72053 * def __iter__(self):
72054 */
72055 /*else*/ {
72056 __Pyx_XDECREF(__pyx_r);
72057 if (unlikely(__pyx_v_self->refmap == Py_None)) {
72058 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
72059 __PYX_ERR(0, 3677, __pyx_L1_error)
72060 }
72061 __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->refmap, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3677, __pyx_L1_error)
72062 __Pyx_GOTREF(__pyx_t_2);
72063 __pyx_r = __pyx_t_2;
72064 __pyx_t_2 = 0;
72065 goto __pyx_L0;
72066 }
72067
72068 /* "pysam/libcbcf.pyx":3673
72069 * return len(self.refs) != 0
72070 *
72071 * def __getitem__(self, key): # <<<<<<<<<<<<<<
72072 * if isinstance(key, int):
72073 * return self.refs[key]
72074 */
72075
72076 /* function exit code */
72077 __pyx_L1_error:;
72078 __Pyx_XDECREF(__pyx_t_2);
72079 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
72080 __pyx_r = NULL;
72081 __pyx_L0:;
72082 __Pyx_XGIVEREF(__pyx_r);
72083 __Pyx_TraceReturn(__pyx_r, 0);
72084 __Pyx_RefNannyFinishContext();
72085 return __pyx_r;
72086 }
72087
72088 /* "pysam/libcbcf.pyx":3679
72089 * return self.refmap[key]
72090 *
72091 * def __iter__(self): # <<<<<<<<<<<<<<
72092 * return iter(self.refs)
72093 *
72094 */
72095
72096 /* Python wrapper */
72097 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_9__iter__(PyObject *__pyx_v_self); /*proto*/
72098 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_9__iter__(PyObject *__pyx_v_self) {
72099 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
72100 PyObject *__pyx_r = 0;
72101 __Pyx_RefNannyDeclarations
72102 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
72103 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
72104 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_8__iter__(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
72105
72106 /* function exit code */
72107 __Pyx_RefNannyFinishContext();
72108 return __pyx_r;
72109 }
72110
72111 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_8__iter__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
72112 PyObject *__pyx_r = NULL;
72113 __Pyx_TraceDeclarations
72114 __Pyx_RefNannyDeclarations
72115 PyObject *__pyx_t_1 = NULL;
72116 PyObject *__pyx_t_2 = NULL;
72117 int __pyx_lineno = 0;
72118 const char *__pyx_filename = NULL;
72119 int __pyx_clineno = 0;
72120 __Pyx_RefNannySetupContext("__iter__", 1);
72121 __Pyx_TraceCall("__iter__", __pyx_f[0], 3679, 0, __PYX_ERR(0, 3679, __pyx_L1_error));
72122
72123 /* "pysam/libcbcf.pyx":3680
72124 *
72125 * def __iter__(self):
72126 * return iter(self.refs) # <<<<<<<<<<<<<<
72127 *
72128 * def get(self, key, default=None):
72129 */
72130 __Pyx_XDECREF(__pyx_r);
72131 __pyx_t_1 = __pyx_v_self->refs;
72132 __Pyx_INCREF(__pyx_t_1);
72133 __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3680, __pyx_L1_error)
72134 __Pyx_GOTREF(__pyx_t_2);
72135 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
72136 __pyx_r = __pyx_t_2;
72137 __pyx_t_2 = 0;
72138 goto __pyx_L0;
72139
72140 /* "pysam/libcbcf.pyx":3679
72141 * return self.refmap[key]
72142 *
72143 * def __iter__(self): # <<<<<<<<<<<<<<
72144 * return iter(self.refs)
72145 *
72146 */
72147
72148 /* function exit code */
72149 __pyx_L1_error:;
72150 __Pyx_XDECREF(__pyx_t_1);
72151 __Pyx_XDECREF(__pyx_t_2);
72152 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
72153 __pyx_r = NULL;
72154 __pyx_L0:;
72155 __Pyx_XGIVEREF(__pyx_r);
72156 __Pyx_TraceReturn(__pyx_r, 0);
72157 __Pyx_RefNannyFinishContext();
72158 return __pyx_r;
72159 }
72160
72161 /* "pysam/libcbcf.pyx":3682
72162 * return iter(self.refs)
72163 *
72164 * def get(self, key, default=None): # <<<<<<<<<<<<<<
72165 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
72166 * try:
72167 */
72168
72169 /* Python wrapper */
72170 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_11get(PyObject *__pyx_v_self,
72171 #if CYTHON_METH_FASTCALL
72172 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
72173 #else
72174 PyObject *__pyx_args, PyObject *__pyx_kwds
72175 #endif
72176 ); /*proto*/
72177 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_10get, "BaseIndex.get(self, key, default=None)\nD.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.");
72178 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_11get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_11get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_10get};
72179 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_11get(PyObject *__pyx_v_self,
72180 #if CYTHON_METH_FASTCALL
72181 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
72182 #else
72183 PyObject *__pyx_args, PyObject *__pyx_kwds
72184 #endif
72185 ) {
72186 PyObject *__pyx_v_key = 0;
72187 PyObject *__pyx_v_default = 0;
72188 #if !CYTHON_METH_FASTCALL
72189 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
72190 #endif
72191 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
72192 PyObject* values[2] = {0,0};
72193 int __pyx_lineno = 0;
72194 const char *__pyx_filename = NULL;
72195 int __pyx_clineno = 0;
72196 PyObject *__pyx_r = 0;
72197 __Pyx_RefNannyDeclarations
72198 __Pyx_RefNannySetupContext("get (wrapper)", 0);
72199 #if !CYTHON_METH_FASTCALL
72200 #if CYTHON_ASSUME_SAFE_MACROS
72201 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
72202 #else
72203 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
72204 #endif
72205 #endif
72206 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
72207 {
72208 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
72209 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
72210 if (__pyx_kwds) {
72211 Py_ssize_t kw_args;
72212 switch (__pyx_nargs) {
72213 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
72214 CYTHON_FALLTHROUGH;
72215 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
72216 CYTHON_FALLTHROUGH;
72217 case 0: break;
72218 default: goto __pyx_L5_argtuple_error;
72219 }
72220 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
72221 switch (__pyx_nargs) {
72222 case 0:
72223 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
72224 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
72225 kw_args--;
72226 }
72227 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3682, __pyx_L3_error)
72228 else goto __pyx_L5_argtuple_error;
72229 CYTHON_FALLTHROUGH;
72230 case 1:
72231 if (kw_args > 0) {
72232 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
72233 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
72234 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3682, __pyx_L3_error)
72235 }
72236 }
72237 if (unlikely(kw_args > 0)) {
72238 const Py_ssize_t kwd_pos_args = __pyx_nargs;
72239 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 3682, __pyx_L3_error)
72240 }
72241 } else {
72242 switch (__pyx_nargs) {
72243 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
72244 CYTHON_FALLTHROUGH;
72245 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
72246 break;
72247 default: goto __pyx_L5_argtuple_error;
72248 }
72249 }
72250 __pyx_v_key = values[0];
72251 __pyx_v_default = values[1];
72252 }
72253 goto __pyx_L6_skip;
72254 __pyx_L5_argtuple_error:;
72255 __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3682, __pyx_L3_error)
72256 __pyx_L6_skip:;
72257 goto __pyx_L4_argument_unpacking_done;
72258 __pyx_L3_error:;
72259 {
72260 Py_ssize_t __pyx_temp;
72261 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
72262 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
72263 }
72264 }
72265 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
72266 __Pyx_RefNannyFinishContext();
72267 return NULL;
72268 __pyx_L4_argument_unpacking_done:;
72269 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_10get(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
72270
72271 /* function exit code */
72272 {
72273 Py_ssize_t __pyx_temp;
72274 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
72275 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
72276 }
72277 }
72278 __Pyx_RefNannyFinishContext();
72279 return __pyx_r;
72280 }
72281
72282 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_10get(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
72283 PyObject *__pyx_r = NULL;
72284 __Pyx_TraceDeclarations
72285 __Pyx_RefNannyDeclarations
72286 PyObject *__pyx_t_1 = NULL;
72287 PyObject *__pyx_t_2 = NULL;
72288 PyObject *__pyx_t_3 = NULL;
72289 PyObject *__pyx_t_4 = NULL;
72290 int __pyx_t_5;
72291 PyObject *__pyx_t_6 = NULL;
72292 PyObject *__pyx_t_7 = NULL;
72293 int __pyx_lineno = 0;
72294 const char *__pyx_filename = NULL;
72295 int __pyx_clineno = 0;
72296 __Pyx_TraceFrameInit(__pyx_codeobj__198)
72297 __Pyx_RefNannySetupContext("get", 1);
72298 __Pyx_TraceCall("get", __pyx_f[0], 3682, 0, __PYX_ERR(0, 3682, __pyx_L1_error));
72299
72300 /* "pysam/libcbcf.pyx":3684
72301 * def get(self, key, default=None):
72302 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
72303 * try: # <<<<<<<<<<<<<<
72304 * return self[key]
72305 * except KeyError:
72306 */
72307 {
72308 __Pyx_PyThreadState_declare
72309 __Pyx_PyThreadState_assign
72310 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
72311 __Pyx_XGOTREF(__pyx_t_1);
72312 __Pyx_XGOTREF(__pyx_t_2);
72313 __Pyx_XGOTREF(__pyx_t_3);
72314 /*try:*/ {
72315
72316 /* "pysam/libcbcf.pyx":3685
72317 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
72318 * try:
72319 * return self[key] # <<<<<<<<<<<<<<
72320 * except KeyError:
72321 * return default
72322 */
72323 __Pyx_XDECREF(__pyx_r);
72324 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3685, __pyx_L3_error)
72325 __Pyx_GOTREF(__pyx_t_4);
72326 __pyx_r = __pyx_t_4;
72327 __pyx_t_4 = 0;
72328 goto __pyx_L7_try_return;
72329
72330 /* "pysam/libcbcf.pyx":3684
72331 * def get(self, key, default=None):
72332 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
72333 * try: # <<<<<<<<<<<<<<
72334 * return self[key]
72335 * except KeyError:
72336 */
72337 }
72338 __pyx_L3_error:;
72339 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
72340
72341 /* "pysam/libcbcf.pyx":3686
72342 * try:
72343 * return self[key]
72344 * except KeyError: # <<<<<<<<<<<<<<
72345 * return default
72346 *
72347 */
72348 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
72349 if (__pyx_t_5) {
72350 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
72351 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3686, __pyx_L5_except_error)
72352 __Pyx_XGOTREF(__pyx_t_4);
72353 __Pyx_XGOTREF(__pyx_t_6);
72354 __Pyx_XGOTREF(__pyx_t_7);
72355
72356 /* "pysam/libcbcf.pyx":3687
72357 * return self[key]
72358 * except KeyError:
72359 * return default # <<<<<<<<<<<<<<
72360 *
72361 * def __contains__(self, key):
72362 */
72363 __Pyx_XDECREF(__pyx_r);
72364 __Pyx_INCREF(__pyx_v_default);
72365 __pyx_r = __pyx_v_default;
72366 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72367 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72368 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
72369 goto __pyx_L6_except_return;
72370 }
72371 goto __pyx_L5_except_error;
72372
72373 /* "pysam/libcbcf.pyx":3684
72374 * def get(self, key, default=None):
72375 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
72376 * try: # <<<<<<<<<<<<<<
72377 * return self[key]
72378 * except KeyError:
72379 */
72380 __pyx_L5_except_error:;
72381 __Pyx_XGIVEREF(__pyx_t_1);
72382 __Pyx_XGIVEREF(__pyx_t_2);
72383 __Pyx_XGIVEREF(__pyx_t_3);
72384 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
72385 goto __pyx_L1_error;
72386 __pyx_L7_try_return:;
72387 __Pyx_XGIVEREF(__pyx_t_1);
72388 __Pyx_XGIVEREF(__pyx_t_2);
72389 __Pyx_XGIVEREF(__pyx_t_3);
72390 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
72391 goto __pyx_L0;
72392 __pyx_L6_except_return:;
72393 __Pyx_XGIVEREF(__pyx_t_1);
72394 __Pyx_XGIVEREF(__pyx_t_2);
72395 __Pyx_XGIVEREF(__pyx_t_3);
72396 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
72397 goto __pyx_L0;
72398 }
72399
72400 /* "pysam/libcbcf.pyx":3682
72401 * return iter(self.refs)
72402 *
72403 * def get(self, key, default=None): # <<<<<<<<<<<<<<
72404 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
72405 * try:
72406 */
72407
72408 /* function exit code */
72409 __pyx_L1_error:;
72410 __Pyx_XDECREF(__pyx_t_4);
72411 __Pyx_XDECREF(__pyx_t_6);
72412 __Pyx_XDECREF(__pyx_t_7);
72413 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
72414 __pyx_r = NULL;
72415 __pyx_L0:;
72416 __Pyx_XGIVEREF(__pyx_r);
72417 __Pyx_TraceReturn(__pyx_r, 0);
72418 __Pyx_RefNannyFinishContext();
72419 return __pyx_r;
72420 }
72421
72422 /* "pysam/libcbcf.pyx":3689
72423 * return default
72424 *
72425 * def __contains__(self, key): # <<<<<<<<<<<<<<
72426 * try:
72427 * self[key]
72428 */
72429
72430 /* Python wrapper */
72431 static int __pyx_pw_5pysam_7libcbcf_9BaseIndex_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
72432 static int __pyx_pw_5pysam_7libcbcf_9BaseIndex_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
72433 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
72434 int __pyx_r;
72435 __Pyx_RefNannyDeclarations
72436 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
72437 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
72438 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_12__contains__(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self), ((PyObject *)__pyx_v_key));
72439
72440 /* function exit code */
72441 __Pyx_RefNannyFinishContext();
72442 return __pyx_r;
72443 }
72444
72445 static int __pyx_pf_5pysam_7libcbcf_9BaseIndex_12__contains__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_key) {
72446 int __pyx_r;
72447 __Pyx_TraceDeclarations
72448 __Pyx_RefNannyDeclarations
72449 PyObject *__pyx_t_1 = NULL;
72450 PyObject *__pyx_t_2 = NULL;
72451 PyObject *__pyx_t_3 = NULL;
72452 PyObject *__pyx_t_4 = NULL;
72453 int __pyx_t_5;
72454 PyObject *__pyx_t_6 = NULL;
72455 PyObject *__pyx_t_7 = NULL;
72456 int __pyx_lineno = 0;
72457 const char *__pyx_filename = NULL;
72458 int __pyx_clineno = 0;
72459 __Pyx_RefNannySetupContext("__contains__", 1);
72460 __Pyx_TraceCall("__contains__", __pyx_f[0], 3689, 0, __PYX_ERR(0, 3689, __pyx_L1_error));
72461
72462 /* "pysam/libcbcf.pyx":3690
72463 *
72464 * def __contains__(self, key):
72465 * try: # <<<<<<<<<<<<<<
72466 * self[key]
72467 * except KeyError:
72468 */
72469 {
72470 __Pyx_PyThreadState_declare
72471 __Pyx_PyThreadState_assign
72472 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
72473 __Pyx_XGOTREF(__pyx_t_1);
72474 __Pyx_XGOTREF(__pyx_t_2);
72475 __Pyx_XGOTREF(__pyx_t_3);
72476 /*try:*/ {
72477
72478 /* "pysam/libcbcf.pyx":3691
72479 * def __contains__(self, key):
72480 * try:
72481 * self[key] # <<<<<<<<<<<<<<
72482 * except KeyError:
72483 * return False
72484 */
72485 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3691, __pyx_L3_error)
72486 __Pyx_GOTREF(__pyx_t_4);
72487 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72488
72489 /* "pysam/libcbcf.pyx":3690
72490 *
72491 * def __contains__(self, key):
72492 * try: # <<<<<<<<<<<<<<
72493 * self[key]
72494 * except KeyError:
72495 */
72496 }
72497
72498 /* "pysam/libcbcf.pyx":3695
72499 * return False
72500 * else:
72501 * return True # <<<<<<<<<<<<<<
72502 *
72503 * def iterkeys(self):
72504 */
72505 /*else:*/ {
72506 __pyx_r = 1;
72507 goto __pyx_L6_except_return;
72508 }
72509 __pyx_L3_error:;
72510 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
72511
72512 /* "pysam/libcbcf.pyx":3692
72513 * try:
72514 * self[key]
72515 * except KeyError: # <<<<<<<<<<<<<<
72516 * return False
72517 * else:
72518 */
72519 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
72520 if (__pyx_t_5) {
72521 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
72522 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3692, __pyx_L5_except_error)
72523 __Pyx_XGOTREF(__pyx_t_4);
72524 __Pyx_XGOTREF(__pyx_t_6);
72525 __Pyx_XGOTREF(__pyx_t_7);
72526
72527 /* "pysam/libcbcf.pyx":3693
72528 * self[key]
72529 * except KeyError:
72530 * return False # <<<<<<<<<<<<<<
72531 * else:
72532 * return True
72533 */
72534 __pyx_r = 0;
72535 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72536 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72537 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
72538 goto __pyx_L6_except_return;
72539 }
72540 goto __pyx_L5_except_error;
72541
72542 /* "pysam/libcbcf.pyx":3690
72543 *
72544 * def __contains__(self, key):
72545 * try: # <<<<<<<<<<<<<<
72546 * self[key]
72547 * except KeyError:
72548 */
72549 __pyx_L5_except_error:;
72550 __Pyx_XGIVEREF(__pyx_t_1);
72551 __Pyx_XGIVEREF(__pyx_t_2);
72552 __Pyx_XGIVEREF(__pyx_t_3);
72553 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
72554 goto __pyx_L1_error;
72555 __pyx_L6_except_return:;
72556 __Pyx_XGIVEREF(__pyx_t_1);
72557 __Pyx_XGIVEREF(__pyx_t_2);
72558 __Pyx_XGIVEREF(__pyx_t_3);
72559 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
72560 goto __pyx_L0;
72561 }
72562
72563 /* "pysam/libcbcf.pyx":3689
72564 * return default
72565 *
72566 * def __contains__(self, key): # <<<<<<<<<<<<<<
72567 * try:
72568 * self[key]
72569 */
72570
72571 /* function exit code */
72572 __pyx_L1_error:;
72573 __Pyx_XDECREF(__pyx_t_4);
72574 __Pyx_XDECREF(__pyx_t_6);
72575 __Pyx_XDECREF(__pyx_t_7);
72576 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
72577 __pyx_r = -1;
72578 __pyx_L0:;
72579 __Pyx_TraceReturn(Py_None, 0);
72580 __Pyx_RefNannyFinishContext();
72581 return __pyx_r;
72582 }
72583
72584 /* "pysam/libcbcf.pyx":3697
72585 * return True
72586 *
72587 * def iterkeys(self): # <<<<<<<<<<<<<<
72588 * """D.iterkeys() -> an iterator over the keys of D"""
72589 * return iter(self)
72590 */
72591
72592 /* Python wrapper */
72593 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_15iterkeys(PyObject *__pyx_v_self,
72594 #if CYTHON_METH_FASTCALL
72595 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
72596 #else
72597 PyObject *__pyx_args, PyObject *__pyx_kwds
72598 #endif
72599 ); /*proto*/
72600 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_14iterkeys, "BaseIndex.iterkeys(self)\nD.iterkeys() -> an iterator over the keys of D");
72601 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_15iterkeys = {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_15iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_14iterkeys};
72602 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_15iterkeys(PyObject *__pyx_v_self,
72603 #if CYTHON_METH_FASTCALL
72604 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
72605 #else
72606 PyObject *__pyx_args, PyObject *__pyx_kwds
72607 #endif
72608 ) {
72609 #if !CYTHON_METH_FASTCALL
72610 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
72611 #endif
72612 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
72613 PyObject *__pyx_r = 0;
72614 __Pyx_RefNannyDeclarations
72615 __Pyx_RefNannySetupContext("iterkeys (wrapper)", 0);
72616 #if !CYTHON_METH_FASTCALL
72617 #if CYTHON_ASSUME_SAFE_MACROS
72618 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
72619 #else
72620 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
72621 #endif
72622 #endif
72623 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
72624 if (unlikely(__pyx_nargs > 0)) {
72625 __Pyx_RaiseArgtupleInvalid("iterkeys", 1, 0, 0, __pyx_nargs); return NULL;}
72626 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iterkeys", 0))) return NULL;
72627 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_14iterkeys(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
72628
72629 /* function exit code */
72630 __Pyx_RefNannyFinishContext();
72631 return __pyx_r;
72632 }
72633
72634 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_14iterkeys(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
72635 PyObject *__pyx_r = NULL;
72636 __Pyx_TraceDeclarations
72637 __Pyx_RefNannyDeclarations
72638 PyObject *__pyx_t_1 = NULL;
72639 int __pyx_lineno = 0;
72640 const char *__pyx_filename = NULL;
72641 int __pyx_clineno = 0;
72642 __Pyx_TraceFrameInit(__pyx_codeobj__199)
72643 __Pyx_RefNannySetupContext("iterkeys", 1);
72644 __Pyx_TraceCall("iterkeys", __pyx_f[0], 3697, 0, __PYX_ERR(0, 3697, __pyx_L1_error));
72645
72646 /* "pysam/libcbcf.pyx":3699
72647 * def iterkeys(self):
72648 * """D.iterkeys() -> an iterator over the keys of D"""
72649 * return iter(self) # <<<<<<<<<<<<<<
72650 *
72651 * def itervalues(self):
72652 */
72653 __Pyx_XDECREF(__pyx_r);
72654 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3699, __pyx_L1_error)
72655 __Pyx_GOTREF(__pyx_t_1);
72656 __pyx_r = __pyx_t_1;
72657 __pyx_t_1 = 0;
72658 goto __pyx_L0;
72659
72660 /* "pysam/libcbcf.pyx":3697
72661 * return True
72662 *
72663 * def iterkeys(self): # <<<<<<<<<<<<<<
72664 * """D.iterkeys() -> an iterator over the keys of D"""
72665 * return iter(self)
72666 */
72667
72668 /* function exit code */
72669 __pyx_L1_error:;
72670 __Pyx_XDECREF(__pyx_t_1);
72671 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
72672 __pyx_r = NULL;
72673 __pyx_L0:;
72674 __Pyx_XGIVEREF(__pyx_r);
72675 __Pyx_TraceReturn(__pyx_r, 0);
72676 __Pyx_RefNannyFinishContext();
72677 return __pyx_r;
72678 }
72679 static PyObject *__pyx_gb_5pysam_7libcbcf_9BaseIndex_18generator26(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
72680
72681 /* "pysam/libcbcf.pyx":3701
72682 * return iter(self)
72683 *
72684 * def itervalues(self): # <<<<<<<<<<<<<<
72685 * """D.itervalues() -> an iterator over the values of D"""
72686 * for key in self:
72687 */
72688
72689 /* Python wrapper */
72690 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_17itervalues(PyObject *__pyx_v_self,
72691 #if CYTHON_METH_FASTCALL
72692 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
72693 #else
72694 PyObject *__pyx_args, PyObject *__pyx_kwds
72695 #endif
72696 ); /*proto*/
72697 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_16itervalues, "BaseIndex.itervalues(self)\nD.itervalues() -> an iterator over the values of D");
72698 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_17itervalues = {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_17itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_16itervalues};
72699 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_17itervalues(PyObject *__pyx_v_self,
72700 #if CYTHON_METH_FASTCALL
72701 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
72702 #else
72703 PyObject *__pyx_args, PyObject *__pyx_kwds
72704 #endif
72705 ) {
72706 #if !CYTHON_METH_FASTCALL
72707 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
72708 #endif
72709 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
72710 PyObject *__pyx_r = 0;
72711 __Pyx_RefNannyDeclarations
72712 __Pyx_RefNannySetupContext("itervalues (wrapper)", 0);
72713 #if !CYTHON_METH_FASTCALL
72714 #if CYTHON_ASSUME_SAFE_MACROS
72715 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
72716 #else
72717 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
72718 #endif
72719 #endif
72720 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
72721 if (unlikely(__pyx_nargs > 0)) {
72722 __Pyx_RaiseArgtupleInvalid("itervalues", 1, 0, 0, __pyx_nargs); return NULL;}
72723 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "itervalues", 0))) return NULL;
72724 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_16itervalues(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
72725
72726 /* function exit code */
72727 __Pyx_RefNannyFinishContext();
72728 return __pyx_r;
72729 }
72730
72731 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_16itervalues(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
72732 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *__pyx_cur_scope;
72733 PyObject *__pyx_r = NULL;
72734 __Pyx_RefNannyDeclarations
72735 int __pyx_lineno = 0;
72736 const char *__pyx_filename = NULL;
72737 int __pyx_clineno = 0;
72738 __Pyx_RefNannySetupContext("itervalues", 0);
72739 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_36_itervalues(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues, __pyx_empty_tuple, NULL);
72740 if (unlikely(!__pyx_cur_scope)) {
72741 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *)Py_None);
72742 __Pyx_INCREF(Py_None);
72743 __PYX_ERR(0, 3701, __pyx_L1_error)
72744 } else {
72745 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
72746 }
72747 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
72748 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
72749 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
72750 {
72751 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_9BaseIndex_18generator26, __pyx_codeobj__200, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_BaseIndex_itervalues, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 3701, __pyx_L1_error)
72752 __Pyx_DECREF(__pyx_cur_scope);
72753 __Pyx_RefNannyFinishContext();
72754 return (PyObject *) gen;
72755 }
72756
72757 /* function exit code */
72758 __pyx_L1_error:;
72759 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
72760 __pyx_r = NULL;
72761 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
72762 __Pyx_XGIVEREF(__pyx_r);
72763 __Pyx_RefNannyFinishContext();
72764 return __pyx_r;
72765 }
72766
72767 static PyObject *__pyx_gb_5pysam_7libcbcf_9BaseIndex_18generator26(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
72768 {
72769 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *)__pyx_generator->closure);
72770 PyObject *__pyx_r = NULL;
72771 __Pyx_TraceDeclarations
72772 PyObject *__pyx_t_1 = NULL;
72773 Py_ssize_t __pyx_t_2;
72774 PyObject *(*__pyx_t_3)(PyObject *);
72775 PyObject *__pyx_t_4 = NULL;
72776 int __pyx_lineno = 0;
72777 const char *__pyx_filename = NULL;
72778 int __pyx_clineno = 0;
72779 __Pyx_RefNannyDeclarations
72780 __Pyx_RefNannySetupContext("itervalues", 0);
72781 __Pyx_TraceFrameInit(__pyx_codeobj__200)
72782 __Pyx_TraceCall("itervalues", __pyx_f[0], 3701, 0, __PYX_ERR(0, 3701, __pyx_L1_error));
72783 switch (__pyx_generator->resume_label) {
72784 case 0: goto __pyx_L3_first_run;
72785 case 1: goto __pyx_L6_resume_from_yield;
72786 default: /* CPython raises the right error here */
72787 __Pyx_TraceReturn(Py_None, 0);
72788 __Pyx_RefNannyFinishContext();
72789 return NULL;
72790 }
72791 __pyx_L3_first_run:;
72792 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3701, __pyx_L1_error)
72793
72794 /* "pysam/libcbcf.pyx":3703
72795 * def itervalues(self):
72796 * """D.itervalues() -> an iterator over the values of D"""
72797 * for key in self: # <<<<<<<<<<<<<<
72798 * yield self[key]
72799 *
72800 */
72801 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
72802 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
72803 __pyx_t_2 = 0;
72804 __pyx_t_3 = NULL;
72805 } else {
72806 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3703, __pyx_L1_error)
72807 __Pyx_GOTREF(__pyx_t_1);
72808 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3703, __pyx_L1_error)
72809 }
72810 for (;;) {
72811 if (likely(!__pyx_t_3)) {
72812 if (likely(PyList_CheckExact(__pyx_t_1))) {
72813 {
72814 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
72815 #if !CYTHON_ASSUME_SAFE_MACROS
72816 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3703, __pyx_L1_error)
72817 #endif
72818 if (__pyx_t_2 >= __pyx_temp) break;
72819 }
72820 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
72821 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3703, __pyx_L1_error)
72822 #else
72823 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3703, __pyx_L1_error)
72824 __Pyx_GOTREF(__pyx_t_4);
72825 #endif
72826 } else {
72827 {
72828 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
72829 #if !CYTHON_ASSUME_SAFE_MACROS
72830 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3703, __pyx_L1_error)
72831 #endif
72832 if (__pyx_t_2 >= __pyx_temp) break;
72833 }
72834 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
72835 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3703, __pyx_L1_error)
72836 #else
72837 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3703, __pyx_L1_error)
72838 __Pyx_GOTREF(__pyx_t_4);
72839 #endif
72840 }
72841 } else {
72842 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
72843 if (unlikely(!__pyx_t_4)) {
72844 PyObject* exc_type = PyErr_Occurred();
72845 if (exc_type) {
72846 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
72847 else __PYX_ERR(0, 3703, __pyx_L1_error)
72848 }
72849 break;
72850 }
72851 __Pyx_GOTREF(__pyx_t_4);
72852 }
72853 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
72854 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
72855 __Pyx_GIVEREF(__pyx_t_4);
72856 __pyx_t_4 = 0;
72857
72858 /* "pysam/libcbcf.pyx":3704
72859 * """D.itervalues() -> an iterator over the values of D"""
72860 * for key in self:
72861 * yield self[key] # <<<<<<<<<<<<<<
72862 *
72863 * def iteritems(self):
72864 */
72865 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3704, __pyx_L1_error)
72866 __Pyx_GOTREF(__pyx_t_4);
72867 __pyx_r = __pyx_t_4;
72868 __pyx_t_4 = 0;
72869 __Pyx_XGIVEREF(__pyx_t_1);
72870 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
72871 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
72872 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
72873 __Pyx_XGIVEREF(__pyx_r);
72874 __Pyx_TraceReturn(__pyx_r, 0);
72875 __Pyx_RefNannyFinishContext();
72876 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
72877 /* return from generator, yielding value */
72878 __pyx_generator->resume_label = 1;
72879 return __pyx_r;
72880 __pyx_L6_resume_from_yield:;
72881 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
72882 __pyx_cur_scope->__pyx_t_0 = 0;
72883 __Pyx_XGOTREF(__pyx_t_1);
72884 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
72885 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
72886 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3704, __pyx_L1_error)
72887
72888 /* "pysam/libcbcf.pyx":3703
72889 * def itervalues(self):
72890 * """D.itervalues() -> an iterator over the values of D"""
72891 * for key in self: # <<<<<<<<<<<<<<
72892 * yield self[key]
72893 *
72894 */
72895 }
72896 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
72897 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
72898
72899 /* "pysam/libcbcf.pyx":3701
72900 * return iter(self)
72901 *
72902 * def itervalues(self): # <<<<<<<<<<<<<<
72903 * """D.itervalues() -> an iterator over the values of D"""
72904 * for key in self:
72905 */
72906
72907 /* function exit code */
72908 PyErr_SetNone(PyExc_StopIteration);
72909 goto __pyx_L0;
72910 __pyx_L1_error:;
72911 __Pyx_Generator_Replace_StopIteration(0);
72912 __Pyx_XDECREF(__pyx_t_1);
72913 __Pyx_XDECREF(__pyx_t_4);
72914 __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
72915 __pyx_L0:;
72916 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
72917 #if !CYTHON_USE_EXC_INFO_STACK
72918 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
72919 #endif
72920 __pyx_generator->resume_label = -1;
72921 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
72922 __Pyx_TraceReturn(__pyx_r, 0);
72923 __Pyx_RefNannyFinishContext();
72924 return __pyx_r;
72925 }
72926 static PyObject *__pyx_gb_5pysam_7libcbcf_9BaseIndex_21generator27(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
72927
72928 /* "pysam/libcbcf.pyx":3706
72929 * yield self[key]
72930 *
72931 * def iteritems(self): # <<<<<<<<<<<<<<
72932 * """D.iteritems() -> an iterator over the (key, value) items of D"""
72933 * for key in self:
72934 */
72935
72936 /* Python wrapper */
72937 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_20iteritems(PyObject *__pyx_v_self,
72938 #if CYTHON_METH_FASTCALL
72939 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
72940 #else
72941 PyObject *__pyx_args, PyObject *__pyx_kwds
72942 #endif
72943 ); /*proto*/
72944 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_19iteritems, "BaseIndex.iteritems(self)\nD.iteritems() -> an iterator over the (key, value) items of D");
72945 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_20iteritems = {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_20iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_19iteritems};
72946 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_20iteritems(PyObject *__pyx_v_self,
72947 #if CYTHON_METH_FASTCALL
72948 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
72949 #else
72950 PyObject *__pyx_args, PyObject *__pyx_kwds
72951 #endif
72952 ) {
72953 #if !CYTHON_METH_FASTCALL
72954 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
72955 #endif
72956 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
72957 PyObject *__pyx_r = 0;
72958 __Pyx_RefNannyDeclarations
72959 __Pyx_RefNannySetupContext("iteritems (wrapper)", 0);
72960 #if !CYTHON_METH_FASTCALL
72961 #if CYTHON_ASSUME_SAFE_MACROS
72962 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
72963 #else
72964 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
72965 #endif
72966 #endif
72967 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
72968 if (unlikely(__pyx_nargs > 0)) {
72969 __Pyx_RaiseArgtupleInvalid("iteritems", 1, 0, 0, __pyx_nargs); return NULL;}
72970 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "iteritems", 0))) return NULL;
72971 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_19iteritems(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
72972
72973 /* function exit code */
72974 __Pyx_RefNannyFinishContext();
72975 return __pyx_r;
72976 }
72977
72978 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_19iteritems(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
72979 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *__pyx_cur_scope;
72980 PyObject *__pyx_r = NULL;
72981 __Pyx_RefNannyDeclarations
72982 int __pyx_lineno = 0;
72983 const char *__pyx_filename = NULL;
72984 int __pyx_clineno = 0;
72985 __Pyx_RefNannySetupContext("iteritems", 0);
72986 __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_37_iteritems(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems, __pyx_empty_tuple, NULL);
72987 if (unlikely(!__pyx_cur_scope)) {
72988 __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *)Py_None);
72989 __Pyx_INCREF(Py_None);
72990 __PYX_ERR(0, 3706, __pyx_L1_error)
72991 } else {
72992 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
72993 }
72994 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
72995 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
72996 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
72997 {
72998 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcbcf_9BaseIndex_21generator27, __pyx_codeobj__201, (PyObject *) __pyx_cur_scope, __pyx_n_s_iteritems, __pyx_n_s_BaseIndex_iteritems, __pyx_n_s_pysam_libcbcf); if (unlikely(!gen)) __PYX_ERR(0, 3706, __pyx_L1_error)
72999 __Pyx_DECREF(__pyx_cur_scope);
73000 __Pyx_RefNannyFinishContext();
73001 return (PyObject *) gen;
73002 }
73003
73004 /* function exit code */
73005 __pyx_L1_error:;
73006 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
73007 __pyx_r = NULL;
73008 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
73009 __Pyx_XGIVEREF(__pyx_r);
73010 __Pyx_RefNannyFinishContext();
73011 return __pyx_r;
73012 }
73013
73014 static PyObject *__pyx_gb_5pysam_7libcbcf_9BaseIndex_21generator27(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
73015 {
73016 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *)__pyx_generator->closure);
73017 PyObject *__pyx_r = NULL;
73018 __Pyx_TraceDeclarations
73019 PyObject *__pyx_t_1 = NULL;
73020 Py_ssize_t __pyx_t_2;
73021 PyObject *(*__pyx_t_3)(PyObject *);
73022 PyObject *__pyx_t_4 = NULL;
73023 PyObject *__pyx_t_5 = NULL;
73024 int __pyx_lineno = 0;
73025 const char *__pyx_filename = NULL;
73026 int __pyx_clineno = 0;
73027 __Pyx_RefNannyDeclarations
73028 __Pyx_RefNannySetupContext("iteritems", 0);
73029 __Pyx_TraceFrameInit(__pyx_codeobj__201)
73030 __Pyx_TraceCall("iteritems", __pyx_f[0], 3706, 0, __PYX_ERR(0, 3706, __pyx_L1_error));
73031 switch (__pyx_generator->resume_label) {
73032 case 0: goto __pyx_L3_first_run;
73033 case 1: goto __pyx_L6_resume_from_yield;
73034 default: /* CPython raises the right error here */
73035 __Pyx_TraceReturn(Py_None, 0);
73036 __Pyx_RefNannyFinishContext();
73037 return NULL;
73038 }
73039 __pyx_L3_first_run:;
73040 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3706, __pyx_L1_error)
73041
73042 /* "pysam/libcbcf.pyx":3708
73043 * def iteritems(self):
73044 * """D.iteritems() -> an iterator over the (key, value) items of D"""
73045 * for key in self: # <<<<<<<<<<<<<<
73046 * yield (key, self[key])
73047 *
73048 */
73049 if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self))) {
73050 __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_1);
73051 __pyx_t_2 = 0;
73052 __pyx_t_3 = NULL;
73053 } else {
73054 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3708, __pyx_L1_error)
73055 __Pyx_GOTREF(__pyx_t_1);
73056 __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3708, __pyx_L1_error)
73057 }
73058 for (;;) {
73059 if (likely(!__pyx_t_3)) {
73060 if (likely(PyList_CheckExact(__pyx_t_1))) {
73061 {
73062 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
73063 #if !CYTHON_ASSUME_SAFE_MACROS
73064 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3708, __pyx_L1_error)
73065 #endif
73066 if (__pyx_t_2 >= __pyx_temp) break;
73067 }
73068 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
73069 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3708, __pyx_L1_error)
73070 #else
73071 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3708, __pyx_L1_error)
73072 __Pyx_GOTREF(__pyx_t_4);
73073 #endif
73074 } else {
73075 {
73076 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
73077 #if !CYTHON_ASSUME_SAFE_MACROS
73078 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3708, __pyx_L1_error)
73079 #endif
73080 if (__pyx_t_2 >= __pyx_temp) break;
73081 }
73082 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
73083 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3708, __pyx_L1_error)
73084 #else
73085 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3708, __pyx_L1_error)
73086 __Pyx_GOTREF(__pyx_t_4);
73087 #endif
73088 }
73089 } else {
73090 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
73091 if (unlikely(!__pyx_t_4)) {
73092 PyObject* exc_type = PyErr_Occurred();
73093 if (exc_type) {
73094 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
73095 else __PYX_ERR(0, 3708, __pyx_L1_error)
73096 }
73097 break;
73098 }
73099 __Pyx_GOTREF(__pyx_t_4);
73100 }
73101 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
73102 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4);
73103 __Pyx_GIVEREF(__pyx_t_4);
73104 __pyx_t_4 = 0;
73105
73106 /* "pysam/libcbcf.pyx":3709
73107 * """D.iteritems() -> an iterator over the (key, value) items of D"""
73108 * for key in self:
73109 * yield (key, self[key]) # <<<<<<<<<<<<<<
73110 *
73111 * def keys(self):
73112 */
73113 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3709, __pyx_L1_error)
73114 __Pyx_GOTREF(__pyx_t_4);
73115 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3709, __pyx_L1_error)
73116 __Pyx_GOTREF(__pyx_t_5);
73117 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
73118 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
73119 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_key)) __PYX_ERR(0, 3709, __pyx_L1_error);
73120 __Pyx_GIVEREF(__pyx_t_4);
73121 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 3709, __pyx_L1_error);
73122 __pyx_t_4 = 0;
73123 __pyx_r = __pyx_t_5;
73124 __pyx_t_5 = 0;
73125 __Pyx_XGIVEREF(__pyx_t_1);
73126 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
73127 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
73128 __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
73129 __Pyx_XGIVEREF(__pyx_r);
73130 __Pyx_TraceReturn(__pyx_r, 0);
73131 __Pyx_RefNannyFinishContext();
73132 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
73133 /* return from generator, yielding value */
73134 __pyx_generator->resume_label = 1;
73135 return __pyx_r;
73136 __pyx_L6_resume_from_yield:;
73137 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
73138 __pyx_cur_scope->__pyx_t_0 = 0;
73139 __Pyx_XGOTREF(__pyx_t_1);
73140 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
73141 __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
73142 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3709, __pyx_L1_error)
73143
73144 /* "pysam/libcbcf.pyx":3708
73145 * def iteritems(self):
73146 * """D.iteritems() -> an iterator over the (key, value) items of D"""
73147 * for key in self: # <<<<<<<<<<<<<<
73148 * yield (key, self[key])
73149 *
73150 */
73151 }
73152 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73153 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
73154
73155 /* "pysam/libcbcf.pyx":3706
73156 * yield self[key]
73157 *
73158 * def iteritems(self): # <<<<<<<<<<<<<<
73159 * """D.iteritems() -> an iterator over the (key, value) items of D"""
73160 * for key in self:
73161 */
73162
73163 /* function exit code */
73164 PyErr_SetNone(PyExc_StopIteration);
73165 goto __pyx_L0;
73166 __pyx_L1_error:;
73167 __Pyx_Generator_Replace_StopIteration(0);
73168 __Pyx_XDECREF(__pyx_t_1);
73169 __Pyx_XDECREF(__pyx_t_4);
73170 __Pyx_XDECREF(__pyx_t_5);
73171 __Pyx_AddTraceback("iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
73172 __pyx_L0:;
73173 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
73174 #if !CYTHON_USE_EXC_INFO_STACK
73175 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
73176 #endif
73177 __pyx_generator->resume_label = -1;
73178 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
73179 __Pyx_TraceReturn(__pyx_r, 0);
73180 __Pyx_RefNannyFinishContext();
73181 return __pyx_r;
73182 }
73183
73184 /* "pysam/libcbcf.pyx":3711
73185 * yield (key, self[key])
73186 *
73187 * def keys(self): # <<<<<<<<<<<<<<
73188 * """D.keys() -> list of D's keys"""
73189 * return list(self)
73190 */
73191
73192 /* Python wrapper */
73193 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_23keys(PyObject *__pyx_v_self,
73194 #if CYTHON_METH_FASTCALL
73195 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73196 #else
73197 PyObject *__pyx_args, PyObject *__pyx_kwds
73198 #endif
73199 ); /*proto*/
73200 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_22keys, "BaseIndex.keys(self)\nD.keys() -> list of D's keys");
73201 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_23keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_23keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_22keys};
73202 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_23keys(PyObject *__pyx_v_self,
73203 #if CYTHON_METH_FASTCALL
73204 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73205 #else
73206 PyObject *__pyx_args, PyObject *__pyx_kwds
73207 #endif
73208 ) {
73209 #if !CYTHON_METH_FASTCALL
73210 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
73211 #endif
73212 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
73213 PyObject *__pyx_r = 0;
73214 __Pyx_RefNannyDeclarations
73215 __Pyx_RefNannySetupContext("keys (wrapper)", 0);
73216 #if !CYTHON_METH_FASTCALL
73217 #if CYTHON_ASSUME_SAFE_MACROS
73218 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
73219 #else
73220 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
73221 #endif
73222 #endif
73223 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
73224 if (unlikely(__pyx_nargs > 0)) {
73225 __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, __pyx_nargs); return NULL;}
73226 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL;
73227 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_22keys(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
73228
73229 /* function exit code */
73230 __Pyx_RefNannyFinishContext();
73231 return __pyx_r;
73232 }
73233
73234 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_22keys(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
73235 PyObject *__pyx_r = NULL;
73236 __Pyx_TraceDeclarations
73237 __Pyx_RefNannyDeclarations
73238 PyObject *__pyx_t_1 = NULL;
73239 int __pyx_lineno = 0;
73240 const char *__pyx_filename = NULL;
73241 int __pyx_clineno = 0;
73242 __Pyx_TraceFrameInit(__pyx_codeobj__202)
73243 __Pyx_RefNannySetupContext("keys", 1);
73244 __Pyx_TraceCall("keys", __pyx_f[0], 3711, 0, __PYX_ERR(0, 3711, __pyx_L1_error));
73245
73246 /* "pysam/libcbcf.pyx":3713
73247 * def keys(self):
73248 * """D.keys() -> list of D's keys"""
73249 * return list(self) # <<<<<<<<<<<<<<
73250 *
73251 * def items(self):
73252 */
73253 __Pyx_XDECREF(__pyx_r);
73254 __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3713, __pyx_L1_error)
73255 __Pyx_GOTREF(__pyx_t_1);
73256 __pyx_r = __pyx_t_1;
73257 __pyx_t_1 = 0;
73258 goto __pyx_L0;
73259
73260 /* "pysam/libcbcf.pyx":3711
73261 * yield (key, self[key])
73262 *
73263 * def keys(self): # <<<<<<<<<<<<<<
73264 * """D.keys() -> list of D's keys"""
73265 * return list(self)
73266 */
73267
73268 /* function exit code */
73269 __pyx_L1_error:;
73270 __Pyx_XDECREF(__pyx_t_1);
73271 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
73272 __pyx_r = NULL;
73273 __pyx_L0:;
73274 __Pyx_XGIVEREF(__pyx_r);
73275 __Pyx_TraceReturn(__pyx_r, 0);
73276 __Pyx_RefNannyFinishContext();
73277 return __pyx_r;
73278 }
73279
73280 /* "pysam/libcbcf.pyx":3715
73281 * return list(self)
73282 *
73283 * def items(self): # <<<<<<<<<<<<<<
73284 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
73285 * return list(self.iteritems())
73286 */
73287
73288 /* Python wrapper */
73289 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_25items(PyObject *__pyx_v_self,
73290 #if CYTHON_METH_FASTCALL
73291 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73292 #else
73293 PyObject *__pyx_args, PyObject *__pyx_kwds
73294 #endif
73295 ); /*proto*/
73296 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_24items, "BaseIndex.items(self)\nD.items() -> list of D's (key, value) pairs, as 2-tuples");
73297 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_25items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_25items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_24items};
73298 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_25items(PyObject *__pyx_v_self,
73299 #if CYTHON_METH_FASTCALL
73300 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73301 #else
73302 PyObject *__pyx_args, PyObject *__pyx_kwds
73303 #endif
73304 ) {
73305 #if !CYTHON_METH_FASTCALL
73306 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
73307 #endif
73308 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
73309 PyObject *__pyx_r = 0;
73310 __Pyx_RefNannyDeclarations
73311 __Pyx_RefNannySetupContext("items (wrapper)", 0);
73312 #if !CYTHON_METH_FASTCALL
73313 #if CYTHON_ASSUME_SAFE_MACROS
73314 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
73315 #else
73316 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
73317 #endif
73318 #endif
73319 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
73320 if (unlikely(__pyx_nargs > 0)) {
73321 __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, __pyx_nargs); return NULL;}
73322 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL;
73323 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_24items(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
73324
73325 /* function exit code */
73326 __Pyx_RefNannyFinishContext();
73327 return __pyx_r;
73328 }
73329
73330 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_24items(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
73331 PyObject *__pyx_r = NULL;
73332 __Pyx_TraceDeclarations
73333 __Pyx_RefNannyDeclarations
73334 PyObject *__pyx_t_1 = NULL;
73335 PyObject *__pyx_t_2 = NULL;
73336 PyObject *__pyx_t_3 = NULL;
73337 unsigned int __pyx_t_4;
73338 int __pyx_lineno = 0;
73339 const char *__pyx_filename = NULL;
73340 int __pyx_clineno = 0;
73341 __Pyx_TraceFrameInit(__pyx_codeobj__203)
73342 __Pyx_RefNannySetupContext("items", 1);
73343 __Pyx_TraceCall("items", __pyx_f[0], 3715, 0, __PYX_ERR(0, 3715, __pyx_L1_error));
73344
73345 /* "pysam/libcbcf.pyx":3717
73346 * def items(self):
73347 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
73348 * return list(self.iteritems()) # <<<<<<<<<<<<<<
73349 *
73350 * def values(self):
73351 */
73352 __Pyx_XDECREF(__pyx_r);
73353 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3717, __pyx_L1_error)
73354 __Pyx_GOTREF(__pyx_t_2);
73355 __pyx_t_3 = NULL;
73356 __pyx_t_4 = 0;
73357 #if CYTHON_UNPACK_METHODS
73358 if (likely(PyMethod_Check(__pyx_t_2))) {
73359 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
73360 if (likely(__pyx_t_3)) {
73361 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
73362 __Pyx_INCREF(__pyx_t_3);
73363 __Pyx_INCREF(function);
73364 __Pyx_DECREF_SET(__pyx_t_2, function);
73365 __pyx_t_4 = 1;
73366 }
73367 }
73368 #endif
73369 {
73370 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
73371 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
73372 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
73373 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3717, __pyx_L1_error)
73374 __Pyx_GOTREF(__pyx_t_1);
73375 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
73376 }
73377 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3717, __pyx_L1_error)
73378 __Pyx_GOTREF(__pyx_t_2);
73379 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73380 __pyx_r = __pyx_t_2;
73381 __pyx_t_2 = 0;
73382 goto __pyx_L0;
73383
73384 /* "pysam/libcbcf.pyx":3715
73385 * return list(self)
73386 *
73387 * def items(self): # <<<<<<<<<<<<<<
73388 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
73389 * return list(self.iteritems())
73390 */
73391
73392 /* function exit code */
73393 __pyx_L1_error:;
73394 __Pyx_XDECREF(__pyx_t_1);
73395 __Pyx_XDECREF(__pyx_t_2);
73396 __Pyx_XDECREF(__pyx_t_3);
73397 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
73398 __pyx_r = NULL;
73399 __pyx_L0:;
73400 __Pyx_XGIVEREF(__pyx_r);
73401 __Pyx_TraceReturn(__pyx_r, 0);
73402 __Pyx_RefNannyFinishContext();
73403 return __pyx_r;
73404 }
73405
73406 /* "pysam/libcbcf.pyx":3719
73407 * return list(self.iteritems())
73408 *
73409 * def values(self): # <<<<<<<<<<<<<<
73410 * """D.values() -> list of D's values"""
73411 * return list(self.itervalues())
73412 */
73413
73414 /* Python wrapper */
73415 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_27values(PyObject *__pyx_v_self,
73416 #if CYTHON_METH_FASTCALL
73417 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73418 #else
73419 PyObject *__pyx_args, PyObject *__pyx_kwds
73420 #endif
73421 ); /*proto*/
73422 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_26values, "BaseIndex.values(self)\nD.values() -> list of D's values");
73423 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_27values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_27values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_26values};
73424 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_27values(PyObject *__pyx_v_self,
73425 #if CYTHON_METH_FASTCALL
73426 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73427 #else
73428 PyObject *__pyx_args, PyObject *__pyx_kwds
73429 #endif
73430 ) {
73431 #if !CYTHON_METH_FASTCALL
73432 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
73433 #endif
73434 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
73435 PyObject *__pyx_r = 0;
73436 __Pyx_RefNannyDeclarations
73437 __Pyx_RefNannySetupContext("values (wrapper)", 0);
73438 #if !CYTHON_METH_FASTCALL
73439 #if CYTHON_ASSUME_SAFE_MACROS
73440 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
73441 #else
73442 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
73443 #endif
73444 #endif
73445 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
73446 if (unlikely(__pyx_nargs > 0)) {
73447 __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, __pyx_nargs); return NULL;}
73448 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL;
73449 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_26values(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
73450
73451 /* function exit code */
73452 __Pyx_RefNannyFinishContext();
73453 return __pyx_r;
73454 }
73455
73456 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_26values(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
73457 PyObject *__pyx_r = NULL;
73458 __Pyx_TraceDeclarations
73459 __Pyx_RefNannyDeclarations
73460 PyObject *__pyx_t_1 = NULL;
73461 PyObject *__pyx_t_2 = NULL;
73462 PyObject *__pyx_t_3 = NULL;
73463 unsigned int __pyx_t_4;
73464 int __pyx_lineno = 0;
73465 const char *__pyx_filename = NULL;
73466 int __pyx_clineno = 0;
73467 __Pyx_TraceFrameInit(__pyx_codeobj__204)
73468 __Pyx_RefNannySetupContext("values", 1);
73469 __Pyx_TraceCall("values", __pyx_f[0], 3719, 0, __PYX_ERR(0, 3719, __pyx_L1_error));
73470
73471 /* "pysam/libcbcf.pyx":3721
73472 * def values(self):
73473 * """D.values() -> list of D's values"""
73474 * return list(self.itervalues()) # <<<<<<<<<<<<<<
73475 *
73476 * def update(self, items=None, **kwargs):
73477 */
73478 __Pyx_XDECREF(__pyx_r);
73479 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3721, __pyx_L1_error)
73480 __Pyx_GOTREF(__pyx_t_2);
73481 __pyx_t_3 = NULL;
73482 __pyx_t_4 = 0;
73483 #if CYTHON_UNPACK_METHODS
73484 if (likely(PyMethod_Check(__pyx_t_2))) {
73485 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
73486 if (likely(__pyx_t_3)) {
73487 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
73488 __Pyx_INCREF(__pyx_t_3);
73489 __Pyx_INCREF(function);
73490 __Pyx_DECREF_SET(__pyx_t_2, function);
73491 __pyx_t_4 = 1;
73492 }
73493 }
73494 #endif
73495 {
73496 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
73497 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
73498 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
73499 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3721, __pyx_L1_error)
73500 __Pyx_GOTREF(__pyx_t_1);
73501 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
73502 }
73503 __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3721, __pyx_L1_error)
73504 __Pyx_GOTREF(__pyx_t_2);
73505 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73506 __pyx_r = __pyx_t_2;
73507 __pyx_t_2 = 0;
73508 goto __pyx_L0;
73509
73510 /* "pysam/libcbcf.pyx":3719
73511 * return list(self.iteritems())
73512 *
73513 * def values(self): # <<<<<<<<<<<<<<
73514 * """D.values() -> list of D's values"""
73515 * return list(self.itervalues())
73516 */
73517
73518 /* function exit code */
73519 __pyx_L1_error:;
73520 __Pyx_XDECREF(__pyx_t_1);
73521 __Pyx_XDECREF(__pyx_t_2);
73522 __Pyx_XDECREF(__pyx_t_3);
73523 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
73524 __pyx_r = NULL;
73525 __pyx_L0:;
73526 __Pyx_XGIVEREF(__pyx_r);
73527 __Pyx_TraceReturn(__pyx_r, 0);
73528 __Pyx_RefNannyFinishContext();
73529 return __pyx_r;
73530 }
73531
73532 /* "pysam/libcbcf.pyx":3723
73533 * return list(self.itervalues())
73534 *
73535 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
73536 * """D.update([E, ]**F) -> None.
73537 *
73538 */
73539
73540 /* Python wrapper */
73541 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_29update(PyObject *__pyx_v_self,
73542 #if CYTHON_METH_FASTCALL
73543 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73544 #else
73545 PyObject *__pyx_args, PyObject *__pyx_kwds
73546 #endif
73547 ); /*proto*/
73548 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_28update, "BaseIndex.update(self, items=None, **kwargs)\nD.update([E, ]**F) -> None.\n\n Update D from dict/iterable E and F.\n ");
73549 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_29update = {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_29update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_28update};
73550 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_29update(PyObject *__pyx_v_self,
73551 #if CYTHON_METH_FASTCALL
73552 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73553 #else
73554 PyObject *__pyx_args, PyObject *__pyx_kwds
73555 #endif
73556 ) {
73557 PyObject *__pyx_v_items = 0;
73558 PyObject *__pyx_v_kwargs = 0;
73559 #if !CYTHON_METH_FASTCALL
73560 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
73561 #endif
73562 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
73563 PyObject* values[1] = {0};
73564 int __pyx_lineno = 0;
73565 const char *__pyx_filename = NULL;
73566 int __pyx_clineno = 0;
73567 PyObject *__pyx_r = 0;
73568 __Pyx_RefNannyDeclarations
73569 __Pyx_RefNannySetupContext("update (wrapper)", 0);
73570 #if !CYTHON_METH_FASTCALL
73571 #if CYTHON_ASSUME_SAFE_MACROS
73572 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
73573 #else
73574 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
73575 #endif
73576 #endif
73577 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
73578 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
73579 __Pyx_GOTREF(__pyx_v_kwargs);
73580 {
73581 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
73582 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
73583 if (__pyx_kwds) {
73584 Py_ssize_t kw_args;
73585 switch (__pyx_nargs) {
73586 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
73587 CYTHON_FALLTHROUGH;
73588 case 0: break;
73589 default: goto __pyx_L5_argtuple_error;
73590 }
73591 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
73592 switch (__pyx_nargs) {
73593 case 0:
73594 if (kw_args > 0) {
73595 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
73596 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
73597 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3723, __pyx_L3_error)
73598 }
73599 }
73600 if (unlikely(kw_args > 0)) {
73601 const Py_ssize_t kwd_pos_args = __pyx_nargs;
73602 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "update") < 0)) __PYX_ERR(0, 3723, __pyx_L3_error)
73603 }
73604 } else {
73605 switch (__pyx_nargs) {
73606 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
73607 CYTHON_FALLTHROUGH;
73608 case 0: break;
73609 default: goto __pyx_L5_argtuple_error;
73610 }
73611 }
73612 __pyx_v_items = values[0];
73613 }
73614 goto __pyx_L6_skip;
73615 __pyx_L5_argtuple_error:;
73616 __Pyx_RaiseArgtupleInvalid("update", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 3723, __pyx_L3_error)
73617 __pyx_L6_skip:;
73618 goto __pyx_L4_argument_unpacking_done;
73619 __pyx_L3_error:;
73620 {
73621 Py_ssize_t __pyx_temp;
73622 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
73623 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
73624 }
73625 }
73626 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
73627 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
73628 __Pyx_RefNannyFinishContext();
73629 return NULL;
73630 __pyx_L4_argument_unpacking_done:;
73631 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_28update(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self), __pyx_v_items, __pyx_v_kwargs);
73632
73633 /* function exit code */
73634 __Pyx_DECREF(__pyx_v_kwargs);
73635 {
73636 Py_ssize_t __pyx_temp;
73637 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
73638 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
73639 }
73640 }
73641 __Pyx_RefNannyFinishContext();
73642 return __pyx_r;
73643 }
73644
73645 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_28update(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs) {
73646 PyObject *__pyx_v_k = NULL;
73647 PyObject *__pyx_v_v = NULL;
73648 PyObject *__pyx_r = NULL;
73649 __Pyx_TraceDeclarations
73650 __Pyx_RefNannyDeclarations
73651 PyObject *__pyx_t_1 = NULL;
73652 Py_ssize_t __pyx_t_2;
73653 Py_ssize_t __pyx_t_3;
73654 int __pyx_t_4;
73655 PyObject *__pyx_t_5 = NULL;
73656 PyObject *__pyx_t_6 = NULL;
73657 int __pyx_t_7;
73658 int __pyx_t_8;
73659 int __pyx_lineno = 0;
73660 const char *__pyx_filename = NULL;
73661 int __pyx_clineno = 0;
73662 __Pyx_TraceFrameInit(__pyx_codeobj__205)
73663 __Pyx_RefNannySetupContext("update", 1);
73664 __Pyx_TraceCall("update", __pyx_f[0], 3723, 0, __PYX_ERR(0, 3723, __pyx_L1_error));
73665
73666 /* "pysam/libcbcf.pyx":3728
73667 * Update D from dict/iterable E and F.
73668 * """
73669 * for k, v in items.items(): # <<<<<<<<<<<<<<
73670 * self[k] = v
73671 *
73672 */
73673 __pyx_t_2 = 0;
73674 if (unlikely(__pyx_v_items == Py_None)) {
73675 PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
73676 __PYX_ERR(0, 3728, __pyx_L1_error)
73677 }
73678 __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_items, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3728, __pyx_L1_error)
73679 __Pyx_GOTREF(__pyx_t_5);
73680 __Pyx_XDECREF(__pyx_t_1);
73681 __pyx_t_1 = __pyx_t_5;
73682 __pyx_t_5 = 0;
73683 while (1) {
73684 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
73685 if (unlikely(__pyx_t_7 == 0)) break;
73686 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3728, __pyx_L1_error)
73687 __Pyx_GOTREF(__pyx_t_5);
73688 __Pyx_GOTREF(__pyx_t_6);
73689 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5);
73690 __pyx_t_5 = 0;
73691 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
73692 __pyx_t_6 = 0;
73693
73694 /* "pysam/libcbcf.pyx":3729
73695 * """
73696 * for k, v in items.items():
73697 * self[k] = v # <<<<<<<<<<<<<<
73698 *
73699 * if kwargs:
73700 */
73701 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 3729, __pyx_L1_error)
73702 }
73703 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73704
73705 /* "pysam/libcbcf.pyx":3731
73706 * self[k] = v
73707 *
73708 * if kwargs: # <<<<<<<<<<<<<<
73709 * for k, v in kwargs.items():
73710 * self[k] = v
73711 */
73712 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3731, __pyx_L1_error)
73713 if (__pyx_t_8) {
73714
73715 /* "pysam/libcbcf.pyx":3732
73716 *
73717 * if kwargs:
73718 * for k, v in kwargs.items(): # <<<<<<<<<<<<<<
73719 * self[k] = v
73720 *
73721 */
73722 __pyx_t_3 = 0;
73723 __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_2), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3732, __pyx_L1_error)
73724 __Pyx_GOTREF(__pyx_t_6);
73725 __Pyx_XDECREF(__pyx_t_1);
73726 __pyx_t_1 = __pyx_t_6;
73727 __pyx_t_6 = 0;
73728 while (1) {
73729 __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_2, &__pyx_t_3, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4);
73730 if (unlikely(__pyx_t_7 == 0)) break;
73731 if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3732, __pyx_L1_error)
73732 __Pyx_GOTREF(__pyx_t_6);
73733 __Pyx_GOTREF(__pyx_t_5);
73734 __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
73735 __pyx_t_6 = 0;
73736 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
73737 __pyx_t_5 = 0;
73738
73739 /* "pysam/libcbcf.pyx":3733
73740 * if kwargs:
73741 * for k, v in kwargs.items():
73742 * self[k] = v # <<<<<<<<<<<<<<
73743 *
73744 * def pop(self, key, default=_nothing):
73745 */
73746 if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v) < 0))) __PYX_ERR(0, 3733, __pyx_L1_error)
73747 }
73748 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73749
73750 /* "pysam/libcbcf.pyx":3731
73751 * self[k] = v
73752 *
73753 * if kwargs: # <<<<<<<<<<<<<<
73754 * for k, v in kwargs.items():
73755 * self[k] = v
73756 */
73757 }
73758
73759 /* "pysam/libcbcf.pyx":3723
73760 * return list(self.itervalues())
73761 *
73762 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
73763 * """D.update([E, ]**F) -> None.
73764 *
73765 */
73766
73767 /* function exit code */
73768 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
73769 goto __pyx_L0;
73770 __pyx_L1_error:;
73771 __Pyx_XDECREF(__pyx_t_1);
73772 __Pyx_XDECREF(__pyx_t_5);
73773 __Pyx_XDECREF(__pyx_t_6);
73774 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
73775 __pyx_r = NULL;
73776 __pyx_L0:;
73777 __Pyx_XDECREF(__pyx_v_k);
73778 __Pyx_XDECREF(__pyx_v_v);
73779 __Pyx_XGIVEREF(__pyx_r);
73780 __Pyx_TraceReturn(__pyx_r, 0);
73781 __Pyx_RefNannyFinishContext();
73782 return __pyx_r;
73783 }
73784
73785 /* "pysam/libcbcf.pyx":3735
73786 * self[k] = v
73787 *
73788 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
73789 * try:
73790 * value = self[key]
73791 */
73792
73793 /* Python wrapper */
73794 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_31pop(PyObject *__pyx_v_self,
73795 #if CYTHON_METH_FASTCALL
73796 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73797 #else
73798 PyObject *__pyx_args, PyObject *__pyx_kwds
73799 #endif
73800 ); /*proto*/
73801 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_30pop, "BaseIndex.pop(self, key, default=_nothing)");
73802 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_31pop = {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_31pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_30pop};
73803 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_31pop(PyObject *__pyx_v_self,
73804 #if CYTHON_METH_FASTCALL
73805 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
73806 #else
73807 PyObject *__pyx_args, PyObject *__pyx_kwds
73808 #endif
73809 ) {
73810 PyObject *__pyx_v_key = 0;
73811 PyObject *__pyx_v_default = 0;
73812 #if !CYTHON_METH_FASTCALL
73813 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
73814 #endif
73815 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
73816 PyObject* values[2] = {0,0};
73817 int __pyx_lineno = 0;
73818 const char *__pyx_filename = NULL;
73819 int __pyx_clineno = 0;
73820 PyObject *__pyx_r = 0;
73821 __Pyx_RefNannyDeclarations
73822 __Pyx_RefNannySetupContext("pop (wrapper)", 0);
73823 #if !CYTHON_METH_FASTCALL
73824 #if CYTHON_ASSUME_SAFE_MACROS
73825 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
73826 #else
73827 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
73828 #endif
73829 #endif
73830 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
73831 {
73832 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
73833 values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__206);
73834 if (__pyx_kwds) {
73835 Py_ssize_t kw_args;
73836 switch (__pyx_nargs) {
73837 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
73838 CYTHON_FALLTHROUGH;
73839 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
73840 CYTHON_FALLTHROUGH;
73841 case 0: break;
73842 default: goto __pyx_L5_argtuple_error;
73843 }
73844 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
73845 switch (__pyx_nargs) {
73846 case 0:
73847 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
73848 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
73849 kw_args--;
73850 }
73851 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3735, __pyx_L3_error)
73852 else goto __pyx_L5_argtuple_error;
73853 CYTHON_FALLTHROUGH;
73854 case 1:
73855 if (kw_args > 0) {
73856 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
73857 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
73858 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3735, __pyx_L3_error)
73859 }
73860 }
73861 if (unlikely(kw_args > 0)) {
73862 const Py_ssize_t kwd_pos_args = __pyx_nargs;
73863 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pop") < 0)) __PYX_ERR(0, 3735, __pyx_L3_error)
73864 }
73865 } else {
73866 switch (__pyx_nargs) {
73867 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
73868 CYTHON_FALLTHROUGH;
73869 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
73870 break;
73871 default: goto __pyx_L5_argtuple_error;
73872 }
73873 }
73874 __pyx_v_key = values[0];
73875 __pyx_v_default = values[1];
73876 }
73877 goto __pyx_L6_skip;
73878 __pyx_L5_argtuple_error:;
73879 __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3735, __pyx_L3_error)
73880 __pyx_L6_skip:;
73881 goto __pyx_L4_argument_unpacking_done;
73882 __pyx_L3_error:;
73883 {
73884 Py_ssize_t __pyx_temp;
73885 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
73886 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
73887 }
73888 }
73889 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
73890 __Pyx_RefNannyFinishContext();
73891 return NULL;
73892 __pyx_L4_argument_unpacking_done:;
73893 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_30pop(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
73894
73895 /* function exit code */
73896 {
73897 Py_ssize_t __pyx_temp;
73898 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
73899 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
73900 }
73901 }
73902 __Pyx_RefNannyFinishContext();
73903 return __pyx_r;
73904 }
73905
73906 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_30pop(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
73907 PyObject *__pyx_v_value = NULL;
73908 PyObject *__pyx_r = NULL;
73909 __Pyx_TraceDeclarations
73910 __Pyx_RefNannyDeclarations
73911 PyObject *__pyx_t_1 = NULL;
73912 PyObject *__pyx_t_2 = NULL;
73913 PyObject *__pyx_t_3 = NULL;
73914 PyObject *__pyx_t_4 = NULL;
73915 int __pyx_t_5;
73916 PyObject *__pyx_t_6 = NULL;
73917 PyObject *__pyx_t_7 = NULL;
73918 int __pyx_t_8;
73919 int __pyx_lineno = 0;
73920 const char *__pyx_filename = NULL;
73921 int __pyx_clineno = 0;
73922 __Pyx_TraceFrameInit(__pyx_codeobj__207)
73923 __Pyx_RefNannySetupContext("pop", 1);
73924 __Pyx_TraceCall("pop", __pyx_f[0], 3735, 0, __PYX_ERR(0, 3735, __pyx_L1_error));
73925
73926 /* "pysam/libcbcf.pyx":3736
73927 *
73928 * def pop(self, key, default=_nothing):
73929 * try: # <<<<<<<<<<<<<<
73930 * value = self[key]
73931 * del self[key]
73932 */
73933 {
73934 __Pyx_PyThreadState_declare
73935 __Pyx_PyThreadState_assign
73936 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
73937 __Pyx_XGOTREF(__pyx_t_1);
73938 __Pyx_XGOTREF(__pyx_t_2);
73939 __Pyx_XGOTREF(__pyx_t_3);
73940 /*try:*/ {
73941
73942 /* "pysam/libcbcf.pyx":3737
73943 * def pop(self, key, default=_nothing):
73944 * try:
73945 * value = self[key] # <<<<<<<<<<<<<<
73946 * del self[key]
73947 * return value
73948 */
73949 __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3737, __pyx_L3_error)
73950 __Pyx_GOTREF(__pyx_t_4);
73951 __pyx_v_value = __pyx_t_4;
73952 __pyx_t_4 = 0;
73953
73954 /* "pysam/libcbcf.pyx":3738
73955 * try:
73956 * value = self[key]
73957 * del self[key] # <<<<<<<<<<<<<<
73958 * return value
73959 * except KeyError:
73960 */
73961 if (unlikely((PyObject_DelItem(((PyObject *)__pyx_v_self), __pyx_v_key) < 0))) __PYX_ERR(0, 3738, __pyx_L3_error)
73962
73963 /* "pysam/libcbcf.pyx":3739
73964 * value = self[key]
73965 * del self[key]
73966 * return value # <<<<<<<<<<<<<<
73967 * except KeyError:
73968 * if default is not _nothing:
73969 */
73970 __Pyx_XDECREF(__pyx_r);
73971 __Pyx_INCREF(__pyx_v_value);
73972 __pyx_r = __pyx_v_value;
73973 goto __pyx_L7_try_return;
73974
73975 /* "pysam/libcbcf.pyx":3736
73976 *
73977 * def pop(self, key, default=_nothing):
73978 * try: # <<<<<<<<<<<<<<
73979 * value = self[key]
73980 * del self[key]
73981 */
73982 }
73983 __pyx_L3_error:;
73984 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
73985
73986 /* "pysam/libcbcf.pyx":3740
73987 * del self[key]
73988 * return value
73989 * except KeyError: # <<<<<<<<<<<<<<
73990 * if default is not _nothing:
73991 * return default
73992 */
73993 __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
73994 if (__pyx_t_5) {
73995 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
73996 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3740, __pyx_L5_except_error)
73997 __Pyx_XGOTREF(__pyx_t_4);
73998 __Pyx_XGOTREF(__pyx_t_6);
73999 __Pyx_XGOTREF(__pyx_t_7);
74000
74001 /* "pysam/libcbcf.pyx":3741
74002 * return value
74003 * except KeyError:
74004 * if default is not _nothing: # <<<<<<<<<<<<<<
74005 * return default
74006 * raise
74007 */
74008 __pyx_t_8 = (__pyx_v_default != __pyx_v_5pysam_7libcbcf__nothing);
74009 if (__pyx_t_8) {
74010
74011 /* "pysam/libcbcf.pyx":3742
74012 * except KeyError:
74013 * if default is not _nothing:
74014 * return default # <<<<<<<<<<<<<<
74015 * raise
74016 *
74017 */
74018 __Pyx_XDECREF(__pyx_r);
74019 __Pyx_INCREF(__pyx_v_default);
74020 __pyx_r = __pyx_v_default;
74021 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
74022 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
74023 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
74024 goto __pyx_L6_except_return;
74025
74026 /* "pysam/libcbcf.pyx":3741
74027 * return value
74028 * except KeyError:
74029 * if default is not _nothing: # <<<<<<<<<<<<<<
74030 * return default
74031 * raise
74032 */
74033 }
74034
74035 /* "pysam/libcbcf.pyx":3743
74036 * if default is not _nothing:
74037 * return default
74038 * raise # <<<<<<<<<<<<<<
74039 *
74040 * # Mappings are not hashable by default, but subclasses can change this
74041 */
74042 __Pyx_GIVEREF(__pyx_t_4);
74043 __Pyx_GIVEREF(__pyx_t_6);
74044 __Pyx_XGIVEREF(__pyx_t_7);
74045 __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_6, __pyx_t_7);
74046 __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0;
74047 __PYX_ERR(0, 3743, __pyx_L5_except_error)
74048 }
74049 goto __pyx_L5_except_error;
74050
74051 /* "pysam/libcbcf.pyx":3736
74052 *
74053 * def pop(self, key, default=_nothing):
74054 * try: # <<<<<<<<<<<<<<
74055 * value = self[key]
74056 * del self[key]
74057 */
74058 __pyx_L5_except_error:;
74059 __Pyx_XGIVEREF(__pyx_t_1);
74060 __Pyx_XGIVEREF(__pyx_t_2);
74061 __Pyx_XGIVEREF(__pyx_t_3);
74062 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
74063 goto __pyx_L1_error;
74064 __pyx_L7_try_return:;
74065 __Pyx_XGIVEREF(__pyx_t_1);
74066 __Pyx_XGIVEREF(__pyx_t_2);
74067 __Pyx_XGIVEREF(__pyx_t_3);
74068 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
74069 goto __pyx_L0;
74070 __pyx_L6_except_return:;
74071 __Pyx_XGIVEREF(__pyx_t_1);
74072 __Pyx_XGIVEREF(__pyx_t_2);
74073 __Pyx_XGIVEREF(__pyx_t_3);
74074 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
74075 goto __pyx_L0;
74076 }
74077
74078 /* "pysam/libcbcf.pyx":3735
74079 * self[k] = v
74080 *
74081 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
74082 * try:
74083 * value = self[key]
74084 */
74085
74086 /* function exit code */
74087 __pyx_L1_error:;
74088 __Pyx_XDECREF(__pyx_t_4);
74089 __Pyx_XDECREF(__pyx_t_6);
74090 __Pyx_XDECREF(__pyx_t_7);
74091 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
74092 __pyx_r = NULL;
74093 __pyx_L0:;
74094 __Pyx_XDECREF(__pyx_v_value);
74095 __Pyx_XGIVEREF(__pyx_r);
74096 __Pyx_TraceReturn(__pyx_r, 0);
74097 __Pyx_RefNannyFinishContext();
74098 return __pyx_r;
74099 }
74100
74101 /* "(tree fragment)":1
74102 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
74103 * cdef tuple state
74104 * cdef object _dict
74105 */
74106
74107 /* Python wrapper */
74108 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_33__reduce_cython__(PyObject *__pyx_v_self,
74109 #if CYTHON_METH_FASTCALL
74110 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
74111 #else
74112 PyObject *__pyx_args, PyObject *__pyx_kwds
74113 #endif
74114 ); /*proto*/
74115 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_32__reduce_cython__, "BaseIndex.__reduce_cython__(self)");
74116 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_33__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_33__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_32__reduce_cython__};
74117 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_33__reduce_cython__(PyObject *__pyx_v_self,
74118 #if CYTHON_METH_FASTCALL
74119 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
74120 #else
74121 PyObject *__pyx_args, PyObject *__pyx_kwds
74122 #endif
74123 ) {
74124 #if !CYTHON_METH_FASTCALL
74125 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
74126 #endif
74127 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
74128 PyObject *__pyx_r = 0;
74129 __Pyx_RefNannyDeclarations
74130 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
74131 #if !CYTHON_METH_FASTCALL
74132 #if CYTHON_ASSUME_SAFE_MACROS
74133 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
74134 #else
74135 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
74136 #endif
74137 #endif
74138 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
74139 if (unlikely(__pyx_nargs > 0)) {
74140 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
74141 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
74142 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_32__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self));
74143
74144 /* function exit code */
74145 __Pyx_RefNannyFinishContext();
74146 return __pyx_r;
74147 }
74148
74149 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_32__reduce_cython__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self) {
74150 PyObject *__pyx_v_state = 0;
74151 PyObject *__pyx_v__dict = 0;
74152 int __pyx_v_use_setstate;
74153 PyObject *__pyx_r = NULL;
74154 __Pyx_TraceDeclarations
74155 __Pyx_RefNannyDeclarations
74156 PyObject *__pyx_t_1 = NULL;
74157 int __pyx_t_2;
74158 PyObject *__pyx_t_3 = NULL;
74159 int __pyx_t_4;
74160 PyObject *__pyx_t_5 = NULL;
74161 int __pyx_lineno = 0;
74162 const char *__pyx_filename = NULL;
74163 int __pyx_clineno = 0;
74164 __Pyx_TraceFrameInit(__pyx_codeobj__208)
74165 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
74166 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
74167
74168 /* "(tree fragment)":5
74169 * cdef object _dict
74170 * cdef bint use_setstate
74171 * state = (self.refmap, self.refs) # <<<<<<<<<<<<<<
74172 * _dict = getattr(self, '__dict__', None)
74173 * if _dict is not None:
74174 */
74175 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
74176 __Pyx_GOTREF(__pyx_t_1);
74177 __Pyx_INCREF(__pyx_v_self->refmap);
74178 __Pyx_GIVEREF(__pyx_v_self->refmap);
74179 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->refmap)) __PYX_ERR(4, 5, __pyx_L1_error);
74180 __Pyx_INCREF(__pyx_v_self->refs);
74181 __Pyx_GIVEREF(__pyx_v_self->refs);
74182 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->refs)) __PYX_ERR(4, 5, __pyx_L1_error);
74183 __pyx_v_state = ((PyObject*)__pyx_t_1);
74184 __pyx_t_1 = 0;
74185
74186 /* "(tree fragment)":6
74187 * cdef bint use_setstate
74188 * state = (self.refmap, self.refs)
74189 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
74190 * if _dict is not None:
74191 * state += (_dict,)
74192 */
74193 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
74194 __Pyx_GOTREF(__pyx_t_1);
74195 __pyx_v__dict = __pyx_t_1;
74196 __pyx_t_1 = 0;
74197
74198 /* "(tree fragment)":7
74199 * state = (self.refmap, self.refs)
74200 * _dict = getattr(self, '__dict__', None)
74201 * if _dict is not None: # <<<<<<<<<<<<<<
74202 * state += (_dict,)
74203 * use_setstate = True
74204 */
74205 __pyx_t_2 = (__pyx_v__dict != Py_None);
74206 if (__pyx_t_2) {
74207
74208 /* "(tree fragment)":8
74209 * _dict = getattr(self, '__dict__', None)
74210 * if _dict is not None:
74211 * state += (_dict,) # <<<<<<<<<<<<<<
74212 * use_setstate = True
74213 * else:
74214 */
74215 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
74216 __Pyx_GOTREF(__pyx_t_1);
74217 __Pyx_INCREF(__pyx_v__dict);
74218 __Pyx_GIVEREF(__pyx_v__dict);
74219 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(4, 8, __pyx_L1_error);
74220 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error)
74221 __Pyx_GOTREF(__pyx_t_3);
74222 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
74223 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
74224 __pyx_t_3 = 0;
74225
74226 /* "(tree fragment)":9
74227 * if _dict is not None:
74228 * state += (_dict,)
74229 * use_setstate = True # <<<<<<<<<<<<<<
74230 * else:
74231 * use_setstate = self.refmap is not None or self.refs is not None
74232 */
74233 __pyx_v_use_setstate = 1;
74234
74235 /* "(tree fragment)":7
74236 * state = (self.refmap, self.refs)
74237 * _dict = getattr(self, '__dict__', None)
74238 * if _dict is not None: # <<<<<<<<<<<<<<
74239 * state += (_dict,)
74240 * use_setstate = True
74241 */
74242 goto __pyx_L3;
74243 }
74244
74245 /* "(tree fragment)":11
74246 * use_setstate = True
74247 * else:
74248 * use_setstate = self.refmap is not None or self.refs is not None # <<<<<<<<<<<<<<
74249 * if use_setstate:
74250 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, None), state
74251 */
74252 /*else*/ {
74253 __pyx_t_4 = (__pyx_v_self->refmap != ((PyObject*)Py_None));
74254 if (!__pyx_t_4) {
74255 } else {
74256 __pyx_t_2 = __pyx_t_4;
74257 goto __pyx_L4_bool_binop_done;
74258 }
74259 __pyx_t_4 = (__pyx_v_self->refs != ((PyObject*)Py_None));
74260 __pyx_t_2 = __pyx_t_4;
74261 __pyx_L4_bool_binop_done:;
74262 __pyx_v_use_setstate = __pyx_t_2;
74263 }
74264 __pyx_L3:;
74265
74266 /* "(tree fragment)":12
74267 * else:
74268 * use_setstate = self.refmap is not None or self.refs is not None
74269 * if use_setstate: # <<<<<<<<<<<<<<
74270 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, None), state
74271 * else:
74272 */
74273 if (__pyx_v_use_setstate) {
74274
74275 /* "(tree fragment)":13
74276 * use_setstate = self.refmap is not None or self.refs is not None
74277 * if use_setstate:
74278 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, None), state # <<<<<<<<<<<<<<
74279 * else:
74280 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, state)
74281 */
74282 __Pyx_XDECREF(__pyx_r);
74283 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_BaseIndex); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error)
74284 __Pyx_GOTREF(__pyx_t_3);
74285 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
74286 __Pyx_GOTREF(__pyx_t_1);
74287 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
74288 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
74289 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 13, __pyx_L1_error);
74290 __Pyx_INCREF(__pyx_int_126454353);
74291 __Pyx_GIVEREF(__pyx_int_126454353);
74292 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_126454353)) __PYX_ERR(4, 13, __pyx_L1_error);
74293 __Pyx_INCREF(Py_None);
74294 __Pyx_GIVEREF(Py_None);
74295 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(4, 13, __pyx_L1_error);
74296 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 13, __pyx_L1_error)
74297 __Pyx_GOTREF(__pyx_t_5);
74298 __Pyx_GIVEREF(__pyx_t_3);
74299 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error);
74300 __Pyx_GIVEREF(__pyx_t_1);
74301 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error);
74302 __Pyx_INCREF(__pyx_v_state);
74303 __Pyx_GIVEREF(__pyx_v_state);
74304 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(4, 13, __pyx_L1_error);
74305 __pyx_t_3 = 0;
74306 __pyx_t_1 = 0;
74307 __pyx_r = __pyx_t_5;
74308 __pyx_t_5 = 0;
74309 goto __pyx_L0;
74310
74311 /* "(tree fragment)":12
74312 * else:
74313 * use_setstate = self.refmap is not None or self.refs is not None
74314 * if use_setstate: # <<<<<<<<<<<<<<
74315 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, None), state
74316 * else:
74317 */
74318 }
74319
74320 /* "(tree fragment)":15
74321 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, None), state
74322 * else:
74323 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, state) # <<<<<<<<<<<<<<
74324 * def __setstate_cython__(self, __pyx_state):
74325 * __pyx_unpickle_BaseIndex__set_state(self, __pyx_state)
74326 */
74327 /*else*/ {
74328 __Pyx_XDECREF(__pyx_r);
74329 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_BaseIndex); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error)
74330 __Pyx_GOTREF(__pyx_t_5);
74331 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
74332 __Pyx_GOTREF(__pyx_t_1);
74333 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
74334 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
74335 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(4, 15, __pyx_L1_error);
74336 __Pyx_INCREF(__pyx_int_126454353);
74337 __Pyx_GIVEREF(__pyx_int_126454353);
74338 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_126454353)) __PYX_ERR(4, 15, __pyx_L1_error);
74339 __Pyx_INCREF(__pyx_v_state);
74340 __Pyx_GIVEREF(__pyx_v_state);
74341 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(4, 15, __pyx_L1_error);
74342 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error)
74343 __Pyx_GOTREF(__pyx_t_3);
74344 __Pyx_GIVEREF(__pyx_t_5);
74345 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(4, 15, __pyx_L1_error);
74346 __Pyx_GIVEREF(__pyx_t_1);
74347 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error);
74348 __pyx_t_5 = 0;
74349 __pyx_t_1 = 0;
74350 __pyx_r = __pyx_t_3;
74351 __pyx_t_3 = 0;
74352 goto __pyx_L0;
74353 }
74354
74355 /* "(tree fragment)":1
74356 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
74357 * cdef tuple state
74358 * cdef object _dict
74359 */
74360
74361 /* function exit code */
74362 __pyx_L1_error:;
74363 __Pyx_XDECREF(__pyx_t_1);
74364 __Pyx_XDECREF(__pyx_t_3);
74365 __Pyx_XDECREF(__pyx_t_5);
74366 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74367 __pyx_r = NULL;
74368 __pyx_L0:;
74369 __Pyx_XDECREF(__pyx_v_state);
74370 __Pyx_XDECREF(__pyx_v__dict);
74371 __Pyx_XGIVEREF(__pyx_r);
74372 __Pyx_TraceReturn(__pyx_r, 0);
74373 __Pyx_RefNannyFinishContext();
74374 return __pyx_r;
74375 }
74376
74377 /* "(tree fragment)":16
74378 * else:
74379 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, state)
74380 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
74381 * __pyx_unpickle_BaseIndex__set_state(self, __pyx_state)
74382 */
74383
74384 /* Python wrapper */
74385 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_35__setstate_cython__(PyObject *__pyx_v_self,
74386 #if CYTHON_METH_FASTCALL
74387 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
74388 #else
74389 PyObject *__pyx_args, PyObject *__pyx_kwds
74390 #endif
74391 ); /*proto*/
74392 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_9BaseIndex_34__setstate_cython__, "BaseIndex.__setstate_cython__(self, __pyx_state)");
74393 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9BaseIndex_35__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_35__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_34__setstate_cython__};
74394 static PyObject *__pyx_pw_5pysam_7libcbcf_9BaseIndex_35__setstate_cython__(PyObject *__pyx_v_self,
74395 #if CYTHON_METH_FASTCALL
74396 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
74397 #else
74398 PyObject *__pyx_args, PyObject *__pyx_kwds
74399 #endif
74400 ) {
74401 PyObject *__pyx_v___pyx_state = 0;
74402 #if !CYTHON_METH_FASTCALL
74403 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
74404 #endif
74405 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
74406 PyObject* values[1] = {0};
74407 int __pyx_lineno = 0;
74408 const char *__pyx_filename = NULL;
74409 int __pyx_clineno = 0;
74410 PyObject *__pyx_r = 0;
74411 __Pyx_RefNannyDeclarations
74412 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
74413 #if !CYTHON_METH_FASTCALL
74414 #if CYTHON_ASSUME_SAFE_MACROS
74415 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
74416 #else
74417 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
74418 #endif
74419 #endif
74420 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
74421 {
74422 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
74423 if (__pyx_kwds) {
74424 Py_ssize_t kw_args;
74425 switch (__pyx_nargs) {
74426 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
74427 CYTHON_FALLTHROUGH;
74428 case 0: break;
74429 default: goto __pyx_L5_argtuple_error;
74430 }
74431 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
74432 switch (__pyx_nargs) {
74433 case 0:
74434 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
74435 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
74436 kw_args--;
74437 }
74438 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 16, __pyx_L3_error)
74439 else goto __pyx_L5_argtuple_error;
74440 }
74441 if (unlikely(kw_args > 0)) {
74442 const Py_ssize_t kwd_pos_args = __pyx_nargs;
74443 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 16, __pyx_L3_error)
74444 }
74445 } else if (unlikely(__pyx_nargs != 1)) {
74446 goto __pyx_L5_argtuple_error;
74447 } else {
74448 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
74449 }
74450 __pyx_v___pyx_state = values[0];
74451 }
74452 goto __pyx_L6_skip;
74453 __pyx_L5_argtuple_error:;
74454 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error)
74455 __pyx_L6_skip:;
74456 goto __pyx_L4_argument_unpacking_done;
74457 __pyx_L3_error:;
74458 {
74459 Py_ssize_t __pyx_temp;
74460 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
74461 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
74462 }
74463 }
74464 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74465 __Pyx_RefNannyFinishContext();
74466 return NULL;
74467 __pyx_L4_argument_unpacking_done:;
74468 __pyx_r = __pyx_pf_5pysam_7libcbcf_9BaseIndex_34__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v_self), __pyx_v___pyx_state);
74469
74470 /* function exit code */
74471 {
74472 Py_ssize_t __pyx_temp;
74473 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
74474 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
74475 }
74476 }
74477 __Pyx_RefNannyFinishContext();
74478 return __pyx_r;
74479 }
74480
74481 static PyObject *__pyx_pf_5pysam_7libcbcf_9BaseIndex_34__setstate_cython__(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
74482 PyObject *__pyx_r = NULL;
74483 __Pyx_TraceDeclarations
74484 __Pyx_RefNannyDeclarations
74485 PyObject *__pyx_t_1 = NULL;
74486 int __pyx_lineno = 0;
74487 const char *__pyx_filename = NULL;
74488 int __pyx_clineno = 0;
74489 __Pyx_TraceFrameInit(__pyx_codeobj__209)
74490 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
74491 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 16, 0, __PYX_ERR(4, 16, __pyx_L1_error));
74492
74493 /* "(tree fragment)":17
74494 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, state)
74495 * def __setstate_cython__(self, __pyx_state):
74496 * __pyx_unpickle_BaseIndex__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
74497 */
74498 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 17, __pyx_L1_error)
74499 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_BaseIndex__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 17, __pyx_L1_error)
74500 __Pyx_GOTREF(__pyx_t_1);
74501 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
74502
74503 /* "(tree fragment)":16
74504 * else:
74505 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, state)
74506 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
74507 * __pyx_unpickle_BaseIndex__set_state(self, __pyx_state)
74508 */
74509
74510 /* function exit code */
74511 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
74512 goto __pyx_L0;
74513 __pyx_L1_error:;
74514 __Pyx_XDECREF(__pyx_t_1);
74515 __Pyx_AddTraceback("pysam.libcbcf.BaseIndex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74516 __pyx_r = NULL;
74517 __pyx_L0:;
74518 __Pyx_XGIVEREF(__pyx_r);
74519 __Pyx_TraceReturn(__pyx_r, 0);
74520 __Pyx_RefNannyFinishContext();
74521 return __pyx_r;
74522 }
74523
74524 /* "pysam/libcbcf.pyx":3753
74525 * cdef class BCFIndex(object):
74526 * """CSI index data structure for BCF files"""
74527 * def __init__(self): # <<<<<<<<<<<<<<
74528 * self.refs = ()
74529 * self.refmap = {}
74530 */
74531
74532 /* Python wrapper */
74533 static int __pyx_pw_5pysam_7libcbcf_8BCFIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
74534 static int __pyx_pw_5pysam_7libcbcf_8BCFIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
74535 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
74536 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
74537 int __pyx_r;
74538 __Pyx_RefNannyDeclarations
74539 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
74540 #if CYTHON_ASSUME_SAFE_MACROS
74541 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
74542 #else
74543 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
74544 #endif
74545 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
74546 if (unlikely(__pyx_nargs > 0)) {
74547 __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
74548 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
74549 __pyx_r = __pyx_pf_5pysam_7libcbcf_8BCFIndex___init__(((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)__pyx_v_self));
74550
74551 /* function exit code */
74552 __Pyx_RefNannyFinishContext();
74553 return __pyx_r;
74554 }
74555
74556 static int __pyx_pf_5pysam_7libcbcf_8BCFIndex___init__(struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self) {
74557 int __pyx_v_n;
74558 char const **__pyx_v_refs;
74559 PyObject *__pyx_9genexpr11__pyx_v_i = NULL;
74560 PyObject *__pyx_9genexpr11__pyx_v_r = NULL;
74561 int __pyx_r;
74562 __Pyx_TraceDeclarations
74563 __Pyx_RefNannyDeclarations
74564 PyObject *__pyx_t_1 = NULL;
74565 int __pyx_t_2;
74566 PyObject *__pyx_t_3 = NULL;
74567 struct __pyx_opt_args_5pysam_7libcbcf_char_array_to_tuple __pyx_t_4;
74568 PyObject *__pyx_t_5 = NULL;
74569 Py_ssize_t __pyx_t_6;
74570 PyObject *__pyx_t_7 = NULL;
74571 int __pyx_lineno = 0;
74572 const char *__pyx_filename = NULL;
74573 int __pyx_clineno = 0;
74574 __Pyx_RefNannySetupContext("__init__", 1);
74575 __Pyx_TraceCall("__init__", __pyx_f[0], 3753, 0, __PYX_ERR(0, 3753, __pyx_L1_error));
74576
74577 /* "pysam/libcbcf.pyx":3754
74578 * """CSI index data structure for BCF files"""
74579 * def __init__(self):
74580 * self.refs = () # <<<<<<<<<<<<<<
74581 * self.refmap = {}
74582 *
74583 */
74584 __Pyx_INCREF(__pyx_empty_tuple);
74585 __Pyx_GIVEREF(__pyx_empty_tuple);
74586 __Pyx_GOTREF(__pyx_v_self->__pyx_base.refs);
74587 __Pyx_DECREF(__pyx_v_self->__pyx_base.refs);
74588 __pyx_v_self->__pyx_base.refs = __pyx_empty_tuple;
74589
74590 /* "pysam/libcbcf.pyx":3755
74591 * def __init__(self):
74592 * self.refs = ()
74593 * self.refmap = {} # <<<<<<<<<<<<<<
74594 *
74595 * if not self.ptr:
74596 */
74597 __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3755, __pyx_L1_error)
74598 __Pyx_GOTREF(__pyx_t_1);
74599 __Pyx_GIVEREF(__pyx_t_1);
74600 __Pyx_GOTREF(__pyx_v_self->__pyx_base.refmap);
74601 __Pyx_DECREF(__pyx_v_self->__pyx_base.refmap);
74602 __pyx_v_self->__pyx_base.refmap = ((PyObject*)__pyx_t_1);
74603 __pyx_t_1 = 0;
74604
74605 /* "pysam/libcbcf.pyx":3757
74606 * self.refmap = {}
74607 *
74608 * if not self.ptr: # <<<<<<<<<<<<<<
74609 * raise ValueError('Invalid index object')
74610 *
74611 */
74612 __pyx_t_2 = (!(__pyx_v_self->ptr != 0));
74613 if (unlikely(__pyx_t_2)) {
74614
74615 /* "pysam/libcbcf.pyx":3758
74616 *
74617 * if not self.ptr:
74618 * raise ValueError('Invalid index object') # <<<<<<<<<<<<<<
74619 *
74620 * cdef int n
74621 */
74622 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__210, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3758, __pyx_L1_error)
74623 __Pyx_GOTREF(__pyx_t_1);
74624 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
74625 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
74626 __PYX_ERR(0, 3758, __pyx_L1_error)
74627
74628 /* "pysam/libcbcf.pyx":3757
74629 * self.refmap = {}
74630 *
74631 * if not self.ptr: # <<<<<<<<<<<<<<
74632 * raise ValueError('Invalid index object')
74633 *
74634 */
74635 }
74636
74637 /* "pysam/libcbcf.pyx":3761
74638 *
74639 * cdef int n
74640 * cdef const char **refs = bcf_index_seqnames(self.ptr, self.header.ptr, &n) # <<<<<<<<<<<<<<
74641 *
74642 * self.refs = char_array_to_tuple(refs, n, free_after=1) if refs else ()
74643 */
74644 __pyx_v_refs = bcf_index_seqnames(__pyx_v_self->ptr, __pyx_v_self->header->ptr, (&__pyx_v_n));
74645
74646 /* "pysam/libcbcf.pyx":3763
74647 * cdef const char **refs = bcf_index_seqnames(self.ptr, self.header.ptr, &n)
74648 *
74649 * self.refs = char_array_to_tuple(refs, n, free_after=1) if refs else () # <<<<<<<<<<<<<<
74650 * self.refmap = { r:i for i,r in enumerate(self.refs) }
74651 *
74652 */
74653 __pyx_t_2 = (__pyx_v_refs != 0);
74654 if (__pyx_t_2) {
74655 __pyx_t_4.__pyx_n = 1;
74656 __pyx_t_4.free_after = 1;
74657 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_char_array_to_tuple(__pyx_v_refs, __pyx_v_n, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3763, __pyx_L1_error)
74658 __Pyx_GOTREF(__pyx_t_3);
74659 __pyx_t_1 = __pyx_t_3;
74660 __pyx_t_3 = 0;
74661 } else {
74662 __Pyx_INCREF(__pyx_empty_tuple);
74663 __pyx_t_1 = __pyx_empty_tuple;
74664 }
74665 __Pyx_GIVEREF(__pyx_t_1);
74666 __Pyx_GOTREF(__pyx_v_self->__pyx_base.refs);
74667 __Pyx_DECREF(__pyx_v_self->__pyx_base.refs);
74668 __pyx_v_self->__pyx_base.refs = ((PyObject*)__pyx_t_1);
74669 __pyx_t_1 = 0;
74670
74671 /* "pysam/libcbcf.pyx":3764
74672 *
74673 * self.refs = char_array_to_tuple(refs, n, free_after=1) if refs else ()
74674 * self.refmap = { r:i for i,r in enumerate(self.refs) } # <<<<<<<<<<<<<<
74675 *
74676 * def __dealloc__(self):
74677 */
74678 { /* enter inner scope */
74679 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __pyx_L6_error)
74680 __Pyx_GOTREF(__pyx_t_1);
74681 __Pyx_INCREF(__pyx_int_0);
74682 __pyx_t_3 = __pyx_int_0;
74683 __pyx_t_5 = __pyx_v_self->__pyx_base.refs; __Pyx_INCREF(__pyx_t_5);
74684 __pyx_t_6 = 0;
74685 for (;;) {
74686 {
74687 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
74688 #if !CYTHON_ASSUME_SAFE_MACROS
74689 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3764, __pyx_L6_error)
74690 #endif
74691 if (__pyx_t_6 >= __pyx_temp) break;
74692 }
74693 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
74694 __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 3764, __pyx_L6_error)
74695 #else
74696 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3764, __pyx_L6_error)
74697 __Pyx_GOTREF(__pyx_t_7);
74698 #endif
74699 __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_r, __pyx_t_7);
74700 __pyx_t_7 = 0;
74701 __Pyx_INCREF(__pyx_t_3);
74702 __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_i, __pyx_t_3);
74703 __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3764, __pyx_L6_error)
74704 __Pyx_GOTREF(__pyx_t_7);
74705 __Pyx_DECREF(__pyx_t_3);
74706 __pyx_t_3 = __pyx_t_7;
74707 __pyx_t_7 = 0;
74708 if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr11__pyx_v_r, (PyObject*)__pyx_9genexpr11__pyx_v_i))) __PYX_ERR(0, 3764, __pyx_L6_error)
74709 }
74710 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
74711 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
74712 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_i); __pyx_9genexpr11__pyx_v_i = 0;
74713 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_r); __pyx_9genexpr11__pyx_v_r = 0;
74714 goto __pyx_L10_exit_scope;
74715 __pyx_L6_error:;
74716 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_i); __pyx_9genexpr11__pyx_v_i = 0;
74717 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_r); __pyx_9genexpr11__pyx_v_r = 0;
74718 goto __pyx_L1_error;
74719 __pyx_L10_exit_scope:;
74720 } /* exit inner scope */
74721 __Pyx_GIVEREF(__pyx_t_1);
74722 __Pyx_GOTREF(__pyx_v_self->__pyx_base.refmap);
74723 __Pyx_DECREF(__pyx_v_self->__pyx_base.refmap);
74724 __pyx_v_self->__pyx_base.refmap = ((PyObject*)__pyx_t_1);
74725 __pyx_t_1 = 0;
74726
74727 /* "pysam/libcbcf.pyx":3753
74728 * cdef class BCFIndex(object):
74729 * """CSI index data structure for BCF files"""
74730 * def __init__(self): # <<<<<<<<<<<<<<
74731 * self.refs = ()
74732 * self.refmap = {}
74733 */
74734
74735 /* function exit code */
74736 __pyx_r = 0;
74737 goto __pyx_L0;
74738 __pyx_L1_error:;
74739 __Pyx_XDECREF(__pyx_t_1);
74740 __Pyx_XDECREF(__pyx_t_3);
74741 __Pyx_XDECREF(__pyx_t_5);
74742 __Pyx_XDECREF(__pyx_t_7);
74743 __Pyx_AddTraceback("pysam.libcbcf.BCFIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74744 __pyx_r = -1;
74745 __pyx_L0:;
74746 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_i);
74747 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_r);
74748 __Pyx_TraceReturn(Py_None, 0);
74749 __Pyx_RefNannyFinishContext();
74750 return __pyx_r;
74751 }
74752
74753 /* "pysam/libcbcf.pyx":3766
74754 * self.refmap = { r:i for i,r in enumerate(self.refs) }
74755 *
74756 * def __dealloc__(self): # <<<<<<<<<<<<<<
74757 * if self.ptr:
74758 * hts_idx_destroy(self.ptr)
74759 */
74760
74761 /* Python wrapper */
74762 static void __pyx_pw_5pysam_7libcbcf_8BCFIndex_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
74763 static void __pyx_pw_5pysam_7libcbcf_8BCFIndex_3__dealloc__(PyObject *__pyx_v_self) {
74764 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
74765 __Pyx_RefNannyDeclarations
74766 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
74767 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
74768 __pyx_pf_5pysam_7libcbcf_8BCFIndex_2__dealloc__(((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)__pyx_v_self));
74769
74770 /* function exit code */
74771 __Pyx_RefNannyFinishContext();
74772 }
74773
74774 static void __pyx_pf_5pysam_7libcbcf_8BCFIndex_2__dealloc__(struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self) {
74775 __Pyx_TraceDeclarations
74776 int __pyx_t_1;
74777 int __pyx_lineno = 0;
74778 const char *__pyx_filename = NULL;
74779 int __pyx_clineno = 0;
74780 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3766, 0, __PYX_ERR(0, 3766, __pyx_L1_error));
74781
74782 /* "pysam/libcbcf.pyx":3767
74783 *
74784 * def __dealloc__(self):
74785 * if self.ptr: # <<<<<<<<<<<<<<
74786 * hts_idx_destroy(self.ptr)
74787 * self.ptr = NULL
74788 */
74789 __pyx_t_1 = (__pyx_v_self->ptr != 0);
74790 if (__pyx_t_1) {
74791
74792 /* "pysam/libcbcf.pyx":3768
74793 * def __dealloc__(self):
74794 * if self.ptr:
74795 * hts_idx_destroy(self.ptr) # <<<<<<<<<<<<<<
74796 * self.ptr = NULL
74797 *
74798 */
74799 hts_idx_destroy(__pyx_v_self->ptr);
74800
74801 /* "pysam/libcbcf.pyx":3769
74802 * if self.ptr:
74803 * hts_idx_destroy(self.ptr)
74804 * self.ptr = NULL # <<<<<<<<<<<<<<
74805 *
74806 * def fetch(self, bcf, contig, start, stop, reopen):
74807 */
74808 __pyx_v_self->ptr = NULL;
74809
74810 /* "pysam/libcbcf.pyx":3767
74811 *
74812 * def __dealloc__(self):
74813 * if self.ptr: # <<<<<<<<<<<<<<
74814 * hts_idx_destroy(self.ptr)
74815 * self.ptr = NULL
74816 */
74817 }
74818
74819 /* "pysam/libcbcf.pyx":3766
74820 * self.refmap = { r:i for i,r in enumerate(self.refs) }
74821 *
74822 * def __dealloc__(self): # <<<<<<<<<<<<<<
74823 * if self.ptr:
74824 * hts_idx_destroy(self.ptr)
74825 */
74826
74827 /* function exit code */
74828 goto __pyx_L0;
74829 __pyx_L1_error:;
74830 __Pyx_WriteUnraisable("pysam.libcbcf.BCFIndex.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
74831 __pyx_L0:;
74832 __Pyx_TraceReturn(Py_None, 0);
74833 }
74834
74835 /* "pysam/libcbcf.pyx":3771
74836 * self.ptr = NULL
74837 *
74838 * def fetch(self, bcf, contig, start, stop, reopen): # <<<<<<<<<<<<<<
74839 * return BCFIterator(bcf, contig, start, stop, reopen)
74840 *
74841 */
74842
74843 /* Python wrapper */
74844 static PyObject *__pyx_pw_5pysam_7libcbcf_8BCFIndex_5fetch(PyObject *__pyx_v_self,
74845 #if CYTHON_METH_FASTCALL
74846 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
74847 #else
74848 PyObject *__pyx_args, PyObject *__pyx_kwds
74849 #endif
74850 ); /*proto*/
74851 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_8BCFIndex_4fetch, "BCFIndex.fetch(self, bcf, contig, start, stop, reopen)");
74852 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_8BCFIndex_5fetch = {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_8BCFIndex_5fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_8BCFIndex_4fetch};
74853 static PyObject *__pyx_pw_5pysam_7libcbcf_8BCFIndex_5fetch(PyObject *__pyx_v_self,
74854 #if CYTHON_METH_FASTCALL
74855 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
74856 #else
74857 PyObject *__pyx_args, PyObject *__pyx_kwds
74858 #endif
74859 ) {
74860 PyObject *__pyx_v_bcf = 0;
74861 PyObject *__pyx_v_contig = 0;
74862 PyObject *__pyx_v_start = 0;
74863 PyObject *__pyx_v_stop = 0;
74864 PyObject *__pyx_v_reopen = 0;
74865 #if !CYTHON_METH_FASTCALL
74866 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
74867 #endif
74868 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
74869 PyObject* values[5] = {0,0,0,0,0};
74870 int __pyx_lineno = 0;
74871 const char *__pyx_filename = NULL;
74872 int __pyx_clineno = 0;
74873 PyObject *__pyx_r = 0;
74874 __Pyx_RefNannyDeclarations
74875 __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
74876 #if !CYTHON_METH_FASTCALL
74877 #if CYTHON_ASSUME_SAFE_MACROS
74878 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
74879 #else
74880 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
74881 #endif
74882 #endif
74883 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
74884 {
74885 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bcf,&__pyx_n_s_contig,&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_reopen,0};
74886 if (__pyx_kwds) {
74887 Py_ssize_t kw_args;
74888 switch (__pyx_nargs) {
74889 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
74890 CYTHON_FALLTHROUGH;
74891 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
74892 CYTHON_FALLTHROUGH;
74893 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
74894 CYTHON_FALLTHROUGH;
74895 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
74896 CYTHON_FALLTHROUGH;
74897 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
74898 CYTHON_FALLTHROUGH;
74899 case 0: break;
74900 default: goto __pyx_L5_argtuple_error;
74901 }
74902 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
74903 switch (__pyx_nargs) {
74904 case 0:
74905 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bcf)) != 0)) {
74906 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
74907 kw_args--;
74908 }
74909 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3771, __pyx_L3_error)
74910 else goto __pyx_L5_argtuple_error;
74911 CYTHON_FALLTHROUGH;
74912 case 1:
74913 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_contig)) != 0)) {
74914 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
74915 kw_args--;
74916 }
74917 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3771, __pyx_L3_error)
74918 else {
74919 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, 1); __PYX_ERR(0, 3771, __pyx_L3_error)
74920 }
74921 CYTHON_FALLTHROUGH;
74922 case 2:
74923 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start)) != 0)) {
74924 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
74925 kw_args--;
74926 }
74927 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3771, __pyx_L3_error)
74928 else {
74929 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, 2); __PYX_ERR(0, 3771, __pyx_L3_error)
74930 }
74931 CYTHON_FALLTHROUGH;
74932 case 3:
74933 if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stop)) != 0)) {
74934 (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
74935 kw_args--;
74936 }
74937 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3771, __pyx_L3_error)
74938 else {
74939 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, 3); __PYX_ERR(0, 3771, __pyx_L3_error)
74940 }
74941 CYTHON_FALLTHROUGH;
74942 case 4:
74943 if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reopen)) != 0)) {
74944 (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
74945 kw_args--;
74946 }
74947 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3771, __pyx_L3_error)
74948 else {
74949 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, 4); __PYX_ERR(0, 3771, __pyx_L3_error)
74950 }
74951 }
74952 if (unlikely(kw_args > 0)) {
74953 const Py_ssize_t kwd_pos_args = __pyx_nargs;
74954 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fetch") < 0)) __PYX_ERR(0, 3771, __pyx_L3_error)
74955 }
74956 } else if (unlikely(__pyx_nargs != 5)) {
74957 goto __pyx_L5_argtuple_error;
74958 } else {
74959 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
74960 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
74961 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
74962 values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
74963 values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
74964 }
74965 __pyx_v_bcf = values[0];
74966 __pyx_v_contig = values[1];
74967 __pyx_v_start = values[2];
74968 __pyx_v_stop = values[3];
74969 __pyx_v_reopen = values[4];
74970 }
74971 goto __pyx_L6_skip;
74972 __pyx_L5_argtuple_error:;
74973 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 3771, __pyx_L3_error)
74974 __pyx_L6_skip:;
74975 goto __pyx_L4_argument_unpacking_done;
74976 __pyx_L3_error:;
74977 {
74978 Py_ssize_t __pyx_temp;
74979 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
74980 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
74981 }
74982 }
74983 __Pyx_AddTraceback("pysam.libcbcf.BCFIndex.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
74984 __Pyx_RefNannyFinishContext();
74985 return NULL;
74986 __pyx_L4_argument_unpacking_done:;
74987 __pyx_r = __pyx_pf_5pysam_7libcbcf_8BCFIndex_4fetch(((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)__pyx_v_self), __pyx_v_bcf, __pyx_v_contig, __pyx_v_start, __pyx_v_stop, __pyx_v_reopen);
74988
74989 /* function exit code */
74990 {
74991 Py_ssize_t __pyx_temp;
74992 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
74993 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
74994 }
74995 }
74996 __Pyx_RefNannyFinishContext();
74997 return __pyx_r;
74998 }
74999
75000 static PyObject *__pyx_pf_5pysam_7libcbcf_8BCFIndex_4fetch(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self, PyObject *__pyx_v_bcf, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_reopen) {
75001 PyObject *__pyx_r = NULL;
75002 __Pyx_TraceDeclarations
75003 __Pyx_RefNannyDeclarations
75004 PyObject *__pyx_t_1 = NULL;
75005 PyObject *__pyx_t_2 = NULL;
75006 int __pyx_lineno = 0;
75007 const char *__pyx_filename = NULL;
75008 int __pyx_clineno = 0;
75009 __Pyx_TraceFrameInit(__pyx_codeobj__211)
75010 __Pyx_RefNannySetupContext("fetch", 1);
75011 __Pyx_TraceCall("fetch", __pyx_f[0], 3771, 0, __PYX_ERR(0, 3771, __pyx_L1_error));
75012
75013 /* "pysam/libcbcf.pyx":3772
75014 *
75015 * def fetch(self, bcf, contig, start, stop, reopen):
75016 * return BCFIterator(bcf, contig, start, stop, reopen) # <<<<<<<<<<<<<<
75017 *
75018 *
75019 */
75020 __Pyx_XDECREF(__pyx_r);
75021 __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3772, __pyx_L1_error)
75022 __Pyx_GOTREF(__pyx_t_1);
75023 __Pyx_INCREF(__pyx_v_bcf);
75024 __Pyx_GIVEREF(__pyx_v_bcf);
75025 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_bcf)) __PYX_ERR(0, 3772, __pyx_L1_error);
75026 __Pyx_INCREF(__pyx_v_contig);
75027 __Pyx_GIVEREF(__pyx_v_contig);
75028 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_contig)) __PYX_ERR(0, 3772, __pyx_L1_error);
75029 __Pyx_INCREF(__pyx_v_start);
75030 __Pyx_GIVEREF(__pyx_v_start);
75031 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_start)) __PYX_ERR(0, 3772, __pyx_L1_error);
75032 __Pyx_INCREF(__pyx_v_stop);
75033 __Pyx_GIVEREF(__pyx_v_stop);
75034 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_stop)) __PYX_ERR(0, 3772, __pyx_L1_error);
75035 __Pyx_INCREF(__pyx_v_reopen);
75036 __Pyx_GIVEREF(__pyx_v_reopen);
75037 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_reopen)) __PYX_ERR(0, 3772, __pyx_L1_error);
75038 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pysam_7libcbcf_BCFIterator), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3772, __pyx_L1_error)
75039 __Pyx_GOTREF(__pyx_t_2);
75040 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
75041 __pyx_r = __pyx_t_2;
75042 __pyx_t_2 = 0;
75043 goto __pyx_L0;
75044
75045 /* "pysam/libcbcf.pyx":3771
75046 * self.ptr = NULL
75047 *
75048 * def fetch(self, bcf, contig, start, stop, reopen): # <<<<<<<<<<<<<<
75049 * return BCFIterator(bcf, contig, start, stop, reopen)
75050 *
75051 */
75052
75053 /* function exit code */
75054 __pyx_L1_error:;
75055 __Pyx_XDECREF(__pyx_t_1);
75056 __Pyx_XDECREF(__pyx_t_2);
75057 __Pyx_AddTraceback("pysam.libcbcf.BCFIndex.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
75058 __pyx_r = NULL;
75059 __pyx_L0:;
75060 __Pyx_XGIVEREF(__pyx_r);
75061 __Pyx_TraceReturn(__pyx_r, 0);
75062 __Pyx_RefNannyFinishContext();
75063 return __pyx_r;
75064 }
75065
75066 /* "pysam/libcbcf.pxd":112
75067 *
75068 * cdef class BCFIndex(BaseIndex):
75069 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
75070 * cdef hts_idx_t *ptr
75071 *
75072 */
75073
75074 /* Python wrapper */
75075 static PyObject *__pyx_pw_5pysam_7libcbcf_8BCFIndex_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
75076 static PyObject *__pyx_pw_5pysam_7libcbcf_8BCFIndex_6header_1__get__(PyObject *__pyx_v_self) {
75077 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
75078 PyObject *__pyx_r = 0;
75079 __Pyx_RefNannyDeclarations
75080 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75081 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
75082 __pyx_r = __pyx_pf_5pysam_7libcbcf_8BCFIndex_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)__pyx_v_self));
75083
75084 /* function exit code */
75085 __Pyx_RefNannyFinishContext();
75086 return __pyx_r;
75087 }
75088
75089 static PyObject *__pyx_pf_5pysam_7libcbcf_8BCFIndex_6header___get__(struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self) {
75090 PyObject *__pyx_r = NULL;
75091 __Pyx_TraceDeclarations
75092 __Pyx_RefNannyDeclarations
75093 int __pyx_lineno = 0;
75094 const char *__pyx_filename = NULL;
75095 int __pyx_clineno = 0;
75096 __Pyx_RefNannySetupContext("__get__", 1);
75097 __Pyx_TraceCall("__get__", __pyx_f[3], 112, 0, __PYX_ERR(3, 112, __pyx_L1_error));
75098 __Pyx_XDECREF(__pyx_r);
75099 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
75100 __pyx_r = ((PyObject *)__pyx_v_self->header);
75101 goto __pyx_L0;
75102
75103 /* function exit code */
75104 __pyx_L1_error:;
75105 __Pyx_AddTraceback("pysam.libcbcf.BCFIndex.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75106 __pyx_r = NULL;
75107 __pyx_L0:;
75108 __Pyx_XGIVEREF(__pyx_r);
75109 __Pyx_TraceReturn(__pyx_r, 0);
75110 __Pyx_RefNannyFinishContext();
75111 return __pyx_r;
75112 }
75113
75114 /* "(tree fragment)":1
75115 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
75116 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
75117 * def __setstate_cython__(self, __pyx_state):
75118 */
75119
75120 /* Python wrapper */
75121 static PyObject *__pyx_pw_5pysam_7libcbcf_8BCFIndex_7__reduce_cython__(PyObject *__pyx_v_self,
75122 #if CYTHON_METH_FASTCALL
75123 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
75124 #else
75125 PyObject *__pyx_args, PyObject *__pyx_kwds
75126 #endif
75127 ); /*proto*/
75128 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_8BCFIndex_6__reduce_cython__, "BCFIndex.__reduce_cython__(self)");
75129 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_8BCFIndex_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_8BCFIndex_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_8BCFIndex_6__reduce_cython__};
75130 static PyObject *__pyx_pw_5pysam_7libcbcf_8BCFIndex_7__reduce_cython__(PyObject *__pyx_v_self,
75131 #if CYTHON_METH_FASTCALL
75132 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
75133 #else
75134 PyObject *__pyx_args, PyObject *__pyx_kwds
75135 #endif
75136 ) {
75137 #if !CYTHON_METH_FASTCALL
75138 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
75139 #endif
75140 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
75141 PyObject *__pyx_r = 0;
75142 __Pyx_RefNannyDeclarations
75143 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
75144 #if !CYTHON_METH_FASTCALL
75145 #if CYTHON_ASSUME_SAFE_MACROS
75146 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
75147 #else
75148 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
75149 #endif
75150 #endif
75151 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
75152 if (unlikely(__pyx_nargs > 0)) {
75153 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
75154 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
75155 __pyx_r = __pyx_pf_5pysam_7libcbcf_8BCFIndex_6__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)__pyx_v_self));
75156
75157 /* function exit code */
75158 __Pyx_RefNannyFinishContext();
75159 return __pyx_r;
75160 }
75161
75162 static PyObject *__pyx_pf_5pysam_7libcbcf_8BCFIndex_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self) {
75163 PyObject *__pyx_r = NULL;
75164 __Pyx_TraceDeclarations
75165 __Pyx_RefNannyDeclarations
75166 int __pyx_lineno = 0;
75167 const char *__pyx_filename = NULL;
75168 int __pyx_clineno = 0;
75169 __Pyx_TraceFrameInit(__pyx_codeobj__212)
75170 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
75171 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
75172
75173 /* "(tree fragment)":2
75174 * def __reduce_cython__(self):
75175 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
75176 * def __setstate_cython__(self, __pyx_state):
75177 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
75178 */
75179 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_ptr_cannot_be_converted_to, 0, 0);
75180 __PYX_ERR(4, 2, __pyx_L1_error)
75181
75182 /* "(tree fragment)":1
75183 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
75184 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
75185 * def __setstate_cython__(self, __pyx_state):
75186 */
75187
75188 /* function exit code */
75189 __pyx_L1_error:;
75190 __Pyx_AddTraceback("pysam.libcbcf.BCFIndex.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75191 __pyx_r = NULL;
75192 __Pyx_XGIVEREF(__pyx_r);
75193 __Pyx_TraceReturn(__pyx_r, 0);
75194 __Pyx_RefNannyFinishContext();
75195 return __pyx_r;
75196 }
75197
75198 /* "(tree fragment)":3
75199 * def __reduce_cython__(self):
75200 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
75201 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
75202 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
75203 */
75204
75205 /* Python wrapper */
75206 static PyObject *__pyx_pw_5pysam_7libcbcf_8BCFIndex_9__setstate_cython__(PyObject *__pyx_v_self,
75207 #if CYTHON_METH_FASTCALL
75208 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
75209 #else
75210 PyObject *__pyx_args, PyObject *__pyx_kwds
75211 #endif
75212 ); /*proto*/
75213 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_8BCFIndex_8__setstate_cython__, "BCFIndex.__setstate_cython__(self, __pyx_state)");
75214 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_8BCFIndex_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_8BCFIndex_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_8BCFIndex_8__setstate_cython__};
75215 static PyObject *__pyx_pw_5pysam_7libcbcf_8BCFIndex_9__setstate_cython__(PyObject *__pyx_v_self,
75216 #if CYTHON_METH_FASTCALL
75217 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
75218 #else
75219 PyObject *__pyx_args, PyObject *__pyx_kwds
75220 #endif
75221 ) {
75222 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
75223 #if !CYTHON_METH_FASTCALL
75224 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
75225 #endif
75226 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
75227 PyObject* values[1] = {0};
75228 int __pyx_lineno = 0;
75229 const char *__pyx_filename = NULL;
75230 int __pyx_clineno = 0;
75231 PyObject *__pyx_r = 0;
75232 __Pyx_RefNannyDeclarations
75233 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
75234 #if !CYTHON_METH_FASTCALL
75235 #if CYTHON_ASSUME_SAFE_MACROS
75236 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
75237 #else
75238 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
75239 #endif
75240 #endif
75241 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
75242 {
75243 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
75244 if (__pyx_kwds) {
75245 Py_ssize_t kw_args;
75246 switch (__pyx_nargs) {
75247 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
75248 CYTHON_FALLTHROUGH;
75249 case 0: break;
75250 default: goto __pyx_L5_argtuple_error;
75251 }
75252 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
75253 switch (__pyx_nargs) {
75254 case 0:
75255 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
75256 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
75257 kw_args--;
75258 }
75259 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
75260 else goto __pyx_L5_argtuple_error;
75261 }
75262 if (unlikely(kw_args > 0)) {
75263 const Py_ssize_t kwd_pos_args = __pyx_nargs;
75264 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
75265 }
75266 } else if (unlikely(__pyx_nargs != 1)) {
75267 goto __pyx_L5_argtuple_error;
75268 } else {
75269 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
75270 }
75271 __pyx_v___pyx_state = values[0];
75272 }
75273 goto __pyx_L6_skip;
75274 __pyx_L5_argtuple_error:;
75275 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
75276 __pyx_L6_skip:;
75277 goto __pyx_L4_argument_unpacking_done;
75278 __pyx_L3_error:;
75279 {
75280 Py_ssize_t __pyx_temp;
75281 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
75282 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
75283 }
75284 }
75285 __Pyx_AddTraceback("pysam.libcbcf.BCFIndex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75286 __Pyx_RefNannyFinishContext();
75287 return NULL;
75288 __pyx_L4_argument_unpacking_done:;
75289 __pyx_r = __pyx_pf_5pysam_7libcbcf_8BCFIndex_8__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)__pyx_v_self), __pyx_v___pyx_state);
75290
75291 /* function exit code */
75292 {
75293 Py_ssize_t __pyx_temp;
75294 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
75295 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
75296 }
75297 }
75298 __Pyx_RefNannyFinishContext();
75299 return __pyx_r;
75300 }
75301
75302 static PyObject *__pyx_pf_5pysam_7libcbcf_8BCFIndex_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
75303 PyObject *__pyx_r = NULL;
75304 __Pyx_TraceDeclarations
75305 __Pyx_RefNannyDeclarations
75306 int __pyx_lineno = 0;
75307 const char *__pyx_filename = NULL;
75308 int __pyx_clineno = 0;
75309 __Pyx_TraceFrameInit(__pyx_codeobj__213)
75310 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
75311 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
75312
75313 /* "(tree fragment)":4
75314 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
75315 * def __setstate_cython__(self, __pyx_state):
75316 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
75317 */
75318 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_ptr_cannot_be_converted_to, 0, 0);
75319 __PYX_ERR(4, 4, __pyx_L1_error)
75320
75321 /* "(tree fragment)":3
75322 * def __reduce_cython__(self):
75323 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
75324 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
75325 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
75326 */
75327
75328 /* function exit code */
75329 __pyx_L1_error:;
75330 __Pyx_AddTraceback("pysam.libcbcf.BCFIndex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75331 __pyx_r = NULL;
75332 __Pyx_XGIVEREF(__pyx_r);
75333 __Pyx_TraceReturn(__pyx_r, 0);
75334 __Pyx_RefNannyFinishContext();
75335 return __pyx_r;
75336 }
75337
75338 /* "pysam/libcbcf.pyx":3775
75339 *
75340 *
75341 * cdef BCFIndex makeBCFIndex(VariantHeader header, hts_idx_t *idx): # <<<<<<<<<<<<<<
75342 * if not idx:
75343 * return None
75344 */
75345
75346 static struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_f_5pysam_7libcbcf_makeBCFIndex(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, hts_idx_t *__pyx_v_idx) {
75347 struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_index = 0;
75348 struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_r = NULL;
75349 __Pyx_TraceDeclarations
75350 __Pyx_RefNannyDeclarations
75351 int __pyx_t_1;
75352 int __pyx_t_2;
75353 PyObject *__pyx_t_3 = NULL;
75354 PyObject *__pyx_t_4 = NULL;
75355 PyObject *__pyx_t_5 = NULL;
75356 unsigned int __pyx_t_6;
75357 int __pyx_lineno = 0;
75358 const char *__pyx_filename = NULL;
75359 int __pyx_clineno = 0;
75360 __Pyx_RefNannySetupContext("makeBCFIndex", 1);
75361 __Pyx_TraceCall("makeBCFIndex", __pyx_f[0], 3775, 0, __PYX_ERR(0, 3775, __pyx_L1_error));
75362
75363 /* "pysam/libcbcf.pyx":3776
75364 *
75365 * cdef BCFIndex makeBCFIndex(VariantHeader header, hts_idx_t *idx):
75366 * if not idx: # <<<<<<<<<<<<<<
75367 * return None
75368 *
75369 */
75370 __pyx_t_1 = (!(__pyx_v_idx != 0));
75371 if (__pyx_t_1) {
75372
75373 /* "pysam/libcbcf.pyx":3777
75374 * cdef BCFIndex makeBCFIndex(VariantHeader header, hts_idx_t *idx):
75375 * if not idx:
75376 * return None # <<<<<<<<<<<<<<
75377 *
75378 * if not header:
75379 */
75380 __Pyx_XDECREF((PyObject *)__pyx_r);
75381 __pyx_r = ((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)Py_None); __Pyx_INCREF(Py_None);
75382 goto __pyx_L0;
75383
75384 /* "pysam/libcbcf.pyx":3776
75385 *
75386 * cdef BCFIndex makeBCFIndex(VariantHeader header, hts_idx_t *idx):
75387 * if not idx: # <<<<<<<<<<<<<<
75388 * return None
75389 *
75390 */
75391 }
75392
75393 /* "pysam/libcbcf.pyx":3779
75394 * return None
75395 *
75396 * if not header: # <<<<<<<<<<<<<<
75397 * raise ValueError('invalid VariantHeader')
75398 *
75399 */
75400 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3779, __pyx_L1_error)
75401 __pyx_t_2 = (!__pyx_t_1);
75402 if (unlikely(__pyx_t_2)) {
75403
75404 /* "pysam/libcbcf.pyx":3780
75405 *
75406 * if not header:
75407 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
75408 *
75409 * cdef BCFIndex index = BCFIndex.__new__(BCFIndex)
75410 */
75411 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3780, __pyx_L1_error)
75412 __Pyx_GOTREF(__pyx_t_3);
75413 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
75414 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
75415 __PYX_ERR(0, 3780, __pyx_L1_error)
75416
75417 /* "pysam/libcbcf.pyx":3779
75418 * return None
75419 *
75420 * if not header: # <<<<<<<<<<<<<<
75421 * raise ValueError('invalid VariantHeader')
75422 *
75423 */
75424 }
75425
75426 /* "pysam/libcbcf.pyx":3782
75427 * raise ValueError('invalid VariantHeader')
75428 *
75429 * cdef BCFIndex index = BCFIndex.__new__(BCFIndex) # <<<<<<<<<<<<<<
75430 * index.header = header
75431 * index.ptr = idx
75432 */
75433 __pyx_t_3 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_BCFIndex(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_BCFIndex), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3782, __pyx_L1_error)
75434 __Pyx_GOTREF((PyObject *)__pyx_t_3);
75435 __pyx_v_index = ((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)__pyx_t_3);
75436 __pyx_t_3 = 0;
75437
75438 /* "pysam/libcbcf.pyx":3783
75439 *
75440 * cdef BCFIndex index = BCFIndex.__new__(BCFIndex)
75441 * index.header = header # <<<<<<<<<<<<<<
75442 * index.ptr = idx
75443 * index.__init__()
75444 */
75445 __Pyx_INCREF((PyObject *)__pyx_v_header);
75446 __Pyx_GIVEREF((PyObject *)__pyx_v_header);
75447 __Pyx_GOTREF((PyObject *)__pyx_v_index->header);
75448 __Pyx_DECREF((PyObject *)__pyx_v_index->header);
75449 __pyx_v_index->header = __pyx_v_header;
75450
75451 /* "pysam/libcbcf.pyx":3784
75452 * cdef BCFIndex index = BCFIndex.__new__(BCFIndex)
75453 * index.header = header
75454 * index.ptr = idx # <<<<<<<<<<<<<<
75455 * index.__init__()
75456 *
75457 */
75458 __pyx_v_index->ptr = __pyx_v_idx;
75459
75460 /* "pysam/libcbcf.pyx":3785
75461 * index.header = header
75462 * index.ptr = idx
75463 * index.__init__() # <<<<<<<<<<<<<<
75464 *
75465 * return index
75466 */
75467 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_index), __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L1_error)
75468 __Pyx_GOTREF(__pyx_t_4);
75469 __pyx_t_5 = NULL;
75470 __pyx_t_6 = 0;
75471 #if CYTHON_UNPACK_METHODS
75472 if (likely(PyMethod_Check(__pyx_t_4))) {
75473 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
75474 if (likely(__pyx_t_5)) {
75475 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
75476 __Pyx_INCREF(__pyx_t_5);
75477 __Pyx_INCREF(function);
75478 __Pyx_DECREF_SET(__pyx_t_4, function);
75479 __pyx_t_6 = 1;
75480 }
75481 }
75482 #endif
75483 {
75484 PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
75485 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
75486 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
75487 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3785, __pyx_L1_error)
75488 __Pyx_GOTREF(__pyx_t_3);
75489 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
75490 }
75491 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
75492
75493 /* "pysam/libcbcf.pyx":3787
75494 * index.__init__()
75495 *
75496 * return index # <<<<<<<<<<<<<<
75497 *
75498 *
75499 */
75500 __Pyx_XDECREF((PyObject *)__pyx_r);
75501 __Pyx_INCREF((PyObject *)__pyx_v_index);
75502 __pyx_r = __pyx_v_index;
75503 goto __pyx_L0;
75504
75505 /* "pysam/libcbcf.pyx":3775
75506 *
75507 *
75508 * cdef BCFIndex makeBCFIndex(VariantHeader header, hts_idx_t *idx): # <<<<<<<<<<<<<<
75509 * if not idx:
75510 * return None
75511 */
75512
75513 /* function exit code */
75514 __pyx_L1_error:;
75515 __Pyx_XDECREF(__pyx_t_3);
75516 __Pyx_XDECREF(__pyx_t_4);
75517 __Pyx_XDECREF(__pyx_t_5);
75518 __Pyx_AddTraceback("pysam.libcbcf.makeBCFIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
75519 __pyx_r = 0;
75520 __pyx_L0:;
75521 __Pyx_XDECREF((PyObject *)__pyx_v_index);
75522 __Pyx_XGIVEREF((PyObject *)__pyx_r);
75523 __Pyx_TraceReturn(__pyx_r, 0);
75524 __Pyx_RefNannyFinishContext();
75525 return __pyx_r;
75526 }
75527
75528 /* "pysam/libcbcf.pyx":3792
75529 * cdef class TabixIndex(BaseIndex):
75530 * """Tabix index data structure for VCF files"""
75531 * def __init__(self): # <<<<<<<<<<<<<<
75532 * self.refs = ()
75533 * self.refmap = {}
75534 */
75535
75536 /* Python wrapper */
75537 static int __pyx_pw_5pysam_7libcbcf_10TabixIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
75538 static int __pyx_pw_5pysam_7libcbcf_10TabixIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
75539 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
75540 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
75541 int __pyx_r;
75542 __Pyx_RefNannyDeclarations
75543 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
75544 #if CYTHON_ASSUME_SAFE_MACROS
75545 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
75546 #else
75547 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
75548 #endif
75549 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
75550 if (unlikely(__pyx_nargs > 0)) {
75551 __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
75552 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
75553 __pyx_r = __pyx_pf_5pysam_7libcbcf_10TabixIndex___init__(((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)__pyx_v_self));
75554
75555 /* function exit code */
75556 __Pyx_RefNannyFinishContext();
75557 return __pyx_r;
75558 }
75559
75560 static int __pyx_pf_5pysam_7libcbcf_10TabixIndex___init__(struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self) {
75561 int __pyx_v_n;
75562 char const **__pyx_v_refs;
75563 PyObject *__pyx_9genexpr12__pyx_v_i = NULL;
75564 PyObject *__pyx_9genexpr12__pyx_v_r = NULL;
75565 int __pyx_r;
75566 __Pyx_TraceDeclarations
75567 __Pyx_RefNannyDeclarations
75568 PyObject *__pyx_t_1 = NULL;
75569 int __pyx_t_2;
75570 PyObject *__pyx_t_3 = NULL;
75571 struct __pyx_opt_args_5pysam_7libcbcf_char_array_to_tuple __pyx_t_4;
75572 PyObject *__pyx_t_5 = NULL;
75573 Py_ssize_t __pyx_t_6;
75574 PyObject *__pyx_t_7 = NULL;
75575 int __pyx_lineno = 0;
75576 const char *__pyx_filename = NULL;
75577 int __pyx_clineno = 0;
75578 __Pyx_RefNannySetupContext("__init__", 1);
75579 __Pyx_TraceCall("__init__", __pyx_f[0], 3792, 0, __PYX_ERR(0, 3792, __pyx_L1_error));
75580
75581 /* "pysam/libcbcf.pyx":3793
75582 * """Tabix index data structure for VCF files"""
75583 * def __init__(self):
75584 * self.refs = () # <<<<<<<<<<<<<<
75585 * self.refmap = {}
75586 *
75587 */
75588 __Pyx_INCREF(__pyx_empty_tuple);
75589 __Pyx_GIVEREF(__pyx_empty_tuple);
75590 __Pyx_GOTREF(__pyx_v_self->__pyx_base.refs);
75591 __Pyx_DECREF(__pyx_v_self->__pyx_base.refs);
75592 __pyx_v_self->__pyx_base.refs = __pyx_empty_tuple;
75593
75594 /* "pysam/libcbcf.pyx":3794
75595 * def __init__(self):
75596 * self.refs = ()
75597 * self.refmap = {} # <<<<<<<<<<<<<<
75598 *
75599 * if not self.ptr:
75600 */
75601 __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3794, __pyx_L1_error)
75602 __Pyx_GOTREF(__pyx_t_1);
75603 __Pyx_GIVEREF(__pyx_t_1);
75604 __Pyx_GOTREF(__pyx_v_self->__pyx_base.refmap);
75605 __Pyx_DECREF(__pyx_v_self->__pyx_base.refmap);
75606 __pyx_v_self->__pyx_base.refmap = ((PyObject*)__pyx_t_1);
75607 __pyx_t_1 = 0;
75608
75609 /* "pysam/libcbcf.pyx":3796
75610 * self.refmap = {}
75611 *
75612 * if not self.ptr: # <<<<<<<<<<<<<<
75613 * raise ValueError('Invalid index object')
75614 *
75615 */
75616 __pyx_t_2 = (!(__pyx_v_self->ptr != 0));
75617 if (unlikely(__pyx_t_2)) {
75618
75619 /* "pysam/libcbcf.pyx":3797
75620 *
75621 * if not self.ptr:
75622 * raise ValueError('Invalid index object') # <<<<<<<<<<<<<<
75623 *
75624 * cdef int n
75625 */
75626 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__210, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3797, __pyx_L1_error)
75627 __Pyx_GOTREF(__pyx_t_1);
75628 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
75629 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
75630 __PYX_ERR(0, 3797, __pyx_L1_error)
75631
75632 /* "pysam/libcbcf.pyx":3796
75633 * self.refmap = {}
75634 *
75635 * if not self.ptr: # <<<<<<<<<<<<<<
75636 * raise ValueError('Invalid index object')
75637 *
75638 */
75639 }
75640
75641 /* "pysam/libcbcf.pyx":3800
75642 *
75643 * cdef int n
75644 * cdef const char **refs = tbx_seqnames(self.ptr, &n) # <<<<<<<<<<<<<<
75645 *
75646 * self.refs = char_array_to_tuple(refs, n, free_after=1) if refs else ()
75647 */
75648 __pyx_v_refs = tbx_seqnames(__pyx_v_self->ptr, (&__pyx_v_n));
75649
75650 /* "pysam/libcbcf.pyx":3802
75651 * cdef const char **refs = tbx_seqnames(self.ptr, &n)
75652 *
75653 * self.refs = char_array_to_tuple(refs, n, free_after=1) if refs else () # <<<<<<<<<<<<<<
75654 * self.refmap = { r:i for i,r in enumerate(self.refs) }
75655 *
75656 */
75657 __pyx_t_2 = (__pyx_v_refs != 0);
75658 if (__pyx_t_2) {
75659 __pyx_t_4.__pyx_n = 1;
75660 __pyx_t_4.free_after = 1;
75661 __pyx_t_3 = __pyx_f_5pysam_7libcbcf_char_array_to_tuple(__pyx_v_refs, __pyx_v_n, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3802, __pyx_L1_error)
75662 __Pyx_GOTREF(__pyx_t_3);
75663 __pyx_t_1 = __pyx_t_3;
75664 __pyx_t_3 = 0;
75665 } else {
75666 __Pyx_INCREF(__pyx_empty_tuple);
75667 __pyx_t_1 = __pyx_empty_tuple;
75668 }
75669 __Pyx_GIVEREF(__pyx_t_1);
75670 __Pyx_GOTREF(__pyx_v_self->__pyx_base.refs);
75671 __Pyx_DECREF(__pyx_v_self->__pyx_base.refs);
75672 __pyx_v_self->__pyx_base.refs = ((PyObject*)__pyx_t_1);
75673 __pyx_t_1 = 0;
75674
75675 /* "pysam/libcbcf.pyx":3803
75676 *
75677 * self.refs = char_array_to_tuple(refs, n, free_after=1) if refs else ()
75678 * self.refmap = { r:i for i,r in enumerate(self.refs) } # <<<<<<<<<<<<<<
75679 *
75680 * def __dealloc__(self):
75681 */
75682 { /* enter inner scope */
75683 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3803, __pyx_L6_error)
75684 __Pyx_GOTREF(__pyx_t_1);
75685 __Pyx_INCREF(__pyx_int_0);
75686 __pyx_t_3 = __pyx_int_0;
75687 __pyx_t_5 = __pyx_v_self->__pyx_base.refs; __Pyx_INCREF(__pyx_t_5);
75688 __pyx_t_6 = 0;
75689 for (;;) {
75690 {
75691 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
75692 #if !CYTHON_ASSUME_SAFE_MACROS
75693 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3803, __pyx_L6_error)
75694 #endif
75695 if (__pyx_t_6 >= __pyx_temp) break;
75696 }
75697 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
75698 __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 3803, __pyx_L6_error)
75699 #else
75700 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3803, __pyx_L6_error)
75701 __Pyx_GOTREF(__pyx_t_7);
75702 #endif
75703 __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_r, __pyx_t_7);
75704 __pyx_t_7 = 0;
75705 __Pyx_INCREF(__pyx_t_3);
75706 __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_i, __pyx_t_3);
75707 __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3803, __pyx_L6_error)
75708 __Pyx_GOTREF(__pyx_t_7);
75709 __Pyx_DECREF(__pyx_t_3);
75710 __pyx_t_3 = __pyx_t_7;
75711 __pyx_t_7 = 0;
75712 if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr12__pyx_v_r, (PyObject*)__pyx_9genexpr12__pyx_v_i))) __PYX_ERR(0, 3803, __pyx_L6_error)
75713 }
75714 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
75715 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
75716 __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i); __pyx_9genexpr12__pyx_v_i = 0;
75717 __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_r); __pyx_9genexpr12__pyx_v_r = 0;
75718 goto __pyx_L10_exit_scope;
75719 __pyx_L6_error:;
75720 __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i); __pyx_9genexpr12__pyx_v_i = 0;
75721 __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_r); __pyx_9genexpr12__pyx_v_r = 0;
75722 goto __pyx_L1_error;
75723 __pyx_L10_exit_scope:;
75724 } /* exit inner scope */
75725 __Pyx_GIVEREF(__pyx_t_1);
75726 __Pyx_GOTREF(__pyx_v_self->__pyx_base.refmap);
75727 __Pyx_DECREF(__pyx_v_self->__pyx_base.refmap);
75728 __pyx_v_self->__pyx_base.refmap = ((PyObject*)__pyx_t_1);
75729 __pyx_t_1 = 0;
75730
75731 /* "pysam/libcbcf.pyx":3792
75732 * cdef class TabixIndex(BaseIndex):
75733 * """Tabix index data structure for VCF files"""
75734 * def __init__(self): # <<<<<<<<<<<<<<
75735 * self.refs = ()
75736 * self.refmap = {}
75737 */
75738
75739 /* function exit code */
75740 __pyx_r = 0;
75741 goto __pyx_L0;
75742 __pyx_L1_error:;
75743 __Pyx_XDECREF(__pyx_t_1);
75744 __Pyx_XDECREF(__pyx_t_3);
75745 __Pyx_XDECREF(__pyx_t_5);
75746 __Pyx_XDECREF(__pyx_t_7);
75747 __Pyx_AddTraceback("pysam.libcbcf.TabixIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75748 __pyx_r = -1;
75749 __pyx_L0:;
75750 __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i);
75751 __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_r);
75752 __Pyx_TraceReturn(Py_None, 0);
75753 __Pyx_RefNannyFinishContext();
75754 return __pyx_r;
75755 }
75756
75757 /* "pysam/libcbcf.pyx":3805
75758 * self.refmap = { r:i for i,r in enumerate(self.refs) }
75759 *
75760 * def __dealloc__(self): # <<<<<<<<<<<<<<
75761 * if self.ptr:
75762 * tbx_destroy(self.ptr)
75763 */
75764
75765 /* Python wrapper */
75766 static void __pyx_pw_5pysam_7libcbcf_10TabixIndex_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
75767 static void __pyx_pw_5pysam_7libcbcf_10TabixIndex_3__dealloc__(PyObject *__pyx_v_self) {
75768 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
75769 __Pyx_RefNannyDeclarations
75770 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
75771 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
75772 __pyx_pf_5pysam_7libcbcf_10TabixIndex_2__dealloc__(((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)__pyx_v_self));
75773
75774 /* function exit code */
75775 __Pyx_RefNannyFinishContext();
75776 }
75777
75778 static void __pyx_pf_5pysam_7libcbcf_10TabixIndex_2__dealloc__(struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self) {
75779 __Pyx_TraceDeclarations
75780 int __pyx_t_1;
75781 int __pyx_lineno = 0;
75782 const char *__pyx_filename = NULL;
75783 int __pyx_clineno = 0;
75784 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3805, 0, __PYX_ERR(0, 3805, __pyx_L1_error));
75785
75786 /* "pysam/libcbcf.pyx":3806
75787 *
75788 * def __dealloc__(self):
75789 * if self.ptr: # <<<<<<<<<<<<<<
75790 * tbx_destroy(self.ptr)
75791 * self.ptr = NULL
75792 */
75793 __pyx_t_1 = (__pyx_v_self->ptr != 0);
75794 if (__pyx_t_1) {
75795
75796 /* "pysam/libcbcf.pyx":3807
75797 * def __dealloc__(self):
75798 * if self.ptr:
75799 * tbx_destroy(self.ptr) # <<<<<<<<<<<<<<
75800 * self.ptr = NULL
75801 *
75802 */
75803 tbx_destroy(__pyx_v_self->ptr);
75804
75805 /* "pysam/libcbcf.pyx":3808
75806 * if self.ptr:
75807 * tbx_destroy(self.ptr)
75808 * self.ptr = NULL # <<<<<<<<<<<<<<
75809 *
75810 * def fetch(self, bcf, contig, start, stop, reopen):
75811 */
75812 __pyx_v_self->ptr = NULL;
75813
75814 /* "pysam/libcbcf.pyx":3806
75815 *
75816 * def __dealloc__(self):
75817 * if self.ptr: # <<<<<<<<<<<<<<
75818 * tbx_destroy(self.ptr)
75819 * self.ptr = NULL
75820 */
75821 }
75822
75823 /* "pysam/libcbcf.pyx":3805
75824 * self.refmap = { r:i for i,r in enumerate(self.refs) }
75825 *
75826 * def __dealloc__(self): # <<<<<<<<<<<<<<
75827 * if self.ptr:
75828 * tbx_destroy(self.ptr)
75829 */
75830
75831 /* function exit code */
75832 goto __pyx_L0;
75833 __pyx_L1_error:;
75834 __Pyx_WriteUnraisable("pysam.libcbcf.TabixIndex.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
75835 __pyx_L0:;
75836 __Pyx_TraceReturn(Py_None, 0);
75837 }
75838
75839 /* "pysam/libcbcf.pyx":3810
75840 * self.ptr = NULL
75841 *
75842 * def fetch(self, bcf, contig, start, stop, reopen): # <<<<<<<<<<<<<<
75843 * return TabixIterator(bcf, contig, start, stop, reopen)
75844 *
75845 */
75846
75847 /* Python wrapper */
75848 static PyObject *__pyx_pw_5pysam_7libcbcf_10TabixIndex_5fetch(PyObject *__pyx_v_self,
75849 #if CYTHON_METH_FASTCALL
75850 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
75851 #else
75852 PyObject *__pyx_args, PyObject *__pyx_kwds
75853 #endif
75854 ); /*proto*/
75855 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_10TabixIndex_4fetch, "TabixIndex.fetch(self, bcf, contig, start, stop, reopen)");
75856 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_10TabixIndex_5fetch = {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_10TabixIndex_5fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_10TabixIndex_4fetch};
75857 static PyObject *__pyx_pw_5pysam_7libcbcf_10TabixIndex_5fetch(PyObject *__pyx_v_self,
75858 #if CYTHON_METH_FASTCALL
75859 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
75860 #else
75861 PyObject *__pyx_args, PyObject *__pyx_kwds
75862 #endif
75863 ) {
75864 PyObject *__pyx_v_bcf = 0;
75865 PyObject *__pyx_v_contig = 0;
75866 PyObject *__pyx_v_start = 0;
75867 PyObject *__pyx_v_stop = 0;
75868 PyObject *__pyx_v_reopen = 0;
75869 #if !CYTHON_METH_FASTCALL
75870 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
75871 #endif
75872 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
75873 PyObject* values[5] = {0,0,0,0,0};
75874 int __pyx_lineno = 0;
75875 const char *__pyx_filename = NULL;
75876 int __pyx_clineno = 0;
75877 PyObject *__pyx_r = 0;
75878 __Pyx_RefNannyDeclarations
75879 __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
75880 #if !CYTHON_METH_FASTCALL
75881 #if CYTHON_ASSUME_SAFE_MACROS
75882 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
75883 #else
75884 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
75885 #endif
75886 #endif
75887 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
75888 {
75889 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bcf,&__pyx_n_s_contig,&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_reopen,0};
75890 if (__pyx_kwds) {
75891 Py_ssize_t kw_args;
75892 switch (__pyx_nargs) {
75893 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
75894 CYTHON_FALLTHROUGH;
75895 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
75896 CYTHON_FALLTHROUGH;
75897 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
75898 CYTHON_FALLTHROUGH;
75899 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
75900 CYTHON_FALLTHROUGH;
75901 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
75902 CYTHON_FALLTHROUGH;
75903 case 0: break;
75904 default: goto __pyx_L5_argtuple_error;
75905 }
75906 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
75907 switch (__pyx_nargs) {
75908 case 0:
75909 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bcf)) != 0)) {
75910 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
75911 kw_args--;
75912 }
75913 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3810, __pyx_L3_error)
75914 else goto __pyx_L5_argtuple_error;
75915 CYTHON_FALLTHROUGH;
75916 case 1:
75917 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_contig)) != 0)) {
75918 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
75919 kw_args--;
75920 }
75921 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3810, __pyx_L3_error)
75922 else {
75923 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, 1); __PYX_ERR(0, 3810, __pyx_L3_error)
75924 }
75925 CYTHON_FALLTHROUGH;
75926 case 2:
75927 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start)) != 0)) {
75928 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
75929 kw_args--;
75930 }
75931 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3810, __pyx_L3_error)
75932 else {
75933 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, 2); __PYX_ERR(0, 3810, __pyx_L3_error)
75934 }
75935 CYTHON_FALLTHROUGH;
75936 case 3:
75937 if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stop)) != 0)) {
75938 (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
75939 kw_args--;
75940 }
75941 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3810, __pyx_L3_error)
75942 else {
75943 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, 3); __PYX_ERR(0, 3810, __pyx_L3_error)
75944 }
75945 CYTHON_FALLTHROUGH;
75946 case 4:
75947 if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reopen)) != 0)) {
75948 (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
75949 kw_args--;
75950 }
75951 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3810, __pyx_L3_error)
75952 else {
75953 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, 4); __PYX_ERR(0, 3810, __pyx_L3_error)
75954 }
75955 }
75956 if (unlikely(kw_args > 0)) {
75957 const Py_ssize_t kwd_pos_args = __pyx_nargs;
75958 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fetch") < 0)) __PYX_ERR(0, 3810, __pyx_L3_error)
75959 }
75960 } else if (unlikely(__pyx_nargs != 5)) {
75961 goto __pyx_L5_argtuple_error;
75962 } else {
75963 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
75964 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
75965 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
75966 values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
75967 values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
75968 }
75969 __pyx_v_bcf = values[0];
75970 __pyx_v_contig = values[1];
75971 __pyx_v_start = values[2];
75972 __pyx_v_stop = values[3];
75973 __pyx_v_reopen = values[4];
75974 }
75975 goto __pyx_L6_skip;
75976 __pyx_L5_argtuple_error:;
75977 __Pyx_RaiseArgtupleInvalid("fetch", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 3810, __pyx_L3_error)
75978 __pyx_L6_skip:;
75979 goto __pyx_L4_argument_unpacking_done;
75980 __pyx_L3_error:;
75981 {
75982 Py_ssize_t __pyx_temp;
75983 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
75984 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
75985 }
75986 }
75987 __Pyx_AddTraceback("pysam.libcbcf.TabixIndex.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
75988 __Pyx_RefNannyFinishContext();
75989 return NULL;
75990 __pyx_L4_argument_unpacking_done:;
75991 __pyx_r = __pyx_pf_5pysam_7libcbcf_10TabixIndex_4fetch(((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)__pyx_v_self), __pyx_v_bcf, __pyx_v_contig, __pyx_v_start, __pyx_v_stop, __pyx_v_reopen);
75992
75993 /* function exit code */
75994 {
75995 Py_ssize_t __pyx_temp;
75996 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
75997 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
75998 }
75999 }
76000 __Pyx_RefNannyFinishContext();
76001 return __pyx_r;
76002 }
76003
76004 static PyObject *__pyx_pf_5pysam_7libcbcf_10TabixIndex_4fetch(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self, PyObject *__pyx_v_bcf, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_reopen) {
76005 PyObject *__pyx_r = NULL;
76006 __Pyx_TraceDeclarations
76007 __Pyx_RefNannyDeclarations
76008 PyObject *__pyx_t_1 = NULL;
76009 PyObject *__pyx_t_2 = NULL;
76010 int __pyx_lineno = 0;
76011 const char *__pyx_filename = NULL;
76012 int __pyx_clineno = 0;
76013 __Pyx_TraceFrameInit(__pyx_codeobj__214)
76014 __Pyx_RefNannySetupContext("fetch", 1);
76015 __Pyx_TraceCall("fetch", __pyx_f[0], 3810, 0, __PYX_ERR(0, 3810, __pyx_L1_error));
76016
76017 /* "pysam/libcbcf.pyx":3811
76018 *
76019 * def fetch(self, bcf, contig, start, stop, reopen):
76020 * return TabixIterator(bcf, contig, start, stop, reopen) # <<<<<<<<<<<<<<
76021 *
76022 *
76023 */
76024 __Pyx_XDECREF(__pyx_r);
76025 __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3811, __pyx_L1_error)
76026 __Pyx_GOTREF(__pyx_t_1);
76027 __Pyx_INCREF(__pyx_v_bcf);
76028 __Pyx_GIVEREF(__pyx_v_bcf);
76029 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_bcf)) __PYX_ERR(0, 3811, __pyx_L1_error);
76030 __Pyx_INCREF(__pyx_v_contig);
76031 __Pyx_GIVEREF(__pyx_v_contig);
76032 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_contig)) __PYX_ERR(0, 3811, __pyx_L1_error);
76033 __Pyx_INCREF(__pyx_v_start);
76034 __Pyx_GIVEREF(__pyx_v_start);
76035 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_start)) __PYX_ERR(0, 3811, __pyx_L1_error);
76036 __Pyx_INCREF(__pyx_v_stop);
76037 __Pyx_GIVEREF(__pyx_v_stop);
76038 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_stop)) __PYX_ERR(0, 3811, __pyx_L1_error);
76039 __Pyx_INCREF(__pyx_v_reopen);
76040 __Pyx_GIVEREF(__pyx_v_reopen);
76041 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_reopen)) __PYX_ERR(0, 3811, __pyx_L1_error);
76042 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pysam_7libcbcf_TabixIterator), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3811, __pyx_L1_error)
76043 __Pyx_GOTREF(__pyx_t_2);
76044 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
76045 __pyx_r = __pyx_t_2;
76046 __pyx_t_2 = 0;
76047 goto __pyx_L0;
76048
76049 /* "pysam/libcbcf.pyx":3810
76050 * self.ptr = NULL
76051 *
76052 * def fetch(self, bcf, contig, start, stop, reopen): # <<<<<<<<<<<<<<
76053 * return TabixIterator(bcf, contig, start, stop, reopen)
76054 *
76055 */
76056
76057 /* function exit code */
76058 __pyx_L1_error:;
76059 __Pyx_XDECREF(__pyx_t_1);
76060 __Pyx_XDECREF(__pyx_t_2);
76061 __Pyx_AddTraceback("pysam.libcbcf.TabixIndex.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
76062 __pyx_r = NULL;
76063 __pyx_L0:;
76064 __Pyx_XGIVEREF(__pyx_r);
76065 __Pyx_TraceReturn(__pyx_r, 0);
76066 __Pyx_RefNannyFinishContext();
76067 return __pyx_r;
76068 }
76069
76070 /* "(tree fragment)":1
76071 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
76072 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
76073 * def __setstate_cython__(self, __pyx_state):
76074 */
76075
76076 /* Python wrapper */
76077 static PyObject *__pyx_pw_5pysam_7libcbcf_10TabixIndex_7__reduce_cython__(PyObject *__pyx_v_self,
76078 #if CYTHON_METH_FASTCALL
76079 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
76080 #else
76081 PyObject *__pyx_args, PyObject *__pyx_kwds
76082 #endif
76083 ); /*proto*/
76084 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_10TabixIndex_6__reduce_cython__, "TabixIndex.__reduce_cython__(self)");
76085 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_10TabixIndex_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_10TabixIndex_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_10TabixIndex_6__reduce_cython__};
76086 static PyObject *__pyx_pw_5pysam_7libcbcf_10TabixIndex_7__reduce_cython__(PyObject *__pyx_v_self,
76087 #if CYTHON_METH_FASTCALL
76088 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
76089 #else
76090 PyObject *__pyx_args, PyObject *__pyx_kwds
76091 #endif
76092 ) {
76093 #if !CYTHON_METH_FASTCALL
76094 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
76095 #endif
76096 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
76097 PyObject *__pyx_r = 0;
76098 __Pyx_RefNannyDeclarations
76099 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
76100 #if !CYTHON_METH_FASTCALL
76101 #if CYTHON_ASSUME_SAFE_MACROS
76102 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
76103 #else
76104 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
76105 #endif
76106 #endif
76107 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
76108 if (unlikely(__pyx_nargs > 0)) {
76109 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
76110 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
76111 __pyx_r = __pyx_pf_5pysam_7libcbcf_10TabixIndex_6__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)__pyx_v_self));
76112
76113 /* function exit code */
76114 __Pyx_RefNannyFinishContext();
76115 return __pyx_r;
76116 }
76117
76118 static PyObject *__pyx_pf_5pysam_7libcbcf_10TabixIndex_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self) {
76119 PyObject *__pyx_r = NULL;
76120 __Pyx_TraceDeclarations
76121 __Pyx_RefNannyDeclarations
76122 int __pyx_lineno = 0;
76123 const char *__pyx_filename = NULL;
76124 int __pyx_clineno = 0;
76125 __Pyx_TraceFrameInit(__pyx_codeobj__215)
76126 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
76127 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
76128
76129 /* "(tree fragment)":2
76130 * def __reduce_cython__(self):
76131 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
76132 * def __setstate_cython__(self, __pyx_state):
76133 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
76134 */
76135 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_ptr_cannot_be_converted_to, 0, 0);
76136 __PYX_ERR(4, 2, __pyx_L1_error)
76137
76138 /* "(tree fragment)":1
76139 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
76140 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
76141 * def __setstate_cython__(self, __pyx_state):
76142 */
76143
76144 /* function exit code */
76145 __pyx_L1_error:;
76146 __Pyx_AddTraceback("pysam.libcbcf.TabixIndex.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76147 __pyx_r = NULL;
76148 __Pyx_XGIVEREF(__pyx_r);
76149 __Pyx_TraceReturn(__pyx_r, 0);
76150 __Pyx_RefNannyFinishContext();
76151 return __pyx_r;
76152 }
76153
76154 /* "(tree fragment)":3
76155 * def __reduce_cython__(self):
76156 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
76157 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
76158 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
76159 */
76160
76161 /* Python wrapper */
76162 static PyObject *__pyx_pw_5pysam_7libcbcf_10TabixIndex_9__setstate_cython__(PyObject *__pyx_v_self,
76163 #if CYTHON_METH_FASTCALL
76164 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
76165 #else
76166 PyObject *__pyx_args, PyObject *__pyx_kwds
76167 #endif
76168 ); /*proto*/
76169 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_10TabixIndex_8__setstate_cython__, "TabixIndex.__setstate_cython__(self, __pyx_state)");
76170 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_10TabixIndex_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_10TabixIndex_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_10TabixIndex_8__setstate_cython__};
76171 static PyObject *__pyx_pw_5pysam_7libcbcf_10TabixIndex_9__setstate_cython__(PyObject *__pyx_v_self,
76172 #if CYTHON_METH_FASTCALL
76173 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
76174 #else
76175 PyObject *__pyx_args, PyObject *__pyx_kwds
76176 #endif
76177 ) {
76178 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
76179 #if !CYTHON_METH_FASTCALL
76180 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
76181 #endif
76182 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
76183 PyObject* values[1] = {0};
76184 int __pyx_lineno = 0;
76185 const char *__pyx_filename = NULL;
76186 int __pyx_clineno = 0;
76187 PyObject *__pyx_r = 0;
76188 __Pyx_RefNannyDeclarations
76189 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
76190 #if !CYTHON_METH_FASTCALL
76191 #if CYTHON_ASSUME_SAFE_MACROS
76192 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
76193 #else
76194 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
76195 #endif
76196 #endif
76197 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
76198 {
76199 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
76200 if (__pyx_kwds) {
76201 Py_ssize_t kw_args;
76202 switch (__pyx_nargs) {
76203 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
76204 CYTHON_FALLTHROUGH;
76205 case 0: break;
76206 default: goto __pyx_L5_argtuple_error;
76207 }
76208 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
76209 switch (__pyx_nargs) {
76210 case 0:
76211 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
76212 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
76213 kw_args--;
76214 }
76215 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
76216 else goto __pyx_L5_argtuple_error;
76217 }
76218 if (unlikely(kw_args > 0)) {
76219 const Py_ssize_t kwd_pos_args = __pyx_nargs;
76220 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
76221 }
76222 } else if (unlikely(__pyx_nargs != 1)) {
76223 goto __pyx_L5_argtuple_error;
76224 } else {
76225 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
76226 }
76227 __pyx_v___pyx_state = values[0];
76228 }
76229 goto __pyx_L6_skip;
76230 __pyx_L5_argtuple_error:;
76231 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
76232 __pyx_L6_skip:;
76233 goto __pyx_L4_argument_unpacking_done;
76234 __pyx_L3_error:;
76235 {
76236 Py_ssize_t __pyx_temp;
76237 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
76238 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
76239 }
76240 }
76241 __Pyx_AddTraceback("pysam.libcbcf.TabixIndex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76242 __Pyx_RefNannyFinishContext();
76243 return NULL;
76244 __pyx_L4_argument_unpacking_done:;
76245 __pyx_r = __pyx_pf_5pysam_7libcbcf_10TabixIndex_8__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)__pyx_v_self), __pyx_v___pyx_state);
76246
76247 /* function exit code */
76248 {
76249 Py_ssize_t __pyx_temp;
76250 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
76251 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
76252 }
76253 }
76254 __Pyx_RefNannyFinishContext();
76255 return __pyx_r;
76256 }
76257
76258 static PyObject *__pyx_pf_5pysam_7libcbcf_10TabixIndex_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
76259 PyObject *__pyx_r = NULL;
76260 __Pyx_TraceDeclarations
76261 __Pyx_RefNannyDeclarations
76262 int __pyx_lineno = 0;
76263 const char *__pyx_filename = NULL;
76264 int __pyx_clineno = 0;
76265 __Pyx_TraceFrameInit(__pyx_codeobj__216)
76266 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
76267 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
76268
76269 /* "(tree fragment)":4
76270 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
76271 * def __setstate_cython__(self, __pyx_state):
76272 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
76273 */
76274 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_ptr_cannot_be_converted_to, 0, 0);
76275 __PYX_ERR(4, 4, __pyx_L1_error)
76276
76277 /* "(tree fragment)":3
76278 * def __reduce_cython__(self):
76279 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
76280 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
76281 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
76282 */
76283
76284 /* function exit code */
76285 __pyx_L1_error:;
76286 __Pyx_AddTraceback("pysam.libcbcf.TabixIndex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76287 __pyx_r = NULL;
76288 __Pyx_XGIVEREF(__pyx_r);
76289 __Pyx_TraceReturn(__pyx_r, 0);
76290 __Pyx_RefNannyFinishContext();
76291 return __pyx_r;
76292 }
76293
76294 /* "pysam/libcbcf.pyx":3814
76295 *
76296 *
76297 * cdef TabixIndex makeTabixIndex(tbx_t *idx): # <<<<<<<<<<<<<<
76298 * if not idx:
76299 * return None
76300 */
76301
76302 static struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_f_5pysam_7libcbcf_makeTabixIndex(tbx_t *__pyx_v_idx) {
76303 struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_index = 0;
76304 struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_r = NULL;
76305 __Pyx_TraceDeclarations
76306 __Pyx_RefNannyDeclarations
76307 int __pyx_t_1;
76308 PyObject *__pyx_t_2 = NULL;
76309 PyObject *__pyx_t_3 = NULL;
76310 PyObject *__pyx_t_4 = NULL;
76311 unsigned int __pyx_t_5;
76312 int __pyx_lineno = 0;
76313 const char *__pyx_filename = NULL;
76314 int __pyx_clineno = 0;
76315 __Pyx_RefNannySetupContext("makeTabixIndex", 1);
76316 __Pyx_TraceCall("makeTabixIndex", __pyx_f[0], 3814, 0, __PYX_ERR(0, 3814, __pyx_L1_error));
76317
76318 /* "pysam/libcbcf.pyx":3815
76319 *
76320 * cdef TabixIndex makeTabixIndex(tbx_t *idx):
76321 * if not idx: # <<<<<<<<<<<<<<
76322 * return None
76323 *
76324 */
76325 __pyx_t_1 = (!(__pyx_v_idx != 0));
76326 if (__pyx_t_1) {
76327
76328 /* "pysam/libcbcf.pyx":3816
76329 * cdef TabixIndex makeTabixIndex(tbx_t *idx):
76330 * if not idx:
76331 * return None # <<<<<<<<<<<<<<
76332 *
76333 * cdef TabixIndex index = TabixIndex.__new__(TabixIndex)
76334 */
76335 __Pyx_XDECREF((PyObject *)__pyx_r);
76336 __pyx_r = ((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)Py_None); __Pyx_INCREF(Py_None);
76337 goto __pyx_L0;
76338
76339 /* "pysam/libcbcf.pyx":3815
76340 *
76341 * cdef TabixIndex makeTabixIndex(tbx_t *idx):
76342 * if not idx: # <<<<<<<<<<<<<<
76343 * return None
76344 *
76345 */
76346 }
76347
76348 /* "pysam/libcbcf.pyx":3818
76349 * return None
76350 *
76351 * cdef TabixIndex index = TabixIndex.__new__(TabixIndex) # <<<<<<<<<<<<<<
76352 * index.ptr = idx
76353 * index.__init__()
76354 */
76355 __pyx_t_2 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_BaseIndex(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_TabixIndex), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3818, __pyx_L1_error)
76356 __Pyx_GOTREF((PyObject *)__pyx_t_2);
76357 __pyx_v_index = ((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)__pyx_t_2);
76358 __pyx_t_2 = 0;
76359
76360 /* "pysam/libcbcf.pyx":3819
76361 *
76362 * cdef TabixIndex index = TabixIndex.__new__(TabixIndex)
76363 * index.ptr = idx # <<<<<<<<<<<<<<
76364 * index.__init__()
76365 *
76366 */
76367 __pyx_v_index->ptr = __pyx_v_idx;
76368
76369 /* "pysam/libcbcf.pyx":3820
76370 * cdef TabixIndex index = TabixIndex.__new__(TabixIndex)
76371 * index.ptr = idx
76372 * index.__init__() # <<<<<<<<<<<<<<
76373 *
76374 * return index
76375 */
76376 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_index), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3820, __pyx_L1_error)
76377 __Pyx_GOTREF(__pyx_t_3);
76378 __pyx_t_4 = NULL;
76379 __pyx_t_5 = 0;
76380 #if CYTHON_UNPACK_METHODS
76381 if (likely(PyMethod_Check(__pyx_t_3))) {
76382 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
76383 if (likely(__pyx_t_4)) {
76384 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
76385 __Pyx_INCREF(__pyx_t_4);
76386 __Pyx_INCREF(function);
76387 __Pyx_DECREF_SET(__pyx_t_3, function);
76388 __pyx_t_5 = 1;
76389 }
76390 }
76391 #endif
76392 {
76393 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
76394 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
76395 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
76396 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3820, __pyx_L1_error)
76397 __Pyx_GOTREF(__pyx_t_2);
76398 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
76399 }
76400 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
76401
76402 /* "pysam/libcbcf.pyx":3822
76403 * index.__init__()
76404 *
76405 * return index # <<<<<<<<<<<<<<
76406 *
76407 *
76408 */
76409 __Pyx_XDECREF((PyObject *)__pyx_r);
76410 __Pyx_INCREF((PyObject *)__pyx_v_index);
76411 __pyx_r = __pyx_v_index;
76412 goto __pyx_L0;
76413
76414 /* "pysam/libcbcf.pyx":3814
76415 *
76416 *
76417 * cdef TabixIndex makeTabixIndex(tbx_t *idx): # <<<<<<<<<<<<<<
76418 * if not idx:
76419 * return None
76420 */
76421
76422 /* function exit code */
76423 __pyx_L1_error:;
76424 __Pyx_XDECREF(__pyx_t_2);
76425 __Pyx_XDECREF(__pyx_t_3);
76426 __Pyx_XDECREF(__pyx_t_4);
76427 __Pyx_AddTraceback("pysam.libcbcf.makeTabixIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
76428 __pyx_r = 0;
76429 __pyx_L0:;
76430 __Pyx_XDECREF((PyObject *)__pyx_v_index);
76431 __Pyx_XGIVEREF((PyObject *)__pyx_r);
76432 __Pyx_TraceReturn(__pyx_r, 0);
76433 __Pyx_RefNannyFinishContext();
76434 return __pyx_r;
76435 }
76436
76437 /* "(tree fragment)":1
76438 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
76439 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
76440 * def __setstate_cython__(self, __pyx_state):
76441 */
76442
76443 /* Python wrapper */
76444 static PyObject *__pyx_pw_5pysam_7libcbcf_12BaseIterator_1__reduce_cython__(PyObject *__pyx_v_self,
76445 #if CYTHON_METH_FASTCALL
76446 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
76447 #else
76448 PyObject *__pyx_args, PyObject *__pyx_kwds
76449 #endif
76450 ); /*proto*/
76451 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_12BaseIterator___reduce_cython__, "BaseIterator.__reduce_cython__(self)");
76452 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_12BaseIterator_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_12BaseIterator_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_12BaseIterator___reduce_cython__};
76453 static PyObject *__pyx_pw_5pysam_7libcbcf_12BaseIterator_1__reduce_cython__(PyObject *__pyx_v_self,
76454 #if CYTHON_METH_FASTCALL
76455 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
76456 #else
76457 PyObject *__pyx_args, PyObject *__pyx_kwds
76458 #endif
76459 ) {
76460 #if !CYTHON_METH_FASTCALL
76461 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
76462 #endif
76463 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
76464 PyObject *__pyx_r = 0;
76465 __Pyx_RefNannyDeclarations
76466 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
76467 #if !CYTHON_METH_FASTCALL
76468 #if CYTHON_ASSUME_SAFE_MACROS
76469 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
76470 #else
76471 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
76472 #endif
76473 #endif
76474 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
76475 if (unlikely(__pyx_nargs > 0)) {
76476 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
76477 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
76478 __pyx_r = __pyx_pf_5pysam_7libcbcf_12BaseIterator___reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_BaseIterator *)__pyx_v_self));
76479
76480 /* function exit code */
76481 __Pyx_RefNannyFinishContext();
76482 return __pyx_r;
76483 }
76484
76485 static PyObject *__pyx_pf_5pysam_7libcbcf_12BaseIterator___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BaseIterator *__pyx_v_self) {
76486 PyObject *__pyx_r = NULL;
76487 __Pyx_TraceDeclarations
76488 __Pyx_RefNannyDeclarations
76489 int __pyx_lineno = 0;
76490 const char *__pyx_filename = NULL;
76491 int __pyx_clineno = 0;
76492 __Pyx_TraceFrameInit(__pyx_codeobj__217)
76493 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
76494 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
76495
76496 /* "(tree fragment)":2
76497 * def __reduce_cython__(self):
76498 * raise TypeError, "self.iter cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
76499 * def __setstate_cython__(self, __pyx_state):
76500 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
76501 */
76502 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iter_cannot_be_converted_to, 0, 0);
76503 __PYX_ERR(4, 2, __pyx_L1_error)
76504
76505 /* "(tree fragment)":1
76506 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
76507 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
76508 * def __setstate_cython__(self, __pyx_state):
76509 */
76510
76511 /* function exit code */
76512 __pyx_L1_error:;
76513 __Pyx_AddTraceback("pysam.libcbcf.BaseIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76514 __pyx_r = NULL;
76515 __Pyx_XGIVEREF(__pyx_r);
76516 __Pyx_TraceReturn(__pyx_r, 0);
76517 __Pyx_RefNannyFinishContext();
76518 return __pyx_r;
76519 }
76520
76521 /* "(tree fragment)":3
76522 * def __reduce_cython__(self):
76523 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
76524 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
76525 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
76526 */
76527
76528 /* Python wrapper */
76529 static PyObject *__pyx_pw_5pysam_7libcbcf_12BaseIterator_3__setstate_cython__(PyObject *__pyx_v_self,
76530 #if CYTHON_METH_FASTCALL
76531 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
76532 #else
76533 PyObject *__pyx_args, PyObject *__pyx_kwds
76534 #endif
76535 ); /*proto*/
76536 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_12BaseIterator_2__setstate_cython__, "BaseIterator.__setstate_cython__(self, __pyx_state)");
76537 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_12BaseIterator_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_12BaseIterator_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_12BaseIterator_2__setstate_cython__};
76538 static PyObject *__pyx_pw_5pysam_7libcbcf_12BaseIterator_3__setstate_cython__(PyObject *__pyx_v_self,
76539 #if CYTHON_METH_FASTCALL
76540 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
76541 #else
76542 PyObject *__pyx_args, PyObject *__pyx_kwds
76543 #endif
76544 ) {
76545 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
76546 #if !CYTHON_METH_FASTCALL
76547 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
76548 #endif
76549 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
76550 PyObject* values[1] = {0};
76551 int __pyx_lineno = 0;
76552 const char *__pyx_filename = NULL;
76553 int __pyx_clineno = 0;
76554 PyObject *__pyx_r = 0;
76555 __Pyx_RefNannyDeclarations
76556 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
76557 #if !CYTHON_METH_FASTCALL
76558 #if CYTHON_ASSUME_SAFE_MACROS
76559 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
76560 #else
76561 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
76562 #endif
76563 #endif
76564 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
76565 {
76566 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
76567 if (__pyx_kwds) {
76568 Py_ssize_t kw_args;
76569 switch (__pyx_nargs) {
76570 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
76571 CYTHON_FALLTHROUGH;
76572 case 0: break;
76573 default: goto __pyx_L5_argtuple_error;
76574 }
76575 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
76576 switch (__pyx_nargs) {
76577 case 0:
76578 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
76579 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
76580 kw_args--;
76581 }
76582 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
76583 else goto __pyx_L5_argtuple_error;
76584 }
76585 if (unlikely(kw_args > 0)) {
76586 const Py_ssize_t kwd_pos_args = __pyx_nargs;
76587 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
76588 }
76589 } else if (unlikely(__pyx_nargs != 1)) {
76590 goto __pyx_L5_argtuple_error;
76591 } else {
76592 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
76593 }
76594 __pyx_v___pyx_state = values[0];
76595 }
76596 goto __pyx_L6_skip;
76597 __pyx_L5_argtuple_error:;
76598 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
76599 __pyx_L6_skip:;
76600 goto __pyx_L4_argument_unpacking_done;
76601 __pyx_L3_error:;
76602 {
76603 Py_ssize_t __pyx_temp;
76604 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
76605 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
76606 }
76607 }
76608 __Pyx_AddTraceback("pysam.libcbcf.BaseIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76609 __Pyx_RefNannyFinishContext();
76610 return NULL;
76611 __pyx_L4_argument_unpacking_done:;
76612 __pyx_r = __pyx_pf_5pysam_7libcbcf_12BaseIterator_2__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_BaseIterator *)__pyx_v_self), __pyx_v___pyx_state);
76613
76614 /* function exit code */
76615 {
76616 Py_ssize_t __pyx_temp;
76617 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
76618 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
76619 }
76620 }
76621 __Pyx_RefNannyFinishContext();
76622 return __pyx_r;
76623 }
76624
76625 static PyObject *__pyx_pf_5pysam_7libcbcf_12BaseIterator_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BaseIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
76626 PyObject *__pyx_r = NULL;
76627 __Pyx_TraceDeclarations
76628 __Pyx_RefNannyDeclarations
76629 int __pyx_lineno = 0;
76630 const char *__pyx_filename = NULL;
76631 int __pyx_clineno = 0;
76632 __Pyx_TraceFrameInit(__pyx_codeobj__218)
76633 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
76634 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
76635
76636 /* "(tree fragment)":4
76637 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
76638 * def __setstate_cython__(self, __pyx_state):
76639 * raise TypeError, "self.iter cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
76640 */
76641 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iter_cannot_be_converted_to, 0, 0);
76642 __PYX_ERR(4, 4, __pyx_L1_error)
76643
76644 /* "(tree fragment)":3
76645 * def __reduce_cython__(self):
76646 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
76647 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
76648 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
76649 */
76650
76651 /* function exit code */
76652 __pyx_L1_error:;
76653 __Pyx_AddTraceback("pysam.libcbcf.BaseIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76654 __pyx_r = NULL;
76655 __Pyx_XGIVEREF(__pyx_r);
76656 __Pyx_TraceReturn(__pyx_r, 0);
76657 __Pyx_RefNannyFinishContext();
76658 return __pyx_r;
76659 }
76660
76661 /* "pysam/libcbcf.pyx":3837
76662 * # Internal function to clean up after iteration stop or failure.
76663 * # This would be a nested function if it weren't a cdef function.
76664 * cdef void _stop_BCFIterator(BCFIterator self, bcf1_t *record): # <<<<<<<<<<<<<<
76665 * bcf_destroy1(record)
76666 *
76667 */
76668
76669 static void __pyx_f_5pysam_7libcbcf__stop_BCFIterator(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self, bcf1_t *__pyx_v_record) {
76670 __Pyx_TraceDeclarations
76671 int __pyx_lineno = 0;
76672 const char *__pyx_filename = NULL;
76673 int __pyx_clineno = 0;
76674 __Pyx_TraceCall("_stop_BCFIterator", __pyx_f[0], 3837, 0, __PYX_ERR(0, 3837, __pyx_L1_error));
76675
76676 /* "pysam/libcbcf.pyx":3838
76677 * # This would be a nested function if it weren't a cdef function.
76678 * cdef void _stop_BCFIterator(BCFIterator self, bcf1_t *record):
76679 * bcf_destroy1(record) # <<<<<<<<<<<<<<
76680 *
76681 * # destroy iter so future calls to __next__ raise StopIteration
76682 */
76683 bcf_destroy1(__pyx_v_record);
76684
76685 /* "pysam/libcbcf.pyx":3841
76686 *
76687 * # destroy iter so future calls to __next__ raise StopIteration
76688 * bcf_itr_destroy(self.iter) # <<<<<<<<<<<<<<
76689 * self.iter = NULL
76690 *
76691 */
76692 bcf_itr_destroy(__pyx_v_self->__pyx_base.iter);
76693
76694 /* "pysam/libcbcf.pyx":3842
76695 * # destroy iter so future calls to __next__ raise StopIteration
76696 * bcf_itr_destroy(self.iter)
76697 * self.iter = NULL # <<<<<<<<<<<<<<
76698 *
76699 *
76700 */
76701 __pyx_v_self->__pyx_base.iter = NULL;
76702
76703 /* "pysam/libcbcf.pyx":3837
76704 * # Internal function to clean up after iteration stop or failure.
76705 * # This would be a nested function if it weren't a cdef function.
76706 * cdef void _stop_BCFIterator(BCFIterator self, bcf1_t *record): # <<<<<<<<<<<<<<
76707 * bcf_destroy1(record)
76708 *
76709 */
76710
76711 /* function exit code */
76712 goto __pyx_L0;
76713 __pyx_L1_error:;
76714 __Pyx_AddTraceback("pysam.libcbcf._stop_BCFIterator", __pyx_clineno, __pyx_lineno, __pyx_filename);
76715 __pyx_L0:;
76716 __Pyx_TraceReturn(Py_None, 0);
76717 }
76718
76719 /* "pysam/libcbcf.pyx":3846
76720 *
76721 * cdef class BCFIterator(BaseIterator):
76722 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True): # <<<<<<<<<<<<<<
76723 * if bcf is None:
76724 * raise ValueError('bcf must not be None')
76725 */
76726
76727 /* Python wrapper */
76728 static int __pyx_pw_5pysam_7libcbcf_11BCFIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
76729 static int __pyx_pw_5pysam_7libcbcf_11BCFIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
76730 struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_bcf = 0;
76731 PyObject *__pyx_v_contig = 0;
76732 PyObject *__pyx_v_start = 0;
76733 PyObject *__pyx_v_stop = 0;
76734 PyObject *__pyx_v_reopen = 0;
76735 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
76736 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
76737 PyObject* values[5] = {0,0,0,0,0};
76738 int __pyx_lineno = 0;
76739 const char *__pyx_filename = NULL;
76740 int __pyx_clineno = 0;
76741 int __pyx_r;
76742 __Pyx_RefNannyDeclarations
76743 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
76744 #if CYTHON_ASSUME_SAFE_MACROS
76745 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
76746 #else
76747 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
76748 #endif
76749 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
76750 {
76751 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bcf,&__pyx_n_s_contig,&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_reopen,0};
76752 values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
76753 values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
76754 values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
76755 values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
76756 if (__pyx_kwds) {
76757 Py_ssize_t kw_args;
76758 switch (__pyx_nargs) {
76759 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
76760 CYTHON_FALLTHROUGH;
76761 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
76762 CYTHON_FALLTHROUGH;
76763 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
76764 CYTHON_FALLTHROUGH;
76765 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
76766 CYTHON_FALLTHROUGH;
76767 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
76768 CYTHON_FALLTHROUGH;
76769 case 0: break;
76770 default: goto __pyx_L5_argtuple_error;
76771 }
76772 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
76773 switch (__pyx_nargs) {
76774 case 0:
76775 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bcf)) != 0)) {
76776 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
76777 kw_args--;
76778 }
76779 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L3_error)
76780 else goto __pyx_L5_argtuple_error;
76781 CYTHON_FALLTHROUGH;
76782 case 1:
76783 if (kw_args > 0) {
76784 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_contig);
76785 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
76786 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L3_error)
76787 }
76788 CYTHON_FALLTHROUGH;
76789 case 2:
76790 if (kw_args > 0) {
76791 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
76792 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
76793 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L3_error)
76794 }
76795 CYTHON_FALLTHROUGH;
76796 case 3:
76797 if (kw_args > 0) {
76798 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stop);
76799 if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
76800 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L3_error)
76801 }
76802 CYTHON_FALLTHROUGH;
76803 case 4:
76804 if (kw_args > 0) {
76805 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reopen);
76806 if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
76807 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L3_error)
76808 }
76809 }
76810 if (unlikely(kw_args > 0)) {
76811 const Py_ssize_t kwd_pos_args = __pyx_nargs;
76812 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3846, __pyx_L3_error)
76813 }
76814 } else {
76815 switch (__pyx_nargs) {
76816 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
76817 CYTHON_FALLTHROUGH;
76818 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
76819 CYTHON_FALLTHROUGH;
76820 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
76821 CYTHON_FALLTHROUGH;
76822 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
76823 CYTHON_FALLTHROUGH;
76824 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
76825 break;
76826 default: goto __pyx_L5_argtuple_error;
76827 }
76828 }
76829 __pyx_v_bcf = ((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)values[0]);
76830 __pyx_v_contig = values[1];
76831 __pyx_v_start = values[2];
76832 __pyx_v_stop = values[3];
76833 __pyx_v_reopen = values[4];
76834 }
76835 goto __pyx_L6_skip;
76836 __pyx_L5_argtuple_error:;
76837 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 3846, __pyx_L3_error)
76838 __pyx_L6_skip:;
76839 goto __pyx_L4_argument_unpacking_done;
76840 __pyx_L3_error:;
76841 {
76842 Py_ssize_t __pyx_temp;
76843 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
76844 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
76845 }
76846 }
76847 __Pyx_AddTraceback("pysam.libcbcf.BCFIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76848 __Pyx_RefNannyFinishContext();
76849 return -1;
76850 __pyx_L4_argument_unpacking_done:;
76851 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bcf), __pyx_ptype_5pysam_7libcbcf_VariantFile, 1, "bcf", 0))) __PYX_ERR(0, 3846, __pyx_L1_error)
76852 __pyx_r = __pyx_pf_5pysam_7libcbcf_11BCFIterator___init__(((struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)__pyx_v_self), __pyx_v_bcf, __pyx_v_contig, __pyx_v_start, __pyx_v_stop, __pyx_v_reopen);
76853
76854 /* function exit code */
76855 goto __pyx_L0;
76856 __pyx_L1_error:;
76857 __pyx_r = -1;
76858 __pyx_L0:;
76859 {
76860 Py_ssize_t __pyx_temp;
76861 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
76862 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
76863 }
76864 }
76865 __Pyx_RefNannyFinishContext();
76866 return __pyx_r;
76867 }
76868
76869 static int __pyx_pf_5pysam_7libcbcf_11BCFIterator___init__(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_bcf, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_reopen) {
76870 struct __pyx_obj_5pysam_7libcbcf_BCFIndex *__pyx_v_index = 0;
76871 int __pyx_v_rid;
76872 int __pyx_v_cstart;
76873 int __pyx_v_cstop;
76874 int __pyx_r;
76875 __Pyx_TraceDeclarations
76876 __Pyx_RefNannyDeclarations
76877 int __pyx_t_1;
76878 PyObject *__pyx_t_2 = NULL;
76879 int __pyx_t_3;
76880 PyObject *__pyx_t_4 = NULL;
76881 PyObject *__pyx_t_5 = NULL;
76882 PyObject *__pyx_t_6 = NULL;
76883 int __pyx_t_7;
76884 PyObject *__pyx_t_8 = NULL;
76885 PyObject *__pyx_t_9 = NULL;
76886 unsigned int __pyx_t_10;
76887 int __pyx_t_11;
76888 PyObject *__pyx_t_12 = NULL;
76889 int __pyx_lineno = 0;
76890 const char *__pyx_filename = NULL;
76891 int __pyx_clineno = 0;
76892 __Pyx_RefNannySetupContext("__init__", 1);
76893 __Pyx_TraceCall("__init__", __pyx_f[0], 3846, 0, __PYX_ERR(0, 3846, __pyx_L1_error));
76894
76895 /* "pysam/libcbcf.pyx":3847
76896 * cdef class BCFIterator(BaseIterator):
76897 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True):
76898 * if bcf is None: # <<<<<<<<<<<<<<
76899 * raise ValueError('bcf must not be None')
76900 *
76901 */
76902 __pyx_t_1 = (((PyObject *)__pyx_v_bcf) == Py_None);
76903 if (unlikely(__pyx_t_1)) {
76904
76905 /* "pysam/libcbcf.pyx":3848
76906 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True):
76907 * if bcf is None:
76908 * raise ValueError('bcf must not be None') # <<<<<<<<<<<<<<
76909 *
76910 * if contig is None:
76911 */
76912 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__219, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3848, __pyx_L1_error)
76913 __Pyx_GOTREF(__pyx_t_2);
76914 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
76915 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
76916 __PYX_ERR(0, 3848, __pyx_L1_error)
76917
76918 /* "pysam/libcbcf.pyx":3847
76919 * cdef class BCFIterator(BaseIterator):
76920 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True):
76921 * if bcf is None: # <<<<<<<<<<<<<<
76922 * raise ValueError('bcf must not be None')
76923 *
76924 */
76925 }
76926
76927 /* "pysam/libcbcf.pyx":3850
76928 * raise ValueError('bcf must not be None')
76929 *
76930 * if contig is None: # <<<<<<<<<<<<<<
76931 * raise ValueError('contig must be specified')
76932 *
76933 */
76934 __pyx_t_1 = (__pyx_v_contig == Py_None);
76935 if (unlikely(__pyx_t_1)) {
76936
76937 /* "pysam/libcbcf.pyx":3851
76938 *
76939 * if contig is None:
76940 * raise ValueError('contig must be specified') # <<<<<<<<<<<<<<
76941 *
76942 * if not isinstance(bcf.index, BCFIndex):
76943 */
76944 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__220, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3851, __pyx_L1_error)
76945 __Pyx_GOTREF(__pyx_t_2);
76946 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
76947 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
76948 __PYX_ERR(0, 3851, __pyx_L1_error)
76949
76950 /* "pysam/libcbcf.pyx":3850
76951 * raise ValueError('bcf must not be None')
76952 *
76953 * if contig is None: # <<<<<<<<<<<<<<
76954 * raise ValueError('contig must be specified')
76955 *
76956 */
76957 }
76958
76959 /* "pysam/libcbcf.pyx":3853
76960 * raise ValueError('contig must be specified')
76961 *
76962 * if not isinstance(bcf.index, BCFIndex): # <<<<<<<<<<<<<<
76963 * raise ValueError('bcf index required')
76964 *
76965 */
76966 __pyx_t_2 = ((PyObject *)__pyx_v_bcf->index);
76967 __Pyx_INCREF(__pyx_t_2);
76968 __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_2, __pyx_ptype_5pysam_7libcbcf_BCFIndex);
76969 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
76970 __pyx_t_3 = (!__pyx_t_1);
76971 if (unlikely(__pyx_t_3)) {
76972
76973 /* "pysam/libcbcf.pyx":3854
76974 *
76975 * if not isinstance(bcf.index, BCFIndex):
76976 * raise ValueError('bcf index required') # <<<<<<<<<<<<<<
76977 *
76978 * cdef BCFIndex index = bcf.index
76979 */
76980 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__221, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3854, __pyx_L1_error)
76981 __Pyx_GOTREF(__pyx_t_2);
76982 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
76983 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
76984 __PYX_ERR(0, 3854, __pyx_L1_error)
76985
76986 /* "pysam/libcbcf.pyx":3853
76987 * raise ValueError('contig must be specified')
76988 *
76989 * if not isinstance(bcf.index, BCFIndex): # <<<<<<<<<<<<<<
76990 * raise ValueError('bcf index required')
76991 *
76992 */
76993 }
76994
76995 /* "pysam/libcbcf.pyx":3856
76996 * raise ValueError('bcf index required')
76997 *
76998 * cdef BCFIndex index = bcf.index # <<<<<<<<<<<<<<
76999 *
77000 * self.bcf = bcf
77001 */
77002 if (!(likely(((((PyObject *)__pyx_v_bcf->index)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_bcf->index), __pyx_ptype_5pysam_7libcbcf_BCFIndex))))) __PYX_ERR(0, 3856, __pyx_L1_error)
77003 __pyx_t_2 = ((PyObject *)__pyx_v_bcf->index);
77004 __Pyx_INCREF(__pyx_t_2);
77005 __pyx_v_index = ((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)__pyx_t_2);
77006 __pyx_t_2 = 0;
77007
77008 /* "pysam/libcbcf.pyx":3858
77009 * cdef BCFIndex index = bcf.index
77010 *
77011 * self.bcf = bcf # <<<<<<<<<<<<<<
77012 * self.index = index
77013 *
77014 */
77015 __Pyx_INCREF((PyObject *)__pyx_v_bcf);
77016 __Pyx_GIVEREF((PyObject *)__pyx_v_bcf);
77017 __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.bcf);
77018 __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.bcf);
77019 __pyx_v_self->__pyx_base.bcf = __pyx_v_bcf;
77020
77021 /* "pysam/libcbcf.pyx":3859
77022 *
77023 * self.bcf = bcf
77024 * self.index = index # <<<<<<<<<<<<<<
77025 *
77026 * cdef int rid, cstart, cstop
77027 */
77028 __Pyx_INCREF((PyObject *)__pyx_v_index);
77029 __Pyx_GIVEREF((PyObject *)__pyx_v_index);
77030 __Pyx_GOTREF((PyObject *)__pyx_v_self->index);
77031 __Pyx_DECREF((PyObject *)__pyx_v_self->index);
77032 __pyx_v_self->index = __pyx_v_index;
77033
77034 /* "pysam/libcbcf.pyx":3863
77035 * cdef int rid, cstart, cstop
77036 *
77037 * try: # <<<<<<<<<<<<<<
77038 * rid = index.refmap[contig]
77039 * except KeyError:
77040 */
77041 {
77042 __Pyx_PyThreadState_declare
77043 __Pyx_PyThreadState_assign
77044 __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
77045 __Pyx_XGOTREF(__pyx_t_4);
77046 __Pyx_XGOTREF(__pyx_t_5);
77047 __Pyx_XGOTREF(__pyx_t_6);
77048 /*try:*/ {
77049
77050 /* "pysam/libcbcf.pyx":3864
77051 *
77052 * try:
77053 * rid = index.refmap[contig] # <<<<<<<<<<<<<<
77054 * except KeyError:
77055 * # A query for a non-existent contig yields an empty iterator, does not raise an error
77056 */
77057 if (unlikely(__pyx_v_index->__pyx_base.refmap == Py_None)) {
77058 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
77059 __PYX_ERR(0, 3864, __pyx_L6_error)
77060 }
77061 __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_index->__pyx_base.refmap, __pyx_v_contig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3864, __pyx_L6_error)
77062 __Pyx_GOTREF(__pyx_t_2);
77063 __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3864, __pyx_L6_error)
77064 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
77065 __pyx_v_rid = __pyx_t_7;
77066
77067 /* "pysam/libcbcf.pyx":3863
77068 * cdef int rid, cstart, cstop
77069 *
77070 * try: # <<<<<<<<<<<<<<
77071 * rid = index.refmap[contig]
77072 * except KeyError:
77073 */
77074 }
77075 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
77076 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
77077 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
77078 goto __pyx_L11_try_end;
77079 __pyx_L6_error:;
77080 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
77081
77082 /* "pysam/libcbcf.pyx":3865
77083 * try:
77084 * rid = index.refmap[contig]
77085 * except KeyError: # <<<<<<<<<<<<<<
77086 * # A query for a non-existent contig yields an empty iterator, does not raise an error
77087 * self.iter = NULL
77088 */
77089 __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
77090 if (__pyx_t_7) {
77091 __Pyx_AddTraceback("pysam.libcbcf.BCFIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77092 if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 3865, __pyx_L8_except_error)
77093 __Pyx_XGOTREF(__pyx_t_2);
77094 __Pyx_XGOTREF(__pyx_t_8);
77095 __Pyx_XGOTREF(__pyx_t_9);
77096
77097 /* "pysam/libcbcf.pyx":3867
77098 * except KeyError:
77099 * # A query for a non-existent contig yields an empty iterator, does not raise an error
77100 * self.iter = NULL # <<<<<<<<<<<<<<
77101 * return
77102 *
77103 */
77104 __pyx_v_self->__pyx_base.iter = NULL;
77105
77106 /* "pysam/libcbcf.pyx":3868
77107 * # A query for a non-existent contig yields an empty iterator, does not raise an error
77108 * self.iter = NULL
77109 * return # <<<<<<<<<<<<<<
77110 *
77111 * if reopen:
77112 */
77113 __pyx_r = 0;
77114 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
77115 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
77116 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
77117 goto __pyx_L9_except_return;
77118 }
77119 goto __pyx_L8_except_error;
77120
77121 /* "pysam/libcbcf.pyx":3863
77122 * cdef int rid, cstart, cstop
77123 *
77124 * try: # <<<<<<<<<<<<<<
77125 * rid = index.refmap[contig]
77126 * except KeyError:
77127 */
77128 __pyx_L8_except_error:;
77129 __Pyx_XGIVEREF(__pyx_t_4);
77130 __Pyx_XGIVEREF(__pyx_t_5);
77131 __Pyx_XGIVEREF(__pyx_t_6);
77132 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
77133 goto __pyx_L1_error;
77134 __pyx_L9_except_return:;
77135 __Pyx_XGIVEREF(__pyx_t_4);
77136 __Pyx_XGIVEREF(__pyx_t_5);
77137 __Pyx_XGIVEREF(__pyx_t_6);
77138 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
77139 goto __pyx_L0;
77140 __pyx_L11_try_end:;
77141 }
77142
77143 /* "pysam/libcbcf.pyx":3870
77144 * return
77145 *
77146 * if reopen: # <<<<<<<<<<<<<<
77147 * self.bcf = self.bcf.copy()
77148 *
77149 */
77150 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_reopen); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3870, __pyx_L1_error)
77151 if (__pyx_t_3) {
77152
77153 /* "pysam/libcbcf.pyx":3871
77154 *
77155 * if reopen:
77156 * self.bcf = self.bcf.copy() # <<<<<<<<<<<<<<
77157 *
77158 * cstart = start if start is not None else 0
77159 */
77160 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.bcf), __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3871, __pyx_L1_error)
77161 __Pyx_GOTREF(__pyx_t_8);
77162 __pyx_t_2 = NULL;
77163 __pyx_t_10 = 0;
77164 #if CYTHON_UNPACK_METHODS
77165 if (likely(PyMethod_Check(__pyx_t_8))) {
77166 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
77167 if (likely(__pyx_t_2)) {
77168 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
77169 __Pyx_INCREF(__pyx_t_2);
77170 __Pyx_INCREF(function);
77171 __Pyx_DECREF_SET(__pyx_t_8, function);
77172 __pyx_t_10 = 1;
77173 }
77174 }
77175 #endif
77176 {
77177 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
77178 __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
77179 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
77180 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3871, __pyx_L1_error)
77181 __Pyx_GOTREF(__pyx_t_9);
77182 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
77183 }
77184 if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5pysam_7libcbcf_VariantFile))))) __PYX_ERR(0, 3871, __pyx_L1_error)
77185 __Pyx_GIVEREF(__pyx_t_9);
77186 __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.bcf);
77187 __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.bcf);
77188 __pyx_v_self->__pyx_base.bcf = ((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_t_9);
77189 __pyx_t_9 = 0;
77190
77191 /* "pysam/libcbcf.pyx":3870
77192 * return
77193 *
77194 * if reopen: # <<<<<<<<<<<<<<
77195 * self.bcf = self.bcf.copy()
77196 *
77197 */
77198 }
77199
77200 /* "pysam/libcbcf.pyx":3873
77201 * self.bcf = self.bcf.copy()
77202 *
77203 * cstart = start if start is not None else 0 # <<<<<<<<<<<<<<
77204 * cstop = stop if stop is not None else MAX_POS
77205 *
77206 */
77207 __pyx_t_3 = (__pyx_v_start != Py_None);
77208 if (__pyx_t_3) {
77209 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_start); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3873, __pyx_L1_error)
77210 __pyx_t_7 = __pyx_t_11;
77211 } else {
77212 __pyx_t_7 = 0;
77213 }
77214 __pyx_v_cstart = __pyx_t_7;
77215
77216 /* "pysam/libcbcf.pyx":3874
77217 *
77218 * cstart = start if start is not None else 0
77219 * cstop = stop if stop is not None else MAX_POS # <<<<<<<<<<<<<<
77220 *
77221 * with nogil:
77222 */
77223 __pyx_t_3 = (__pyx_v_stop != Py_None);
77224 if (__pyx_t_3) {
77225 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_stop); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3874, __pyx_L1_error)
77226 __pyx_t_7 = __pyx_t_11;
77227 } else {
77228 __pyx_t_7 = __pyx_v_5pysam_7libcbcf_MAX_POS;
77229 }
77230 __pyx_v_cstop = __pyx_t_7;
77231
77232 /* "pysam/libcbcf.pyx":3876
77233 * cstop = stop if stop is not None else MAX_POS
77234 *
77235 * with nogil: # <<<<<<<<<<<<<<
77236 * self.iter = bcf_itr_queryi(index.ptr, rid, cstart, cstop)
77237 *
77238 */
77239 {
77240 #ifdef WITH_THREAD
77241 PyThreadState *_save;
77242 _save = NULL;
77243 Py_UNBLOCK_THREADS
77244 __Pyx_FastGIL_Remember();
77245 #endif
77246 /*try:*/ {
77247
77248 /* "pysam/libcbcf.pyx":3877
77249 *
77250 * with nogil:
77251 * self.iter = bcf_itr_queryi(index.ptr, rid, cstart, cstop) # <<<<<<<<<<<<<<
77252 *
77253 * if not self.iter:
77254 */
77255 __pyx_v_self->__pyx_base.iter = bcf_itr_queryi(__pyx_v_index->ptr, __pyx_v_rid, __pyx_v_cstart, __pyx_v_cstop);
77256 }
77257
77258 /* "pysam/libcbcf.pyx":3876
77259 * cstop = stop if stop is not None else MAX_POS
77260 *
77261 * with nogil: # <<<<<<<<<<<<<<
77262 * self.iter = bcf_itr_queryi(index.ptr, rid, cstart, cstop)
77263 *
77264 */
77265 /*finally:*/ {
77266 /*normal exit:*/{
77267 #ifdef WITH_THREAD
77268 __Pyx_FastGIL_Forget();
77269 Py_BLOCK_THREADS
77270 #endif
77271 goto __pyx_L17;
77272 }
77273 __pyx_L17:;
77274 }
77275 }
77276
77277 /* "pysam/libcbcf.pyx":3879
77278 * self.iter = bcf_itr_queryi(index.ptr, rid, cstart, cstop)
77279 *
77280 * if not self.iter: # <<<<<<<<<<<<<<
77281 * if errno:
77282 * raise IOError(errno, strerror(errno))
77283 */
77284 __pyx_t_3 = (!(__pyx_v_self->__pyx_base.iter != 0));
77285 if (__pyx_t_3) {
77286
77287 /* "pysam/libcbcf.pyx":3880
77288 *
77289 * if not self.iter:
77290 * if errno: # <<<<<<<<<<<<<<
77291 * raise IOError(errno, strerror(errno))
77292 * else:
77293 */
77294 __pyx_t_3 = (errno != 0);
77295 if (unlikely(__pyx_t_3)) {
77296
77297 /* "pysam/libcbcf.pyx":3881
77298 * if not self.iter:
77299 * if errno:
77300 * raise IOError(errno, strerror(errno)) # <<<<<<<<<<<<<<
77301 * else:
77302 * raise IOError('unable to fetch {}:{}-{}'.format(contig, start+1, stop))
77303 */
77304 __pyx_t_9 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3881, __pyx_L1_error)
77305 __Pyx_GOTREF(__pyx_t_9);
77306 __pyx_t_8 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3881, __pyx_L1_error)
77307 __Pyx_GOTREF(__pyx_t_8);
77308 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3881, __pyx_L1_error)
77309 __Pyx_GOTREF(__pyx_t_2);
77310 __Pyx_GIVEREF(__pyx_t_9);
77311 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9)) __PYX_ERR(0, 3881, __pyx_L1_error);
77312 __Pyx_GIVEREF(__pyx_t_8);
77313 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8)) __PYX_ERR(0, 3881, __pyx_L1_error);
77314 __pyx_t_9 = 0;
77315 __pyx_t_8 = 0;
77316 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3881, __pyx_L1_error)
77317 __Pyx_GOTREF(__pyx_t_8);
77318 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
77319 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
77320 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
77321 __PYX_ERR(0, 3881, __pyx_L1_error)
77322
77323 /* "pysam/libcbcf.pyx":3880
77324 *
77325 * if not self.iter:
77326 * if errno: # <<<<<<<<<<<<<<
77327 * raise IOError(errno, strerror(errno))
77328 * else:
77329 */
77330 }
77331
77332 /* "pysam/libcbcf.pyx":3883
77333 * raise IOError(errno, strerror(errno))
77334 * else:
77335 * raise IOError('unable to fetch {}:{}-{}'.format(contig, start+1, stop)) # <<<<<<<<<<<<<<
77336 *
77337 * def __dealloc__(self):
77338 */
77339 /*else*/ {
77340 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unable_to_fetch, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3883, __pyx_L1_error)
77341 __Pyx_GOTREF(__pyx_t_2);
77342 __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_start, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3883, __pyx_L1_error)
77343 __Pyx_GOTREF(__pyx_t_9);
77344 __pyx_t_12 = NULL;
77345 __pyx_t_10 = 0;
77346 #if CYTHON_UNPACK_METHODS
77347 if (likely(PyMethod_Check(__pyx_t_2))) {
77348 __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
77349 if (likely(__pyx_t_12)) {
77350 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
77351 __Pyx_INCREF(__pyx_t_12);
77352 __Pyx_INCREF(function);
77353 __Pyx_DECREF_SET(__pyx_t_2, function);
77354 __pyx_t_10 = 1;
77355 }
77356 }
77357 #endif
77358 {
77359 PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_v_contig, __pyx_t_9, __pyx_v_stop};
77360 __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10);
77361 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
77362 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
77363 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3883, __pyx_L1_error)
77364 __Pyx_GOTREF(__pyx_t_8);
77365 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
77366 }
77367 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3883, __pyx_L1_error)
77368 __Pyx_GOTREF(__pyx_t_2);
77369 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
77370 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
77371 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
77372 __PYX_ERR(0, 3883, __pyx_L1_error)
77373 }
77374
77375 /* "pysam/libcbcf.pyx":3879
77376 * self.iter = bcf_itr_queryi(index.ptr, rid, cstart, cstop)
77377 *
77378 * if not self.iter: # <<<<<<<<<<<<<<
77379 * if errno:
77380 * raise IOError(errno, strerror(errno))
77381 */
77382 }
77383
77384 /* "pysam/libcbcf.pyx":3846
77385 *
77386 * cdef class BCFIterator(BaseIterator):
77387 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True): # <<<<<<<<<<<<<<
77388 * if bcf is None:
77389 * raise ValueError('bcf must not be None')
77390 */
77391
77392 /* function exit code */
77393 __pyx_r = 0;
77394 goto __pyx_L0;
77395 __pyx_L1_error:;
77396 __Pyx_XDECREF(__pyx_t_2);
77397 __Pyx_XDECREF(__pyx_t_8);
77398 __Pyx_XDECREF(__pyx_t_9);
77399 __Pyx_XDECREF(__pyx_t_12);
77400 __Pyx_AddTraceback("pysam.libcbcf.BCFIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77401 __pyx_r = -1;
77402 __pyx_L0:;
77403 __Pyx_XDECREF((PyObject *)__pyx_v_index);
77404 __Pyx_TraceReturn(Py_None, 0);
77405 __Pyx_RefNannyFinishContext();
77406 return __pyx_r;
77407 }
77408
77409 /* "pysam/libcbcf.pyx":3885
77410 * raise IOError('unable to fetch {}:{}-{}'.format(contig, start+1, stop))
77411 *
77412 * def __dealloc__(self): # <<<<<<<<<<<<<<
77413 * if self.iter:
77414 * bcf_itr_destroy(self.iter)
77415 */
77416
77417 /* Python wrapper */
77418 static void __pyx_pw_5pysam_7libcbcf_11BCFIterator_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
77419 static void __pyx_pw_5pysam_7libcbcf_11BCFIterator_3__dealloc__(PyObject *__pyx_v_self) {
77420 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
77421 __Pyx_RefNannyDeclarations
77422 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
77423 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
77424 __pyx_pf_5pysam_7libcbcf_11BCFIterator_2__dealloc__(((struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)__pyx_v_self));
77425
77426 /* function exit code */
77427 __Pyx_RefNannyFinishContext();
77428 }
77429
77430 static void __pyx_pf_5pysam_7libcbcf_11BCFIterator_2__dealloc__(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self) {
77431 __Pyx_TraceDeclarations
77432 int __pyx_t_1;
77433 int __pyx_lineno = 0;
77434 const char *__pyx_filename = NULL;
77435 int __pyx_clineno = 0;
77436 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3885, 0, __PYX_ERR(0, 3885, __pyx_L1_error));
77437
77438 /* "pysam/libcbcf.pyx":3886
77439 *
77440 * def __dealloc__(self):
77441 * if self.iter: # <<<<<<<<<<<<<<
77442 * bcf_itr_destroy(self.iter)
77443 * self.iter = NULL
77444 */
77445 __pyx_t_1 = (__pyx_v_self->__pyx_base.iter != 0);
77446 if (__pyx_t_1) {
77447
77448 /* "pysam/libcbcf.pyx":3887
77449 * def __dealloc__(self):
77450 * if self.iter:
77451 * bcf_itr_destroy(self.iter) # <<<<<<<<<<<<<<
77452 * self.iter = NULL
77453 *
77454 */
77455 bcf_itr_destroy(__pyx_v_self->__pyx_base.iter);
77456
77457 /* "pysam/libcbcf.pyx":3888
77458 * if self.iter:
77459 * bcf_itr_destroy(self.iter)
77460 * self.iter = NULL # <<<<<<<<<<<<<<
77461 *
77462 * def __iter__(self):
77463 */
77464 __pyx_v_self->__pyx_base.iter = NULL;
77465
77466 /* "pysam/libcbcf.pyx":3886
77467 *
77468 * def __dealloc__(self):
77469 * if self.iter: # <<<<<<<<<<<<<<
77470 * bcf_itr_destroy(self.iter)
77471 * self.iter = NULL
77472 */
77473 }
77474
77475 /* "pysam/libcbcf.pyx":3885
77476 * raise IOError('unable to fetch {}:{}-{}'.format(contig, start+1, stop))
77477 *
77478 * def __dealloc__(self): # <<<<<<<<<<<<<<
77479 * if self.iter:
77480 * bcf_itr_destroy(self.iter)
77481 */
77482
77483 /* function exit code */
77484 goto __pyx_L0;
77485 __pyx_L1_error:;
77486 __Pyx_WriteUnraisable("pysam.libcbcf.BCFIterator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
77487 __pyx_L0:;
77488 __Pyx_TraceReturn(Py_None, 0);
77489 }
77490
77491 /* "pysam/libcbcf.pyx":3890
77492 * self.iter = NULL
77493 *
77494 * def __iter__(self): # <<<<<<<<<<<<<<
77495 * return self
77496 *
77497 */
77498
77499 /* Python wrapper */
77500 static PyObject *__pyx_pw_5pysam_7libcbcf_11BCFIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
77501 static PyObject *__pyx_pw_5pysam_7libcbcf_11BCFIterator_5__iter__(PyObject *__pyx_v_self) {
77502 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
77503 PyObject *__pyx_r = 0;
77504 __Pyx_RefNannyDeclarations
77505 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
77506 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
77507 __pyx_r = __pyx_pf_5pysam_7libcbcf_11BCFIterator_4__iter__(((struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)__pyx_v_self));
77508
77509 /* function exit code */
77510 __Pyx_RefNannyFinishContext();
77511 return __pyx_r;
77512 }
77513
77514 static PyObject *__pyx_pf_5pysam_7libcbcf_11BCFIterator_4__iter__(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self) {
77515 PyObject *__pyx_r = NULL;
77516 __Pyx_TraceDeclarations
77517 __Pyx_RefNannyDeclarations
77518 int __pyx_lineno = 0;
77519 const char *__pyx_filename = NULL;
77520 int __pyx_clineno = 0;
77521 __Pyx_RefNannySetupContext("__iter__", 1);
77522 __Pyx_TraceCall("__iter__", __pyx_f[0], 3890, 0, __PYX_ERR(0, 3890, __pyx_L1_error));
77523
77524 /* "pysam/libcbcf.pyx":3891
77525 *
77526 * def __iter__(self):
77527 * return self # <<<<<<<<<<<<<<
77528 *
77529 * def __next__(self):
77530 */
77531 __Pyx_XDECREF(__pyx_r);
77532 __Pyx_INCREF((PyObject *)__pyx_v_self);
77533 __pyx_r = ((PyObject *)__pyx_v_self);
77534 goto __pyx_L0;
77535
77536 /* "pysam/libcbcf.pyx":3890
77537 * self.iter = NULL
77538 *
77539 * def __iter__(self): # <<<<<<<<<<<<<<
77540 * return self
77541 *
77542 */
77543
77544 /* function exit code */
77545 __pyx_L1_error:;
77546 __Pyx_AddTraceback("pysam.libcbcf.BCFIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77547 __pyx_r = NULL;
77548 __pyx_L0:;
77549 __Pyx_XGIVEREF(__pyx_r);
77550 __Pyx_TraceReturn(__pyx_r, 0);
77551 __Pyx_RefNannyFinishContext();
77552 return __pyx_r;
77553 }
77554
77555 /* "pysam/libcbcf.pyx":3893
77556 * return self
77557 *
77558 * def __next__(self): # <<<<<<<<<<<<<<
77559 * if not self.iter:
77560 * raise StopIteration
77561 */
77562
77563 /* Python wrapper */
77564 static PyObject *__pyx_pw_5pysam_7libcbcf_11BCFIterator_7__next__(PyObject *__pyx_v_self); /*proto*/
77565 static PyObject *__pyx_pw_5pysam_7libcbcf_11BCFIterator_7__next__(PyObject *__pyx_v_self) {
77566 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
77567 PyObject *__pyx_r = 0;
77568 __Pyx_RefNannyDeclarations
77569 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
77570 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
77571 __pyx_r = __pyx_pf_5pysam_7libcbcf_11BCFIterator_6__next__(((struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)__pyx_v_self));
77572
77573 /* function exit code */
77574 __Pyx_RefNannyFinishContext();
77575 return __pyx_r;
77576 }
77577
77578 static PyObject *__pyx_pf_5pysam_7libcbcf_11BCFIterator_6__next__(struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self) {
77579 bcf1_t *__pyx_v_record;
77580 int __pyx_v_ret;
77581 PyObject *__pyx_r = NULL;
77582 __Pyx_TraceDeclarations
77583 __Pyx_RefNannyDeclarations
77584 int __pyx_error_without_exception = 0; /* StopIteration */
77585 int __pyx_t_1;
77586 PyObject *__pyx_t_2 = NULL;
77587 PyObject *__pyx_t_3 = NULL;
77588 PyObject *__pyx_t_4 = NULL;
77589 int __pyx_lineno = 0;
77590 const char *__pyx_filename = NULL;
77591 int __pyx_clineno = 0;
77592 __Pyx_RefNannySetupContext("__next__", 1);
77593 __Pyx_TraceCall("__next__", __pyx_f[0], 3893, 0, __PYX_ERR(0, 3893, __pyx_L1_error));
77594
77595 /* "pysam/libcbcf.pyx":3894
77596 *
77597 * def __next__(self):
77598 * if not self.iter: # <<<<<<<<<<<<<<
77599 * raise StopIteration
77600 *
77601 */
77602 __pyx_t_1 = (!(__pyx_v_self->__pyx_base.iter != 0));
77603 if (unlikely(__pyx_t_1)) {
77604
77605 /* "pysam/libcbcf.pyx":3895
77606 * def __next__(self):
77607 * if not self.iter:
77608 * raise StopIteration # <<<<<<<<<<<<<<
77609 *
77610 * cdef bcf1_t *record = bcf_init1()
77611 */
77612 __pyx_error_without_exception = 1;
77613 goto __pyx_L1_error;;
77614
77615 /* "pysam/libcbcf.pyx":3894
77616 *
77617 * def __next__(self):
77618 * if not self.iter: # <<<<<<<<<<<<<<
77619 * raise StopIteration
77620 *
77621 */
77622 }
77623
77624 /* "pysam/libcbcf.pyx":3897
77625 * raise StopIteration
77626 *
77627 * cdef bcf1_t *record = bcf_init1() # <<<<<<<<<<<<<<
77628 *
77629 * if not record:
77630 */
77631 __pyx_v_record = bcf_init1();
77632
77633 /* "pysam/libcbcf.pyx":3899
77634 * cdef bcf1_t *record = bcf_init1()
77635 *
77636 * if not record: # <<<<<<<<<<<<<<
77637 * raise MemoryError('unable to allocate BCF record')
77638 *
77639 */
77640 __pyx_t_1 = (!(__pyx_v_record != 0));
77641 if (unlikely(__pyx_t_1)) {
77642
77643 /* "pysam/libcbcf.pyx":3900
77644 *
77645 * if not record:
77646 * raise MemoryError('unable to allocate BCF record') # <<<<<<<<<<<<<<
77647 *
77648 * record.pos = -1
77649 */
77650 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3900, __pyx_L1_error)
77651 __Pyx_GOTREF(__pyx_t_2);
77652 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
77653 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
77654 __PYX_ERR(0, 3900, __pyx_L1_error)
77655
77656 /* "pysam/libcbcf.pyx":3899
77657 * cdef bcf1_t *record = bcf_init1()
77658 *
77659 * if not record: # <<<<<<<<<<<<<<
77660 * raise MemoryError('unable to allocate BCF record')
77661 *
77662 */
77663 }
77664
77665 /* "pysam/libcbcf.pyx":3902
77666 * raise MemoryError('unable to allocate BCF record')
77667 *
77668 * record.pos = -1 # <<<<<<<<<<<<<<
77669 * if self.bcf.drop_samples:
77670 * record.max_unpack = BCF_UN_SHR
77671 */
77672 __pyx_v_record->pos = -1;
77673
77674 /* "pysam/libcbcf.pyx":3903
77675 *
77676 * record.pos = -1
77677 * if self.bcf.drop_samples: # <<<<<<<<<<<<<<
77678 * record.max_unpack = BCF_UN_SHR
77679 *
77680 */
77681 if (__pyx_v_self->__pyx_base.bcf->drop_samples) {
77682
77683 /* "pysam/libcbcf.pyx":3904
77684 * record.pos = -1
77685 * if self.bcf.drop_samples:
77686 * record.max_unpack = BCF_UN_SHR # <<<<<<<<<<<<<<
77687 *
77688 * cdef int ret
77689 */
77690 __pyx_v_record->max_unpack = BCF_UN_SHR;
77691
77692 /* "pysam/libcbcf.pyx":3903
77693 *
77694 * record.pos = -1
77695 * if self.bcf.drop_samples: # <<<<<<<<<<<<<<
77696 * record.max_unpack = BCF_UN_SHR
77697 *
77698 */
77699 }
77700
77701 /* "pysam/libcbcf.pyx":3908
77702 * cdef int ret
77703 *
77704 * with nogil: # <<<<<<<<<<<<<<
77705 * ret = bcf_itr_next(self.bcf.htsfile, self.iter, record)
77706 *
77707 */
77708 {
77709 #ifdef WITH_THREAD
77710 PyThreadState *_save;
77711 _save = NULL;
77712 Py_UNBLOCK_THREADS
77713 __Pyx_FastGIL_Remember();
77714 #endif
77715 /*try:*/ {
77716
77717 /* "pysam/libcbcf.pyx":3909
77718 *
77719 * with nogil:
77720 * ret = bcf_itr_next(self.bcf.htsfile, self.iter, record) # <<<<<<<<<<<<<<
77721 *
77722 * if ret < 0:
77723 */
77724 __pyx_v_ret = bcf_itr_next(__pyx_v_self->__pyx_base.bcf->__pyx_base.htsfile, __pyx_v_self->__pyx_base.iter, __pyx_v_record);
77725 }
77726
77727 /* "pysam/libcbcf.pyx":3908
77728 * cdef int ret
77729 *
77730 * with nogil: # <<<<<<<<<<<<<<
77731 * ret = bcf_itr_next(self.bcf.htsfile, self.iter, record)
77732 *
77733 */
77734 /*finally:*/ {
77735 /*normal exit:*/{
77736 #ifdef WITH_THREAD
77737 __Pyx_FastGIL_Forget();
77738 Py_BLOCK_THREADS
77739 #endif
77740 goto __pyx_L8;
77741 }
77742 __pyx_L8:;
77743 }
77744 }
77745
77746 /* "pysam/libcbcf.pyx":3911
77747 * ret = bcf_itr_next(self.bcf.htsfile, self.iter, record)
77748 *
77749 * if ret < 0: # <<<<<<<<<<<<<<
77750 * _stop_BCFIterator(self, record)
77751 * if ret == -1:
77752 */
77753 __pyx_t_1 = (__pyx_v_ret < 0);
77754 if (__pyx_t_1) {
77755
77756 /* "pysam/libcbcf.pyx":3912
77757 *
77758 * if ret < 0:
77759 * _stop_BCFIterator(self, record) # <<<<<<<<<<<<<<
77760 * if ret == -1:
77761 * raise StopIteration
77762 */
77763 __pyx_f_5pysam_7libcbcf__stop_BCFIterator(__pyx_v_self, __pyx_v_record); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3912, __pyx_L1_error)
77764
77765 /* "pysam/libcbcf.pyx":3913
77766 * if ret < 0:
77767 * _stop_BCFIterator(self, record)
77768 * if ret == -1: # <<<<<<<<<<<<<<
77769 * raise StopIteration
77770 * elif ret == -2:
77771 */
77772 __pyx_t_1 = (__pyx_v_ret == -1L);
77773 if (unlikely(__pyx_t_1)) {
77774
77775 /* "pysam/libcbcf.pyx":3914
77776 * _stop_BCFIterator(self, record)
77777 * if ret == -1:
77778 * raise StopIteration # <<<<<<<<<<<<<<
77779 * elif ret == -2:
77780 * raise IOError('truncated file')
77781 */
77782 __pyx_error_without_exception = 1;
77783 goto __pyx_L1_error;;
77784
77785 /* "pysam/libcbcf.pyx":3913
77786 * if ret < 0:
77787 * _stop_BCFIterator(self, record)
77788 * if ret == -1: # <<<<<<<<<<<<<<
77789 * raise StopIteration
77790 * elif ret == -2:
77791 */
77792 }
77793
77794 /* "pysam/libcbcf.pyx":3915
77795 * if ret == -1:
77796 * raise StopIteration
77797 * elif ret == -2: # <<<<<<<<<<<<<<
77798 * raise IOError('truncated file')
77799 * elif errno:
77800 */
77801 __pyx_t_1 = (__pyx_v_ret == -2L);
77802 if (unlikely(__pyx_t_1)) {
77803
77804 /* "pysam/libcbcf.pyx":3916
77805 * raise StopIteration
77806 * elif ret == -2:
77807 * raise IOError('truncated file') # <<<<<<<<<<<<<<
77808 * elif errno:
77809 * raise IOError(errno, strerror(errno))
77810 */
77811 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__222, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3916, __pyx_L1_error)
77812 __Pyx_GOTREF(__pyx_t_2);
77813 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
77814 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
77815 __PYX_ERR(0, 3916, __pyx_L1_error)
77816
77817 /* "pysam/libcbcf.pyx":3915
77818 * if ret == -1:
77819 * raise StopIteration
77820 * elif ret == -2: # <<<<<<<<<<<<<<
77821 * raise IOError('truncated file')
77822 * elif errno:
77823 */
77824 }
77825
77826 /* "pysam/libcbcf.pyx":3917
77827 * elif ret == -2:
77828 * raise IOError('truncated file')
77829 * elif errno: # <<<<<<<<<<<<<<
77830 * raise IOError(errno, strerror(errno))
77831 * else:
77832 */
77833 __pyx_t_1 = (errno != 0);
77834 if (unlikely(__pyx_t_1)) {
77835
77836 /* "pysam/libcbcf.pyx":3918
77837 * raise IOError('truncated file')
77838 * elif errno:
77839 * raise IOError(errno, strerror(errno)) # <<<<<<<<<<<<<<
77840 * else:
77841 * raise IOError('unable to fetch next record')
77842 */
77843 __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3918, __pyx_L1_error)
77844 __Pyx_GOTREF(__pyx_t_2);
77845 __pyx_t_3 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3918, __pyx_L1_error)
77846 __Pyx_GOTREF(__pyx_t_3);
77847 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3918, __pyx_L1_error)
77848 __Pyx_GOTREF(__pyx_t_4);
77849 __Pyx_GIVEREF(__pyx_t_2);
77850 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 3918, __pyx_L1_error);
77851 __Pyx_GIVEREF(__pyx_t_3);
77852 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 3918, __pyx_L1_error);
77853 __pyx_t_2 = 0;
77854 __pyx_t_3 = 0;
77855 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3918, __pyx_L1_error)
77856 __Pyx_GOTREF(__pyx_t_3);
77857 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
77858 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
77859 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
77860 __PYX_ERR(0, 3918, __pyx_L1_error)
77861
77862 /* "pysam/libcbcf.pyx":3917
77863 * elif ret == -2:
77864 * raise IOError('truncated file')
77865 * elif errno: # <<<<<<<<<<<<<<
77866 * raise IOError(errno, strerror(errno))
77867 * else:
77868 */
77869 }
77870
77871 /* "pysam/libcbcf.pyx":3920
77872 * raise IOError(errno, strerror(errno))
77873 * else:
77874 * raise IOError('unable to fetch next record') # <<<<<<<<<<<<<<
77875 *
77876 * ret = bcf_subset_format(self.bcf.header.ptr, record)
77877 */
77878 /*else*/ {
77879 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__223, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3920, __pyx_L1_error)
77880 __Pyx_GOTREF(__pyx_t_3);
77881 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
77882 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
77883 __PYX_ERR(0, 3920, __pyx_L1_error)
77884 }
77885
77886 /* "pysam/libcbcf.pyx":3911
77887 * ret = bcf_itr_next(self.bcf.htsfile, self.iter, record)
77888 *
77889 * if ret < 0: # <<<<<<<<<<<<<<
77890 * _stop_BCFIterator(self, record)
77891 * if ret == -1:
77892 */
77893 }
77894
77895 /* "pysam/libcbcf.pyx":3922
77896 * raise IOError('unable to fetch next record')
77897 *
77898 * ret = bcf_subset_format(self.bcf.header.ptr, record) # <<<<<<<<<<<<<<
77899 *
77900 * if ret < 0:
77901 */
77902 __pyx_v_ret = bcf_subset_format(__pyx_v_self->__pyx_base.bcf->header->ptr, __pyx_v_record);
77903
77904 /* "pysam/libcbcf.pyx":3924
77905 * ret = bcf_subset_format(self.bcf.header.ptr, record)
77906 *
77907 * if ret < 0: # <<<<<<<<<<<<<<
77908 * _stop_BCFIterator(self, record)
77909 * raise ValueError('error in bcf_subset_format')
77910 */
77911 __pyx_t_1 = (__pyx_v_ret < 0);
77912 if (unlikely(__pyx_t_1)) {
77913
77914 /* "pysam/libcbcf.pyx":3925
77915 *
77916 * if ret < 0:
77917 * _stop_BCFIterator(self, record) # <<<<<<<<<<<<<<
77918 * raise ValueError('error in bcf_subset_format')
77919 *
77920 */
77921 __pyx_f_5pysam_7libcbcf__stop_BCFIterator(__pyx_v_self, __pyx_v_record); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3925, __pyx_L1_error)
77922
77923 /* "pysam/libcbcf.pyx":3926
77924 * if ret < 0:
77925 * _stop_BCFIterator(self, record)
77926 * raise ValueError('error in bcf_subset_format') # <<<<<<<<<<<<<<
77927 *
77928 * return makeVariantRecord(self.bcf.header, record)
77929 */
77930 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__224, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3926, __pyx_L1_error)
77931 __Pyx_GOTREF(__pyx_t_3);
77932 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
77933 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
77934 __PYX_ERR(0, 3926, __pyx_L1_error)
77935
77936 /* "pysam/libcbcf.pyx":3924
77937 * ret = bcf_subset_format(self.bcf.header.ptr, record)
77938 *
77939 * if ret < 0: # <<<<<<<<<<<<<<
77940 * _stop_BCFIterator(self, record)
77941 * raise ValueError('error in bcf_subset_format')
77942 */
77943 }
77944
77945 /* "pysam/libcbcf.pyx":3928
77946 * raise ValueError('error in bcf_subset_format')
77947 *
77948 * return makeVariantRecord(self.bcf.header, record) # <<<<<<<<<<<<<<
77949 *
77950 *
77951 */
77952 __Pyx_XDECREF(__pyx_r);
77953 __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base.bcf->header);
77954 __Pyx_INCREF(__pyx_t_3);
77955 __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecord(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_3), __pyx_v_record)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3928, __pyx_L1_error)
77956 __Pyx_GOTREF(__pyx_t_4);
77957 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
77958 __pyx_r = __pyx_t_4;
77959 __pyx_t_4 = 0;
77960 goto __pyx_L0;
77961
77962 /* "pysam/libcbcf.pyx":3893
77963 * return self
77964 *
77965 * def __next__(self): # <<<<<<<<<<<<<<
77966 * if not self.iter:
77967 * raise StopIteration
77968 */
77969
77970 /* function exit code */
77971 __pyx_L1_error:;
77972 __Pyx_XDECREF(__pyx_t_2);
77973 __Pyx_XDECREF(__pyx_t_3);
77974 __Pyx_XDECREF(__pyx_t_4);
77975 if (!__pyx_error_without_exception) {
77976 __Pyx_AddTraceback("pysam.libcbcf.BCFIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77977 }
77978 __pyx_r = NULL;
77979 __pyx_L0:;
77980 __Pyx_XGIVEREF(__pyx_r);
77981 __Pyx_TraceReturn(__pyx_r, 0);
77982 __Pyx_RefNannyFinishContext();
77983 return __pyx_r;
77984 }
77985
77986 /* "(tree fragment)":1
77987 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
77988 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
77989 * def __setstate_cython__(self, __pyx_state):
77990 */
77991
77992 /* Python wrapper */
77993 static PyObject *__pyx_pw_5pysam_7libcbcf_11BCFIterator_9__reduce_cython__(PyObject *__pyx_v_self,
77994 #if CYTHON_METH_FASTCALL
77995 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
77996 #else
77997 PyObject *__pyx_args, PyObject *__pyx_kwds
77998 #endif
77999 ); /*proto*/
78000 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11BCFIterator_8__reduce_cython__, "BCFIterator.__reduce_cython__(self)");
78001 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11BCFIterator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11BCFIterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11BCFIterator_8__reduce_cython__};
78002 static PyObject *__pyx_pw_5pysam_7libcbcf_11BCFIterator_9__reduce_cython__(PyObject *__pyx_v_self,
78003 #if CYTHON_METH_FASTCALL
78004 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
78005 #else
78006 PyObject *__pyx_args, PyObject *__pyx_kwds
78007 #endif
78008 ) {
78009 #if !CYTHON_METH_FASTCALL
78010 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
78011 #endif
78012 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
78013 PyObject *__pyx_r = 0;
78014 __Pyx_RefNannyDeclarations
78015 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
78016 #if !CYTHON_METH_FASTCALL
78017 #if CYTHON_ASSUME_SAFE_MACROS
78018 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
78019 #else
78020 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
78021 #endif
78022 #endif
78023 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
78024 if (unlikely(__pyx_nargs > 0)) {
78025 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
78026 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
78027 __pyx_r = __pyx_pf_5pysam_7libcbcf_11BCFIterator_8__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)__pyx_v_self));
78028
78029 /* function exit code */
78030 __Pyx_RefNannyFinishContext();
78031 return __pyx_r;
78032 }
78033
78034 static PyObject *__pyx_pf_5pysam_7libcbcf_11BCFIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self) {
78035 PyObject *__pyx_r = NULL;
78036 __Pyx_TraceDeclarations
78037 __Pyx_RefNannyDeclarations
78038 int __pyx_lineno = 0;
78039 const char *__pyx_filename = NULL;
78040 int __pyx_clineno = 0;
78041 __Pyx_TraceFrameInit(__pyx_codeobj__225)
78042 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
78043 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
78044
78045 /* "(tree fragment)":2
78046 * def __reduce_cython__(self):
78047 * raise TypeError, "self.iter cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
78048 * def __setstate_cython__(self, __pyx_state):
78049 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
78050 */
78051 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iter_cannot_be_converted_to, 0, 0);
78052 __PYX_ERR(4, 2, __pyx_L1_error)
78053
78054 /* "(tree fragment)":1
78055 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
78056 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
78057 * def __setstate_cython__(self, __pyx_state):
78058 */
78059
78060 /* function exit code */
78061 __pyx_L1_error:;
78062 __Pyx_AddTraceback("pysam.libcbcf.BCFIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78063 __pyx_r = NULL;
78064 __Pyx_XGIVEREF(__pyx_r);
78065 __Pyx_TraceReturn(__pyx_r, 0);
78066 __Pyx_RefNannyFinishContext();
78067 return __pyx_r;
78068 }
78069
78070 /* "(tree fragment)":3
78071 * def __reduce_cython__(self):
78072 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
78073 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
78074 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
78075 */
78076
78077 /* Python wrapper */
78078 static PyObject *__pyx_pw_5pysam_7libcbcf_11BCFIterator_11__setstate_cython__(PyObject *__pyx_v_self,
78079 #if CYTHON_METH_FASTCALL
78080 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
78081 #else
78082 PyObject *__pyx_args, PyObject *__pyx_kwds
78083 #endif
78084 ); /*proto*/
78085 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11BCFIterator_10__setstate_cython__, "BCFIterator.__setstate_cython__(self, __pyx_state)");
78086 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11BCFIterator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11BCFIterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11BCFIterator_10__setstate_cython__};
78087 static PyObject *__pyx_pw_5pysam_7libcbcf_11BCFIterator_11__setstate_cython__(PyObject *__pyx_v_self,
78088 #if CYTHON_METH_FASTCALL
78089 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
78090 #else
78091 PyObject *__pyx_args, PyObject *__pyx_kwds
78092 #endif
78093 ) {
78094 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
78095 #if !CYTHON_METH_FASTCALL
78096 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
78097 #endif
78098 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
78099 PyObject* values[1] = {0};
78100 int __pyx_lineno = 0;
78101 const char *__pyx_filename = NULL;
78102 int __pyx_clineno = 0;
78103 PyObject *__pyx_r = 0;
78104 __Pyx_RefNannyDeclarations
78105 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
78106 #if !CYTHON_METH_FASTCALL
78107 #if CYTHON_ASSUME_SAFE_MACROS
78108 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
78109 #else
78110 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
78111 #endif
78112 #endif
78113 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
78114 {
78115 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
78116 if (__pyx_kwds) {
78117 Py_ssize_t kw_args;
78118 switch (__pyx_nargs) {
78119 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
78120 CYTHON_FALLTHROUGH;
78121 case 0: break;
78122 default: goto __pyx_L5_argtuple_error;
78123 }
78124 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
78125 switch (__pyx_nargs) {
78126 case 0:
78127 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
78128 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
78129 kw_args--;
78130 }
78131 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
78132 else goto __pyx_L5_argtuple_error;
78133 }
78134 if (unlikely(kw_args > 0)) {
78135 const Py_ssize_t kwd_pos_args = __pyx_nargs;
78136 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
78137 }
78138 } else if (unlikely(__pyx_nargs != 1)) {
78139 goto __pyx_L5_argtuple_error;
78140 } else {
78141 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
78142 }
78143 __pyx_v___pyx_state = values[0];
78144 }
78145 goto __pyx_L6_skip;
78146 __pyx_L5_argtuple_error:;
78147 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
78148 __pyx_L6_skip:;
78149 goto __pyx_L4_argument_unpacking_done;
78150 __pyx_L3_error:;
78151 {
78152 Py_ssize_t __pyx_temp;
78153 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
78154 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
78155 }
78156 }
78157 __Pyx_AddTraceback("pysam.libcbcf.BCFIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78158 __Pyx_RefNannyFinishContext();
78159 return NULL;
78160 __pyx_L4_argument_unpacking_done:;
78161 __pyx_r = __pyx_pf_5pysam_7libcbcf_11BCFIterator_10__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)__pyx_v_self), __pyx_v___pyx_state);
78162
78163 /* function exit code */
78164 {
78165 Py_ssize_t __pyx_temp;
78166 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
78167 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
78168 }
78169 }
78170 __Pyx_RefNannyFinishContext();
78171 return __pyx_r;
78172 }
78173
78174 static PyObject *__pyx_pf_5pysam_7libcbcf_11BCFIterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_BCFIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
78175 PyObject *__pyx_r = NULL;
78176 __Pyx_TraceDeclarations
78177 __Pyx_RefNannyDeclarations
78178 int __pyx_lineno = 0;
78179 const char *__pyx_filename = NULL;
78180 int __pyx_clineno = 0;
78181 __Pyx_TraceFrameInit(__pyx_codeobj__226)
78182 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
78183 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
78184
78185 /* "(tree fragment)":4
78186 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
78187 * def __setstate_cython__(self, __pyx_state):
78188 * raise TypeError, "self.iter cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
78189 */
78190 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iter_cannot_be_converted_to, 0, 0);
78191 __PYX_ERR(4, 4, __pyx_L1_error)
78192
78193 /* "(tree fragment)":3
78194 * def __reduce_cython__(self):
78195 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
78196 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
78197 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
78198 */
78199
78200 /* function exit code */
78201 __pyx_L1_error:;
78202 __Pyx_AddTraceback("pysam.libcbcf.BCFIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78203 __pyx_r = NULL;
78204 __Pyx_XGIVEREF(__pyx_r);
78205 __Pyx_TraceReturn(__pyx_r, 0);
78206 __Pyx_RefNannyFinishContext();
78207 return __pyx_r;
78208 }
78209
78210 /* "pysam/libcbcf.pyx":3932
78211 *
78212 * cdef class TabixIterator(BaseIterator):
78213 * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
78214 * self.line_buffer.l = 0
78215 * self.line_buffer.m = 0
78216 */
78217
78218 /* Python wrapper */
78219 static int __pyx_pw_5pysam_7libcbcf_13TabixIterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
78220 static int __pyx_pw_5pysam_7libcbcf_13TabixIterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
78221 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
78222 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
78223 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
78224 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
78225 int __pyx_r;
78226 __Pyx_RefNannyDeclarations
78227 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
78228 #if CYTHON_ASSUME_SAFE_MACROS
78229 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
78230 #else
78231 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
78232 #endif
78233 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
78234 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
78235 __Pyx_INCREF(__pyx_args);
78236 __pyx_v_args = __pyx_args;
78237 __pyx_r = __pyx_pf_5pysam_7libcbcf_13TabixIterator___cinit__(((struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
78238
78239 /* function exit code */
78240 __Pyx_DECREF(__pyx_v_args);
78241 __Pyx_XDECREF(__pyx_v_kwargs);
78242 __Pyx_RefNannyFinishContext();
78243 return __pyx_r;
78244 }
78245
78246 static int __pyx_pf_5pysam_7libcbcf_13TabixIterator___cinit__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
78247 int __pyx_r;
78248 __Pyx_TraceDeclarations
78249 int __pyx_lineno = 0;
78250 const char *__pyx_filename = NULL;
78251 int __pyx_clineno = 0;
78252 __Pyx_TraceCall("__cinit__", __pyx_f[0], 3932, 0, __PYX_ERR(0, 3932, __pyx_L1_error));
78253
78254 /* "pysam/libcbcf.pyx":3933
78255 * cdef class TabixIterator(BaseIterator):
78256 * def __cinit__(self, *args, **kwargs):
78257 * self.line_buffer.l = 0 # <<<<<<<<<<<<<<
78258 * self.line_buffer.m = 0
78259 * self.line_buffer.s = NULL
78260 */
78261 __pyx_v_self->line_buffer.l = 0;
78262
78263 /* "pysam/libcbcf.pyx":3934
78264 * def __cinit__(self, *args, **kwargs):
78265 * self.line_buffer.l = 0
78266 * self.line_buffer.m = 0 # <<<<<<<<<<<<<<
78267 * self.line_buffer.s = NULL
78268 *
78269 */
78270 __pyx_v_self->line_buffer.m = 0;
78271
78272 /* "pysam/libcbcf.pyx":3935
78273 * self.line_buffer.l = 0
78274 * self.line_buffer.m = 0
78275 * self.line_buffer.s = NULL # <<<<<<<<<<<<<<
78276 *
78277 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True):
78278 */
78279 __pyx_v_self->line_buffer.s = NULL;
78280
78281 /* "pysam/libcbcf.pyx":3932
78282 *
78283 * cdef class TabixIterator(BaseIterator):
78284 * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
78285 * self.line_buffer.l = 0
78286 * self.line_buffer.m = 0
78287 */
78288
78289 /* function exit code */
78290 __pyx_r = 0;
78291 goto __pyx_L0;
78292 __pyx_L1_error:;
78293 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78294 __pyx_r = -1;
78295 __pyx_L0:;
78296 __Pyx_TraceReturn(Py_None, 0);
78297 return __pyx_r;
78298 }
78299
78300 /* "pysam/libcbcf.pyx":3937
78301 * self.line_buffer.s = NULL
78302 *
78303 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True): # <<<<<<<<<<<<<<
78304 * if bcf is None:
78305 * raise ValueError('bcf must not be None')
78306 */
78307
78308 /* Python wrapper */
78309 static int __pyx_pw_5pysam_7libcbcf_13TabixIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
78310 static int __pyx_pw_5pysam_7libcbcf_13TabixIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
78311 struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_bcf = 0;
78312 PyObject *__pyx_v_contig = 0;
78313 PyObject *__pyx_v_start = 0;
78314 PyObject *__pyx_v_stop = 0;
78315 PyObject *__pyx_v_reopen = 0;
78316 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
78317 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
78318 PyObject* values[5] = {0,0,0,0,0};
78319 int __pyx_lineno = 0;
78320 const char *__pyx_filename = NULL;
78321 int __pyx_clineno = 0;
78322 int __pyx_r;
78323 __Pyx_RefNannyDeclarations
78324 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
78325 #if CYTHON_ASSUME_SAFE_MACROS
78326 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
78327 #else
78328 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
78329 #endif
78330 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
78331 {
78332 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bcf,&__pyx_n_s_contig,&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_reopen,0};
78333 values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
78334 values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
78335 values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
78336 values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
78337 if (__pyx_kwds) {
78338 Py_ssize_t kw_args;
78339 switch (__pyx_nargs) {
78340 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
78341 CYTHON_FALLTHROUGH;
78342 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
78343 CYTHON_FALLTHROUGH;
78344 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
78345 CYTHON_FALLTHROUGH;
78346 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
78347 CYTHON_FALLTHROUGH;
78348 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
78349 CYTHON_FALLTHROUGH;
78350 case 0: break;
78351 default: goto __pyx_L5_argtuple_error;
78352 }
78353 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
78354 switch (__pyx_nargs) {
78355 case 0:
78356 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bcf)) != 0)) {
78357 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
78358 kw_args--;
78359 }
78360 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3937, __pyx_L3_error)
78361 else goto __pyx_L5_argtuple_error;
78362 CYTHON_FALLTHROUGH;
78363 case 1:
78364 if (kw_args > 0) {
78365 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_contig);
78366 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
78367 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3937, __pyx_L3_error)
78368 }
78369 CYTHON_FALLTHROUGH;
78370 case 2:
78371 if (kw_args > 0) {
78372 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
78373 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
78374 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3937, __pyx_L3_error)
78375 }
78376 CYTHON_FALLTHROUGH;
78377 case 3:
78378 if (kw_args > 0) {
78379 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stop);
78380 if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
78381 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3937, __pyx_L3_error)
78382 }
78383 CYTHON_FALLTHROUGH;
78384 case 4:
78385 if (kw_args > 0) {
78386 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reopen);
78387 if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
78388 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3937, __pyx_L3_error)
78389 }
78390 }
78391 if (unlikely(kw_args > 0)) {
78392 const Py_ssize_t kwd_pos_args = __pyx_nargs;
78393 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3937, __pyx_L3_error)
78394 }
78395 } else {
78396 switch (__pyx_nargs) {
78397 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
78398 CYTHON_FALLTHROUGH;
78399 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
78400 CYTHON_FALLTHROUGH;
78401 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
78402 CYTHON_FALLTHROUGH;
78403 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
78404 CYTHON_FALLTHROUGH;
78405 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
78406 break;
78407 default: goto __pyx_L5_argtuple_error;
78408 }
78409 }
78410 __pyx_v_bcf = ((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)values[0]);
78411 __pyx_v_contig = values[1];
78412 __pyx_v_start = values[2];
78413 __pyx_v_stop = values[3];
78414 __pyx_v_reopen = values[4];
78415 }
78416 goto __pyx_L6_skip;
78417 __pyx_L5_argtuple_error:;
78418 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 3937, __pyx_L3_error)
78419 __pyx_L6_skip:;
78420 goto __pyx_L4_argument_unpacking_done;
78421 __pyx_L3_error:;
78422 {
78423 Py_ssize_t __pyx_temp;
78424 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
78425 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
78426 }
78427 }
78428 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78429 __Pyx_RefNannyFinishContext();
78430 return -1;
78431 __pyx_L4_argument_unpacking_done:;
78432 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bcf), __pyx_ptype_5pysam_7libcbcf_VariantFile, 1, "bcf", 0))) __PYX_ERR(0, 3937, __pyx_L1_error)
78433 __pyx_r = __pyx_pf_5pysam_7libcbcf_13TabixIterator_2__init__(((struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)__pyx_v_self), __pyx_v_bcf, __pyx_v_contig, __pyx_v_start, __pyx_v_stop, __pyx_v_reopen);
78434
78435 /* function exit code */
78436 goto __pyx_L0;
78437 __pyx_L1_error:;
78438 __pyx_r = -1;
78439 __pyx_L0:;
78440 {
78441 Py_ssize_t __pyx_temp;
78442 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
78443 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
78444 }
78445 }
78446 __Pyx_RefNannyFinishContext();
78447 return __pyx_r;
78448 }
78449
78450 static int __pyx_pf_5pysam_7libcbcf_13TabixIterator_2__init__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_bcf, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_reopen) {
78451 struct __pyx_obj_5pysam_7libcbcf_TabixIndex *__pyx_v_index = 0;
78452 int __pyx_v_rid;
78453 CYTHON_UNUSED int __pyx_v_cstart;
78454 CYTHON_UNUSED int __pyx_v_cstop;
78455 int __pyx_r;
78456 __Pyx_TraceDeclarations
78457 __Pyx_RefNannyDeclarations
78458 int __pyx_t_1;
78459 PyObject *__pyx_t_2 = NULL;
78460 int __pyx_t_3;
78461 PyObject *__pyx_t_4 = NULL;
78462 PyObject *__pyx_t_5 = NULL;
78463 PyObject *__pyx_t_6 = NULL;
78464 int __pyx_t_7;
78465 PyObject *__pyx_t_8 = NULL;
78466 PyObject *__pyx_t_9 = NULL;
78467 unsigned int __pyx_t_10;
78468 int __pyx_t_11;
78469 PyObject *__pyx_t_12 = NULL;
78470 int __pyx_lineno = 0;
78471 const char *__pyx_filename = NULL;
78472 int __pyx_clineno = 0;
78473 __Pyx_RefNannySetupContext("__init__", 1);
78474 __Pyx_TraceCall("__init__", __pyx_f[0], 3937, 0, __PYX_ERR(0, 3937, __pyx_L1_error));
78475
78476 /* "pysam/libcbcf.pyx":3938
78477 *
78478 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True):
78479 * if bcf is None: # <<<<<<<<<<<<<<
78480 * raise ValueError('bcf must not be None')
78481 *
78482 */
78483 __pyx_t_1 = (((PyObject *)__pyx_v_bcf) == Py_None);
78484 if (unlikely(__pyx_t_1)) {
78485
78486 /* "pysam/libcbcf.pyx":3939
78487 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True):
78488 * if bcf is None:
78489 * raise ValueError('bcf must not be None') # <<<<<<<<<<<<<<
78490 *
78491 * if not isinstance(bcf.index, TabixIndex):
78492 */
78493 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__219, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3939, __pyx_L1_error)
78494 __Pyx_GOTREF(__pyx_t_2);
78495 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
78496 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78497 __PYX_ERR(0, 3939, __pyx_L1_error)
78498
78499 /* "pysam/libcbcf.pyx":3938
78500 *
78501 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True):
78502 * if bcf is None: # <<<<<<<<<<<<<<
78503 * raise ValueError('bcf must not be None')
78504 *
78505 */
78506 }
78507
78508 /* "pysam/libcbcf.pyx":3941
78509 * raise ValueError('bcf must not be None')
78510 *
78511 * if not isinstance(bcf.index, TabixIndex): # <<<<<<<<<<<<<<
78512 * raise ValueError('tabix index required')
78513 *
78514 */
78515 __pyx_t_2 = ((PyObject *)__pyx_v_bcf->index);
78516 __Pyx_INCREF(__pyx_t_2);
78517 __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_2, __pyx_ptype_5pysam_7libcbcf_TabixIndex);
78518 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78519 __pyx_t_3 = (!__pyx_t_1);
78520 if (unlikely(__pyx_t_3)) {
78521
78522 /* "pysam/libcbcf.pyx":3942
78523 *
78524 * if not isinstance(bcf.index, TabixIndex):
78525 * raise ValueError('tabix index required') # <<<<<<<<<<<<<<
78526 *
78527 * cdef TabixIndex index = bcf.index
78528 */
78529 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__227, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3942, __pyx_L1_error)
78530 __Pyx_GOTREF(__pyx_t_2);
78531 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
78532 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78533 __PYX_ERR(0, 3942, __pyx_L1_error)
78534
78535 /* "pysam/libcbcf.pyx":3941
78536 * raise ValueError('bcf must not be None')
78537 *
78538 * if not isinstance(bcf.index, TabixIndex): # <<<<<<<<<<<<<<
78539 * raise ValueError('tabix index required')
78540 *
78541 */
78542 }
78543
78544 /* "pysam/libcbcf.pyx":3944
78545 * raise ValueError('tabix index required')
78546 *
78547 * cdef TabixIndex index = bcf.index # <<<<<<<<<<<<<<
78548 *
78549 * self.bcf = bcf
78550 */
78551 if (!(likely(((((PyObject *)__pyx_v_bcf->index)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_bcf->index), __pyx_ptype_5pysam_7libcbcf_TabixIndex))))) __PYX_ERR(0, 3944, __pyx_L1_error)
78552 __pyx_t_2 = ((PyObject *)__pyx_v_bcf->index);
78553 __Pyx_INCREF(__pyx_t_2);
78554 __pyx_v_index = ((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)__pyx_t_2);
78555 __pyx_t_2 = 0;
78556
78557 /* "pysam/libcbcf.pyx":3946
78558 * cdef TabixIndex index = bcf.index
78559 *
78560 * self.bcf = bcf # <<<<<<<<<<<<<<
78561 * self.index = index
78562 *
78563 */
78564 __Pyx_INCREF((PyObject *)__pyx_v_bcf);
78565 __Pyx_GIVEREF((PyObject *)__pyx_v_bcf);
78566 __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.bcf);
78567 __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.bcf);
78568 __pyx_v_self->__pyx_base.bcf = __pyx_v_bcf;
78569
78570 /* "pysam/libcbcf.pyx":3947
78571 *
78572 * self.bcf = bcf
78573 * self.index = index # <<<<<<<<<<<<<<
78574 *
78575 * cdef int rid, cstart, cstop
78576 */
78577 __Pyx_INCREF((PyObject *)__pyx_v_index);
78578 __Pyx_GIVEREF((PyObject *)__pyx_v_index);
78579 __Pyx_GOTREF((PyObject *)__pyx_v_self->index);
78580 __Pyx_DECREF((PyObject *)__pyx_v_self->index);
78581 __pyx_v_self->index = __pyx_v_index;
78582
78583 /* "pysam/libcbcf.pyx":3951
78584 * cdef int rid, cstart, cstop
78585 *
78586 * try: # <<<<<<<<<<<<<<
78587 * rid = index.refmap[contig]
78588 * except KeyError:
78589 */
78590 {
78591 __Pyx_PyThreadState_declare
78592 __Pyx_PyThreadState_assign
78593 __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
78594 __Pyx_XGOTREF(__pyx_t_4);
78595 __Pyx_XGOTREF(__pyx_t_5);
78596 __Pyx_XGOTREF(__pyx_t_6);
78597 /*try:*/ {
78598
78599 /* "pysam/libcbcf.pyx":3952
78600 *
78601 * try:
78602 * rid = index.refmap[contig] # <<<<<<<<<<<<<<
78603 * except KeyError:
78604 * # A query for a non-existent contig yields an empty iterator, does not raise an error
78605 */
78606 if (unlikely(__pyx_v_index->__pyx_base.refmap == Py_None)) {
78607 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
78608 __PYX_ERR(0, 3952, __pyx_L5_error)
78609 }
78610 __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_index->__pyx_base.refmap, __pyx_v_contig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3952, __pyx_L5_error)
78611 __Pyx_GOTREF(__pyx_t_2);
78612 __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3952, __pyx_L5_error)
78613 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78614 __pyx_v_rid = __pyx_t_7;
78615
78616 /* "pysam/libcbcf.pyx":3951
78617 * cdef int rid, cstart, cstop
78618 *
78619 * try: # <<<<<<<<<<<<<<
78620 * rid = index.refmap[contig]
78621 * except KeyError:
78622 */
78623 }
78624 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
78625 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
78626 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
78627 goto __pyx_L10_try_end;
78628 __pyx_L5_error:;
78629 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
78630
78631 /* "pysam/libcbcf.pyx":3953
78632 * try:
78633 * rid = index.refmap[contig]
78634 * except KeyError: # <<<<<<<<<<<<<<
78635 * # A query for a non-existent contig yields an empty iterator, does not raise an error
78636 * self.iter = NULL
78637 */
78638 __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
78639 if (__pyx_t_7) {
78640 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78641 if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 3953, __pyx_L7_except_error)
78642 __Pyx_XGOTREF(__pyx_t_2);
78643 __Pyx_XGOTREF(__pyx_t_8);
78644 __Pyx_XGOTREF(__pyx_t_9);
78645
78646 /* "pysam/libcbcf.pyx":3955
78647 * except KeyError:
78648 * # A query for a non-existent contig yields an empty iterator, does not raise an error
78649 * self.iter = NULL # <<<<<<<<<<<<<<
78650 * return
78651 *
78652 */
78653 __pyx_v_self->__pyx_base.iter = NULL;
78654
78655 /* "pysam/libcbcf.pyx":3956
78656 * # A query for a non-existent contig yields an empty iterator, does not raise an error
78657 * self.iter = NULL
78658 * return # <<<<<<<<<<<<<<
78659 *
78660 * if reopen:
78661 */
78662 __pyx_r = 0;
78663 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78664 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
78665 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
78666 goto __pyx_L8_except_return;
78667 }
78668 goto __pyx_L7_except_error;
78669
78670 /* "pysam/libcbcf.pyx":3951
78671 * cdef int rid, cstart, cstop
78672 *
78673 * try: # <<<<<<<<<<<<<<
78674 * rid = index.refmap[contig]
78675 * except KeyError:
78676 */
78677 __pyx_L7_except_error:;
78678 __Pyx_XGIVEREF(__pyx_t_4);
78679 __Pyx_XGIVEREF(__pyx_t_5);
78680 __Pyx_XGIVEREF(__pyx_t_6);
78681 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
78682 goto __pyx_L1_error;
78683 __pyx_L8_except_return:;
78684 __Pyx_XGIVEREF(__pyx_t_4);
78685 __Pyx_XGIVEREF(__pyx_t_5);
78686 __Pyx_XGIVEREF(__pyx_t_6);
78687 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
78688 goto __pyx_L0;
78689 __pyx_L10_try_end:;
78690 }
78691
78692 /* "pysam/libcbcf.pyx":3958
78693 * return
78694 *
78695 * if reopen: # <<<<<<<<<<<<<<
78696 * self.bcf = self.bcf.copy()
78697 *
78698 */
78699 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_reopen); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3958, __pyx_L1_error)
78700 if (__pyx_t_3) {
78701
78702 /* "pysam/libcbcf.pyx":3959
78703 *
78704 * if reopen:
78705 * self.bcf = self.bcf.copy() # <<<<<<<<<<<<<<
78706 *
78707 * cstart = start if start is not None else 0
78708 */
78709 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.bcf), __pyx_n_s_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3959, __pyx_L1_error)
78710 __Pyx_GOTREF(__pyx_t_8);
78711 __pyx_t_2 = NULL;
78712 __pyx_t_10 = 0;
78713 #if CYTHON_UNPACK_METHODS
78714 if (likely(PyMethod_Check(__pyx_t_8))) {
78715 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
78716 if (likely(__pyx_t_2)) {
78717 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
78718 __Pyx_INCREF(__pyx_t_2);
78719 __Pyx_INCREF(function);
78720 __Pyx_DECREF_SET(__pyx_t_8, function);
78721 __pyx_t_10 = 1;
78722 }
78723 }
78724 #endif
78725 {
78726 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
78727 __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
78728 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
78729 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3959, __pyx_L1_error)
78730 __Pyx_GOTREF(__pyx_t_9);
78731 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
78732 }
78733 if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5pysam_7libcbcf_VariantFile))))) __PYX_ERR(0, 3959, __pyx_L1_error)
78734 __Pyx_GIVEREF(__pyx_t_9);
78735 __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.bcf);
78736 __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.bcf);
78737 __pyx_v_self->__pyx_base.bcf = ((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_t_9);
78738 __pyx_t_9 = 0;
78739
78740 /* "pysam/libcbcf.pyx":3958
78741 * return
78742 *
78743 * if reopen: # <<<<<<<<<<<<<<
78744 * self.bcf = self.bcf.copy()
78745 *
78746 */
78747 }
78748
78749 /* "pysam/libcbcf.pyx":3961
78750 * self.bcf = self.bcf.copy()
78751 *
78752 * cstart = start if start is not None else 0 # <<<<<<<<<<<<<<
78753 * cstop = stop if stop is not None else MAX_POS
78754 *
78755 */
78756 __pyx_t_3 = (__pyx_v_start != Py_None);
78757 if (__pyx_t_3) {
78758 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_start); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3961, __pyx_L1_error)
78759 __pyx_t_7 = __pyx_t_11;
78760 } else {
78761 __pyx_t_7 = 0;
78762 }
78763 __pyx_v_cstart = __pyx_t_7;
78764
78765 /* "pysam/libcbcf.pyx":3962
78766 *
78767 * cstart = start if start is not None else 0
78768 * cstop = stop if stop is not None else MAX_POS # <<<<<<<<<<<<<<
78769 *
78770 * self.iter = tbx_itr_queryi(index.ptr, rid, start, stop)
78771 */
78772 __pyx_t_3 = (__pyx_v_stop != Py_None);
78773 if (__pyx_t_3) {
78774 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_stop); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3962, __pyx_L1_error)
78775 __pyx_t_7 = __pyx_t_11;
78776 } else {
78777 __pyx_t_7 = __pyx_v_5pysam_7libcbcf_MAX_POS;
78778 }
78779 __pyx_v_cstop = __pyx_t_7;
78780
78781 /* "pysam/libcbcf.pyx":3964
78782 * cstop = stop if stop is not None else MAX_POS
78783 *
78784 * self.iter = tbx_itr_queryi(index.ptr, rid, start, stop) # <<<<<<<<<<<<<<
78785 *
78786 * if not self.iter:
78787 */
78788 __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_start); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3964, __pyx_L1_error)
78789 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_stop); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3964, __pyx_L1_error)
78790 __pyx_v_self->__pyx_base.iter = tbx_itr_queryi(__pyx_v_index->ptr, __pyx_v_rid, __pyx_t_7, __pyx_t_11);
78791
78792 /* "pysam/libcbcf.pyx":3966
78793 * self.iter = tbx_itr_queryi(index.ptr, rid, start, stop)
78794 *
78795 * if not self.iter: # <<<<<<<<<<<<<<
78796 * if errno:
78797 * raise IOError(errno, strerror(errno))
78798 */
78799 __pyx_t_3 = (!(__pyx_v_self->__pyx_base.iter != 0));
78800 if (__pyx_t_3) {
78801
78802 /* "pysam/libcbcf.pyx":3967
78803 *
78804 * if not self.iter:
78805 * if errno: # <<<<<<<<<<<<<<
78806 * raise IOError(errno, strerror(errno))
78807 * else:
78808 */
78809 __pyx_t_3 = (errno != 0);
78810 if (unlikely(__pyx_t_3)) {
78811
78812 /* "pysam/libcbcf.pyx":3968
78813 * if not self.iter:
78814 * if errno:
78815 * raise IOError(errno, strerror(errno)) # <<<<<<<<<<<<<<
78816 * else:
78817 * raise IOError('unable to fetch {}:{}-{}'.format(contig, start+1, stop))
78818 */
78819 __pyx_t_9 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3968, __pyx_L1_error)
78820 __Pyx_GOTREF(__pyx_t_9);
78821 __pyx_t_8 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3968, __pyx_L1_error)
78822 __Pyx_GOTREF(__pyx_t_8);
78823 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3968, __pyx_L1_error)
78824 __Pyx_GOTREF(__pyx_t_2);
78825 __Pyx_GIVEREF(__pyx_t_9);
78826 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9)) __PYX_ERR(0, 3968, __pyx_L1_error);
78827 __Pyx_GIVEREF(__pyx_t_8);
78828 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8)) __PYX_ERR(0, 3968, __pyx_L1_error);
78829 __pyx_t_9 = 0;
78830 __pyx_t_8 = 0;
78831 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3968, __pyx_L1_error)
78832 __Pyx_GOTREF(__pyx_t_8);
78833 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78834 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
78835 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
78836 __PYX_ERR(0, 3968, __pyx_L1_error)
78837
78838 /* "pysam/libcbcf.pyx":3967
78839 *
78840 * if not self.iter:
78841 * if errno: # <<<<<<<<<<<<<<
78842 * raise IOError(errno, strerror(errno))
78843 * else:
78844 */
78845 }
78846
78847 /* "pysam/libcbcf.pyx":3970
78848 * raise IOError(errno, strerror(errno))
78849 * else:
78850 * raise IOError('unable to fetch {}:{}-{}'.format(contig, start+1, stop)) # <<<<<<<<<<<<<<
78851 *
78852 * def __dealloc__(self):
78853 */
78854 /*else*/ {
78855 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unable_to_fetch, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3970, __pyx_L1_error)
78856 __Pyx_GOTREF(__pyx_t_2);
78857 __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_start, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3970, __pyx_L1_error)
78858 __Pyx_GOTREF(__pyx_t_9);
78859 __pyx_t_12 = NULL;
78860 __pyx_t_10 = 0;
78861 #if CYTHON_UNPACK_METHODS
78862 if (likely(PyMethod_Check(__pyx_t_2))) {
78863 __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
78864 if (likely(__pyx_t_12)) {
78865 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
78866 __Pyx_INCREF(__pyx_t_12);
78867 __Pyx_INCREF(function);
78868 __Pyx_DECREF_SET(__pyx_t_2, function);
78869 __pyx_t_10 = 1;
78870 }
78871 }
78872 #endif
78873 {
78874 PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_v_contig, __pyx_t_9, __pyx_v_stop};
78875 __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10);
78876 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
78877 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
78878 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3970, __pyx_L1_error)
78879 __Pyx_GOTREF(__pyx_t_8);
78880 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78881 }
78882 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3970, __pyx_L1_error)
78883 __Pyx_GOTREF(__pyx_t_2);
78884 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
78885 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
78886 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78887 __PYX_ERR(0, 3970, __pyx_L1_error)
78888 }
78889
78890 /* "pysam/libcbcf.pyx":3966
78891 * self.iter = tbx_itr_queryi(index.ptr, rid, start, stop)
78892 *
78893 * if not self.iter: # <<<<<<<<<<<<<<
78894 * if errno:
78895 * raise IOError(errno, strerror(errno))
78896 */
78897 }
78898
78899 /* "pysam/libcbcf.pyx":3937
78900 * self.line_buffer.s = NULL
78901 *
78902 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True): # <<<<<<<<<<<<<<
78903 * if bcf is None:
78904 * raise ValueError('bcf must not be None')
78905 */
78906
78907 /* function exit code */
78908 __pyx_r = 0;
78909 goto __pyx_L0;
78910 __pyx_L1_error:;
78911 __Pyx_XDECREF(__pyx_t_2);
78912 __Pyx_XDECREF(__pyx_t_8);
78913 __Pyx_XDECREF(__pyx_t_9);
78914 __Pyx_XDECREF(__pyx_t_12);
78915 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78916 __pyx_r = -1;
78917 __pyx_L0:;
78918 __Pyx_XDECREF((PyObject *)__pyx_v_index);
78919 __Pyx_TraceReturn(Py_None, 0);
78920 __Pyx_RefNannyFinishContext();
78921 return __pyx_r;
78922 }
78923
78924 /* "pysam/libcbcf.pyx":3972
78925 * raise IOError('unable to fetch {}:{}-{}'.format(contig, start+1, stop))
78926 *
78927 * def __dealloc__(self): # <<<<<<<<<<<<<<
78928 * if self.iter:
78929 * tbx_itr_destroy(self.iter)
78930 */
78931
78932 /* Python wrapper */
78933 static void __pyx_pw_5pysam_7libcbcf_13TabixIterator_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
78934 static void __pyx_pw_5pysam_7libcbcf_13TabixIterator_5__dealloc__(PyObject *__pyx_v_self) {
78935 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
78936 __Pyx_RefNannyDeclarations
78937 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
78938 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
78939 __pyx_pf_5pysam_7libcbcf_13TabixIterator_4__dealloc__(((struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)__pyx_v_self));
78940
78941 /* function exit code */
78942 __Pyx_RefNannyFinishContext();
78943 }
78944
78945 static void __pyx_pf_5pysam_7libcbcf_13TabixIterator_4__dealloc__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self) {
78946 __Pyx_TraceDeclarations
78947 int __pyx_t_1;
78948 int __pyx_lineno = 0;
78949 const char *__pyx_filename = NULL;
78950 int __pyx_clineno = 0;
78951 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3972, 0, __PYX_ERR(0, 3972, __pyx_L1_error));
78952
78953 /* "pysam/libcbcf.pyx":3973
78954 *
78955 * def __dealloc__(self):
78956 * if self.iter: # <<<<<<<<<<<<<<
78957 * tbx_itr_destroy(self.iter)
78958 * self.iter = NULL
78959 */
78960 __pyx_t_1 = (__pyx_v_self->__pyx_base.iter != 0);
78961 if (__pyx_t_1) {
78962
78963 /* "pysam/libcbcf.pyx":3974
78964 * def __dealloc__(self):
78965 * if self.iter:
78966 * tbx_itr_destroy(self.iter) # <<<<<<<<<<<<<<
78967 * self.iter = NULL
78968 *
78969 */
78970 tbx_itr_destroy(__pyx_v_self->__pyx_base.iter);
78971
78972 /* "pysam/libcbcf.pyx":3975
78973 * if self.iter:
78974 * tbx_itr_destroy(self.iter)
78975 * self.iter = NULL # <<<<<<<<<<<<<<
78976 *
78977 * if self.line_buffer.m:
78978 */
78979 __pyx_v_self->__pyx_base.iter = NULL;
78980
78981 /* "pysam/libcbcf.pyx":3973
78982 *
78983 * def __dealloc__(self):
78984 * if self.iter: # <<<<<<<<<<<<<<
78985 * tbx_itr_destroy(self.iter)
78986 * self.iter = NULL
78987 */
78988 }
78989
78990 /* "pysam/libcbcf.pyx":3977
78991 * self.iter = NULL
78992 *
78993 * if self.line_buffer.m: # <<<<<<<<<<<<<<
78994 * free(self.line_buffer.s)
78995 *
78996 */
78997 __pyx_t_1 = (__pyx_v_self->line_buffer.m != 0);
78998 if (__pyx_t_1) {
78999
79000 /* "pysam/libcbcf.pyx":3978
79001 *
79002 * if self.line_buffer.m:
79003 * free(self.line_buffer.s) # <<<<<<<<<<<<<<
79004 *
79005 * self.line_buffer.l = 0
79006 */
79007 free(__pyx_v_self->line_buffer.s);
79008
79009 /* "pysam/libcbcf.pyx":3977
79010 * self.iter = NULL
79011 *
79012 * if self.line_buffer.m: # <<<<<<<<<<<<<<
79013 * free(self.line_buffer.s)
79014 *
79015 */
79016 }
79017
79018 /* "pysam/libcbcf.pyx":3980
79019 * free(self.line_buffer.s)
79020 *
79021 * self.line_buffer.l = 0 # <<<<<<<<<<<<<<
79022 * self.line_buffer.m = 0
79023 * self.line_buffer.s = NULL
79024 */
79025 __pyx_v_self->line_buffer.l = 0;
79026
79027 /* "pysam/libcbcf.pyx":3981
79028 *
79029 * self.line_buffer.l = 0
79030 * self.line_buffer.m = 0 # <<<<<<<<<<<<<<
79031 * self.line_buffer.s = NULL
79032 *
79033 */
79034 __pyx_v_self->line_buffer.m = 0;
79035
79036 /* "pysam/libcbcf.pyx":3982
79037 * self.line_buffer.l = 0
79038 * self.line_buffer.m = 0
79039 * self.line_buffer.s = NULL # <<<<<<<<<<<<<<
79040 *
79041 * def __iter__(self):
79042 */
79043 __pyx_v_self->line_buffer.s = NULL;
79044
79045 /* "pysam/libcbcf.pyx":3972
79046 * raise IOError('unable to fetch {}:{}-{}'.format(contig, start+1, stop))
79047 *
79048 * def __dealloc__(self): # <<<<<<<<<<<<<<
79049 * if self.iter:
79050 * tbx_itr_destroy(self.iter)
79051 */
79052
79053 /* function exit code */
79054 goto __pyx_L0;
79055 __pyx_L1_error:;
79056 __Pyx_WriteUnraisable("pysam.libcbcf.TabixIterator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
79057 __pyx_L0:;
79058 __Pyx_TraceReturn(Py_None, 0);
79059 }
79060
79061 /* "pysam/libcbcf.pyx":3984
79062 * self.line_buffer.s = NULL
79063 *
79064 * def __iter__(self): # <<<<<<<<<<<<<<
79065 * return self
79066 *
79067 */
79068
79069 /* Python wrapper */
79070 static PyObject *__pyx_pw_5pysam_7libcbcf_13TabixIterator_7__iter__(PyObject *__pyx_v_self); /*proto*/
79071 static PyObject *__pyx_pw_5pysam_7libcbcf_13TabixIterator_7__iter__(PyObject *__pyx_v_self) {
79072 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
79073 PyObject *__pyx_r = 0;
79074 __Pyx_RefNannyDeclarations
79075 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
79076 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
79077 __pyx_r = __pyx_pf_5pysam_7libcbcf_13TabixIterator_6__iter__(((struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)__pyx_v_self));
79078
79079 /* function exit code */
79080 __Pyx_RefNannyFinishContext();
79081 return __pyx_r;
79082 }
79083
79084 static PyObject *__pyx_pf_5pysam_7libcbcf_13TabixIterator_6__iter__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self) {
79085 PyObject *__pyx_r = NULL;
79086 __Pyx_TraceDeclarations
79087 __Pyx_RefNannyDeclarations
79088 int __pyx_lineno = 0;
79089 const char *__pyx_filename = NULL;
79090 int __pyx_clineno = 0;
79091 __Pyx_RefNannySetupContext("__iter__", 1);
79092 __Pyx_TraceCall("__iter__", __pyx_f[0], 3984, 0, __PYX_ERR(0, 3984, __pyx_L1_error));
79093
79094 /* "pysam/libcbcf.pyx":3985
79095 *
79096 * def __iter__(self):
79097 * return self # <<<<<<<<<<<<<<
79098 *
79099 * def __next__(self):
79100 */
79101 __Pyx_XDECREF(__pyx_r);
79102 __Pyx_INCREF((PyObject *)__pyx_v_self);
79103 __pyx_r = ((PyObject *)__pyx_v_self);
79104 goto __pyx_L0;
79105
79106 /* "pysam/libcbcf.pyx":3984
79107 * self.line_buffer.s = NULL
79108 *
79109 * def __iter__(self): # <<<<<<<<<<<<<<
79110 * return self
79111 *
79112 */
79113
79114 /* function exit code */
79115 __pyx_L1_error:;
79116 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
79117 __pyx_r = NULL;
79118 __pyx_L0:;
79119 __Pyx_XGIVEREF(__pyx_r);
79120 __Pyx_TraceReturn(__pyx_r, 0);
79121 __Pyx_RefNannyFinishContext();
79122 return __pyx_r;
79123 }
79124
79125 /* "pysam/libcbcf.pyx":3987
79126 * return self
79127 *
79128 * def __next__(self): # <<<<<<<<<<<<<<
79129 * if not self.iter:
79130 * raise StopIteration
79131 */
79132
79133 /* Python wrapper */
79134 static PyObject *__pyx_pw_5pysam_7libcbcf_13TabixIterator_9__next__(PyObject *__pyx_v_self); /*proto*/
79135 static PyObject *__pyx_pw_5pysam_7libcbcf_13TabixIterator_9__next__(PyObject *__pyx_v_self) {
79136 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
79137 PyObject *__pyx_r = 0;
79138 __Pyx_RefNannyDeclarations
79139 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
79140 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
79141 __pyx_r = __pyx_pf_5pysam_7libcbcf_13TabixIterator_8__next__(((struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)__pyx_v_self));
79142
79143 /* function exit code */
79144 __Pyx_RefNannyFinishContext();
79145 return __pyx_r;
79146 }
79147
79148 static PyObject *__pyx_pf_5pysam_7libcbcf_13TabixIterator_8__next__(struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self) {
79149 int __pyx_v_ret;
79150 bcf1_t *__pyx_v_record;
79151 PyObject *__pyx_r = NULL;
79152 __Pyx_TraceDeclarations
79153 __Pyx_RefNannyDeclarations
79154 int __pyx_error_without_exception = 0; /* StopIteration */
79155 int __pyx_t_1;
79156 PyObject *__pyx_t_2 = NULL;
79157 PyObject *__pyx_t_3 = NULL;
79158 PyObject *__pyx_t_4 = NULL;
79159 int __pyx_lineno = 0;
79160 const char *__pyx_filename = NULL;
79161 int __pyx_clineno = 0;
79162 __Pyx_RefNannySetupContext("__next__", 1);
79163 __Pyx_TraceCall("__next__", __pyx_f[0], 3987, 0, __PYX_ERR(0, 3987, __pyx_L1_error));
79164
79165 /* "pysam/libcbcf.pyx":3988
79166 *
79167 * def __next__(self):
79168 * if not self.iter: # <<<<<<<<<<<<<<
79169 * raise StopIteration
79170 *
79171 */
79172 __pyx_t_1 = (!(__pyx_v_self->__pyx_base.iter != 0));
79173 if (unlikely(__pyx_t_1)) {
79174
79175 /* "pysam/libcbcf.pyx":3989
79176 * def __next__(self):
79177 * if not self.iter:
79178 * raise StopIteration # <<<<<<<<<<<<<<
79179 *
79180 * cdef int ret
79181 */
79182 __pyx_error_without_exception = 1;
79183 goto __pyx_L1_error;;
79184
79185 /* "pysam/libcbcf.pyx":3988
79186 *
79187 * def __next__(self):
79188 * if not self.iter: # <<<<<<<<<<<<<<
79189 * raise StopIteration
79190 *
79191 */
79192 }
79193
79194 /* "pysam/libcbcf.pyx":3993
79195 * cdef int ret
79196 *
79197 * with nogil: # <<<<<<<<<<<<<<
79198 * ret = tbx_itr_next(self.bcf.htsfile, self.index.ptr, self.iter, &self.line_buffer)
79199 *
79200 */
79201 {
79202 #ifdef WITH_THREAD
79203 PyThreadState *_save;
79204 _save = NULL;
79205 Py_UNBLOCK_THREADS
79206 __Pyx_FastGIL_Remember();
79207 #endif
79208 /*try:*/ {
79209
79210 /* "pysam/libcbcf.pyx":3994
79211 *
79212 * with nogil:
79213 * ret = tbx_itr_next(self.bcf.htsfile, self.index.ptr, self.iter, &self.line_buffer) # <<<<<<<<<<<<<<
79214 *
79215 * if ret < 0:
79216 */
79217 __pyx_v_ret = tbx_itr_next(__pyx_v_self->__pyx_base.bcf->__pyx_base.htsfile, __pyx_v_self->index->ptr, __pyx_v_self->__pyx_base.iter, (&__pyx_v_self->line_buffer));
79218 }
79219
79220 /* "pysam/libcbcf.pyx":3993
79221 * cdef int ret
79222 *
79223 * with nogil: # <<<<<<<<<<<<<<
79224 * ret = tbx_itr_next(self.bcf.htsfile, self.index.ptr, self.iter, &self.line_buffer)
79225 *
79226 */
79227 /*finally:*/ {
79228 /*normal exit:*/{
79229 #ifdef WITH_THREAD
79230 __Pyx_FastGIL_Forget();
79231 Py_BLOCK_THREADS
79232 #endif
79233 goto __pyx_L6;
79234 }
79235 __pyx_L6:;
79236 }
79237 }
79238
79239 /* "pysam/libcbcf.pyx":3996
79240 * ret = tbx_itr_next(self.bcf.htsfile, self.index.ptr, self.iter, &self.line_buffer)
79241 *
79242 * if ret < 0: # <<<<<<<<<<<<<<
79243 * tbx_itr_destroy(self.iter)
79244 * self.iter = NULL
79245 */
79246 __pyx_t_1 = (__pyx_v_ret < 0);
79247 if (__pyx_t_1) {
79248
79249 /* "pysam/libcbcf.pyx":3997
79250 *
79251 * if ret < 0:
79252 * tbx_itr_destroy(self.iter) # <<<<<<<<<<<<<<
79253 * self.iter = NULL
79254 * if ret == -1:
79255 */
79256 tbx_itr_destroy(__pyx_v_self->__pyx_base.iter);
79257
79258 /* "pysam/libcbcf.pyx":3998
79259 * if ret < 0:
79260 * tbx_itr_destroy(self.iter)
79261 * self.iter = NULL # <<<<<<<<<<<<<<
79262 * if ret == -1:
79263 * raise StopIteration
79264 */
79265 __pyx_v_self->__pyx_base.iter = NULL;
79266
79267 /* "pysam/libcbcf.pyx":3999
79268 * tbx_itr_destroy(self.iter)
79269 * self.iter = NULL
79270 * if ret == -1: # <<<<<<<<<<<<<<
79271 * raise StopIteration
79272 * elif ret == -2:
79273 */
79274 __pyx_t_1 = (__pyx_v_ret == -1L);
79275 if (unlikely(__pyx_t_1)) {
79276
79277 /* "pysam/libcbcf.pyx":4000
79278 * self.iter = NULL
79279 * if ret == -1:
79280 * raise StopIteration # <<<<<<<<<<<<<<
79281 * elif ret == -2:
79282 * raise IOError('truncated file')
79283 */
79284 __pyx_error_without_exception = 1;
79285 goto __pyx_L1_error;;
79286
79287 /* "pysam/libcbcf.pyx":3999
79288 * tbx_itr_destroy(self.iter)
79289 * self.iter = NULL
79290 * if ret == -1: # <<<<<<<<<<<<<<
79291 * raise StopIteration
79292 * elif ret == -2:
79293 */
79294 }
79295
79296 /* "pysam/libcbcf.pyx":4001
79297 * if ret == -1:
79298 * raise StopIteration
79299 * elif ret == -2: # <<<<<<<<<<<<<<
79300 * raise IOError('truncated file')
79301 * elif errno:
79302 */
79303 __pyx_t_1 = (__pyx_v_ret == -2L);
79304 if (unlikely(__pyx_t_1)) {
79305
79306 /* "pysam/libcbcf.pyx":4002
79307 * raise StopIteration
79308 * elif ret == -2:
79309 * raise IOError('truncated file') # <<<<<<<<<<<<<<
79310 * elif errno:
79311 * raise IOError(errno, strerror(errno))
79312 */
79313 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__222, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4002, __pyx_L1_error)
79314 __Pyx_GOTREF(__pyx_t_2);
79315 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
79316 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79317 __PYX_ERR(0, 4002, __pyx_L1_error)
79318
79319 /* "pysam/libcbcf.pyx":4001
79320 * if ret == -1:
79321 * raise StopIteration
79322 * elif ret == -2: # <<<<<<<<<<<<<<
79323 * raise IOError('truncated file')
79324 * elif errno:
79325 */
79326 }
79327
79328 /* "pysam/libcbcf.pyx":4003
79329 * elif ret == -2:
79330 * raise IOError('truncated file')
79331 * elif errno: # <<<<<<<<<<<<<<
79332 * raise IOError(errno, strerror(errno))
79333 * else:
79334 */
79335 __pyx_t_1 = (errno != 0);
79336 if (unlikely(__pyx_t_1)) {
79337
79338 /* "pysam/libcbcf.pyx":4004
79339 * raise IOError('truncated file')
79340 * elif errno:
79341 * raise IOError(errno, strerror(errno)) # <<<<<<<<<<<<<<
79342 * else:
79343 * raise IOError('unable to fetch next record')
79344 */
79345 __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4004, __pyx_L1_error)
79346 __Pyx_GOTREF(__pyx_t_2);
79347 __pyx_t_3 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4004, __pyx_L1_error)
79348 __Pyx_GOTREF(__pyx_t_3);
79349 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4004, __pyx_L1_error)
79350 __Pyx_GOTREF(__pyx_t_4);
79351 __Pyx_GIVEREF(__pyx_t_2);
79352 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 4004, __pyx_L1_error);
79353 __Pyx_GIVEREF(__pyx_t_3);
79354 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 4004, __pyx_L1_error);
79355 __pyx_t_2 = 0;
79356 __pyx_t_3 = 0;
79357 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4004, __pyx_L1_error)
79358 __Pyx_GOTREF(__pyx_t_3);
79359 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
79360 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
79361 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79362 __PYX_ERR(0, 4004, __pyx_L1_error)
79363
79364 /* "pysam/libcbcf.pyx":4003
79365 * elif ret == -2:
79366 * raise IOError('truncated file')
79367 * elif errno: # <<<<<<<<<<<<<<
79368 * raise IOError(errno, strerror(errno))
79369 * else:
79370 */
79371 }
79372
79373 /* "pysam/libcbcf.pyx":4006
79374 * raise IOError(errno, strerror(errno))
79375 * else:
79376 * raise IOError('unable to fetch next record') # <<<<<<<<<<<<<<
79377 *
79378 * cdef bcf1_t *record = bcf_init1()
79379 */
79380 /*else*/ {
79381 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__223, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4006, __pyx_L1_error)
79382 __Pyx_GOTREF(__pyx_t_3);
79383 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
79384 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79385 __PYX_ERR(0, 4006, __pyx_L1_error)
79386 }
79387
79388 /* "pysam/libcbcf.pyx":3996
79389 * ret = tbx_itr_next(self.bcf.htsfile, self.index.ptr, self.iter, &self.line_buffer)
79390 *
79391 * if ret < 0: # <<<<<<<<<<<<<<
79392 * tbx_itr_destroy(self.iter)
79393 * self.iter = NULL
79394 */
79395 }
79396
79397 /* "pysam/libcbcf.pyx":4008
79398 * raise IOError('unable to fetch next record')
79399 *
79400 * cdef bcf1_t *record = bcf_init1() # <<<<<<<<<<<<<<
79401 *
79402 * if not record:
79403 */
79404 __pyx_v_record = bcf_init1();
79405
79406 /* "pysam/libcbcf.pyx":4010
79407 * cdef bcf1_t *record = bcf_init1()
79408 *
79409 * if not record: # <<<<<<<<<<<<<<
79410 * raise MemoryError('unable to allocate BCF record')
79411 *
79412 */
79413 __pyx_t_1 = (!(__pyx_v_record != 0));
79414 if (unlikely(__pyx_t_1)) {
79415
79416 /* "pysam/libcbcf.pyx":4011
79417 *
79418 * if not record:
79419 * raise MemoryError('unable to allocate BCF record') # <<<<<<<<<<<<<<
79420 *
79421 * record.pos = -1
79422 */
79423 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4011, __pyx_L1_error)
79424 __Pyx_GOTREF(__pyx_t_3);
79425 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
79426 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79427 __PYX_ERR(0, 4011, __pyx_L1_error)
79428
79429 /* "pysam/libcbcf.pyx":4010
79430 * cdef bcf1_t *record = bcf_init1()
79431 *
79432 * if not record: # <<<<<<<<<<<<<<
79433 * raise MemoryError('unable to allocate BCF record')
79434 *
79435 */
79436 }
79437
79438 /* "pysam/libcbcf.pyx":4013
79439 * raise MemoryError('unable to allocate BCF record')
79440 *
79441 * record.pos = -1 # <<<<<<<<<<<<<<
79442 * if self.bcf.drop_samples:
79443 * record.max_unpack = BCF_UN_SHR
79444 */
79445 __pyx_v_record->pos = -1;
79446
79447 /* "pysam/libcbcf.pyx":4014
79448 *
79449 * record.pos = -1
79450 * if self.bcf.drop_samples: # <<<<<<<<<<<<<<
79451 * record.max_unpack = BCF_UN_SHR
79452 *
79453 */
79454 if (__pyx_v_self->__pyx_base.bcf->drop_samples) {
79455
79456 /* "pysam/libcbcf.pyx":4015
79457 * record.pos = -1
79458 * if self.bcf.drop_samples:
79459 * record.max_unpack = BCF_UN_SHR # <<<<<<<<<<<<<<
79460 *
79461 * ret = vcf_parse1(&self.line_buffer, self.bcf.header.ptr, record)
79462 */
79463 __pyx_v_record->max_unpack = BCF_UN_SHR;
79464
79465 /* "pysam/libcbcf.pyx":4014
79466 *
79467 * record.pos = -1
79468 * if self.bcf.drop_samples: # <<<<<<<<<<<<<<
79469 * record.max_unpack = BCF_UN_SHR
79470 *
79471 */
79472 }
79473
79474 /* "pysam/libcbcf.pyx":4017
79475 * record.max_unpack = BCF_UN_SHR
79476 *
79477 * ret = vcf_parse1(&self.line_buffer, self.bcf.header.ptr, record) # <<<<<<<<<<<<<<
79478 *
79479 * # FIXME: stop iteration on parse failure?
79480 */
79481 __pyx_v_ret = vcf_parse1((&__pyx_v_self->line_buffer), __pyx_v_self->__pyx_base.bcf->header->ptr, __pyx_v_record);
79482
79483 /* "pysam/libcbcf.pyx":4020
79484 *
79485 * # FIXME: stop iteration on parse failure?
79486 * if ret < 0: # <<<<<<<<<<<<<<
79487 * bcf_destroy1(record)
79488 * raise ValueError('error in vcf_parse')
79489 */
79490 __pyx_t_1 = (__pyx_v_ret < 0);
79491 if (unlikely(__pyx_t_1)) {
79492
79493 /* "pysam/libcbcf.pyx":4021
79494 * # FIXME: stop iteration on parse failure?
79495 * if ret < 0:
79496 * bcf_destroy1(record) # <<<<<<<<<<<<<<
79497 * raise ValueError('error in vcf_parse')
79498 *
79499 */
79500 bcf_destroy1(__pyx_v_record);
79501
79502 /* "pysam/libcbcf.pyx":4022
79503 * if ret < 0:
79504 * bcf_destroy1(record)
79505 * raise ValueError('error in vcf_parse') # <<<<<<<<<<<<<<
79506 *
79507 * return makeVariantRecord(self.bcf.header, record)
79508 */
79509 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__228, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4022, __pyx_L1_error)
79510 __Pyx_GOTREF(__pyx_t_3);
79511 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
79512 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79513 __PYX_ERR(0, 4022, __pyx_L1_error)
79514
79515 /* "pysam/libcbcf.pyx":4020
79516 *
79517 * # FIXME: stop iteration on parse failure?
79518 * if ret < 0: # <<<<<<<<<<<<<<
79519 * bcf_destroy1(record)
79520 * raise ValueError('error in vcf_parse')
79521 */
79522 }
79523
79524 /* "pysam/libcbcf.pyx":4024
79525 * raise ValueError('error in vcf_parse')
79526 *
79527 * return makeVariantRecord(self.bcf.header, record) # <<<<<<<<<<<<<<
79528 *
79529 *
79530 */
79531 __Pyx_XDECREF(__pyx_r);
79532 __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base.bcf->header);
79533 __Pyx_INCREF(__pyx_t_3);
79534 __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecord(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_3), __pyx_v_record)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4024, __pyx_L1_error)
79535 __Pyx_GOTREF(__pyx_t_4);
79536 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79537 __pyx_r = __pyx_t_4;
79538 __pyx_t_4 = 0;
79539 goto __pyx_L0;
79540
79541 /* "pysam/libcbcf.pyx":3987
79542 * return self
79543 *
79544 * def __next__(self): # <<<<<<<<<<<<<<
79545 * if not self.iter:
79546 * raise StopIteration
79547 */
79548
79549 /* function exit code */
79550 __pyx_L1_error:;
79551 __Pyx_XDECREF(__pyx_t_2);
79552 __Pyx_XDECREF(__pyx_t_3);
79553 __Pyx_XDECREF(__pyx_t_4);
79554 if (!__pyx_error_without_exception) {
79555 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
79556 }
79557 __pyx_r = NULL;
79558 __pyx_L0:;
79559 __Pyx_XGIVEREF(__pyx_r);
79560 __Pyx_TraceReturn(__pyx_r, 0);
79561 __Pyx_RefNannyFinishContext();
79562 return __pyx_r;
79563 }
79564
79565 /* "(tree fragment)":1
79566 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
79567 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
79568 * def __setstate_cython__(self, __pyx_state):
79569 */
79570
79571 /* Python wrapper */
79572 static PyObject *__pyx_pw_5pysam_7libcbcf_13TabixIterator_11__reduce_cython__(PyObject *__pyx_v_self,
79573 #if CYTHON_METH_FASTCALL
79574 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
79575 #else
79576 PyObject *__pyx_args, PyObject *__pyx_kwds
79577 #endif
79578 ); /*proto*/
79579 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13TabixIterator_10__reduce_cython__, "TabixIterator.__reduce_cython__(self)");
79580 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13TabixIterator_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13TabixIterator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13TabixIterator_10__reduce_cython__};
79581 static PyObject *__pyx_pw_5pysam_7libcbcf_13TabixIterator_11__reduce_cython__(PyObject *__pyx_v_self,
79582 #if CYTHON_METH_FASTCALL
79583 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
79584 #else
79585 PyObject *__pyx_args, PyObject *__pyx_kwds
79586 #endif
79587 ) {
79588 #if !CYTHON_METH_FASTCALL
79589 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
79590 #endif
79591 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
79592 PyObject *__pyx_r = 0;
79593 __Pyx_RefNannyDeclarations
79594 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
79595 #if !CYTHON_METH_FASTCALL
79596 #if CYTHON_ASSUME_SAFE_MACROS
79597 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
79598 #else
79599 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
79600 #endif
79601 #endif
79602 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
79603 if (unlikely(__pyx_nargs > 0)) {
79604 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
79605 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
79606 __pyx_r = __pyx_pf_5pysam_7libcbcf_13TabixIterator_10__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)__pyx_v_self));
79607
79608 /* function exit code */
79609 __Pyx_RefNannyFinishContext();
79610 return __pyx_r;
79611 }
79612
79613 static PyObject *__pyx_pf_5pysam_7libcbcf_13TabixIterator_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self) {
79614 PyObject *__pyx_r = NULL;
79615 __Pyx_TraceDeclarations
79616 __Pyx_RefNannyDeclarations
79617 int __pyx_lineno = 0;
79618 const char *__pyx_filename = NULL;
79619 int __pyx_clineno = 0;
79620 __Pyx_TraceFrameInit(__pyx_codeobj__229)
79621 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
79622 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
79623
79624 /* "(tree fragment)":2
79625 * def __reduce_cython__(self):
79626 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
79627 * def __setstate_cython__(self, __pyx_state):
79628 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
79629 */
79630 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
79631 __PYX_ERR(4, 2, __pyx_L1_error)
79632
79633 /* "(tree fragment)":1
79634 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
79635 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
79636 * def __setstate_cython__(self, __pyx_state):
79637 */
79638
79639 /* function exit code */
79640 __pyx_L1_error:;
79641 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
79642 __pyx_r = NULL;
79643 __Pyx_XGIVEREF(__pyx_r);
79644 __Pyx_TraceReturn(__pyx_r, 0);
79645 __Pyx_RefNannyFinishContext();
79646 return __pyx_r;
79647 }
79648
79649 /* "(tree fragment)":3
79650 * def __reduce_cython__(self):
79651 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
79652 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
79653 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
79654 */
79655
79656 /* Python wrapper */
79657 static PyObject *__pyx_pw_5pysam_7libcbcf_13TabixIterator_13__setstate_cython__(PyObject *__pyx_v_self,
79658 #if CYTHON_METH_FASTCALL
79659 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
79660 #else
79661 PyObject *__pyx_args, PyObject *__pyx_kwds
79662 #endif
79663 ); /*proto*/
79664 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_13TabixIterator_12__setstate_cython__, "TabixIterator.__setstate_cython__(self, __pyx_state)");
79665 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13TabixIterator_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13TabixIterator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13TabixIterator_12__setstate_cython__};
79666 static PyObject *__pyx_pw_5pysam_7libcbcf_13TabixIterator_13__setstate_cython__(PyObject *__pyx_v_self,
79667 #if CYTHON_METH_FASTCALL
79668 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
79669 #else
79670 PyObject *__pyx_args, PyObject *__pyx_kwds
79671 #endif
79672 ) {
79673 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
79674 #if !CYTHON_METH_FASTCALL
79675 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
79676 #endif
79677 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
79678 PyObject* values[1] = {0};
79679 int __pyx_lineno = 0;
79680 const char *__pyx_filename = NULL;
79681 int __pyx_clineno = 0;
79682 PyObject *__pyx_r = 0;
79683 __Pyx_RefNannyDeclarations
79684 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
79685 #if !CYTHON_METH_FASTCALL
79686 #if CYTHON_ASSUME_SAFE_MACROS
79687 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
79688 #else
79689 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
79690 #endif
79691 #endif
79692 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
79693 {
79694 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
79695 if (__pyx_kwds) {
79696 Py_ssize_t kw_args;
79697 switch (__pyx_nargs) {
79698 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
79699 CYTHON_FALLTHROUGH;
79700 case 0: break;
79701 default: goto __pyx_L5_argtuple_error;
79702 }
79703 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
79704 switch (__pyx_nargs) {
79705 case 0:
79706 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
79707 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
79708 kw_args--;
79709 }
79710 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
79711 else goto __pyx_L5_argtuple_error;
79712 }
79713 if (unlikely(kw_args > 0)) {
79714 const Py_ssize_t kwd_pos_args = __pyx_nargs;
79715 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
79716 }
79717 } else if (unlikely(__pyx_nargs != 1)) {
79718 goto __pyx_L5_argtuple_error;
79719 } else {
79720 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
79721 }
79722 __pyx_v___pyx_state = values[0];
79723 }
79724 goto __pyx_L6_skip;
79725 __pyx_L5_argtuple_error:;
79726 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
79727 __pyx_L6_skip:;
79728 goto __pyx_L4_argument_unpacking_done;
79729 __pyx_L3_error:;
79730 {
79731 Py_ssize_t __pyx_temp;
79732 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
79733 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
79734 }
79735 }
79736 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
79737 __Pyx_RefNannyFinishContext();
79738 return NULL;
79739 __pyx_L4_argument_unpacking_done:;
79740 __pyx_r = __pyx_pf_5pysam_7libcbcf_13TabixIterator_12__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)__pyx_v_self), __pyx_v___pyx_state);
79741
79742 /* function exit code */
79743 {
79744 Py_ssize_t __pyx_temp;
79745 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
79746 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
79747 }
79748 }
79749 __Pyx_RefNannyFinishContext();
79750 return __pyx_r;
79751 }
79752
79753 static PyObject *__pyx_pf_5pysam_7libcbcf_13TabixIterator_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_TabixIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
79754 PyObject *__pyx_r = NULL;
79755 __Pyx_TraceDeclarations
79756 __Pyx_RefNannyDeclarations
79757 int __pyx_lineno = 0;
79758 const char *__pyx_filename = NULL;
79759 int __pyx_clineno = 0;
79760 __Pyx_TraceFrameInit(__pyx_codeobj__230)
79761 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
79762 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
79763
79764 /* "(tree fragment)":4
79765 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
79766 * def __setstate_cython__(self, __pyx_state):
79767 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
79768 */
79769 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
79770 __PYX_ERR(4, 4, __pyx_L1_error)
79771
79772 /* "(tree fragment)":3
79773 * def __reduce_cython__(self):
79774 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
79775 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
79776 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
79777 */
79778
79779 /* function exit code */
79780 __pyx_L1_error:;
79781 __Pyx_AddTraceback("pysam.libcbcf.TabixIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
79782 __pyx_r = NULL;
79783 __Pyx_XGIVEREF(__pyx_r);
79784 __Pyx_TraceReturn(__pyx_r, 0);
79785 __Pyx_RefNannyFinishContext();
79786 return __pyx_r;
79787 }
79788
79789 /* "pysam/libcbcf.pyx":4096
79790 *
79791 * """
79792 * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
79793 * self.htsfile = NULL
79794 *
79795 */
79796
79797 /* Python wrapper */
79798 static int __pyx_pw_5pysam_7libcbcf_11VariantFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
79799 static int __pyx_pw_5pysam_7libcbcf_11VariantFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
79800 CYTHON_UNUSED PyObject *__pyx_v_args = 0;
79801 CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
79802 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
79803 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
79804 int __pyx_r;
79805 __Pyx_RefNannyDeclarations
79806 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
79807 #if CYTHON_ASSUME_SAFE_MACROS
79808 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
79809 #else
79810 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
79811 #endif
79812 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
79813 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
79814 __Pyx_INCREF(__pyx_args);
79815 __pyx_v_args = __pyx_args;
79816 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile___cinit__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
79817
79818 /* function exit code */
79819 __Pyx_DECREF(__pyx_v_args);
79820 __Pyx_XDECREF(__pyx_v_kwargs);
79821 __Pyx_RefNannyFinishContext();
79822 return __pyx_r;
79823 }
79824
79825 static int __pyx_pf_5pysam_7libcbcf_11VariantFile___cinit__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
79826 int __pyx_r;
79827 __Pyx_TraceDeclarations
79828 int __pyx_lineno = 0;
79829 const char *__pyx_filename = NULL;
79830 int __pyx_clineno = 0;
79831 __Pyx_TraceCall("__cinit__", __pyx_f[0], 4096, 0, __PYX_ERR(0, 4096, __pyx_L1_error));
79832
79833 /* "pysam/libcbcf.pyx":4097
79834 * """
79835 * def __cinit__(self, *args, **kwargs):
79836 * self.htsfile = NULL # <<<<<<<<<<<<<<
79837 *
79838 * def __init__(self, *args, **kwargs):
79839 */
79840 __pyx_v_self->__pyx_base.htsfile = NULL;
79841
79842 /* "pysam/libcbcf.pyx":4096
79843 *
79844 * """
79845 * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
79846 * self.htsfile = NULL
79847 *
79848 */
79849
79850 /* function exit code */
79851 __pyx_r = 0;
79852 goto __pyx_L0;
79853 __pyx_L1_error:;
79854 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
79855 __pyx_r = -1;
79856 __pyx_L0:;
79857 __Pyx_TraceReturn(Py_None, 0);
79858 return __pyx_r;
79859 }
79860
79861 /* "pysam/libcbcf.pyx":4099
79862 * self.htsfile = NULL
79863 *
79864 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
79865 * self.header = None
79866 * self.index = None
79867 */
79868
79869 /* Python wrapper */
79870 static int __pyx_pw_5pysam_7libcbcf_11VariantFile_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
79871 static int __pyx_pw_5pysam_7libcbcf_11VariantFile_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
79872 PyObject *__pyx_v_args = 0;
79873 PyObject *__pyx_v_kwargs = 0;
79874 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
79875 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
79876 int __pyx_r;
79877 __Pyx_RefNannyDeclarations
79878 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
79879 #if CYTHON_ASSUME_SAFE_MACROS
79880 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
79881 #else
79882 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
79883 #endif
79884 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
79885 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
79886 if (unlikely(__pyx_kwds)) {
79887 __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
79888 if (unlikely(!__pyx_v_kwargs)) return -1;
79889 __Pyx_GOTREF(__pyx_v_kwargs);
79890 } else {
79891 __pyx_v_kwargs = PyDict_New();
79892 if (unlikely(!__pyx_v_kwargs)) return -1;
79893 __Pyx_GOTREF(__pyx_v_kwargs);
79894 }
79895 __Pyx_INCREF(__pyx_args);
79896 __pyx_v_args = __pyx_args;
79897 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_2__init__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
79898
79899 /* function exit code */
79900 __Pyx_DECREF(__pyx_v_args);
79901 __Pyx_DECREF(__pyx_v_kwargs);
79902 __Pyx_RefNannyFinishContext();
79903 return __pyx_r;
79904 }
79905
79906 static int __pyx_pf_5pysam_7libcbcf_11VariantFile_2__init__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
79907 int __pyx_r;
79908 __Pyx_TraceDeclarations
79909 __Pyx_RefNannyDeclarations
79910 PyObject *__pyx_t_1 = NULL;
79911 PyObject *__pyx_t_2 = NULL;
79912 PyObject *__pyx_t_3 = NULL;
79913 int __pyx_lineno = 0;
79914 const char *__pyx_filename = NULL;
79915 int __pyx_clineno = 0;
79916 __Pyx_RefNannySetupContext("__init__", 1);
79917 __Pyx_TraceCall("__init__", __pyx_f[0], 4099, 0, __PYX_ERR(0, 4099, __pyx_L1_error));
79918
79919 /* "pysam/libcbcf.pyx":4100
79920 *
79921 * def __init__(self, *args, **kwargs):
79922 * self.header = None # <<<<<<<<<<<<<<
79923 * self.index = None
79924 * self.filename = None
79925 */
79926 __Pyx_INCREF(Py_None);
79927 __Pyx_GIVEREF(Py_None);
79928 __Pyx_GOTREF((PyObject *)__pyx_v_self->header);
79929 __Pyx_DECREF((PyObject *)__pyx_v_self->header);
79930 __pyx_v_self->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None);
79931
79932 /* "pysam/libcbcf.pyx":4101
79933 * def __init__(self, *args, **kwargs):
79934 * self.header = None
79935 * self.index = None # <<<<<<<<<<<<<<
79936 * self.filename = None
79937 * self.mode = None
79938 */
79939 __Pyx_INCREF(Py_None);
79940 __Pyx_GIVEREF(Py_None);
79941 __Pyx_GOTREF((PyObject *)__pyx_v_self->index);
79942 __Pyx_DECREF((PyObject *)__pyx_v_self->index);
79943 __pyx_v_self->index = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)Py_None);
79944
79945 /* "pysam/libcbcf.pyx":4102
79946 * self.header = None
79947 * self.index = None
79948 * self.filename = None # <<<<<<<<<<<<<<
79949 * self.mode = None
79950 * self.threads = 1
79951 */
79952 __Pyx_INCREF(Py_None);
79953 __Pyx_GIVEREF(Py_None);
79954 __Pyx_GOTREF(__pyx_v_self->__pyx_base.filename);
79955 __Pyx_DECREF(__pyx_v_self->__pyx_base.filename);
79956 __pyx_v_self->__pyx_base.filename = Py_None;
79957
79958 /* "pysam/libcbcf.pyx":4103
79959 * self.index = None
79960 * self.filename = None
79961 * self.mode = None # <<<<<<<<<<<<<<
79962 * self.threads = 1
79963 * self.index_filename = None
79964 */
79965 __Pyx_INCREF(Py_None);
79966 __Pyx_GIVEREF(Py_None);
79967 __Pyx_GOTREF(__pyx_v_self->__pyx_base.mode);
79968 __Pyx_DECREF(__pyx_v_self->__pyx_base.mode);
79969 __pyx_v_self->__pyx_base.mode = Py_None;
79970
79971 /* "pysam/libcbcf.pyx":4104
79972 * self.filename = None
79973 * self.mode = None
79974 * self.threads = 1 # <<<<<<<<<<<<<<
79975 * self.index_filename = None
79976 * self.is_stream = False
79977 */
79978 __Pyx_INCREF(__pyx_int_1);
79979 __Pyx_GIVEREF(__pyx_int_1);
79980 __Pyx_GOTREF(__pyx_v_self->__pyx_base.threads);
79981 __Pyx_DECREF(__pyx_v_self->__pyx_base.threads);
79982 __pyx_v_self->__pyx_base.threads = __pyx_int_1;
79983
79984 /* "pysam/libcbcf.pyx":4105
79985 * self.mode = None
79986 * self.threads = 1
79987 * self.index_filename = None # <<<<<<<<<<<<<<
79988 * self.is_stream = False
79989 * self.is_remote = False
79990 */
79991 __Pyx_INCREF(Py_None);
79992 __Pyx_GIVEREF(Py_None);
79993 __Pyx_GOTREF(__pyx_v_self->__pyx_base.index_filename);
79994 __Pyx_DECREF(__pyx_v_self->__pyx_base.index_filename);
79995 __pyx_v_self->__pyx_base.index_filename = Py_None;
79996
79997 /* "pysam/libcbcf.pyx":4106
79998 * self.threads = 1
79999 * self.index_filename = None
80000 * self.is_stream = False # <<<<<<<<<<<<<<
80001 * self.is_remote = False
80002 * self.is_reading = False
80003 */
80004 __pyx_v_self->__pyx_base.is_stream = 0;
80005
80006 /* "pysam/libcbcf.pyx":4107
80007 * self.index_filename = None
80008 * self.is_stream = False
80009 * self.is_remote = False # <<<<<<<<<<<<<<
80010 * self.is_reading = False
80011 * self.drop_samples = False
80012 */
80013 __pyx_v_self->__pyx_base.is_remote = 0;
80014
80015 /* "pysam/libcbcf.pyx":4108
80016 * self.is_stream = False
80017 * self.is_remote = False
80018 * self.is_reading = False # <<<<<<<<<<<<<<
80019 * self.drop_samples = False
80020 * self.header_written = False
80021 */
80022 __pyx_v_self->is_reading = 0;
80023
80024 /* "pysam/libcbcf.pyx":4109
80025 * self.is_remote = False
80026 * self.is_reading = False
80027 * self.drop_samples = False # <<<<<<<<<<<<<<
80028 * self.header_written = False
80029 * self.start_offset = -1
80030 */
80031 __pyx_v_self->drop_samples = 0;
80032
80033 /* "pysam/libcbcf.pyx":4110
80034 * self.is_reading = False
80035 * self.drop_samples = False
80036 * self.header_written = False # <<<<<<<<<<<<<<
80037 * self.start_offset = -1
80038 *
80039 */
80040 __pyx_v_self->header_written = 0;
80041
80042 /* "pysam/libcbcf.pyx":4111
80043 * self.drop_samples = False
80044 * self.header_written = False
80045 * self.start_offset = -1 # <<<<<<<<<<<<<<
80046 *
80047 * self.open(*args, **kwargs)
80048 */
80049 __pyx_v_self->__pyx_base.start_offset = -1L;
80050
80051 /* "pysam/libcbcf.pyx":4113
80052 * self.start_offset = -1
80053 *
80054 * self.open(*args, **kwargs) # <<<<<<<<<<<<<<
80055 *
80056 * def __dealloc__(self):
80057 */
80058 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4113, __pyx_L1_error)
80059 __Pyx_GOTREF(__pyx_t_1);
80060 __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4113, __pyx_L1_error)
80061 __Pyx_GOTREF(__pyx_t_2);
80062 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4113, __pyx_L1_error)
80063 __Pyx_GOTREF(__pyx_t_3);
80064 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
80065 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
80066 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
80067
80068 /* "pysam/libcbcf.pyx":4099
80069 * self.htsfile = NULL
80070 *
80071 * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
80072 * self.header = None
80073 * self.index = None
80074 */
80075
80076 /* function exit code */
80077 __pyx_r = 0;
80078 goto __pyx_L0;
80079 __pyx_L1_error:;
80080 __Pyx_XDECREF(__pyx_t_1);
80081 __Pyx_XDECREF(__pyx_t_2);
80082 __Pyx_XDECREF(__pyx_t_3);
80083 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80084 __pyx_r = -1;
80085 __pyx_L0:;
80086 __Pyx_TraceReturn(Py_None, 0);
80087 __Pyx_RefNannyFinishContext();
80088 return __pyx_r;
80089 }
80090
80091 /* "pysam/libcbcf.pyx":4115
80092 * self.open(*args, **kwargs)
80093 *
80094 * def __dealloc__(self): # <<<<<<<<<<<<<<
80095 * if not self.htsfile or not self.header:
80096 * return
80097 */
80098
80099 /* Python wrapper */
80100 static void __pyx_pw_5pysam_7libcbcf_11VariantFile_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
80101 static void __pyx_pw_5pysam_7libcbcf_11VariantFile_5__dealloc__(PyObject *__pyx_v_self) {
80102 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
80103 __Pyx_RefNannyDeclarations
80104 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
80105 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
80106 __pyx_pf_5pysam_7libcbcf_11VariantFile_4__dealloc__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
80107
80108 /* function exit code */
80109 __Pyx_RefNannyFinishContext();
80110 }
80111
80112 static void __pyx_pf_5pysam_7libcbcf_11VariantFile_4__dealloc__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
80113 int __pyx_v_ret;
80114 __Pyx_TraceDeclarations
80115 __Pyx_RefNannyDeclarations
80116 int __pyx_t_1;
80117 int __pyx_t_2;
80118 int __pyx_t_3;
80119 PyObject *__pyx_t_4 = NULL;
80120 PyObject *__pyx_t_5 = NULL;
80121 PyObject *__pyx_t_6 = NULL;
80122 int __pyx_lineno = 0;
80123 const char *__pyx_filename = NULL;
80124 int __pyx_clineno = 0;
80125 __Pyx_RefNannySetupContext("__dealloc__", 1);
80126 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 4115, 0, __PYX_ERR(0, 4115, __pyx_L1_error));
80127
80128 /* "pysam/libcbcf.pyx":4116
80129 *
80130 * def __dealloc__(self):
80131 * if not self.htsfile or not self.header: # <<<<<<<<<<<<<<
80132 * return
80133 *
80134 */
80135 __pyx_t_2 = (!(__pyx_v_self->__pyx_base.htsfile != 0));
80136 if (!__pyx_t_2) {
80137 } else {
80138 __pyx_t_1 = __pyx_t_2;
80139 goto __pyx_L4_bool_binop_done;
80140 }
80141 __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->header)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4116, __pyx_L1_error)
80142 __pyx_t_3 = (!__pyx_t_2);
80143 __pyx_t_1 = __pyx_t_3;
80144 __pyx_L4_bool_binop_done:;
80145 if (__pyx_t_1) {
80146
80147 /* "pysam/libcbcf.pyx":4117
80148 * def __dealloc__(self):
80149 * if not self.htsfile or not self.header:
80150 * return # <<<<<<<<<<<<<<
80151 *
80152 * # Write header if no records were written
80153 */
80154 goto __pyx_L0;
80155
80156 /* "pysam/libcbcf.pyx":4116
80157 *
80158 * def __dealloc__(self):
80159 * if not self.htsfile or not self.header: # <<<<<<<<<<<<<<
80160 * return
80161 *
80162 */
80163 }
80164
80165 /* "pysam/libcbcf.pyx":4120
80166 *
80167 * # Write header if no records were written
80168 * if self.htsfile.is_write and not self.header_written: # <<<<<<<<<<<<<<
80169 * with nogil:
80170 * bcf_hdr_write(self.htsfile, self.header.ptr)
80171 */
80172 __pyx_t_3 = (__pyx_v_self->__pyx_base.htsfile->is_write != 0);
80173 if (__pyx_t_3) {
80174 } else {
80175 __pyx_t_1 = __pyx_t_3;
80176 goto __pyx_L7_bool_binop_done;
80177 }
80178 __pyx_t_3 = (!__pyx_v_self->header_written);
80179 __pyx_t_1 = __pyx_t_3;
80180 __pyx_L7_bool_binop_done:;
80181 if (__pyx_t_1) {
80182
80183 /* "pysam/libcbcf.pyx":4121
80184 * # Write header if no records were written
80185 * if self.htsfile.is_write and not self.header_written:
80186 * with nogil: # <<<<<<<<<<<<<<
80187 * bcf_hdr_write(self.htsfile, self.header.ptr)
80188 *
80189 */
80190 {
80191 #ifdef WITH_THREAD
80192 PyThreadState *_save;
80193 _save = NULL;
80194 Py_UNBLOCK_THREADS
80195 __Pyx_FastGIL_Remember();
80196 #endif
80197 /*try:*/ {
80198
80199 /* "pysam/libcbcf.pyx":4122
80200 * if self.htsfile.is_write and not self.header_written:
80201 * with nogil:
80202 * bcf_hdr_write(self.htsfile, self.header.ptr) # <<<<<<<<<<<<<<
80203 *
80204 * cdef int ret = hts_close(self.htsfile)
80205 */
80206 (void)(bcf_hdr_write(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->header->ptr));
80207 }
80208
80209 /* "pysam/libcbcf.pyx":4121
80210 * # Write header if no records were written
80211 * if self.htsfile.is_write and not self.header_written:
80212 * with nogil: # <<<<<<<<<<<<<<
80213 * bcf_hdr_write(self.htsfile, self.header.ptr)
80214 *
80215 */
80216 /*finally:*/ {
80217 /*normal exit:*/{
80218 #ifdef WITH_THREAD
80219 __Pyx_FastGIL_Forget();
80220 Py_BLOCK_THREADS
80221 #endif
80222 goto __pyx_L11;
80223 }
80224 __pyx_L11:;
80225 }
80226 }
80227
80228 /* "pysam/libcbcf.pyx":4120
80229 *
80230 * # Write header if no records were written
80231 * if self.htsfile.is_write and not self.header_written: # <<<<<<<<<<<<<<
80232 * with nogil:
80233 * bcf_hdr_write(self.htsfile, self.header.ptr)
80234 */
80235 }
80236
80237 /* "pysam/libcbcf.pyx":4124
80238 * bcf_hdr_write(self.htsfile, self.header.ptr)
80239 *
80240 * cdef int ret = hts_close(self.htsfile) # <<<<<<<<<<<<<<
80241 * self.htsfile = NULL
80242 * self.header = self.index = None
80243 */
80244 __pyx_v_ret = hts_close(__pyx_v_self->__pyx_base.htsfile);
80245
80246 /* "pysam/libcbcf.pyx":4125
80247 *
80248 * cdef int ret = hts_close(self.htsfile)
80249 * self.htsfile = NULL # <<<<<<<<<<<<<<
80250 * self.header = self.index = None
80251 *
80252 */
80253 __pyx_v_self->__pyx_base.htsfile = NULL;
80254
80255 /* "pysam/libcbcf.pyx":4126
80256 * cdef int ret = hts_close(self.htsfile)
80257 * self.htsfile = NULL
80258 * self.header = self.index = None # <<<<<<<<<<<<<<
80259 *
80260 * if ret < 0:
80261 */
80262 __Pyx_INCREF(Py_None);
80263 __Pyx_GIVEREF(Py_None);
80264 __Pyx_GOTREF((PyObject *)__pyx_v_self->header);
80265 __Pyx_DECREF((PyObject *)__pyx_v_self->header);
80266 __pyx_v_self->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None);
80267 __Pyx_INCREF(Py_None);
80268 __Pyx_GIVEREF(Py_None);
80269 __Pyx_GOTREF((PyObject *)__pyx_v_self->index);
80270 __Pyx_DECREF((PyObject *)__pyx_v_self->index);
80271 __pyx_v_self->index = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)Py_None);
80272
80273 /* "pysam/libcbcf.pyx":4128
80274 * self.header = self.index = None
80275 *
80276 * if ret < 0: # <<<<<<<<<<<<<<
80277 * global errno
80278 * if errno == EPIPE:
80279 */
80280 __pyx_t_1 = (__pyx_v_ret < 0);
80281 if (__pyx_t_1) {
80282
80283 /* "pysam/libcbcf.pyx":4130
80284 * if ret < 0:
80285 * global errno
80286 * if errno == EPIPE: # <<<<<<<<<<<<<<
80287 * errno = 0
80288 * else:
80289 */
80290 __pyx_t_1 = (errno == EPIPE);
80291 if (likely(__pyx_t_1)) {
80292
80293 /* "pysam/libcbcf.pyx":4131
80294 * global errno
80295 * if errno == EPIPE:
80296 * errno = 0 # <<<<<<<<<<<<<<
80297 * else:
80298 * raise IOError(errno, force_str(strerror(errno)))
80299 */
80300 errno = 0;
80301
80302 /* "pysam/libcbcf.pyx":4130
80303 * if ret < 0:
80304 * global errno
80305 * if errno == EPIPE: # <<<<<<<<<<<<<<
80306 * errno = 0
80307 * else:
80308 */
80309 goto __pyx_L13;
80310 }
80311
80312 /* "pysam/libcbcf.pyx":4133
80313 * errno = 0
80314 * else:
80315 * raise IOError(errno, force_str(strerror(errno))) # <<<<<<<<<<<<<<
80316 *
80317 * def close(self):
80318 */
80319 /*else*/ {
80320 __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4133, __pyx_L1_error)
80321 __Pyx_GOTREF(__pyx_t_4);
80322 __pyx_t_5 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4133, __pyx_L1_error)
80323 __Pyx_GOTREF(__pyx_t_5);
80324 __pyx_t_6 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4133, __pyx_L1_error)
80325 __Pyx_GOTREF(__pyx_t_6);
80326 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
80327 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4133, __pyx_L1_error)
80328 __Pyx_GOTREF(__pyx_t_5);
80329 __Pyx_GIVEREF(__pyx_t_4);
80330 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 4133, __pyx_L1_error);
80331 __Pyx_GIVEREF(__pyx_t_6);
80332 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6)) __PYX_ERR(0, 4133, __pyx_L1_error);
80333 __pyx_t_4 = 0;
80334 __pyx_t_6 = 0;
80335 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4133, __pyx_L1_error)
80336 __Pyx_GOTREF(__pyx_t_6);
80337 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
80338 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
80339 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
80340 __PYX_ERR(0, 4133, __pyx_L1_error)
80341 }
80342 __pyx_L13:;
80343
80344 /* "pysam/libcbcf.pyx":4128
80345 * self.header = self.index = None
80346 *
80347 * if ret < 0: # <<<<<<<<<<<<<<
80348 * global errno
80349 * if errno == EPIPE:
80350 */
80351 }
80352
80353 /* "pysam/libcbcf.pyx":4115
80354 * self.open(*args, **kwargs)
80355 *
80356 * def __dealloc__(self): # <<<<<<<<<<<<<<
80357 * if not self.htsfile or not self.header:
80358 * return
80359 */
80360
80361 /* function exit code */
80362 goto __pyx_L0;
80363 __pyx_L1_error:;
80364 __Pyx_XDECREF(__pyx_t_4);
80365 __Pyx_XDECREF(__pyx_t_5);
80366 __Pyx_XDECREF(__pyx_t_6);
80367 __Pyx_WriteUnraisable("pysam.libcbcf.VariantFile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
80368 __pyx_L0:;
80369 __Pyx_TraceReturn(Py_None, 0);
80370 __Pyx_RefNannyFinishContext();
80371 }
80372
80373 /* "pysam/libcbcf.pyx":4135
80374 * raise IOError(errno, force_str(strerror(errno)))
80375 *
80376 * def close(self): # <<<<<<<<<<<<<<
80377 * """closes the :class:`pysam.VariantFile`."""
80378 * if not self.htsfile:
80379 */
80380
80381 /* Python wrapper */
80382 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_7close(PyObject *__pyx_v_self,
80383 #if CYTHON_METH_FASTCALL
80384 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
80385 #else
80386 PyObject *__pyx_args, PyObject *__pyx_kwds
80387 #endif
80388 ); /*proto*/
80389 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_6close, "VariantFile.close(self)\ncloses the :class:`pysam.VariantFile`.");
80390 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_7close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_7close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_6close};
80391 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_7close(PyObject *__pyx_v_self,
80392 #if CYTHON_METH_FASTCALL
80393 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
80394 #else
80395 PyObject *__pyx_args, PyObject *__pyx_kwds
80396 #endif
80397 ) {
80398 #if !CYTHON_METH_FASTCALL
80399 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
80400 #endif
80401 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
80402 PyObject *__pyx_r = 0;
80403 __Pyx_RefNannyDeclarations
80404 __Pyx_RefNannySetupContext("close (wrapper)", 0);
80405 #if !CYTHON_METH_FASTCALL
80406 #if CYTHON_ASSUME_SAFE_MACROS
80407 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
80408 #else
80409 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
80410 #endif
80411 #endif
80412 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
80413 if (unlikely(__pyx_nargs > 0)) {
80414 __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;}
80415 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL;
80416 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_6close(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
80417
80418 /* function exit code */
80419 __Pyx_RefNannyFinishContext();
80420 return __pyx_r;
80421 }
80422
80423 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_6close(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
80424 int __pyx_v_ret;
80425 PyObject *__pyx_r = NULL;
80426 __Pyx_TraceDeclarations
80427 __Pyx_RefNannyDeclarations
80428 int __pyx_t_1;
80429 int __pyx_t_2;
80430 PyObject *__pyx_t_3 = NULL;
80431 PyObject *__pyx_t_4 = NULL;
80432 PyObject *__pyx_t_5 = NULL;
80433 int __pyx_lineno = 0;
80434 const char *__pyx_filename = NULL;
80435 int __pyx_clineno = 0;
80436 __Pyx_TraceFrameInit(__pyx_codeobj__231)
80437 __Pyx_RefNannySetupContext("close", 1);
80438 __Pyx_TraceCall("close", __pyx_f[0], 4135, 0, __PYX_ERR(0, 4135, __pyx_L1_error));
80439
80440 /* "pysam/libcbcf.pyx":4137
80441 * def close(self):
80442 * """closes the :class:`pysam.VariantFile`."""
80443 * if not self.htsfile: # <<<<<<<<<<<<<<
80444 * return
80445 *
80446 */
80447 __pyx_t_1 = (!(__pyx_v_self->__pyx_base.htsfile != 0));
80448 if (__pyx_t_1) {
80449
80450 /* "pysam/libcbcf.pyx":4138
80451 * """closes the :class:`pysam.VariantFile`."""
80452 * if not self.htsfile:
80453 * return # <<<<<<<<<<<<<<
80454 *
80455 * # Write header if no records were written
80456 */
80457 __Pyx_XDECREF(__pyx_r);
80458 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
80459 goto __pyx_L0;
80460
80461 /* "pysam/libcbcf.pyx":4137
80462 * def close(self):
80463 * """closes the :class:`pysam.VariantFile`."""
80464 * if not self.htsfile: # <<<<<<<<<<<<<<
80465 * return
80466 *
80467 */
80468 }
80469
80470 /* "pysam/libcbcf.pyx":4141
80471 *
80472 * # Write header if no records were written
80473 * if self.htsfile.is_write and not self.header_written: # <<<<<<<<<<<<<<
80474 * with nogil:
80475 * bcf_hdr_write(self.htsfile, self.header.ptr)
80476 */
80477 __pyx_t_2 = (__pyx_v_self->__pyx_base.htsfile->is_write != 0);
80478 if (__pyx_t_2) {
80479 } else {
80480 __pyx_t_1 = __pyx_t_2;
80481 goto __pyx_L5_bool_binop_done;
80482 }
80483 __pyx_t_2 = (!__pyx_v_self->header_written);
80484 __pyx_t_1 = __pyx_t_2;
80485 __pyx_L5_bool_binop_done:;
80486 if (__pyx_t_1) {
80487
80488 /* "pysam/libcbcf.pyx":4142
80489 * # Write header if no records were written
80490 * if self.htsfile.is_write and not self.header_written:
80491 * with nogil: # <<<<<<<<<<<<<<
80492 * bcf_hdr_write(self.htsfile, self.header.ptr)
80493 *
80494 */
80495 {
80496 #ifdef WITH_THREAD
80497 PyThreadState *_save;
80498 _save = NULL;
80499 Py_UNBLOCK_THREADS
80500 __Pyx_FastGIL_Remember();
80501 #endif
80502 /*try:*/ {
80503
80504 /* "pysam/libcbcf.pyx":4143
80505 * if self.htsfile.is_write and not self.header_written:
80506 * with nogil:
80507 * bcf_hdr_write(self.htsfile, self.header.ptr) # <<<<<<<<<<<<<<
80508 *
80509 * cdef int ret = hts_close(self.htsfile)
80510 */
80511 (void)(bcf_hdr_write(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->header->ptr));
80512 }
80513
80514 /* "pysam/libcbcf.pyx":4142
80515 * # Write header if no records were written
80516 * if self.htsfile.is_write and not self.header_written:
80517 * with nogil: # <<<<<<<<<<<<<<
80518 * bcf_hdr_write(self.htsfile, self.header.ptr)
80519 *
80520 */
80521 /*finally:*/ {
80522 /*normal exit:*/{
80523 #ifdef WITH_THREAD
80524 __Pyx_FastGIL_Forget();
80525 Py_BLOCK_THREADS
80526 #endif
80527 goto __pyx_L9;
80528 }
80529 __pyx_L9:;
80530 }
80531 }
80532
80533 /* "pysam/libcbcf.pyx":4141
80534 *
80535 * # Write header if no records were written
80536 * if self.htsfile.is_write and not self.header_written: # <<<<<<<<<<<<<<
80537 * with nogil:
80538 * bcf_hdr_write(self.htsfile, self.header.ptr)
80539 */
80540 }
80541
80542 /* "pysam/libcbcf.pyx":4145
80543 * bcf_hdr_write(self.htsfile, self.header.ptr)
80544 *
80545 * cdef int ret = hts_close(self.htsfile) # <<<<<<<<<<<<<<
80546 * self.htsfile = NULL
80547 * self.header = self.index = None
80548 */
80549 __pyx_v_ret = hts_close(__pyx_v_self->__pyx_base.htsfile);
80550
80551 /* "pysam/libcbcf.pyx":4146
80552 *
80553 * cdef int ret = hts_close(self.htsfile)
80554 * self.htsfile = NULL # <<<<<<<<<<<<<<
80555 * self.header = self.index = None
80556 *
80557 */
80558 __pyx_v_self->__pyx_base.htsfile = NULL;
80559
80560 /* "pysam/libcbcf.pyx":4147
80561 * cdef int ret = hts_close(self.htsfile)
80562 * self.htsfile = NULL
80563 * self.header = self.index = None # <<<<<<<<<<<<<<
80564 *
80565 * if ret < 0:
80566 */
80567 __Pyx_INCREF(Py_None);
80568 __Pyx_GIVEREF(Py_None);
80569 __Pyx_GOTREF((PyObject *)__pyx_v_self->header);
80570 __Pyx_DECREF((PyObject *)__pyx_v_self->header);
80571 __pyx_v_self->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None);
80572 __Pyx_INCREF(Py_None);
80573 __Pyx_GIVEREF(Py_None);
80574 __Pyx_GOTREF((PyObject *)__pyx_v_self->index);
80575 __Pyx_DECREF((PyObject *)__pyx_v_self->index);
80576 __pyx_v_self->index = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)Py_None);
80577
80578 /* "pysam/libcbcf.pyx":4149
80579 * self.header = self.index = None
80580 *
80581 * if ret < 0: # <<<<<<<<<<<<<<
80582 * global errno
80583 * if errno == EPIPE:
80584 */
80585 __pyx_t_1 = (__pyx_v_ret < 0);
80586 if (__pyx_t_1) {
80587
80588 /* "pysam/libcbcf.pyx":4151
80589 * if ret < 0:
80590 * global errno
80591 * if errno == EPIPE: # <<<<<<<<<<<<<<
80592 * errno = 0
80593 * else:
80594 */
80595 __pyx_t_1 = (errno == EPIPE);
80596 if (likely(__pyx_t_1)) {
80597
80598 /* "pysam/libcbcf.pyx":4152
80599 * global errno
80600 * if errno == EPIPE:
80601 * errno = 0 # <<<<<<<<<<<<<<
80602 * else:
80603 * raise IOError(errno, force_str(strerror(errno)))
80604 */
80605 errno = 0;
80606
80607 /* "pysam/libcbcf.pyx":4151
80608 * if ret < 0:
80609 * global errno
80610 * if errno == EPIPE: # <<<<<<<<<<<<<<
80611 * errno = 0
80612 * else:
80613 */
80614 goto __pyx_L11;
80615 }
80616
80617 /* "pysam/libcbcf.pyx":4154
80618 * errno = 0
80619 * else:
80620 * raise IOError(errno, force_str(strerror(errno))) # <<<<<<<<<<<<<<
80621 *
80622 * def __iter__(self):
80623 */
80624 /*else*/ {
80625 __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4154, __pyx_L1_error)
80626 __Pyx_GOTREF(__pyx_t_3);
80627 __pyx_t_4 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4154, __pyx_L1_error)
80628 __Pyx_GOTREF(__pyx_t_4);
80629 __pyx_t_5 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4154, __pyx_L1_error)
80630 __Pyx_GOTREF(__pyx_t_5);
80631 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
80632 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4154, __pyx_L1_error)
80633 __Pyx_GOTREF(__pyx_t_4);
80634 __Pyx_GIVEREF(__pyx_t_3);
80635 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 4154, __pyx_L1_error);
80636 __Pyx_GIVEREF(__pyx_t_5);
80637 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(0, 4154, __pyx_L1_error);
80638 __pyx_t_3 = 0;
80639 __pyx_t_5 = 0;
80640 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4154, __pyx_L1_error)
80641 __Pyx_GOTREF(__pyx_t_5);
80642 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
80643 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
80644 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
80645 __PYX_ERR(0, 4154, __pyx_L1_error)
80646 }
80647 __pyx_L11:;
80648
80649 /* "pysam/libcbcf.pyx":4149
80650 * self.header = self.index = None
80651 *
80652 * if ret < 0: # <<<<<<<<<<<<<<
80653 * global errno
80654 * if errno == EPIPE:
80655 */
80656 }
80657
80658 /* "pysam/libcbcf.pyx":4135
80659 * raise IOError(errno, force_str(strerror(errno)))
80660 *
80661 * def close(self): # <<<<<<<<<<<<<<
80662 * """closes the :class:`pysam.VariantFile`."""
80663 * if not self.htsfile:
80664 */
80665
80666 /* function exit code */
80667 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
80668 goto __pyx_L0;
80669 __pyx_L1_error:;
80670 __Pyx_XDECREF(__pyx_t_3);
80671 __Pyx_XDECREF(__pyx_t_4);
80672 __Pyx_XDECREF(__pyx_t_5);
80673 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
80674 __pyx_r = NULL;
80675 __pyx_L0:;
80676 __Pyx_XGIVEREF(__pyx_r);
80677 __Pyx_TraceReturn(__pyx_r, 0);
80678 __Pyx_RefNannyFinishContext();
80679 return __pyx_r;
80680 }
80681
80682 /* "pysam/libcbcf.pyx":4156
80683 * raise IOError(errno, force_str(strerror(errno)))
80684 *
80685 * def __iter__(self): # <<<<<<<<<<<<<<
80686 * if not self.is_open:
80687 * raise ValueError('I/O operation on closed file')
80688 */
80689
80690 /* Python wrapper */
80691 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_9__iter__(PyObject *__pyx_v_self); /*proto*/
80692 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_9__iter__(PyObject *__pyx_v_self) {
80693 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
80694 PyObject *__pyx_r = 0;
80695 __Pyx_RefNannyDeclarations
80696 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
80697 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
80698 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_8__iter__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
80699
80700 /* function exit code */
80701 __Pyx_RefNannyFinishContext();
80702 return __pyx_r;
80703 }
80704
80705 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_8__iter__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
80706 PyObject *__pyx_r = NULL;
80707 __Pyx_TraceDeclarations
80708 __Pyx_RefNannyDeclarations
80709 PyObject *__pyx_t_1 = NULL;
80710 int __pyx_t_2;
80711 int __pyx_t_3;
80712 int __pyx_lineno = 0;
80713 const char *__pyx_filename = NULL;
80714 int __pyx_clineno = 0;
80715 __Pyx_RefNannySetupContext("__iter__", 1);
80716 __Pyx_TraceCall("__iter__", __pyx_f[0], 4156, 0, __PYX_ERR(0, 4156, __pyx_L1_error));
80717
80718 /* "pysam/libcbcf.pyx":4157
80719 *
80720 * def __iter__(self):
80721 * if not self.is_open: # <<<<<<<<<<<<<<
80722 * raise ValueError('I/O operation on closed file')
80723 *
80724 */
80725 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4157, __pyx_L1_error)
80726 __Pyx_GOTREF(__pyx_t_1);
80727 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4157, __pyx_L1_error)
80728 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
80729 __pyx_t_3 = (!__pyx_t_2);
80730 if (unlikely(__pyx_t_3)) {
80731
80732 /* "pysam/libcbcf.pyx":4158
80733 * def __iter__(self):
80734 * if not self.is_open:
80735 * raise ValueError('I/O operation on closed file') # <<<<<<<<<<<<<<
80736 *
80737 * if self.htsfile.is_write:
80738 */
80739 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4158, __pyx_L1_error)
80740 __Pyx_GOTREF(__pyx_t_1);
80741 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
80742 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
80743 __PYX_ERR(0, 4158, __pyx_L1_error)
80744
80745 /* "pysam/libcbcf.pyx":4157
80746 *
80747 * def __iter__(self):
80748 * if not self.is_open: # <<<<<<<<<<<<<<
80749 * raise ValueError('I/O operation on closed file')
80750 *
80751 */
80752 }
80753
80754 /* "pysam/libcbcf.pyx":4160
80755 * raise ValueError('I/O operation on closed file')
80756 *
80757 * if self.htsfile.is_write: # <<<<<<<<<<<<<<
80758 * raise ValueError('cannot iterate over Variantfile opened for writing')
80759 *
80760 */
80761 __pyx_t_3 = (__pyx_v_self->__pyx_base.htsfile->is_write != 0);
80762 if (unlikely(__pyx_t_3)) {
80763
80764 /* "pysam/libcbcf.pyx":4161
80765 *
80766 * if self.htsfile.is_write:
80767 * raise ValueError('cannot iterate over Variantfile opened for writing') # <<<<<<<<<<<<<<
80768 *
80769 * self.is_reading = 1
80770 */
80771 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__233, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4161, __pyx_L1_error)
80772 __Pyx_GOTREF(__pyx_t_1);
80773 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
80774 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
80775 __PYX_ERR(0, 4161, __pyx_L1_error)
80776
80777 /* "pysam/libcbcf.pyx":4160
80778 * raise ValueError('I/O operation on closed file')
80779 *
80780 * if self.htsfile.is_write: # <<<<<<<<<<<<<<
80781 * raise ValueError('cannot iterate over Variantfile opened for writing')
80782 *
80783 */
80784 }
80785
80786 /* "pysam/libcbcf.pyx":4163
80787 * raise ValueError('cannot iterate over Variantfile opened for writing')
80788 *
80789 * self.is_reading = 1 # <<<<<<<<<<<<<<
80790 * return self
80791 *
80792 */
80793 __pyx_v_self->is_reading = 1;
80794
80795 /* "pysam/libcbcf.pyx":4164
80796 *
80797 * self.is_reading = 1
80798 * return self # <<<<<<<<<<<<<<
80799 *
80800 * def __next__(self):
80801 */
80802 __Pyx_XDECREF(__pyx_r);
80803 __Pyx_INCREF((PyObject *)__pyx_v_self);
80804 __pyx_r = ((PyObject *)__pyx_v_self);
80805 goto __pyx_L0;
80806
80807 /* "pysam/libcbcf.pyx":4156
80808 * raise IOError(errno, force_str(strerror(errno)))
80809 *
80810 * def __iter__(self): # <<<<<<<<<<<<<<
80811 * if not self.is_open:
80812 * raise ValueError('I/O operation on closed file')
80813 */
80814
80815 /* function exit code */
80816 __pyx_L1_error:;
80817 __Pyx_XDECREF(__pyx_t_1);
80818 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80819 __pyx_r = NULL;
80820 __pyx_L0:;
80821 __Pyx_XGIVEREF(__pyx_r);
80822 __Pyx_TraceReturn(__pyx_r, 0);
80823 __Pyx_RefNannyFinishContext();
80824 return __pyx_r;
80825 }
80826
80827 /* "pysam/libcbcf.pyx":4166
80828 * return self
80829 *
80830 * def __next__(self): # <<<<<<<<<<<<<<
80831 * cdef int ret
80832 * cdef int errcode
80833 */
80834
80835 /* Python wrapper */
80836 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_11__next__(PyObject *__pyx_v_self); /*proto*/
80837 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_11__next__(PyObject *__pyx_v_self) {
80838 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
80839 PyObject *__pyx_r = 0;
80840 __Pyx_RefNannyDeclarations
80841 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
80842 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
80843 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_10__next__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
80844
80845 /* function exit code */
80846 __Pyx_RefNannyFinishContext();
80847 return __pyx_r;
80848 }
80849
80850 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_10__next__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
80851 int __pyx_v_ret;
80852 int __pyx_v_errcode;
80853 bcf1_t *__pyx_v_record;
80854 PyObject *__pyx_r = NULL;
80855 __Pyx_TraceDeclarations
80856 __Pyx_RefNannyDeclarations
80857 int __pyx_error_without_exception = 0; /* StopIteration */
80858 int __pyx_t_1;
80859 PyObject *__pyx_t_2 = NULL;
80860 int __pyx_t_3;
80861 PyObject *__pyx_t_4 = NULL;
80862 PyObject *__pyx_t_5 = NULL;
80863 int __pyx_lineno = 0;
80864 const char *__pyx_filename = NULL;
80865 int __pyx_clineno = 0;
80866 __Pyx_RefNannySetupContext("__next__", 1);
80867 __Pyx_TraceCall("__next__", __pyx_f[0], 4166, 0, __PYX_ERR(0, 4166, __pyx_L1_error));
80868
80869 /* "pysam/libcbcf.pyx":4169
80870 * cdef int ret
80871 * cdef int errcode
80872 * cdef bcf1_t *record = bcf_init1() # <<<<<<<<<<<<<<
80873 *
80874 * if not record:
80875 */
80876 __pyx_v_record = bcf_init1();
80877
80878 /* "pysam/libcbcf.pyx":4171
80879 * cdef bcf1_t *record = bcf_init1()
80880 *
80881 * if not record: # <<<<<<<<<<<<<<
80882 * raise MemoryError('unable to allocate BCF record')
80883 *
80884 */
80885 __pyx_t_1 = (!(__pyx_v_record != 0));
80886 if (unlikely(__pyx_t_1)) {
80887
80888 /* "pysam/libcbcf.pyx":4172
80889 *
80890 * if not record:
80891 * raise MemoryError('unable to allocate BCF record') # <<<<<<<<<<<<<<
80892 *
80893 * record.pos = -1
80894 */
80895 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4172, __pyx_L1_error)
80896 __Pyx_GOTREF(__pyx_t_2);
80897 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
80898 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
80899 __PYX_ERR(0, 4172, __pyx_L1_error)
80900
80901 /* "pysam/libcbcf.pyx":4171
80902 * cdef bcf1_t *record = bcf_init1()
80903 *
80904 * if not record: # <<<<<<<<<<<<<<
80905 * raise MemoryError('unable to allocate BCF record')
80906 *
80907 */
80908 }
80909
80910 /* "pysam/libcbcf.pyx":4174
80911 * raise MemoryError('unable to allocate BCF record')
80912 *
80913 * record.pos = -1 # <<<<<<<<<<<<<<
80914 * if self.drop_samples:
80915 * record.max_unpack = BCF_UN_SHR
80916 */
80917 __pyx_v_record->pos = -1;
80918
80919 /* "pysam/libcbcf.pyx":4175
80920 *
80921 * record.pos = -1
80922 * if self.drop_samples: # <<<<<<<<<<<<<<
80923 * record.max_unpack = BCF_UN_SHR
80924 *
80925 */
80926 if (__pyx_v_self->drop_samples) {
80927
80928 /* "pysam/libcbcf.pyx":4176
80929 * record.pos = -1
80930 * if self.drop_samples:
80931 * record.max_unpack = BCF_UN_SHR # <<<<<<<<<<<<<<
80932 *
80933 * with nogil:
80934 */
80935 __pyx_v_record->max_unpack = BCF_UN_SHR;
80936
80937 /* "pysam/libcbcf.pyx":4175
80938 *
80939 * record.pos = -1
80940 * if self.drop_samples: # <<<<<<<<<<<<<<
80941 * record.max_unpack = BCF_UN_SHR
80942 *
80943 */
80944 }
80945
80946 /* "pysam/libcbcf.pyx":4178
80947 * record.max_unpack = BCF_UN_SHR
80948 *
80949 * with nogil: # <<<<<<<<<<<<<<
80950 * ret = bcf_read1(self.htsfile, self.header.ptr, record)
80951 *
80952 */
80953 {
80954 #ifdef WITH_THREAD
80955 PyThreadState *_save;
80956 _save = NULL;
80957 Py_UNBLOCK_THREADS
80958 __Pyx_FastGIL_Remember();
80959 #endif
80960 /*try:*/ {
80961
80962 /* "pysam/libcbcf.pyx":4179
80963 *
80964 * with nogil:
80965 * ret = bcf_read1(self.htsfile, self.header.ptr, record) # <<<<<<<<<<<<<<
80966 *
80967 * if ret < 0:
80968 */
80969 __pyx_v_ret = bcf_read1(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->header->ptr, __pyx_v_record);
80970 }
80971
80972 /* "pysam/libcbcf.pyx":4178
80973 * record.max_unpack = BCF_UN_SHR
80974 *
80975 * with nogil: # <<<<<<<<<<<<<<
80976 * ret = bcf_read1(self.htsfile, self.header.ptr, record)
80977 *
80978 */
80979 /*finally:*/ {
80980 /*normal exit:*/{
80981 #ifdef WITH_THREAD
80982 __Pyx_FastGIL_Forget();
80983 Py_BLOCK_THREADS
80984 #endif
80985 goto __pyx_L7;
80986 }
80987 __pyx_L7:;
80988 }
80989 }
80990
80991 /* "pysam/libcbcf.pyx":4181
80992 * ret = bcf_read1(self.htsfile, self.header.ptr, record)
80993 *
80994 * if ret < 0: # <<<<<<<<<<<<<<
80995 * errcode = record.errcode
80996 * bcf_destroy1(record)
80997 */
80998 __pyx_t_1 = (__pyx_v_ret < 0);
80999 if (__pyx_t_1) {
81000
81001 /* "pysam/libcbcf.pyx":4182
81002 *
81003 * if ret < 0:
81004 * errcode = record.errcode # <<<<<<<<<<<<<<
81005 * bcf_destroy1(record)
81006 * if errcode:
81007 */
81008 __pyx_t_3 = __pyx_v_record->errcode;
81009 __pyx_v_errcode = __pyx_t_3;
81010
81011 /* "pysam/libcbcf.pyx":4183
81012 * if ret < 0:
81013 * errcode = record.errcode
81014 * bcf_destroy1(record) # <<<<<<<<<<<<<<
81015 * if errcode:
81016 * raise IOError('unable to parse next record')
81017 */
81018 bcf_destroy1(__pyx_v_record);
81019
81020 /* "pysam/libcbcf.pyx":4184
81021 * errcode = record.errcode
81022 * bcf_destroy1(record)
81023 * if errcode: # <<<<<<<<<<<<<<
81024 * raise IOError('unable to parse next record')
81025 * if ret == -1:
81026 */
81027 __pyx_t_1 = (__pyx_v_errcode != 0);
81028 if (unlikely(__pyx_t_1)) {
81029
81030 /* "pysam/libcbcf.pyx":4185
81031 * bcf_destroy1(record)
81032 * if errcode:
81033 * raise IOError('unable to parse next record') # <<<<<<<<<<<<<<
81034 * if ret == -1:
81035 * raise StopIteration
81036 */
81037 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__234, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4185, __pyx_L1_error)
81038 __Pyx_GOTREF(__pyx_t_2);
81039 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
81040 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
81041 __PYX_ERR(0, 4185, __pyx_L1_error)
81042
81043 /* "pysam/libcbcf.pyx":4184
81044 * errcode = record.errcode
81045 * bcf_destroy1(record)
81046 * if errcode: # <<<<<<<<<<<<<<
81047 * raise IOError('unable to parse next record')
81048 * if ret == -1:
81049 */
81050 }
81051
81052 /* "pysam/libcbcf.pyx":4186
81053 * if errcode:
81054 * raise IOError('unable to parse next record')
81055 * if ret == -1: # <<<<<<<<<<<<<<
81056 * raise StopIteration
81057 * elif ret == -2:
81058 */
81059 __pyx_t_1 = (__pyx_v_ret == -1L);
81060 if (unlikely(__pyx_t_1)) {
81061
81062 /* "pysam/libcbcf.pyx":4187
81063 * raise IOError('unable to parse next record')
81064 * if ret == -1:
81065 * raise StopIteration # <<<<<<<<<<<<<<
81066 * elif ret == -2:
81067 * raise IOError('truncated file')
81068 */
81069 __pyx_error_without_exception = 1;
81070 goto __pyx_L1_error;;
81071
81072 /* "pysam/libcbcf.pyx":4186
81073 * if errcode:
81074 * raise IOError('unable to parse next record')
81075 * if ret == -1: # <<<<<<<<<<<<<<
81076 * raise StopIteration
81077 * elif ret == -2:
81078 */
81079 }
81080
81081 /* "pysam/libcbcf.pyx":4188
81082 * if ret == -1:
81083 * raise StopIteration
81084 * elif ret == -2: # <<<<<<<<<<<<<<
81085 * raise IOError('truncated file')
81086 * elif errno:
81087 */
81088 __pyx_t_1 = (__pyx_v_ret == -2L);
81089 if (unlikely(__pyx_t_1)) {
81090
81091 /* "pysam/libcbcf.pyx":4189
81092 * raise StopIteration
81093 * elif ret == -2:
81094 * raise IOError('truncated file') # <<<<<<<<<<<<<<
81095 * elif errno:
81096 * raise IOError(errno, strerror(errno))
81097 */
81098 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__222, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4189, __pyx_L1_error)
81099 __Pyx_GOTREF(__pyx_t_2);
81100 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
81101 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
81102 __PYX_ERR(0, 4189, __pyx_L1_error)
81103
81104 /* "pysam/libcbcf.pyx":4188
81105 * if ret == -1:
81106 * raise StopIteration
81107 * elif ret == -2: # <<<<<<<<<<<<<<
81108 * raise IOError('truncated file')
81109 * elif errno:
81110 */
81111 }
81112
81113 /* "pysam/libcbcf.pyx":4190
81114 * elif ret == -2:
81115 * raise IOError('truncated file')
81116 * elif errno: # <<<<<<<<<<<<<<
81117 * raise IOError(errno, strerror(errno))
81118 * else:
81119 */
81120 __pyx_t_1 = (errno != 0);
81121 if (unlikely(__pyx_t_1)) {
81122
81123 /* "pysam/libcbcf.pyx":4191
81124 * raise IOError('truncated file')
81125 * elif errno:
81126 * raise IOError(errno, strerror(errno)) # <<<<<<<<<<<<<<
81127 * else:
81128 * raise IOError('unable to fetch next record')
81129 */
81130 __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4191, __pyx_L1_error)
81131 __Pyx_GOTREF(__pyx_t_2);
81132 __pyx_t_4 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4191, __pyx_L1_error)
81133 __Pyx_GOTREF(__pyx_t_4);
81134 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4191, __pyx_L1_error)
81135 __Pyx_GOTREF(__pyx_t_5);
81136 __Pyx_GIVEREF(__pyx_t_2);
81137 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(0, 4191, __pyx_L1_error);
81138 __Pyx_GIVEREF(__pyx_t_4);
81139 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 4191, __pyx_L1_error);
81140 __pyx_t_2 = 0;
81141 __pyx_t_4 = 0;
81142 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4191, __pyx_L1_error)
81143 __Pyx_GOTREF(__pyx_t_4);
81144 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
81145 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
81146 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81147 __PYX_ERR(0, 4191, __pyx_L1_error)
81148
81149 /* "pysam/libcbcf.pyx":4190
81150 * elif ret == -2:
81151 * raise IOError('truncated file')
81152 * elif errno: # <<<<<<<<<<<<<<
81153 * raise IOError(errno, strerror(errno))
81154 * else:
81155 */
81156 }
81157
81158 /* "pysam/libcbcf.pyx":4193
81159 * raise IOError(errno, strerror(errno))
81160 * else:
81161 * raise IOError('unable to fetch next record') # <<<<<<<<<<<<<<
81162 *
81163 * return makeVariantRecord(self.header, record)
81164 */
81165 /*else*/ {
81166 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__223, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4193, __pyx_L1_error)
81167 __Pyx_GOTREF(__pyx_t_4);
81168 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
81169 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81170 __PYX_ERR(0, 4193, __pyx_L1_error)
81171 }
81172
81173 /* "pysam/libcbcf.pyx":4181
81174 * ret = bcf_read1(self.htsfile, self.header.ptr, record)
81175 *
81176 * if ret < 0: # <<<<<<<<<<<<<<
81177 * errcode = record.errcode
81178 * bcf_destroy1(record)
81179 */
81180 }
81181
81182 /* "pysam/libcbcf.pyx":4195
81183 * raise IOError('unable to fetch next record')
81184 *
81185 * return makeVariantRecord(self.header, record) # <<<<<<<<<<<<<<
81186 *
81187 * def copy(self):
81188 */
81189 __Pyx_XDECREF(__pyx_r);
81190 __pyx_t_4 = ((PyObject *)__pyx_v_self->header);
81191 __Pyx_INCREF(__pyx_t_4);
81192 __pyx_t_5 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantRecord(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_4), __pyx_v_record)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4195, __pyx_L1_error)
81193 __Pyx_GOTREF(__pyx_t_5);
81194 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81195 __pyx_r = __pyx_t_5;
81196 __pyx_t_5 = 0;
81197 goto __pyx_L0;
81198
81199 /* "pysam/libcbcf.pyx":4166
81200 * return self
81201 *
81202 * def __next__(self): # <<<<<<<<<<<<<<
81203 * cdef int ret
81204 * cdef int errcode
81205 */
81206
81207 /* function exit code */
81208 __pyx_L1_error:;
81209 __Pyx_XDECREF(__pyx_t_2);
81210 __Pyx_XDECREF(__pyx_t_4);
81211 __Pyx_XDECREF(__pyx_t_5);
81212 if (!__pyx_error_without_exception) {
81213 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
81214 }
81215 __pyx_r = NULL;
81216 __pyx_L0:;
81217 __Pyx_XGIVEREF(__pyx_r);
81218 __Pyx_TraceReturn(__pyx_r, 0);
81219 __Pyx_RefNannyFinishContext();
81220 return __pyx_r;
81221 }
81222
81223 /* "pysam/libcbcf.pyx":4197
81224 * return makeVariantRecord(self.header, record)
81225 *
81226 * def copy(self): # <<<<<<<<<<<<<<
81227 * if not self.is_open:
81228 * raise ValueError
81229 */
81230
81231 /* Python wrapper */
81232 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_13copy(PyObject *__pyx_v_self,
81233 #if CYTHON_METH_FASTCALL
81234 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
81235 #else
81236 PyObject *__pyx_args, PyObject *__pyx_kwds
81237 #endif
81238 ); /*proto*/
81239 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_12copy, "VariantFile.copy(self)");
81240 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_13copy = {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_13copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_12copy};
81241 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_13copy(PyObject *__pyx_v_self,
81242 #if CYTHON_METH_FASTCALL
81243 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
81244 #else
81245 PyObject *__pyx_args, PyObject *__pyx_kwds
81246 #endif
81247 ) {
81248 #if !CYTHON_METH_FASTCALL
81249 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
81250 #endif
81251 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
81252 PyObject *__pyx_r = 0;
81253 __Pyx_RefNannyDeclarations
81254 __Pyx_RefNannySetupContext("copy (wrapper)", 0);
81255 #if !CYTHON_METH_FASTCALL
81256 #if CYTHON_ASSUME_SAFE_MACROS
81257 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
81258 #else
81259 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
81260 #endif
81261 #endif
81262 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
81263 if (unlikely(__pyx_nargs > 0)) {
81264 __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
81265 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
81266 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_12copy(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
81267
81268 /* function exit code */
81269 __Pyx_RefNannyFinishContext();
81270 return __pyx_r;
81271 }
81272
81273 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_12copy(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
81274 struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_vars = 0;
81275 bcf_hdr_t *__pyx_v_hdr;
81276 PyObject *__pyx_r = NULL;
81277 __Pyx_TraceDeclarations
81278 __Pyx_RefNannyDeclarations
81279 PyObject *__pyx_t_1 = NULL;
81280 int __pyx_t_2;
81281 int __pyx_t_3;
81282 htsFile *__pyx_t_4;
81283 int64_t __pyx_t_5;
81284 PyObject *__pyx_t_6 = NULL;
81285 PyObject *__pyx_t_7 = NULL;
81286 PyObject *__pyx_t_8 = NULL;
81287 PyObject *__pyx_t_9 = NULL;
81288 unsigned int __pyx_t_10;
81289 int __pyx_lineno = 0;
81290 const char *__pyx_filename = NULL;
81291 int __pyx_clineno = 0;
81292 __Pyx_TraceFrameInit(__pyx_codeobj__235)
81293 __Pyx_RefNannySetupContext("copy", 1);
81294 __Pyx_TraceCall("copy", __pyx_f[0], 4197, 0, __PYX_ERR(0, 4197, __pyx_L1_error));
81295
81296 /* "pysam/libcbcf.pyx":4198
81297 *
81298 * def copy(self):
81299 * if not self.is_open: # <<<<<<<<<<<<<<
81300 * raise ValueError
81301 *
81302 */
81303 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4198, __pyx_L1_error)
81304 __Pyx_GOTREF(__pyx_t_1);
81305 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4198, __pyx_L1_error)
81306 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
81307 __pyx_t_3 = (!__pyx_t_2);
81308 if (unlikely(__pyx_t_3)) {
81309
81310 /* "pysam/libcbcf.pyx":4199
81311 * def copy(self):
81312 * if not self.is_open:
81313 * raise ValueError # <<<<<<<<<<<<<<
81314 *
81315 * cdef VariantFile vars = VariantFile.__new__(VariantFile)
81316 */
81317 __Pyx_Raise(__pyx_builtin_ValueError, 0, 0, 0);
81318 __PYX_ERR(0, 4199, __pyx_L1_error)
81319
81320 /* "pysam/libcbcf.pyx":4198
81321 *
81322 * def copy(self):
81323 * if not self.is_open: # <<<<<<<<<<<<<<
81324 * raise ValueError
81325 *
81326 */
81327 }
81328
81329 /* "pysam/libcbcf.pyx":4201
81330 * raise ValueError
81331 *
81332 * cdef VariantFile vars = VariantFile.__new__(VariantFile) # <<<<<<<<<<<<<<
81333 * cdef bcf_hdr_t *hdr
81334 *
81335 */
81336 __pyx_t_1 = ((PyObject *)__pyx_tp_new_5pysam_7libcbcf_VariantFile(((PyTypeObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4201, __pyx_L1_error)
81337 __Pyx_GOTREF((PyObject *)__pyx_t_1);
81338 __pyx_v_vars = ((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_t_1);
81339 __pyx_t_1 = 0;
81340
81341 /* "pysam/libcbcf.pyx":4205
81342 *
81343 * # FIXME: re-open using fd or else header and index could be invalid
81344 * vars.htsfile = self._open_htsfile() # <<<<<<<<<<<<<<
81345 *
81346 * if not vars.htsfile:
81347 */
81348 __pyx_t_4 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._open_htsfile(((struct __pyx_obj_5pysam_10libchtslib_HTSFile *)__pyx_v_self)); if (unlikely(__pyx_t_4 == ((htsFile *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 4205, __pyx_L1_error)
81349 __pyx_v_vars->__pyx_base.htsfile = __pyx_t_4;
81350
81351 /* "pysam/libcbcf.pyx":4207
81352 * vars.htsfile = self._open_htsfile()
81353 *
81354 * if not vars.htsfile: # <<<<<<<<<<<<<<
81355 * raise ValueError('Cannot re-open htsfile')
81356 *
81357 */
81358 __pyx_t_3 = (!(__pyx_v_vars->__pyx_base.htsfile != 0));
81359 if (unlikely(__pyx_t_3)) {
81360
81361 /* "pysam/libcbcf.pyx":4208
81362 *
81363 * if not vars.htsfile:
81364 * raise ValueError('Cannot re-open htsfile') # <<<<<<<<<<<<<<
81365 *
81366 * # minimize overhead by re-using header and index. This approach is
81367 */
81368 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__236, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4208, __pyx_L1_error)
81369 __Pyx_GOTREF(__pyx_t_1);
81370 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
81371 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
81372 __PYX_ERR(0, 4208, __pyx_L1_error)
81373
81374 /* "pysam/libcbcf.pyx":4207
81375 * vars.htsfile = self._open_htsfile()
81376 *
81377 * if not vars.htsfile: # <<<<<<<<<<<<<<
81378 * raise ValueError('Cannot re-open htsfile')
81379 *
81380 */
81381 }
81382
81383 /* "pysam/libcbcf.pyx":4212
81384 * # minimize overhead by re-using header and index. This approach is
81385 * # currently risky, but see above for how this can be mitigated.
81386 * vars.header = self.header # <<<<<<<<<<<<<<
81387 * vars.index = self.index
81388 *
81389 */
81390 __pyx_t_1 = ((PyObject *)__pyx_v_self->header);
81391 __Pyx_INCREF(__pyx_t_1);
81392 __Pyx_GIVEREF(__pyx_t_1);
81393 __Pyx_GOTREF((PyObject *)__pyx_v_vars->header);
81394 __Pyx_DECREF((PyObject *)__pyx_v_vars->header);
81395 __pyx_v_vars->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_1);
81396 __pyx_t_1 = 0;
81397
81398 /* "pysam/libcbcf.pyx":4213
81399 * # currently risky, but see above for how this can be mitigated.
81400 * vars.header = self.header
81401 * vars.index = self.index # <<<<<<<<<<<<<<
81402 *
81403 * vars.filename = self.filename
81404 */
81405 __pyx_t_1 = ((PyObject *)__pyx_v_self->index);
81406 __Pyx_INCREF(__pyx_t_1);
81407 __Pyx_GIVEREF(__pyx_t_1);
81408 __Pyx_GOTREF((PyObject *)__pyx_v_vars->index);
81409 __Pyx_DECREF((PyObject *)__pyx_v_vars->index);
81410 __pyx_v_vars->index = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_t_1);
81411 __pyx_t_1 = 0;
81412
81413 /* "pysam/libcbcf.pyx":4215
81414 * vars.index = self.index
81415 *
81416 * vars.filename = self.filename # <<<<<<<<<<<<<<
81417 * vars.mode = self.mode
81418 * vars.threads = self.threads
81419 */
81420 __pyx_t_1 = __pyx_v_self->__pyx_base.filename;
81421 __Pyx_INCREF(__pyx_t_1);
81422 __Pyx_GIVEREF(__pyx_t_1);
81423 __Pyx_GOTREF(__pyx_v_vars->__pyx_base.filename);
81424 __Pyx_DECREF(__pyx_v_vars->__pyx_base.filename);
81425 __pyx_v_vars->__pyx_base.filename = __pyx_t_1;
81426 __pyx_t_1 = 0;
81427
81428 /* "pysam/libcbcf.pyx":4216
81429 *
81430 * vars.filename = self.filename
81431 * vars.mode = self.mode # <<<<<<<<<<<<<<
81432 * vars.threads = self.threads
81433 * vars.index_filename = self.index_filename
81434 */
81435 __pyx_t_1 = __pyx_v_self->__pyx_base.mode;
81436 __Pyx_INCREF(__pyx_t_1);
81437 __Pyx_GIVEREF(__pyx_t_1);
81438 __Pyx_GOTREF(__pyx_v_vars->__pyx_base.mode);
81439 __Pyx_DECREF(__pyx_v_vars->__pyx_base.mode);
81440 __pyx_v_vars->__pyx_base.mode = __pyx_t_1;
81441 __pyx_t_1 = 0;
81442
81443 /* "pysam/libcbcf.pyx":4217
81444 * vars.filename = self.filename
81445 * vars.mode = self.mode
81446 * vars.threads = self.threads # <<<<<<<<<<<<<<
81447 * vars.index_filename = self.index_filename
81448 * vars.drop_samples = self.drop_samples
81449 */
81450 __pyx_t_1 = __pyx_v_self->__pyx_base.threads;
81451 __Pyx_INCREF(__pyx_t_1);
81452 __Pyx_GIVEREF(__pyx_t_1);
81453 __Pyx_GOTREF(__pyx_v_vars->__pyx_base.threads);
81454 __Pyx_DECREF(__pyx_v_vars->__pyx_base.threads);
81455 __pyx_v_vars->__pyx_base.threads = __pyx_t_1;
81456 __pyx_t_1 = 0;
81457
81458 /* "pysam/libcbcf.pyx":4218
81459 * vars.mode = self.mode
81460 * vars.threads = self.threads
81461 * vars.index_filename = self.index_filename # <<<<<<<<<<<<<<
81462 * vars.drop_samples = self.drop_samples
81463 * vars.is_stream = self.is_stream
81464 */
81465 __pyx_t_1 = __pyx_v_self->__pyx_base.index_filename;
81466 __Pyx_INCREF(__pyx_t_1);
81467 __Pyx_GIVEREF(__pyx_t_1);
81468 __Pyx_GOTREF(__pyx_v_vars->__pyx_base.index_filename);
81469 __Pyx_DECREF(__pyx_v_vars->__pyx_base.index_filename);
81470 __pyx_v_vars->__pyx_base.index_filename = __pyx_t_1;
81471 __pyx_t_1 = 0;
81472
81473 /* "pysam/libcbcf.pyx":4219
81474 * vars.threads = self.threads
81475 * vars.index_filename = self.index_filename
81476 * vars.drop_samples = self.drop_samples # <<<<<<<<<<<<<<
81477 * vars.is_stream = self.is_stream
81478 * vars.is_remote = self.is_remote
81479 */
81480 __pyx_t_3 = __pyx_v_self->drop_samples;
81481 __pyx_v_vars->drop_samples = __pyx_t_3;
81482
81483 /* "pysam/libcbcf.pyx":4220
81484 * vars.index_filename = self.index_filename
81485 * vars.drop_samples = self.drop_samples
81486 * vars.is_stream = self.is_stream # <<<<<<<<<<<<<<
81487 * vars.is_remote = self.is_remote
81488 * vars.is_reading = self.is_reading
81489 */
81490 __pyx_t_3 = __pyx_v_self->__pyx_base.is_stream;
81491 __pyx_v_vars->__pyx_base.is_stream = __pyx_t_3;
81492
81493 /* "pysam/libcbcf.pyx":4221
81494 * vars.drop_samples = self.drop_samples
81495 * vars.is_stream = self.is_stream
81496 * vars.is_remote = self.is_remote # <<<<<<<<<<<<<<
81497 * vars.is_reading = self.is_reading
81498 * vars.start_offset = self.start_offset
81499 */
81500 __pyx_t_3 = __pyx_v_self->__pyx_base.is_remote;
81501 __pyx_v_vars->__pyx_base.is_remote = __pyx_t_3;
81502
81503 /* "pysam/libcbcf.pyx":4222
81504 * vars.is_stream = self.is_stream
81505 * vars.is_remote = self.is_remote
81506 * vars.is_reading = self.is_reading # <<<<<<<<<<<<<<
81507 * vars.start_offset = self.start_offset
81508 * vars.header_written = self.header_written
81509 */
81510 __pyx_t_3 = __pyx_v_self->is_reading;
81511 __pyx_v_vars->is_reading = __pyx_t_3;
81512
81513 /* "pysam/libcbcf.pyx":4223
81514 * vars.is_remote = self.is_remote
81515 * vars.is_reading = self.is_reading
81516 * vars.start_offset = self.start_offset # <<<<<<<<<<<<<<
81517 * vars.header_written = self.header_written
81518 *
81519 */
81520 __pyx_t_5 = __pyx_v_self->__pyx_base.start_offset;
81521 __pyx_v_vars->__pyx_base.start_offset = __pyx_t_5;
81522
81523 /* "pysam/libcbcf.pyx":4224
81524 * vars.is_reading = self.is_reading
81525 * vars.start_offset = self.start_offset
81526 * vars.header_written = self.header_written # <<<<<<<<<<<<<<
81527 *
81528 * if self.htsfile.is_bin:
81529 */
81530 __pyx_t_3 = __pyx_v_self->header_written;
81531 __pyx_v_vars->header_written = __pyx_t_3;
81532
81533 /* "pysam/libcbcf.pyx":4226
81534 * vars.header_written = self.header_written
81535 *
81536 * if self.htsfile.is_bin: # <<<<<<<<<<<<<<
81537 * vars.seek(self.tell())
81538 * else:
81539 */
81540 __pyx_t_3 = (__pyx_v_self->__pyx_base.htsfile->is_bin != 0);
81541 if (__pyx_t_3) {
81542
81543 /* "pysam/libcbcf.pyx":4227
81544 *
81545 * if self.htsfile.is_bin:
81546 * vars.seek(self.tell()) # <<<<<<<<<<<<<<
81547 * else:
81548 * with nogil:
81549 */
81550 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vars), __pyx_n_s_seek); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4227, __pyx_L1_error)
81551 __Pyx_GOTREF(__pyx_t_6);
81552 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tell); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4227, __pyx_L1_error)
81553 __Pyx_GOTREF(__pyx_t_8);
81554 __pyx_t_9 = NULL;
81555 __pyx_t_10 = 0;
81556 #if CYTHON_UNPACK_METHODS
81557 if (likely(PyMethod_Check(__pyx_t_8))) {
81558 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
81559 if (likely(__pyx_t_9)) {
81560 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
81561 __Pyx_INCREF(__pyx_t_9);
81562 __Pyx_INCREF(function);
81563 __Pyx_DECREF_SET(__pyx_t_8, function);
81564 __pyx_t_10 = 1;
81565 }
81566 }
81567 #endif
81568 {
81569 PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
81570 __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
81571 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
81572 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4227, __pyx_L1_error)
81573 __Pyx_GOTREF(__pyx_t_7);
81574 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
81575 }
81576 __pyx_t_8 = NULL;
81577 __pyx_t_10 = 0;
81578 #if CYTHON_UNPACK_METHODS
81579 if (likely(PyMethod_Check(__pyx_t_6))) {
81580 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
81581 if (likely(__pyx_t_8)) {
81582 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
81583 __Pyx_INCREF(__pyx_t_8);
81584 __Pyx_INCREF(function);
81585 __Pyx_DECREF_SET(__pyx_t_6, function);
81586 __pyx_t_10 = 1;
81587 }
81588 }
81589 #endif
81590 {
81591 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
81592 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
81593 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
81594 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
81595 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4227, __pyx_L1_error)
81596 __Pyx_GOTREF(__pyx_t_1);
81597 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
81598 }
81599 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
81600
81601 /* "pysam/libcbcf.pyx":4226
81602 * vars.header_written = self.header_written
81603 *
81604 * if self.htsfile.is_bin: # <<<<<<<<<<<<<<
81605 * vars.seek(self.tell())
81606 * else:
81607 */
81608 goto __pyx_L5;
81609 }
81610
81611 /* "pysam/libcbcf.pyx":4229
81612 * vars.seek(self.tell())
81613 * else:
81614 * with nogil: # <<<<<<<<<<<<<<
81615 * hdr = bcf_hdr_read(vars.htsfile)
81616 * makeVariantHeader(hdr)
81617 */
81618 /*else*/ {
81619 {
81620 #ifdef WITH_THREAD
81621 PyThreadState *_save;
81622 _save = NULL;
81623 Py_UNBLOCK_THREADS
81624 __Pyx_FastGIL_Remember();
81625 #endif
81626 /*try:*/ {
81627
81628 /* "pysam/libcbcf.pyx":4230
81629 * else:
81630 * with nogil:
81631 * hdr = bcf_hdr_read(vars.htsfile) # <<<<<<<<<<<<<<
81632 * makeVariantHeader(hdr)
81633 *
81634 */
81635 __pyx_v_hdr = bcf_hdr_read(__pyx_v_vars->__pyx_base.htsfile);
81636 }
81637
81638 /* "pysam/libcbcf.pyx":4229
81639 * vars.seek(self.tell())
81640 * else:
81641 * with nogil: # <<<<<<<<<<<<<<
81642 * hdr = bcf_hdr_read(vars.htsfile)
81643 * makeVariantHeader(hdr)
81644 */
81645 /*finally:*/ {
81646 /*normal exit:*/{
81647 #ifdef WITH_THREAD
81648 __Pyx_FastGIL_Forget();
81649 Py_BLOCK_THREADS
81650 #endif
81651 goto __pyx_L8;
81652 }
81653 __pyx_L8:;
81654 }
81655 }
81656
81657 /* "pysam/libcbcf.pyx":4231
81658 * with nogil:
81659 * hdr = bcf_hdr_read(vars.htsfile)
81660 * makeVariantHeader(hdr) # <<<<<<<<<<<<<<
81661 *
81662 * return vars
81663 */
81664 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeader(__pyx_v_hdr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4231, __pyx_L1_error)
81665 __Pyx_GOTREF(__pyx_t_1);
81666 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
81667 }
81668 __pyx_L5:;
81669
81670 /* "pysam/libcbcf.pyx":4233
81671 * makeVariantHeader(hdr)
81672 *
81673 * return vars # <<<<<<<<<<<<<<
81674 *
81675 * def open(self, filename, mode='r',
81676 */
81677 __Pyx_XDECREF(__pyx_r);
81678 __Pyx_INCREF((PyObject *)__pyx_v_vars);
81679 __pyx_r = ((PyObject *)__pyx_v_vars);
81680 goto __pyx_L0;
81681
81682 /* "pysam/libcbcf.pyx":4197
81683 * return makeVariantRecord(self.header, record)
81684 *
81685 * def copy(self): # <<<<<<<<<<<<<<
81686 * if not self.is_open:
81687 * raise ValueError
81688 */
81689
81690 /* function exit code */
81691 __pyx_L1_error:;
81692 __Pyx_XDECREF(__pyx_t_1);
81693 __Pyx_XDECREF(__pyx_t_6);
81694 __Pyx_XDECREF(__pyx_t_7);
81695 __Pyx_XDECREF(__pyx_t_8);
81696 __Pyx_XDECREF(__pyx_t_9);
81697 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
81698 __pyx_r = NULL;
81699 __pyx_L0:;
81700 __Pyx_XDECREF((PyObject *)__pyx_v_vars);
81701 __Pyx_XGIVEREF(__pyx_r);
81702 __Pyx_TraceReturn(__pyx_r, 0);
81703 __Pyx_RefNannyFinishContext();
81704 return __pyx_r;
81705 }
81706
81707 /* "pysam/libcbcf.pyx":4235
81708 * return vars
81709 *
81710 * def open(self, filename, mode='r', # <<<<<<<<<<<<<<
81711 * index_filename=None,
81712 * VariantHeader header=None,
81713 */
81714
81715 /* Python wrapper */
81716 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_15open(PyObject *__pyx_v_self,
81717 #if CYTHON_METH_FASTCALL
81718 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
81719 #else
81720 PyObject *__pyx_args, PyObject *__pyx_kwds
81721 #endif
81722 ); /*proto*/
81723 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_14open, "VariantFile.open(self, filename, mode=u'r', index_filename=None, VariantHeader header=None, drop_samples=False, duplicate_filehandle=True, ignore_truncation=False, threads=1)\nopen a vcf/bcf file.\n\n If open is called on an existing VariantFile, the current file will be\n closed and a new file will be opened.\n ");
81724 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_15open = {"open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_15open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_14open};
81725 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_15open(PyObject *__pyx_v_self,
81726 #if CYTHON_METH_FASTCALL
81727 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
81728 #else
81729 PyObject *__pyx_args, PyObject *__pyx_kwds
81730 #endif
81731 ) {
81732 PyObject *__pyx_v_filename = 0;
81733 PyObject *__pyx_v_mode = 0;
81734 PyObject *__pyx_v_index_filename = 0;
81735 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header = 0;
81736 PyObject *__pyx_v_drop_samples = 0;
81737 PyObject *__pyx_v_duplicate_filehandle = 0;
81738 PyObject *__pyx_v_ignore_truncation = 0;
81739 PyObject *__pyx_v_threads = 0;
81740 #if !CYTHON_METH_FASTCALL
81741 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
81742 #endif
81743 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
81744 PyObject* values[8] = {0,0,0,0,0,0,0,0};
81745 int __pyx_lineno = 0;
81746 const char *__pyx_filename = NULL;
81747 int __pyx_clineno = 0;
81748 PyObject *__pyx_r = 0;
81749 __Pyx_RefNannyDeclarations
81750 __Pyx_RefNannySetupContext("open (wrapper)", 0);
81751 #if !CYTHON_METH_FASTCALL
81752 #if CYTHON_ASSUME_SAFE_MACROS
81753 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
81754 #else
81755 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
81756 #endif
81757 #endif
81758 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
81759 {
81760 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_index_filename,&__pyx_n_s_header,&__pyx_n_s_drop_samples,&__pyx_n_s_duplicate_filehandle,&__pyx_n_s_ignore_truncation,&__pyx_n_s_threads,0};
81761 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_r));
81762
81763 /* "pysam/libcbcf.pyx":4236
81764 *
81765 * def open(self, filename, mode='r',
81766 * index_filename=None, # <<<<<<<<<<<<<<
81767 * VariantHeader header=None,
81768 * drop_samples=False,
81769 */
81770 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
81771
81772 /* "pysam/libcbcf.pyx":4237
81773 * def open(self, filename, mode='r',
81774 * index_filename=None,
81775 * VariantHeader header=None, # <<<<<<<<<<<<<<
81776 * drop_samples=False,
81777 * duplicate_filehandle=True,
81778 */
81779 values[3] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None));
81780
81781 /* "pysam/libcbcf.pyx":4238
81782 * index_filename=None,
81783 * VariantHeader header=None,
81784 * drop_samples=False, # <<<<<<<<<<<<<<
81785 * duplicate_filehandle=True,
81786 * ignore_truncation=False,
81787 */
81788 values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
81789
81790 /* "pysam/libcbcf.pyx":4239
81791 * VariantHeader header=None,
81792 * drop_samples=False,
81793 * duplicate_filehandle=True, # <<<<<<<<<<<<<<
81794 * ignore_truncation=False,
81795 * threads=1):
81796 */
81797 values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
81798
81799 /* "pysam/libcbcf.pyx":4240
81800 * drop_samples=False,
81801 * duplicate_filehandle=True,
81802 * ignore_truncation=False, # <<<<<<<<<<<<<<
81803 * threads=1):
81804 * """open a vcf/bcf file.
81805 */
81806 values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
81807 values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_1));
81808 if (__pyx_kwds) {
81809 Py_ssize_t kw_args;
81810 switch (__pyx_nargs) {
81811 case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
81812 CYTHON_FALLTHROUGH;
81813 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
81814 CYTHON_FALLTHROUGH;
81815 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
81816 CYTHON_FALLTHROUGH;
81817 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
81818 CYTHON_FALLTHROUGH;
81819 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
81820 CYTHON_FALLTHROUGH;
81821 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
81822 CYTHON_FALLTHROUGH;
81823 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
81824 CYTHON_FALLTHROUGH;
81825 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
81826 CYTHON_FALLTHROUGH;
81827 case 0: break;
81828 default: goto __pyx_L5_argtuple_error;
81829 }
81830 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
81831 switch (__pyx_nargs) {
81832 case 0:
81833 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
81834 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
81835 kw_args--;
81836 }
81837 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L3_error)
81838 else goto __pyx_L5_argtuple_error;
81839 CYTHON_FALLTHROUGH;
81840 case 1:
81841 if (kw_args > 0) {
81842 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
81843 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
81844 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L3_error)
81845 }
81846 CYTHON_FALLTHROUGH;
81847 case 2:
81848 if (kw_args > 0) {
81849 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index_filename);
81850 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
81851 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L3_error)
81852 }
81853 CYTHON_FALLTHROUGH;
81854 case 3:
81855 if (kw_args > 0) {
81856 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header);
81857 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
81858 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L3_error)
81859 }
81860 CYTHON_FALLTHROUGH;
81861 case 4:
81862 if (kw_args > 0) {
81863 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_drop_samples);
81864 if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
81865 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L3_error)
81866 }
81867 CYTHON_FALLTHROUGH;
81868 case 5:
81869 if (kw_args > 0) {
81870 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_duplicate_filehandle);
81871 if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
81872 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L3_error)
81873 }
81874 CYTHON_FALLTHROUGH;
81875 case 6:
81876 if (kw_args > 0) {
81877 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ignore_truncation);
81878 if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
81879 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L3_error)
81880 }
81881 CYTHON_FALLTHROUGH;
81882 case 7:
81883 if (kw_args > 0) {
81884 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_threads);
81885 if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
81886 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L3_error)
81887 }
81888 }
81889 if (unlikely(kw_args > 0)) {
81890 const Py_ssize_t kwd_pos_args = __pyx_nargs;
81891 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "open") < 0)) __PYX_ERR(0, 4235, __pyx_L3_error)
81892 }
81893 } else {
81894 switch (__pyx_nargs) {
81895 case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
81896 CYTHON_FALLTHROUGH;
81897 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
81898 CYTHON_FALLTHROUGH;
81899 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
81900 CYTHON_FALLTHROUGH;
81901 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
81902 CYTHON_FALLTHROUGH;
81903 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
81904 CYTHON_FALLTHROUGH;
81905 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
81906 CYTHON_FALLTHROUGH;
81907 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
81908 CYTHON_FALLTHROUGH;
81909 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
81910 break;
81911 default: goto __pyx_L5_argtuple_error;
81912 }
81913 }
81914 __pyx_v_filename = values[0];
81915 __pyx_v_mode = values[1];
81916 __pyx_v_index_filename = values[2];
81917 __pyx_v_header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)values[3]);
81918 __pyx_v_drop_samples = values[4];
81919 __pyx_v_duplicate_filehandle = values[5];
81920 __pyx_v_ignore_truncation = values[6];
81921 __pyx_v_threads = values[7];
81922 }
81923 goto __pyx_L6_skip;
81924 __pyx_L5_argtuple_error:;
81925 __Pyx_RaiseArgtupleInvalid("open", 0, 1, 8, __pyx_nargs); __PYX_ERR(0, 4235, __pyx_L3_error)
81926 __pyx_L6_skip:;
81927 goto __pyx_L4_argument_unpacking_done;
81928 __pyx_L3_error:;
81929 {
81930 Py_ssize_t __pyx_temp;
81931 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
81932 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
81933 }
81934 }
81935 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
81936 __Pyx_RefNannyFinishContext();
81937 return NULL;
81938 __pyx_L4_argument_unpacking_done:;
81939 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_header), __pyx_ptype_5pysam_7libcbcf_VariantHeader, 1, "header", 0))) __PYX_ERR(0, 4237, __pyx_L1_error)
81940 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_14open(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_index_filename, __pyx_v_header, __pyx_v_drop_samples, __pyx_v_duplicate_filehandle, __pyx_v_ignore_truncation, __pyx_v_threads);
81941
81942 /* "pysam/libcbcf.pyx":4235
81943 * return vars
81944 *
81945 * def open(self, filename, mode='r', # <<<<<<<<<<<<<<
81946 * index_filename=None,
81947 * VariantHeader header=None,
81948 */
81949
81950 /* function exit code */
81951 goto __pyx_L0;
81952 __pyx_L1_error:;
81953 __pyx_r = NULL;
81954 __pyx_L0:;
81955 {
81956 Py_ssize_t __pyx_temp;
81957 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
81958 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
81959 }
81960 }
81961 __Pyx_RefNannyFinishContext();
81962 return __pyx_r;
81963 }
81964
81965 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_14open(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_index_filename, struct __pyx_obj_5pysam_7libcbcf_VariantHeader *__pyx_v_header, PyObject *__pyx_v_drop_samples, PyObject *__pyx_v_duplicate_filehandle, PyObject *__pyx_v_ignore_truncation, PyObject *__pyx_v_threads) {
81966 bcf_hdr_t *__pyx_v_hdr;
81967 hts_idx_t *__pyx_v_idx;
81968 tbx_t *__pyx_v_tidx;
81969 char *__pyx_v_cfilename;
81970 char *__pyx_v_cindex_filename;
81971 PyObject *__pyx_v_format_modes = NULL;
81972 PyObject *__pyx_v_invalid_modes = NULL;
81973 PyObject *__pyx_9genexpr13__pyx_v_m = NULL;
81974 PyObject *__pyx_9genexpr14__pyx_v_m = NULL;
81975 PyObject *__pyx_r = NULL;
81976 __Pyx_TraceDeclarations
81977 __Pyx_RefNannyDeclarations
81978 int __pyx_t_1;
81979 PyObject *__pyx_t_2 = NULL;
81980 int __pyx_t_3;
81981 PyObject *__pyx_t_4 = NULL;
81982 PyObject *__pyx_t_5 = NULL;
81983 unsigned int __pyx_t_6;
81984 int __pyx_t_7;
81985 Py_ssize_t __pyx_t_8;
81986 PyObject *(*__pyx_t_9)(PyObject *);
81987 PyObject *__pyx_t_10 = NULL;
81988 PyObject *__pyx_t_11 = NULL;
81989 PyObject *__pyx_t_12 = NULL;
81990 PyObject *__pyx_t_13 = NULL;
81991 char const *__pyx_t_14;
81992 int __pyx_t_15;
81993 htsFile *__pyx_t_16;
81994 PyObject *__pyx_t_17 = NULL;
81995 PyObject *__pyx_t_18 = NULL;
81996 char *__pyx_t_19;
81997 int64_t __pyx_t_20;
81998 int __pyx_lineno = 0;
81999 const char *__pyx_filename = NULL;
82000 int __pyx_clineno = 0;
82001 __Pyx_TraceFrameInit(__pyx_codeobj__237)
82002 __Pyx_RefNannySetupContext("open", 0);
82003 __Pyx_TraceCall("open", __pyx_f[0], 4235, 0, __PYX_ERR(0, 4235, __pyx_L1_error));
82004 __Pyx_INCREF(__pyx_v_filename);
82005 __Pyx_INCREF(__pyx_v_mode);
82006 __Pyx_INCREF(__pyx_v_index_filename);
82007
82008 /* "pysam/libcbcf.pyx":4252
82009 * cdef tbx_t *tidx
82010 * cdef char *cfilename
82011 * cdef char *cindex_filename = NULL # <<<<<<<<<<<<<<
82012 * cdef char *cmode
82013 *
82014 */
82015 __pyx_v_cindex_filename = NULL;
82016
82017 /* "pysam/libcbcf.pyx":4255
82018 * cdef char *cmode
82019 *
82020 * if threads > 1 and ignore_truncation: # <<<<<<<<<<<<<<
82021 * # This won't raise errors if reaching a truncated alignment,
82022 * # because bgzf_mt_reader in htslib does not deal with
82023 */
82024 __pyx_t_2 = PyObject_RichCompare(__pyx_v_threads, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4255, __pyx_L1_error)
82025 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4255, __pyx_L1_error)
82026 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82027 if (__pyx_t_3) {
82028 } else {
82029 __pyx_t_1 = __pyx_t_3;
82030 goto __pyx_L4_bool_binop_done;
82031 }
82032 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_truncation); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4255, __pyx_L1_error)
82033 __pyx_t_1 = __pyx_t_3;
82034 __pyx_L4_bool_binop_done:;
82035 if (unlikely(__pyx_t_1)) {
82036
82037 /* "pysam/libcbcf.pyx":4261
82038 * # to bgzf_read (https://github.com/samtools/htslib/blob/1.7/bgzf.c#L888)
82039 * # Better to avoid this (for now) than to produce seemingly correct results.
82040 * raise ValueError('Cannot add extra threads when "ignore_truncation" is True') # <<<<<<<<<<<<<<
82041 * self.threads = threads
82042 *
82043 */
82044 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__238, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4261, __pyx_L1_error)
82045 __Pyx_GOTREF(__pyx_t_2);
82046 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
82047 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82048 __PYX_ERR(0, 4261, __pyx_L1_error)
82049
82050 /* "pysam/libcbcf.pyx":4255
82051 * cdef char *cmode
82052 *
82053 * if threads > 1 and ignore_truncation: # <<<<<<<<<<<<<<
82054 * # This won't raise errors if reaching a truncated alignment,
82055 * # because bgzf_mt_reader in htslib does not deal with
82056 */
82057 }
82058
82059 /* "pysam/libcbcf.pyx":4262
82060 * # Better to avoid this (for now) than to produce seemingly correct results.
82061 * raise ValueError('Cannot add extra threads when "ignore_truncation" is True')
82062 * self.threads = threads # <<<<<<<<<<<<<<
82063 *
82064 * # close a previously opened file
82065 */
82066 __Pyx_INCREF(__pyx_v_threads);
82067 __Pyx_GIVEREF(__pyx_v_threads);
82068 __Pyx_GOTREF(__pyx_v_self->__pyx_base.threads);
82069 __Pyx_DECREF(__pyx_v_self->__pyx_base.threads);
82070 __pyx_v_self->__pyx_base.threads = __pyx_v_threads;
82071
82072 /* "pysam/libcbcf.pyx":4265
82073 *
82074 * # close a previously opened file
82075 * if self.is_open: # <<<<<<<<<<<<<<
82076 * self.close()
82077 *
82078 */
82079 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4265, __pyx_L1_error)
82080 __Pyx_GOTREF(__pyx_t_2);
82081 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4265, __pyx_L1_error)
82082 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82083 if (__pyx_t_1) {
82084
82085 /* "pysam/libcbcf.pyx":4266
82086 * # close a previously opened file
82087 * if self.is_open:
82088 * self.close() # <<<<<<<<<<<<<<
82089 *
82090 * if not mode or mode[0] not in 'rwa':
82091 */
82092 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4266, __pyx_L1_error)
82093 __Pyx_GOTREF(__pyx_t_4);
82094 __pyx_t_5 = NULL;
82095 __pyx_t_6 = 0;
82096 #if CYTHON_UNPACK_METHODS
82097 if (likely(PyMethod_Check(__pyx_t_4))) {
82098 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
82099 if (likely(__pyx_t_5)) {
82100 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
82101 __Pyx_INCREF(__pyx_t_5);
82102 __Pyx_INCREF(function);
82103 __Pyx_DECREF_SET(__pyx_t_4, function);
82104 __pyx_t_6 = 1;
82105 }
82106 }
82107 #endif
82108 {
82109 PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
82110 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
82111 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82112 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4266, __pyx_L1_error)
82113 __Pyx_GOTREF(__pyx_t_2);
82114 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82115 }
82116 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82117
82118 /* "pysam/libcbcf.pyx":4265
82119 *
82120 * # close a previously opened file
82121 * if self.is_open: # <<<<<<<<<<<<<<
82122 * self.close()
82123 *
82124 */
82125 }
82126
82127 /* "pysam/libcbcf.pyx":4268
82128 * self.close()
82129 *
82130 * if not mode or mode[0] not in 'rwa': # <<<<<<<<<<<<<<
82131 * raise ValueError('mode must begin with r, w or a')
82132 *
82133 */
82134 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_mode); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4268, __pyx_L1_error)
82135 __pyx_t_7 = (!__pyx_t_3);
82136 if (!__pyx_t_7) {
82137 } else {
82138 __pyx_t_1 = __pyx_t_7;
82139 goto __pyx_L8_bool_binop_done;
82140 }
82141 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_mode, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4268, __pyx_L1_error)
82142 __Pyx_GOTREF(__pyx_t_2);
82143 __pyx_t_7 = (__Pyx_PyUnicode_ContainsTF(__pyx_t_2, __pyx_n_u_rwa, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4268, __pyx_L1_error)
82144 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82145 __pyx_t_1 = __pyx_t_7;
82146 __pyx_L8_bool_binop_done:;
82147 if (unlikely(__pyx_t_1)) {
82148
82149 /* "pysam/libcbcf.pyx":4269
82150 *
82151 * if not mode or mode[0] not in 'rwa':
82152 * raise ValueError('mode must begin with r, w or a') # <<<<<<<<<<<<<<
82153 *
82154 * self.duplicate_filehandle = duplicate_filehandle
82155 */
82156 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__239, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4269, __pyx_L1_error)
82157 __Pyx_GOTREF(__pyx_t_2);
82158 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
82159 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82160 __PYX_ERR(0, 4269, __pyx_L1_error)
82161
82162 /* "pysam/libcbcf.pyx":4268
82163 * self.close()
82164 *
82165 * if not mode or mode[0] not in 'rwa': # <<<<<<<<<<<<<<
82166 * raise ValueError('mode must begin with r, w or a')
82167 *
82168 */
82169 }
82170
82171 /* "pysam/libcbcf.pyx":4271
82172 * raise ValueError('mode must begin with r, w or a')
82173 *
82174 * self.duplicate_filehandle = duplicate_filehandle # <<<<<<<<<<<<<<
82175 *
82176 * format_modes = [m for m in mode[1:] if m in 'bcguz']
82177 */
82178 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_duplicate_filehandle); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4271, __pyx_L1_error)
82179 __pyx_v_self->__pyx_base.duplicate_filehandle = __pyx_t_1;
82180
82181 /* "pysam/libcbcf.pyx":4273
82182 * self.duplicate_filehandle = duplicate_filehandle
82183 *
82184 * format_modes = [m for m in mode[1:] if m in 'bcguz'] # <<<<<<<<<<<<<<
82185 * if len(format_modes) > 1:
82186 * raise ValueError('mode contains conflicting format specifiers: {}'.format(''.join(format_modes)))
82187 */
82188 { /* enter inner scope */
82189 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4273, __pyx_L12_error)
82190 __Pyx_GOTREF(__pyx_t_2);
82191 __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_mode, 1, 0, NULL, NULL, &__pyx_slice__240, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4273, __pyx_L12_error)
82192 __Pyx_GOTREF(__pyx_t_4);
82193 if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
82194 __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
82195 __pyx_t_8 = 0;
82196 __pyx_t_9 = NULL;
82197 } else {
82198 __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4273, __pyx_L12_error)
82199 __Pyx_GOTREF(__pyx_t_5);
82200 __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4273, __pyx_L12_error)
82201 }
82202 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82203 for (;;) {
82204 if (likely(!__pyx_t_9)) {
82205 if (likely(PyList_CheckExact(__pyx_t_5))) {
82206 {
82207 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
82208 #if !CYTHON_ASSUME_SAFE_MACROS
82209 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4273, __pyx_L12_error)
82210 #endif
82211 if (__pyx_t_8 >= __pyx_temp) break;
82212 }
82213 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
82214 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 4273, __pyx_L12_error)
82215 #else
82216 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4273, __pyx_L12_error)
82217 __Pyx_GOTREF(__pyx_t_4);
82218 #endif
82219 } else {
82220 {
82221 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
82222 #if !CYTHON_ASSUME_SAFE_MACROS
82223 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4273, __pyx_L12_error)
82224 #endif
82225 if (__pyx_t_8 >= __pyx_temp) break;
82226 }
82227 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
82228 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 4273, __pyx_L12_error)
82229 #else
82230 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4273, __pyx_L12_error)
82231 __Pyx_GOTREF(__pyx_t_4);
82232 #endif
82233 }
82234 } else {
82235 __pyx_t_4 = __pyx_t_9(__pyx_t_5);
82236 if (unlikely(!__pyx_t_4)) {
82237 PyObject* exc_type = PyErr_Occurred();
82238 if (exc_type) {
82239 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
82240 else __PYX_ERR(0, 4273, __pyx_L12_error)
82241 }
82242 break;
82243 }
82244 __Pyx_GOTREF(__pyx_t_4);
82245 }
82246 __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_m, __pyx_t_4);
82247 __pyx_t_4 = 0;
82248 __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_9genexpr13__pyx_v_m, __pyx_n_u_bcguz, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4273, __pyx_L12_error)
82249 if (__pyx_t_1) {
82250 if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr13__pyx_v_m))) __PYX_ERR(0, 4273, __pyx_L12_error)
82251 }
82252 }
82253 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82254 __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_m); __pyx_9genexpr13__pyx_v_m = 0;
82255 goto __pyx_L17_exit_scope;
82256 __pyx_L12_error:;
82257 __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_m); __pyx_9genexpr13__pyx_v_m = 0;
82258 goto __pyx_L1_error;
82259 __pyx_L17_exit_scope:;
82260 } /* exit inner scope */
82261 __pyx_v_format_modes = ((PyObject*)__pyx_t_2);
82262 __pyx_t_2 = 0;
82263
82264 /* "pysam/libcbcf.pyx":4274
82265 *
82266 * format_modes = [m for m in mode[1:] if m in 'bcguz']
82267 * if len(format_modes) > 1: # <<<<<<<<<<<<<<
82268 * raise ValueError('mode contains conflicting format specifiers: {}'.format(''.join(format_modes)))
82269 *
82270 */
82271 __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_v_format_modes); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4274, __pyx_L1_error)
82272 __pyx_t_1 = (__pyx_t_8 > 1);
82273 if (unlikely(__pyx_t_1)) {
82274
82275 /* "pysam/libcbcf.pyx":4275
82276 * format_modes = [m for m in mode[1:] if m in 'bcguz']
82277 * if len(format_modes) > 1:
82278 * raise ValueError('mode contains conflicting format specifiers: {}'.format(''.join(format_modes))) # <<<<<<<<<<<<<<
82279 *
82280 * invalid_modes = [m for m in mode[1:] if m not in 'bcguz0123456789ex']
82281 */
82282 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_mode_contains_conflicting_format, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4275, __pyx_L1_error)
82283 __Pyx_GOTREF(__pyx_t_5);
82284 __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__12, __pyx_v_format_modes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4275, __pyx_L1_error)
82285 __Pyx_GOTREF(__pyx_t_4);
82286 __pyx_t_10 = NULL;
82287 __pyx_t_6 = 0;
82288 #if CYTHON_UNPACK_METHODS
82289 if (likely(PyMethod_Check(__pyx_t_5))) {
82290 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
82291 if (likely(__pyx_t_10)) {
82292 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82293 __Pyx_INCREF(__pyx_t_10);
82294 __Pyx_INCREF(function);
82295 __Pyx_DECREF_SET(__pyx_t_5, function);
82296 __pyx_t_6 = 1;
82297 }
82298 }
82299 #endif
82300 {
82301 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_4};
82302 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
82303 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
82304 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82305 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4275, __pyx_L1_error)
82306 __Pyx_GOTREF(__pyx_t_2);
82307 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82308 }
82309 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4275, __pyx_L1_error)
82310 __Pyx_GOTREF(__pyx_t_5);
82311 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82312 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
82313 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82314 __PYX_ERR(0, 4275, __pyx_L1_error)
82315
82316 /* "pysam/libcbcf.pyx":4274
82317 *
82318 * format_modes = [m for m in mode[1:] if m in 'bcguz']
82319 * if len(format_modes) > 1: # <<<<<<<<<<<<<<
82320 * raise ValueError('mode contains conflicting format specifiers: {}'.format(''.join(format_modes)))
82321 *
82322 */
82323 }
82324
82325 /* "pysam/libcbcf.pyx":4277
82326 * raise ValueError('mode contains conflicting format specifiers: {}'.format(''.join(format_modes)))
82327 *
82328 * invalid_modes = [m for m in mode[1:] if m not in 'bcguz0123456789ex'] # <<<<<<<<<<<<<<
82329 * if invalid_modes:
82330 * raise ValueError('invalid mode options: {}'.format(''.join(invalid_modes)))
82331 */
82332 { /* enter inner scope */
82333 __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4277, __pyx_L21_error)
82334 __Pyx_GOTREF(__pyx_t_5);
82335 __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_mode, 1, 0, NULL, NULL, &__pyx_slice__240, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4277, __pyx_L21_error)
82336 __Pyx_GOTREF(__pyx_t_2);
82337 if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
82338 __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4);
82339 __pyx_t_8 = 0;
82340 __pyx_t_9 = NULL;
82341 } else {
82342 __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4277, __pyx_L21_error)
82343 __Pyx_GOTREF(__pyx_t_4);
82344 __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4277, __pyx_L21_error)
82345 }
82346 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82347 for (;;) {
82348 if (likely(!__pyx_t_9)) {
82349 if (likely(PyList_CheckExact(__pyx_t_4))) {
82350 {
82351 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
82352 #if !CYTHON_ASSUME_SAFE_MACROS
82353 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4277, __pyx_L21_error)
82354 #endif
82355 if (__pyx_t_8 >= __pyx_temp) break;
82356 }
82357 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
82358 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 4277, __pyx_L21_error)
82359 #else
82360 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4277, __pyx_L21_error)
82361 __Pyx_GOTREF(__pyx_t_2);
82362 #endif
82363 } else {
82364 {
82365 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
82366 #if !CYTHON_ASSUME_SAFE_MACROS
82367 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4277, __pyx_L21_error)
82368 #endif
82369 if (__pyx_t_8 >= __pyx_temp) break;
82370 }
82371 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
82372 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 4277, __pyx_L21_error)
82373 #else
82374 __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4277, __pyx_L21_error)
82375 __Pyx_GOTREF(__pyx_t_2);
82376 #endif
82377 }
82378 } else {
82379 __pyx_t_2 = __pyx_t_9(__pyx_t_4);
82380 if (unlikely(!__pyx_t_2)) {
82381 PyObject* exc_type = PyErr_Occurred();
82382 if (exc_type) {
82383 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
82384 else __PYX_ERR(0, 4277, __pyx_L21_error)
82385 }
82386 break;
82387 }
82388 __Pyx_GOTREF(__pyx_t_2);
82389 }
82390 __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_m, __pyx_t_2);
82391 __pyx_t_2 = 0;
82392 __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_9genexpr14__pyx_v_m, __pyx_n_u_bcguz0123456789ex, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4277, __pyx_L21_error)
82393 if (__pyx_t_1) {
82394 if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_9genexpr14__pyx_v_m))) __PYX_ERR(0, 4277, __pyx_L21_error)
82395 }
82396 }
82397 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82398 __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_m); __pyx_9genexpr14__pyx_v_m = 0;
82399 goto __pyx_L26_exit_scope;
82400 __pyx_L21_error:;
82401 __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_m); __pyx_9genexpr14__pyx_v_m = 0;
82402 goto __pyx_L1_error;
82403 __pyx_L26_exit_scope:;
82404 } /* exit inner scope */
82405 __pyx_v_invalid_modes = ((PyObject*)__pyx_t_5);
82406 __pyx_t_5 = 0;
82407
82408 /* "pysam/libcbcf.pyx":4278
82409 *
82410 * invalid_modes = [m for m in mode[1:] if m not in 'bcguz0123456789ex']
82411 * if invalid_modes: # <<<<<<<<<<<<<<
82412 * raise ValueError('invalid mode options: {}'.format(''.join(invalid_modes)))
82413 *
82414 */
82415 __pyx_t_1 = (PyList_GET_SIZE(__pyx_v_invalid_modes) != 0);
82416 if (unlikely(__pyx_t_1)) {
82417
82418 /* "pysam/libcbcf.pyx":4279
82419 * invalid_modes = [m for m in mode[1:] if m not in 'bcguz0123456789ex']
82420 * if invalid_modes:
82421 * raise ValueError('invalid mode options: {}'.format(''.join(invalid_modes))) # <<<<<<<<<<<<<<
82422 *
82423 * # Autodetect mode from filename
82424 */
82425 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_mode_options, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4279, __pyx_L1_error)
82426 __Pyx_GOTREF(__pyx_t_4);
82427 __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__12, __pyx_v_invalid_modes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4279, __pyx_L1_error)
82428 __Pyx_GOTREF(__pyx_t_2);
82429 __pyx_t_10 = NULL;
82430 __pyx_t_6 = 0;
82431 #if CYTHON_UNPACK_METHODS
82432 if (likely(PyMethod_Check(__pyx_t_4))) {
82433 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
82434 if (likely(__pyx_t_10)) {
82435 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
82436 __Pyx_INCREF(__pyx_t_10);
82437 __Pyx_INCREF(function);
82438 __Pyx_DECREF_SET(__pyx_t_4, function);
82439 __pyx_t_6 = 1;
82440 }
82441 }
82442 #endif
82443 {
82444 PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2};
82445 __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
82446 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
82447 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82448 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4279, __pyx_L1_error)
82449 __Pyx_GOTREF(__pyx_t_5);
82450 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82451 }
82452 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4279, __pyx_L1_error)
82453 __Pyx_GOTREF(__pyx_t_4);
82454 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82455 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
82456 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82457 __PYX_ERR(0, 4279, __pyx_L1_error)
82458
82459 /* "pysam/libcbcf.pyx":4278
82460 *
82461 * invalid_modes = [m for m in mode[1:] if m not in 'bcguz0123456789ex']
82462 * if invalid_modes: # <<<<<<<<<<<<<<
82463 * raise ValueError('invalid mode options: {}'.format(''.join(invalid_modes)))
82464 *
82465 */
82466 }
82467
82468 /* "pysam/libcbcf.pyx":4282
82469 *
82470 * # Autodetect mode from filename
82471 * if mode == 'w' and isinstance(filename, str): # <<<<<<<<<<<<<<
82472 * if filename.endswith('.gz'):
82473 * mode = 'wz'
82474 */
82475 __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_w, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4282, __pyx_L1_error)
82476 if (__pyx_t_7) {
82477 } else {
82478 __pyx_t_1 = __pyx_t_7;
82479 goto __pyx_L29_bool_binop_done;
82480 }
82481 __pyx_t_7 = PyUnicode_Check(__pyx_v_filename);
82482 __pyx_t_1 = __pyx_t_7;
82483 __pyx_L29_bool_binop_done:;
82484 if (__pyx_t_1) {
82485
82486 /* "pysam/libcbcf.pyx":4283
82487 * # Autodetect mode from filename
82488 * if mode == 'w' and isinstance(filename, str):
82489 * if filename.endswith('.gz'): # <<<<<<<<<<<<<<
82490 * mode = 'wz'
82491 * elif filename.endswith('.bcf'):
82492 */
82493 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4283, __pyx_L1_error)
82494 __Pyx_GOTREF(__pyx_t_5);
82495 __pyx_t_2 = NULL;
82496 __pyx_t_6 = 0;
82497 #if CYTHON_UNPACK_METHODS
82498 if (likely(PyMethod_Check(__pyx_t_5))) {
82499 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
82500 if (likely(__pyx_t_2)) {
82501 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82502 __Pyx_INCREF(__pyx_t_2);
82503 __Pyx_INCREF(function);
82504 __Pyx_DECREF_SET(__pyx_t_5, function);
82505 __pyx_t_6 = 1;
82506 }
82507 }
82508 #endif
82509 {
82510 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_gz};
82511 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
82512 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
82513 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4283, __pyx_L1_error)
82514 __Pyx_GOTREF(__pyx_t_4);
82515 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82516 }
82517 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4283, __pyx_L1_error)
82518 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82519 if (__pyx_t_1) {
82520
82521 /* "pysam/libcbcf.pyx":4284
82522 * if mode == 'w' and isinstance(filename, str):
82523 * if filename.endswith('.gz'):
82524 * mode = 'wz' # <<<<<<<<<<<<<<
82525 * elif filename.endswith('.bcf'):
82526 * mode = 'wb'
82527 */
82528 __Pyx_INCREF(__pyx_n_u_wz);
82529 __Pyx_DECREF_SET(__pyx_v_mode, __pyx_n_u_wz);
82530
82531 /* "pysam/libcbcf.pyx":4283
82532 * # Autodetect mode from filename
82533 * if mode == 'w' and isinstance(filename, str):
82534 * if filename.endswith('.gz'): # <<<<<<<<<<<<<<
82535 * mode = 'wz'
82536 * elif filename.endswith('.bcf'):
82537 */
82538 goto __pyx_L31;
82539 }
82540
82541 /* "pysam/libcbcf.pyx":4285
82542 * if filename.endswith('.gz'):
82543 * mode = 'wz'
82544 * elif filename.endswith('.bcf'): # <<<<<<<<<<<<<<
82545 * mode = 'wb'
82546 *
82547 */
82548 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4285, __pyx_L1_error)
82549 __Pyx_GOTREF(__pyx_t_5);
82550 __pyx_t_2 = NULL;
82551 __pyx_t_6 = 0;
82552 #if CYTHON_UNPACK_METHODS
82553 if (likely(PyMethod_Check(__pyx_t_5))) {
82554 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
82555 if (likely(__pyx_t_2)) {
82556 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82557 __Pyx_INCREF(__pyx_t_2);
82558 __Pyx_INCREF(function);
82559 __Pyx_DECREF_SET(__pyx_t_5, function);
82560 __pyx_t_6 = 1;
82561 }
82562 }
82563 #endif
82564 {
82565 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_bcf_2};
82566 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
82567 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
82568 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4285, __pyx_L1_error)
82569 __Pyx_GOTREF(__pyx_t_4);
82570 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82571 }
82572 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4285, __pyx_L1_error)
82573 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82574 if (__pyx_t_1) {
82575
82576 /* "pysam/libcbcf.pyx":4286
82577 * mode = 'wz'
82578 * elif filename.endswith('.bcf'):
82579 * mode = 'wb' # <<<<<<<<<<<<<<
82580 *
82581 * # for htslib, wbu seems to not work
82582 */
82583 __Pyx_INCREF(__pyx_n_u_wb);
82584 __Pyx_DECREF_SET(__pyx_v_mode, __pyx_n_u_wb);
82585
82586 /* "pysam/libcbcf.pyx":4285
82587 * if filename.endswith('.gz'):
82588 * mode = 'wz'
82589 * elif filename.endswith('.bcf'): # <<<<<<<<<<<<<<
82590 * mode = 'wb'
82591 *
82592 */
82593 }
82594 __pyx_L31:;
82595
82596 /* "pysam/libcbcf.pyx":4282
82597 *
82598 * # Autodetect mode from filename
82599 * if mode == 'w' and isinstance(filename, str): # <<<<<<<<<<<<<<
82600 * if filename.endswith('.gz'):
82601 * mode = 'wz'
82602 */
82603 }
82604
82605 /* "pysam/libcbcf.pyx":4289
82606 *
82607 * # for htslib, wbu seems to not work
82608 * if mode == 'wbu': # <<<<<<<<<<<<<<
82609 * mode = 'wb0'
82610 *
82611 */
82612 __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_n_u_wbu, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4289, __pyx_L1_error)
82613 if (__pyx_t_1) {
82614
82615 /* "pysam/libcbcf.pyx":4290
82616 * # for htslib, wbu seems to not work
82617 * if mode == 'wbu':
82618 * mode = 'wb0' # <<<<<<<<<<<<<<
82619 *
82620 * self.mode = mode = force_bytes(mode)
82621 */
82622 __Pyx_INCREF(__pyx_n_u_wb0);
82623 __Pyx_DECREF_SET(__pyx_v_mode, __pyx_n_u_wb0);
82624
82625 /* "pysam/libcbcf.pyx":4289
82626 *
82627 * # for htslib, wbu seems to not work
82628 * if mode == 'wbu': # <<<<<<<<<<<<<<
82629 * mode = 'wb0'
82630 *
82631 */
82632 }
82633
82634 /* "pysam/libcbcf.pyx":4292
82635 * mode = 'wb0'
82636 *
82637 * self.mode = mode = force_bytes(mode) # <<<<<<<<<<<<<<
82638 * try:
82639 * filename = encode_filename(filename)
82640 */
82641 __pyx_t_4 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_mode, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4292, __pyx_L1_error)
82642 __Pyx_GOTREF(__pyx_t_4);
82643 __Pyx_INCREF(__pyx_t_4);
82644 __Pyx_GIVEREF(__pyx_t_4);
82645 __Pyx_GOTREF(__pyx_v_self->__pyx_base.mode);
82646 __Pyx_DECREF(__pyx_v_self->__pyx_base.mode);
82647 __pyx_v_self->__pyx_base.mode = __pyx_t_4;
82648 __Pyx_INCREF(__pyx_t_4);
82649 __Pyx_DECREF_SET(__pyx_v_mode, __pyx_t_4);
82650 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82651
82652 /* "pysam/libcbcf.pyx":4293
82653 *
82654 * self.mode = mode = force_bytes(mode)
82655 * try: # <<<<<<<<<<<<<<
82656 * filename = encode_filename(filename)
82657 * self.is_remote = hisremote(filename)
82658 */
82659 {
82660 __Pyx_PyThreadState_declare
82661 __Pyx_PyThreadState_assign
82662 __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
82663 __Pyx_XGOTREF(__pyx_t_11);
82664 __Pyx_XGOTREF(__pyx_t_12);
82665 __Pyx_XGOTREF(__pyx_t_13);
82666 /*try:*/ {
82667
82668 /* "pysam/libcbcf.pyx":4294
82669 * self.mode = mode = force_bytes(mode)
82670 * try:
82671 * filename = encode_filename(filename) # <<<<<<<<<<<<<<
82672 * self.is_remote = hisremote(filename)
82673 * self.is_stream = filename == b'-'
82674 */
82675 __pyx_t_4 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4294, __pyx_L33_error)
82676 __Pyx_GOTREF(__pyx_t_4);
82677 __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_4);
82678 __pyx_t_4 = 0;
82679
82680 /* "pysam/libcbcf.pyx":4295
82681 * try:
82682 * filename = encode_filename(filename)
82683 * self.is_remote = hisremote(filename) # <<<<<<<<<<<<<<
82684 * self.is_stream = filename == b'-'
82685 * except TypeError:
82686 */
82687 __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 4295, __pyx_L33_error)
82688 __pyx_v_self->__pyx_base.is_remote = hisremote(__pyx_t_14);
82689
82690 /* "pysam/libcbcf.pyx":4296
82691 * filename = encode_filename(filename)
82692 * self.is_remote = hisremote(filename)
82693 * self.is_stream = filename == b'-' # <<<<<<<<<<<<<<
82694 * except TypeError:
82695 * filename = filename
82696 */
82697 __pyx_t_4 = PyObject_RichCompare(__pyx_v_filename, __pyx_kp_b__241, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4296, __pyx_L33_error)
82698 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4296, __pyx_L33_error)
82699 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82700 __pyx_v_self->__pyx_base.is_stream = __pyx_t_1;
82701
82702 /* "pysam/libcbcf.pyx":4293
82703 *
82704 * self.mode = mode = force_bytes(mode)
82705 * try: # <<<<<<<<<<<<<<
82706 * filename = encode_filename(filename)
82707 * self.is_remote = hisremote(filename)
82708 */
82709 }
82710 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
82711 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
82712 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
82713 goto __pyx_L38_try_end;
82714 __pyx_L33_error:;
82715 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
82716 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
82717 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
82718 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82719
82720 /* "pysam/libcbcf.pyx":4297
82721 * self.is_remote = hisremote(filename)
82722 * self.is_stream = filename == b'-'
82723 * except TypeError: # <<<<<<<<<<<<<<
82724 * filename = filename
82725 * self.is_remote = False
82726 */
82727 __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
82728 if (__pyx_t_15) {
82729 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
82730 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) __PYX_ERR(0, 4297, __pyx_L35_except_error)
82731 __Pyx_XGOTREF(__pyx_t_4);
82732 __Pyx_XGOTREF(__pyx_t_5);
82733 __Pyx_XGOTREF(__pyx_t_2);
82734
82735 /* "pysam/libcbcf.pyx":4298
82736 * self.is_stream = filename == b'-'
82737 * except TypeError:
82738 * filename = filename # <<<<<<<<<<<<<<
82739 * self.is_remote = False
82740 * self.is_stream = True
82741 */
82742 __Pyx_INCREF(__pyx_v_filename);
82743 __Pyx_DECREF_SET(__pyx_v_filename, __pyx_v_filename);
82744
82745 /* "pysam/libcbcf.pyx":4299
82746 * except TypeError:
82747 * filename = filename
82748 * self.is_remote = False # <<<<<<<<<<<<<<
82749 * self.is_stream = True
82750 *
82751 */
82752 __pyx_v_self->__pyx_base.is_remote = 0;
82753
82754 /* "pysam/libcbcf.pyx":4300
82755 * filename = filename
82756 * self.is_remote = False
82757 * self.is_stream = True # <<<<<<<<<<<<<<
82758 *
82759 * self.filename = filename
82760 */
82761 __pyx_v_self->__pyx_base.is_stream = 1;
82762 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
82763 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82764 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
82765 goto __pyx_L34_exception_handled;
82766 }
82767 goto __pyx_L35_except_error;
82768
82769 /* "pysam/libcbcf.pyx":4293
82770 *
82771 * self.mode = mode = force_bytes(mode)
82772 * try: # <<<<<<<<<<<<<<
82773 * filename = encode_filename(filename)
82774 * self.is_remote = hisremote(filename)
82775 */
82776 __pyx_L35_except_error:;
82777 __Pyx_XGIVEREF(__pyx_t_11);
82778 __Pyx_XGIVEREF(__pyx_t_12);
82779 __Pyx_XGIVEREF(__pyx_t_13);
82780 __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
82781 goto __pyx_L1_error;
82782 __pyx_L34_exception_handled:;
82783 __Pyx_XGIVEREF(__pyx_t_11);
82784 __Pyx_XGIVEREF(__pyx_t_12);
82785 __Pyx_XGIVEREF(__pyx_t_13);
82786 __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
82787 __pyx_L38_try_end:;
82788 }
82789
82790 /* "pysam/libcbcf.pyx":4302
82791 * self.is_stream = True
82792 *
82793 * self.filename = filename # <<<<<<<<<<<<<<
82794 *
82795 * if index_filename is not None:
82796 */
82797 __Pyx_INCREF(__pyx_v_filename);
82798 __Pyx_GIVEREF(__pyx_v_filename);
82799 __Pyx_GOTREF(__pyx_v_self->__pyx_base.filename);
82800 __Pyx_DECREF(__pyx_v_self->__pyx_base.filename);
82801 __pyx_v_self->__pyx_base.filename = __pyx_v_filename;
82802
82803 /* "pysam/libcbcf.pyx":4304
82804 * self.filename = filename
82805 *
82806 * if index_filename is not None: # <<<<<<<<<<<<<<
82807 * self.index_filename = index_filename = encode_filename(index_filename)
82808 * else:
82809 */
82810 __pyx_t_1 = (__pyx_v_index_filename != Py_None);
82811 if (__pyx_t_1) {
82812
82813 /* "pysam/libcbcf.pyx":4305
82814 *
82815 * if index_filename is not None:
82816 * self.index_filename = index_filename = encode_filename(index_filename) # <<<<<<<<<<<<<<
82817 * else:
82818 * self.index_filename = None
82819 */
82820 __pyx_t_2 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_index_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4305, __pyx_L1_error)
82821 __Pyx_GOTREF(__pyx_t_2);
82822 __Pyx_INCREF(__pyx_t_2);
82823 __Pyx_GIVEREF(__pyx_t_2);
82824 __Pyx_GOTREF(__pyx_v_self->__pyx_base.index_filename);
82825 __Pyx_DECREF(__pyx_v_self->__pyx_base.index_filename);
82826 __pyx_v_self->__pyx_base.index_filename = __pyx_t_2;
82827 __Pyx_INCREF(__pyx_t_2);
82828 __Pyx_DECREF_SET(__pyx_v_index_filename, __pyx_t_2);
82829 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82830
82831 /* "pysam/libcbcf.pyx":4304
82832 * self.filename = filename
82833 *
82834 * if index_filename is not None: # <<<<<<<<<<<<<<
82835 * self.index_filename = index_filename = encode_filename(index_filename)
82836 * else:
82837 */
82838 goto __pyx_L41;
82839 }
82840
82841 /* "pysam/libcbcf.pyx":4307
82842 * self.index_filename = index_filename = encode_filename(index_filename)
82843 * else:
82844 * self.index_filename = None # <<<<<<<<<<<<<<
82845 *
82846 * self.drop_samples = bool(drop_samples)
82847 */
82848 /*else*/ {
82849 __Pyx_INCREF(Py_None);
82850 __Pyx_GIVEREF(Py_None);
82851 __Pyx_GOTREF(__pyx_v_self->__pyx_base.index_filename);
82852 __Pyx_DECREF(__pyx_v_self->__pyx_base.index_filename);
82853 __pyx_v_self->__pyx_base.index_filename = Py_None;
82854 }
82855 __pyx_L41:;
82856
82857 /* "pysam/libcbcf.pyx":4309
82858 * self.index_filename = None
82859 *
82860 * self.drop_samples = bool(drop_samples) # <<<<<<<<<<<<<<
82861 * self.header = None
82862 *
82863 */
82864 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_drop_samples); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4309, __pyx_L1_error)
82865 __pyx_v_self->drop_samples = (!(!__pyx_t_1));
82866
82867 /* "pysam/libcbcf.pyx":4310
82868 *
82869 * self.drop_samples = bool(drop_samples)
82870 * self.header = None # <<<<<<<<<<<<<<
82871 *
82872 * self.header_written = False
82873 */
82874 __Pyx_INCREF(Py_None);
82875 __Pyx_GIVEREF(Py_None);
82876 __Pyx_GOTREF((PyObject *)__pyx_v_self->header);
82877 __Pyx_DECREF((PyObject *)__pyx_v_self->header);
82878 __pyx_v_self->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None);
82879
82880 /* "pysam/libcbcf.pyx":4312
82881 * self.header = None
82882 *
82883 * self.header_written = False # <<<<<<<<<<<<<<
82884 *
82885 * if mode.startswith(b'w'):
82886 */
82887 __pyx_v_self->header_written = 0;
82888
82889 /* "pysam/libcbcf.pyx":4314
82890 * self.header_written = False
82891 *
82892 * if mode.startswith(b'w'): # <<<<<<<<<<<<<<
82893 * # open file for writing
82894 * if index_filename is not None:
82895 */
82896 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mode, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4314, __pyx_L1_error)
82897 __Pyx_GOTREF(__pyx_t_5);
82898 __pyx_t_4 = NULL;
82899 __pyx_t_6 = 0;
82900 #if CYTHON_UNPACK_METHODS
82901 if (likely(PyMethod_Check(__pyx_t_5))) {
82902 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
82903 if (likely(__pyx_t_4)) {
82904 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82905 __Pyx_INCREF(__pyx_t_4);
82906 __Pyx_INCREF(function);
82907 __Pyx_DECREF_SET(__pyx_t_5, function);
82908 __pyx_t_6 = 1;
82909 }
82910 }
82911 #endif
82912 {
82913 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_n_b_w};
82914 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
82915 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
82916 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4314, __pyx_L1_error)
82917 __Pyx_GOTREF(__pyx_t_2);
82918 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82919 }
82920 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4314, __pyx_L1_error)
82921 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82922 if (__pyx_t_1) {
82923
82924 /* "pysam/libcbcf.pyx":4316
82925 * if mode.startswith(b'w'):
82926 * # open file for writing
82927 * if index_filename is not None: # <<<<<<<<<<<<<<
82928 * raise ValueError('Cannot specify an index filename when writing a VCF/BCF file')
82929 *
82930 */
82931 __pyx_t_1 = (__pyx_v_index_filename != Py_None);
82932 if (unlikely(__pyx_t_1)) {
82933
82934 /* "pysam/libcbcf.pyx":4317
82935 * # open file for writing
82936 * if index_filename is not None:
82937 * raise ValueError('Cannot specify an index filename when writing a VCF/BCF file') # <<<<<<<<<<<<<<
82938 *
82939 * # header structure (used for writing)
82940 */
82941 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__242, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4317, __pyx_L1_error)
82942 __Pyx_GOTREF(__pyx_t_2);
82943 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
82944 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82945 __PYX_ERR(0, 4317, __pyx_L1_error)
82946
82947 /* "pysam/libcbcf.pyx":4316
82948 * if mode.startswith(b'w'):
82949 * # open file for writing
82950 * if index_filename is not None: # <<<<<<<<<<<<<<
82951 * raise ValueError('Cannot specify an index filename when writing a VCF/BCF file')
82952 *
82953 */
82954 }
82955
82956 /* "pysam/libcbcf.pyx":4320
82957 *
82958 * # header structure (used for writing)
82959 * if header: # <<<<<<<<<<<<<<
82960 * self.header = header.copy()
82961 * else:
82962 */
82963 __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_header)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4320, __pyx_L1_error)
82964 if (__pyx_t_1) {
82965
82966 /* "pysam/libcbcf.pyx":4321
82967 * # header structure (used for writing)
82968 * if header:
82969 * self.header = header.copy() # <<<<<<<<<<<<<<
82970 * else:
82971 * self.header = VariantHeader()
82972 */
82973 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_header), __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4321, __pyx_L1_error)
82974 __Pyx_GOTREF(__pyx_t_5);
82975 __pyx_t_4 = NULL;
82976 __pyx_t_6 = 0;
82977 #if CYTHON_UNPACK_METHODS
82978 if (likely(PyMethod_Check(__pyx_t_5))) {
82979 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
82980 if (likely(__pyx_t_4)) {
82981 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82982 __Pyx_INCREF(__pyx_t_4);
82983 __Pyx_INCREF(function);
82984 __Pyx_DECREF_SET(__pyx_t_5, function);
82985 __pyx_t_6 = 1;
82986 }
82987 }
82988 #endif
82989 {
82990 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
82991 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
82992 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
82993 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4321, __pyx_L1_error)
82994 __Pyx_GOTREF(__pyx_t_2);
82995 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82996 }
82997 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5pysam_7libcbcf_VariantHeader))))) __PYX_ERR(0, 4321, __pyx_L1_error)
82998 __Pyx_GIVEREF(__pyx_t_2);
82999 __Pyx_GOTREF((PyObject *)__pyx_v_self->header);
83000 __Pyx_DECREF((PyObject *)__pyx_v_self->header);
83001 __pyx_v_self->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_2);
83002 __pyx_t_2 = 0;
83003
83004 /* "pysam/libcbcf.pyx":4320
83005 *
83006 * # header structure (used for writing)
83007 * if header: # <<<<<<<<<<<<<<
83008 * self.header = header.copy()
83009 * else:
83010 */
83011 goto __pyx_L44;
83012 }
83013
83014 /* "pysam/libcbcf.pyx":4323
83015 * self.header = header.copy()
83016 * else:
83017 * self.header = VariantHeader() # <<<<<<<<<<<<<<
83018 * #raise ValueError('a VariantHeader must be specified')
83019 *
83020 */
83021 /*else*/ {
83022 __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4323, __pyx_L1_error)
83023 __Pyx_GOTREF(__pyx_t_2);
83024 __Pyx_GIVEREF(__pyx_t_2);
83025 __Pyx_GOTREF((PyObject *)__pyx_v_self->header);
83026 __Pyx_DECREF((PyObject *)__pyx_v_self->header);
83027 __pyx_v_self->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_2);
83028 __pyx_t_2 = 0;
83029 }
83030 __pyx_L44:;
83031
83032 /* "pysam/libcbcf.pyx":4327
83033 *
83034 * # Header is not written until the first write or on close
83035 * self.htsfile = self._open_htsfile() # <<<<<<<<<<<<<<
83036 *
83037 * if not self.htsfile:
83038 */
83039 __pyx_t_16 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._open_htsfile(((struct __pyx_obj_5pysam_10libchtslib_HTSFile *)__pyx_v_self)); if (unlikely(__pyx_t_16 == ((htsFile *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 4327, __pyx_L1_error)
83040 __pyx_v_self->__pyx_base.htsfile = __pyx_t_16;
83041
83042 /* "pysam/libcbcf.pyx":4329
83043 * self.htsfile = self._open_htsfile()
83044 *
83045 * if not self.htsfile: # <<<<<<<<<<<<<<
83046 * raise ValueError("could not open file `{}` (mode='{}')".format(filename, mode))
83047 *
83048 */
83049 __pyx_t_1 = (!(__pyx_v_self->__pyx_base.htsfile != 0));
83050 if (unlikely(__pyx_t_1)) {
83051
83052 /* "pysam/libcbcf.pyx":4330
83053 *
83054 * if not self.htsfile:
83055 * raise ValueError("could not open file `{}` (mode='{}')".format(filename, mode)) # <<<<<<<<<<<<<<
83056 *
83057 * elif mode.startswith(b'r'):
83058 */
83059 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_open_file_mode, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4330, __pyx_L1_error)
83060 __Pyx_GOTREF(__pyx_t_5);
83061 __pyx_t_4 = NULL;
83062 __pyx_t_6 = 0;
83063 #if CYTHON_UNPACK_METHODS
83064 if (likely(PyMethod_Check(__pyx_t_5))) {
83065 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
83066 if (likely(__pyx_t_4)) {
83067 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
83068 __Pyx_INCREF(__pyx_t_4);
83069 __Pyx_INCREF(function);
83070 __Pyx_DECREF_SET(__pyx_t_5, function);
83071 __pyx_t_6 = 1;
83072 }
83073 }
83074 #endif
83075 {
83076 PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_filename, __pyx_v_mode};
83077 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
83078 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
83079 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4330, __pyx_L1_error)
83080 __Pyx_GOTREF(__pyx_t_2);
83081 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
83082 }
83083 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4330, __pyx_L1_error)
83084 __Pyx_GOTREF(__pyx_t_5);
83085 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
83086 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
83087 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
83088 __PYX_ERR(0, 4330, __pyx_L1_error)
83089
83090 /* "pysam/libcbcf.pyx":4329
83091 * self.htsfile = self._open_htsfile()
83092 *
83093 * if not self.htsfile: # <<<<<<<<<<<<<<
83094 * raise ValueError("could not open file `{}` (mode='{}')".format(filename, mode))
83095 *
83096 */
83097 }
83098
83099 /* "pysam/libcbcf.pyx":4314
83100 * self.header_written = False
83101 *
83102 * if mode.startswith(b'w'): # <<<<<<<<<<<<<<
83103 * # open file for writing
83104 * if index_filename is not None:
83105 */
83106 goto __pyx_L42;
83107 }
83108
83109 /* "pysam/libcbcf.pyx":4332
83110 * raise ValueError("could not open file `{}` (mode='{}')".format(filename, mode))
83111 *
83112 * elif mode.startswith(b'r'): # <<<<<<<<<<<<<<
83113 * # open file for reading
83114 * self.htsfile = self._open_htsfile()
83115 */
83116 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mode, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4332, __pyx_L1_error)
83117 __Pyx_GOTREF(__pyx_t_2);
83118 __pyx_t_4 = NULL;
83119 __pyx_t_6 = 0;
83120 #if CYTHON_UNPACK_METHODS
83121 if (likely(PyMethod_Check(__pyx_t_2))) {
83122 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
83123 if (likely(__pyx_t_4)) {
83124 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
83125 __Pyx_INCREF(__pyx_t_4);
83126 __Pyx_INCREF(function);
83127 __Pyx_DECREF_SET(__pyx_t_2, function);
83128 __pyx_t_6 = 1;
83129 }
83130 }
83131 #endif
83132 {
83133 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_n_b_r};
83134 __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
83135 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
83136 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4332, __pyx_L1_error)
83137 __Pyx_GOTREF(__pyx_t_5);
83138 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
83139 }
83140 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4332, __pyx_L1_error)
83141 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
83142 if (likely(__pyx_t_1)) {
83143
83144 /* "pysam/libcbcf.pyx":4334
83145 * elif mode.startswith(b'r'):
83146 * # open file for reading
83147 * self.htsfile = self._open_htsfile() # <<<<<<<<<<<<<<
83148 *
83149 * if not self.htsfile:
83150 */
83151 __pyx_t_16 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantFile *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._open_htsfile(((struct __pyx_obj_5pysam_10libchtslib_HTSFile *)__pyx_v_self)); if (unlikely(__pyx_t_16 == ((htsFile *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 4334, __pyx_L1_error)
83152 __pyx_v_self->__pyx_base.htsfile = __pyx_t_16;
83153
83154 /* "pysam/libcbcf.pyx":4336
83155 * self.htsfile = self._open_htsfile()
83156 *
83157 * if not self.htsfile: # <<<<<<<<<<<<<<
83158 * if errno:
83159 * raise IOError(errno, 'could not open variant file `{}`: {}'.format(filename, force_str(strerror(errno))))
83160 */
83161 __pyx_t_1 = (!(__pyx_v_self->__pyx_base.htsfile != 0));
83162 if (__pyx_t_1) {
83163
83164 /* "pysam/libcbcf.pyx":4337
83165 *
83166 * if not self.htsfile:
83167 * if errno: # <<<<<<<<<<<<<<
83168 * raise IOError(errno, 'could not open variant file `{}`: {}'.format(filename, force_str(strerror(errno))))
83169 * else:
83170 */
83171 __pyx_t_1 = (errno != 0);
83172 if (unlikely(__pyx_t_1)) {
83173
83174 /* "pysam/libcbcf.pyx":4338
83175 * if not self.htsfile:
83176 * if errno:
83177 * raise IOError(errno, 'could not open variant file `{}`: {}'.format(filename, force_str(strerror(errno)))) # <<<<<<<<<<<<<<
83178 * else:
83179 * raise ValueError('could not open variant file `{}`'.format(filename))
83180 */
83181 __pyx_t_5 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4338, __pyx_L1_error)
83182 __Pyx_GOTREF(__pyx_t_5);
83183 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_open_variant_file, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4338, __pyx_L1_error)
83184 __Pyx_GOTREF(__pyx_t_4);
83185 __pyx_t_10 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4338, __pyx_L1_error)
83186 __Pyx_GOTREF(__pyx_t_10);
83187 __pyx_t_17 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_10, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4338, __pyx_L1_error)
83188 __Pyx_GOTREF(__pyx_t_17);
83189 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
83190 __pyx_t_10 = NULL;
83191 __pyx_t_6 = 0;
83192 #if CYTHON_UNPACK_METHODS
83193 if (likely(PyMethod_Check(__pyx_t_4))) {
83194 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
83195 if (likely(__pyx_t_10)) {
83196 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
83197 __Pyx_INCREF(__pyx_t_10);
83198 __Pyx_INCREF(function);
83199 __Pyx_DECREF_SET(__pyx_t_4, function);
83200 __pyx_t_6 = 1;
83201 }
83202 }
83203 #endif
83204 {
83205 PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_filename, __pyx_t_17};
83206 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
83207 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
83208 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
83209 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4338, __pyx_L1_error)
83210 __Pyx_GOTREF(__pyx_t_2);
83211 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
83212 }
83213 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4338, __pyx_L1_error)
83214 __Pyx_GOTREF(__pyx_t_4);
83215 __Pyx_GIVEREF(__pyx_t_5);
83216 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 4338, __pyx_L1_error);
83217 __Pyx_GIVEREF(__pyx_t_2);
83218 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 4338, __pyx_L1_error);
83219 __pyx_t_5 = 0;
83220 __pyx_t_2 = 0;
83221 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4338, __pyx_L1_error)
83222 __Pyx_GOTREF(__pyx_t_2);
83223 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
83224 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
83225 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
83226 __PYX_ERR(0, 4338, __pyx_L1_error)
83227
83228 /* "pysam/libcbcf.pyx":4337
83229 *
83230 * if not self.htsfile:
83231 * if errno: # <<<<<<<<<<<<<<
83232 * raise IOError(errno, 'could not open variant file `{}`: {}'.format(filename, force_str(strerror(errno))))
83233 * else:
83234 */
83235 }
83236
83237 /* "pysam/libcbcf.pyx":4340
83238 * raise IOError(errno, 'could not open variant file `{}`: {}'.format(filename, force_str(strerror(errno))))
83239 * else:
83240 * raise ValueError('could not open variant file `{}`'.format(filename)) # <<<<<<<<<<<<<<
83241 *
83242 * if self.htsfile.format.format not in (bcf, vcf):
83243 */
83244 /*else*/ {
83245 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_open_variant_file_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4340, __pyx_L1_error)
83246 __Pyx_GOTREF(__pyx_t_4);
83247 __pyx_t_5 = NULL;
83248 __pyx_t_6 = 0;
83249 #if CYTHON_UNPACK_METHODS
83250 if (likely(PyMethod_Check(__pyx_t_4))) {
83251 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
83252 if (likely(__pyx_t_5)) {
83253 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
83254 __Pyx_INCREF(__pyx_t_5);
83255 __Pyx_INCREF(function);
83256 __Pyx_DECREF_SET(__pyx_t_4, function);
83257 __pyx_t_6 = 1;
83258 }
83259 }
83260 #endif
83261 {
83262 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_filename};
83263 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
83264 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
83265 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4340, __pyx_L1_error)
83266 __Pyx_GOTREF(__pyx_t_2);
83267 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
83268 }
83269 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4340, __pyx_L1_error)
83270 __Pyx_GOTREF(__pyx_t_4);
83271 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
83272 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
83273 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
83274 __PYX_ERR(0, 4340, __pyx_L1_error)
83275 }
83276
83277 /* "pysam/libcbcf.pyx":4336
83278 * self.htsfile = self._open_htsfile()
83279 *
83280 * if not self.htsfile: # <<<<<<<<<<<<<<
83281 * if errno:
83282 * raise IOError(errno, 'could not open variant file `{}`: {}'.format(filename, force_str(strerror(errno))))
83283 */
83284 }
83285
83286 /* "pysam/libcbcf.pyx":4342
83287 * raise ValueError('could not open variant file `{}`'.format(filename))
83288 *
83289 * if self.htsfile.format.format not in (bcf, vcf): # <<<<<<<<<<<<<<
83290 * raise ValueError('invalid file `{}` (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode))
83291 *
83292 */
83293 switch (__pyx_v_self->__pyx_base.htsfile->format.format) {
83294 case bcf:
83295 case vcf:
83296 __pyx_t_1 = 0;
83297 break;
83298 default:
83299 __pyx_t_1 = 1;
83300 break;
83301 }
83302 __pyx_t_7 = __pyx_t_1;
83303 if (unlikely(__pyx_t_7)) {
83304
83305 /* "pysam/libcbcf.pyx":4343
83306 *
83307 * if self.htsfile.format.format not in (bcf, vcf):
83308 * raise ValueError('invalid file `{}` (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode)) # <<<<<<<<<<<<<<
83309 *
83310 * self.check_truncation(ignore_truncation)
83311 */
83312 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_file_mode_is_it_VCF_BCF, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4343, __pyx_L1_error)
83313 __Pyx_GOTREF(__pyx_t_2);
83314 __pyx_t_5 = NULL;
83315 __pyx_t_6 = 0;
83316 #if CYTHON_UNPACK_METHODS
83317 if (likely(PyMethod_Check(__pyx_t_2))) {
83318 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
83319 if (likely(__pyx_t_5)) {
83320 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
83321 __Pyx_INCREF(__pyx_t_5);
83322 __Pyx_INCREF(function);
83323 __Pyx_DECREF_SET(__pyx_t_2, function);
83324 __pyx_t_6 = 1;
83325 }
83326 }
83327 #endif
83328 {
83329 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_filename, __pyx_v_mode};
83330 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
83331 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
83332 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4343, __pyx_L1_error)
83333 __Pyx_GOTREF(__pyx_t_4);
83334 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
83335 }
83336 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4343, __pyx_L1_error)
83337 __Pyx_GOTREF(__pyx_t_2);
83338 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
83339 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
83340 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
83341 __PYX_ERR(0, 4343, __pyx_L1_error)
83342
83343 /* "pysam/libcbcf.pyx":4342
83344 * raise ValueError('could not open variant file `{}`'.format(filename))
83345 *
83346 * if self.htsfile.format.format not in (bcf, vcf): # <<<<<<<<<<<<<<
83347 * raise ValueError('invalid file `{}` (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode))
83348 *
83349 */
83350 }
83351
83352 /* "pysam/libcbcf.pyx":4345
83353 * raise ValueError('invalid file `{}` (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode))
83354 *
83355 * self.check_truncation(ignore_truncation) # <<<<<<<<<<<<<<
83356 *
83357 * with nogil:
83358 */
83359 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_truncation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4345, __pyx_L1_error)
83360 __Pyx_GOTREF(__pyx_t_4);
83361 __pyx_t_5 = NULL;
83362 __pyx_t_6 = 0;
83363 #if CYTHON_UNPACK_METHODS
83364 if (likely(PyMethod_Check(__pyx_t_4))) {
83365 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
83366 if (likely(__pyx_t_5)) {
83367 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
83368 __Pyx_INCREF(__pyx_t_5);
83369 __Pyx_INCREF(function);
83370 __Pyx_DECREF_SET(__pyx_t_4, function);
83371 __pyx_t_6 = 1;
83372 }
83373 }
83374 #endif
83375 {
83376 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_ignore_truncation};
83377 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
83378 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
83379 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4345, __pyx_L1_error)
83380 __Pyx_GOTREF(__pyx_t_2);
83381 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
83382 }
83383 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
83384
83385 /* "pysam/libcbcf.pyx":4347
83386 * self.check_truncation(ignore_truncation)
83387 *
83388 * with nogil: # <<<<<<<<<<<<<<
83389 * hdr = bcf_hdr_read(self.htsfile)
83390 *
83391 */
83392 {
83393 #ifdef WITH_THREAD
83394 PyThreadState *_save;
83395 _save = NULL;
83396 Py_UNBLOCK_THREADS
83397 __Pyx_FastGIL_Remember();
83398 #endif
83399 /*try:*/ {
83400
83401 /* "pysam/libcbcf.pyx":4348
83402 *
83403 * with nogil:
83404 * hdr = bcf_hdr_read(self.htsfile) # <<<<<<<<<<<<<<
83405 *
83406 * try:
83407 */
83408 __pyx_v_hdr = bcf_hdr_read(__pyx_v_self->__pyx_base.htsfile);
83409 }
83410
83411 /* "pysam/libcbcf.pyx":4347
83412 * self.check_truncation(ignore_truncation)
83413 *
83414 * with nogil: # <<<<<<<<<<<<<<
83415 * hdr = bcf_hdr_read(self.htsfile)
83416 *
83417 */
83418 /*finally:*/ {
83419 /*normal exit:*/{
83420 #ifdef WITH_THREAD
83421 __Pyx_FastGIL_Forget();
83422 Py_BLOCK_THREADS
83423 #endif
83424 goto __pyx_L51;
83425 }
83426 __pyx_L51:;
83427 }
83428 }
83429
83430 /* "pysam/libcbcf.pyx":4350
83431 * hdr = bcf_hdr_read(self.htsfile)
83432 *
83433 * try: # <<<<<<<<<<<<<<
83434 * self.header = makeVariantHeader(hdr)
83435 * except ValueError:
83436 */
83437 {
83438 __Pyx_PyThreadState_declare
83439 __Pyx_PyThreadState_assign
83440 __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
83441 __Pyx_XGOTREF(__pyx_t_13);
83442 __Pyx_XGOTREF(__pyx_t_12);
83443 __Pyx_XGOTREF(__pyx_t_11);
83444 /*try:*/ {
83445
83446 /* "pysam/libcbcf.pyx":4351
83447 *
83448 * try:
83449 * self.header = makeVariantHeader(hdr) # <<<<<<<<<<<<<<
83450 * except ValueError:
83451 * raise ValueError('file `{}` does not have valid header (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode))
83452 */
83453 __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeVariantHeader(__pyx_v_hdr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4351, __pyx_L52_error)
83454 __Pyx_GOTREF(__pyx_t_2);
83455 __Pyx_GIVEREF(__pyx_t_2);
83456 __Pyx_GOTREF((PyObject *)__pyx_v_self->header);
83457 __Pyx_DECREF((PyObject *)__pyx_v_self->header);
83458 __pyx_v_self->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_2);
83459 __pyx_t_2 = 0;
83460
83461 /* "pysam/libcbcf.pyx":4350
83462 * hdr = bcf_hdr_read(self.htsfile)
83463 *
83464 * try: # <<<<<<<<<<<<<<
83465 * self.header = makeVariantHeader(hdr)
83466 * except ValueError:
83467 */
83468 }
83469 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
83470 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
83471 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
83472 goto __pyx_L57_try_end;
83473 __pyx_L52_error:;
83474 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
83475 __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
83476 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
83477 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
83478 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
83479
83480 /* "pysam/libcbcf.pyx":4352
83481 * try:
83482 * self.header = makeVariantHeader(hdr)
83483 * except ValueError: # <<<<<<<<<<<<<<
83484 * raise ValueError('file `{}` does not have valid header (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode))
83485 *
83486 */
83487 __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
83488 if (__pyx_t_15) {
83489 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
83490 if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 4352, __pyx_L54_except_error)
83491 __Pyx_XGOTREF(__pyx_t_2);
83492 __Pyx_XGOTREF(__pyx_t_4);
83493 __Pyx_XGOTREF(__pyx_t_5);
83494
83495 /* "pysam/libcbcf.pyx":4353
83496 * self.header = makeVariantHeader(hdr)
83497 * except ValueError:
83498 * raise ValueError('file `{}` does not have valid header (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode)) # <<<<<<<<<<<<<<
83499 *
83500 * if isinstance(self.filename, bytes):
83501 */
83502 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_file_does_not_have_valid_header, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4353, __pyx_L54_except_error)
83503 __Pyx_GOTREF(__pyx_t_10);
83504 __pyx_t_18 = NULL;
83505 __pyx_t_6 = 0;
83506 #if CYTHON_UNPACK_METHODS
83507 if (likely(PyMethod_Check(__pyx_t_10))) {
83508 __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_10);
83509 if (likely(__pyx_t_18)) {
83510 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
83511 __Pyx_INCREF(__pyx_t_18);
83512 __Pyx_INCREF(function);
83513 __Pyx_DECREF_SET(__pyx_t_10, function);
83514 __pyx_t_6 = 1;
83515 }
83516 }
83517 #endif
83518 {
83519 PyObject *__pyx_callargs[3] = {__pyx_t_18, __pyx_v_filename, __pyx_v_mode};
83520 __pyx_t_17 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
83521 __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
83522 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4353, __pyx_L54_except_error)
83523 __Pyx_GOTREF(__pyx_t_17);
83524 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
83525 }
83526 __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4353, __pyx_L54_except_error)
83527 __Pyx_GOTREF(__pyx_t_10);
83528 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
83529 __Pyx_Raise(__pyx_t_10, 0, 0, 0);
83530 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
83531 __PYX_ERR(0, 4353, __pyx_L54_except_error)
83532 }
83533 goto __pyx_L54_except_error;
83534
83535 /* "pysam/libcbcf.pyx":4350
83536 * hdr = bcf_hdr_read(self.htsfile)
83537 *
83538 * try: # <<<<<<<<<<<<<<
83539 * self.header = makeVariantHeader(hdr)
83540 * except ValueError:
83541 */
83542 __pyx_L54_except_error:;
83543 __Pyx_XGIVEREF(__pyx_t_13);
83544 __Pyx_XGIVEREF(__pyx_t_12);
83545 __Pyx_XGIVEREF(__pyx_t_11);
83546 __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
83547 goto __pyx_L1_error;
83548 __pyx_L57_try_end:;
83549 }
83550
83551 /* "pysam/libcbcf.pyx":4355
83552 * raise ValueError('file `{}` does not have valid header (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode))
83553 *
83554 * if isinstance(self.filename, bytes): # <<<<<<<<<<<<<<
83555 * cfilename = self.filename
83556 * else:
83557 */
83558 __pyx_t_5 = __pyx_v_self->__pyx_base.filename;
83559 __Pyx_INCREF(__pyx_t_5);
83560 __pyx_t_7 = PyBytes_Check(__pyx_t_5);
83561 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
83562 if (__pyx_t_7) {
83563
83564 /* "pysam/libcbcf.pyx":4356
83565 *
83566 * if isinstance(self.filename, bytes):
83567 * cfilename = self.filename # <<<<<<<<<<<<<<
83568 * else:
83569 * cfilename = NULL
83570 */
83571 __pyx_t_19 = __Pyx_PyObject_AsWritableString(__pyx_v_self->__pyx_base.filename); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) __PYX_ERR(0, 4356, __pyx_L1_error)
83572 __pyx_v_cfilename = __pyx_t_19;
83573
83574 /* "pysam/libcbcf.pyx":4355
83575 * raise ValueError('file `{}` does not have valid header (mode=`{}`) - is it VCF/BCF format?'.format(filename, mode))
83576 *
83577 * if isinstance(self.filename, bytes): # <<<<<<<<<<<<<<
83578 * cfilename = self.filename
83579 * else:
83580 */
83581 goto __pyx_L60;
83582 }
83583
83584 /* "pysam/libcbcf.pyx":4358
83585 * cfilename = self.filename
83586 * else:
83587 * cfilename = NULL # <<<<<<<<<<<<<<
83588 *
83589 * # check for index and open if present
83590 */
83591 /*else*/ {
83592 __pyx_v_cfilename = NULL;
83593 }
83594 __pyx_L60:;
83595
83596 /* "pysam/libcbcf.pyx":4361
83597 *
83598 * # check for index and open if present
83599 * if self.htsfile.format.format == bcf and cfilename: # <<<<<<<<<<<<<<
83600 * if index_filename is not None:
83601 * cindex_filename = index_filename
83602 */
83603 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile->format.format == bcf);
83604 if (__pyx_t_1) {
83605 } else {
83606 __pyx_t_7 = __pyx_t_1;
83607 goto __pyx_L62_bool_binop_done;
83608 }
83609 __pyx_t_1 = (__pyx_v_cfilename != 0);
83610 __pyx_t_7 = __pyx_t_1;
83611 __pyx_L62_bool_binop_done:;
83612 if (__pyx_t_7) {
83613
83614 /* "pysam/libcbcf.pyx":4362
83615 * # check for index and open if present
83616 * if self.htsfile.format.format == bcf and cfilename:
83617 * if index_filename is not None: # <<<<<<<<<<<<<<
83618 * cindex_filename = index_filename
83619 * with nogil:
83620 */
83621 __pyx_t_7 = (__pyx_v_index_filename != Py_None);
83622 if (__pyx_t_7) {
83623
83624 /* "pysam/libcbcf.pyx":4363
83625 * if self.htsfile.format.format == bcf and cfilename:
83626 * if index_filename is not None:
83627 * cindex_filename = index_filename # <<<<<<<<<<<<<<
83628 * with nogil:
83629 * idx = bcf_index_load2(cfilename, cindex_filename)
83630 */
83631 __pyx_t_19 = __Pyx_PyObject_AsWritableString(__pyx_v_index_filename); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) __PYX_ERR(0, 4363, __pyx_L1_error)
83632 __pyx_v_cindex_filename = __pyx_t_19;
83633
83634 /* "pysam/libcbcf.pyx":4362
83635 * # check for index and open if present
83636 * if self.htsfile.format.format == bcf and cfilename:
83637 * if index_filename is not None: # <<<<<<<<<<<<<<
83638 * cindex_filename = index_filename
83639 * with nogil:
83640 */
83641 }
83642
83643 /* "pysam/libcbcf.pyx":4364
83644 * if index_filename is not None:
83645 * cindex_filename = index_filename
83646 * with nogil: # <<<<<<<<<<<<<<
83647 * idx = bcf_index_load2(cfilename, cindex_filename)
83648 * self.index = makeBCFIndex(self.header, idx)
83649 */
83650 {
83651 #ifdef WITH_THREAD
83652 PyThreadState *_save;
83653 _save = NULL;
83654 Py_UNBLOCK_THREADS
83655 __Pyx_FastGIL_Remember();
83656 #endif
83657 /*try:*/ {
83658
83659 /* "pysam/libcbcf.pyx":4365
83660 * cindex_filename = index_filename
83661 * with nogil:
83662 * idx = bcf_index_load2(cfilename, cindex_filename) # <<<<<<<<<<<<<<
83663 * self.index = makeBCFIndex(self.header, idx)
83664 *
83665 */
83666 __pyx_v_idx = bcf_index_load2(__pyx_v_cfilename, __pyx_v_cindex_filename);
83667 }
83668
83669 /* "pysam/libcbcf.pyx":4364
83670 * if index_filename is not None:
83671 * cindex_filename = index_filename
83672 * with nogil: # <<<<<<<<<<<<<<
83673 * idx = bcf_index_load2(cfilename, cindex_filename)
83674 * self.index = makeBCFIndex(self.header, idx)
83675 */
83676 /*finally:*/ {
83677 /*normal exit:*/{
83678 #ifdef WITH_THREAD
83679 __Pyx_FastGIL_Forget();
83680 Py_BLOCK_THREADS
83681 #endif
83682 goto __pyx_L67;
83683 }
83684 __pyx_L67:;
83685 }
83686 }
83687
83688 /* "pysam/libcbcf.pyx":4366
83689 * with nogil:
83690 * idx = bcf_index_load2(cfilename, cindex_filename)
83691 * self.index = makeBCFIndex(self.header, idx) # <<<<<<<<<<<<<<
83692 *
83693 * elif self.htsfile.format.compression == bgzf and cfilename:
83694 */
83695 __pyx_t_5 = ((PyObject *)__pyx_v_self->header);
83696 __Pyx_INCREF(__pyx_t_5);
83697 __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeBCFIndex(((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_5), __pyx_v_idx)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4366, __pyx_L1_error)
83698 __Pyx_GOTREF(__pyx_t_4);
83699 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
83700 __Pyx_GIVEREF(__pyx_t_4);
83701 __Pyx_GOTREF((PyObject *)__pyx_v_self->index);
83702 __Pyx_DECREF((PyObject *)__pyx_v_self->index);
83703 __pyx_v_self->index = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_t_4);
83704 __pyx_t_4 = 0;
83705
83706 /* "pysam/libcbcf.pyx":4361
83707 *
83708 * # check for index and open if present
83709 * if self.htsfile.format.format == bcf and cfilename: # <<<<<<<<<<<<<<
83710 * if index_filename is not None:
83711 * cindex_filename = index_filename
83712 */
83713 goto __pyx_L61;
83714 }
83715
83716 /* "pysam/libcbcf.pyx":4368
83717 * self.index = makeBCFIndex(self.header, idx)
83718 *
83719 * elif self.htsfile.format.compression == bgzf and cfilename: # <<<<<<<<<<<<<<
83720 * if index_filename is not None:
83721 * cindex_filename = index_filename
83722 */
83723 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile->format.compression == bgzf);
83724 if (__pyx_t_1) {
83725 } else {
83726 __pyx_t_7 = __pyx_t_1;
83727 goto __pyx_L68_bool_binop_done;
83728 }
83729 __pyx_t_1 = (__pyx_v_cfilename != 0);
83730 __pyx_t_7 = __pyx_t_1;
83731 __pyx_L68_bool_binop_done:;
83732 if (__pyx_t_7) {
83733
83734 /* "pysam/libcbcf.pyx":4369
83735 *
83736 * elif self.htsfile.format.compression == bgzf and cfilename:
83737 * if index_filename is not None: # <<<<<<<<<<<<<<
83738 * cindex_filename = index_filename
83739 * with nogil:
83740 */
83741 __pyx_t_7 = (__pyx_v_index_filename != Py_None);
83742 if (__pyx_t_7) {
83743
83744 /* "pysam/libcbcf.pyx":4370
83745 * elif self.htsfile.format.compression == bgzf and cfilename:
83746 * if index_filename is not None:
83747 * cindex_filename = index_filename # <<<<<<<<<<<<<<
83748 * with nogil:
83749 * tidx = tbx_index_load2(cfilename, cindex_filename)
83750 */
83751 __pyx_t_19 = __Pyx_PyObject_AsWritableString(__pyx_v_index_filename); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) __PYX_ERR(0, 4370, __pyx_L1_error)
83752 __pyx_v_cindex_filename = __pyx_t_19;
83753
83754 /* "pysam/libcbcf.pyx":4369
83755 *
83756 * elif self.htsfile.format.compression == bgzf and cfilename:
83757 * if index_filename is not None: # <<<<<<<<<<<<<<
83758 * cindex_filename = index_filename
83759 * with nogil:
83760 */
83761 }
83762
83763 /* "pysam/libcbcf.pyx":4371
83764 * if index_filename is not None:
83765 * cindex_filename = index_filename
83766 * with nogil: # <<<<<<<<<<<<<<
83767 * tidx = tbx_index_load2(cfilename, cindex_filename)
83768 * self.index = makeTabixIndex(tidx)
83769 */
83770 {
83771 #ifdef WITH_THREAD
83772 PyThreadState *_save;
83773 _save = NULL;
83774 Py_UNBLOCK_THREADS
83775 __Pyx_FastGIL_Remember();
83776 #endif
83777 /*try:*/ {
83778
83779 /* "pysam/libcbcf.pyx":4372
83780 * cindex_filename = index_filename
83781 * with nogil:
83782 * tidx = tbx_index_load2(cfilename, cindex_filename) # <<<<<<<<<<<<<<
83783 * self.index = makeTabixIndex(tidx)
83784 *
83785 */
83786 __pyx_v_tidx = tbx_index_load2(__pyx_v_cfilename, __pyx_v_cindex_filename);
83787 }
83788
83789 /* "pysam/libcbcf.pyx":4371
83790 * if index_filename is not None:
83791 * cindex_filename = index_filename
83792 * with nogil: # <<<<<<<<<<<<<<
83793 * tidx = tbx_index_load2(cfilename, cindex_filename)
83794 * self.index = makeTabixIndex(tidx)
83795 */
83796 /*finally:*/ {
83797 /*normal exit:*/{
83798 #ifdef WITH_THREAD
83799 __Pyx_FastGIL_Forget();
83800 Py_BLOCK_THREADS
83801 #endif
83802 goto __pyx_L73;
83803 }
83804 __pyx_L73:;
83805 }
83806 }
83807
83808 /* "pysam/libcbcf.pyx":4373
83809 * with nogil:
83810 * tidx = tbx_index_load2(cfilename, cindex_filename)
83811 * self.index = makeTabixIndex(tidx) # <<<<<<<<<<<<<<
83812 *
83813 * if not self.is_stream:
83814 */
83815 __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_7libcbcf_makeTabixIndex(__pyx_v_tidx)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4373, __pyx_L1_error)
83816 __Pyx_GOTREF(__pyx_t_4);
83817 __Pyx_GIVEREF(__pyx_t_4);
83818 __Pyx_GOTREF((PyObject *)__pyx_v_self->index);
83819 __Pyx_DECREF((PyObject *)__pyx_v_self->index);
83820 __pyx_v_self->index = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_t_4);
83821 __pyx_t_4 = 0;
83822
83823 /* "pysam/libcbcf.pyx":4368
83824 * self.index = makeBCFIndex(self.header, idx)
83825 *
83826 * elif self.htsfile.format.compression == bgzf and cfilename: # <<<<<<<<<<<<<<
83827 * if index_filename is not None:
83828 * cindex_filename = index_filename
83829 */
83830 }
83831 __pyx_L61:;
83832
83833 /* "pysam/libcbcf.pyx":4375
83834 * self.index = makeTabixIndex(tidx)
83835 *
83836 * if not self.is_stream: # <<<<<<<<<<<<<<
83837 * self.start_offset = self.tell()
83838 * else:
83839 */
83840 __pyx_t_7 = (!__pyx_v_self->__pyx_base.is_stream);
83841 if (__pyx_t_7) {
83842
83843 /* "pysam/libcbcf.pyx":4376
83844 *
83845 * if not self.is_stream:
83846 * self.start_offset = self.tell() # <<<<<<<<<<<<<<
83847 * else:
83848 * raise ValueError('unknown mode {}'.format(mode))
83849 */
83850 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tell); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4376, __pyx_L1_error)
83851 __Pyx_GOTREF(__pyx_t_5);
83852 __pyx_t_2 = NULL;
83853 __pyx_t_6 = 0;
83854 #if CYTHON_UNPACK_METHODS
83855 if (likely(PyMethod_Check(__pyx_t_5))) {
83856 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
83857 if (likely(__pyx_t_2)) {
83858 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
83859 __Pyx_INCREF(__pyx_t_2);
83860 __Pyx_INCREF(function);
83861 __Pyx_DECREF_SET(__pyx_t_5, function);
83862 __pyx_t_6 = 1;
83863 }
83864 }
83865 #endif
83866 {
83867 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
83868 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
83869 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
83870 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4376, __pyx_L1_error)
83871 __Pyx_GOTREF(__pyx_t_4);
83872 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
83873 }
83874 __pyx_t_20 = __Pyx_PyInt_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_20 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4376, __pyx_L1_error)
83875 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
83876 __pyx_v_self->__pyx_base.start_offset = __pyx_t_20;
83877
83878 /* "pysam/libcbcf.pyx":4375
83879 * self.index = makeTabixIndex(tidx)
83880 *
83881 * if not self.is_stream: # <<<<<<<<<<<<<<
83882 * self.start_offset = self.tell()
83883 * else:
83884 */
83885 }
83886
83887 /* "pysam/libcbcf.pyx":4332
83888 * raise ValueError("could not open file `{}` (mode='{}')".format(filename, mode))
83889 *
83890 * elif mode.startswith(b'r'): # <<<<<<<<<<<<<<
83891 * # open file for reading
83892 * self.htsfile = self._open_htsfile()
83893 */
83894 goto __pyx_L42;
83895 }
83896
83897 /* "pysam/libcbcf.pyx":4378
83898 * self.start_offset = self.tell()
83899 * else:
83900 * raise ValueError('unknown mode {}'.format(mode)) # <<<<<<<<<<<<<<
83901 *
83902 * def reset(self):
83903 */
83904 /*else*/ {
83905 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unknown_mode, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4378, __pyx_L1_error)
83906 __Pyx_GOTREF(__pyx_t_5);
83907 __pyx_t_2 = NULL;
83908 __pyx_t_6 = 0;
83909 #if CYTHON_UNPACK_METHODS
83910 if (likely(PyMethod_Check(__pyx_t_5))) {
83911 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
83912 if (likely(__pyx_t_2)) {
83913 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
83914 __Pyx_INCREF(__pyx_t_2);
83915 __Pyx_INCREF(function);
83916 __Pyx_DECREF_SET(__pyx_t_5, function);
83917 __pyx_t_6 = 1;
83918 }
83919 }
83920 #endif
83921 {
83922 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_mode};
83923 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
83924 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
83925 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4378, __pyx_L1_error)
83926 __Pyx_GOTREF(__pyx_t_4);
83927 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
83928 }
83929 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4378, __pyx_L1_error)
83930 __Pyx_GOTREF(__pyx_t_5);
83931 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
83932 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
83933 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
83934 __PYX_ERR(0, 4378, __pyx_L1_error)
83935 }
83936 __pyx_L42:;
83937
83938 /* "pysam/libcbcf.pyx":4235
83939 * return vars
83940 *
83941 * def open(self, filename, mode='r', # <<<<<<<<<<<<<<
83942 * index_filename=None,
83943 * VariantHeader header=None,
83944 */
83945
83946 /* function exit code */
83947 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
83948 goto __pyx_L0;
83949 __pyx_L1_error:;
83950 __Pyx_XDECREF(__pyx_t_2);
83951 __Pyx_XDECREF(__pyx_t_4);
83952 __Pyx_XDECREF(__pyx_t_5);
83953 __Pyx_XDECREF(__pyx_t_10);
83954 __Pyx_XDECREF(__pyx_t_17);
83955 __Pyx_XDECREF(__pyx_t_18);
83956 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
83957 __pyx_r = NULL;
83958 __pyx_L0:;
83959 __Pyx_XDECREF(__pyx_v_format_modes);
83960 __Pyx_XDECREF(__pyx_v_invalid_modes);
83961 __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_m);
83962 __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_m);
83963 __Pyx_XDECREF(__pyx_v_filename);
83964 __Pyx_XDECREF(__pyx_v_mode);
83965 __Pyx_XDECREF(__pyx_v_index_filename);
83966 __Pyx_XGIVEREF(__pyx_r);
83967 __Pyx_TraceReturn(__pyx_r, 0);
83968 __Pyx_RefNannyFinishContext();
83969 return __pyx_r;
83970 }
83971
83972 /* "pysam/libcbcf.pyx":4380
83973 * raise ValueError('unknown mode {}'.format(mode))
83974 *
83975 * def reset(self): # <<<<<<<<<<<<<<
83976 * """reset file position to beginning of file just after the header."""
83977 * return self.seek(self.start_offset)
83978 */
83979
83980 /* Python wrapper */
83981 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_17reset(PyObject *__pyx_v_self,
83982 #if CYTHON_METH_FASTCALL
83983 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
83984 #else
83985 PyObject *__pyx_args, PyObject *__pyx_kwds
83986 #endif
83987 ); /*proto*/
83988 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_16reset, "VariantFile.reset(self)\nreset file position to beginning of file just after the header.");
83989 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_17reset = {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_17reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_16reset};
83990 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_17reset(PyObject *__pyx_v_self,
83991 #if CYTHON_METH_FASTCALL
83992 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
83993 #else
83994 PyObject *__pyx_args, PyObject *__pyx_kwds
83995 #endif
83996 ) {
83997 #if !CYTHON_METH_FASTCALL
83998 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
83999 #endif
84000 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
84001 PyObject *__pyx_r = 0;
84002 __Pyx_RefNannyDeclarations
84003 __Pyx_RefNannySetupContext("reset (wrapper)", 0);
84004 #if !CYTHON_METH_FASTCALL
84005 #if CYTHON_ASSUME_SAFE_MACROS
84006 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
84007 #else
84008 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
84009 #endif
84010 #endif
84011 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
84012 if (unlikely(__pyx_nargs > 0)) {
84013 __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL;}
84014 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL;
84015 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_16reset(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
84016
84017 /* function exit code */
84018 __Pyx_RefNannyFinishContext();
84019 return __pyx_r;
84020 }
84021
84022 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_16reset(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
84023 PyObject *__pyx_r = NULL;
84024 __Pyx_TraceDeclarations
84025 __Pyx_RefNannyDeclarations
84026 PyObject *__pyx_t_1 = NULL;
84027 PyObject *__pyx_t_2 = NULL;
84028 PyObject *__pyx_t_3 = NULL;
84029 PyObject *__pyx_t_4 = NULL;
84030 unsigned int __pyx_t_5;
84031 int __pyx_lineno = 0;
84032 const char *__pyx_filename = NULL;
84033 int __pyx_clineno = 0;
84034 __Pyx_TraceFrameInit(__pyx_codeobj__243)
84035 __Pyx_RefNannySetupContext("reset", 1);
84036 __Pyx_TraceCall("reset", __pyx_f[0], 4380, 0, __PYX_ERR(0, 4380, __pyx_L1_error));
84037
84038 /* "pysam/libcbcf.pyx":4382
84039 * def reset(self):
84040 * """reset file position to beginning of file just after the header."""
84041 * return self.seek(self.start_offset) # <<<<<<<<<<<<<<
84042 *
84043 * def is_valid_tid(self, tid):
84044 */
84045 __Pyx_XDECREF(__pyx_r);
84046 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4382, __pyx_L1_error)
84047 __Pyx_GOTREF(__pyx_t_2);
84048 __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_self->__pyx_base.start_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4382, __pyx_L1_error)
84049 __Pyx_GOTREF(__pyx_t_3);
84050 __pyx_t_4 = NULL;
84051 __pyx_t_5 = 0;
84052 #if CYTHON_UNPACK_METHODS
84053 if (likely(PyMethod_Check(__pyx_t_2))) {
84054 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
84055 if (likely(__pyx_t_4)) {
84056 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
84057 __Pyx_INCREF(__pyx_t_4);
84058 __Pyx_INCREF(function);
84059 __Pyx_DECREF_SET(__pyx_t_2, function);
84060 __pyx_t_5 = 1;
84061 }
84062 }
84063 #endif
84064 {
84065 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
84066 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
84067 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
84068 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
84069 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4382, __pyx_L1_error)
84070 __Pyx_GOTREF(__pyx_t_1);
84071 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
84072 }
84073 __pyx_r = __pyx_t_1;
84074 __pyx_t_1 = 0;
84075 goto __pyx_L0;
84076
84077 /* "pysam/libcbcf.pyx":4380
84078 * raise ValueError('unknown mode {}'.format(mode))
84079 *
84080 * def reset(self): # <<<<<<<<<<<<<<
84081 * """reset file position to beginning of file just after the header."""
84082 * return self.seek(self.start_offset)
84083 */
84084
84085 /* function exit code */
84086 __pyx_L1_error:;
84087 __Pyx_XDECREF(__pyx_t_1);
84088 __Pyx_XDECREF(__pyx_t_2);
84089 __Pyx_XDECREF(__pyx_t_3);
84090 __Pyx_XDECREF(__pyx_t_4);
84091 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
84092 __pyx_r = NULL;
84093 __pyx_L0:;
84094 __Pyx_XGIVEREF(__pyx_r);
84095 __Pyx_TraceReturn(__pyx_r, 0);
84096 __Pyx_RefNannyFinishContext();
84097 return __pyx_r;
84098 }
84099
84100 /* "pysam/libcbcf.pyx":4384
84101 * return self.seek(self.start_offset)
84102 *
84103 * def is_valid_tid(self, tid): # <<<<<<<<<<<<<<
84104 * """
84105 * return True if the numerical :term:`tid` is valid; False otherwise.
84106 */
84107
84108 /* Python wrapper */
84109 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_19is_valid_tid(PyObject *__pyx_v_self,
84110 #if CYTHON_METH_FASTCALL
84111 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
84112 #else
84113 PyObject *__pyx_args, PyObject *__pyx_kwds
84114 #endif
84115 ); /*proto*/
84116 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_18is_valid_tid, "VariantFile.is_valid_tid(self, tid)\n\n return True if the numerical :term:`tid` is valid; False otherwise.\n\n returns -1 if reference is not known.\n ");
84117 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_19is_valid_tid = {"is_valid_tid", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_19is_valid_tid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_18is_valid_tid};
84118 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_19is_valid_tid(PyObject *__pyx_v_self,
84119 #if CYTHON_METH_FASTCALL
84120 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
84121 #else
84122 PyObject *__pyx_args, PyObject *__pyx_kwds
84123 #endif
84124 ) {
84125 PyObject *__pyx_v_tid = 0;
84126 #if !CYTHON_METH_FASTCALL
84127 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
84128 #endif
84129 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
84130 PyObject* values[1] = {0};
84131 int __pyx_lineno = 0;
84132 const char *__pyx_filename = NULL;
84133 int __pyx_clineno = 0;
84134 PyObject *__pyx_r = 0;
84135 __Pyx_RefNannyDeclarations
84136 __Pyx_RefNannySetupContext("is_valid_tid (wrapper)", 0);
84137 #if !CYTHON_METH_FASTCALL
84138 #if CYTHON_ASSUME_SAFE_MACROS
84139 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
84140 #else
84141 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
84142 #endif
84143 #endif
84144 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
84145 {
84146 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tid,0};
84147 if (__pyx_kwds) {
84148 Py_ssize_t kw_args;
84149 switch (__pyx_nargs) {
84150 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
84151 CYTHON_FALLTHROUGH;
84152 case 0: break;
84153 default: goto __pyx_L5_argtuple_error;
84154 }
84155 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
84156 switch (__pyx_nargs) {
84157 case 0:
84158 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tid)) != 0)) {
84159 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
84160 kw_args--;
84161 }
84162 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4384, __pyx_L3_error)
84163 else goto __pyx_L5_argtuple_error;
84164 }
84165 if (unlikely(kw_args > 0)) {
84166 const Py_ssize_t kwd_pos_args = __pyx_nargs;
84167 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_valid_tid") < 0)) __PYX_ERR(0, 4384, __pyx_L3_error)
84168 }
84169 } else if (unlikely(__pyx_nargs != 1)) {
84170 goto __pyx_L5_argtuple_error;
84171 } else {
84172 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
84173 }
84174 __pyx_v_tid = values[0];
84175 }
84176 goto __pyx_L6_skip;
84177 __pyx_L5_argtuple_error:;
84178 __Pyx_RaiseArgtupleInvalid("is_valid_tid", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4384, __pyx_L3_error)
84179 __pyx_L6_skip:;
84180 goto __pyx_L4_argument_unpacking_done;
84181 __pyx_L3_error:;
84182 {
84183 Py_ssize_t __pyx_temp;
84184 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
84185 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
84186 }
84187 }
84188 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.is_valid_tid", __pyx_clineno, __pyx_lineno, __pyx_filename);
84189 __Pyx_RefNannyFinishContext();
84190 return NULL;
84191 __pyx_L4_argument_unpacking_done:;
84192 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_18is_valid_tid(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_tid);
84193
84194 /* function exit code */
84195 {
84196 Py_ssize_t __pyx_temp;
84197 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
84198 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
84199 }
84200 }
84201 __Pyx_RefNannyFinishContext();
84202 return __pyx_r;
84203 }
84204
84205 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_18is_valid_tid(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_tid) {
84206 bcf_hdr_t *__pyx_v_hdr;
84207 int __pyx_v_rid;
84208 PyObject *__pyx_r = NULL;
84209 __Pyx_TraceDeclarations
84210 __Pyx_RefNannyDeclarations
84211 PyObject *__pyx_t_1 = NULL;
84212 int __pyx_t_2;
84213 int __pyx_t_3;
84214 bcf_hdr_t *__pyx_t_4;
84215 int __pyx_t_5;
84216 int __pyx_lineno = 0;
84217 const char *__pyx_filename = NULL;
84218 int __pyx_clineno = 0;
84219 __Pyx_TraceFrameInit(__pyx_codeobj__244)
84220 __Pyx_RefNannySetupContext("is_valid_tid", 1);
84221 __Pyx_TraceCall("is_valid_tid", __pyx_f[0], 4384, 0, __PYX_ERR(0, 4384, __pyx_L1_error));
84222
84223 /* "pysam/libcbcf.pyx":4390
84224 * returns -1 if reference is not known.
84225 * """
84226 * if not self.is_open: # <<<<<<<<<<<<<<
84227 * raise ValueError('I/O operation on closed file')
84228 *
84229 */
84230 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4390, __pyx_L1_error)
84231 __Pyx_GOTREF(__pyx_t_1);
84232 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4390, __pyx_L1_error)
84233 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
84234 __pyx_t_3 = (!__pyx_t_2);
84235 if (unlikely(__pyx_t_3)) {
84236
84237 /* "pysam/libcbcf.pyx":4391
84238 * """
84239 * if not self.is_open:
84240 * raise ValueError('I/O operation on closed file') # <<<<<<<<<<<<<<
84241 *
84242 * cdef bcf_hdr_t *hdr = self.header.ptr
84243 */
84244 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4391, __pyx_L1_error)
84245 __Pyx_GOTREF(__pyx_t_1);
84246 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
84247 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
84248 __PYX_ERR(0, 4391, __pyx_L1_error)
84249
84250 /* "pysam/libcbcf.pyx":4390
84251 * returns -1 if reference is not known.
84252 * """
84253 * if not self.is_open: # <<<<<<<<<<<<<<
84254 * raise ValueError('I/O operation on closed file')
84255 *
84256 */
84257 }
84258
84259 /* "pysam/libcbcf.pyx":4393
84260 * raise ValueError('I/O operation on closed file')
84261 *
84262 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
84263 * cdef int rid = tid
84264 * return 0 <= rid < hdr.n[BCF_DT_CTG]
84265 */
84266 __pyx_t_4 = __pyx_v_self->header->ptr;
84267 __pyx_v_hdr = __pyx_t_4;
84268
84269 /* "pysam/libcbcf.pyx":4394
84270 *
84271 * cdef bcf_hdr_t *hdr = self.header.ptr
84272 * cdef int rid = tid # <<<<<<<<<<<<<<
84273 * return 0 <= rid < hdr.n[BCF_DT_CTG]
84274 *
84275 */
84276 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_tid); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4394, __pyx_L1_error)
84277 __pyx_v_rid = __pyx_t_5;
84278
84279 /* "pysam/libcbcf.pyx":4395
84280 * cdef bcf_hdr_t *hdr = self.header.ptr
84281 * cdef int rid = tid
84282 * return 0 <= rid < hdr.n[BCF_DT_CTG] # <<<<<<<<<<<<<<
84283 *
84284 * def get_tid(self, reference):
84285 */
84286 __Pyx_XDECREF(__pyx_r);
84287 __pyx_t_3 = (0 <= __pyx_v_rid);
84288 if (__pyx_t_3) {
84289 __pyx_t_3 = (__pyx_v_rid < (__pyx_v_hdr->n[BCF_DT_CTG]));
84290 }
84291 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4395, __pyx_L1_error)
84292 __Pyx_GOTREF(__pyx_t_1);
84293 __pyx_r = __pyx_t_1;
84294 __pyx_t_1 = 0;
84295 goto __pyx_L0;
84296
84297 /* "pysam/libcbcf.pyx":4384
84298 * return self.seek(self.start_offset)
84299 *
84300 * def is_valid_tid(self, tid): # <<<<<<<<<<<<<<
84301 * """
84302 * return True if the numerical :term:`tid` is valid; False otherwise.
84303 */
84304
84305 /* function exit code */
84306 __pyx_L1_error:;
84307 __Pyx_XDECREF(__pyx_t_1);
84308 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.is_valid_tid", __pyx_clineno, __pyx_lineno, __pyx_filename);
84309 __pyx_r = NULL;
84310 __pyx_L0:;
84311 __Pyx_XGIVEREF(__pyx_r);
84312 __Pyx_TraceReturn(__pyx_r, 0);
84313 __Pyx_RefNannyFinishContext();
84314 return __pyx_r;
84315 }
84316
84317 /* "pysam/libcbcf.pyx":4397
84318 * return 0 <= rid < hdr.n[BCF_DT_CTG]
84319 *
84320 * def get_tid(self, reference): # <<<<<<<<<<<<<<
84321 * """
84322 * return the numerical :term:`tid` corresponding to
84323 */
84324
84325 /* Python wrapper */
84326 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_21get_tid(PyObject *__pyx_v_self,
84327 #if CYTHON_METH_FASTCALL
84328 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
84329 #else
84330 PyObject *__pyx_args, PyObject *__pyx_kwds
84331 #endif
84332 ); /*proto*/
84333 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_20get_tid, "VariantFile.get_tid(self, reference)\n\n return the numerical :term:`tid` corresponding to\n :term:`reference`\n\n returns -1 if reference is not known.\n ");
84334 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_21get_tid = {"get_tid", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_21get_tid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_20get_tid};
84335 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_21get_tid(PyObject *__pyx_v_self,
84336 #if CYTHON_METH_FASTCALL
84337 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
84338 #else
84339 PyObject *__pyx_args, PyObject *__pyx_kwds
84340 #endif
84341 ) {
84342 PyObject *__pyx_v_reference = 0;
84343 #if !CYTHON_METH_FASTCALL
84344 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
84345 #endif
84346 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
84347 PyObject* values[1] = {0};
84348 int __pyx_lineno = 0;
84349 const char *__pyx_filename = NULL;
84350 int __pyx_clineno = 0;
84351 PyObject *__pyx_r = 0;
84352 __Pyx_RefNannyDeclarations
84353 __Pyx_RefNannySetupContext("get_tid (wrapper)", 0);
84354 #if !CYTHON_METH_FASTCALL
84355 #if CYTHON_ASSUME_SAFE_MACROS
84356 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
84357 #else
84358 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
84359 #endif
84360 #endif
84361 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
84362 {
84363 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,0};
84364 if (__pyx_kwds) {
84365 Py_ssize_t kw_args;
84366 switch (__pyx_nargs) {
84367 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
84368 CYTHON_FALLTHROUGH;
84369 case 0: break;
84370 default: goto __pyx_L5_argtuple_error;
84371 }
84372 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
84373 switch (__pyx_nargs) {
84374 case 0:
84375 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reference)) != 0)) {
84376 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
84377 kw_args--;
84378 }
84379 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4397, __pyx_L3_error)
84380 else goto __pyx_L5_argtuple_error;
84381 }
84382 if (unlikely(kw_args > 0)) {
84383 const Py_ssize_t kwd_pos_args = __pyx_nargs;
84384 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_tid") < 0)) __PYX_ERR(0, 4397, __pyx_L3_error)
84385 }
84386 } else if (unlikely(__pyx_nargs != 1)) {
84387 goto __pyx_L5_argtuple_error;
84388 } else {
84389 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
84390 }
84391 __pyx_v_reference = values[0];
84392 }
84393 goto __pyx_L6_skip;
84394 __pyx_L5_argtuple_error:;
84395 __Pyx_RaiseArgtupleInvalid("get_tid", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4397, __pyx_L3_error)
84396 __pyx_L6_skip:;
84397 goto __pyx_L4_argument_unpacking_done;
84398 __pyx_L3_error:;
84399 {
84400 Py_ssize_t __pyx_temp;
84401 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
84402 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
84403 }
84404 }
84405 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.get_tid", __pyx_clineno, __pyx_lineno, __pyx_filename);
84406 __Pyx_RefNannyFinishContext();
84407 return NULL;
84408 __pyx_L4_argument_unpacking_done:;
84409 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_20get_tid(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_reference);
84410
84411 /* function exit code */
84412 {
84413 Py_ssize_t __pyx_temp;
84414 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
84415 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
84416 }
84417 }
84418 __Pyx_RefNannyFinishContext();
84419 return __pyx_r;
84420 }
84421
84422 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_20get_tid(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_reference) {
84423 vdict_t *__pyx_v_d;
84424 khint_t __pyx_v_k;
84425 PyObject *__pyx_r = NULL;
84426 __Pyx_TraceDeclarations
84427 __Pyx_RefNannyDeclarations
84428 PyObject *__pyx_t_1 = NULL;
84429 int __pyx_t_2;
84430 int __pyx_t_3;
84431 char const *__pyx_t_4;
84432 PyObject *__pyx_t_5 = NULL;
84433 int __pyx_lineno = 0;
84434 const char *__pyx_filename = NULL;
84435 int __pyx_clineno = 0;
84436 __Pyx_TraceFrameInit(__pyx_codeobj__245)
84437 __Pyx_RefNannySetupContext("get_tid", 0);
84438 __Pyx_TraceCall("get_tid", __pyx_f[0], 4397, 0, __PYX_ERR(0, 4397, __pyx_L1_error));
84439 __Pyx_INCREF(__pyx_v_reference);
84440
84441 /* "pysam/libcbcf.pyx":4404
84442 * returns -1 if reference is not known.
84443 * """
84444 * if not self.is_open: # <<<<<<<<<<<<<<
84445 * raise ValueError('I/O operation on closed file')
84446 *
84447 */
84448 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4404, __pyx_L1_error)
84449 __Pyx_GOTREF(__pyx_t_1);
84450 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4404, __pyx_L1_error)
84451 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
84452 __pyx_t_3 = (!__pyx_t_2);
84453 if (unlikely(__pyx_t_3)) {
84454
84455 /* "pysam/libcbcf.pyx":4405
84456 * """
84457 * if not self.is_open:
84458 * raise ValueError('I/O operation on closed file') # <<<<<<<<<<<<<<
84459 *
84460 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
84461 */
84462 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4405, __pyx_L1_error)
84463 __Pyx_GOTREF(__pyx_t_1);
84464 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
84465 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
84466 __PYX_ERR(0, 4405, __pyx_L1_error)
84467
84468 /* "pysam/libcbcf.pyx":4404
84469 * returns -1 if reference is not known.
84470 * """
84471 * if not self.is_open: # <<<<<<<<<<<<<<
84472 * raise ValueError('I/O operation on closed file')
84473 *
84474 */
84475 }
84476
84477 /* "pysam/libcbcf.pyx":4407
84478 * raise ValueError('I/O operation on closed file')
84479 *
84480 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG] # <<<<<<<<<<<<<<
84481 * reference = force_bytes(reference)
84482 * cdef khint_t k = kh_get_vdict(d, reference)
84483 */
84484 __pyx_v_d = ((vdict_t *)(__pyx_v_self->header->ptr->dict[BCF_DT_CTG]));
84485
84486 /* "pysam/libcbcf.pyx":4408
84487 *
84488 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
84489 * reference = force_bytes(reference) # <<<<<<<<<<<<<<
84490 * cdef khint_t k = kh_get_vdict(d, reference)
84491 * return kh_val_vdict(d, k).id if k != kh_end(d) else -1
84492 */
84493 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_reference, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4408, __pyx_L1_error)
84494 __Pyx_GOTREF(__pyx_t_1);
84495 __Pyx_DECREF_SET(__pyx_v_reference, __pyx_t_1);
84496 __pyx_t_1 = 0;
84497
84498 /* "pysam/libcbcf.pyx":4409
84499 * cdef vdict_t *d = <vdict_t*>self.header.ptr.dict[BCF_DT_CTG]
84500 * reference = force_bytes(reference)
84501 * cdef khint_t k = kh_get_vdict(d, reference) # <<<<<<<<<<<<<<
84502 * return kh_val_vdict(d, k).id if k != kh_end(d) else -1
84503 *
84504 */
84505 __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_reference); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 4409, __pyx_L1_error)
84506 __pyx_v_k = kh_get_vdict(__pyx_v_d, __pyx_t_4);
84507
84508 /* "pysam/libcbcf.pyx":4410
84509 * reference = force_bytes(reference)
84510 * cdef khint_t k = kh_get_vdict(d, reference)
84511 * return kh_val_vdict(d, k).id if k != kh_end(d) else -1 # <<<<<<<<<<<<<<
84512 *
84513 * def get_reference_name(self, tid):
84514 */
84515 __Pyx_XDECREF(__pyx_r);
84516 __pyx_t_3 = (__pyx_v_k != kh_end(__pyx_v_d));
84517 if (__pyx_t_3) {
84518 __pyx_t_5 = __Pyx_PyInt_From_int(kh_val(__pyx_v_d, __pyx_v_k).id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4410, __pyx_L1_error)
84519 __Pyx_GOTREF(__pyx_t_5);
84520 __pyx_t_1 = __pyx_t_5;
84521 __pyx_t_5 = 0;
84522 } else {
84523 __Pyx_INCREF(__pyx_int_neg_1);
84524 __pyx_t_1 = __pyx_int_neg_1;
84525 }
84526 __pyx_r = __pyx_t_1;
84527 __pyx_t_1 = 0;
84528 goto __pyx_L0;
84529
84530 /* "pysam/libcbcf.pyx":4397
84531 * return 0 <= rid < hdr.n[BCF_DT_CTG]
84532 *
84533 * def get_tid(self, reference): # <<<<<<<<<<<<<<
84534 * """
84535 * return the numerical :term:`tid` corresponding to
84536 */
84537
84538 /* function exit code */
84539 __pyx_L1_error:;
84540 __Pyx_XDECREF(__pyx_t_1);
84541 __Pyx_XDECREF(__pyx_t_5);
84542 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.get_tid", __pyx_clineno, __pyx_lineno, __pyx_filename);
84543 __pyx_r = NULL;
84544 __pyx_L0:;
84545 __Pyx_XDECREF(__pyx_v_reference);
84546 __Pyx_XGIVEREF(__pyx_r);
84547 __Pyx_TraceReturn(__pyx_r, 0);
84548 __Pyx_RefNannyFinishContext();
84549 return __pyx_r;
84550 }
84551
84552 /* "pysam/libcbcf.pyx":4412
84553 * return kh_val_vdict(d, k).id if k != kh_end(d) else -1
84554 *
84555 * def get_reference_name(self, tid): # <<<<<<<<<<<<<<
84556 * """
84557 * return :term:`reference` name corresponding to numerical :term:`tid`
84558 */
84559
84560 /* Python wrapper */
84561 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_23get_reference_name(PyObject *__pyx_v_self,
84562 #if CYTHON_METH_FASTCALL
84563 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
84564 #else
84565 PyObject *__pyx_args, PyObject *__pyx_kwds
84566 #endif
84567 ); /*proto*/
84568 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_22get_reference_name, "VariantFile.get_reference_name(self, tid)\n\n return :term:`reference` name corresponding to numerical :term:`tid`\n ");
84569 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_23get_reference_name = {"get_reference_name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_23get_reference_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_22get_reference_name};
84570 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_23get_reference_name(PyObject *__pyx_v_self,
84571 #if CYTHON_METH_FASTCALL
84572 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
84573 #else
84574 PyObject *__pyx_args, PyObject *__pyx_kwds
84575 #endif
84576 ) {
84577 PyObject *__pyx_v_tid = 0;
84578 #if !CYTHON_METH_FASTCALL
84579 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
84580 #endif
84581 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
84582 PyObject* values[1] = {0};
84583 int __pyx_lineno = 0;
84584 const char *__pyx_filename = NULL;
84585 int __pyx_clineno = 0;
84586 PyObject *__pyx_r = 0;
84587 __Pyx_RefNannyDeclarations
84588 __Pyx_RefNannySetupContext("get_reference_name (wrapper)", 0);
84589 #if !CYTHON_METH_FASTCALL
84590 #if CYTHON_ASSUME_SAFE_MACROS
84591 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
84592 #else
84593 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
84594 #endif
84595 #endif
84596 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
84597 {
84598 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tid,0};
84599 if (__pyx_kwds) {
84600 Py_ssize_t kw_args;
84601 switch (__pyx_nargs) {
84602 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
84603 CYTHON_FALLTHROUGH;
84604 case 0: break;
84605 default: goto __pyx_L5_argtuple_error;
84606 }
84607 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
84608 switch (__pyx_nargs) {
84609 case 0:
84610 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tid)) != 0)) {
84611 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
84612 kw_args--;
84613 }
84614 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4412, __pyx_L3_error)
84615 else goto __pyx_L5_argtuple_error;
84616 }
84617 if (unlikely(kw_args > 0)) {
84618 const Py_ssize_t kwd_pos_args = __pyx_nargs;
84619 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_reference_name") < 0)) __PYX_ERR(0, 4412, __pyx_L3_error)
84620 }
84621 } else if (unlikely(__pyx_nargs != 1)) {
84622 goto __pyx_L5_argtuple_error;
84623 } else {
84624 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
84625 }
84626 __pyx_v_tid = values[0];
84627 }
84628 goto __pyx_L6_skip;
84629 __pyx_L5_argtuple_error:;
84630 __Pyx_RaiseArgtupleInvalid("get_reference_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4412, __pyx_L3_error)
84631 __pyx_L6_skip:;
84632 goto __pyx_L4_argument_unpacking_done;
84633 __pyx_L3_error:;
84634 {
84635 Py_ssize_t __pyx_temp;
84636 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
84637 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
84638 }
84639 }
84640 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.get_reference_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
84641 __Pyx_RefNannyFinishContext();
84642 return NULL;
84643 __pyx_L4_argument_unpacking_done:;
84644 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_22get_reference_name(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_tid);
84645
84646 /* function exit code */
84647 {
84648 Py_ssize_t __pyx_temp;
84649 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
84650 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
84651 }
84652 }
84653 __Pyx_RefNannyFinishContext();
84654 return __pyx_r;
84655 }
84656
84657 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_22get_reference_name(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_tid) {
84658 bcf_hdr_t *__pyx_v_hdr;
84659 int __pyx_v_rid;
84660 PyObject *__pyx_r = NULL;
84661 __Pyx_TraceDeclarations
84662 __Pyx_RefNannyDeclarations
84663 PyObject *__pyx_t_1 = NULL;
84664 int __pyx_t_2;
84665 int __pyx_t_3;
84666 bcf_hdr_t *__pyx_t_4;
84667 int __pyx_t_5;
84668 int __pyx_lineno = 0;
84669 const char *__pyx_filename = NULL;
84670 int __pyx_clineno = 0;
84671 __Pyx_TraceFrameInit(__pyx_codeobj__246)
84672 __Pyx_RefNannySetupContext("get_reference_name", 1);
84673 __Pyx_TraceCall("get_reference_name", __pyx_f[0], 4412, 0, __PYX_ERR(0, 4412, __pyx_L1_error));
84674
84675 /* "pysam/libcbcf.pyx":4416
84676 * return :term:`reference` name corresponding to numerical :term:`tid`
84677 * """
84678 * if not self.is_open: # <<<<<<<<<<<<<<
84679 * raise ValueError('I/O operation on closed file')
84680 *
84681 */
84682 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4416, __pyx_L1_error)
84683 __Pyx_GOTREF(__pyx_t_1);
84684 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4416, __pyx_L1_error)
84685 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
84686 __pyx_t_3 = (!__pyx_t_2);
84687 if (unlikely(__pyx_t_3)) {
84688
84689 /* "pysam/libcbcf.pyx":4417
84690 * """
84691 * if not self.is_open:
84692 * raise ValueError('I/O operation on closed file') # <<<<<<<<<<<<<<
84693 *
84694 * cdef bcf_hdr_t *hdr = self.header.ptr
84695 */
84696 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4417, __pyx_L1_error)
84697 __Pyx_GOTREF(__pyx_t_1);
84698 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
84699 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
84700 __PYX_ERR(0, 4417, __pyx_L1_error)
84701
84702 /* "pysam/libcbcf.pyx":4416
84703 * return :term:`reference` name corresponding to numerical :term:`tid`
84704 * """
84705 * if not self.is_open: # <<<<<<<<<<<<<<
84706 * raise ValueError('I/O operation on closed file')
84707 *
84708 */
84709 }
84710
84711 /* "pysam/libcbcf.pyx":4419
84712 * raise ValueError('I/O operation on closed file')
84713 *
84714 * cdef bcf_hdr_t *hdr = self.header.ptr # <<<<<<<<<<<<<<
84715 * cdef int rid = tid
84716 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
84717 */
84718 __pyx_t_4 = __pyx_v_self->header->ptr;
84719 __pyx_v_hdr = __pyx_t_4;
84720
84721 /* "pysam/libcbcf.pyx":4420
84722 *
84723 * cdef bcf_hdr_t *hdr = self.header.ptr
84724 * cdef int rid = tid # <<<<<<<<<<<<<<
84725 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
84726 * raise ValueError('Invalid tid')
84727 */
84728 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_tid); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4420, __pyx_L1_error)
84729 __pyx_v_rid = __pyx_t_5;
84730
84731 /* "pysam/libcbcf.pyx":4421
84732 * cdef bcf_hdr_t *hdr = self.header.ptr
84733 * cdef int rid = tid
84734 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
84735 * raise ValueError('Invalid tid')
84736 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
84737 */
84738 __pyx_t_2 = (__pyx_v_rid < 0);
84739 if (!__pyx_t_2) {
84740 } else {
84741 __pyx_t_3 = __pyx_t_2;
84742 goto __pyx_L5_bool_binop_done;
84743 }
84744 __pyx_t_2 = (__pyx_v_rid >= (__pyx_v_hdr->n[BCF_DT_CTG]));
84745 __pyx_t_3 = __pyx_t_2;
84746 __pyx_L5_bool_binop_done:;
84747 if (unlikely(__pyx_t_3)) {
84748
84749 /* "pysam/libcbcf.pyx":4422
84750 * cdef int rid = tid
84751 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
84752 * raise ValueError('Invalid tid') # <<<<<<<<<<<<<<
84753 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
84754 *
84755 */
84756 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__247, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4422, __pyx_L1_error)
84757 __Pyx_GOTREF(__pyx_t_1);
84758 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
84759 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
84760 __PYX_ERR(0, 4422, __pyx_L1_error)
84761
84762 /* "pysam/libcbcf.pyx":4421
84763 * cdef bcf_hdr_t *hdr = self.header.ptr
84764 * cdef int rid = tid
84765 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]: # <<<<<<<<<<<<<<
84766 * raise ValueError('Invalid tid')
84767 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
84768 */
84769 }
84770
84771 /* "pysam/libcbcf.pyx":4423
84772 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
84773 * raise ValueError('Invalid tid')
84774 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid)) # <<<<<<<<<<<<<<
84775 *
84776 * def fetch(self, contig=None, start=None, stop=None, region=None, reopen=False, end=None, reference=None):
84777 */
84778 __Pyx_XDECREF(__pyx_r);
84779 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_bcf_str_cache_get_charptr(bcf_hdr_id2name(__pyx_v_hdr, __pyx_v_rid)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4423, __pyx_L1_error)
84780 __Pyx_GOTREF(__pyx_t_1);
84781 __pyx_r = __pyx_t_1;
84782 __pyx_t_1 = 0;
84783 goto __pyx_L0;
84784
84785 /* "pysam/libcbcf.pyx":4412
84786 * return kh_val_vdict(d, k).id if k != kh_end(d) else -1
84787 *
84788 * def get_reference_name(self, tid): # <<<<<<<<<<<<<<
84789 * """
84790 * return :term:`reference` name corresponding to numerical :term:`tid`
84791 */
84792
84793 /* function exit code */
84794 __pyx_L1_error:;
84795 __Pyx_XDECREF(__pyx_t_1);
84796 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.get_reference_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
84797 __pyx_r = NULL;
84798 __pyx_L0:;
84799 __Pyx_XGIVEREF(__pyx_r);
84800 __Pyx_TraceReturn(__pyx_r, 0);
84801 __Pyx_RefNannyFinishContext();
84802 return __pyx_r;
84803 }
84804
84805 /* "pysam/libcbcf.pyx":4425
84806 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
84807 *
84808 * def fetch(self, contig=None, start=None, stop=None, region=None, reopen=False, end=None, reference=None): # <<<<<<<<<<<<<<
84809 * """fetch records in a :term:`region`, specified either by
84810 * :term:`contig`, *start*, and *end* (which are 0-based, half-open);
84811 */
84812
84813 /* Python wrapper */
84814 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_25fetch(PyObject *__pyx_v_self,
84815 #if CYTHON_METH_FASTCALL
84816 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
84817 #else
84818 PyObject *__pyx_args, PyObject *__pyx_kwds
84819 #endif
84820 ); /*proto*/
84821 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_24fetch, "VariantFile.fetch(self, contig=None, start=None, stop=None, region=None, reopen=False, end=None, reference=None)\nfetch records in a :term:`region`, specified either by\n :term:`contig`, *start*, and *end* (which are 0-based, half-open);\n or alternatively by a samtools :term:`region` string (which is\n 1-based inclusive).\n\n Without *contig* or *region* all mapped records will be fetched. The\n records will be returned ordered by contig, which will not necessarily\n be the order within the file.\n\n Set *reopen* to true if you will be using multiple iterators on the\n same file at the same time. The iterator returned will receive its\n own copy of a filehandle to the file effectively re-opening the\n file. Re-opening a file incurrs some overhead, so use with care.\n\n If only *contig* is set, all records on *contig* will be fetched.\n If both *region* and *contig* are given, an exception is raised.\n\n Note that a bgzipped :term:`VCF`.gz file without a tabix/CSI index\n (.tbi/.csi) or a :term:`BCF` file without a CSI index can only be\n read sequentially.\n ");
84822 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_25fetch = {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_25fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_24fetch};
84823 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_25fetch(PyObject *__pyx_v_self,
84824 #if CYTHON_METH_FASTCALL
84825 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
84826 #else
84827 PyObject *__pyx_args, PyObject *__pyx_kwds
84828 #endif
84829 ) {
84830 PyObject *__pyx_v_contig = 0;
84831 PyObject *__pyx_v_start = 0;
84832 PyObject *__pyx_v_stop = 0;
84833 PyObject *__pyx_v_region = 0;
84834 PyObject *__pyx_v_reopen = 0;
84835 PyObject *__pyx_v_end = 0;
84836 PyObject *__pyx_v_reference = 0;
84837 #if !CYTHON_METH_FASTCALL
84838 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
84839 #endif
84840 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
84841 PyObject* values[7] = {0,0,0,0,0,0,0};
84842 int __pyx_lineno = 0;
84843 const char *__pyx_filename = NULL;
84844 int __pyx_clineno = 0;
84845 PyObject *__pyx_r = 0;
84846 __Pyx_RefNannyDeclarations
84847 __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
84848 #if !CYTHON_METH_FASTCALL
84849 #if CYTHON_ASSUME_SAFE_MACROS
84850 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
84851 #else
84852 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
84853 #endif
84854 #endif
84855 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
84856 {
84857 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_contig,&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_region,&__pyx_n_s_reopen,&__pyx_n_s_end,&__pyx_n_s_reference,0};
84858 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
84859 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
84860 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
84861 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
84862 values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
84863 values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
84864 values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
84865 if (__pyx_kwds) {
84866 Py_ssize_t kw_args;
84867 switch (__pyx_nargs) {
84868 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
84869 CYTHON_FALLTHROUGH;
84870 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
84871 CYTHON_FALLTHROUGH;
84872 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
84873 CYTHON_FALLTHROUGH;
84874 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
84875 CYTHON_FALLTHROUGH;
84876 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
84877 CYTHON_FALLTHROUGH;
84878 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
84879 CYTHON_FALLTHROUGH;
84880 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
84881 CYTHON_FALLTHROUGH;
84882 case 0: break;
84883 default: goto __pyx_L5_argtuple_error;
84884 }
84885 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
84886 switch (__pyx_nargs) {
84887 case 0:
84888 if (kw_args > 0) {
84889 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_contig);
84890 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
84891 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4425, __pyx_L3_error)
84892 }
84893 CYTHON_FALLTHROUGH;
84894 case 1:
84895 if (kw_args > 0) {
84896 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
84897 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
84898 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4425, __pyx_L3_error)
84899 }
84900 CYTHON_FALLTHROUGH;
84901 case 2:
84902 if (kw_args > 0) {
84903 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stop);
84904 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
84905 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4425, __pyx_L3_error)
84906 }
84907 CYTHON_FALLTHROUGH;
84908 case 3:
84909 if (kw_args > 0) {
84910 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_region);
84911 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
84912 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4425, __pyx_L3_error)
84913 }
84914 CYTHON_FALLTHROUGH;
84915 case 4:
84916 if (kw_args > 0) {
84917 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reopen);
84918 if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
84919 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4425, __pyx_L3_error)
84920 }
84921 CYTHON_FALLTHROUGH;
84922 case 5:
84923 if (kw_args > 0) {
84924 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end);
84925 if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
84926 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4425, __pyx_L3_error)
84927 }
84928 CYTHON_FALLTHROUGH;
84929 case 6:
84930 if (kw_args > 0) {
84931 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reference);
84932 if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
84933 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4425, __pyx_L3_error)
84934 }
84935 }
84936 if (unlikely(kw_args > 0)) {
84937 const Py_ssize_t kwd_pos_args = __pyx_nargs;
84938 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fetch") < 0)) __PYX_ERR(0, 4425, __pyx_L3_error)
84939 }
84940 } else {
84941 switch (__pyx_nargs) {
84942 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
84943 CYTHON_FALLTHROUGH;
84944 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
84945 CYTHON_FALLTHROUGH;
84946 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
84947 CYTHON_FALLTHROUGH;
84948 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
84949 CYTHON_FALLTHROUGH;
84950 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
84951 CYTHON_FALLTHROUGH;
84952 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
84953 CYTHON_FALLTHROUGH;
84954 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
84955 CYTHON_FALLTHROUGH;
84956 case 0: break;
84957 default: goto __pyx_L5_argtuple_error;
84958 }
84959 }
84960 __pyx_v_contig = values[0];
84961 __pyx_v_start = values[1];
84962 __pyx_v_stop = values[2];
84963 __pyx_v_region = values[3];
84964 __pyx_v_reopen = values[4];
84965 __pyx_v_end = values[5];
84966 __pyx_v_reference = values[6];
84967 }
84968 goto __pyx_L6_skip;
84969 __pyx_L5_argtuple_error:;
84970 __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 7, __pyx_nargs); __PYX_ERR(0, 4425, __pyx_L3_error)
84971 __pyx_L6_skip:;
84972 goto __pyx_L4_argument_unpacking_done;
84973 __pyx_L3_error:;
84974 {
84975 Py_ssize_t __pyx_temp;
84976 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
84977 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
84978 }
84979 }
84980 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
84981 __Pyx_RefNannyFinishContext();
84982 return NULL;
84983 __pyx_L4_argument_unpacking_done:;
84984 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_24fetch(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_contig, __pyx_v_start, __pyx_v_stop, __pyx_v_region, __pyx_v_reopen, __pyx_v_end, __pyx_v_reference);
84985
84986 /* function exit code */
84987 {
84988 Py_ssize_t __pyx_temp;
84989 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
84990 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
84991 }
84992 }
84993 __Pyx_RefNannyFinishContext();
84994 return __pyx_r;
84995 }
84996
84997 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_24fetch(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_contig, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_region, PyObject *__pyx_v_reopen, PyObject *__pyx_v_end, PyObject *__pyx_v_reference) {
84998 PyObject *__pyx_v_bcf = NULL;
84999 CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
85000 PyObject *__pyx_v_tid = NULL;
85001 PyObject *__pyx_r = NULL;
85002 __Pyx_TraceDeclarations
85003 __Pyx_RefNannyDeclarations
85004 PyObject *__pyx_t_1 = NULL;
85005 int __pyx_t_2;
85006 int __pyx_t_3;
85007 PyObject *__pyx_t_4 = NULL;
85008 PyObject *__pyx_t_5 = NULL;
85009 PyObject *__pyx_t_6 = NULL;
85010 unsigned int __pyx_t_7;
85011 PyObject *__pyx_t_8 = NULL;
85012 PyObject *__pyx_t_9 = NULL;
85013 PyObject *(*__pyx_t_10)(PyObject *);
85014 int __pyx_lineno = 0;
85015 const char *__pyx_filename = NULL;
85016 int __pyx_clineno = 0;
85017 __Pyx_TraceFrameInit(__pyx_codeobj__248)
85018 __Pyx_RefNannySetupContext("fetch", 0);
85019 __Pyx_TraceCall("fetch", __pyx_f[0], 4425, 0, __PYX_ERR(0, 4425, __pyx_L1_error));
85020 __Pyx_INCREF(__pyx_v_contig);
85021 __Pyx_INCREF(__pyx_v_start);
85022 __Pyx_INCREF(__pyx_v_stop);
85023
85024 /* "pysam/libcbcf.pyx":4447
85025 * read sequentially.
85026 * """
85027 * if not self.is_open: # <<<<<<<<<<<<<<
85028 * raise ValueError('I/O operation on closed file')
85029 *
85030 */
85031 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4447, __pyx_L1_error)
85032 __Pyx_GOTREF(__pyx_t_1);
85033 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4447, __pyx_L1_error)
85034 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85035 __pyx_t_3 = (!__pyx_t_2);
85036 if (unlikely(__pyx_t_3)) {
85037
85038 /* "pysam/libcbcf.pyx":4448
85039 * """
85040 * if not self.is_open:
85041 * raise ValueError('I/O operation on closed file') # <<<<<<<<<<<<<<
85042 *
85043 * if self.htsfile.is_write:
85044 */
85045 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4448, __pyx_L1_error)
85046 __Pyx_GOTREF(__pyx_t_1);
85047 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
85048 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85049 __PYX_ERR(0, 4448, __pyx_L1_error)
85050
85051 /* "pysam/libcbcf.pyx":4447
85052 * read sequentially.
85053 * """
85054 * if not self.is_open: # <<<<<<<<<<<<<<
85055 * raise ValueError('I/O operation on closed file')
85056 *
85057 */
85058 }
85059
85060 /* "pysam/libcbcf.pyx":4450
85061 * raise ValueError('I/O operation on closed file')
85062 *
85063 * if self.htsfile.is_write: # <<<<<<<<<<<<<<
85064 * raise ValueError('cannot fetch from Variantfile opened for writing')
85065 *
85066 */
85067 __pyx_t_3 = (__pyx_v_self->__pyx_base.htsfile->is_write != 0);
85068 if (unlikely(__pyx_t_3)) {
85069
85070 /* "pysam/libcbcf.pyx":4451
85071 *
85072 * if self.htsfile.is_write:
85073 * raise ValueError('cannot fetch from Variantfile opened for writing') # <<<<<<<<<<<<<<
85074 *
85075 * if contig is None and region is None:
85076 */
85077 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__249, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4451, __pyx_L1_error)
85078 __Pyx_GOTREF(__pyx_t_1);
85079 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
85080 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85081 __PYX_ERR(0, 4451, __pyx_L1_error)
85082
85083 /* "pysam/libcbcf.pyx":4450
85084 * raise ValueError('I/O operation on closed file')
85085 *
85086 * if self.htsfile.is_write: # <<<<<<<<<<<<<<
85087 * raise ValueError('cannot fetch from Variantfile opened for writing')
85088 *
85089 */
85090 }
85091
85092 /* "pysam/libcbcf.pyx":4453
85093 * raise ValueError('cannot fetch from Variantfile opened for writing')
85094 *
85095 * if contig is None and region is None: # <<<<<<<<<<<<<<
85096 * self.is_reading = 1
85097 * bcf = self.copy() if reopen else self
85098 */
85099 __pyx_t_2 = (__pyx_v_contig == Py_None);
85100 if (__pyx_t_2) {
85101 } else {
85102 __pyx_t_3 = __pyx_t_2;
85103 goto __pyx_L6_bool_binop_done;
85104 }
85105 __pyx_t_2 = (__pyx_v_region == Py_None);
85106 __pyx_t_3 = __pyx_t_2;
85107 __pyx_L6_bool_binop_done:;
85108 if (__pyx_t_3) {
85109
85110 /* "pysam/libcbcf.pyx":4454
85111 *
85112 * if contig is None and region is None:
85113 * self.is_reading = 1 # <<<<<<<<<<<<<<
85114 * bcf = self.copy() if reopen else self
85115 * bcf.seek(self.start_offset)
85116 */
85117 __pyx_v_self->is_reading = 1;
85118
85119 /* "pysam/libcbcf.pyx":4455
85120 * if contig is None and region is None:
85121 * self.is_reading = 1
85122 * bcf = self.copy() if reopen else self # <<<<<<<<<<<<<<
85123 * bcf.seek(self.start_offset)
85124 * return iter(bcf)
85125 */
85126 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_reopen); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4455, __pyx_L1_error)
85127 if (__pyx_t_3) {
85128 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4455, __pyx_L1_error)
85129 __Pyx_GOTREF(__pyx_t_5);
85130 __pyx_t_6 = NULL;
85131 __pyx_t_7 = 0;
85132 #if CYTHON_UNPACK_METHODS
85133 if (likely(PyMethod_Check(__pyx_t_5))) {
85134 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
85135 if (likely(__pyx_t_6)) {
85136 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
85137 __Pyx_INCREF(__pyx_t_6);
85138 __Pyx_INCREF(function);
85139 __Pyx_DECREF_SET(__pyx_t_5, function);
85140 __pyx_t_7 = 1;
85141 }
85142 }
85143 #endif
85144 {
85145 PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
85146 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
85147 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
85148 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4455, __pyx_L1_error)
85149 __Pyx_GOTREF(__pyx_t_4);
85150 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
85151 }
85152 __pyx_t_1 = __pyx_t_4;
85153 __pyx_t_4 = 0;
85154 } else {
85155 __Pyx_INCREF((PyObject *)__pyx_v_self);
85156 __pyx_t_1 = ((PyObject *)__pyx_v_self);
85157 }
85158 __pyx_v_bcf = __pyx_t_1;
85159 __pyx_t_1 = 0;
85160
85161 /* "pysam/libcbcf.pyx":4456
85162 * self.is_reading = 1
85163 * bcf = self.copy() if reopen else self
85164 * bcf.seek(self.start_offset) # <<<<<<<<<<<<<<
85165 * return iter(bcf)
85166 *
85167 */
85168 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_bcf, __pyx_n_s_seek); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4456, __pyx_L1_error)
85169 __Pyx_GOTREF(__pyx_t_4);
85170 __pyx_t_5 = __Pyx_PyInt_From_int64_t(__pyx_v_self->__pyx_base.start_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4456, __pyx_L1_error)
85171 __Pyx_GOTREF(__pyx_t_5);
85172 __pyx_t_6 = NULL;
85173 __pyx_t_7 = 0;
85174 #if CYTHON_UNPACK_METHODS
85175 if (likely(PyMethod_Check(__pyx_t_4))) {
85176 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
85177 if (likely(__pyx_t_6)) {
85178 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
85179 __Pyx_INCREF(__pyx_t_6);
85180 __Pyx_INCREF(function);
85181 __Pyx_DECREF_SET(__pyx_t_4, function);
85182 __pyx_t_7 = 1;
85183 }
85184 }
85185 #endif
85186 {
85187 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
85188 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
85189 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
85190 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
85191 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4456, __pyx_L1_error)
85192 __Pyx_GOTREF(__pyx_t_1);
85193 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
85194 }
85195 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85196
85197 /* "pysam/libcbcf.pyx":4457
85198 * bcf = self.copy() if reopen else self
85199 * bcf.seek(self.start_offset)
85200 * return iter(bcf) # <<<<<<<<<<<<<<
85201 *
85202 * if self.index is None:
85203 */
85204 __Pyx_XDECREF(__pyx_r);
85205 __pyx_t_1 = PyObject_GetIter(__pyx_v_bcf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4457, __pyx_L1_error)
85206 __Pyx_GOTREF(__pyx_t_1);
85207 __pyx_r = __pyx_t_1;
85208 __pyx_t_1 = 0;
85209 goto __pyx_L0;
85210
85211 /* "pysam/libcbcf.pyx":4453
85212 * raise ValueError('cannot fetch from Variantfile opened for writing')
85213 *
85214 * if contig is None and region is None: # <<<<<<<<<<<<<<
85215 * self.is_reading = 1
85216 * bcf = self.copy() if reopen else self
85217 */
85218 }
85219
85220 /* "pysam/libcbcf.pyx":4459
85221 * return iter(bcf)
85222 *
85223 * if self.index is None: # <<<<<<<<<<<<<<
85224 * raise ValueError('fetch requires an index')
85225 *
85226 */
85227 __pyx_t_3 = (((PyObject *)__pyx_v_self->index) == Py_None);
85228 if (unlikely(__pyx_t_3)) {
85229
85230 /* "pysam/libcbcf.pyx":4460
85231 *
85232 * if self.index is None:
85233 * raise ValueError('fetch requires an index') # <<<<<<<<<<<<<<
85234 *
85235 * _, tid, start, stop = self.parse_region(contig, start, stop, region,
85236 */
85237 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__250, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4460, __pyx_L1_error)
85238 __Pyx_GOTREF(__pyx_t_1);
85239 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
85240 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85241 __PYX_ERR(0, 4460, __pyx_L1_error)
85242
85243 /* "pysam/libcbcf.pyx":4459
85244 * return iter(bcf)
85245 *
85246 * if self.index is None: # <<<<<<<<<<<<<<
85247 * raise ValueError('fetch requires an index')
85248 *
85249 */
85250 }
85251
85252 /* "pysam/libcbcf.pyx":4462
85253 * raise ValueError('fetch requires an index')
85254 *
85255 * _, tid, start, stop = self.parse_region(contig, start, stop, region, # <<<<<<<<<<<<<<
85256 * None, end=end, reference=reference)
85257 *
85258 */
85259 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_region); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4462, __pyx_L1_error)
85260 __Pyx_GOTREF(__pyx_t_1);
85261
85262 /* "pysam/libcbcf.pyx":4463
85263 *
85264 * _, tid, start, stop = self.parse_region(contig, start, stop, region,
85265 * None, end=end, reference=reference) # <<<<<<<<<<<<<<
85266 *
85267 * if contig is None:
85268 */
85269 __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4462, __pyx_L1_error)
85270 __Pyx_GOTREF(__pyx_t_4);
85271 __Pyx_INCREF(__pyx_v_contig);
85272 __Pyx_GIVEREF(__pyx_v_contig);
85273 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_contig)) __PYX_ERR(0, 4462, __pyx_L1_error);
85274 __Pyx_INCREF(__pyx_v_start);
85275 __Pyx_GIVEREF(__pyx_v_start);
85276 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_start)) __PYX_ERR(0, 4462, __pyx_L1_error);
85277 __Pyx_INCREF(__pyx_v_stop);
85278 __Pyx_GIVEREF(__pyx_v_stop);
85279 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_stop)) __PYX_ERR(0, 4462, __pyx_L1_error);
85280 __Pyx_INCREF(__pyx_v_region);
85281 __Pyx_GIVEREF(__pyx_v_region);
85282 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_region)) __PYX_ERR(0, 4462, __pyx_L1_error);
85283 __Pyx_INCREF(Py_None);
85284 __Pyx_GIVEREF(Py_None);
85285 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, Py_None)) __PYX_ERR(0, 4462, __pyx_L1_error);
85286 __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4463, __pyx_L1_error)
85287 __Pyx_GOTREF(__pyx_t_5);
85288 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_v_end) < 0) __PYX_ERR(0, 4463, __pyx_L1_error)
85289 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_reference, __pyx_v_reference) < 0) __PYX_ERR(0, 4463, __pyx_L1_error)
85290
85291 /* "pysam/libcbcf.pyx":4462
85292 * raise ValueError('fetch requires an index')
85293 *
85294 * _, tid, start, stop = self.parse_region(contig, start, stop, region, # <<<<<<<<<<<<<<
85295 * None, end=end, reference=reference)
85296 *
85297 */
85298 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4462, __pyx_L1_error)
85299 __Pyx_GOTREF(__pyx_t_6);
85300 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85301 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
85302 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
85303 if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
85304 PyObject* sequence = __pyx_t_6;
85305 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
85306 if (unlikely(size != 4)) {
85307 if (size > 4) __Pyx_RaiseTooManyValuesError(4);
85308 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
85309 __PYX_ERR(0, 4462, __pyx_L1_error)
85310 }
85311 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
85312 if (likely(PyTuple_CheckExact(sequence))) {
85313 __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
85314 __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
85315 __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2);
85316 __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3);
85317 } else {
85318 __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
85319 __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
85320 __pyx_t_1 = PyList_GET_ITEM(sequence, 2);
85321 __pyx_t_8 = PyList_GET_ITEM(sequence, 3);
85322 }
85323 __Pyx_INCREF(__pyx_t_5);
85324 __Pyx_INCREF(__pyx_t_4);
85325 __Pyx_INCREF(__pyx_t_1);
85326 __Pyx_INCREF(__pyx_t_8);
85327 #else
85328 {
85329 Py_ssize_t i;
85330 PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_1,&__pyx_t_8};
85331 for (i=0; i < 4; i++) {
85332 PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4462, __pyx_L1_error)
85333 __Pyx_GOTREF(item);
85334 *(temps[i]) = item;
85335 }
85336 }
85337 #endif
85338 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
85339 } else {
85340 Py_ssize_t index = -1;
85341 PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_1,&__pyx_t_8};
85342 __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4462, __pyx_L1_error)
85343 __Pyx_GOTREF(__pyx_t_9);
85344 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
85345 __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
85346 for (index=0; index < 4; index++) {
85347 PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L9_unpacking_failed;
85348 __Pyx_GOTREF(item);
85349 *(temps[index]) = item;
85350 }
85351 if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 4) < 0) __PYX_ERR(0, 4462, __pyx_L1_error)
85352 __pyx_t_10 = NULL;
85353 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
85354 goto __pyx_L10_unpacking_done;
85355 __pyx_L9_unpacking_failed:;
85356 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
85357 __pyx_t_10 = NULL;
85358 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
85359 __PYX_ERR(0, 4462, __pyx_L1_error)
85360 __pyx_L10_unpacking_done:;
85361 }
85362 __pyx_v__ = __pyx_t_5;
85363 __pyx_t_5 = 0;
85364 __pyx_v_tid = __pyx_t_4;
85365 __pyx_t_4 = 0;
85366 __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_1);
85367 __pyx_t_1 = 0;
85368 __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_8);
85369 __pyx_t_8 = 0;
85370
85371 /* "pysam/libcbcf.pyx":4465
85372 * None, end=end, reference=reference)
85373 *
85374 * if contig is None: # <<<<<<<<<<<<<<
85375 * contig = self.get_reference_name(tid)
85376 *
85377 */
85378 __pyx_t_3 = (__pyx_v_contig == Py_None);
85379 if (__pyx_t_3) {
85380
85381 /* "pysam/libcbcf.pyx":4466
85382 *
85383 * if contig is None:
85384 * contig = self.get_reference_name(tid) # <<<<<<<<<<<<<<
85385 *
85386 * self.is_reading = 1
85387 */
85388 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reference_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4466, __pyx_L1_error)
85389 __Pyx_GOTREF(__pyx_t_8);
85390 __pyx_t_1 = NULL;
85391 __pyx_t_7 = 0;
85392 #if CYTHON_UNPACK_METHODS
85393 if (likely(PyMethod_Check(__pyx_t_8))) {
85394 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
85395 if (likely(__pyx_t_1)) {
85396 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
85397 __Pyx_INCREF(__pyx_t_1);
85398 __Pyx_INCREF(function);
85399 __Pyx_DECREF_SET(__pyx_t_8, function);
85400 __pyx_t_7 = 1;
85401 }
85402 }
85403 #endif
85404 {
85405 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_tid};
85406 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
85407 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
85408 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4466, __pyx_L1_error)
85409 __Pyx_GOTREF(__pyx_t_6);
85410 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
85411 }
85412 __Pyx_DECREF_SET(__pyx_v_contig, __pyx_t_6);
85413 __pyx_t_6 = 0;
85414
85415 /* "pysam/libcbcf.pyx":4465
85416 * None, end=end, reference=reference)
85417 *
85418 * if contig is None: # <<<<<<<<<<<<<<
85419 * contig = self.get_reference_name(tid)
85420 *
85421 */
85422 }
85423
85424 /* "pysam/libcbcf.pyx":4468
85425 * contig = self.get_reference_name(tid)
85426 *
85427 * self.is_reading = 1 # <<<<<<<<<<<<<<
85428 * return self.index.fetch(self, contig, start, stop, reopen)
85429 *
85430 */
85431 __pyx_v_self->is_reading = 1;
85432
85433 /* "pysam/libcbcf.pyx":4469
85434 *
85435 * self.is_reading = 1
85436 * return self.index.fetch(self, contig, start, stop, reopen) # <<<<<<<<<<<<<<
85437 *
85438 * def new_record(self, *args, **kwargs):
85439 */
85440 __Pyx_XDECREF(__pyx_r);
85441 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->index), __pyx_n_s_fetch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4469, __pyx_L1_error)
85442 __Pyx_GOTREF(__pyx_t_8);
85443 __pyx_t_1 = NULL;
85444 __pyx_t_7 = 0;
85445 #if CYTHON_UNPACK_METHODS
85446 if (likely(PyMethod_Check(__pyx_t_8))) {
85447 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
85448 if (likely(__pyx_t_1)) {
85449 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
85450 __Pyx_INCREF(__pyx_t_1);
85451 __Pyx_INCREF(function);
85452 __Pyx_DECREF_SET(__pyx_t_8, function);
85453 __pyx_t_7 = 1;
85454 }
85455 }
85456 #endif
85457 {
85458 PyObject *__pyx_callargs[6] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_v_contig, __pyx_v_start, __pyx_v_stop, __pyx_v_reopen};
85459 __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_7, 5+__pyx_t_7);
85460 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
85461 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4469, __pyx_L1_error)
85462 __Pyx_GOTREF(__pyx_t_6);
85463 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
85464 }
85465 __pyx_r = __pyx_t_6;
85466 __pyx_t_6 = 0;
85467 goto __pyx_L0;
85468
85469 /* "pysam/libcbcf.pyx":4425
85470 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
85471 *
85472 * def fetch(self, contig=None, start=None, stop=None, region=None, reopen=False, end=None, reference=None): # <<<<<<<<<<<<<<
85473 * """fetch records in a :term:`region`, specified either by
85474 * :term:`contig`, *start*, and *end* (which are 0-based, half-open);
85475 */
85476
85477 /* function exit code */
85478 __pyx_L1_error:;
85479 __Pyx_XDECREF(__pyx_t_1);
85480 __Pyx_XDECREF(__pyx_t_4);
85481 __Pyx_XDECREF(__pyx_t_5);
85482 __Pyx_XDECREF(__pyx_t_6);
85483 __Pyx_XDECREF(__pyx_t_8);
85484 __Pyx_XDECREF(__pyx_t_9);
85485 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
85486 __pyx_r = NULL;
85487 __pyx_L0:;
85488 __Pyx_XDECREF(__pyx_v_bcf);
85489 __Pyx_XDECREF(__pyx_v__);
85490 __Pyx_XDECREF(__pyx_v_tid);
85491 __Pyx_XDECREF(__pyx_v_contig);
85492 __Pyx_XDECREF(__pyx_v_start);
85493 __Pyx_XDECREF(__pyx_v_stop);
85494 __Pyx_XGIVEREF(__pyx_r);
85495 __Pyx_TraceReturn(__pyx_r, 0);
85496 __Pyx_RefNannyFinishContext();
85497 return __pyx_r;
85498 }
85499
85500 /* "pysam/libcbcf.pyx":4471
85501 * return self.index.fetch(self, contig, start, stop, reopen)
85502 *
85503 * def new_record(self, *args, **kwargs): # <<<<<<<<<<<<<<
85504 * """Create a new empty :class:`VariantRecord`.
85505 *
85506 */
85507
85508 /* Python wrapper */
85509 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_27new_record(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
85510 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_26new_record, "VariantFile.new_record(self, *args, **kwargs)\nCreate a new empty :class:`VariantRecord`.\n\n See :meth:`VariantHeader.new_record`\n ");
85511 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_27new_record = {"new_record", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_27new_record, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_26new_record};
85512 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_27new_record(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
85513 PyObject *__pyx_v_args = 0;
85514 PyObject *__pyx_v_kwargs = 0;
85515 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
85516 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
85517 PyObject *__pyx_r = 0;
85518 __Pyx_RefNannyDeclarations
85519 __Pyx_RefNannySetupContext("new_record (wrapper)", 0);
85520 #if CYTHON_ASSUME_SAFE_MACROS
85521 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
85522 #else
85523 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
85524 #endif
85525 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
85526 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "new_record", 1))) return NULL;
85527 if (unlikely(__pyx_kwds)) {
85528 __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
85529 if (unlikely(!__pyx_v_kwargs)) return NULL;
85530 __Pyx_GOTREF(__pyx_v_kwargs);
85531 } else {
85532 __pyx_v_kwargs = PyDict_New();
85533 if (unlikely(!__pyx_v_kwargs)) return NULL;
85534 __Pyx_GOTREF(__pyx_v_kwargs);
85535 }
85536 __Pyx_INCREF(__pyx_args);
85537 __pyx_v_args = __pyx_args;
85538 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_26new_record(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
85539
85540 /* function exit code */
85541 __Pyx_DECREF(__pyx_v_args);
85542 __Pyx_DECREF(__pyx_v_kwargs);
85543 __Pyx_RefNannyFinishContext();
85544 return __pyx_r;
85545 }
85546
85547 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_26new_record(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
85548 PyObject *__pyx_r = NULL;
85549 __Pyx_TraceDeclarations
85550 __Pyx_RefNannyDeclarations
85551 PyObject *__pyx_t_1 = NULL;
85552 PyObject *__pyx_t_2 = NULL;
85553 PyObject *__pyx_t_3 = NULL;
85554 int __pyx_lineno = 0;
85555 const char *__pyx_filename = NULL;
85556 int __pyx_clineno = 0;
85557 __Pyx_TraceFrameInit(__pyx_codeobj__251)
85558 __Pyx_RefNannySetupContext("new_record", 1);
85559 __Pyx_TraceCall("new_record", __pyx_f[0], 4471, 0, __PYX_ERR(0, 4471, __pyx_L1_error));
85560
85561 /* "pysam/libcbcf.pyx":4476
85562 * See :meth:`VariantHeader.new_record`
85563 * """
85564 * return self.header.new_record(*args, **kwargs) # <<<<<<<<<<<<<<
85565 *
85566 * cpdef int write(self, VariantRecord record) except -1:
85567 */
85568 __Pyx_XDECREF(__pyx_r);
85569 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->header), __pyx_n_s_new_record); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4476, __pyx_L1_error)
85570 __Pyx_GOTREF(__pyx_t_1);
85571 __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4476, __pyx_L1_error)
85572 __Pyx_GOTREF(__pyx_t_2);
85573 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4476, __pyx_L1_error)
85574 __Pyx_GOTREF(__pyx_t_3);
85575 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85576 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
85577 __pyx_r = __pyx_t_3;
85578 __pyx_t_3 = 0;
85579 goto __pyx_L0;
85580
85581 /* "pysam/libcbcf.pyx":4471
85582 * return self.index.fetch(self, contig, start, stop, reopen)
85583 *
85584 * def new_record(self, *args, **kwargs): # <<<<<<<<<<<<<<
85585 * """Create a new empty :class:`VariantRecord`.
85586 *
85587 */
85588
85589 /* function exit code */
85590 __pyx_L1_error:;
85591 __Pyx_XDECREF(__pyx_t_1);
85592 __Pyx_XDECREF(__pyx_t_2);
85593 __Pyx_XDECREF(__pyx_t_3);
85594 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.new_record", __pyx_clineno, __pyx_lineno, __pyx_filename);
85595 __pyx_r = NULL;
85596 __pyx_L0:;
85597 __Pyx_XGIVEREF(__pyx_r);
85598 __Pyx_TraceReturn(__pyx_r, 0);
85599 __Pyx_RefNannyFinishContext();
85600 return __pyx_r;
85601 }
85602
85603 /* "pysam/libcbcf.pyx":4478
85604 * return self.header.new_record(*args, **kwargs)
85605 *
85606 * cpdef int write(self, VariantRecord record) except -1: # <<<<<<<<<<<<<<
85607 * """
85608 * write a single :class:`pysam.VariantRecord` to disk.
85609 */
85610
85611 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_29write(PyObject *__pyx_v_self,
85612 #if CYTHON_METH_FASTCALL
85613 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
85614 #else
85615 PyObject *__pyx_args, PyObject *__pyx_kwds
85616 #endif
85617 ); /*proto*/
85618 static int __pyx_f_5pysam_7libcbcf_11VariantFile_write(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record, int __pyx_skip_dispatch) {
85619 PyObject *__pyx_v_msg = NULL;
85620 int __pyx_v_ret;
85621 int __pyx_r;
85622 __Pyx_TraceDeclarations
85623 __Pyx_RefNannyDeclarations
85624 PyObject *__pyx_t_1 = NULL;
85625 PyObject *__pyx_t_2 = NULL;
85626 PyObject *__pyx_t_3 = NULL;
85627 PyObject *__pyx_t_4 = NULL;
85628 unsigned int __pyx_t_5;
85629 int __pyx_t_6;
85630 int __pyx_t_7;
85631 int __pyx_t_8;
85632 int __pyx_lineno = 0;
85633 const char *__pyx_filename = NULL;
85634 int __pyx_clineno = 0;
85635 __Pyx_TraceFrameInit(__pyx_codeobj__252)
85636 __Pyx_RefNannySetupContext("write", 1);
85637 __Pyx_TraceCall("write", __pyx_f[0], 4478, 0, __PYX_ERR(0, 4478, __pyx_L1_error));
85638 /* Check if called by wrapper */
85639 if (unlikely(__pyx_skip_dispatch)) ;
85640 /* Check if overridden in Python */
85641 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
85642 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
85643 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
85644 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
85645 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
85646 #endif
85647 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4478, __pyx_L1_error)
85648 __Pyx_GOTREF(__pyx_t_1);
85649 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_7libcbcf_11VariantFile_29write)) {
85650 __Pyx_INCREF(__pyx_t_1);
85651 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
85652 __pyx_t_5 = 0;
85653 #if CYTHON_UNPACK_METHODS
85654 if (unlikely(PyMethod_Check(__pyx_t_3))) {
85655 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
85656 if (likely(__pyx_t_4)) {
85657 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
85658 __Pyx_INCREF(__pyx_t_4);
85659 __Pyx_INCREF(function);
85660 __Pyx_DECREF_SET(__pyx_t_3, function);
85661 __pyx_t_5 = 1;
85662 }
85663 }
85664 #endif
85665 {
85666 PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_record)};
85667 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
85668 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
85669 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4478, __pyx_L1_error)
85670 __Pyx_GOTREF(__pyx_t_2);
85671 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
85672 }
85673 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4478, __pyx_L1_error)
85674 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
85675 __pyx_r = __pyx_t_6;
85676 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85677 goto __pyx_L0;
85678 }
85679 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
85680 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
85681 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
85682 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
85683 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
85684 }
85685 #endif
85686 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85687 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
85688 }
85689 #endif
85690 }
85691
85692 /* "pysam/libcbcf.pyx":4484
85693 * returns the number of bytes written.
85694 * """
85695 * if record is None: # <<<<<<<<<<<<<<
85696 * raise ValueError('record must not be None')
85697 *
85698 */
85699 __pyx_t_7 = (((PyObject *)__pyx_v_record) == Py_None);
85700 if (unlikely(__pyx_t_7)) {
85701
85702 /* "pysam/libcbcf.pyx":4485
85703 * """
85704 * if record is None:
85705 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
85706 *
85707 * if not self.is_open:
85708 */
85709 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4485, __pyx_L1_error)
85710 __Pyx_GOTREF(__pyx_t_1);
85711 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
85712 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85713 __PYX_ERR(0, 4485, __pyx_L1_error)
85714
85715 /* "pysam/libcbcf.pyx":4484
85716 * returns the number of bytes written.
85717 * """
85718 * if record is None: # <<<<<<<<<<<<<<
85719 * raise ValueError('record must not be None')
85720 *
85721 */
85722 }
85723
85724 /* "pysam/libcbcf.pyx":4487
85725 * raise ValueError('record must not be None')
85726 *
85727 * if not self.is_open: # <<<<<<<<<<<<<<
85728 * return ValueError('I/O operation on closed file')
85729 *
85730 */
85731 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4487, __pyx_L1_error)
85732 __Pyx_GOTREF(__pyx_t_1);
85733 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4487, __pyx_L1_error)
85734 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85735 __pyx_t_8 = (!__pyx_t_7);
85736 if (__pyx_t_8) {
85737
85738 /* "pysam/libcbcf.pyx":4488
85739 *
85740 * if not self.is_open:
85741 * return ValueError('I/O operation on closed file') # <<<<<<<<<<<<<<
85742 *
85743 * if not self.htsfile.is_write:
85744 */
85745 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4488, __pyx_L1_error)
85746 __Pyx_GOTREF(__pyx_t_1);
85747 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L1_error)
85748 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85749 __pyx_r = __pyx_t_6;
85750 goto __pyx_L0;
85751
85752 /* "pysam/libcbcf.pyx":4487
85753 * raise ValueError('record must not be None')
85754 *
85755 * if not self.is_open: # <<<<<<<<<<<<<<
85756 * return ValueError('I/O operation on closed file')
85757 *
85758 */
85759 }
85760
85761 /* "pysam/libcbcf.pyx":4490
85762 * return ValueError('I/O operation on closed file')
85763 *
85764 * if not self.htsfile.is_write: # <<<<<<<<<<<<<<
85765 * raise ValueError('cannot write to a Variantfile opened for reading')
85766 *
85767 */
85768 __pyx_t_8 = (!(__pyx_v_self->__pyx_base.htsfile->is_write != 0));
85769 if (unlikely(__pyx_t_8)) {
85770
85771 /* "pysam/libcbcf.pyx":4491
85772 *
85773 * if not self.htsfile.is_write:
85774 * raise ValueError('cannot write to a Variantfile opened for reading') # <<<<<<<<<<<<<<
85775 *
85776 * if not self.header_written:
85777 */
85778 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__253, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4491, __pyx_L1_error)
85779 __Pyx_GOTREF(__pyx_t_1);
85780 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
85781 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85782 __PYX_ERR(0, 4491, __pyx_L1_error)
85783
85784 /* "pysam/libcbcf.pyx":4490
85785 * return ValueError('I/O operation on closed file')
85786 *
85787 * if not self.htsfile.is_write: # <<<<<<<<<<<<<<
85788 * raise ValueError('cannot write to a Variantfile opened for reading')
85789 *
85790 */
85791 }
85792
85793 /* "pysam/libcbcf.pyx":4493
85794 * raise ValueError('cannot write to a Variantfile opened for reading')
85795 *
85796 * if not self.header_written: # <<<<<<<<<<<<<<
85797 * self.header_written = True
85798 * with nogil:
85799 */
85800 __pyx_t_8 = (!__pyx_v_self->header_written);
85801 if (__pyx_t_8) {
85802
85803 /* "pysam/libcbcf.pyx":4494
85804 *
85805 * if not self.header_written:
85806 * self.header_written = True # <<<<<<<<<<<<<<
85807 * with nogil:
85808 * bcf_hdr_write(self.htsfile, self.header.ptr)
85809 */
85810 __pyx_v_self->header_written = 1;
85811
85812 /* "pysam/libcbcf.pyx":4495
85813 * if not self.header_written:
85814 * self.header_written = True
85815 * with nogil: # <<<<<<<<<<<<<<
85816 * bcf_hdr_write(self.htsfile, self.header.ptr)
85817 *
85818 */
85819 {
85820 #ifdef WITH_THREAD
85821 PyThreadState *_save;
85822 _save = NULL;
85823 Py_UNBLOCK_THREADS
85824 __Pyx_FastGIL_Remember();
85825 #endif
85826 /*try:*/ {
85827
85828 /* "pysam/libcbcf.pyx":4496
85829 * self.header_written = True
85830 * with nogil:
85831 * bcf_hdr_write(self.htsfile, self.header.ptr) # <<<<<<<<<<<<<<
85832 *
85833 * #if record.header is not self.header:
85834 */
85835 (void)(bcf_hdr_write(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->header->ptr));
85836 }
85837
85838 /* "pysam/libcbcf.pyx":4495
85839 * if not self.header_written:
85840 * self.header_written = True
85841 * with nogil: # <<<<<<<<<<<<<<
85842 * bcf_hdr_write(self.htsfile, self.header.ptr)
85843 *
85844 */
85845 /*finally:*/ {
85846 /*normal exit:*/{
85847 #ifdef WITH_THREAD
85848 __Pyx_FastGIL_Forget();
85849 Py_BLOCK_THREADS
85850 #endif
85851 goto __pyx_L9;
85852 }
85853 __pyx_L9:;
85854 }
85855 }
85856
85857 /* "pysam/libcbcf.pyx":4493
85858 * raise ValueError('cannot write to a Variantfile opened for reading')
85859 *
85860 * if not self.header_written: # <<<<<<<<<<<<<<
85861 * self.header_written = True
85862 * with nogil:
85863 */
85864 }
85865
85866 /* "pysam/libcbcf.pyx":4502
85867 * # raise ValueError('Writing records from a different VariantFile is not yet supported')
85868 *
85869 * if record.ptr.n_sample != bcf_hdr_nsamples(self.header.ptr): # <<<<<<<<<<<<<<
85870 * msg = 'Invalid VariantRecord. Number of samples does not match header ({} vs {})'
85871 * raise ValueError(msg.format(record.ptr.n_sample, bcf_hdr_nsamples(self.header.ptr)))
85872 */
85873 __pyx_t_8 = (__pyx_v_record->ptr->n_sample != bcf_hdr_nsamples(__pyx_v_self->header->ptr));
85874 if (unlikely(__pyx_t_8)) {
85875
85876 /* "pysam/libcbcf.pyx":4503
85877 *
85878 * if record.ptr.n_sample != bcf_hdr_nsamples(self.header.ptr):
85879 * msg = 'Invalid VariantRecord. Number of samples does not match header ({} vs {})' # <<<<<<<<<<<<<<
85880 * raise ValueError(msg.format(record.ptr.n_sample, bcf_hdr_nsamples(self.header.ptr)))
85881 *
85882 */
85883 __Pyx_INCREF(__pyx_kp_u_Invalid_VariantRecord_Number_of);
85884 __pyx_v_msg = __pyx_kp_u_Invalid_VariantRecord_Number_of;
85885
85886 /* "pysam/libcbcf.pyx":4504
85887 * if record.ptr.n_sample != bcf_hdr_nsamples(self.header.ptr):
85888 * msg = 'Invalid VariantRecord. Number of samples does not match header ({} vs {})'
85889 * raise ValueError(msg.format(record.ptr.n_sample, bcf_hdr_nsamples(self.header.ptr))) # <<<<<<<<<<<<<<
85890 *
85891 * # Sync END annotation before writing
85892 */
85893 __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_record->ptr->n_sample); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4504, __pyx_L1_error)
85894 __Pyx_GOTREF(__pyx_t_1);
85895 __pyx_t_2 = __Pyx_PyInt_From_int32_t(bcf_hdr_nsamples(__pyx_v_self->header->ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4504, __pyx_L1_error)
85896 __Pyx_GOTREF(__pyx_t_2);
85897 __pyx_t_3 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyUnicode_Type_format, __pyx_v_msg, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4504, __pyx_L1_error)
85898 __Pyx_GOTREF(__pyx_t_3);
85899 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85900 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
85901 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4504, __pyx_L1_error)
85902 __Pyx_GOTREF(__pyx_t_2);
85903 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
85904 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
85905 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
85906 __PYX_ERR(0, 4504, __pyx_L1_error)
85907
85908 /* "pysam/libcbcf.pyx":4502
85909 * # raise ValueError('Writing records from a different VariantFile is not yet supported')
85910 *
85911 * if record.ptr.n_sample != bcf_hdr_nsamples(self.header.ptr): # <<<<<<<<<<<<<<
85912 * msg = 'Invalid VariantRecord. Number of samples does not match header ({} vs {})'
85913 * raise ValueError(msg.format(record.ptr.n_sample, bcf_hdr_nsamples(self.header.ptr)))
85914 */
85915 }
85916
85917 /* "pysam/libcbcf.pyx":4507
85918 *
85919 * # Sync END annotation before writing
85920 * bcf_sync_end(record) # <<<<<<<<<<<<<<
85921 *
85922 * cdef int ret
85923 */
85924 __pyx_t_2 = __pyx_f_5pysam_7libcbcf_bcf_sync_end(__pyx_v_record); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4507, __pyx_L1_error)
85925 __Pyx_GOTREF(__pyx_t_2);
85926 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
85927
85928 /* "pysam/libcbcf.pyx":4511
85929 * cdef int ret
85930 *
85931 * with nogil: # <<<<<<<<<<<<<<
85932 * ret = bcf_write1(self.htsfile, self.header.ptr, record.ptr)
85933 *
85934 */
85935 {
85936 #ifdef WITH_THREAD
85937 PyThreadState *_save;
85938 _save = NULL;
85939 Py_UNBLOCK_THREADS
85940 __Pyx_FastGIL_Remember();
85941 #endif
85942 /*try:*/ {
85943
85944 /* "pysam/libcbcf.pyx":4512
85945 *
85946 * with nogil:
85947 * ret = bcf_write1(self.htsfile, self.header.ptr, record.ptr) # <<<<<<<<<<<<<<
85948 *
85949 * if ret < 0:
85950 */
85951 __pyx_v_ret = bcf_write1(__pyx_v_self->__pyx_base.htsfile, __pyx_v_self->header->ptr, __pyx_v_record->ptr);
85952 }
85953
85954 /* "pysam/libcbcf.pyx":4511
85955 * cdef int ret
85956 *
85957 * with nogil: # <<<<<<<<<<<<<<
85958 * ret = bcf_write1(self.htsfile, self.header.ptr, record.ptr)
85959 *
85960 */
85961 /*finally:*/ {
85962 /*normal exit:*/{
85963 #ifdef WITH_THREAD
85964 __Pyx_FastGIL_Forget();
85965 Py_BLOCK_THREADS
85966 #endif
85967 goto __pyx_L13;
85968 }
85969 __pyx_L13:;
85970 }
85971 }
85972
85973 /* "pysam/libcbcf.pyx":4514
85974 * ret = bcf_write1(self.htsfile, self.header.ptr, record.ptr)
85975 *
85976 * if ret < 0: # <<<<<<<<<<<<<<
85977 * raise IOError(errno, strerror(errno))
85978 *
85979 */
85980 __pyx_t_8 = (__pyx_v_ret < 0);
85981 if (unlikely(__pyx_t_8)) {
85982
85983 /* "pysam/libcbcf.pyx":4515
85984 *
85985 * if ret < 0:
85986 * raise IOError(errno, strerror(errno)) # <<<<<<<<<<<<<<
85987 *
85988 * return ret
85989 */
85990 __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4515, __pyx_L1_error)
85991 __Pyx_GOTREF(__pyx_t_2);
85992 __pyx_t_3 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4515, __pyx_L1_error)
85993 __Pyx_GOTREF(__pyx_t_3);
85994 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4515, __pyx_L1_error)
85995 __Pyx_GOTREF(__pyx_t_1);
85996 __Pyx_GIVEREF(__pyx_t_2);
85997 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 4515, __pyx_L1_error);
85998 __Pyx_GIVEREF(__pyx_t_3);
85999 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 4515, __pyx_L1_error);
86000 __pyx_t_2 = 0;
86001 __pyx_t_3 = 0;
86002 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4515, __pyx_L1_error)
86003 __Pyx_GOTREF(__pyx_t_3);
86004 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86005 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
86006 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
86007 __PYX_ERR(0, 4515, __pyx_L1_error)
86008
86009 /* "pysam/libcbcf.pyx":4514
86010 * ret = bcf_write1(self.htsfile, self.header.ptr, record.ptr)
86011 *
86012 * if ret < 0: # <<<<<<<<<<<<<<
86013 * raise IOError(errno, strerror(errno))
86014 *
86015 */
86016 }
86017
86018 /* "pysam/libcbcf.pyx":4517
86019 * raise IOError(errno, strerror(errno))
86020 *
86021 * return ret # <<<<<<<<<<<<<<
86022 *
86023 * def subset_samples(self, include_samples):
86024 */
86025 __pyx_r = __pyx_v_ret;
86026 goto __pyx_L0;
86027
86028 /* "pysam/libcbcf.pyx":4478
86029 * return self.header.new_record(*args, **kwargs)
86030 *
86031 * cpdef int write(self, VariantRecord record) except -1: # <<<<<<<<<<<<<<
86032 * """
86033 * write a single :class:`pysam.VariantRecord` to disk.
86034 */
86035
86036 /* function exit code */
86037 __pyx_L1_error:;
86038 __Pyx_XDECREF(__pyx_t_1);
86039 __Pyx_XDECREF(__pyx_t_2);
86040 __Pyx_XDECREF(__pyx_t_3);
86041 __Pyx_XDECREF(__pyx_t_4);
86042 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
86043 __pyx_r = -1;
86044 __pyx_L0:;
86045 __Pyx_XDECREF(__pyx_v_msg);
86046 __Pyx_TraceReturn(Py_None, 0);
86047 __Pyx_RefNannyFinishContext();
86048 return __pyx_r;
86049 }
86050
86051 /* Python wrapper */
86052 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_29write(PyObject *__pyx_v_self,
86053 #if CYTHON_METH_FASTCALL
86054 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86055 #else
86056 PyObject *__pyx_args, PyObject *__pyx_kwds
86057 #endif
86058 ); /*proto*/
86059 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_28write, "VariantFile.write(self, VariantRecord record) -> int\n\n write a single :class:`pysam.VariantRecord` to disk.\n\n returns the number of bytes written.\n ");
86060 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_29write = {"write", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_29write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_28write};
86061 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_29write(PyObject *__pyx_v_self,
86062 #if CYTHON_METH_FASTCALL
86063 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86064 #else
86065 PyObject *__pyx_args, PyObject *__pyx_kwds
86066 #endif
86067 ) {
86068 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record = 0;
86069 #if !CYTHON_METH_FASTCALL
86070 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
86071 #endif
86072 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86073 PyObject* values[1] = {0};
86074 int __pyx_lineno = 0;
86075 const char *__pyx_filename = NULL;
86076 int __pyx_clineno = 0;
86077 PyObject *__pyx_r = 0;
86078 __Pyx_RefNannyDeclarations
86079 __Pyx_RefNannySetupContext("write (wrapper)", 0);
86080 #if !CYTHON_METH_FASTCALL
86081 #if CYTHON_ASSUME_SAFE_MACROS
86082 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
86083 #else
86084 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
86085 #endif
86086 #endif
86087 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
86088 {
86089 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,0};
86090 if (__pyx_kwds) {
86091 Py_ssize_t kw_args;
86092 switch (__pyx_nargs) {
86093 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
86094 CYTHON_FALLTHROUGH;
86095 case 0: break;
86096 default: goto __pyx_L5_argtuple_error;
86097 }
86098 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
86099 switch (__pyx_nargs) {
86100 case 0:
86101 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_record)) != 0)) {
86102 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
86103 kw_args--;
86104 }
86105 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4478, __pyx_L3_error)
86106 else goto __pyx_L5_argtuple_error;
86107 }
86108 if (unlikely(kw_args > 0)) {
86109 const Py_ssize_t kwd_pos_args = __pyx_nargs;
86110 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 4478, __pyx_L3_error)
86111 }
86112 } else if (unlikely(__pyx_nargs != 1)) {
86113 goto __pyx_L5_argtuple_error;
86114 } else {
86115 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
86116 }
86117 __pyx_v_record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)values[0]);
86118 }
86119 goto __pyx_L6_skip;
86120 __pyx_L5_argtuple_error:;
86121 __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4478, __pyx_L3_error)
86122 __pyx_L6_skip:;
86123 goto __pyx_L4_argument_unpacking_done;
86124 __pyx_L3_error:;
86125 {
86126 Py_ssize_t __pyx_temp;
86127 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
86128 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
86129 }
86130 }
86131 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
86132 __Pyx_RefNannyFinishContext();
86133 return NULL;
86134 __pyx_L4_argument_unpacking_done:;
86135 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), __pyx_ptype_5pysam_7libcbcf_VariantRecord, 1, "record", 0))) __PYX_ERR(0, 4478, __pyx_L1_error)
86136 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_28write(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_record);
86137
86138 /* function exit code */
86139 goto __pyx_L0;
86140 __pyx_L1_error:;
86141 __pyx_r = NULL;
86142 __pyx_L0:;
86143 {
86144 Py_ssize_t __pyx_temp;
86145 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
86146 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
86147 }
86148 }
86149 __Pyx_RefNannyFinishContext();
86150 return __pyx_r;
86151 }
86152
86153 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_28write(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, struct __pyx_obj_5pysam_7libcbcf_VariantRecord *__pyx_v_record) {
86154 PyObject *__pyx_r = NULL;
86155 __Pyx_TraceDeclarations
86156 __Pyx_RefNannyDeclarations
86157 int __pyx_t_1;
86158 PyObject *__pyx_t_2 = NULL;
86159 int __pyx_lineno = 0;
86160 const char *__pyx_filename = NULL;
86161 int __pyx_clineno = 0;
86162 __Pyx_TraceFrameInit(__pyx_codeobj__252)
86163 __Pyx_RefNannySetupContext("write", 1);
86164 __Pyx_TraceCall("write (wrapper)", __pyx_f[0], 4478, 0, __PYX_ERR(0, 4478, __pyx_L1_error));
86165 __Pyx_XDECREF(__pyx_r);
86166 __pyx_t_1 = __pyx_f_5pysam_7libcbcf_11VariantFile_write(__pyx_v_self, __pyx_v_record, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4478, __pyx_L1_error)
86167 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4478, __pyx_L1_error)
86168 __Pyx_GOTREF(__pyx_t_2);
86169 __pyx_r = __pyx_t_2;
86170 __pyx_t_2 = 0;
86171 goto __pyx_L0;
86172
86173 /* function exit code */
86174 __pyx_L1_error:;
86175 __Pyx_XDECREF(__pyx_t_2);
86176 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
86177 __pyx_r = NULL;
86178 __pyx_L0:;
86179 __Pyx_XGIVEREF(__pyx_r);
86180 __Pyx_TraceReturn(__pyx_r, 0);
86181 __Pyx_RefNannyFinishContext();
86182 return __pyx_r;
86183 }
86184
86185 /* "pysam/libcbcf.pyx":4519
86186 * return ret
86187 *
86188 * def subset_samples(self, include_samples): # <<<<<<<<<<<<<<
86189 * """
86190 * Read only a subset of samples to reduce processing time and memory.
86191 */
86192
86193 /* Python wrapper */
86194 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_31subset_samples(PyObject *__pyx_v_self,
86195 #if CYTHON_METH_FASTCALL
86196 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86197 #else
86198 PyObject *__pyx_args, PyObject *__pyx_kwds
86199 #endif
86200 ); /*proto*/
86201 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_30subset_samples, "VariantFile.subset_samples(self, include_samples)\n\n Read only a subset of samples to reduce processing time and memory.\n Must be called prior to retrieving records.\n ");
86202 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_31subset_samples = {"subset_samples", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_31subset_samples, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_30subset_samples};
86203 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_31subset_samples(PyObject *__pyx_v_self,
86204 #if CYTHON_METH_FASTCALL
86205 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86206 #else
86207 PyObject *__pyx_args, PyObject *__pyx_kwds
86208 #endif
86209 ) {
86210 PyObject *__pyx_v_include_samples = 0;
86211 #if !CYTHON_METH_FASTCALL
86212 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
86213 #endif
86214 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86215 PyObject* values[1] = {0};
86216 int __pyx_lineno = 0;
86217 const char *__pyx_filename = NULL;
86218 int __pyx_clineno = 0;
86219 PyObject *__pyx_r = 0;
86220 __Pyx_RefNannyDeclarations
86221 __Pyx_RefNannySetupContext("subset_samples (wrapper)", 0);
86222 #if !CYTHON_METH_FASTCALL
86223 #if CYTHON_ASSUME_SAFE_MACROS
86224 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
86225 #else
86226 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
86227 #endif
86228 #endif
86229 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
86230 {
86231 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_include_samples,0};
86232 if (__pyx_kwds) {
86233 Py_ssize_t kw_args;
86234 switch (__pyx_nargs) {
86235 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
86236 CYTHON_FALLTHROUGH;
86237 case 0: break;
86238 default: goto __pyx_L5_argtuple_error;
86239 }
86240 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
86241 switch (__pyx_nargs) {
86242 case 0:
86243 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_include_samples)) != 0)) {
86244 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
86245 kw_args--;
86246 }
86247 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L3_error)
86248 else goto __pyx_L5_argtuple_error;
86249 }
86250 if (unlikely(kw_args > 0)) {
86251 const Py_ssize_t kwd_pos_args = __pyx_nargs;
86252 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "subset_samples") < 0)) __PYX_ERR(0, 4519, __pyx_L3_error)
86253 }
86254 } else if (unlikely(__pyx_nargs != 1)) {
86255 goto __pyx_L5_argtuple_error;
86256 } else {
86257 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
86258 }
86259 __pyx_v_include_samples = values[0];
86260 }
86261 goto __pyx_L6_skip;
86262 __pyx_L5_argtuple_error:;
86263 __Pyx_RaiseArgtupleInvalid("subset_samples", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4519, __pyx_L3_error)
86264 __pyx_L6_skip:;
86265 goto __pyx_L4_argument_unpacking_done;
86266 __pyx_L3_error:;
86267 {
86268 Py_ssize_t __pyx_temp;
86269 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
86270 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
86271 }
86272 }
86273 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.subset_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
86274 __Pyx_RefNannyFinishContext();
86275 return NULL;
86276 __pyx_L4_argument_unpacking_done:;
86277 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_30subset_samples(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v_include_samples);
86278
86279 /* function exit code */
86280 {
86281 Py_ssize_t __pyx_temp;
86282 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
86283 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
86284 }
86285 }
86286 __Pyx_RefNannyFinishContext();
86287 return __pyx_r;
86288 }
86289
86290 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_30subset_samples(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, PyObject *__pyx_v_include_samples) {
86291 PyObject *__pyx_r = NULL;
86292 __Pyx_TraceDeclarations
86293 __Pyx_RefNannyDeclarations
86294 PyObject *__pyx_t_1 = NULL;
86295 int __pyx_t_2;
86296 int __pyx_t_3;
86297 int __pyx_lineno = 0;
86298 const char *__pyx_filename = NULL;
86299 int __pyx_clineno = 0;
86300 __Pyx_TraceFrameInit(__pyx_codeobj__254)
86301 __Pyx_RefNannySetupContext("subset_samples", 1);
86302 __Pyx_TraceCall("subset_samples", __pyx_f[0], 4519, 0, __PYX_ERR(0, 4519, __pyx_L1_error));
86303
86304 /* "pysam/libcbcf.pyx":4524
86305 * Must be called prior to retrieving records.
86306 * """
86307 * if not self.is_open: # <<<<<<<<<<<<<<
86308 * raise ValueError('I/O operation on closed file')
86309 *
86310 */
86311 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4524, __pyx_L1_error)
86312 __Pyx_GOTREF(__pyx_t_1);
86313 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4524, __pyx_L1_error)
86314 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86315 __pyx_t_3 = (!__pyx_t_2);
86316 if (unlikely(__pyx_t_3)) {
86317
86318 /* "pysam/libcbcf.pyx":4525
86319 * """
86320 * if not self.is_open:
86321 * raise ValueError('I/O operation on closed file') # <<<<<<<<<<<<<<
86322 *
86323 * if self.htsfile.is_write:
86324 */
86325 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4525, __pyx_L1_error)
86326 __Pyx_GOTREF(__pyx_t_1);
86327 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
86328 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86329 __PYX_ERR(0, 4525, __pyx_L1_error)
86330
86331 /* "pysam/libcbcf.pyx":4524
86332 * Must be called prior to retrieving records.
86333 * """
86334 * if not self.is_open: # <<<<<<<<<<<<<<
86335 * raise ValueError('I/O operation on closed file')
86336 *
86337 */
86338 }
86339
86340 /* "pysam/libcbcf.pyx":4527
86341 * raise ValueError('I/O operation on closed file')
86342 *
86343 * if self.htsfile.is_write: # <<<<<<<<<<<<<<
86344 * raise ValueError('cannot subset samples from Variantfile opened for writing')
86345 *
86346 */
86347 __pyx_t_3 = (__pyx_v_self->__pyx_base.htsfile->is_write != 0);
86348 if (unlikely(__pyx_t_3)) {
86349
86350 /* "pysam/libcbcf.pyx":4528
86351 *
86352 * if self.htsfile.is_write:
86353 * raise ValueError('cannot subset samples from Variantfile opened for writing') # <<<<<<<<<<<<<<
86354 *
86355 * if self.is_reading:
86356 */
86357 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__255, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4528, __pyx_L1_error)
86358 __Pyx_GOTREF(__pyx_t_1);
86359 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
86360 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86361 __PYX_ERR(0, 4528, __pyx_L1_error)
86362
86363 /* "pysam/libcbcf.pyx":4527
86364 * raise ValueError('I/O operation on closed file')
86365 *
86366 * if self.htsfile.is_write: # <<<<<<<<<<<<<<
86367 * raise ValueError('cannot subset samples from Variantfile opened for writing')
86368 *
86369 */
86370 }
86371
86372 /* "pysam/libcbcf.pyx":4530
86373 * raise ValueError('cannot subset samples from Variantfile opened for writing')
86374 *
86375 * if self.is_reading: # <<<<<<<<<<<<<<
86376 * raise ValueError('cannot subset samples after fetching records')
86377 *
86378 */
86379 if (unlikely(__pyx_v_self->is_reading)) {
86380
86381 /* "pysam/libcbcf.pyx":4531
86382 *
86383 * if self.is_reading:
86384 * raise ValueError('cannot subset samples after fetching records') # <<<<<<<<<<<<<<
86385 *
86386 * self.header._subset_samples(include_samples)
86387 */
86388 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__256, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4531, __pyx_L1_error)
86389 __Pyx_GOTREF(__pyx_t_1);
86390 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
86391 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86392 __PYX_ERR(0, 4531, __pyx_L1_error)
86393
86394 /* "pysam/libcbcf.pyx":4530
86395 * raise ValueError('cannot subset samples from Variantfile opened for writing')
86396 *
86397 * if self.is_reading: # <<<<<<<<<<<<<<
86398 * raise ValueError('cannot subset samples after fetching records')
86399 *
86400 */
86401 }
86402
86403 /* "pysam/libcbcf.pyx":4533
86404 * raise ValueError('cannot subset samples after fetching records')
86405 *
86406 * self.header._subset_samples(include_samples) # <<<<<<<<<<<<<<
86407 *
86408 * # potentially unnecessary optimization that also sets max_unpack
86409 */
86410 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader *)__pyx_v_self->header->__pyx_vtab)->_subset_samples(__pyx_v_self->header, __pyx_v_include_samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4533, __pyx_L1_error)
86411 __Pyx_GOTREF(__pyx_t_1);
86412 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86413
86414 /* "pysam/libcbcf.pyx":4536
86415 *
86416 * # potentially unnecessary optimization that also sets max_unpack
86417 * if not include_samples: # <<<<<<<<<<<<<<
86418 * self.drop_samples = True
86419 *
86420 */
86421 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_include_samples); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4536, __pyx_L1_error)
86422 __pyx_t_2 = (!__pyx_t_3);
86423 if (__pyx_t_2) {
86424
86425 /* "pysam/libcbcf.pyx":4537
86426 * # potentially unnecessary optimization that also sets max_unpack
86427 * if not include_samples:
86428 * self.drop_samples = True # <<<<<<<<<<<<<<
86429 *
86430 */
86431 __pyx_v_self->drop_samples = 1;
86432
86433 /* "pysam/libcbcf.pyx":4536
86434 *
86435 * # potentially unnecessary optimization that also sets max_unpack
86436 * if not include_samples: # <<<<<<<<<<<<<<
86437 * self.drop_samples = True
86438 *
86439 */
86440 }
86441
86442 /* "pysam/libcbcf.pyx":4519
86443 * return ret
86444 *
86445 * def subset_samples(self, include_samples): # <<<<<<<<<<<<<<
86446 * """
86447 * Read only a subset of samples to reduce processing time and memory.
86448 */
86449
86450 /* function exit code */
86451 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
86452 goto __pyx_L0;
86453 __pyx_L1_error:;
86454 __Pyx_XDECREF(__pyx_t_1);
86455 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.subset_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
86456 __pyx_r = NULL;
86457 __pyx_L0:;
86458 __Pyx_XGIVEREF(__pyx_r);
86459 __Pyx_TraceReturn(__pyx_r, 0);
86460 __Pyx_RefNannyFinishContext();
86461 return __pyx_r;
86462 }
86463
86464 /* "pysam/libcbcf.pxd":135
86465 *
86466 * cdef class VariantFile(HTSFile):
86467 * cdef readonly VariantHeader header # <<<<<<<<<<<<<<
86468 * cdef readonly BaseIndex index
86469 *
86470 */
86471
86472 /* Python wrapper */
86473 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
86474 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_6header_1__get__(PyObject *__pyx_v_self) {
86475 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86476 PyObject *__pyx_r = 0;
86477 __Pyx_RefNannyDeclarations
86478 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
86479 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
86480 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_6header___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
86481
86482 /* function exit code */
86483 __Pyx_RefNannyFinishContext();
86484 return __pyx_r;
86485 }
86486
86487 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_6header___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
86488 PyObject *__pyx_r = NULL;
86489 __Pyx_TraceDeclarations
86490 __Pyx_RefNannyDeclarations
86491 int __pyx_lineno = 0;
86492 const char *__pyx_filename = NULL;
86493 int __pyx_clineno = 0;
86494 __Pyx_RefNannySetupContext("__get__", 1);
86495 __Pyx_TraceCall("__get__", __pyx_f[3], 135, 0, __PYX_ERR(3, 135, __pyx_L1_error));
86496 __Pyx_XDECREF(__pyx_r);
86497 __Pyx_INCREF((PyObject *)__pyx_v_self->header);
86498 __pyx_r = ((PyObject *)__pyx_v_self->header);
86499 goto __pyx_L0;
86500
86501 /* function exit code */
86502 __pyx_L1_error:;
86503 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86504 __pyx_r = NULL;
86505 __pyx_L0:;
86506 __Pyx_XGIVEREF(__pyx_r);
86507 __Pyx_TraceReturn(__pyx_r, 0);
86508 __Pyx_RefNannyFinishContext();
86509 return __pyx_r;
86510 }
86511
86512 /* "pysam/libcbcf.pxd":136
86513 * cdef class VariantFile(HTSFile):
86514 * cdef readonly VariantHeader header
86515 * cdef readonly BaseIndex index # <<<<<<<<<<<<<<
86516 *
86517 * cdef readonly bint drop_samples # true if sample information is to be ignored
86518 */
86519
86520 /* Python wrapper */
86521 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_5index_1__get__(PyObject *__pyx_v_self); /*proto*/
86522 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_5index_1__get__(PyObject *__pyx_v_self) {
86523 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86524 PyObject *__pyx_r = 0;
86525 __Pyx_RefNannyDeclarations
86526 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
86527 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
86528 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_5index___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
86529
86530 /* function exit code */
86531 __Pyx_RefNannyFinishContext();
86532 return __pyx_r;
86533 }
86534
86535 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_5index___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
86536 PyObject *__pyx_r = NULL;
86537 __Pyx_TraceDeclarations
86538 __Pyx_RefNannyDeclarations
86539 int __pyx_lineno = 0;
86540 const char *__pyx_filename = NULL;
86541 int __pyx_clineno = 0;
86542 __Pyx_RefNannySetupContext("__get__", 1);
86543 __Pyx_TraceCall("__get__", __pyx_f[3], 136, 0, __PYX_ERR(3, 136, __pyx_L1_error));
86544 __Pyx_XDECREF(__pyx_r);
86545 __Pyx_INCREF((PyObject *)__pyx_v_self->index);
86546 __pyx_r = ((PyObject *)__pyx_v_self->index);
86547 goto __pyx_L0;
86548
86549 /* function exit code */
86550 __pyx_L1_error:;
86551 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86552 __pyx_r = NULL;
86553 __pyx_L0:;
86554 __Pyx_XGIVEREF(__pyx_r);
86555 __Pyx_TraceReturn(__pyx_r, 0);
86556 __Pyx_RefNannyFinishContext();
86557 return __pyx_r;
86558 }
86559
86560 /* "pysam/libcbcf.pxd":138
86561 * cdef readonly BaseIndex index
86562 *
86563 * cdef readonly bint drop_samples # true if sample information is to be ignored # <<<<<<<<<<<<<<
86564 *
86565 * # FIXME: Temporary, use htsFormat when it is available
86566 */
86567
86568 /* Python wrapper */
86569 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_12drop_samples_1__get__(PyObject *__pyx_v_self); /*proto*/
86570 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_12drop_samples_1__get__(PyObject *__pyx_v_self) {
86571 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86572 PyObject *__pyx_r = 0;
86573 __Pyx_RefNannyDeclarations
86574 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
86575 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
86576 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_12drop_samples___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
86577
86578 /* function exit code */
86579 __Pyx_RefNannyFinishContext();
86580 return __pyx_r;
86581 }
86582
86583 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_12drop_samples___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
86584 PyObject *__pyx_r = NULL;
86585 __Pyx_TraceDeclarations
86586 __Pyx_RefNannyDeclarations
86587 PyObject *__pyx_t_1 = NULL;
86588 int __pyx_lineno = 0;
86589 const char *__pyx_filename = NULL;
86590 int __pyx_clineno = 0;
86591 __Pyx_RefNannySetupContext("__get__", 1);
86592 __Pyx_TraceCall("__get__", __pyx_f[3], 138, 0, __PYX_ERR(3, 138, __pyx_L1_error));
86593 __Pyx_XDECREF(__pyx_r);
86594 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->drop_samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 138, __pyx_L1_error)
86595 __Pyx_GOTREF(__pyx_t_1);
86596 __pyx_r = __pyx_t_1;
86597 __pyx_t_1 = 0;
86598 goto __pyx_L0;
86599
86600 /* function exit code */
86601 __pyx_L1_error:;
86602 __Pyx_XDECREF(__pyx_t_1);
86603 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.drop_samples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86604 __pyx_r = NULL;
86605 __pyx_L0:;
86606 __Pyx_XGIVEREF(__pyx_r);
86607 __Pyx_TraceReturn(__pyx_r, 0);
86608 __Pyx_RefNannyFinishContext();
86609 return __pyx_r;
86610 }
86611
86612 /* "pysam/libcbcf.pxd":141
86613 *
86614 * # FIXME: Temporary, use htsFormat when it is available
86615 * cdef readonly bint is_reading # true if file has begun reading records # <<<<<<<<<<<<<<
86616 * cdef readonly bint header_written # true if header has already been written
86617 *
86618 */
86619
86620 /* Python wrapper */
86621 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_10is_reading_1__get__(PyObject *__pyx_v_self); /*proto*/
86622 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_10is_reading_1__get__(PyObject *__pyx_v_self) {
86623 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86624 PyObject *__pyx_r = 0;
86625 __Pyx_RefNannyDeclarations
86626 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
86627 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
86628 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_10is_reading___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
86629
86630 /* function exit code */
86631 __Pyx_RefNannyFinishContext();
86632 return __pyx_r;
86633 }
86634
86635 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_10is_reading___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
86636 PyObject *__pyx_r = NULL;
86637 __Pyx_TraceDeclarations
86638 __Pyx_RefNannyDeclarations
86639 PyObject *__pyx_t_1 = NULL;
86640 int __pyx_lineno = 0;
86641 const char *__pyx_filename = NULL;
86642 int __pyx_clineno = 0;
86643 __Pyx_RefNannySetupContext("__get__", 1);
86644 __Pyx_TraceCall("__get__", __pyx_f[3], 141, 0, __PYX_ERR(3, 141, __pyx_L1_error));
86645 __Pyx_XDECREF(__pyx_r);
86646 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_reading); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 141, __pyx_L1_error)
86647 __Pyx_GOTREF(__pyx_t_1);
86648 __pyx_r = __pyx_t_1;
86649 __pyx_t_1 = 0;
86650 goto __pyx_L0;
86651
86652 /* function exit code */
86653 __pyx_L1_error:;
86654 __Pyx_XDECREF(__pyx_t_1);
86655 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.is_reading.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86656 __pyx_r = NULL;
86657 __pyx_L0:;
86658 __Pyx_XGIVEREF(__pyx_r);
86659 __Pyx_TraceReturn(__pyx_r, 0);
86660 __Pyx_RefNannyFinishContext();
86661 return __pyx_r;
86662 }
86663
86664 /* "pysam/libcbcf.pxd":142
86665 * # FIXME: Temporary, use htsFormat when it is available
86666 * cdef readonly bint is_reading # true if file has begun reading records
86667 * cdef readonly bint header_written # true if header has already been written # <<<<<<<<<<<<<<
86668 *
86669 * cpdef int write(self, VariantRecord record) except -1
86670 */
86671
86672 /* Python wrapper */
86673 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_14header_written_1__get__(PyObject *__pyx_v_self); /*proto*/
86674 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_14header_written_1__get__(PyObject *__pyx_v_self) {
86675 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86676 PyObject *__pyx_r = 0;
86677 __Pyx_RefNannyDeclarations
86678 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
86679 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
86680 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_14header_written___get__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
86681
86682 /* function exit code */
86683 __Pyx_RefNannyFinishContext();
86684 return __pyx_r;
86685 }
86686
86687 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_14header_written___get__(struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
86688 PyObject *__pyx_r = NULL;
86689 __Pyx_TraceDeclarations
86690 __Pyx_RefNannyDeclarations
86691 PyObject *__pyx_t_1 = NULL;
86692 int __pyx_lineno = 0;
86693 const char *__pyx_filename = NULL;
86694 int __pyx_clineno = 0;
86695 __Pyx_RefNannySetupContext("__get__", 1);
86696 __Pyx_TraceCall("__get__", __pyx_f[3], 142, 0, __PYX_ERR(3, 142, __pyx_L1_error));
86697 __Pyx_XDECREF(__pyx_r);
86698 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->header_written); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 142, __pyx_L1_error)
86699 __Pyx_GOTREF(__pyx_t_1);
86700 __pyx_r = __pyx_t_1;
86701 __pyx_t_1 = 0;
86702 goto __pyx_L0;
86703
86704 /* function exit code */
86705 __pyx_L1_error:;
86706 __Pyx_XDECREF(__pyx_t_1);
86707 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.header_written.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86708 __pyx_r = NULL;
86709 __pyx_L0:;
86710 __Pyx_XGIVEREF(__pyx_r);
86711 __Pyx_TraceReturn(__pyx_r, 0);
86712 __Pyx_RefNannyFinishContext();
86713 return __pyx_r;
86714 }
86715
86716 /* "(tree fragment)":1
86717 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
86718 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
86719 * def __setstate_cython__(self, __pyx_state):
86720 */
86721
86722 /* Python wrapper */
86723 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_33__reduce_cython__(PyObject *__pyx_v_self,
86724 #if CYTHON_METH_FASTCALL
86725 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86726 #else
86727 PyObject *__pyx_args, PyObject *__pyx_kwds
86728 #endif
86729 ); /*proto*/
86730 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_32__reduce_cython__, "VariantFile.__reduce_cython__(self)");
86731 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_33__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_33__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_32__reduce_cython__};
86732 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_33__reduce_cython__(PyObject *__pyx_v_self,
86733 #if CYTHON_METH_FASTCALL
86734 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86735 #else
86736 PyObject *__pyx_args, PyObject *__pyx_kwds
86737 #endif
86738 ) {
86739 #if !CYTHON_METH_FASTCALL
86740 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
86741 #endif
86742 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86743 PyObject *__pyx_r = 0;
86744 __Pyx_RefNannyDeclarations
86745 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
86746 #if !CYTHON_METH_FASTCALL
86747 #if CYTHON_ASSUME_SAFE_MACROS
86748 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
86749 #else
86750 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
86751 #endif
86752 #endif
86753 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
86754 if (unlikely(__pyx_nargs > 0)) {
86755 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
86756 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
86757 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_32__reduce_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self));
86758
86759 /* function exit code */
86760 __Pyx_RefNannyFinishContext();
86761 return __pyx_r;
86762 }
86763
86764 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self) {
86765 PyObject *__pyx_r = NULL;
86766 __Pyx_TraceDeclarations
86767 __Pyx_RefNannyDeclarations
86768 int __pyx_lineno = 0;
86769 const char *__pyx_filename = NULL;
86770 int __pyx_clineno = 0;
86771 __Pyx_TraceFrameInit(__pyx_codeobj__257)
86772 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
86773 __Pyx_TraceCall("__reduce_cython__", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
86774
86775 /* "(tree fragment)":2
86776 * def __reduce_cython__(self):
86777 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
86778 * def __setstate_cython__(self, __pyx_state):
86779 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
86780 */
86781 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
86782 __PYX_ERR(4, 2, __pyx_L1_error)
86783
86784 /* "(tree fragment)":1
86785 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
86786 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
86787 * def __setstate_cython__(self, __pyx_state):
86788 */
86789
86790 /* function exit code */
86791 __pyx_L1_error:;
86792 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86793 __pyx_r = NULL;
86794 __Pyx_XGIVEREF(__pyx_r);
86795 __Pyx_TraceReturn(__pyx_r, 0);
86796 __Pyx_RefNannyFinishContext();
86797 return __pyx_r;
86798 }
86799
86800 /* "(tree fragment)":3
86801 * def __reduce_cython__(self):
86802 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
86803 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
86804 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
86805 */
86806
86807 /* Python wrapper */
86808 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_35__setstate_cython__(PyObject *__pyx_v_self,
86809 #if CYTHON_METH_FASTCALL
86810 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86811 #else
86812 PyObject *__pyx_args, PyObject *__pyx_kwds
86813 #endif
86814 ); /*proto*/
86815 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_11VariantFile_34__setstate_cython__, "VariantFile.__setstate_cython__(self, __pyx_state)");
86816 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11VariantFile_35__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_35__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_34__setstate_cython__};
86817 static PyObject *__pyx_pw_5pysam_7libcbcf_11VariantFile_35__setstate_cython__(PyObject *__pyx_v_self,
86818 #if CYTHON_METH_FASTCALL
86819 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86820 #else
86821 PyObject *__pyx_args, PyObject *__pyx_kwds
86822 #endif
86823 ) {
86824 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
86825 #if !CYTHON_METH_FASTCALL
86826 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
86827 #endif
86828 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86829 PyObject* values[1] = {0};
86830 int __pyx_lineno = 0;
86831 const char *__pyx_filename = NULL;
86832 int __pyx_clineno = 0;
86833 PyObject *__pyx_r = 0;
86834 __Pyx_RefNannyDeclarations
86835 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
86836 #if !CYTHON_METH_FASTCALL
86837 #if CYTHON_ASSUME_SAFE_MACROS
86838 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
86839 #else
86840 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
86841 #endif
86842 #endif
86843 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
86844 {
86845 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
86846 if (__pyx_kwds) {
86847 Py_ssize_t kw_args;
86848 switch (__pyx_nargs) {
86849 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
86850 CYTHON_FALLTHROUGH;
86851 case 0: break;
86852 default: goto __pyx_L5_argtuple_error;
86853 }
86854 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
86855 switch (__pyx_nargs) {
86856 case 0:
86857 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
86858 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
86859 kw_args--;
86860 }
86861 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 3, __pyx_L3_error)
86862 else goto __pyx_L5_argtuple_error;
86863 }
86864 if (unlikely(kw_args > 0)) {
86865 const Py_ssize_t kwd_pos_args = __pyx_nargs;
86866 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(4, 3, __pyx_L3_error)
86867 }
86868 } else if (unlikely(__pyx_nargs != 1)) {
86869 goto __pyx_L5_argtuple_error;
86870 } else {
86871 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
86872 }
86873 __pyx_v___pyx_state = values[0];
86874 }
86875 goto __pyx_L6_skip;
86876 __pyx_L5_argtuple_error:;
86877 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error)
86878 __pyx_L6_skip:;
86879 goto __pyx_L4_argument_unpacking_done;
86880 __pyx_L3_error:;
86881 {
86882 Py_ssize_t __pyx_temp;
86883 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
86884 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
86885 }
86886 }
86887 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86888 __Pyx_RefNannyFinishContext();
86889 return NULL;
86890 __pyx_L4_argument_unpacking_done:;
86891 __pyx_r = __pyx_pf_5pysam_7libcbcf_11VariantFile_34__setstate_cython__(((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)__pyx_v_self), __pyx_v___pyx_state);
86892
86893 /* function exit code */
86894 {
86895 Py_ssize_t __pyx_temp;
86896 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
86897 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
86898 }
86899 }
86900 __Pyx_RefNannyFinishContext();
86901 return __pyx_r;
86902 }
86903
86904 static PyObject *__pyx_pf_5pysam_7libcbcf_11VariantFile_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcbcf_VariantFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
86905 PyObject *__pyx_r = NULL;
86906 __Pyx_TraceDeclarations
86907 __Pyx_RefNannyDeclarations
86908 int __pyx_lineno = 0;
86909 const char *__pyx_filename = NULL;
86910 int __pyx_clineno = 0;
86911 __Pyx_TraceFrameInit(__pyx_codeobj__258)
86912 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
86913 __Pyx_TraceCall("__setstate_cython__", __pyx_f[4], 3, 0, __PYX_ERR(4, 3, __pyx_L1_error));
86914
86915 /* "(tree fragment)":4
86916 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
86917 * def __setstate_cython__(self, __pyx_state):
86918 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
86919 */
86920 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
86921 __PYX_ERR(4, 4, __pyx_L1_error)
86922
86923 /* "(tree fragment)":3
86924 * def __reduce_cython__(self):
86925 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
86926 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
86927 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
86928 */
86929
86930 /* function exit code */
86931 __pyx_L1_error:;
86932 __Pyx_AddTraceback("pysam.libcbcf.VariantFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86933 __pyx_r = NULL;
86934 __Pyx_XGIVEREF(__pyx_r);
86935 __Pyx_TraceReturn(__pyx_r, 0);
86936 __Pyx_RefNannyFinishContext();
86937 return __pyx_r;
86938 }
86939
86940 /* "(tree fragment)":1
86941 * def __pyx_unpickle_VariantHeaderRecords(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
86942 * cdef object __pyx_PickleError
86943 * cdef object __pyx_result
86944 */
86945
86946 /* Python wrapper */
86947 static PyObject *__pyx_pw_5pysam_7libcbcf_1__pyx_unpickle_VariantHeaderRecords(PyObject *__pyx_self,
86948 #if CYTHON_METH_FASTCALL
86949 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86950 #else
86951 PyObject *__pyx_args, PyObject *__pyx_kwds
86952 #endif
86953 ); /*proto*/
86954 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords, "__pyx_unpickle_VariantHeaderRecords(__pyx_type, long __pyx_checksum, __pyx_state)");
86955 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_1__pyx_unpickle_VariantHeaderRecords = {"__pyx_unpickle_VariantHeaderRecords", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_1__pyx_unpickle_VariantHeaderRecords, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords};
86956 static PyObject *__pyx_pw_5pysam_7libcbcf_1__pyx_unpickle_VariantHeaderRecords(PyObject *__pyx_self,
86957 #if CYTHON_METH_FASTCALL
86958 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
86959 #else
86960 PyObject *__pyx_args, PyObject *__pyx_kwds
86961 #endif
86962 ) {
86963 PyObject *__pyx_v___pyx_type = 0;
86964 long __pyx_v___pyx_checksum;
86965 PyObject *__pyx_v___pyx_state = 0;
86966 #if !CYTHON_METH_FASTCALL
86967 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
86968 #endif
86969 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
86970 PyObject* values[3] = {0,0,0};
86971 int __pyx_lineno = 0;
86972 const char *__pyx_filename = NULL;
86973 int __pyx_clineno = 0;
86974 PyObject *__pyx_r = 0;
86975 __Pyx_RefNannyDeclarations
86976 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderRecords (wrapper)", 0);
86977 #if !CYTHON_METH_FASTCALL
86978 #if CYTHON_ASSUME_SAFE_MACROS
86979 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
86980 #else
86981 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
86982 #endif
86983 #endif
86984 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
86985 {
86986 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
86987 if (__pyx_kwds) {
86988 Py_ssize_t kw_args;
86989 switch (__pyx_nargs) {
86990 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
86991 CYTHON_FALLTHROUGH;
86992 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
86993 CYTHON_FALLTHROUGH;
86994 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
86995 CYTHON_FALLTHROUGH;
86996 case 0: break;
86997 default: goto __pyx_L5_argtuple_error;
86998 }
86999 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
87000 switch (__pyx_nargs) {
87001 case 0:
87002 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
87003 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
87004 kw_args--;
87005 }
87006 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87007 else goto __pyx_L5_argtuple_error;
87008 CYTHON_FALLTHROUGH;
87009 case 1:
87010 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
87011 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
87012 kw_args--;
87013 }
87014 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87015 else {
87016 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderRecords", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
87017 }
87018 CYTHON_FALLTHROUGH;
87019 case 2:
87020 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
87021 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
87022 kw_args--;
87023 }
87024 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87025 else {
87026 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderRecords", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
87027 }
87028 }
87029 if (unlikely(kw_args > 0)) {
87030 const Py_ssize_t kwd_pos_args = __pyx_nargs;
87031 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantHeaderRecords") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
87032 }
87033 } else if (unlikely(__pyx_nargs != 3)) {
87034 goto __pyx_L5_argtuple_error;
87035 } else {
87036 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
87037 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
87038 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
87039 }
87040 __pyx_v___pyx_type = values[0];
87041 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87042 __pyx_v___pyx_state = values[2];
87043 }
87044 goto __pyx_L6_skip;
87045 __pyx_L5_argtuple_error:;
87046 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderRecords", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
87047 __pyx_L6_skip:;
87048 goto __pyx_L4_argument_unpacking_done;
87049 __pyx_L3_error:;
87050 {
87051 Py_ssize_t __pyx_temp;
87052 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
87053 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
87054 }
87055 }
87056 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderRecords", __pyx_clineno, __pyx_lineno, __pyx_filename);
87057 __Pyx_RefNannyFinishContext();
87058 return NULL;
87059 __pyx_L4_argument_unpacking_done:;
87060 __pyx_r = __pyx_pf_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
87061
87062 /* function exit code */
87063 {
87064 Py_ssize_t __pyx_temp;
87065 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
87066 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
87067 }
87068 }
87069 __Pyx_RefNannyFinishContext();
87070 return __pyx_r;
87071 }
87072
87073 static PyObject *__pyx_pf_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
87074 PyObject *__pyx_v___pyx_PickleError = 0;
87075 PyObject *__pyx_v___pyx_result = 0;
87076 PyObject *__pyx_r = NULL;
87077 __Pyx_TraceDeclarations
87078 __Pyx_RefNannyDeclarations
87079 PyObject *__pyx_t_1 = NULL;
87080 int __pyx_t_2;
87081 PyObject *__pyx_t_3 = NULL;
87082 PyObject *__pyx_t_4 = NULL;
87083 unsigned int __pyx_t_5;
87084 int __pyx_lineno = 0;
87085 const char *__pyx_filename = NULL;
87086 int __pyx_clineno = 0;
87087 __Pyx_TraceFrameInit(__pyx_codeobj__259)
87088 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderRecords", 1);
87089 __Pyx_TraceCall("__pyx_unpickle_VariantHeaderRecords", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
87090
87091 /* "(tree fragment)":4
87092 * cdef object __pyx_PickleError
87093 * cdef object __pyx_result
87094 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99): # <<<<<<<<<<<<<<
87095 * from pickle import PickleError as __pyx_PickleError
87096 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
87097 */
87098 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
87099 __Pyx_GOTREF(__pyx_t_1);
87100 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__260, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
87101 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87102 if (__pyx_t_2) {
87103
87104 /* "(tree fragment)":5
87105 * cdef object __pyx_result
87106 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99):
87107 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
87108 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
87109 * __pyx_result = VariantHeaderRecords.__new__(__pyx_type)
87110 */
87111 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
87112 __Pyx_GOTREF(__pyx_t_1);
87113 __Pyx_INCREF(__pyx_n_s_PickleError);
87114 __Pyx_GIVEREF(__pyx_n_s_PickleError);
87115 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
87116 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
87117 __Pyx_GOTREF(__pyx_t_3);
87118 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87119 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
87120 __Pyx_GOTREF(__pyx_t_1);
87121 __Pyx_INCREF(__pyx_t_1);
87122 __pyx_v___pyx_PickleError = __pyx_t_1;
87123 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87124 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
87125
87126 /* "(tree fragment)":6
87127 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99):
87128 * from pickle import PickleError as __pyx_PickleError
87129 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum # <<<<<<<<<<<<<<
87130 * __pyx_result = VariantHeaderRecords.__new__(__pyx_type)
87131 * if __pyx_state is not None:
87132 */
87133 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
87134 __Pyx_GOTREF(__pyx_t_3);
87135 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
87136 __Pyx_GOTREF(__pyx_t_1);
87137 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
87138 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
87139 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87140 __PYX_ERR(4, 6, __pyx_L1_error)
87141
87142 /* "(tree fragment)":4
87143 * cdef object __pyx_PickleError
87144 * cdef object __pyx_result
87145 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99): # <<<<<<<<<<<<<<
87146 * from pickle import PickleError as __pyx_PickleError
87147 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
87148 */
87149 }
87150
87151 /* "(tree fragment)":7
87152 * from pickle import PickleError as __pyx_PickleError
87153 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
87154 * __pyx_result = VariantHeaderRecords.__new__(__pyx_type) # <<<<<<<<<<<<<<
87155 * if __pyx_state is not None:
87156 * __pyx_unpickle_VariantHeaderRecords__set_state(<VariantHeaderRecords> __pyx_result, __pyx_state)
87157 */
87158 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
87159 __Pyx_GOTREF(__pyx_t_3);
87160 __pyx_t_4 = NULL;
87161 __pyx_t_5 = 0;
87162 #if CYTHON_UNPACK_METHODS
87163 if (likely(PyMethod_Check(__pyx_t_3))) {
87164 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
87165 if (likely(__pyx_t_4)) {
87166 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
87167 __Pyx_INCREF(__pyx_t_4);
87168 __Pyx_INCREF(function);
87169 __Pyx_DECREF_SET(__pyx_t_3, function);
87170 __pyx_t_5 = 1;
87171 }
87172 }
87173 #endif
87174 {
87175 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
87176 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
87177 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
87178 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
87179 __Pyx_GOTREF(__pyx_t_1);
87180 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
87181 }
87182 __pyx_v___pyx_result = __pyx_t_1;
87183 __pyx_t_1 = 0;
87184
87185 /* "(tree fragment)":8
87186 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
87187 * __pyx_result = VariantHeaderRecords.__new__(__pyx_type)
87188 * if __pyx_state is not None: # <<<<<<<<<<<<<<
87189 * __pyx_unpickle_VariantHeaderRecords__set_state(<VariantHeaderRecords> __pyx_result, __pyx_state)
87190 * return __pyx_result
87191 */
87192 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
87193 if (__pyx_t_2) {
87194
87195 /* "(tree fragment)":9
87196 * __pyx_result = VariantHeaderRecords.__new__(__pyx_type)
87197 * if __pyx_state is not None:
87198 * __pyx_unpickle_VariantHeaderRecords__set_state(<VariantHeaderRecords> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
87199 * return __pyx_result
87200 * cdef __pyx_unpickle_VariantHeaderRecords__set_state(VariantHeaderRecords __pyx_result, tuple __pyx_state):
87201 */
87202 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
87203 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
87204 __Pyx_GOTREF(__pyx_t_1);
87205 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87206
87207 /* "(tree fragment)":8
87208 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
87209 * __pyx_result = VariantHeaderRecords.__new__(__pyx_type)
87210 * if __pyx_state is not None: # <<<<<<<<<<<<<<
87211 * __pyx_unpickle_VariantHeaderRecords__set_state(<VariantHeaderRecords> __pyx_result, __pyx_state)
87212 * return __pyx_result
87213 */
87214 }
87215
87216 /* "(tree fragment)":10
87217 * if __pyx_state is not None:
87218 * __pyx_unpickle_VariantHeaderRecords__set_state(<VariantHeaderRecords> __pyx_result, __pyx_state)
87219 * return __pyx_result # <<<<<<<<<<<<<<
87220 * cdef __pyx_unpickle_VariantHeaderRecords__set_state(VariantHeaderRecords __pyx_result, tuple __pyx_state):
87221 * __pyx_result.header = __pyx_state[0]
87222 */
87223 __Pyx_XDECREF(__pyx_r);
87224 __Pyx_INCREF(__pyx_v___pyx_result);
87225 __pyx_r = __pyx_v___pyx_result;
87226 goto __pyx_L0;
87227
87228 /* "(tree fragment)":1
87229 * def __pyx_unpickle_VariantHeaderRecords(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
87230 * cdef object __pyx_PickleError
87231 * cdef object __pyx_result
87232 */
87233
87234 /* function exit code */
87235 __pyx_L1_error:;
87236 __Pyx_XDECREF(__pyx_t_1);
87237 __Pyx_XDECREF(__pyx_t_3);
87238 __Pyx_XDECREF(__pyx_t_4);
87239 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderRecords", __pyx_clineno, __pyx_lineno, __pyx_filename);
87240 __pyx_r = NULL;
87241 __pyx_L0:;
87242 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
87243 __Pyx_XDECREF(__pyx_v___pyx_result);
87244 __Pyx_XGIVEREF(__pyx_r);
87245 __Pyx_TraceReturn(__pyx_r, 0);
87246 __Pyx_RefNannyFinishContext();
87247 return __pyx_r;
87248 }
87249
87250 /* "(tree fragment)":11
87251 * __pyx_unpickle_VariantHeaderRecords__set_state(<VariantHeaderRecords> __pyx_result, __pyx_state)
87252 * return __pyx_result
87253 * cdef __pyx_unpickle_VariantHeaderRecords__set_state(VariantHeaderRecords __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
87254 * __pyx_result.header = __pyx_state[0]
87255 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
87256 */
87257
87258 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderRecords__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
87259 PyObject *__pyx_r = NULL;
87260 __Pyx_TraceDeclarations
87261 __Pyx_RefNannyDeclarations
87262 PyObject *__pyx_t_1 = NULL;
87263 int __pyx_t_2;
87264 Py_ssize_t __pyx_t_3;
87265 int __pyx_t_4;
87266 PyObject *__pyx_t_5 = NULL;
87267 PyObject *__pyx_t_6 = NULL;
87268 PyObject *__pyx_t_7 = NULL;
87269 unsigned int __pyx_t_8;
87270 int __pyx_lineno = 0;
87271 const char *__pyx_filename = NULL;
87272 int __pyx_clineno = 0;
87273 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderRecords__set_state", 1);
87274 __Pyx_TraceCall("__pyx_unpickle_VariantHeaderRecords__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
87275
87276 /* "(tree fragment)":12
87277 * return __pyx_result
87278 * cdef __pyx_unpickle_VariantHeaderRecords__set_state(VariantHeaderRecords __pyx_result, tuple __pyx_state):
87279 * __pyx_result.header = __pyx_state[0] # <<<<<<<<<<<<<<
87280 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
87281 * __pyx_result.__dict__.update(__pyx_state[1])
87282 */
87283 if (unlikely(__pyx_v___pyx_state == Py_None)) {
87284 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
87285 __PYX_ERR(4, 12, __pyx_L1_error)
87286 }
87287 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
87288 __Pyx_GOTREF(__pyx_t_1);
87289 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantHeader))))) __PYX_ERR(4, 12, __pyx_L1_error)
87290 __Pyx_GIVEREF(__pyx_t_1);
87291 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->header);
87292 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->header);
87293 __pyx_v___pyx_result->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_1);
87294 __pyx_t_1 = 0;
87295
87296 /* "(tree fragment)":13
87297 * cdef __pyx_unpickle_VariantHeaderRecords__set_state(VariantHeaderRecords __pyx_result, tuple __pyx_state):
87298 * __pyx_result.header = __pyx_state[0]
87299 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
87300 * __pyx_result.__dict__.update(__pyx_state[1])
87301 */
87302 if (unlikely(__pyx_v___pyx_state == Py_None)) {
87303 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
87304 __PYX_ERR(4, 13, __pyx_L1_error)
87305 }
87306 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
87307 __pyx_t_4 = (__pyx_t_3 > 1);
87308 if (__pyx_t_4) {
87309 } else {
87310 __pyx_t_2 = __pyx_t_4;
87311 goto __pyx_L4_bool_binop_done;
87312 }
87313 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
87314 __pyx_t_2 = __pyx_t_4;
87315 __pyx_L4_bool_binop_done:;
87316 if (__pyx_t_2) {
87317
87318 /* "(tree fragment)":14
87319 * __pyx_result.header = __pyx_state[0]
87320 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
87321 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
87322 */
87323 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
87324 __Pyx_GOTREF(__pyx_t_5);
87325 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
87326 __Pyx_GOTREF(__pyx_t_6);
87327 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
87328 if (unlikely(__pyx_v___pyx_state == Py_None)) {
87329 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
87330 __PYX_ERR(4, 14, __pyx_L1_error)
87331 }
87332 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
87333 __Pyx_GOTREF(__pyx_t_5);
87334 __pyx_t_7 = NULL;
87335 __pyx_t_8 = 0;
87336 #if CYTHON_UNPACK_METHODS
87337 if (likely(PyMethod_Check(__pyx_t_6))) {
87338 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
87339 if (likely(__pyx_t_7)) {
87340 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
87341 __Pyx_INCREF(__pyx_t_7);
87342 __Pyx_INCREF(function);
87343 __Pyx_DECREF_SET(__pyx_t_6, function);
87344 __pyx_t_8 = 1;
87345 }
87346 }
87347 #endif
87348 {
87349 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
87350 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
87351 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
87352 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
87353 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
87354 __Pyx_GOTREF(__pyx_t_1);
87355 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
87356 }
87357 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87358
87359 /* "(tree fragment)":13
87360 * cdef __pyx_unpickle_VariantHeaderRecords__set_state(VariantHeaderRecords __pyx_result, tuple __pyx_state):
87361 * __pyx_result.header = __pyx_state[0]
87362 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
87363 * __pyx_result.__dict__.update(__pyx_state[1])
87364 */
87365 }
87366
87367 /* "(tree fragment)":11
87368 * __pyx_unpickle_VariantHeaderRecords__set_state(<VariantHeaderRecords> __pyx_result, __pyx_state)
87369 * return __pyx_result
87370 * cdef __pyx_unpickle_VariantHeaderRecords__set_state(VariantHeaderRecords __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
87371 * __pyx_result.header = __pyx_state[0]
87372 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
87373 */
87374
87375 /* function exit code */
87376 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
87377 goto __pyx_L0;
87378 __pyx_L1_error:;
87379 __Pyx_XDECREF(__pyx_t_1);
87380 __Pyx_XDECREF(__pyx_t_5);
87381 __Pyx_XDECREF(__pyx_t_6);
87382 __Pyx_XDECREF(__pyx_t_7);
87383 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderRecords__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
87384 __pyx_r = 0;
87385 __pyx_L0:;
87386 __Pyx_XGIVEREF(__pyx_r);
87387 __Pyx_TraceReturn(__pyx_r, 0);
87388 __Pyx_RefNannyFinishContext();
87389 return __pyx_r;
87390 }
87391
87392 /* "(tree fragment)":1
87393 * def __pyx_unpickle_VariantMetadata(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
87394 * cdef object __pyx_PickleError
87395 * cdef object __pyx_result
87396 */
87397
87398 /* Python wrapper */
87399 static PyObject *__pyx_pw_5pysam_7libcbcf_3__pyx_unpickle_VariantMetadata(PyObject *__pyx_self,
87400 #if CYTHON_METH_FASTCALL
87401 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
87402 #else
87403 PyObject *__pyx_args, PyObject *__pyx_kwds
87404 #endif
87405 ); /*proto*/
87406 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_2__pyx_unpickle_VariantMetadata, "__pyx_unpickle_VariantMetadata(__pyx_type, long __pyx_checksum, __pyx_state)");
87407 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_3__pyx_unpickle_VariantMetadata = {"__pyx_unpickle_VariantMetadata", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_3__pyx_unpickle_VariantMetadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_2__pyx_unpickle_VariantMetadata};
87408 static PyObject *__pyx_pw_5pysam_7libcbcf_3__pyx_unpickle_VariantMetadata(PyObject *__pyx_self,
87409 #if CYTHON_METH_FASTCALL
87410 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
87411 #else
87412 PyObject *__pyx_args, PyObject *__pyx_kwds
87413 #endif
87414 ) {
87415 PyObject *__pyx_v___pyx_type = 0;
87416 long __pyx_v___pyx_checksum;
87417 PyObject *__pyx_v___pyx_state = 0;
87418 #if !CYTHON_METH_FASTCALL
87419 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
87420 #endif
87421 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
87422 PyObject* values[3] = {0,0,0};
87423 int __pyx_lineno = 0;
87424 const char *__pyx_filename = NULL;
87425 int __pyx_clineno = 0;
87426 PyObject *__pyx_r = 0;
87427 __Pyx_RefNannyDeclarations
87428 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantMetadata (wrapper)", 0);
87429 #if !CYTHON_METH_FASTCALL
87430 #if CYTHON_ASSUME_SAFE_MACROS
87431 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
87432 #else
87433 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
87434 #endif
87435 #endif
87436 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
87437 {
87438 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
87439 if (__pyx_kwds) {
87440 Py_ssize_t kw_args;
87441 switch (__pyx_nargs) {
87442 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
87443 CYTHON_FALLTHROUGH;
87444 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
87445 CYTHON_FALLTHROUGH;
87446 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
87447 CYTHON_FALLTHROUGH;
87448 case 0: break;
87449 default: goto __pyx_L5_argtuple_error;
87450 }
87451 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
87452 switch (__pyx_nargs) {
87453 case 0:
87454 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
87455 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
87456 kw_args--;
87457 }
87458 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87459 else goto __pyx_L5_argtuple_error;
87460 CYTHON_FALLTHROUGH;
87461 case 1:
87462 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
87463 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
87464 kw_args--;
87465 }
87466 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87467 else {
87468 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantMetadata", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
87469 }
87470 CYTHON_FALLTHROUGH;
87471 case 2:
87472 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
87473 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
87474 kw_args--;
87475 }
87476 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87477 else {
87478 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantMetadata", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
87479 }
87480 }
87481 if (unlikely(kw_args > 0)) {
87482 const Py_ssize_t kwd_pos_args = __pyx_nargs;
87483 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantMetadata") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
87484 }
87485 } else if (unlikely(__pyx_nargs != 3)) {
87486 goto __pyx_L5_argtuple_error;
87487 } else {
87488 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
87489 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
87490 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
87491 }
87492 __pyx_v___pyx_type = values[0];
87493 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87494 __pyx_v___pyx_state = values[2];
87495 }
87496 goto __pyx_L6_skip;
87497 __pyx_L5_argtuple_error:;
87498 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantMetadata", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
87499 __pyx_L6_skip:;
87500 goto __pyx_L4_argument_unpacking_done;
87501 __pyx_L3_error:;
87502 {
87503 Py_ssize_t __pyx_temp;
87504 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
87505 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
87506 }
87507 }
87508 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
87509 __Pyx_RefNannyFinishContext();
87510 return NULL;
87511 __pyx_L4_argument_unpacking_done:;
87512 __pyx_r = __pyx_pf_5pysam_7libcbcf_2__pyx_unpickle_VariantMetadata(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
87513
87514 /* function exit code */
87515 {
87516 Py_ssize_t __pyx_temp;
87517 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
87518 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
87519 }
87520 }
87521 __Pyx_RefNannyFinishContext();
87522 return __pyx_r;
87523 }
87524
87525 static PyObject *__pyx_pf_5pysam_7libcbcf_2__pyx_unpickle_VariantMetadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
87526 PyObject *__pyx_v___pyx_PickleError = 0;
87527 PyObject *__pyx_v___pyx_result = 0;
87528 PyObject *__pyx_r = NULL;
87529 __Pyx_TraceDeclarations
87530 __Pyx_RefNannyDeclarations
87531 PyObject *__pyx_t_1 = NULL;
87532 int __pyx_t_2;
87533 PyObject *__pyx_t_3 = NULL;
87534 PyObject *__pyx_t_4 = NULL;
87535 unsigned int __pyx_t_5;
87536 int __pyx_lineno = 0;
87537 const char *__pyx_filename = NULL;
87538 int __pyx_clineno = 0;
87539 __Pyx_TraceFrameInit(__pyx_codeobj__261)
87540 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantMetadata", 1);
87541 __Pyx_TraceCall("__pyx_unpickle_VariantMetadata", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
87542
87543 /* "(tree fragment)":4
87544 * cdef object __pyx_PickleError
87545 * cdef object __pyx_result
87546 * if __pyx_checksum not in (0xcd1335f, 0xa03cdd6, 0x9d0a56c): # <<<<<<<<<<<<<<
87547 * from pickle import PickleError as __pyx_PickleError
87548 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xcd1335f, 0xa03cdd6, 0x9d0a56c) = (header, id, type))" % __pyx_checksum
87549 */
87550 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
87551 __Pyx_GOTREF(__pyx_t_1);
87552 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__262, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
87553 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87554 if (__pyx_t_2) {
87555
87556 /* "(tree fragment)":5
87557 * cdef object __pyx_result
87558 * if __pyx_checksum not in (0xcd1335f, 0xa03cdd6, 0x9d0a56c):
87559 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
87560 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xcd1335f, 0xa03cdd6, 0x9d0a56c) = (header, id, type))" % __pyx_checksum
87561 * __pyx_result = VariantMetadata.__new__(__pyx_type)
87562 */
87563 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
87564 __Pyx_GOTREF(__pyx_t_1);
87565 __Pyx_INCREF(__pyx_n_s_PickleError);
87566 __Pyx_GIVEREF(__pyx_n_s_PickleError);
87567 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
87568 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
87569 __Pyx_GOTREF(__pyx_t_3);
87570 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87571 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
87572 __Pyx_GOTREF(__pyx_t_1);
87573 __Pyx_INCREF(__pyx_t_1);
87574 __pyx_v___pyx_PickleError = __pyx_t_1;
87575 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87576 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
87577
87578 /* "(tree fragment)":6
87579 * if __pyx_checksum not in (0xcd1335f, 0xa03cdd6, 0x9d0a56c):
87580 * from pickle import PickleError as __pyx_PickleError
87581 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xcd1335f, 0xa03cdd6, 0x9d0a56c) = (header, id, type))" % __pyx_checksum # <<<<<<<<<<<<<<
87582 * __pyx_result = VariantMetadata.__new__(__pyx_type)
87583 * if __pyx_state is not None:
87584 */
87585 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
87586 __Pyx_GOTREF(__pyx_t_3);
87587 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
87588 __Pyx_GOTREF(__pyx_t_1);
87589 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
87590 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
87591 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87592 __PYX_ERR(4, 6, __pyx_L1_error)
87593
87594 /* "(tree fragment)":4
87595 * cdef object __pyx_PickleError
87596 * cdef object __pyx_result
87597 * if __pyx_checksum not in (0xcd1335f, 0xa03cdd6, 0x9d0a56c): # <<<<<<<<<<<<<<
87598 * from pickle import PickleError as __pyx_PickleError
87599 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xcd1335f, 0xa03cdd6, 0x9d0a56c) = (header, id, type))" % __pyx_checksum
87600 */
87601 }
87602
87603 /* "(tree fragment)":7
87604 * from pickle import PickleError as __pyx_PickleError
87605 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xcd1335f, 0xa03cdd6, 0x9d0a56c) = (header, id, type))" % __pyx_checksum
87606 * __pyx_result = VariantMetadata.__new__(__pyx_type) # <<<<<<<<<<<<<<
87607 * if __pyx_state is not None:
87608 * __pyx_unpickle_VariantMetadata__set_state(<VariantMetadata> __pyx_result, __pyx_state)
87609 */
87610 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantMetadata), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
87611 __Pyx_GOTREF(__pyx_t_3);
87612 __pyx_t_4 = NULL;
87613 __pyx_t_5 = 0;
87614 #if CYTHON_UNPACK_METHODS
87615 if (likely(PyMethod_Check(__pyx_t_3))) {
87616 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
87617 if (likely(__pyx_t_4)) {
87618 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
87619 __Pyx_INCREF(__pyx_t_4);
87620 __Pyx_INCREF(function);
87621 __Pyx_DECREF_SET(__pyx_t_3, function);
87622 __pyx_t_5 = 1;
87623 }
87624 }
87625 #endif
87626 {
87627 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
87628 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
87629 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
87630 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
87631 __Pyx_GOTREF(__pyx_t_1);
87632 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
87633 }
87634 __pyx_v___pyx_result = __pyx_t_1;
87635 __pyx_t_1 = 0;
87636
87637 /* "(tree fragment)":8
87638 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xcd1335f, 0xa03cdd6, 0x9d0a56c) = (header, id, type))" % __pyx_checksum
87639 * __pyx_result = VariantMetadata.__new__(__pyx_type)
87640 * if __pyx_state is not None: # <<<<<<<<<<<<<<
87641 * __pyx_unpickle_VariantMetadata__set_state(<VariantMetadata> __pyx_result, __pyx_state)
87642 * return __pyx_result
87643 */
87644 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
87645 if (__pyx_t_2) {
87646
87647 /* "(tree fragment)":9
87648 * __pyx_result = VariantMetadata.__new__(__pyx_type)
87649 * if __pyx_state is not None:
87650 * __pyx_unpickle_VariantMetadata__set_state(<VariantMetadata> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
87651 * return __pyx_result
87652 * cdef __pyx_unpickle_VariantMetadata__set_state(VariantMetadata __pyx_result, tuple __pyx_state):
87653 */
87654 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
87655 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantMetadata__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
87656 __Pyx_GOTREF(__pyx_t_1);
87657 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87658
87659 /* "(tree fragment)":8
87660 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xcd1335f, 0xa03cdd6, 0x9d0a56c) = (header, id, type))" % __pyx_checksum
87661 * __pyx_result = VariantMetadata.__new__(__pyx_type)
87662 * if __pyx_state is not None: # <<<<<<<<<<<<<<
87663 * __pyx_unpickle_VariantMetadata__set_state(<VariantMetadata> __pyx_result, __pyx_state)
87664 * return __pyx_result
87665 */
87666 }
87667
87668 /* "(tree fragment)":10
87669 * if __pyx_state is not None:
87670 * __pyx_unpickle_VariantMetadata__set_state(<VariantMetadata> __pyx_result, __pyx_state)
87671 * return __pyx_result # <<<<<<<<<<<<<<
87672 * cdef __pyx_unpickle_VariantMetadata__set_state(VariantMetadata __pyx_result, tuple __pyx_state):
87673 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]; __pyx_result.type = __pyx_state[2]
87674 */
87675 __Pyx_XDECREF(__pyx_r);
87676 __Pyx_INCREF(__pyx_v___pyx_result);
87677 __pyx_r = __pyx_v___pyx_result;
87678 goto __pyx_L0;
87679
87680 /* "(tree fragment)":1
87681 * def __pyx_unpickle_VariantMetadata(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
87682 * cdef object __pyx_PickleError
87683 * cdef object __pyx_result
87684 */
87685
87686 /* function exit code */
87687 __pyx_L1_error:;
87688 __Pyx_XDECREF(__pyx_t_1);
87689 __Pyx_XDECREF(__pyx_t_3);
87690 __Pyx_XDECREF(__pyx_t_4);
87691 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
87692 __pyx_r = NULL;
87693 __pyx_L0:;
87694 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
87695 __Pyx_XDECREF(__pyx_v___pyx_result);
87696 __Pyx_XGIVEREF(__pyx_r);
87697 __Pyx_TraceReturn(__pyx_r, 0);
87698 __Pyx_RefNannyFinishContext();
87699 return __pyx_r;
87700 }
87701
87702 /* "(tree fragment)":11
87703 * __pyx_unpickle_VariantMetadata__set_state(<VariantMetadata> __pyx_result, __pyx_state)
87704 * return __pyx_result
87705 * cdef __pyx_unpickle_VariantMetadata__set_state(VariantMetadata __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
87706 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]; __pyx_result.type = __pyx_state[2]
87707 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
87708 */
87709
87710 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantMetadata__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
87711 PyObject *__pyx_r = NULL;
87712 __Pyx_TraceDeclarations
87713 __Pyx_RefNannyDeclarations
87714 PyObject *__pyx_t_1 = NULL;
87715 int __pyx_t_2;
87716 int __pyx_t_3;
87717 Py_ssize_t __pyx_t_4;
87718 int __pyx_t_5;
87719 PyObject *__pyx_t_6 = NULL;
87720 PyObject *__pyx_t_7 = NULL;
87721 PyObject *__pyx_t_8 = NULL;
87722 unsigned int __pyx_t_9;
87723 int __pyx_lineno = 0;
87724 const char *__pyx_filename = NULL;
87725 int __pyx_clineno = 0;
87726 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantMetadata__set_state", 1);
87727 __Pyx_TraceCall("__pyx_unpickle_VariantMetadata__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
87728
87729 /* "(tree fragment)":12
87730 * return __pyx_result
87731 * cdef __pyx_unpickle_VariantMetadata__set_state(VariantMetadata __pyx_result, tuple __pyx_state):
87732 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]; __pyx_result.type = __pyx_state[2] # <<<<<<<<<<<<<<
87733 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
87734 * __pyx_result.__dict__.update(__pyx_state[3])
87735 */
87736 if (unlikely(__pyx_v___pyx_state == Py_None)) {
87737 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
87738 __PYX_ERR(4, 12, __pyx_L1_error)
87739 }
87740 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
87741 __Pyx_GOTREF(__pyx_t_1);
87742 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantHeader))))) __PYX_ERR(4, 12, __pyx_L1_error)
87743 __Pyx_GIVEREF(__pyx_t_1);
87744 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->header);
87745 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->header);
87746 __pyx_v___pyx_result->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_1);
87747 __pyx_t_1 = 0;
87748 if (unlikely(__pyx_v___pyx_state == Py_None)) {
87749 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
87750 __PYX_ERR(4, 12, __pyx_L1_error)
87751 }
87752 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
87753 __Pyx_GOTREF(__pyx_t_1);
87754 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 12, __pyx_L1_error)
87755 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87756 __pyx_v___pyx_result->id = __pyx_t_2;
87757 if (unlikely(__pyx_v___pyx_state == Py_None)) {
87758 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
87759 __PYX_ERR(4, 12, __pyx_L1_error)
87760 }
87761 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
87762 __Pyx_GOTREF(__pyx_t_1);
87763 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 12, __pyx_L1_error)
87764 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87765 __pyx_v___pyx_result->type = __pyx_t_2;
87766
87767 /* "(tree fragment)":13
87768 * cdef __pyx_unpickle_VariantMetadata__set_state(VariantMetadata __pyx_result, tuple __pyx_state):
87769 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]; __pyx_result.type = __pyx_state[2]
87770 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
87771 * __pyx_result.__dict__.update(__pyx_state[3])
87772 */
87773 if (unlikely(__pyx_v___pyx_state == Py_None)) {
87774 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
87775 __PYX_ERR(4, 13, __pyx_L1_error)
87776 }
87777 __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
87778 __pyx_t_5 = (__pyx_t_4 > 3);
87779 if (__pyx_t_5) {
87780 } else {
87781 __pyx_t_3 = __pyx_t_5;
87782 goto __pyx_L4_bool_binop_done;
87783 }
87784 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
87785 __pyx_t_3 = __pyx_t_5;
87786 __pyx_L4_bool_binop_done:;
87787 if (__pyx_t_3) {
87788
87789 /* "(tree fragment)":14
87790 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]; __pyx_result.type = __pyx_state[2]
87791 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
87792 * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
87793 */
87794 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
87795 __Pyx_GOTREF(__pyx_t_6);
87796 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error)
87797 __Pyx_GOTREF(__pyx_t_7);
87798 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
87799 if (unlikely(__pyx_v___pyx_state == Py_None)) {
87800 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
87801 __PYX_ERR(4, 14, __pyx_L1_error)
87802 }
87803 __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
87804 __Pyx_GOTREF(__pyx_t_6);
87805 __pyx_t_8 = NULL;
87806 __pyx_t_9 = 0;
87807 #if CYTHON_UNPACK_METHODS
87808 if (likely(PyMethod_Check(__pyx_t_7))) {
87809 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
87810 if (likely(__pyx_t_8)) {
87811 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
87812 __Pyx_INCREF(__pyx_t_8);
87813 __Pyx_INCREF(function);
87814 __Pyx_DECREF_SET(__pyx_t_7, function);
87815 __pyx_t_9 = 1;
87816 }
87817 }
87818 #endif
87819 {
87820 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
87821 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
87822 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
87823 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
87824 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
87825 __Pyx_GOTREF(__pyx_t_1);
87826 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
87827 }
87828 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
87829
87830 /* "(tree fragment)":13
87831 * cdef __pyx_unpickle_VariantMetadata__set_state(VariantMetadata __pyx_result, tuple __pyx_state):
87832 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]; __pyx_result.type = __pyx_state[2]
87833 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
87834 * __pyx_result.__dict__.update(__pyx_state[3])
87835 */
87836 }
87837
87838 /* "(tree fragment)":11
87839 * __pyx_unpickle_VariantMetadata__set_state(<VariantMetadata> __pyx_result, __pyx_state)
87840 * return __pyx_result
87841 * cdef __pyx_unpickle_VariantMetadata__set_state(VariantMetadata __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
87842 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]; __pyx_result.type = __pyx_state[2]
87843 * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
87844 */
87845
87846 /* function exit code */
87847 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
87848 goto __pyx_L0;
87849 __pyx_L1_error:;
87850 __Pyx_XDECREF(__pyx_t_1);
87851 __Pyx_XDECREF(__pyx_t_6);
87852 __Pyx_XDECREF(__pyx_t_7);
87853 __Pyx_XDECREF(__pyx_t_8);
87854 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantMetadata__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
87855 __pyx_r = 0;
87856 __pyx_L0:;
87857 __Pyx_XGIVEREF(__pyx_r);
87858 __Pyx_TraceReturn(__pyx_r, 0);
87859 __Pyx_RefNannyFinishContext();
87860 return __pyx_r;
87861 }
87862
87863 /* "(tree fragment)":1
87864 * def __pyx_unpickle_VariantHeaderMetadata(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
87865 * cdef object __pyx_PickleError
87866 * cdef object __pyx_result
87867 */
87868
87869 /* Python wrapper */
87870 static PyObject *__pyx_pw_5pysam_7libcbcf_5__pyx_unpickle_VariantHeaderMetadata(PyObject *__pyx_self,
87871 #if CYTHON_METH_FASTCALL
87872 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
87873 #else
87874 PyObject *__pyx_args, PyObject *__pyx_kwds
87875 #endif
87876 ); /*proto*/
87877 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_4__pyx_unpickle_VariantHeaderMetadata, "__pyx_unpickle_VariantHeaderMetadata(__pyx_type, long __pyx_checksum, __pyx_state)");
87878 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_5__pyx_unpickle_VariantHeaderMetadata = {"__pyx_unpickle_VariantHeaderMetadata", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_5__pyx_unpickle_VariantHeaderMetadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_4__pyx_unpickle_VariantHeaderMetadata};
87879 static PyObject *__pyx_pw_5pysam_7libcbcf_5__pyx_unpickle_VariantHeaderMetadata(PyObject *__pyx_self,
87880 #if CYTHON_METH_FASTCALL
87881 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
87882 #else
87883 PyObject *__pyx_args, PyObject *__pyx_kwds
87884 #endif
87885 ) {
87886 PyObject *__pyx_v___pyx_type = 0;
87887 long __pyx_v___pyx_checksum;
87888 PyObject *__pyx_v___pyx_state = 0;
87889 #if !CYTHON_METH_FASTCALL
87890 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
87891 #endif
87892 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
87893 PyObject* values[3] = {0,0,0};
87894 int __pyx_lineno = 0;
87895 const char *__pyx_filename = NULL;
87896 int __pyx_clineno = 0;
87897 PyObject *__pyx_r = 0;
87898 __Pyx_RefNannyDeclarations
87899 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderMetadata (wrapper)", 0);
87900 #if !CYTHON_METH_FASTCALL
87901 #if CYTHON_ASSUME_SAFE_MACROS
87902 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
87903 #else
87904 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
87905 #endif
87906 #endif
87907 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
87908 {
87909 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
87910 if (__pyx_kwds) {
87911 Py_ssize_t kw_args;
87912 switch (__pyx_nargs) {
87913 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
87914 CYTHON_FALLTHROUGH;
87915 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
87916 CYTHON_FALLTHROUGH;
87917 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
87918 CYTHON_FALLTHROUGH;
87919 case 0: break;
87920 default: goto __pyx_L5_argtuple_error;
87921 }
87922 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
87923 switch (__pyx_nargs) {
87924 case 0:
87925 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
87926 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
87927 kw_args--;
87928 }
87929 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87930 else goto __pyx_L5_argtuple_error;
87931 CYTHON_FALLTHROUGH;
87932 case 1:
87933 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
87934 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
87935 kw_args--;
87936 }
87937 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87938 else {
87939 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderMetadata", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
87940 }
87941 CYTHON_FALLTHROUGH;
87942 case 2:
87943 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
87944 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
87945 kw_args--;
87946 }
87947 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87948 else {
87949 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderMetadata", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
87950 }
87951 }
87952 if (unlikely(kw_args > 0)) {
87953 const Py_ssize_t kwd_pos_args = __pyx_nargs;
87954 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantHeaderMetadata") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
87955 }
87956 } else if (unlikely(__pyx_nargs != 3)) {
87957 goto __pyx_L5_argtuple_error;
87958 } else {
87959 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
87960 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
87961 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
87962 }
87963 __pyx_v___pyx_type = values[0];
87964 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
87965 __pyx_v___pyx_state = values[2];
87966 }
87967 goto __pyx_L6_skip;
87968 __pyx_L5_argtuple_error:;
87969 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderMetadata", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
87970 __pyx_L6_skip:;
87971 goto __pyx_L4_argument_unpacking_done;
87972 __pyx_L3_error:;
87973 {
87974 Py_ssize_t __pyx_temp;
87975 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
87976 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
87977 }
87978 }
87979 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
87980 __Pyx_RefNannyFinishContext();
87981 return NULL;
87982 __pyx_L4_argument_unpacking_done:;
87983 __pyx_r = __pyx_pf_5pysam_7libcbcf_4__pyx_unpickle_VariantHeaderMetadata(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
87984
87985 /* function exit code */
87986 {
87987 Py_ssize_t __pyx_temp;
87988 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
87989 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
87990 }
87991 }
87992 __Pyx_RefNannyFinishContext();
87993 return __pyx_r;
87994 }
87995
87996 static PyObject *__pyx_pf_5pysam_7libcbcf_4__pyx_unpickle_VariantHeaderMetadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
87997 PyObject *__pyx_v___pyx_PickleError = 0;
87998 PyObject *__pyx_v___pyx_result = 0;
87999 PyObject *__pyx_r = NULL;
88000 __Pyx_TraceDeclarations
88001 __Pyx_RefNannyDeclarations
88002 PyObject *__pyx_t_1 = NULL;
88003 int __pyx_t_2;
88004 PyObject *__pyx_t_3 = NULL;
88005 PyObject *__pyx_t_4 = NULL;
88006 unsigned int __pyx_t_5;
88007 int __pyx_lineno = 0;
88008 const char *__pyx_filename = NULL;
88009 int __pyx_clineno = 0;
88010 __Pyx_TraceFrameInit(__pyx_codeobj__263)
88011 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderMetadata", 1);
88012 __Pyx_TraceCall("__pyx_unpickle_VariantHeaderMetadata", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
88013
88014 /* "(tree fragment)":4
88015 * cdef object __pyx_PickleError
88016 * cdef object __pyx_result
88017 * if __pyx_checksum not in (0x816ca43, 0x0a33d30, 0xed5e66b): # <<<<<<<<<<<<<<
88018 * from pickle import PickleError as __pyx_PickleError
88019 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x816ca43, 0x0a33d30, 0xed5e66b) = (header, type))" % __pyx_checksum
88020 */
88021 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
88022 __Pyx_GOTREF(__pyx_t_1);
88023 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__264, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
88024 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88025 if (__pyx_t_2) {
88026
88027 /* "(tree fragment)":5
88028 * cdef object __pyx_result
88029 * if __pyx_checksum not in (0x816ca43, 0x0a33d30, 0xed5e66b):
88030 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
88031 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x816ca43, 0x0a33d30, 0xed5e66b) = (header, type))" % __pyx_checksum
88032 * __pyx_result = VariantHeaderMetadata.__new__(__pyx_type)
88033 */
88034 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
88035 __Pyx_GOTREF(__pyx_t_1);
88036 __Pyx_INCREF(__pyx_n_s_PickleError);
88037 __Pyx_GIVEREF(__pyx_n_s_PickleError);
88038 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
88039 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
88040 __Pyx_GOTREF(__pyx_t_3);
88041 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88042 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
88043 __Pyx_GOTREF(__pyx_t_1);
88044 __Pyx_INCREF(__pyx_t_1);
88045 __pyx_v___pyx_PickleError = __pyx_t_1;
88046 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88047 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88048
88049 /* "(tree fragment)":6
88050 * if __pyx_checksum not in (0x816ca43, 0x0a33d30, 0xed5e66b):
88051 * from pickle import PickleError as __pyx_PickleError
88052 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x816ca43, 0x0a33d30, 0xed5e66b) = (header, type))" % __pyx_checksum # <<<<<<<<<<<<<<
88053 * __pyx_result = VariantHeaderMetadata.__new__(__pyx_type)
88054 * if __pyx_state is not None:
88055 */
88056 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
88057 __Pyx_GOTREF(__pyx_t_3);
88058 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
88059 __Pyx_GOTREF(__pyx_t_1);
88060 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88061 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
88062 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88063 __PYX_ERR(4, 6, __pyx_L1_error)
88064
88065 /* "(tree fragment)":4
88066 * cdef object __pyx_PickleError
88067 * cdef object __pyx_result
88068 * if __pyx_checksum not in (0x816ca43, 0x0a33d30, 0xed5e66b): # <<<<<<<<<<<<<<
88069 * from pickle import PickleError as __pyx_PickleError
88070 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x816ca43, 0x0a33d30, 0xed5e66b) = (header, type))" % __pyx_checksum
88071 */
88072 }
88073
88074 /* "(tree fragment)":7
88075 * from pickle import PickleError as __pyx_PickleError
88076 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x816ca43, 0x0a33d30, 0xed5e66b) = (header, type))" % __pyx_checksum
88077 * __pyx_result = VariantHeaderMetadata.__new__(__pyx_type) # <<<<<<<<<<<<<<
88078 * if __pyx_state is not None:
88079 * __pyx_unpickle_VariantHeaderMetadata__set_state(<VariantHeaderMetadata> __pyx_result, __pyx_state)
88080 */
88081 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
88082 __Pyx_GOTREF(__pyx_t_3);
88083 __pyx_t_4 = NULL;
88084 __pyx_t_5 = 0;
88085 #if CYTHON_UNPACK_METHODS
88086 if (likely(PyMethod_Check(__pyx_t_3))) {
88087 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
88088 if (likely(__pyx_t_4)) {
88089 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
88090 __Pyx_INCREF(__pyx_t_4);
88091 __Pyx_INCREF(function);
88092 __Pyx_DECREF_SET(__pyx_t_3, function);
88093 __pyx_t_5 = 1;
88094 }
88095 }
88096 #endif
88097 {
88098 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
88099 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
88100 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
88101 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
88102 __Pyx_GOTREF(__pyx_t_1);
88103 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88104 }
88105 __pyx_v___pyx_result = __pyx_t_1;
88106 __pyx_t_1 = 0;
88107
88108 /* "(tree fragment)":8
88109 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x816ca43, 0x0a33d30, 0xed5e66b) = (header, type))" % __pyx_checksum
88110 * __pyx_result = VariantHeaderMetadata.__new__(__pyx_type)
88111 * if __pyx_state is not None: # <<<<<<<<<<<<<<
88112 * __pyx_unpickle_VariantHeaderMetadata__set_state(<VariantHeaderMetadata> __pyx_result, __pyx_state)
88113 * return __pyx_result
88114 */
88115 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
88116 if (__pyx_t_2) {
88117
88118 /* "(tree fragment)":9
88119 * __pyx_result = VariantHeaderMetadata.__new__(__pyx_type)
88120 * if __pyx_state is not None:
88121 * __pyx_unpickle_VariantHeaderMetadata__set_state(<VariantHeaderMetadata> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
88122 * return __pyx_result
88123 * cdef __pyx_unpickle_VariantHeaderMetadata__set_state(VariantHeaderMetadata __pyx_result, tuple __pyx_state):
88124 */
88125 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
88126 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderMetadata__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
88127 __Pyx_GOTREF(__pyx_t_1);
88128 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88129
88130 /* "(tree fragment)":8
88131 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x816ca43, 0x0a33d30, 0xed5e66b) = (header, type))" % __pyx_checksum
88132 * __pyx_result = VariantHeaderMetadata.__new__(__pyx_type)
88133 * if __pyx_state is not None: # <<<<<<<<<<<<<<
88134 * __pyx_unpickle_VariantHeaderMetadata__set_state(<VariantHeaderMetadata> __pyx_result, __pyx_state)
88135 * return __pyx_result
88136 */
88137 }
88138
88139 /* "(tree fragment)":10
88140 * if __pyx_state is not None:
88141 * __pyx_unpickle_VariantHeaderMetadata__set_state(<VariantHeaderMetadata> __pyx_result, __pyx_state)
88142 * return __pyx_result # <<<<<<<<<<<<<<
88143 * cdef __pyx_unpickle_VariantHeaderMetadata__set_state(VariantHeaderMetadata __pyx_result, tuple __pyx_state):
88144 * __pyx_result.header = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
88145 */
88146 __Pyx_XDECREF(__pyx_r);
88147 __Pyx_INCREF(__pyx_v___pyx_result);
88148 __pyx_r = __pyx_v___pyx_result;
88149 goto __pyx_L0;
88150
88151 /* "(tree fragment)":1
88152 * def __pyx_unpickle_VariantHeaderMetadata(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
88153 * cdef object __pyx_PickleError
88154 * cdef object __pyx_result
88155 */
88156
88157 /* function exit code */
88158 __pyx_L1_error:;
88159 __Pyx_XDECREF(__pyx_t_1);
88160 __Pyx_XDECREF(__pyx_t_3);
88161 __Pyx_XDECREF(__pyx_t_4);
88162 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
88163 __pyx_r = NULL;
88164 __pyx_L0:;
88165 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
88166 __Pyx_XDECREF(__pyx_v___pyx_result);
88167 __Pyx_XGIVEREF(__pyx_r);
88168 __Pyx_TraceReturn(__pyx_r, 0);
88169 __Pyx_RefNannyFinishContext();
88170 return __pyx_r;
88171 }
88172
88173 /* "(tree fragment)":11
88174 * __pyx_unpickle_VariantHeaderMetadata__set_state(<VariantHeaderMetadata> __pyx_result, __pyx_state)
88175 * return __pyx_result
88176 * cdef __pyx_unpickle_VariantHeaderMetadata__set_state(VariantHeaderMetadata __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
88177 * __pyx_result.header = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
88178 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
88179 */
88180
88181 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderMetadata__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
88182 PyObject *__pyx_r = NULL;
88183 __Pyx_TraceDeclarations
88184 __Pyx_RefNannyDeclarations
88185 PyObject *__pyx_t_1 = NULL;
88186 int32_t __pyx_t_2;
88187 int __pyx_t_3;
88188 Py_ssize_t __pyx_t_4;
88189 int __pyx_t_5;
88190 PyObject *__pyx_t_6 = NULL;
88191 PyObject *__pyx_t_7 = NULL;
88192 PyObject *__pyx_t_8 = NULL;
88193 unsigned int __pyx_t_9;
88194 int __pyx_lineno = 0;
88195 const char *__pyx_filename = NULL;
88196 int __pyx_clineno = 0;
88197 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderMetadata__set_state", 1);
88198 __Pyx_TraceCall("__pyx_unpickle_VariantHeaderMetadata__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
88199
88200 /* "(tree fragment)":12
88201 * return __pyx_result
88202 * cdef __pyx_unpickle_VariantHeaderMetadata__set_state(VariantHeaderMetadata __pyx_result, tuple __pyx_state):
88203 * __pyx_result.header = __pyx_state[0]; __pyx_result.type = __pyx_state[1] # <<<<<<<<<<<<<<
88204 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
88205 * __pyx_result.__dict__.update(__pyx_state[2])
88206 */
88207 if (unlikely(__pyx_v___pyx_state == Py_None)) {
88208 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
88209 __PYX_ERR(4, 12, __pyx_L1_error)
88210 }
88211 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
88212 __Pyx_GOTREF(__pyx_t_1);
88213 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantHeader))))) __PYX_ERR(4, 12, __pyx_L1_error)
88214 __Pyx_GIVEREF(__pyx_t_1);
88215 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->header);
88216 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->header);
88217 __pyx_v___pyx_result->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_1);
88218 __pyx_t_1 = 0;
88219 if (unlikely(__pyx_v___pyx_state == Py_None)) {
88220 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
88221 __PYX_ERR(4, 12, __pyx_L1_error)
88222 }
88223 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
88224 __Pyx_GOTREF(__pyx_t_1);
88225 __pyx_t_2 = __Pyx_PyInt_As_int32_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 12, __pyx_L1_error)
88226 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88227 __pyx_v___pyx_result->type = __pyx_t_2;
88228
88229 /* "(tree fragment)":13
88230 * cdef __pyx_unpickle_VariantHeaderMetadata__set_state(VariantHeaderMetadata __pyx_result, tuple __pyx_state):
88231 * __pyx_result.header = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
88232 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
88233 * __pyx_result.__dict__.update(__pyx_state[2])
88234 */
88235 if (unlikely(__pyx_v___pyx_state == Py_None)) {
88236 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
88237 __PYX_ERR(4, 13, __pyx_L1_error)
88238 }
88239 __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
88240 __pyx_t_5 = (__pyx_t_4 > 2);
88241 if (__pyx_t_5) {
88242 } else {
88243 __pyx_t_3 = __pyx_t_5;
88244 goto __pyx_L4_bool_binop_done;
88245 }
88246 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
88247 __pyx_t_3 = __pyx_t_5;
88248 __pyx_L4_bool_binop_done:;
88249 if (__pyx_t_3) {
88250
88251 /* "(tree fragment)":14
88252 * __pyx_result.header = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
88253 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
88254 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
88255 */
88256 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
88257 __Pyx_GOTREF(__pyx_t_6);
88258 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error)
88259 __Pyx_GOTREF(__pyx_t_7);
88260 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88261 if (unlikely(__pyx_v___pyx_state == Py_None)) {
88262 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
88263 __PYX_ERR(4, 14, __pyx_L1_error)
88264 }
88265 __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
88266 __Pyx_GOTREF(__pyx_t_6);
88267 __pyx_t_8 = NULL;
88268 __pyx_t_9 = 0;
88269 #if CYTHON_UNPACK_METHODS
88270 if (likely(PyMethod_Check(__pyx_t_7))) {
88271 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
88272 if (likely(__pyx_t_8)) {
88273 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
88274 __Pyx_INCREF(__pyx_t_8);
88275 __Pyx_INCREF(function);
88276 __Pyx_DECREF_SET(__pyx_t_7, function);
88277 __pyx_t_9 = 1;
88278 }
88279 }
88280 #endif
88281 {
88282 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
88283 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
88284 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
88285 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88286 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
88287 __Pyx_GOTREF(__pyx_t_1);
88288 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
88289 }
88290 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88291
88292 /* "(tree fragment)":13
88293 * cdef __pyx_unpickle_VariantHeaderMetadata__set_state(VariantHeaderMetadata __pyx_result, tuple __pyx_state):
88294 * __pyx_result.header = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
88295 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
88296 * __pyx_result.__dict__.update(__pyx_state[2])
88297 */
88298 }
88299
88300 /* "(tree fragment)":11
88301 * __pyx_unpickle_VariantHeaderMetadata__set_state(<VariantHeaderMetadata> __pyx_result, __pyx_state)
88302 * return __pyx_result
88303 * cdef __pyx_unpickle_VariantHeaderMetadata__set_state(VariantHeaderMetadata __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
88304 * __pyx_result.header = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
88305 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
88306 */
88307
88308 /* function exit code */
88309 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
88310 goto __pyx_L0;
88311 __pyx_L1_error:;
88312 __Pyx_XDECREF(__pyx_t_1);
88313 __Pyx_XDECREF(__pyx_t_6);
88314 __Pyx_XDECREF(__pyx_t_7);
88315 __Pyx_XDECREF(__pyx_t_8);
88316 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderMetadata__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
88317 __pyx_r = 0;
88318 __pyx_L0:;
88319 __Pyx_XGIVEREF(__pyx_r);
88320 __Pyx_TraceReturn(__pyx_r, 0);
88321 __Pyx_RefNannyFinishContext();
88322 return __pyx_r;
88323 }
88324
88325 /* "(tree fragment)":1
88326 * def __pyx_unpickle_VariantContig(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
88327 * cdef object __pyx_PickleError
88328 * cdef object __pyx_result
88329 */
88330
88331 /* Python wrapper */
88332 static PyObject *__pyx_pw_5pysam_7libcbcf_7__pyx_unpickle_VariantContig(PyObject *__pyx_self,
88333 #if CYTHON_METH_FASTCALL
88334 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
88335 #else
88336 PyObject *__pyx_args, PyObject *__pyx_kwds
88337 #endif
88338 ); /*proto*/
88339 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_6__pyx_unpickle_VariantContig, "__pyx_unpickle_VariantContig(__pyx_type, long __pyx_checksum, __pyx_state)");
88340 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_7__pyx_unpickle_VariantContig = {"__pyx_unpickle_VariantContig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_7__pyx_unpickle_VariantContig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_6__pyx_unpickle_VariantContig};
88341 static PyObject *__pyx_pw_5pysam_7libcbcf_7__pyx_unpickle_VariantContig(PyObject *__pyx_self,
88342 #if CYTHON_METH_FASTCALL
88343 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
88344 #else
88345 PyObject *__pyx_args, PyObject *__pyx_kwds
88346 #endif
88347 ) {
88348 PyObject *__pyx_v___pyx_type = 0;
88349 long __pyx_v___pyx_checksum;
88350 PyObject *__pyx_v___pyx_state = 0;
88351 #if !CYTHON_METH_FASTCALL
88352 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
88353 #endif
88354 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
88355 PyObject* values[3] = {0,0,0};
88356 int __pyx_lineno = 0;
88357 const char *__pyx_filename = NULL;
88358 int __pyx_clineno = 0;
88359 PyObject *__pyx_r = 0;
88360 __Pyx_RefNannyDeclarations
88361 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantContig (wrapper)", 0);
88362 #if !CYTHON_METH_FASTCALL
88363 #if CYTHON_ASSUME_SAFE_MACROS
88364 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
88365 #else
88366 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
88367 #endif
88368 #endif
88369 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
88370 {
88371 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
88372 if (__pyx_kwds) {
88373 Py_ssize_t kw_args;
88374 switch (__pyx_nargs) {
88375 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
88376 CYTHON_FALLTHROUGH;
88377 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
88378 CYTHON_FALLTHROUGH;
88379 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
88380 CYTHON_FALLTHROUGH;
88381 case 0: break;
88382 default: goto __pyx_L5_argtuple_error;
88383 }
88384 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
88385 switch (__pyx_nargs) {
88386 case 0:
88387 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
88388 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
88389 kw_args--;
88390 }
88391 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
88392 else goto __pyx_L5_argtuple_error;
88393 CYTHON_FALLTHROUGH;
88394 case 1:
88395 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
88396 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
88397 kw_args--;
88398 }
88399 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
88400 else {
88401 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantContig", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
88402 }
88403 CYTHON_FALLTHROUGH;
88404 case 2:
88405 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
88406 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
88407 kw_args--;
88408 }
88409 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
88410 else {
88411 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantContig", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
88412 }
88413 }
88414 if (unlikely(kw_args > 0)) {
88415 const Py_ssize_t kwd_pos_args = __pyx_nargs;
88416 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantContig") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
88417 }
88418 } else if (unlikely(__pyx_nargs != 3)) {
88419 goto __pyx_L5_argtuple_error;
88420 } else {
88421 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
88422 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
88423 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
88424 }
88425 __pyx_v___pyx_type = values[0];
88426 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
88427 __pyx_v___pyx_state = values[2];
88428 }
88429 goto __pyx_L6_skip;
88430 __pyx_L5_argtuple_error:;
88431 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantContig", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
88432 __pyx_L6_skip:;
88433 goto __pyx_L4_argument_unpacking_done;
88434 __pyx_L3_error:;
88435 {
88436 Py_ssize_t __pyx_temp;
88437 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
88438 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
88439 }
88440 }
88441 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantContig", __pyx_clineno, __pyx_lineno, __pyx_filename);
88442 __Pyx_RefNannyFinishContext();
88443 return NULL;
88444 __pyx_L4_argument_unpacking_done:;
88445 __pyx_r = __pyx_pf_5pysam_7libcbcf_6__pyx_unpickle_VariantContig(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
88446
88447 /* function exit code */
88448 {
88449 Py_ssize_t __pyx_temp;
88450 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
88451 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
88452 }
88453 }
88454 __Pyx_RefNannyFinishContext();
88455 return __pyx_r;
88456 }
88457
88458 static PyObject *__pyx_pf_5pysam_7libcbcf_6__pyx_unpickle_VariantContig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
88459 PyObject *__pyx_v___pyx_PickleError = 0;
88460 PyObject *__pyx_v___pyx_result = 0;
88461 PyObject *__pyx_r = NULL;
88462 __Pyx_TraceDeclarations
88463 __Pyx_RefNannyDeclarations
88464 PyObject *__pyx_t_1 = NULL;
88465 int __pyx_t_2;
88466 PyObject *__pyx_t_3 = NULL;
88467 PyObject *__pyx_t_4 = NULL;
88468 unsigned int __pyx_t_5;
88469 int __pyx_lineno = 0;
88470 const char *__pyx_filename = NULL;
88471 int __pyx_clineno = 0;
88472 __Pyx_TraceFrameInit(__pyx_codeobj__265)
88473 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantContig", 1);
88474 __Pyx_TraceCall("__pyx_unpickle_VariantContig", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
88475
88476 /* "(tree fragment)":4
88477 * cdef object __pyx_PickleError
88478 * cdef object __pyx_result
88479 * if __pyx_checksum not in (0x2572060, 0x8ae1160, 0xbe66ecb): # <<<<<<<<<<<<<<
88480 * from pickle import PickleError as __pyx_PickleError
88481 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x2572060, 0x8ae1160, 0xbe66ecb) = (header, id))" % __pyx_checksum
88482 */
88483 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
88484 __Pyx_GOTREF(__pyx_t_1);
88485 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__266, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
88486 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88487 if (__pyx_t_2) {
88488
88489 /* "(tree fragment)":5
88490 * cdef object __pyx_result
88491 * if __pyx_checksum not in (0x2572060, 0x8ae1160, 0xbe66ecb):
88492 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
88493 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x2572060, 0x8ae1160, 0xbe66ecb) = (header, id))" % __pyx_checksum
88494 * __pyx_result = VariantContig.__new__(__pyx_type)
88495 */
88496 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
88497 __Pyx_GOTREF(__pyx_t_1);
88498 __Pyx_INCREF(__pyx_n_s_PickleError);
88499 __Pyx_GIVEREF(__pyx_n_s_PickleError);
88500 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
88501 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
88502 __Pyx_GOTREF(__pyx_t_3);
88503 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88504 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
88505 __Pyx_GOTREF(__pyx_t_1);
88506 __Pyx_INCREF(__pyx_t_1);
88507 __pyx_v___pyx_PickleError = __pyx_t_1;
88508 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88509 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88510
88511 /* "(tree fragment)":6
88512 * if __pyx_checksum not in (0x2572060, 0x8ae1160, 0xbe66ecb):
88513 * from pickle import PickleError as __pyx_PickleError
88514 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x2572060, 0x8ae1160, 0xbe66ecb) = (header, id))" % __pyx_checksum # <<<<<<<<<<<<<<
88515 * __pyx_result = VariantContig.__new__(__pyx_type)
88516 * if __pyx_state is not None:
88517 */
88518 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
88519 __Pyx_GOTREF(__pyx_t_3);
88520 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
88521 __Pyx_GOTREF(__pyx_t_1);
88522 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88523 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
88524 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88525 __PYX_ERR(4, 6, __pyx_L1_error)
88526
88527 /* "(tree fragment)":4
88528 * cdef object __pyx_PickleError
88529 * cdef object __pyx_result
88530 * if __pyx_checksum not in (0x2572060, 0x8ae1160, 0xbe66ecb): # <<<<<<<<<<<<<<
88531 * from pickle import PickleError as __pyx_PickleError
88532 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x2572060, 0x8ae1160, 0xbe66ecb) = (header, id))" % __pyx_checksum
88533 */
88534 }
88535
88536 /* "(tree fragment)":7
88537 * from pickle import PickleError as __pyx_PickleError
88538 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x2572060, 0x8ae1160, 0xbe66ecb) = (header, id))" % __pyx_checksum
88539 * __pyx_result = VariantContig.__new__(__pyx_type) # <<<<<<<<<<<<<<
88540 * if __pyx_state is not None:
88541 * __pyx_unpickle_VariantContig__set_state(<VariantContig> __pyx_result, __pyx_state)
88542 */
88543 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantContig), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
88544 __Pyx_GOTREF(__pyx_t_3);
88545 __pyx_t_4 = NULL;
88546 __pyx_t_5 = 0;
88547 #if CYTHON_UNPACK_METHODS
88548 if (likely(PyMethod_Check(__pyx_t_3))) {
88549 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
88550 if (likely(__pyx_t_4)) {
88551 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
88552 __Pyx_INCREF(__pyx_t_4);
88553 __Pyx_INCREF(function);
88554 __Pyx_DECREF_SET(__pyx_t_3, function);
88555 __pyx_t_5 = 1;
88556 }
88557 }
88558 #endif
88559 {
88560 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
88561 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
88562 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
88563 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
88564 __Pyx_GOTREF(__pyx_t_1);
88565 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88566 }
88567 __pyx_v___pyx_result = __pyx_t_1;
88568 __pyx_t_1 = 0;
88569
88570 /* "(tree fragment)":8
88571 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x2572060, 0x8ae1160, 0xbe66ecb) = (header, id))" % __pyx_checksum
88572 * __pyx_result = VariantContig.__new__(__pyx_type)
88573 * if __pyx_state is not None: # <<<<<<<<<<<<<<
88574 * __pyx_unpickle_VariantContig__set_state(<VariantContig> __pyx_result, __pyx_state)
88575 * return __pyx_result
88576 */
88577 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
88578 if (__pyx_t_2) {
88579
88580 /* "(tree fragment)":9
88581 * __pyx_result = VariantContig.__new__(__pyx_type)
88582 * if __pyx_state is not None:
88583 * __pyx_unpickle_VariantContig__set_state(<VariantContig> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
88584 * return __pyx_result
88585 * cdef __pyx_unpickle_VariantContig__set_state(VariantContig __pyx_result, tuple __pyx_state):
88586 */
88587 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
88588 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantContig__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
88589 __Pyx_GOTREF(__pyx_t_1);
88590 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88591
88592 /* "(tree fragment)":8
88593 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x2572060, 0x8ae1160, 0xbe66ecb) = (header, id))" % __pyx_checksum
88594 * __pyx_result = VariantContig.__new__(__pyx_type)
88595 * if __pyx_state is not None: # <<<<<<<<<<<<<<
88596 * __pyx_unpickle_VariantContig__set_state(<VariantContig> __pyx_result, __pyx_state)
88597 * return __pyx_result
88598 */
88599 }
88600
88601 /* "(tree fragment)":10
88602 * if __pyx_state is not None:
88603 * __pyx_unpickle_VariantContig__set_state(<VariantContig> __pyx_result, __pyx_state)
88604 * return __pyx_result # <<<<<<<<<<<<<<
88605 * cdef __pyx_unpickle_VariantContig__set_state(VariantContig __pyx_result, tuple __pyx_state):
88606 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]
88607 */
88608 __Pyx_XDECREF(__pyx_r);
88609 __Pyx_INCREF(__pyx_v___pyx_result);
88610 __pyx_r = __pyx_v___pyx_result;
88611 goto __pyx_L0;
88612
88613 /* "(tree fragment)":1
88614 * def __pyx_unpickle_VariantContig(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
88615 * cdef object __pyx_PickleError
88616 * cdef object __pyx_result
88617 */
88618
88619 /* function exit code */
88620 __pyx_L1_error:;
88621 __Pyx_XDECREF(__pyx_t_1);
88622 __Pyx_XDECREF(__pyx_t_3);
88623 __Pyx_XDECREF(__pyx_t_4);
88624 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantContig", __pyx_clineno, __pyx_lineno, __pyx_filename);
88625 __pyx_r = NULL;
88626 __pyx_L0:;
88627 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
88628 __Pyx_XDECREF(__pyx_v___pyx_result);
88629 __Pyx_XGIVEREF(__pyx_r);
88630 __Pyx_TraceReturn(__pyx_r, 0);
88631 __Pyx_RefNannyFinishContext();
88632 return __pyx_r;
88633 }
88634
88635 /* "(tree fragment)":11
88636 * __pyx_unpickle_VariantContig__set_state(<VariantContig> __pyx_result, __pyx_state)
88637 * return __pyx_result
88638 * cdef __pyx_unpickle_VariantContig__set_state(VariantContig __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
88639 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]
88640 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
88641 */
88642
88643 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantContig__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantContig *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
88644 PyObject *__pyx_r = NULL;
88645 __Pyx_TraceDeclarations
88646 __Pyx_RefNannyDeclarations
88647 PyObject *__pyx_t_1 = NULL;
88648 int __pyx_t_2;
88649 int __pyx_t_3;
88650 Py_ssize_t __pyx_t_4;
88651 int __pyx_t_5;
88652 PyObject *__pyx_t_6 = NULL;
88653 PyObject *__pyx_t_7 = NULL;
88654 PyObject *__pyx_t_8 = NULL;
88655 unsigned int __pyx_t_9;
88656 int __pyx_lineno = 0;
88657 const char *__pyx_filename = NULL;
88658 int __pyx_clineno = 0;
88659 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantContig__set_state", 1);
88660 __Pyx_TraceCall("__pyx_unpickle_VariantContig__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
88661
88662 /* "(tree fragment)":12
88663 * return __pyx_result
88664 * cdef __pyx_unpickle_VariantContig__set_state(VariantContig __pyx_result, tuple __pyx_state):
88665 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1] # <<<<<<<<<<<<<<
88666 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
88667 * __pyx_result.__dict__.update(__pyx_state[2])
88668 */
88669 if (unlikely(__pyx_v___pyx_state == Py_None)) {
88670 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
88671 __PYX_ERR(4, 12, __pyx_L1_error)
88672 }
88673 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
88674 __Pyx_GOTREF(__pyx_t_1);
88675 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantHeader))))) __PYX_ERR(4, 12, __pyx_L1_error)
88676 __Pyx_GIVEREF(__pyx_t_1);
88677 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->header);
88678 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->header);
88679 __pyx_v___pyx_result->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_1);
88680 __pyx_t_1 = 0;
88681 if (unlikely(__pyx_v___pyx_state == Py_None)) {
88682 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
88683 __PYX_ERR(4, 12, __pyx_L1_error)
88684 }
88685 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
88686 __Pyx_GOTREF(__pyx_t_1);
88687 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 12, __pyx_L1_error)
88688 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88689 __pyx_v___pyx_result->id = __pyx_t_2;
88690
88691 /* "(tree fragment)":13
88692 * cdef __pyx_unpickle_VariantContig__set_state(VariantContig __pyx_result, tuple __pyx_state):
88693 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]
88694 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
88695 * __pyx_result.__dict__.update(__pyx_state[2])
88696 */
88697 if (unlikely(__pyx_v___pyx_state == Py_None)) {
88698 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
88699 __PYX_ERR(4, 13, __pyx_L1_error)
88700 }
88701 __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
88702 __pyx_t_5 = (__pyx_t_4 > 2);
88703 if (__pyx_t_5) {
88704 } else {
88705 __pyx_t_3 = __pyx_t_5;
88706 goto __pyx_L4_bool_binop_done;
88707 }
88708 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
88709 __pyx_t_3 = __pyx_t_5;
88710 __pyx_L4_bool_binop_done:;
88711 if (__pyx_t_3) {
88712
88713 /* "(tree fragment)":14
88714 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]
88715 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
88716 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
88717 */
88718 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
88719 __Pyx_GOTREF(__pyx_t_6);
88720 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error)
88721 __Pyx_GOTREF(__pyx_t_7);
88722 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88723 if (unlikely(__pyx_v___pyx_state == Py_None)) {
88724 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
88725 __PYX_ERR(4, 14, __pyx_L1_error)
88726 }
88727 __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
88728 __Pyx_GOTREF(__pyx_t_6);
88729 __pyx_t_8 = NULL;
88730 __pyx_t_9 = 0;
88731 #if CYTHON_UNPACK_METHODS
88732 if (likely(PyMethod_Check(__pyx_t_7))) {
88733 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
88734 if (likely(__pyx_t_8)) {
88735 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
88736 __Pyx_INCREF(__pyx_t_8);
88737 __Pyx_INCREF(function);
88738 __Pyx_DECREF_SET(__pyx_t_7, function);
88739 __pyx_t_9 = 1;
88740 }
88741 }
88742 #endif
88743 {
88744 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
88745 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
88746 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
88747 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88748 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
88749 __Pyx_GOTREF(__pyx_t_1);
88750 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
88751 }
88752 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88753
88754 /* "(tree fragment)":13
88755 * cdef __pyx_unpickle_VariantContig__set_state(VariantContig __pyx_result, tuple __pyx_state):
88756 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]
88757 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
88758 * __pyx_result.__dict__.update(__pyx_state[2])
88759 */
88760 }
88761
88762 /* "(tree fragment)":11
88763 * __pyx_unpickle_VariantContig__set_state(<VariantContig> __pyx_result, __pyx_state)
88764 * return __pyx_result
88765 * cdef __pyx_unpickle_VariantContig__set_state(VariantContig __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
88766 * __pyx_result.header = __pyx_state[0]; __pyx_result.id = __pyx_state[1]
88767 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
88768 */
88769
88770 /* function exit code */
88771 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
88772 goto __pyx_L0;
88773 __pyx_L1_error:;
88774 __Pyx_XDECREF(__pyx_t_1);
88775 __Pyx_XDECREF(__pyx_t_6);
88776 __Pyx_XDECREF(__pyx_t_7);
88777 __Pyx_XDECREF(__pyx_t_8);
88778 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantContig__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
88779 __pyx_r = 0;
88780 __pyx_L0:;
88781 __Pyx_XGIVEREF(__pyx_r);
88782 __Pyx_TraceReturn(__pyx_r, 0);
88783 __Pyx_RefNannyFinishContext();
88784 return __pyx_r;
88785 }
88786
88787 /* "(tree fragment)":1
88788 * def __pyx_unpickle_VariantHeaderContigs(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
88789 * cdef object __pyx_PickleError
88790 * cdef object __pyx_result
88791 */
88792
88793 /* Python wrapper */
88794 static PyObject *__pyx_pw_5pysam_7libcbcf_9__pyx_unpickle_VariantHeaderContigs(PyObject *__pyx_self,
88795 #if CYTHON_METH_FASTCALL
88796 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
88797 #else
88798 PyObject *__pyx_args, PyObject *__pyx_kwds
88799 #endif
88800 ); /*proto*/
88801 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_8__pyx_unpickle_VariantHeaderContigs, "__pyx_unpickle_VariantHeaderContigs(__pyx_type, long __pyx_checksum, __pyx_state)");
88802 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_9__pyx_unpickle_VariantHeaderContigs = {"__pyx_unpickle_VariantHeaderContigs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9__pyx_unpickle_VariantHeaderContigs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_8__pyx_unpickle_VariantHeaderContigs};
88803 static PyObject *__pyx_pw_5pysam_7libcbcf_9__pyx_unpickle_VariantHeaderContigs(PyObject *__pyx_self,
88804 #if CYTHON_METH_FASTCALL
88805 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
88806 #else
88807 PyObject *__pyx_args, PyObject *__pyx_kwds
88808 #endif
88809 ) {
88810 PyObject *__pyx_v___pyx_type = 0;
88811 long __pyx_v___pyx_checksum;
88812 PyObject *__pyx_v___pyx_state = 0;
88813 #if !CYTHON_METH_FASTCALL
88814 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
88815 #endif
88816 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
88817 PyObject* values[3] = {0,0,0};
88818 int __pyx_lineno = 0;
88819 const char *__pyx_filename = NULL;
88820 int __pyx_clineno = 0;
88821 PyObject *__pyx_r = 0;
88822 __Pyx_RefNannyDeclarations
88823 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderContigs (wrapper)", 0);
88824 #if !CYTHON_METH_FASTCALL
88825 #if CYTHON_ASSUME_SAFE_MACROS
88826 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
88827 #else
88828 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
88829 #endif
88830 #endif
88831 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
88832 {
88833 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
88834 if (__pyx_kwds) {
88835 Py_ssize_t kw_args;
88836 switch (__pyx_nargs) {
88837 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
88838 CYTHON_FALLTHROUGH;
88839 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
88840 CYTHON_FALLTHROUGH;
88841 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
88842 CYTHON_FALLTHROUGH;
88843 case 0: break;
88844 default: goto __pyx_L5_argtuple_error;
88845 }
88846 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
88847 switch (__pyx_nargs) {
88848 case 0:
88849 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
88850 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
88851 kw_args--;
88852 }
88853 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
88854 else goto __pyx_L5_argtuple_error;
88855 CYTHON_FALLTHROUGH;
88856 case 1:
88857 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
88858 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
88859 kw_args--;
88860 }
88861 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
88862 else {
88863 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderContigs", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
88864 }
88865 CYTHON_FALLTHROUGH;
88866 case 2:
88867 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
88868 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
88869 kw_args--;
88870 }
88871 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
88872 else {
88873 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderContigs", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
88874 }
88875 }
88876 if (unlikely(kw_args > 0)) {
88877 const Py_ssize_t kwd_pos_args = __pyx_nargs;
88878 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantHeaderContigs") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
88879 }
88880 } else if (unlikely(__pyx_nargs != 3)) {
88881 goto __pyx_L5_argtuple_error;
88882 } else {
88883 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
88884 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
88885 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
88886 }
88887 __pyx_v___pyx_type = values[0];
88888 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
88889 __pyx_v___pyx_state = values[2];
88890 }
88891 goto __pyx_L6_skip;
88892 __pyx_L5_argtuple_error:;
88893 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderContigs", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
88894 __pyx_L6_skip:;
88895 goto __pyx_L4_argument_unpacking_done;
88896 __pyx_L3_error:;
88897 {
88898 Py_ssize_t __pyx_temp;
88899 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
88900 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
88901 }
88902 }
88903 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderContigs", __pyx_clineno, __pyx_lineno, __pyx_filename);
88904 __Pyx_RefNannyFinishContext();
88905 return NULL;
88906 __pyx_L4_argument_unpacking_done:;
88907 __pyx_r = __pyx_pf_5pysam_7libcbcf_8__pyx_unpickle_VariantHeaderContigs(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
88908
88909 /* function exit code */
88910 {
88911 Py_ssize_t __pyx_temp;
88912 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
88913 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
88914 }
88915 }
88916 __Pyx_RefNannyFinishContext();
88917 return __pyx_r;
88918 }
88919
88920 static PyObject *__pyx_pf_5pysam_7libcbcf_8__pyx_unpickle_VariantHeaderContigs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
88921 PyObject *__pyx_v___pyx_PickleError = 0;
88922 PyObject *__pyx_v___pyx_result = 0;
88923 PyObject *__pyx_r = NULL;
88924 __Pyx_TraceDeclarations
88925 __Pyx_RefNannyDeclarations
88926 PyObject *__pyx_t_1 = NULL;
88927 int __pyx_t_2;
88928 PyObject *__pyx_t_3 = NULL;
88929 PyObject *__pyx_t_4 = NULL;
88930 unsigned int __pyx_t_5;
88931 int __pyx_lineno = 0;
88932 const char *__pyx_filename = NULL;
88933 int __pyx_clineno = 0;
88934 __Pyx_TraceFrameInit(__pyx_codeobj__267)
88935 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderContigs", 1);
88936 __Pyx_TraceCall("__pyx_unpickle_VariantHeaderContigs", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
88937
88938 /* "(tree fragment)":4
88939 * cdef object __pyx_PickleError
88940 * cdef object __pyx_result
88941 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99): # <<<<<<<<<<<<<<
88942 * from pickle import PickleError as __pyx_PickleError
88943 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
88944 */
88945 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
88946 __Pyx_GOTREF(__pyx_t_1);
88947 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__260, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
88948 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88949 if (__pyx_t_2) {
88950
88951 /* "(tree fragment)":5
88952 * cdef object __pyx_result
88953 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99):
88954 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
88955 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
88956 * __pyx_result = VariantHeaderContigs.__new__(__pyx_type)
88957 */
88958 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
88959 __Pyx_GOTREF(__pyx_t_1);
88960 __Pyx_INCREF(__pyx_n_s_PickleError);
88961 __Pyx_GIVEREF(__pyx_n_s_PickleError);
88962 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
88963 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
88964 __Pyx_GOTREF(__pyx_t_3);
88965 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88966 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
88967 __Pyx_GOTREF(__pyx_t_1);
88968 __Pyx_INCREF(__pyx_t_1);
88969 __pyx_v___pyx_PickleError = __pyx_t_1;
88970 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88971 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88972
88973 /* "(tree fragment)":6
88974 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99):
88975 * from pickle import PickleError as __pyx_PickleError
88976 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum # <<<<<<<<<<<<<<
88977 * __pyx_result = VariantHeaderContigs.__new__(__pyx_type)
88978 * if __pyx_state is not None:
88979 */
88980 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
88981 __Pyx_GOTREF(__pyx_t_3);
88982 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
88983 __Pyx_GOTREF(__pyx_t_1);
88984 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88985 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
88986 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
88987 __PYX_ERR(4, 6, __pyx_L1_error)
88988
88989 /* "(tree fragment)":4
88990 * cdef object __pyx_PickleError
88991 * cdef object __pyx_result
88992 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99): # <<<<<<<<<<<<<<
88993 * from pickle import PickleError as __pyx_PickleError
88994 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
88995 */
88996 }
88997
88998 /* "(tree fragment)":7
88999 * from pickle import PickleError as __pyx_PickleError
89000 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89001 * __pyx_result = VariantHeaderContigs.__new__(__pyx_type) # <<<<<<<<<<<<<<
89002 * if __pyx_state is not None:
89003 * __pyx_unpickle_VariantHeaderContigs__set_state(<VariantHeaderContigs> __pyx_result, __pyx_state)
89004 */
89005 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
89006 __Pyx_GOTREF(__pyx_t_3);
89007 __pyx_t_4 = NULL;
89008 __pyx_t_5 = 0;
89009 #if CYTHON_UNPACK_METHODS
89010 if (likely(PyMethod_Check(__pyx_t_3))) {
89011 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
89012 if (likely(__pyx_t_4)) {
89013 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
89014 __Pyx_INCREF(__pyx_t_4);
89015 __Pyx_INCREF(function);
89016 __Pyx_DECREF_SET(__pyx_t_3, function);
89017 __pyx_t_5 = 1;
89018 }
89019 }
89020 #endif
89021 {
89022 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
89023 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
89024 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
89025 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
89026 __Pyx_GOTREF(__pyx_t_1);
89027 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
89028 }
89029 __pyx_v___pyx_result = __pyx_t_1;
89030 __pyx_t_1 = 0;
89031
89032 /* "(tree fragment)":8
89033 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89034 * __pyx_result = VariantHeaderContigs.__new__(__pyx_type)
89035 * if __pyx_state is not None: # <<<<<<<<<<<<<<
89036 * __pyx_unpickle_VariantHeaderContigs__set_state(<VariantHeaderContigs> __pyx_result, __pyx_state)
89037 * return __pyx_result
89038 */
89039 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
89040 if (__pyx_t_2) {
89041
89042 /* "(tree fragment)":9
89043 * __pyx_result = VariantHeaderContigs.__new__(__pyx_type)
89044 * if __pyx_state is not None:
89045 * __pyx_unpickle_VariantHeaderContigs__set_state(<VariantHeaderContigs> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
89046 * return __pyx_result
89047 * cdef __pyx_unpickle_VariantHeaderContigs__set_state(VariantHeaderContigs __pyx_result, tuple __pyx_state):
89048 */
89049 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
89050 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderContigs__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
89051 __Pyx_GOTREF(__pyx_t_1);
89052 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89053
89054 /* "(tree fragment)":8
89055 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89056 * __pyx_result = VariantHeaderContigs.__new__(__pyx_type)
89057 * if __pyx_state is not None: # <<<<<<<<<<<<<<
89058 * __pyx_unpickle_VariantHeaderContigs__set_state(<VariantHeaderContigs> __pyx_result, __pyx_state)
89059 * return __pyx_result
89060 */
89061 }
89062
89063 /* "(tree fragment)":10
89064 * if __pyx_state is not None:
89065 * __pyx_unpickle_VariantHeaderContigs__set_state(<VariantHeaderContigs> __pyx_result, __pyx_state)
89066 * return __pyx_result # <<<<<<<<<<<<<<
89067 * cdef __pyx_unpickle_VariantHeaderContigs__set_state(VariantHeaderContigs __pyx_result, tuple __pyx_state):
89068 * __pyx_result.header = __pyx_state[0]
89069 */
89070 __Pyx_XDECREF(__pyx_r);
89071 __Pyx_INCREF(__pyx_v___pyx_result);
89072 __pyx_r = __pyx_v___pyx_result;
89073 goto __pyx_L0;
89074
89075 /* "(tree fragment)":1
89076 * def __pyx_unpickle_VariantHeaderContigs(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
89077 * cdef object __pyx_PickleError
89078 * cdef object __pyx_result
89079 */
89080
89081 /* function exit code */
89082 __pyx_L1_error:;
89083 __Pyx_XDECREF(__pyx_t_1);
89084 __Pyx_XDECREF(__pyx_t_3);
89085 __Pyx_XDECREF(__pyx_t_4);
89086 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderContigs", __pyx_clineno, __pyx_lineno, __pyx_filename);
89087 __pyx_r = NULL;
89088 __pyx_L0:;
89089 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
89090 __Pyx_XDECREF(__pyx_v___pyx_result);
89091 __Pyx_XGIVEREF(__pyx_r);
89092 __Pyx_TraceReturn(__pyx_r, 0);
89093 __Pyx_RefNannyFinishContext();
89094 return __pyx_r;
89095 }
89096
89097 /* "(tree fragment)":11
89098 * __pyx_unpickle_VariantHeaderContigs__set_state(<VariantHeaderContigs> __pyx_result, __pyx_state)
89099 * return __pyx_result
89100 * cdef __pyx_unpickle_VariantHeaderContigs__set_state(VariantHeaderContigs __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
89101 * __pyx_result.header = __pyx_state[0]
89102 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
89103 */
89104
89105 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderContigs__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
89106 PyObject *__pyx_r = NULL;
89107 __Pyx_TraceDeclarations
89108 __Pyx_RefNannyDeclarations
89109 PyObject *__pyx_t_1 = NULL;
89110 int __pyx_t_2;
89111 Py_ssize_t __pyx_t_3;
89112 int __pyx_t_4;
89113 PyObject *__pyx_t_5 = NULL;
89114 PyObject *__pyx_t_6 = NULL;
89115 PyObject *__pyx_t_7 = NULL;
89116 unsigned int __pyx_t_8;
89117 int __pyx_lineno = 0;
89118 const char *__pyx_filename = NULL;
89119 int __pyx_clineno = 0;
89120 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderContigs__set_state", 1);
89121 __Pyx_TraceCall("__pyx_unpickle_VariantHeaderContigs__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
89122
89123 /* "(tree fragment)":12
89124 * return __pyx_result
89125 * cdef __pyx_unpickle_VariantHeaderContigs__set_state(VariantHeaderContigs __pyx_result, tuple __pyx_state):
89126 * __pyx_result.header = __pyx_state[0] # <<<<<<<<<<<<<<
89127 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
89128 * __pyx_result.__dict__.update(__pyx_state[1])
89129 */
89130 if (unlikely(__pyx_v___pyx_state == Py_None)) {
89131 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
89132 __PYX_ERR(4, 12, __pyx_L1_error)
89133 }
89134 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
89135 __Pyx_GOTREF(__pyx_t_1);
89136 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantHeader))))) __PYX_ERR(4, 12, __pyx_L1_error)
89137 __Pyx_GIVEREF(__pyx_t_1);
89138 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->header);
89139 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->header);
89140 __pyx_v___pyx_result->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_1);
89141 __pyx_t_1 = 0;
89142
89143 /* "(tree fragment)":13
89144 * cdef __pyx_unpickle_VariantHeaderContigs__set_state(VariantHeaderContigs __pyx_result, tuple __pyx_state):
89145 * __pyx_result.header = __pyx_state[0]
89146 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
89147 * __pyx_result.__dict__.update(__pyx_state[1])
89148 */
89149 if (unlikely(__pyx_v___pyx_state == Py_None)) {
89150 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
89151 __PYX_ERR(4, 13, __pyx_L1_error)
89152 }
89153 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
89154 __pyx_t_4 = (__pyx_t_3 > 1);
89155 if (__pyx_t_4) {
89156 } else {
89157 __pyx_t_2 = __pyx_t_4;
89158 goto __pyx_L4_bool_binop_done;
89159 }
89160 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
89161 __pyx_t_2 = __pyx_t_4;
89162 __pyx_L4_bool_binop_done:;
89163 if (__pyx_t_2) {
89164
89165 /* "(tree fragment)":14
89166 * __pyx_result.header = __pyx_state[0]
89167 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
89168 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
89169 */
89170 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
89171 __Pyx_GOTREF(__pyx_t_5);
89172 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
89173 __Pyx_GOTREF(__pyx_t_6);
89174 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
89175 if (unlikely(__pyx_v___pyx_state == Py_None)) {
89176 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
89177 __PYX_ERR(4, 14, __pyx_L1_error)
89178 }
89179 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
89180 __Pyx_GOTREF(__pyx_t_5);
89181 __pyx_t_7 = NULL;
89182 __pyx_t_8 = 0;
89183 #if CYTHON_UNPACK_METHODS
89184 if (likely(PyMethod_Check(__pyx_t_6))) {
89185 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
89186 if (likely(__pyx_t_7)) {
89187 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
89188 __Pyx_INCREF(__pyx_t_7);
89189 __Pyx_INCREF(function);
89190 __Pyx_DECREF_SET(__pyx_t_6, function);
89191 __pyx_t_8 = 1;
89192 }
89193 }
89194 #endif
89195 {
89196 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
89197 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
89198 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
89199 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
89200 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
89201 __Pyx_GOTREF(__pyx_t_1);
89202 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
89203 }
89204 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89205
89206 /* "(tree fragment)":13
89207 * cdef __pyx_unpickle_VariantHeaderContigs__set_state(VariantHeaderContigs __pyx_result, tuple __pyx_state):
89208 * __pyx_result.header = __pyx_state[0]
89209 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
89210 * __pyx_result.__dict__.update(__pyx_state[1])
89211 */
89212 }
89213
89214 /* "(tree fragment)":11
89215 * __pyx_unpickle_VariantHeaderContigs__set_state(<VariantHeaderContigs> __pyx_result, __pyx_state)
89216 * return __pyx_result
89217 * cdef __pyx_unpickle_VariantHeaderContigs__set_state(VariantHeaderContigs __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
89218 * __pyx_result.header = __pyx_state[0]
89219 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
89220 */
89221
89222 /* function exit code */
89223 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
89224 goto __pyx_L0;
89225 __pyx_L1_error:;
89226 __Pyx_XDECREF(__pyx_t_1);
89227 __Pyx_XDECREF(__pyx_t_5);
89228 __Pyx_XDECREF(__pyx_t_6);
89229 __Pyx_XDECREF(__pyx_t_7);
89230 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderContigs__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
89231 __pyx_r = 0;
89232 __pyx_L0:;
89233 __Pyx_XGIVEREF(__pyx_r);
89234 __Pyx_TraceReturn(__pyx_r, 0);
89235 __Pyx_RefNannyFinishContext();
89236 return __pyx_r;
89237 }
89238
89239 /* "(tree fragment)":1
89240 * def __pyx_unpickle_VariantHeaderSamples(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
89241 * cdef object __pyx_PickleError
89242 * cdef object __pyx_result
89243 */
89244
89245 /* Python wrapper */
89246 static PyObject *__pyx_pw_5pysam_7libcbcf_11__pyx_unpickle_VariantHeaderSamples(PyObject *__pyx_self,
89247 #if CYTHON_METH_FASTCALL
89248 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
89249 #else
89250 PyObject *__pyx_args, PyObject *__pyx_kwds
89251 #endif
89252 ); /*proto*/
89253 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_10__pyx_unpickle_VariantHeaderSamples, "__pyx_unpickle_VariantHeaderSamples(__pyx_type, long __pyx_checksum, __pyx_state)");
89254 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_11__pyx_unpickle_VariantHeaderSamples = {"__pyx_unpickle_VariantHeaderSamples", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11__pyx_unpickle_VariantHeaderSamples, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_10__pyx_unpickle_VariantHeaderSamples};
89255 static PyObject *__pyx_pw_5pysam_7libcbcf_11__pyx_unpickle_VariantHeaderSamples(PyObject *__pyx_self,
89256 #if CYTHON_METH_FASTCALL
89257 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
89258 #else
89259 PyObject *__pyx_args, PyObject *__pyx_kwds
89260 #endif
89261 ) {
89262 PyObject *__pyx_v___pyx_type = 0;
89263 long __pyx_v___pyx_checksum;
89264 PyObject *__pyx_v___pyx_state = 0;
89265 #if !CYTHON_METH_FASTCALL
89266 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
89267 #endif
89268 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
89269 PyObject* values[3] = {0,0,0};
89270 int __pyx_lineno = 0;
89271 const char *__pyx_filename = NULL;
89272 int __pyx_clineno = 0;
89273 PyObject *__pyx_r = 0;
89274 __Pyx_RefNannyDeclarations
89275 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderSamples (wrapper)", 0);
89276 #if !CYTHON_METH_FASTCALL
89277 #if CYTHON_ASSUME_SAFE_MACROS
89278 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
89279 #else
89280 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
89281 #endif
89282 #endif
89283 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
89284 {
89285 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
89286 if (__pyx_kwds) {
89287 Py_ssize_t kw_args;
89288 switch (__pyx_nargs) {
89289 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
89290 CYTHON_FALLTHROUGH;
89291 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
89292 CYTHON_FALLTHROUGH;
89293 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
89294 CYTHON_FALLTHROUGH;
89295 case 0: break;
89296 default: goto __pyx_L5_argtuple_error;
89297 }
89298 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
89299 switch (__pyx_nargs) {
89300 case 0:
89301 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
89302 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
89303 kw_args--;
89304 }
89305 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
89306 else goto __pyx_L5_argtuple_error;
89307 CYTHON_FALLTHROUGH;
89308 case 1:
89309 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
89310 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
89311 kw_args--;
89312 }
89313 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
89314 else {
89315 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderSamples", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
89316 }
89317 CYTHON_FALLTHROUGH;
89318 case 2:
89319 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
89320 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
89321 kw_args--;
89322 }
89323 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
89324 else {
89325 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderSamples", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
89326 }
89327 }
89328 if (unlikely(kw_args > 0)) {
89329 const Py_ssize_t kwd_pos_args = __pyx_nargs;
89330 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantHeaderSamples") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
89331 }
89332 } else if (unlikely(__pyx_nargs != 3)) {
89333 goto __pyx_L5_argtuple_error;
89334 } else {
89335 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
89336 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
89337 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
89338 }
89339 __pyx_v___pyx_type = values[0];
89340 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
89341 __pyx_v___pyx_state = values[2];
89342 }
89343 goto __pyx_L6_skip;
89344 __pyx_L5_argtuple_error:;
89345 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantHeaderSamples", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
89346 __pyx_L6_skip:;
89347 goto __pyx_L4_argument_unpacking_done;
89348 __pyx_L3_error:;
89349 {
89350 Py_ssize_t __pyx_temp;
89351 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
89352 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
89353 }
89354 }
89355 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderSamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
89356 __Pyx_RefNannyFinishContext();
89357 return NULL;
89358 __pyx_L4_argument_unpacking_done:;
89359 __pyx_r = __pyx_pf_5pysam_7libcbcf_10__pyx_unpickle_VariantHeaderSamples(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
89360
89361 /* function exit code */
89362 {
89363 Py_ssize_t __pyx_temp;
89364 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
89365 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
89366 }
89367 }
89368 __Pyx_RefNannyFinishContext();
89369 return __pyx_r;
89370 }
89371
89372 static PyObject *__pyx_pf_5pysam_7libcbcf_10__pyx_unpickle_VariantHeaderSamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
89373 PyObject *__pyx_v___pyx_PickleError = 0;
89374 PyObject *__pyx_v___pyx_result = 0;
89375 PyObject *__pyx_r = NULL;
89376 __Pyx_TraceDeclarations
89377 __Pyx_RefNannyDeclarations
89378 PyObject *__pyx_t_1 = NULL;
89379 int __pyx_t_2;
89380 PyObject *__pyx_t_3 = NULL;
89381 PyObject *__pyx_t_4 = NULL;
89382 unsigned int __pyx_t_5;
89383 int __pyx_lineno = 0;
89384 const char *__pyx_filename = NULL;
89385 int __pyx_clineno = 0;
89386 __Pyx_TraceFrameInit(__pyx_codeobj__268)
89387 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderSamples", 1);
89388 __Pyx_TraceCall("__pyx_unpickle_VariantHeaderSamples", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
89389
89390 /* "(tree fragment)":4
89391 * cdef object __pyx_PickleError
89392 * cdef object __pyx_result
89393 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99): # <<<<<<<<<<<<<<
89394 * from pickle import PickleError as __pyx_PickleError
89395 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89396 */
89397 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
89398 __Pyx_GOTREF(__pyx_t_1);
89399 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__260, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
89400 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89401 if (__pyx_t_2) {
89402
89403 /* "(tree fragment)":5
89404 * cdef object __pyx_result
89405 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99):
89406 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
89407 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89408 * __pyx_result = VariantHeaderSamples.__new__(__pyx_type)
89409 */
89410 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
89411 __Pyx_GOTREF(__pyx_t_1);
89412 __Pyx_INCREF(__pyx_n_s_PickleError);
89413 __Pyx_GIVEREF(__pyx_n_s_PickleError);
89414 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
89415 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
89416 __Pyx_GOTREF(__pyx_t_3);
89417 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89418 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
89419 __Pyx_GOTREF(__pyx_t_1);
89420 __Pyx_INCREF(__pyx_t_1);
89421 __pyx_v___pyx_PickleError = __pyx_t_1;
89422 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89423 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
89424
89425 /* "(tree fragment)":6
89426 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99):
89427 * from pickle import PickleError as __pyx_PickleError
89428 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum # <<<<<<<<<<<<<<
89429 * __pyx_result = VariantHeaderSamples.__new__(__pyx_type)
89430 * if __pyx_state is not None:
89431 */
89432 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
89433 __Pyx_GOTREF(__pyx_t_3);
89434 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
89435 __Pyx_GOTREF(__pyx_t_1);
89436 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
89437 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
89438 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89439 __PYX_ERR(4, 6, __pyx_L1_error)
89440
89441 /* "(tree fragment)":4
89442 * cdef object __pyx_PickleError
89443 * cdef object __pyx_result
89444 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99): # <<<<<<<<<<<<<<
89445 * from pickle import PickleError as __pyx_PickleError
89446 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89447 */
89448 }
89449
89450 /* "(tree fragment)":7
89451 * from pickle import PickleError as __pyx_PickleError
89452 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89453 * __pyx_result = VariantHeaderSamples.__new__(__pyx_type) # <<<<<<<<<<<<<<
89454 * if __pyx_state is not None:
89455 * __pyx_unpickle_VariantHeaderSamples__set_state(<VariantHeaderSamples> __pyx_result, __pyx_state)
89456 */
89457 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
89458 __Pyx_GOTREF(__pyx_t_3);
89459 __pyx_t_4 = NULL;
89460 __pyx_t_5 = 0;
89461 #if CYTHON_UNPACK_METHODS
89462 if (likely(PyMethod_Check(__pyx_t_3))) {
89463 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
89464 if (likely(__pyx_t_4)) {
89465 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
89466 __Pyx_INCREF(__pyx_t_4);
89467 __Pyx_INCREF(function);
89468 __Pyx_DECREF_SET(__pyx_t_3, function);
89469 __pyx_t_5 = 1;
89470 }
89471 }
89472 #endif
89473 {
89474 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
89475 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
89476 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
89477 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
89478 __Pyx_GOTREF(__pyx_t_1);
89479 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
89480 }
89481 __pyx_v___pyx_result = __pyx_t_1;
89482 __pyx_t_1 = 0;
89483
89484 /* "(tree fragment)":8
89485 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89486 * __pyx_result = VariantHeaderSamples.__new__(__pyx_type)
89487 * if __pyx_state is not None: # <<<<<<<<<<<<<<
89488 * __pyx_unpickle_VariantHeaderSamples__set_state(<VariantHeaderSamples> __pyx_result, __pyx_state)
89489 * return __pyx_result
89490 */
89491 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
89492 if (__pyx_t_2) {
89493
89494 /* "(tree fragment)":9
89495 * __pyx_result = VariantHeaderSamples.__new__(__pyx_type)
89496 * if __pyx_state is not None:
89497 * __pyx_unpickle_VariantHeaderSamples__set_state(<VariantHeaderSamples> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
89498 * return __pyx_result
89499 * cdef __pyx_unpickle_VariantHeaderSamples__set_state(VariantHeaderSamples __pyx_result, tuple __pyx_state):
89500 */
89501 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
89502 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderSamples__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
89503 __Pyx_GOTREF(__pyx_t_1);
89504 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89505
89506 /* "(tree fragment)":8
89507 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
89508 * __pyx_result = VariantHeaderSamples.__new__(__pyx_type)
89509 * if __pyx_state is not None: # <<<<<<<<<<<<<<
89510 * __pyx_unpickle_VariantHeaderSamples__set_state(<VariantHeaderSamples> __pyx_result, __pyx_state)
89511 * return __pyx_result
89512 */
89513 }
89514
89515 /* "(tree fragment)":10
89516 * if __pyx_state is not None:
89517 * __pyx_unpickle_VariantHeaderSamples__set_state(<VariantHeaderSamples> __pyx_result, __pyx_state)
89518 * return __pyx_result # <<<<<<<<<<<<<<
89519 * cdef __pyx_unpickle_VariantHeaderSamples__set_state(VariantHeaderSamples __pyx_result, tuple __pyx_state):
89520 * __pyx_result.header = __pyx_state[0]
89521 */
89522 __Pyx_XDECREF(__pyx_r);
89523 __Pyx_INCREF(__pyx_v___pyx_result);
89524 __pyx_r = __pyx_v___pyx_result;
89525 goto __pyx_L0;
89526
89527 /* "(tree fragment)":1
89528 * def __pyx_unpickle_VariantHeaderSamples(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
89529 * cdef object __pyx_PickleError
89530 * cdef object __pyx_result
89531 */
89532
89533 /* function exit code */
89534 __pyx_L1_error:;
89535 __Pyx_XDECREF(__pyx_t_1);
89536 __Pyx_XDECREF(__pyx_t_3);
89537 __Pyx_XDECREF(__pyx_t_4);
89538 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderSamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
89539 __pyx_r = NULL;
89540 __pyx_L0:;
89541 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
89542 __Pyx_XDECREF(__pyx_v___pyx_result);
89543 __Pyx_XGIVEREF(__pyx_r);
89544 __Pyx_TraceReturn(__pyx_r, 0);
89545 __Pyx_RefNannyFinishContext();
89546 return __pyx_r;
89547 }
89548
89549 /* "(tree fragment)":11
89550 * __pyx_unpickle_VariantHeaderSamples__set_state(<VariantHeaderSamples> __pyx_result, __pyx_state)
89551 * return __pyx_result
89552 * cdef __pyx_unpickle_VariantHeaderSamples__set_state(VariantHeaderSamples __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
89553 * __pyx_result.header = __pyx_state[0]
89554 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
89555 */
89556
89557 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantHeaderSamples__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
89558 PyObject *__pyx_r = NULL;
89559 __Pyx_TraceDeclarations
89560 __Pyx_RefNannyDeclarations
89561 PyObject *__pyx_t_1 = NULL;
89562 int __pyx_t_2;
89563 Py_ssize_t __pyx_t_3;
89564 int __pyx_t_4;
89565 PyObject *__pyx_t_5 = NULL;
89566 PyObject *__pyx_t_6 = NULL;
89567 PyObject *__pyx_t_7 = NULL;
89568 unsigned int __pyx_t_8;
89569 int __pyx_lineno = 0;
89570 const char *__pyx_filename = NULL;
89571 int __pyx_clineno = 0;
89572 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantHeaderSamples__set_state", 1);
89573 __Pyx_TraceCall("__pyx_unpickle_VariantHeaderSamples__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
89574
89575 /* "(tree fragment)":12
89576 * return __pyx_result
89577 * cdef __pyx_unpickle_VariantHeaderSamples__set_state(VariantHeaderSamples __pyx_result, tuple __pyx_state):
89578 * __pyx_result.header = __pyx_state[0] # <<<<<<<<<<<<<<
89579 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
89580 * __pyx_result.__dict__.update(__pyx_state[1])
89581 */
89582 if (unlikely(__pyx_v___pyx_state == Py_None)) {
89583 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
89584 __PYX_ERR(4, 12, __pyx_L1_error)
89585 }
89586 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
89587 __Pyx_GOTREF(__pyx_t_1);
89588 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantHeader))))) __PYX_ERR(4, 12, __pyx_L1_error)
89589 __Pyx_GIVEREF(__pyx_t_1);
89590 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->header);
89591 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->header);
89592 __pyx_v___pyx_result->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)__pyx_t_1);
89593 __pyx_t_1 = 0;
89594
89595 /* "(tree fragment)":13
89596 * cdef __pyx_unpickle_VariantHeaderSamples__set_state(VariantHeaderSamples __pyx_result, tuple __pyx_state):
89597 * __pyx_result.header = __pyx_state[0]
89598 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
89599 * __pyx_result.__dict__.update(__pyx_state[1])
89600 */
89601 if (unlikely(__pyx_v___pyx_state == Py_None)) {
89602 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
89603 __PYX_ERR(4, 13, __pyx_L1_error)
89604 }
89605 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
89606 __pyx_t_4 = (__pyx_t_3 > 1);
89607 if (__pyx_t_4) {
89608 } else {
89609 __pyx_t_2 = __pyx_t_4;
89610 goto __pyx_L4_bool_binop_done;
89611 }
89612 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
89613 __pyx_t_2 = __pyx_t_4;
89614 __pyx_L4_bool_binop_done:;
89615 if (__pyx_t_2) {
89616
89617 /* "(tree fragment)":14
89618 * __pyx_result.header = __pyx_state[0]
89619 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
89620 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
89621 */
89622 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
89623 __Pyx_GOTREF(__pyx_t_5);
89624 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
89625 __Pyx_GOTREF(__pyx_t_6);
89626 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
89627 if (unlikely(__pyx_v___pyx_state == Py_None)) {
89628 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
89629 __PYX_ERR(4, 14, __pyx_L1_error)
89630 }
89631 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
89632 __Pyx_GOTREF(__pyx_t_5);
89633 __pyx_t_7 = NULL;
89634 __pyx_t_8 = 0;
89635 #if CYTHON_UNPACK_METHODS
89636 if (likely(PyMethod_Check(__pyx_t_6))) {
89637 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
89638 if (likely(__pyx_t_7)) {
89639 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
89640 __Pyx_INCREF(__pyx_t_7);
89641 __Pyx_INCREF(function);
89642 __Pyx_DECREF_SET(__pyx_t_6, function);
89643 __pyx_t_8 = 1;
89644 }
89645 }
89646 #endif
89647 {
89648 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
89649 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
89650 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
89651 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
89652 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
89653 __Pyx_GOTREF(__pyx_t_1);
89654 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
89655 }
89656 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89657
89658 /* "(tree fragment)":13
89659 * cdef __pyx_unpickle_VariantHeaderSamples__set_state(VariantHeaderSamples __pyx_result, tuple __pyx_state):
89660 * __pyx_result.header = __pyx_state[0]
89661 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
89662 * __pyx_result.__dict__.update(__pyx_state[1])
89663 */
89664 }
89665
89666 /* "(tree fragment)":11
89667 * __pyx_unpickle_VariantHeaderSamples__set_state(<VariantHeaderSamples> __pyx_result, __pyx_state)
89668 * return __pyx_result
89669 * cdef __pyx_unpickle_VariantHeaderSamples__set_state(VariantHeaderSamples __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
89670 * __pyx_result.header = __pyx_state[0]
89671 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
89672 */
89673
89674 /* function exit code */
89675 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
89676 goto __pyx_L0;
89677 __pyx_L1_error:;
89678 __Pyx_XDECREF(__pyx_t_1);
89679 __Pyx_XDECREF(__pyx_t_5);
89680 __Pyx_XDECREF(__pyx_t_6);
89681 __Pyx_XDECREF(__pyx_t_7);
89682 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantHeaderSamples__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
89683 __pyx_r = 0;
89684 __pyx_L0:;
89685 __Pyx_XGIVEREF(__pyx_r);
89686 __Pyx_TraceReturn(__pyx_r, 0);
89687 __Pyx_RefNannyFinishContext();
89688 return __pyx_r;
89689 }
89690
89691 /* "(tree fragment)":1
89692 * def __pyx_unpickle_VariantRecordFilter(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
89693 * cdef object __pyx_PickleError
89694 * cdef object __pyx_result
89695 */
89696
89697 /* Python wrapper */
89698 static PyObject *__pyx_pw_5pysam_7libcbcf_13__pyx_unpickle_VariantRecordFilter(PyObject *__pyx_self,
89699 #if CYTHON_METH_FASTCALL
89700 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
89701 #else
89702 PyObject *__pyx_args, PyObject *__pyx_kwds
89703 #endif
89704 ); /*proto*/
89705 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_12__pyx_unpickle_VariantRecordFilter, "__pyx_unpickle_VariantRecordFilter(__pyx_type, long __pyx_checksum, __pyx_state)");
89706 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_13__pyx_unpickle_VariantRecordFilter = {"__pyx_unpickle_VariantRecordFilter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13__pyx_unpickle_VariantRecordFilter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_12__pyx_unpickle_VariantRecordFilter};
89707 static PyObject *__pyx_pw_5pysam_7libcbcf_13__pyx_unpickle_VariantRecordFilter(PyObject *__pyx_self,
89708 #if CYTHON_METH_FASTCALL
89709 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
89710 #else
89711 PyObject *__pyx_args, PyObject *__pyx_kwds
89712 #endif
89713 ) {
89714 PyObject *__pyx_v___pyx_type = 0;
89715 long __pyx_v___pyx_checksum;
89716 PyObject *__pyx_v___pyx_state = 0;
89717 #if !CYTHON_METH_FASTCALL
89718 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
89719 #endif
89720 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
89721 PyObject* values[3] = {0,0,0};
89722 int __pyx_lineno = 0;
89723 const char *__pyx_filename = NULL;
89724 int __pyx_clineno = 0;
89725 PyObject *__pyx_r = 0;
89726 __Pyx_RefNannyDeclarations
89727 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordFilter (wrapper)", 0);
89728 #if !CYTHON_METH_FASTCALL
89729 #if CYTHON_ASSUME_SAFE_MACROS
89730 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
89731 #else
89732 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
89733 #endif
89734 #endif
89735 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
89736 {
89737 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
89738 if (__pyx_kwds) {
89739 Py_ssize_t kw_args;
89740 switch (__pyx_nargs) {
89741 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
89742 CYTHON_FALLTHROUGH;
89743 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
89744 CYTHON_FALLTHROUGH;
89745 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
89746 CYTHON_FALLTHROUGH;
89747 case 0: break;
89748 default: goto __pyx_L5_argtuple_error;
89749 }
89750 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
89751 switch (__pyx_nargs) {
89752 case 0:
89753 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
89754 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
89755 kw_args--;
89756 }
89757 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
89758 else goto __pyx_L5_argtuple_error;
89759 CYTHON_FALLTHROUGH;
89760 case 1:
89761 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
89762 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
89763 kw_args--;
89764 }
89765 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
89766 else {
89767 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordFilter", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
89768 }
89769 CYTHON_FALLTHROUGH;
89770 case 2:
89771 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
89772 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
89773 kw_args--;
89774 }
89775 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
89776 else {
89777 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordFilter", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
89778 }
89779 }
89780 if (unlikely(kw_args > 0)) {
89781 const Py_ssize_t kwd_pos_args = __pyx_nargs;
89782 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantRecordFilter") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
89783 }
89784 } else if (unlikely(__pyx_nargs != 3)) {
89785 goto __pyx_L5_argtuple_error;
89786 } else {
89787 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
89788 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
89789 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
89790 }
89791 __pyx_v___pyx_type = values[0];
89792 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
89793 __pyx_v___pyx_state = values[2];
89794 }
89795 goto __pyx_L6_skip;
89796 __pyx_L5_argtuple_error:;
89797 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordFilter", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
89798 __pyx_L6_skip:;
89799 goto __pyx_L4_argument_unpacking_done;
89800 __pyx_L3_error:;
89801 {
89802 Py_ssize_t __pyx_temp;
89803 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
89804 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
89805 }
89806 }
89807 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordFilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
89808 __Pyx_RefNannyFinishContext();
89809 return NULL;
89810 __pyx_L4_argument_unpacking_done:;
89811 __pyx_r = __pyx_pf_5pysam_7libcbcf_12__pyx_unpickle_VariantRecordFilter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
89812
89813 /* function exit code */
89814 {
89815 Py_ssize_t __pyx_temp;
89816 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
89817 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
89818 }
89819 }
89820 __Pyx_RefNannyFinishContext();
89821 return __pyx_r;
89822 }
89823
89824 static PyObject *__pyx_pf_5pysam_7libcbcf_12__pyx_unpickle_VariantRecordFilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
89825 PyObject *__pyx_v___pyx_PickleError = 0;
89826 PyObject *__pyx_v___pyx_result = 0;
89827 PyObject *__pyx_r = NULL;
89828 __Pyx_TraceDeclarations
89829 __Pyx_RefNannyDeclarations
89830 PyObject *__pyx_t_1 = NULL;
89831 int __pyx_t_2;
89832 PyObject *__pyx_t_3 = NULL;
89833 PyObject *__pyx_t_4 = NULL;
89834 unsigned int __pyx_t_5;
89835 int __pyx_lineno = 0;
89836 const char *__pyx_filename = NULL;
89837 int __pyx_clineno = 0;
89838 __Pyx_TraceFrameInit(__pyx_codeobj__269)
89839 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordFilter", 1);
89840 __Pyx_TraceCall("__pyx_unpickle_VariantRecordFilter", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
89841
89842 /* "(tree fragment)":4
89843 * cdef object __pyx_PickleError
89844 * cdef object __pyx_result
89845 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f): # <<<<<<<<<<<<<<
89846 * from pickle import PickleError as __pyx_PickleError
89847 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
89848 */
89849 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
89850 __Pyx_GOTREF(__pyx_t_1);
89851 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__270, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
89852 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89853 if (__pyx_t_2) {
89854
89855 /* "(tree fragment)":5
89856 * cdef object __pyx_result
89857 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f):
89858 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
89859 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
89860 * __pyx_result = VariantRecordFilter.__new__(__pyx_type)
89861 */
89862 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
89863 __Pyx_GOTREF(__pyx_t_1);
89864 __Pyx_INCREF(__pyx_n_s_PickleError);
89865 __Pyx_GIVEREF(__pyx_n_s_PickleError);
89866 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
89867 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
89868 __Pyx_GOTREF(__pyx_t_3);
89869 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89870 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
89871 __Pyx_GOTREF(__pyx_t_1);
89872 __Pyx_INCREF(__pyx_t_1);
89873 __pyx_v___pyx_PickleError = __pyx_t_1;
89874 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89875 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
89876
89877 /* "(tree fragment)":6
89878 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f):
89879 * from pickle import PickleError as __pyx_PickleError
89880 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum # <<<<<<<<<<<<<<
89881 * __pyx_result = VariantRecordFilter.__new__(__pyx_type)
89882 * if __pyx_state is not None:
89883 */
89884 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
89885 __Pyx_GOTREF(__pyx_t_3);
89886 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
89887 __Pyx_GOTREF(__pyx_t_1);
89888 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
89889 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
89890 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89891 __PYX_ERR(4, 6, __pyx_L1_error)
89892
89893 /* "(tree fragment)":4
89894 * cdef object __pyx_PickleError
89895 * cdef object __pyx_result
89896 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f): # <<<<<<<<<<<<<<
89897 * from pickle import PickleError as __pyx_PickleError
89898 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
89899 */
89900 }
89901
89902 /* "(tree fragment)":7
89903 * from pickle import PickleError as __pyx_PickleError
89904 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
89905 * __pyx_result = VariantRecordFilter.__new__(__pyx_type) # <<<<<<<<<<<<<<
89906 * if __pyx_state is not None:
89907 * __pyx_unpickle_VariantRecordFilter__set_state(<VariantRecordFilter> __pyx_result, __pyx_state)
89908 */
89909 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
89910 __Pyx_GOTREF(__pyx_t_3);
89911 __pyx_t_4 = NULL;
89912 __pyx_t_5 = 0;
89913 #if CYTHON_UNPACK_METHODS
89914 if (likely(PyMethod_Check(__pyx_t_3))) {
89915 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
89916 if (likely(__pyx_t_4)) {
89917 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
89918 __Pyx_INCREF(__pyx_t_4);
89919 __Pyx_INCREF(function);
89920 __Pyx_DECREF_SET(__pyx_t_3, function);
89921 __pyx_t_5 = 1;
89922 }
89923 }
89924 #endif
89925 {
89926 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
89927 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
89928 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
89929 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
89930 __Pyx_GOTREF(__pyx_t_1);
89931 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
89932 }
89933 __pyx_v___pyx_result = __pyx_t_1;
89934 __pyx_t_1 = 0;
89935
89936 /* "(tree fragment)":8
89937 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
89938 * __pyx_result = VariantRecordFilter.__new__(__pyx_type)
89939 * if __pyx_state is not None: # <<<<<<<<<<<<<<
89940 * __pyx_unpickle_VariantRecordFilter__set_state(<VariantRecordFilter> __pyx_result, __pyx_state)
89941 * return __pyx_result
89942 */
89943 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
89944 if (__pyx_t_2) {
89945
89946 /* "(tree fragment)":9
89947 * __pyx_result = VariantRecordFilter.__new__(__pyx_type)
89948 * if __pyx_state is not None:
89949 * __pyx_unpickle_VariantRecordFilter__set_state(<VariantRecordFilter> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
89950 * return __pyx_result
89951 * cdef __pyx_unpickle_VariantRecordFilter__set_state(VariantRecordFilter __pyx_result, tuple __pyx_state):
89952 */
89953 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
89954 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordFilter__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
89955 __Pyx_GOTREF(__pyx_t_1);
89956 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89957
89958 /* "(tree fragment)":8
89959 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
89960 * __pyx_result = VariantRecordFilter.__new__(__pyx_type)
89961 * if __pyx_state is not None: # <<<<<<<<<<<<<<
89962 * __pyx_unpickle_VariantRecordFilter__set_state(<VariantRecordFilter> __pyx_result, __pyx_state)
89963 * return __pyx_result
89964 */
89965 }
89966
89967 /* "(tree fragment)":10
89968 * if __pyx_state is not None:
89969 * __pyx_unpickle_VariantRecordFilter__set_state(<VariantRecordFilter> __pyx_result, __pyx_state)
89970 * return __pyx_result # <<<<<<<<<<<<<<
89971 * cdef __pyx_unpickle_VariantRecordFilter__set_state(VariantRecordFilter __pyx_result, tuple __pyx_state):
89972 * __pyx_result.record = __pyx_state[0]
89973 */
89974 __Pyx_XDECREF(__pyx_r);
89975 __Pyx_INCREF(__pyx_v___pyx_result);
89976 __pyx_r = __pyx_v___pyx_result;
89977 goto __pyx_L0;
89978
89979 /* "(tree fragment)":1
89980 * def __pyx_unpickle_VariantRecordFilter(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
89981 * cdef object __pyx_PickleError
89982 * cdef object __pyx_result
89983 */
89984
89985 /* function exit code */
89986 __pyx_L1_error:;
89987 __Pyx_XDECREF(__pyx_t_1);
89988 __Pyx_XDECREF(__pyx_t_3);
89989 __Pyx_XDECREF(__pyx_t_4);
89990 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordFilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
89991 __pyx_r = NULL;
89992 __pyx_L0:;
89993 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
89994 __Pyx_XDECREF(__pyx_v___pyx_result);
89995 __Pyx_XGIVEREF(__pyx_r);
89996 __Pyx_TraceReturn(__pyx_r, 0);
89997 __Pyx_RefNannyFinishContext();
89998 return __pyx_r;
89999 }
90000
90001 /* "(tree fragment)":11
90002 * __pyx_unpickle_VariantRecordFilter__set_state(<VariantRecordFilter> __pyx_result, __pyx_state)
90003 * return __pyx_result
90004 * cdef __pyx_unpickle_VariantRecordFilter__set_state(VariantRecordFilter __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
90005 * __pyx_result.record = __pyx_state[0]
90006 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90007 */
90008
90009 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordFilter__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
90010 PyObject *__pyx_r = NULL;
90011 __Pyx_TraceDeclarations
90012 __Pyx_RefNannyDeclarations
90013 PyObject *__pyx_t_1 = NULL;
90014 int __pyx_t_2;
90015 Py_ssize_t __pyx_t_3;
90016 int __pyx_t_4;
90017 PyObject *__pyx_t_5 = NULL;
90018 PyObject *__pyx_t_6 = NULL;
90019 PyObject *__pyx_t_7 = NULL;
90020 unsigned int __pyx_t_8;
90021 int __pyx_lineno = 0;
90022 const char *__pyx_filename = NULL;
90023 int __pyx_clineno = 0;
90024 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordFilter__set_state", 1);
90025 __Pyx_TraceCall("__pyx_unpickle_VariantRecordFilter__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
90026
90027 /* "(tree fragment)":12
90028 * return __pyx_result
90029 * cdef __pyx_unpickle_VariantRecordFilter__set_state(VariantRecordFilter __pyx_result, tuple __pyx_state):
90030 * __pyx_result.record = __pyx_state[0] # <<<<<<<<<<<<<<
90031 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90032 * __pyx_result.__dict__.update(__pyx_state[1])
90033 */
90034 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90035 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
90036 __PYX_ERR(4, 12, __pyx_L1_error)
90037 }
90038 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
90039 __Pyx_GOTREF(__pyx_t_1);
90040 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantRecord))))) __PYX_ERR(4, 12, __pyx_L1_error)
90041 __Pyx_GIVEREF(__pyx_t_1);
90042 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->record);
90043 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->record);
90044 __pyx_v___pyx_result->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_1);
90045 __pyx_t_1 = 0;
90046
90047 /* "(tree fragment)":13
90048 * cdef __pyx_unpickle_VariantRecordFilter__set_state(VariantRecordFilter __pyx_result, tuple __pyx_state):
90049 * __pyx_result.record = __pyx_state[0]
90050 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
90051 * __pyx_result.__dict__.update(__pyx_state[1])
90052 */
90053 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90054 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
90055 __PYX_ERR(4, 13, __pyx_L1_error)
90056 }
90057 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
90058 __pyx_t_4 = (__pyx_t_3 > 1);
90059 if (__pyx_t_4) {
90060 } else {
90061 __pyx_t_2 = __pyx_t_4;
90062 goto __pyx_L4_bool_binop_done;
90063 }
90064 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
90065 __pyx_t_2 = __pyx_t_4;
90066 __pyx_L4_bool_binop_done:;
90067 if (__pyx_t_2) {
90068
90069 /* "(tree fragment)":14
90070 * __pyx_result.record = __pyx_state[0]
90071 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90072 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
90073 */
90074 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
90075 __Pyx_GOTREF(__pyx_t_5);
90076 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
90077 __Pyx_GOTREF(__pyx_t_6);
90078 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
90079 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90080 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
90081 __PYX_ERR(4, 14, __pyx_L1_error)
90082 }
90083 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
90084 __Pyx_GOTREF(__pyx_t_5);
90085 __pyx_t_7 = NULL;
90086 __pyx_t_8 = 0;
90087 #if CYTHON_UNPACK_METHODS
90088 if (likely(PyMethod_Check(__pyx_t_6))) {
90089 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
90090 if (likely(__pyx_t_7)) {
90091 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
90092 __Pyx_INCREF(__pyx_t_7);
90093 __Pyx_INCREF(function);
90094 __Pyx_DECREF_SET(__pyx_t_6, function);
90095 __pyx_t_8 = 1;
90096 }
90097 }
90098 #endif
90099 {
90100 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
90101 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
90102 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
90103 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
90104 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
90105 __Pyx_GOTREF(__pyx_t_1);
90106 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
90107 }
90108 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90109
90110 /* "(tree fragment)":13
90111 * cdef __pyx_unpickle_VariantRecordFilter__set_state(VariantRecordFilter __pyx_result, tuple __pyx_state):
90112 * __pyx_result.record = __pyx_state[0]
90113 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
90114 * __pyx_result.__dict__.update(__pyx_state[1])
90115 */
90116 }
90117
90118 /* "(tree fragment)":11
90119 * __pyx_unpickle_VariantRecordFilter__set_state(<VariantRecordFilter> __pyx_result, __pyx_state)
90120 * return __pyx_result
90121 * cdef __pyx_unpickle_VariantRecordFilter__set_state(VariantRecordFilter __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
90122 * __pyx_result.record = __pyx_state[0]
90123 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90124 */
90125
90126 /* function exit code */
90127 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
90128 goto __pyx_L0;
90129 __pyx_L1_error:;
90130 __Pyx_XDECREF(__pyx_t_1);
90131 __Pyx_XDECREF(__pyx_t_5);
90132 __Pyx_XDECREF(__pyx_t_6);
90133 __Pyx_XDECREF(__pyx_t_7);
90134 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordFilter__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
90135 __pyx_r = 0;
90136 __pyx_L0:;
90137 __Pyx_XGIVEREF(__pyx_r);
90138 __Pyx_TraceReturn(__pyx_r, 0);
90139 __Pyx_RefNannyFinishContext();
90140 return __pyx_r;
90141 }
90142
90143 /* "(tree fragment)":1
90144 * def __pyx_unpickle_VariantRecordFormat(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
90145 * cdef object __pyx_PickleError
90146 * cdef object __pyx_result
90147 */
90148
90149 /* Python wrapper */
90150 static PyObject *__pyx_pw_5pysam_7libcbcf_15__pyx_unpickle_VariantRecordFormat(PyObject *__pyx_self,
90151 #if CYTHON_METH_FASTCALL
90152 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
90153 #else
90154 PyObject *__pyx_args, PyObject *__pyx_kwds
90155 #endif
90156 ); /*proto*/
90157 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_14__pyx_unpickle_VariantRecordFormat, "__pyx_unpickle_VariantRecordFormat(__pyx_type, long __pyx_checksum, __pyx_state)");
90158 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_15__pyx_unpickle_VariantRecordFormat = {"__pyx_unpickle_VariantRecordFormat", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_15__pyx_unpickle_VariantRecordFormat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_14__pyx_unpickle_VariantRecordFormat};
90159 static PyObject *__pyx_pw_5pysam_7libcbcf_15__pyx_unpickle_VariantRecordFormat(PyObject *__pyx_self,
90160 #if CYTHON_METH_FASTCALL
90161 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
90162 #else
90163 PyObject *__pyx_args, PyObject *__pyx_kwds
90164 #endif
90165 ) {
90166 PyObject *__pyx_v___pyx_type = 0;
90167 long __pyx_v___pyx_checksum;
90168 PyObject *__pyx_v___pyx_state = 0;
90169 #if !CYTHON_METH_FASTCALL
90170 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
90171 #endif
90172 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
90173 PyObject* values[3] = {0,0,0};
90174 int __pyx_lineno = 0;
90175 const char *__pyx_filename = NULL;
90176 int __pyx_clineno = 0;
90177 PyObject *__pyx_r = 0;
90178 __Pyx_RefNannyDeclarations
90179 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordFormat (wrapper)", 0);
90180 #if !CYTHON_METH_FASTCALL
90181 #if CYTHON_ASSUME_SAFE_MACROS
90182 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
90183 #else
90184 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
90185 #endif
90186 #endif
90187 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
90188 {
90189 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
90190 if (__pyx_kwds) {
90191 Py_ssize_t kw_args;
90192 switch (__pyx_nargs) {
90193 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
90194 CYTHON_FALLTHROUGH;
90195 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
90196 CYTHON_FALLTHROUGH;
90197 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
90198 CYTHON_FALLTHROUGH;
90199 case 0: break;
90200 default: goto __pyx_L5_argtuple_error;
90201 }
90202 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
90203 switch (__pyx_nargs) {
90204 case 0:
90205 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
90206 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
90207 kw_args--;
90208 }
90209 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
90210 else goto __pyx_L5_argtuple_error;
90211 CYTHON_FALLTHROUGH;
90212 case 1:
90213 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
90214 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
90215 kw_args--;
90216 }
90217 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
90218 else {
90219 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordFormat", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
90220 }
90221 CYTHON_FALLTHROUGH;
90222 case 2:
90223 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
90224 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
90225 kw_args--;
90226 }
90227 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
90228 else {
90229 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordFormat", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
90230 }
90231 }
90232 if (unlikely(kw_args > 0)) {
90233 const Py_ssize_t kwd_pos_args = __pyx_nargs;
90234 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantRecordFormat") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
90235 }
90236 } else if (unlikely(__pyx_nargs != 3)) {
90237 goto __pyx_L5_argtuple_error;
90238 } else {
90239 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
90240 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
90241 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
90242 }
90243 __pyx_v___pyx_type = values[0];
90244 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
90245 __pyx_v___pyx_state = values[2];
90246 }
90247 goto __pyx_L6_skip;
90248 __pyx_L5_argtuple_error:;
90249 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordFormat", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
90250 __pyx_L6_skip:;
90251 goto __pyx_L4_argument_unpacking_done;
90252 __pyx_L3_error:;
90253 {
90254 Py_ssize_t __pyx_temp;
90255 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
90256 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
90257 }
90258 }
90259 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
90260 __Pyx_RefNannyFinishContext();
90261 return NULL;
90262 __pyx_L4_argument_unpacking_done:;
90263 __pyx_r = __pyx_pf_5pysam_7libcbcf_14__pyx_unpickle_VariantRecordFormat(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
90264
90265 /* function exit code */
90266 {
90267 Py_ssize_t __pyx_temp;
90268 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
90269 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
90270 }
90271 }
90272 __Pyx_RefNannyFinishContext();
90273 return __pyx_r;
90274 }
90275
90276 static PyObject *__pyx_pf_5pysam_7libcbcf_14__pyx_unpickle_VariantRecordFormat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
90277 PyObject *__pyx_v___pyx_PickleError = 0;
90278 PyObject *__pyx_v___pyx_result = 0;
90279 PyObject *__pyx_r = NULL;
90280 __Pyx_TraceDeclarations
90281 __Pyx_RefNannyDeclarations
90282 PyObject *__pyx_t_1 = NULL;
90283 int __pyx_t_2;
90284 PyObject *__pyx_t_3 = NULL;
90285 PyObject *__pyx_t_4 = NULL;
90286 unsigned int __pyx_t_5;
90287 int __pyx_lineno = 0;
90288 const char *__pyx_filename = NULL;
90289 int __pyx_clineno = 0;
90290 __Pyx_TraceFrameInit(__pyx_codeobj__271)
90291 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordFormat", 1);
90292 __Pyx_TraceCall("__pyx_unpickle_VariantRecordFormat", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
90293
90294 /* "(tree fragment)":4
90295 * cdef object __pyx_PickleError
90296 * cdef object __pyx_result
90297 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f): # <<<<<<<<<<<<<<
90298 * from pickle import PickleError as __pyx_PickleError
90299 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90300 */
90301 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
90302 __Pyx_GOTREF(__pyx_t_1);
90303 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__270, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
90304 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90305 if (__pyx_t_2) {
90306
90307 /* "(tree fragment)":5
90308 * cdef object __pyx_result
90309 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f):
90310 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
90311 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90312 * __pyx_result = VariantRecordFormat.__new__(__pyx_type)
90313 */
90314 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
90315 __Pyx_GOTREF(__pyx_t_1);
90316 __Pyx_INCREF(__pyx_n_s_PickleError);
90317 __Pyx_GIVEREF(__pyx_n_s_PickleError);
90318 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
90319 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
90320 __Pyx_GOTREF(__pyx_t_3);
90321 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90322 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
90323 __Pyx_GOTREF(__pyx_t_1);
90324 __Pyx_INCREF(__pyx_t_1);
90325 __pyx_v___pyx_PickleError = __pyx_t_1;
90326 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90327 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
90328
90329 /* "(tree fragment)":6
90330 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f):
90331 * from pickle import PickleError as __pyx_PickleError
90332 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum # <<<<<<<<<<<<<<
90333 * __pyx_result = VariantRecordFormat.__new__(__pyx_type)
90334 * if __pyx_state is not None:
90335 */
90336 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
90337 __Pyx_GOTREF(__pyx_t_3);
90338 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
90339 __Pyx_GOTREF(__pyx_t_1);
90340 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
90341 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
90342 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90343 __PYX_ERR(4, 6, __pyx_L1_error)
90344
90345 /* "(tree fragment)":4
90346 * cdef object __pyx_PickleError
90347 * cdef object __pyx_result
90348 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f): # <<<<<<<<<<<<<<
90349 * from pickle import PickleError as __pyx_PickleError
90350 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90351 */
90352 }
90353
90354 /* "(tree fragment)":7
90355 * from pickle import PickleError as __pyx_PickleError
90356 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90357 * __pyx_result = VariantRecordFormat.__new__(__pyx_type) # <<<<<<<<<<<<<<
90358 * if __pyx_state is not None:
90359 * __pyx_unpickle_VariantRecordFormat__set_state(<VariantRecordFormat> __pyx_result, __pyx_state)
90360 */
90361 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
90362 __Pyx_GOTREF(__pyx_t_3);
90363 __pyx_t_4 = NULL;
90364 __pyx_t_5 = 0;
90365 #if CYTHON_UNPACK_METHODS
90366 if (likely(PyMethod_Check(__pyx_t_3))) {
90367 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
90368 if (likely(__pyx_t_4)) {
90369 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
90370 __Pyx_INCREF(__pyx_t_4);
90371 __Pyx_INCREF(function);
90372 __Pyx_DECREF_SET(__pyx_t_3, function);
90373 __pyx_t_5 = 1;
90374 }
90375 }
90376 #endif
90377 {
90378 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
90379 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
90380 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
90381 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
90382 __Pyx_GOTREF(__pyx_t_1);
90383 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
90384 }
90385 __pyx_v___pyx_result = __pyx_t_1;
90386 __pyx_t_1 = 0;
90387
90388 /* "(tree fragment)":8
90389 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90390 * __pyx_result = VariantRecordFormat.__new__(__pyx_type)
90391 * if __pyx_state is not None: # <<<<<<<<<<<<<<
90392 * __pyx_unpickle_VariantRecordFormat__set_state(<VariantRecordFormat> __pyx_result, __pyx_state)
90393 * return __pyx_result
90394 */
90395 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
90396 if (__pyx_t_2) {
90397
90398 /* "(tree fragment)":9
90399 * __pyx_result = VariantRecordFormat.__new__(__pyx_type)
90400 * if __pyx_state is not None:
90401 * __pyx_unpickle_VariantRecordFormat__set_state(<VariantRecordFormat> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
90402 * return __pyx_result
90403 * cdef __pyx_unpickle_VariantRecordFormat__set_state(VariantRecordFormat __pyx_result, tuple __pyx_state):
90404 */
90405 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
90406 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordFormat__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
90407 __Pyx_GOTREF(__pyx_t_1);
90408 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90409
90410 /* "(tree fragment)":8
90411 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90412 * __pyx_result = VariantRecordFormat.__new__(__pyx_type)
90413 * if __pyx_state is not None: # <<<<<<<<<<<<<<
90414 * __pyx_unpickle_VariantRecordFormat__set_state(<VariantRecordFormat> __pyx_result, __pyx_state)
90415 * return __pyx_result
90416 */
90417 }
90418
90419 /* "(tree fragment)":10
90420 * if __pyx_state is not None:
90421 * __pyx_unpickle_VariantRecordFormat__set_state(<VariantRecordFormat> __pyx_result, __pyx_state)
90422 * return __pyx_result # <<<<<<<<<<<<<<
90423 * cdef __pyx_unpickle_VariantRecordFormat__set_state(VariantRecordFormat __pyx_result, tuple __pyx_state):
90424 * __pyx_result.record = __pyx_state[0]
90425 */
90426 __Pyx_XDECREF(__pyx_r);
90427 __Pyx_INCREF(__pyx_v___pyx_result);
90428 __pyx_r = __pyx_v___pyx_result;
90429 goto __pyx_L0;
90430
90431 /* "(tree fragment)":1
90432 * def __pyx_unpickle_VariantRecordFormat(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
90433 * cdef object __pyx_PickleError
90434 * cdef object __pyx_result
90435 */
90436
90437 /* function exit code */
90438 __pyx_L1_error:;
90439 __Pyx_XDECREF(__pyx_t_1);
90440 __Pyx_XDECREF(__pyx_t_3);
90441 __Pyx_XDECREF(__pyx_t_4);
90442 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
90443 __pyx_r = NULL;
90444 __pyx_L0:;
90445 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
90446 __Pyx_XDECREF(__pyx_v___pyx_result);
90447 __Pyx_XGIVEREF(__pyx_r);
90448 __Pyx_TraceReturn(__pyx_r, 0);
90449 __Pyx_RefNannyFinishContext();
90450 return __pyx_r;
90451 }
90452
90453 /* "(tree fragment)":11
90454 * __pyx_unpickle_VariantRecordFormat__set_state(<VariantRecordFormat> __pyx_result, __pyx_state)
90455 * return __pyx_result
90456 * cdef __pyx_unpickle_VariantRecordFormat__set_state(VariantRecordFormat __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
90457 * __pyx_result.record = __pyx_state[0]
90458 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90459 */
90460
90461 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordFormat__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
90462 PyObject *__pyx_r = NULL;
90463 __Pyx_TraceDeclarations
90464 __Pyx_RefNannyDeclarations
90465 PyObject *__pyx_t_1 = NULL;
90466 int __pyx_t_2;
90467 Py_ssize_t __pyx_t_3;
90468 int __pyx_t_4;
90469 PyObject *__pyx_t_5 = NULL;
90470 PyObject *__pyx_t_6 = NULL;
90471 PyObject *__pyx_t_7 = NULL;
90472 unsigned int __pyx_t_8;
90473 int __pyx_lineno = 0;
90474 const char *__pyx_filename = NULL;
90475 int __pyx_clineno = 0;
90476 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordFormat__set_state", 1);
90477 __Pyx_TraceCall("__pyx_unpickle_VariantRecordFormat__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
90478
90479 /* "(tree fragment)":12
90480 * return __pyx_result
90481 * cdef __pyx_unpickle_VariantRecordFormat__set_state(VariantRecordFormat __pyx_result, tuple __pyx_state):
90482 * __pyx_result.record = __pyx_state[0] # <<<<<<<<<<<<<<
90483 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90484 * __pyx_result.__dict__.update(__pyx_state[1])
90485 */
90486 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90487 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
90488 __PYX_ERR(4, 12, __pyx_L1_error)
90489 }
90490 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
90491 __Pyx_GOTREF(__pyx_t_1);
90492 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantRecord))))) __PYX_ERR(4, 12, __pyx_L1_error)
90493 __Pyx_GIVEREF(__pyx_t_1);
90494 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->record);
90495 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->record);
90496 __pyx_v___pyx_result->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_1);
90497 __pyx_t_1 = 0;
90498
90499 /* "(tree fragment)":13
90500 * cdef __pyx_unpickle_VariantRecordFormat__set_state(VariantRecordFormat __pyx_result, tuple __pyx_state):
90501 * __pyx_result.record = __pyx_state[0]
90502 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
90503 * __pyx_result.__dict__.update(__pyx_state[1])
90504 */
90505 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90506 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
90507 __PYX_ERR(4, 13, __pyx_L1_error)
90508 }
90509 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
90510 __pyx_t_4 = (__pyx_t_3 > 1);
90511 if (__pyx_t_4) {
90512 } else {
90513 __pyx_t_2 = __pyx_t_4;
90514 goto __pyx_L4_bool_binop_done;
90515 }
90516 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
90517 __pyx_t_2 = __pyx_t_4;
90518 __pyx_L4_bool_binop_done:;
90519 if (__pyx_t_2) {
90520
90521 /* "(tree fragment)":14
90522 * __pyx_result.record = __pyx_state[0]
90523 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90524 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
90525 */
90526 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
90527 __Pyx_GOTREF(__pyx_t_5);
90528 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
90529 __Pyx_GOTREF(__pyx_t_6);
90530 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
90531 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90532 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
90533 __PYX_ERR(4, 14, __pyx_L1_error)
90534 }
90535 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
90536 __Pyx_GOTREF(__pyx_t_5);
90537 __pyx_t_7 = NULL;
90538 __pyx_t_8 = 0;
90539 #if CYTHON_UNPACK_METHODS
90540 if (likely(PyMethod_Check(__pyx_t_6))) {
90541 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
90542 if (likely(__pyx_t_7)) {
90543 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
90544 __Pyx_INCREF(__pyx_t_7);
90545 __Pyx_INCREF(function);
90546 __Pyx_DECREF_SET(__pyx_t_6, function);
90547 __pyx_t_8 = 1;
90548 }
90549 }
90550 #endif
90551 {
90552 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
90553 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
90554 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
90555 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
90556 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
90557 __Pyx_GOTREF(__pyx_t_1);
90558 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
90559 }
90560 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90561
90562 /* "(tree fragment)":13
90563 * cdef __pyx_unpickle_VariantRecordFormat__set_state(VariantRecordFormat __pyx_result, tuple __pyx_state):
90564 * __pyx_result.record = __pyx_state[0]
90565 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
90566 * __pyx_result.__dict__.update(__pyx_state[1])
90567 */
90568 }
90569
90570 /* "(tree fragment)":11
90571 * __pyx_unpickle_VariantRecordFormat__set_state(<VariantRecordFormat> __pyx_result, __pyx_state)
90572 * return __pyx_result
90573 * cdef __pyx_unpickle_VariantRecordFormat__set_state(VariantRecordFormat __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
90574 * __pyx_result.record = __pyx_state[0]
90575 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90576 */
90577
90578 /* function exit code */
90579 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
90580 goto __pyx_L0;
90581 __pyx_L1_error:;
90582 __Pyx_XDECREF(__pyx_t_1);
90583 __Pyx_XDECREF(__pyx_t_5);
90584 __Pyx_XDECREF(__pyx_t_6);
90585 __Pyx_XDECREF(__pyx_t_7);
90586 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordFormat__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
90587 __pyx_r = 0;
90588 __pyx_L0:;
90589 __Pyx_XGIVEREF(__pyx_r);
90590 __Pyx_TraceReturn(__pyx_r, 0);
90591 __Pyx_RefNannyFinishContext();
90592 return __pyx_r;
90593 }
90594
90595 /* "(tree fragment)":1
90596 * def __pyx_unpickle_VariantRecordInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
90597 * cdef object __pyx_PickleError
90598 * cdef object __pyx_result
90599 */
90600
90601 /* Python wrapper */
90602 static PyObject *__pyx_pw_5pysam_7libcbcf_17__pyx_unpickle_VariantRecordInfo(PyObject *__pyx_self,
90603 #if CYTHON_METH_FASTCALL
90604 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
90605 #else
90606 PyObject *__pyx_args, PyObject *__pyx_kwds
90607 #endif
90608 ); /*proto*/
90609 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_16__pyx_unpickle_VariantRecordInfo, "__pyx_unpickle_VariantRecordInfo(__pyx_type, long __pyx_checksum, __pyx_state)");
90610 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_17__pyx_unpickle_VariantRecordInfo = {"__pyx_unpickle_VariantRecordInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17__pyx_unpickle_VariantRecordInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_16__pyx_unpickle_VariantRecordInfo};
90611 static PyObject *__pyx_pw_5pysam_7libcbcf_17__pyx_unpickle_VariantRecordInfo(PyObject *__pyx_self,
90612 #if CYTHON_METH_FASTCALL
90613 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
90614 #else
90615 PyObject *__pyx_args, PyObject *__pyx_kwds
90616 #endif
90617 ) {
90618 PyObject *__pyx_v___pyx_type = 0;
90619 long __pyx_v___pyx_checksum;
90620 PyObject *__pyx_v___pyx_state = 0;
90621 #if !CYTHON_METH_FASTCALL
90622 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
90623 #endif
90624 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
90625 PyObject* values[3] = {0,0,0};
90626 int __pyx_lineno = 0;
90627 const char *__pyx_filename = NULL;
90628 int __pyx_clineno = 0;
90629 PyObject *__pyx_r = 0;
90630 __Pyx_RefNannyDeclarations
90631 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordInfo (wrapper)", 0);
90632 #if !CYTHON_METH_FASTCALL
90633 #if CYTHON_ASSUME_SAFE_MACROS
90634 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
90635 #else
90636 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
90637 #endif
90638 #endif
90639 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
90640 {
90641 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
90642 if (__pyx_kwds) {
90643 Py_ssize_t kw_args;
90644 switch (__pyx_nargs) {
90645 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
90646 CYTHON_FALLTHROUGH;
90647 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
90648 CYTHON_FALLTHROUGH;
90649 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
90650 CYTHON_FALLTHROUGH;
90651 case 0: break;
90652 default: goto __pyx_L5_argtuple_error;
90653 }
90654 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
90655 switch (__pyx_nargs) {
90656 case 0:
90657 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
90658 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
90659 kw_args--;
90660 }
90661 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
90662 else goto __pyx_L5_argtuple_error;
90663 CYTHON_FALLTHROUGH;
90664 case 1:
90665 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
90666 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
90667 kw_args--;
90668 }
90669 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
90670 else {
90671 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordInfo", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
90672 }
90673 CYTHON_FALLTHROUGH;
90674 case 2:
90675 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
90676 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
90677 kw_args--;
90678 }
90679 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
90680 else {
90681 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordInfo", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
90682 }
90683 }
90684 if (unlikely(kw_args > 0)) {
90685 const Py_ssize_t kwd_pos_args = __pyx_nargs;
90686 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantRecordInfo") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
90687 }
90688 } else if (unlikely(__pyx_nargs != 3)) {
90689 goto __pyx_L5_argtuple_error;
90690 } else {
90691 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
90692 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
90693 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
90694 }
90695 __pyx_v___pyx_type = values[0];
90696 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
90697 __pyx_v___pyx_state = values[2];
90698 }
90699 goto __pyx_L6_skip;
90700 __pyx_L5_argtuple_error:;
90701 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
90702 __pyx_L6_skip:;
90703 goto __pyx_L4_argument_unpacking_done;
90704 __pyx_L3_error:;
90705 {
90706 Py_ssize_t __pyx_temp;
90707 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
90708 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
90709 }
90710 }
90711 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
90712 __Pyx_RefNannyFinishContext();
90713 return NULL;
90714 __pyx_L4_argument_unpacking_done:;
90715 __pyx_r = __pyx_pf_5pysam_7libcbcf_16__pyx_unpickle_VariantRecordInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
90716
90717 /* function exit code */
90718 {
90719 Py_ssize_t __pyx_temp;
90720 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
90721 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
90722 }
90723 }
90724 __Pyx_RefNannyFinishContext();
90725 return __pyx_r;
90726 }
90727
90728 static PyObject *__pyx_pf_5pysam_7libcbcf_16__pyx_unpickle_VariantRecordInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
90729 PyObject *__pyx_v___pyx_PickleError = 0;
90730 PyObject *__pyx_v___pyx_result = 0;
90731 PyObject *__pyx_r = NULL;
90732 __Pyx_TraceDeclarations
90733 __Pyx_RefNannyDeclarations
90734 PyObject *__pyx_t_1 = NULL;
90735 int __pyx_t_2;
90736 PyObject *__pyx_t_3 = NULL;
90737 PyObject *__pyx_t_4 = NULL;
90738 unsigned int __pyx_t_5;
90739 int __pyx_lineno = 0;
90740 const char *__pyx_filename = NULL;
90741 int __pyx_clineno = 0;
90742 __Pyx_TraceFrameInit(__pyx_codeobj__272)
90743 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordInfo", 1);
90744 __Pyx_TraceCall("__pyx_unpickle_VariantRecordInfo", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
90745
90746 /* "(tree fragment)":4
90747 * cdef object __pyx_PickleError
90748 * cdef object __pyx_result
90749 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f): # <<<<<<<<<<<<<<
90750 * from pickle import PickleError as __pyx_PickleError
90751 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90752 */
90753 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
90754 __Pyx_GOTREF(__pyx_t_1);
90755 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__270, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
90756 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90757 if (__pyx_t_2) {
90758
90759 /* "(tree fragment)":5
90760 * cdef object __pyx_result
90761 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f):
90762 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
90763 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90764 * __pyx_result = VariantRecordInfo.__new__(__pyx_type)
90765 */
90766 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
90767 __Pyx_GOTREF(__pyx_t_1);
90768 __Pyx_INCREF(__pyx_n_s_PickleError);
90769 __Pyx_GIVEREF(__pyx_n_s_PickleError);
90770 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
90771 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
90772 __Pyx_GOTREF(__pyx_t_3);
90773 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90774 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
90775 __Pyx_GOTREF(__pyx_t_1);
90776 __Pyx_INCREF(__pyx_t_1);
90777 __pyx_v___pyx_PickleError = __pyx_t_1;
90778 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90779 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
90780
90781 /* "(tree fragment)":6
90782 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f):
90783 * from pickle import PickleError as __pyx_PickleError
90784 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum # <<<<<<<<<<<<<<
90785 * __pyx_result = VariantRecordInfo.__new__(__pyx_type)
90786 * if __pyx_state is not None:
90787 */
90788 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
90789 __Pyx_GOTREF(__pyx_t_3);
90790 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
90791 __Pyx_GOTREF(__pyx_t_1);
90792 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
90793 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
90794 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90795 __PYX_ERR(4, 6, __pyx_L1_error)
90796
90797 /* "(tree fragment)":4
90798 * cdef object __pyx_PickleError
90799 * cdef object __pyx_result
90800 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f): # <<<<<<<<<<<<<<
90801 * from pickle import PickleError as __pyx_PickleError
90802 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90803 */
90804 }
90805
90806 /* "(tree fragment)":7
90807 * from pickle import PickleError as __pyx_PickleError
90808 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90809 * __pyx_result = VariantRecordInfo.__new__(__pyx_type) # <<<<<<<<<<<<<<
90810 * if __pyx_state is not None:
90811 * __pyx_unpickle_VariantRecordInfo__set_state(<VariantRecordInfo> __pyx_result, __pyx_state)
90812 */
90813 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
90814 __Pyx_GOTREF(__pyx_t_3);
90815 __pyx_t_4 = NULL;
90816 __pyx_t_5 = 0;
90817 #if CYTHON_UNPACK_METHODS
90818 if (likely(PyMethod_Check(__pyx_t_3))) {
90819 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
90820 if (likely(__pyx_t_4)) {
90821 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
90822 __Pyx_INCREF(__pyx_t_4);
90823 __Pyx_INCREF(function);
90824 __Pyx_DECREF_SET(__pyx_t_3, function);
90825 __pyx_t_5 = 1;
90826 }
90827 }
90828 #endif
90829 {
90830 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
90831 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
90832 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
90833 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
90834 __Pyx_GOTREF(__pyx_t_1);
90835 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
90836 }
90837 __pyx_v___pyx_result = __pyx_t_1;
90838 __pyx_t_1 = 0;
90839
90840 /* "(tree fragment)":8
90841 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90842 * __pyx_result = VariantRecordInfo.__new__(__pyx_type)
90843 * if __pyx_state is not None: # <<<<<<<<<<<<<<
90844 * __pyx_unpickle_VariantRecordInfo__set_state(<VariantRecordInfo> __pyx_result, __pyx_state)
90845 * return __pyx_result
90846 */
90847 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
90848 if (__pyx_t_2) {
90849
90850 /* "(tree fragment)":9
90851 * __pyx_result = VariantRecordInfo.__new__(__pyx_type)
90852 * if __pyx_state is not None:
90853 * __pyx_unpickle_VariantRecordInfo__set_state(<VariantRecordInfo> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
90854 * return __pyx_result
90855 * cdef __pyx_unpickle_VariantRecordInfo__set_state(VariantRecordInfo __pyx_result, tuple __pyx_state):
90856 */
90857 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
90858 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordInfo__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
90859 __Pyx_GOTREF(__pyx_t_1);
90860 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90861
90862 /* "(tree fragment)":8
90863 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
90864 * __pyx_result = VariantRecordInfo.__new__(__pyx_type)
90865 * if __pyx_state is not None: # <<<<<<<<<<<<<<
90866 * __pyx_unpickle_VariantRecordInfo__set_state(<VariantRecordInfo> __pyx_result, __pyx_state)
90867 * return __pyx_result
90868 */
90869 }
90870
90871 /* "(tree fragment)":10
90872 * if __pyx_state is not None:
90873 * __pyx_unpickle_VariantRecordInfo__set_state(<VariantRecordInfo> __pyx_result, __pyx_state)
90874 * return __pyx_result # <<<<<<<<<<<<<<
90875 * cdef __pyx_unpickle_VariantRecordInfo__set_state(VariantRecordInfo __pyx_result, tuple __pyx_state):
90876 * __pyx_result.record = __pyx_state[0]
90877 */
90878 __Pyx_XDECREF(__pyx_r);
90879 __Pyx_INCREF(__pyx_v___pyx_result);
90880 __pyx_r = __pyx_v___pyx_result;
90881 goto __pyx_L0;
90882
90883 /* "(tree fragment)":1
90884 * def __pyx_unpickle_VariantRecordInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
90885 * cdef object __pyx_PickleError
90886 * cdef object __pyx_result
90887 */
90888
90889 /* function exit code */
90890 __pyx_L1_error:;
90891 __Pyx_XDECREF(__pyx_t_1);
90892 __Pyx_XDECREF(__pyx_t_3);
90893 __Pyx_XDECREF(__pyx_t_4);
90894 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
90895 __pyx_r = NULL;
90896 __pyx_L0:;
90897 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
90898 __Pyx_XDECREF(__pyx_v___pyx_result);
90899 __Pyx_XGIVEREF(__pyx_r);
90900 __Pyx_TraceReturn(__pyx_r, 0);
90901 __Pyx_RefNannyFinishContext();
90902 return __pyx_r;
90903 }
90904
90905 /* "(tree fragment)":11
90906 * __pyx_unpickle_VariantRecordInfo__set_state(<VariantRecordInfo> __pyx_result, __pyx_state)
90907 * return __pyx_result
90908 * cdef __pyx_unpickle_VariantRecordInfo__set_state(VariantRecordInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
90909 * __pyx_result.record = __pyx_state[0]
90910 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90911 */
90912
90913 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordInfo__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
90914 PyObject *__pyx_r = NULL;
90915 __Pyx_TraceDeclarations
90916 __Pyx_RefNannyDeclarations
90917 PyObject *__pyx_t_1 = NULL;
90918 int __pyx_t_2;
90919 Py_ssize_t __pyx_t_3;
90920 int __pyx_t_4;
90921 PyObject *__pyx_t_5 = NULL;
90922 PyObject *__pyx_t_6 = NULL;
90923 PyObject *__pyx_t_7 = NULL;
90924 unsigned int __pyx_t_8;
90925 int __pyx_lineno = 0;
90926 const char *__pyx_filename = NULL;
90927 int __pyx_clineno = 0;
90928 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordInfo__set_state", 1);
90929 __Pyx_TraceCall("__pyx_unpickle_VariantRecordInfo__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
90930
90931 /* "(tree fragment)":12
90932 * return __pyx_result
90933 * cdef __pyx_unpickle_VariantRecordInfo__set_state(VariantRecordInfo __pyx_result, tuple __pyx_state):
90934 * __pyx_result.record = __pyx_state[0] # <<<<<<<<<<<<<<
90935 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90936 * __pyx_result.__dict__.update(__pyx_state[1])
90937 */
90938 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90939 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
90940 __PYX_ERR(4, 12, __pyx_L1_error)
90941 }
90942 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
90943 __Pyx_GOTREF(__pyx_t_1);
90944 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantRecord))))) __PYX_ERR(4, 12, __pyx_L1_error)
90945 __Pyx_GIVEREF(__pyx_t_1);
90946 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->record);
90947 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->record);
90948 __pyx_v___pyx_result->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_1);
90949 __pyx_t_1 = 0;
90950
90951 /* "(tree fragment)":13
90952 * cdef __pyx_unpickle_VariantRecordInfo__set_state(VariantRecordInfo __pyx_result, tuple __pyx_state):
90953 * __pyx_result.record = __pyx_state[0]
90954 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
90955 * __pyx_result.__dict__.update(__pyx_state[1])
90956 */
90957 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90958 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
90959 __PYX_ERR(4, 13, __pyx_L1_error)
90960 }
90961 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
90962 __pyx_t_4 = (__pyx_t_3 > 1);
90963 if (__pyx_t_4) {
90964 } else {
90965 __pyx_t_2 = __pyx_t_4;
90966 goto __pyx_L4_bool_binop_done;
90967 }
90968 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
90969 __pyx_t_2 = __pyx_t_4;
90970 __pyx_L4_bool_binop_done:;
90971 if (__pyx_t_2) {
90972
90973 /* "(tree fragment)":14
90974 * __pyx_result.record = __pyx_state[0]
90975 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
90976 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
90977 */
90978 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
90979 __Pyx_GOTREF(__pyx_t_5);
90980 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
90981 __Pyx_GOTREF(__pyx_t_6);
90982 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
90983 if (unlikely(__pyx_v___pyx_state == Py_None)) {
90984 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
90985 __PYX_ERR(4, 14, __pyx_L1_error)
90986 }
90987 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
90988 __Pyx_GOTREF(__pyx_t_5);
90989 __pyx_t_7 = NULL;
90990 __pyx_t_8 = 0;
90991 #if CYTHON_UNPACK_METHODS
90992 if (likely(PyMethod_Check(__pyx_t_6))) {
90993 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
90994 if (likely(__pyx_t_7)) {
90995 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
90996 __Pyx_INCREF(__pyx_t_7);
90997 __Pyx_INCREF(function);
90998 __Pyx_DECREF_SET(__pyx_t_6, function);
90999 __pyx_t_8 = 1;
91000 }
91001 }
91002 #endif
91003 {
91004 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
91005 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
91006 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
91007 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
91008 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
91009 __Pyx_GOTREF(__pyx_t_1);
91010 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
91011 }
91012 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91013
91014 /* "(tree fragment)":13
91015 * cdef __pyx_unpickle_VariantRecordInfo__set_state(VariantRecordInfo __pyx_result, tuple __pyx_state):
91016 * __pyx_result.record = __pyx_state[0]
91017 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
91018 * __pyx_result.__dict__.update(__pyx_state[1])
91019 */
91020 }
91021
91022 /* "(tree fragment)":11
91023 * __pyx_unpickle_VariantRecordInfo__set_state(<VariantRecordInfo> __pyx_result, __pyx_state)
91024 * return __pyx_result
91025 * cdef __pyx_unpickle_VariantRecordInfo__set_state(VariantRecordInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
91026 * __pyx_result.record = __pyx_state[0]
91027 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
91028 */
91029
91030 /* function exit code */
91031 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
91032 goto __pyx_L0;
91033 __pyx_L1_error:;
91034 __Pyx_XDECREF(__pyx_t_1);
91035 __Pyx_XDECREF(__pyx_t_5);
91036 __Pyx_XDECREF(__pyx_t_6);
91037 __Pyx_XDECREF(__pyx_t_7);
91038 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
91039 __pyx_r = 0;
91040 __pyx_L0:;
91041 __Pyx_XGIVEREF(__pyx_r);
91042 __Pyx_TraceReturn(__pyx_r, 0);
91043 __Pyx_RefNannyFinishContext();
91044 return __pyx_r;
91045 }
91046
91047 /* "(tree fragment)":1
91048 * def __pyx_unpickle_VariantRecordSamples(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
91049 * cdef object __pyx_PickleError
91050 * cdef object __pyx_result
91051 */
91052
91053 /* Python wrapper */
91054 static PyObject *__pyx_pw_5pysam_7libcbcf_19__pyx_unpickle_VariantRecordSamples(PyObject *__pyx_self,
91055 #if CYTHON_METH_FASTCALL
91056 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
91057 #else
91058 PyObject *__pyx_args, PyObject *__pyx_kwds
91059 #endif
91060 ); /*proto*/
91061 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_18__pyx_unpickle_VariantRecordSamples, "__pyx_unpickle_VariantRecordSamples(__pyx_type, long __pyx_checksum, __pyx_state)");
91062 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_19__pyx_unpickle_VariantRecordSamples = {"__pyx_unpickle_VariantRecordSamples", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19__pyx_unpickle_VariantRecordSamples, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_18__pyx_unpickle_VariantRecordSamples};
91063 static PyObject *__pyx_pw_5pysam_7libcbcf_19__pyx_unpickle_VariantRecordSamples(PyObject *__pyx_self,
91064 #if CYTHON_METH_FASTCALL
91065 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
91066 #else
91067 PyObject *__pyx_args, PyObject *__pyx_kwds
91068 #endif
91069 ) {
91070 PyObject *__pyx_v___pyx_type = 0;
91071 long __pyx_v___pyx_checksum;
91072 PyObject *__pyx_v___pyx_state = 0;
91073 #if !CYTHON_METH_FASTCALL
91074 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
91075 #endif
91076 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
91077 PyObject* values[3] = {0,0,0};
91078 int __pyx_lineno = 0;
91079 const char *__pyx_filename = NULL;
91080 int __pyx_clineno = 0;
91081 PyObject *__pyx_r = 0;
91082 __Pyx_RefNannyDeclarations
91083 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordSamples (wrapper)", 0);
91084 #if !CYTHON_METH_FASTCALL
91085 #if CYTHON_ASSUME_SAFE_MACROS
91086 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
91087 #else
91088 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
91089 #endif
91090 #endif
91091 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
91092 {
91093 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
91094 if (__pyx_kwds) {
91095 Py_ssize_t kw_args;
91096 switch (__pyx_nargs) {
91097 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
91098 CYTHON_FALLTHROUGH;
91099 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
91100 CYTHON_FALLTHROUGH;
91101 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
91102 CYTHON_FALLTHROUGH;
91103 case 0: break;
91104 default: goto __pyx_L5_argtuple_error;
91105 }
91106 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
91107 switch (__pyx_nargs) {
91108 case 0:
91109 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
91110 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
91111 kw_args--;
91112 }
91113 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
91114 else goto __pyx_L5_argtuple_error;
91115 CYTHON_FALLTHROUGH;
91116 case 1:
91117 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
91118 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
91119 kw_args--;
91120 }
91121 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
91122 else {
91123 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordSamples", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
91124 }
91125 CYTHON_FALLTHROUGH;
91126 case 2:
91127 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
91128 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
91129 kw_args--;
91130 }
91131 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
91132 else {
91133 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordSamples", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
91134 }
91135 }
91136 if (unlikely(kw_args > 0)) {
91137 const Py_ssize_t kwd_pos_args = __pyx_nargs;
91138 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantRecordSamples") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
91139 }
91140 } else if (unlikely(__pyx_nargs != 3)) {
91141 goto __pyx_L5_argtuple_error;
91142 } else {
91143 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
91144 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
91145 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
91146 }
91147 __pyx_v___pyx_type = values[0];
91148 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
91149 __pyx_v___pyx_state = values[2];
91150 }
91151 goto __pyx_L6_skip;
91152 __pyx_L5_argtuple_error:;
91153 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordSamples", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
91154 __pyx_L6_skip:;
91155 goto __pyx_L4_argument_unpacking_done;
91156 __pyx_L3_error:;
91157 {
91158 Py_ssize_t __pyx_temp;
91159 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
91160 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
91161 }
91162 }
91163 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordSamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
91164 __Pyx_RefNannyFinishContext();
91165 return NULL;
91166 __pyx_L4_argument_unpacking_done:;
91167 __pyx_r = __pyx_pf_5pysam_7libcbcf_18__pyx_unpickle_VariantRecordSamples(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
91168
91169 /* function exit code */
91170 {
91171 Py_ssize_t __pyx_temp;
91172 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
91173 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
91174 }
91175 }
91176 __Pyx_RefNannyFinishContext();
91177 return __pyx_r;
91178 }
91179
91180 static PyObject *__pyx_pf_5pysam_7libcbcf_18__pyx_unpickle_VariantRecordSamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
91181 PyObject *__pyx_v___pyx_PickleError = 0;
91182 PyObject *__pyx_v___pyx_result = 0;
91183 PyObject *__pyx_r = NULL;
91184 __Pyx_TraceDeclarations
91185 __Pyx_RefNannyDeclarations
91186 PyObject *__pyx_t_1 = NULL;
91187 int __pyx_t_2;
91188 PyObject *__pyx_t_3 = NULL;
91189 PyObject *__pyx_t_4 = NULL;
91190 unsigned int __pyx_t_5;
91191 int __pyx_lineno = 0;
91192 const char *__pyx_filename = NULL;
91193 int __pyx_clineno = 0;
91194 __Pyx_TraceFrameInit(__pyx_codeobj__273)
91195 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordSamples", 1);
91196 __Pyx_TraceCall("__pyx_unpickle_VariantRecordSamples", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
91197
91198 /* "(tree fragment)":4
91199 * cdef object __pyx_PickleError
91200 * cdef object __pyx_result
91201 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f): # <<<<<<<<<<<<<<
91202 * from pickle import PickleError as __pyx_PickleError
91203 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
91204 */
91205 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
91206 __Pyx_GOTREF(__pyx_t_1);
91207 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__270, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
91208 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91209 if (__pyx_t_2) {
91210
91211 /* "(tree fragment)":5
91212 * cdef object __pyx_result
91213 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f):
91214 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
91215 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
91216 * __pyx_result = VariantRecordSamples.__new__(__pyx_type)
91217 */
91218 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
91219 __Pyx_GOTREF(__pyx_t_1);
91220 __Pyx_INCREF(__pyx_n_s_PickleError);
91221 __Pyx_GIVEREF(__pyx_n_s_PickleError);
91222 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
91223 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
91224 __Pyx_GOTREF(__pyx_t_3);
91225 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91226 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
91227 __Pyx_GOTREF(__pyx_t_1);
91228 __Pyx_INCREF(__pyx_t_1);
91229 __pyx_v___pyx_PickleError = __pyx_t_1;
91230 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91231 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91232
91233 /* "(tree fragment)":6
91234 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f):
91235 * from pickle import PickleError as __pyx_PickleError
91236 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum # <<<<<<<<<<<<<<
91237 * __pyx_result = VariantRecordSamples.__new__(__pyx_type)
91238 * if __pyx_state is not None:
91239 */
91240 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
91241 __Pyx_GOTREF(__pyx_t_3);
91242 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
91243 __Pyx_GOTREF(__pyx_t_1);
91244 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91245 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
91246 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91247 __PYX_ERR(4, 6, __pyx_L1_error)
91248
91249 /* "(tree fragment)":4
91250 * cdef object __pyx_PickleError
91251 * cdef object __pyx_result
91252 * if __pyx_checksum not in (0x70ce871, 0x275a700, 0xde17f0f): # <<<<<<<<<<<<<<
91253 * from pickle import PickleError as __pyx_PickleError
91254 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
91255 */
91256 }
91257
91258 /* "(tree fragment)":7
91259 * from pickle import PickleError as __pyx_PickleError
91260 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
91261 * __pyx_result = VariantRecordSamples.__new__(__pyx_type) # <<<<<<<<<<<<<<
91262 * if __pyx_state is not None:
91263 * __pyx_unpickle_VariantRecordSamples__set_state(<VariantRecordSamples> __pyx_result, __pyx_state)
91264 */
91265 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
91266 __Pyx_GOTREF(__pyx_t_3);
91267 __pyx_t_4 = NULL;
91268 __pyx_t_5 = 0;
91269 #if CYTHON_UNPACK_METHODS
91270 if (likely(PyMethod_Check(__pyx_t_3))) {
91271 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
91272 if (likely(__pyx_t_4)) {
91273 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
91274 __Pyx_INCREF(__pyx_t_4);
91275 __Pyx_INCREF(function);
91276 __Pyx_DECREF_SET(__pyx_t_3, function);
91277 __pyx_t_5 = 1;
91278 }
91279 }
91280 #endif
91281 {
91282 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
91283 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
91284 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
91285 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
91286 __Pyx_GOTREF(__pyx_t_1);
91287 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91288 }
91289 __pyx_v___pyx_result = __pyx_t_1;
91290 __pyx_t_1 = 0;
91291
91292 /* "(tree fragment)":8
91293 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
91294 * __pyx_result = VariantRecordSamples.__new__(__pyx_type)
91295 * if __pyx_state is not None: # <<<<<<<<<<<<<<
91296 * __pyx_unpickle_VariantRecordSamples__set_state(<VariantRecordSamples> __pyx_result, __pyx_state)
91297 * return __pyx_result
91298 */
91299 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
91300 if (__pyx_t_2) {
91301
91302 /* "(tree fragment)":9
91303 * __pyx_result = VariantRecordSamples.__new__(__pyx_type)
91304 * if __pyx_state is not None:
91305 * __pyx_unpickle_VariantRecordSamples__set_state(<VariantRecordSamples> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
91306 * return __pyx_result
91307 * cdef __pyx_unpickle_VariantRecordSamples__set_state(VariantRecordSamples __pyx_result, tuple __pyx_state):
91308 */
91309 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
91310 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordSamples__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
91311 __Pyx_GOTREF(__pyx_t_1);
91312 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91313
91314 /* "(tree fragment)":8
91315 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x70ce871, 0x275a700, 0xde17f0f) = (record))" % __pyx_checksum
91316 * __pyx_result = VariantRecordSamples.__new__(__pyx_type)
91317 * if __pyx_state is not None: # <<<<<<<<<<<<<<
91318 * __pyx_unpickle_VariantRecordSamples__set_state(<VariantRecordSamples> __pyx_result, __pyx_state)
91319 * return __pyx_result
91320 */
91321 }
91322
91323 /* "(tree fragment)":10
91324 * if __pyx_state is not None:
91325 * __pyx_unpickle_VariantRecordSamples__set_state(<VariantRecordSamples> __pyx_result, __pyx_state)
91326 * return __pyx_result # <<<<<<<<<<<<<<
91327 * cdef __pyx_unpickle_VariantRecordSamples__set_state(VariantRecordSamples __pyx_result, tuple __pyx_state):
91328 * __pyx_result.record = __pyx_state[0]
91329 */
91330 __Pyx_XDECREF(__pyx_r);
91331 __Pyx_INCREF(__pyx_v___pyx_result);
91332 __pyx_r = __pyx_v___pyx_result;
91333 goto __pyx_L0;
91334
91335 /* "(tree fragment)":1
91336 * def __pyx_unpickle_VariantRecordSamples(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
91337 * cdef object __pyx_PickleError
91338 * cdef object __pyx_result
91339 */
91340
91341 /* function exit code */
91342 __pyx_L1_error:;
91343 __Pyx_XDECREF(__pyx_t_1);
91344 __Pyx_XDECREF(__pyx_t_3);
91345 __Pyx_XDECREF(__pyx_t_4);
91346 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordSamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
91347 __pyx_r = NULL;
91348 __pyx_L0:;
91349 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
91350 __Pyx_XDECREF(__pyx_v___pyx_result);
91351 __Pyx_XGIVEREF(__pyx_r);
91352 __Pyx_TraceReturn(__pyx_r, 0);
91353 __Pyx_RefNannyFinishContext();
91354 return __pyx_r;
91355 }
91356
91357 /* "(tree fragment)":11
91358 * __pyx_unpickle_VariantRecordSamples__set_state(<VariantRecordSamples> __pyx_result, __pyx_state)
91359 * return __pyx_result
91360 * cdef __pyx_unpickle_VariantRecordSamples__set_state(VariantRecordSamples __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
91361 * __pyx_result.record = __pyx_state[0]
91362 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
91363 */
91364
91365 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordSamples__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
91366 PyObject *__pyx_r = NULL;
91367 __Pyx_TraceDeclarations
91368 __Pyx_RefNannyDeclarations
91369 PyObject *__pyx_t_1 = NULL;
91370 int __pyx_t_2;
91371 Py_ssize_t __pyx_t_3;
91372 int __pyx_t_4;
91373 PyObject *__pyx_t_5 = NULL;
91374 PyObject *__pyx_t_6 = NULL;
91375 PyObject *__pyx_t_7 = NULL;
91376 unsigned int __pyx_t_8;
91377 int __pyx_lineno = 0;
91378 const char *__pyx_filename = NULL;
91379 int __pyx_clineno = 0;
91380 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordSamples__set_state", 1);
91381 __Pyx_TraceCall("__pyx_unpickle_VariantRecordSamples__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
91382
91383 /* "(tree fragment)":12
91384 * return __pyx_result
91385 * cdef __pyx_unpickle_VariantRecordSamples__set_state(VariantRecordSamples __pyx_result, tuple __pyx_state):
91386 * __pyx_result.record = __pyx_state[0] # <<<<<<<<<<<<<<
91387 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
91388 * __pyx_result.__dict__.update(__pyx_state[1])
91389 */
91390 if (unlikely(__pyx_v___pyx_state == Py_None)) {
91391 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
91392 __PYX_ERR(4, 12, __pyx_L1_error)
91393 }
91394 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
91395 __Pyx_GOTREF(__pyx_t_1);
91396 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantRecord))))) __PYX_ERR(4, 12, __pyx_L1_error)
91397 __Pyx_GIVEREF(__pyx_t_1);
91398 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->record);
91399 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->record);
91400 __pyx_v___pyx_result->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_1);
91401 __pyx_t_1 = 0;
91402
91403 /* "(tree fragment)":13
91404 * cdef __pyx_unpickle_VariantRecordSamples__set_state(VariantRecordSamples __pyx_result, tuple __pyx_state):
91405 * __pyx_result.record = __pyx_state[0]
91406 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
91407 * __pyx_result.__dict__.update(__pyx_state[1])
91408 */
91409 if (unlikely(__pyx_v___pyx_state == Py_None)) {
91410 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
91411 __PYX_ERR(4, 13, __pyx_L1_error)
91412 }
91413 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
91414 __pyx_t_4 = (__pyx_t_3 > 1);
91415 if (__pyx_t_4) {
91416 } else {
91417 __pyx_t_2 = __pyx_t_4;
91418 goto __pyx_L4_bool_binop_done;
91419 }
91420 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
91421 __pyx_t_2 = __pyx_t_4;
91422 __pyx_L4_bool_binop_done:;
91423 if (__pyx_t_2) {
91424
91425 /* "(tree fragment)":14
91426 * __pyx_result.record = __pyx_state[0]
91427 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
91428 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
91429 */
91430 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
91431 __Pyx_GOTREF(__pyx_t_5);
91432 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
91433 __Pyx_GOTREF(__pyx_t_6);
91434 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
91435 if (unlikely(__pyx_v___pyx_state == Py_None)) {
91436 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
91437 __PYX_ERR(4, 14, __pyx_L1_error)
91438 }
91439 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
91440 __Pyx_GOTREF(__pyx_t_5);
91441 __pyx_t_7 = NULL;
91442 __pyx_t_8 = 0;
91443 #if CYTHON_UNPACK_METHODS
91444 if (likely(PyMethod_Check(__pyx_t_6))) {
91445 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
91446 if (likely(__pyx_t_7)) {
91447 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
91448 __Pyx_INCREF(__pyx_t_7);
91449 __Pyx_INCREF(function);
91450 __Pyx_DECREF_SET(__pyx_t_6, function);
91451 __pyx_t_8 = 1;
91452 }
91453 }
91454 #endif
91455 {
91456 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
91457 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
91458 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
91459 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
91460 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
91461 __Pyx_GOTREF(__pyx_t_1);
91462 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
91463 }
91464 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91465
91466 /* "(tree fragment)":13
91467 * cdef __pyx_unpickle_VariantRecordSamples__set_state(VariantRecordSamples __pyx_result, tuple __pyx_state):
91468 * __pyx_result.record = __pyx_state[0]
91469 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
91470 * __pyx_result.__dict__.update(__pyx_state[1])
91471 */
91472 }
91473
91474 /* "(tree fragment)":11
91475 * __pyx_unpickle_VariantRecordSamples__set_state(<VariantRecordSamples> __pyx_result, __pyx_state)
91476 * return __pyx_result
91477 * cdef __pyx_unpickle_VariantRecordSamples__set_state(VariantRecordSamples __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
91478 * __pyx_result.record = __pyx_state[0]
91479 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
91480 */
91481
91482 /* function exit code */
91483 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
91484 goto __pyx_L0;
91485 __pyx_L1_error:;
91486 __Pyx_XDECREF(__pyx_t_1);
91487 __Pyx_XDECREF(__pyx_t_5);
91488 __Pyx_XDECREF(__pyx_t_6);
91489 __Pyx_XDECREF(__pyx_t_7);
91490 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordSamples__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
91491 __pyx_r = 0;
91492 __pyx_L0:;
91493 __Pyx_XGIVEREF(__pyx_r);
91494 __Pyx_TraceReturn(__pyx_r, 0);
91495 __Pyx_RefNannyFinishContext();
91496 return __pyx_r;
91497 }
91498
91499 /* "(tree fragment)":1
91500 * def __pyx_unpickle_VariantRecordSample(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
91501 * cdef object __pyx_PickleError
91502 * cdef object __pyx_result
91503 */
91504
91505 /* Python wrapper */
91506 static PyObject *__pyx_pw_5pysam_7libcbcf_21__pyx_unpickle_VariantRecordSample(PyObject *__pyx_self,
91507 #if CYTHON_METH_FASTCALL
91508 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
91509 #else
91510 PyObject *__pyx_args, PyObject *__pyx_kwds
91511 #endif
91512 ); /*proto*/
91513 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_20__pyx_unpickle_VariantRecordSample, "__pyx_unpickle_VariantRecordSample(__pyx_type, long __pyx_checksum, __pyx_state)");
91514 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_21__pyx_unpickle_VariantRecordSample = {"__pyx_unpickle_VariantRecordSample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21__pyx_unpickle_VariantRecordSample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20__pyx_unpickle_VariantRecordSample};
91515 static PyObject *__pyx_pw_5pysam_7libcbcf_21__pyx_unpickle_VariantRecordSample(PyObject *__pyx_self,
91516 #if CYTHON_METH_FASTCALL
91517 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
91518 #else
91519 PyObject *__pyx_args, PyObject *__pyx_kwds
91520 #endif
91521 ) {
91522 PyObject *__pyx_v___pyx_type = 0;
91523 long __pyx_v___pyx_checksum;
91524 PyObject *__pyx_v___pyx_state = 0;
91525 #if !CYTHON_METH_FASTCALL
91526 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
91527 #endif
91528 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
91529 PyObject* values[3] = {0,0,0};
91530 int __pyx_lineno = 0;
91531 const char *__pyx_filename = NULL;
91532 int __pyx_clineno = 0;
91533 PyObject *__pyx_r = 0;
91534 __Pyx_RefNannyDeclarations
91535 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordSample (wrapper)", 0);
91536 #if !CYTHON_METH_FASTCALL
91537 #if CYTHON_ASSUME_SAFE_MACROS
91538 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
91539 #else
91540 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
91541 #endif
91542 #endif
91543 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
91544 {
91545 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
91546 if (__pyx_kwds) {
91547 Py_ssize_t kw_args;
91548 switch (__pyx_nargs) {
91549 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
91550 CYTHON_FALLTHROUGH;
91551 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
91552 CYTHON_FALLTHROUGH;
91553 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
91554 CYTHON_FALLTHROUGH;
91555 case 0: break;
91556 default: goto __pyx_L5_argtuple_error;
91557 }
91558 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
91559 switch (__pyx_nargs) {
91560 case 0:
91561 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
91562 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
91563 kw_args--;
91564 }
91565 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
91566 else goto __pyx_L5_argtuple_error;
91567 CYTHON_FALLTHROUGH;
91568 case 1:
91569 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
91570 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
91571 kw_args--;
91572 }
91573 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
91574 else {
91575 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordSample", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
91576 }
91577 CYTHON_FALLTHROUGH;
91578 case 2:
91579 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
91580 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
91581 kw_args--;
91582 }
91583 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
91584 else {
91585 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordSample", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
91586 }
91587 }
91588 if (unlikely(kw_args > 0)) {
91589 const Py_ssize_t kwd_pos_args = __pyx_nargs;
91590 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_VariantRecordSample") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
91591 }
91592 } else if (unlikely(__pyx_nargs != 3)) {
91593 goto __pyx_L5_argtuple_error;
91594 } else {
91595 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
91596 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
91597 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
91598 }
91599 __pyx_v___pyx_type = values[0];
91600 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
91601 __pyx_v___pyx_state = values[2];
91602 }
91603 goto __pyx_L6_skip;
91604 __pyx_L5_argtuple_error:;
91605 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VariantRecordSample", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
91606 __pyx_L6_skip:;
91607 goto __pyx_L4_argument_unpacking_done;
91608 __pyx_L3_error:;
91609 {
91610 Py_ssize_t __pyx_temp;
91611 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
91612 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
91613 }
91614 }
91615 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordSample", __pyx_clineno, __pyx_lineno, __pyx_filename);
91616 __Pyx_RefNannyFinishContext();
91617 return NULL;
91618 __pyx_L4_argument_unpacking_done:;
91619 __pyx_r = __pyx_pf_5pysam_7libcbcf_20__pyx_unpickle_VariantRecordSample(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
91620
91621 /* function exit code */
91622 {
91623 Py_ssize_t __pyx_temp;
91624 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
91625 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
91626 }
91627 }
91628 __Pyx_RefNannyFinishContext();
91629 return __pyx_r;
91630 }
91631
91632 static PyObject *__pyx_pf_5pysam_7libcbcf_20__pyx_unpickle_VariantRecordSample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
91633 PyObject *__pyx_v___pyx_PickleError = 0;
91634 PyObject *__pyx_v___pyx_result = 0;
91635 PyObject *__pyx_r = NULL;
91636 __Pyx_TraceDeclarations
91637 __Pyx_RefNannyDeclarations
91638 PyObject *__pyx_t_1 = NULL;
91639 int __pyx_t_2;
91640 PyObject *__pyx_t_3 = NULL;
91641 PyObject *__pyx_t_4 = NULL;
91642 unsigned int __pyx_t_5;
91643 int __pyx_lineno = 0;
91644 const char *__pyx_filename = NULL;
91645 int __pyx_clineno = 0;
91646 __Pyx_TraceFrameInit(__pyx_codeobj__274)
91647 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordSample", 1);
91648 __Pyx_TraceCall("__pyx_unpickle_VariantRecordSample", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
91649
91650 /* "(tree fragment)":4
91651 * cdef object __pyx_PickleError
91652 * cdef object __pyx_result
91653 * if __pyx_checksum not in (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b): # <<<<<<<<<<<<<<
91654 * from pickle import PickleError as __pyx_PickleError
91655 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b) = (index, record))" % __pyx_checksum
91656 */
91657 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
91658 __Pyx_GOTREF(__pyx_t_1);
91659 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__275, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
91660 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91661 if (__pyx_t_2) {
91662
91663 /* "(tree fragment)":5
91664 * cdef object __pyx_result
91665 * if __pyx_checksum not in (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b):
91666 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
91667 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b) = (index, record))" % __pyx_checksum
91668 * __pyx_result = VariantRecordSample.__new__(__pyx_type)
91669 */
91670 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
91671 __Pyx_GOTREF(__pyx_t_1);
91672 __Pyx_INCREF(__pyx_n_s_PickleError);
91673 __Pyx_GIVEREF(__pyx_n_s_PickleError);
91674 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
91675 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
91676 __Pyx_GOTREF(__pyx_t_3);
91677 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91678 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
91679 __Pyx_GOTREF(__pyx_t_1);
91680 __Pyx_INCREF(__pyx_t_1);
91681 __pyx_v___pyx_PickleError = __pyx_t_1;
91682 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91683 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91684
91685 /* "(tree fragment)":6
91686 * if __pyx_checksum not in (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b):
91687 * from pickle import PickleError as __pyx_PickleError
91688 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b) = (index, record))" % __pyx_checksum # <<<<<<<<<<<<<<
91689 * __pyx_result = VariantRecordSample.__new__(__pyx_type)
91690 * if __pyx_state is not None:
91691 */
91692 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
91693 __Pyx_GOTREF(__pyx_t_3);
91694 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
91695 __Pyx_GOTREF(__pyx_t_1);
91696 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91697 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
91698 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91699 __PYX_ERR(4, 6, __pyx_L1_error)
91700
91701 /* "(tree fragment)":4
91702 * cdef object __pyx_PickleError
91703 * cdef object __pyx_result
91704 * if __pyx_checksum not in (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b): # <<<<<<<<<<<<<<
91705 * from pickle import PickleError as __pyx_PickleError
91706 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b) = (index, record))" % __pyx_checksum
91707 */
91708 }
91709
91710 /* "(tree fragment)":7
91711 * from pickle import PickleError as __pyx_PickleError
91712 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b) = (index, record))" % __pyx_checksum
91713 * __pyx_result = VariantRecordSample.__new__(__pyx_type) # <<<<<<<<<<<<<<
91714 * if __pyx_state is not None:
91715 * __pyx_unpickle_VariantRecordSample__set_state(<VariantRecordSample> __pyx_result, __pyx_state)
91716 */
91717 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
91718 __Pyx_GOTREF(__pyx_t_3);
91719 __pyx_t_4 = NULL;
91720 __pyx_t_5 = 0;
91721 #if CYTHON_UNPACK_METHODS
91722 if (likely(PyMethod_Check(__pyx_t_3))) {
91723 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
91724 if (likely(__pyx_t_4)) {
91725 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
91726 __Pyx_INCREF(__pyx_t_4);
91727 __Pyx_INCREF(function);
91728 __Pyx_DECREF_SET(__pyx_t_3, function);
91729 __pyx_t_5 = 1;
91730 }
91731 }
91732 #endif
91733 {
91734 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
91735 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
91736 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
91737 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
91738 __Pyx_GOTREF(__pyx_t_1);
91739 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91740 }
91741 __pyx_v___pyx_result = __pyx_t_1;
91742 __pyx_t_1 = 0;
91743
91744 /* "(tree fragment)":8
91745 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b) = (index, record))" % __pyx_checksum
91746 * __pyx_result = VariantRecordSample.__new__(__pyx_type)
91747 * if __pyx_state is not None: # <<<<<<<<<<<<<<
91748 * __pyx_unpickle_VariantRecordSample__set_state(<VariantRecordSample> __pyx_result, __pyx_state)
91749 * return __pyx_result
91750 */
91751 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
91752 if (__pyx_t_2) {
91753
91754 /* "(tree fragment)":9
91755 * __pyx_result = VariantRecordSample.__new__(__pyx_type)
91756 * if __pyx_state is not None:
91757 * __pyx_unpickle_VariantRecordSample__set_state(<VariantRecordSample> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
91758 * return __pyx_result
91759 * cdef __pyx_unpickle_VariantRecordSample__set_state(VariantRecordSample __pyx_result, tuple __pyx_state):
91760 */
91761 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
91762 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordSample__set_state(((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
91763 __Pyx_GOTREF(__pyx_t_1);
91764 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91765
91766 /* "(tree fragment)":8
91767 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xeeb89f3, 0x59cf0f7, 0x5d6ff7b) = (index, record))" % __pyx_checksum
91768 * __pyx_result = VariantRecordSample.__new__(__pyx_type)
91769 * if __pyx_state is not None: # <<<<<<<<<<<<<<
91770 * __pyx_unpickle_VariantRecordSample__set_state(<VariantRecordSample> __pyx_result, __pyx_state)
91771 * return __pyx_result
91772 */
91773 }
91774
91775 /* "(tree fragment)":10
91776 * if __pyx_state is not None:
91777 * __pyx_unpickle_VariantRecordSample__set_state(<VariantRecordSample> __pyx_result, __pyx_state)
91778 * return __pyx_result # <<<<<<<<<<<<<<
91779 * cdef __pyx_unpickle_VariantRecordSample__set_state(VariantRecordSample __pyx_result, tuple __pyx_state):
91780 * __pyx_result.index = __pyx_state[0]; __pyx_result.record = __pyx_state[1]
91781 */
91782 __Pyx_XDECREF(__pyx_r);
91783 __Pyx_INCREF(__pyx_v___pyx_result);
91784 __pyx_r = __pyx_v___pyx_result;
91785 goto __pyx_L0;
91786
91787 /* "(tree fragment)":1
91788 * def __pyx_unpickle_VariantRecordSample(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
91789 * cdef object __pyx_PickleError
91790 * cdef object __pyx_result
91791 */
91792
91793 /* function exit code */
91794 __pyx_L1_error:;
91795 __Pyx_XDECREF(__pyx_t_1);
91796 __Pyx_XDECREF(__pyx_t_3);
91797 __Pyx_XDECREF(__pyx_t_4);
91798 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordSample", __pyx_clineno, __pyx_lineno, __pyx_filename);
91799 __pyx_r = NULL;
91800 __pyx_L0:;
91801 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
91802 __Pyx_XDECREF(__pyx_v___pyx_result);
91803 __Pyx_XGIVEREF(__pyx_r);
91804 __Pyx_TraceReturn(__pyx_r, 0);
91805 __Pyx_RefNannyFinishContext();
91806 return __pyx_r;
91807 }
91808
91809 /* "(tree fragment)":11
91810 * __pyx_unpickle_VariantRecordSample__set_state(<VariantRecordSample> __pyx_result, __pyx_state)
91811 * return __pyx_result
91812 * cdef __pyx_unpickle_VariantRecordSample__set_state(VariantRecordSample __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
91813 * __pyx_result.index = __pyx_state[0]; __pyx_result.record = __pyx_state[1]
91814 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
91815 */
91816
91817 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_VariantRecordSample__set_state(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
91818 PyObject *__pyx_r = NULL;
91819 __Pyx_TraceDeclarations
91820 __Pyx_RefNannyDeclarations
91821 PyObject *__pyx_t_1 = NULL;
91822 int32_t __pyx_t_2;
91823 int __pyx_t_3;
91824 Py_ssize_t __pyx_t_4;
91825 int __pyx_t_5;
91826 PyObject *__pyx_t_6 = NULL;
91827 PyObject *__pyx_t_7 = NULL;
91828 PyObject *__pyx_t_8 = NULL;
91829 unsigned int __pyx_t_9;
91830 int __pyx_lineno = 0;
91831 const char *__pyx_filename = NULL;
91832 int __pyx_clineno = 0;
91833 __Pyx_RefNannySetupContext("__pyx_unpickle_VariantRecordSample__set_state", 1);
91834 __Pyx_TraceCall("__pyx_unpickle_VariantRecordSample__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
91835
91836 /* "(tree fragment)":12
91837 * return __pyx_result
91838 * cdef __pyx_unpickle_VariantRecordSample__set_state(VariantRecordSample __pyx_result, tuple __pyx_state):
91839 * __pyx_result.index = __pyx_state[0]; __pyx_result.record = __pyx_state[1] # <<<<<<<<<<<<<<
91840 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
91841 * __pyx_result.__dict__.update(__pyx_state[2])
91842 */
91843 if (unlikely(__pyx_v___pyx_state == Py_None)) {
91844 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
91845 __PYX_ERR(4, 12, __pyx_L1_error)
91846 }
91847 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
91848 __Pyx_GOTREF(__pyx_t_1);
91849 __pyx_t_2 = __Pyx_PyInt_As_int32_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 12, __pyx_L1_error)
91850 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91851 __pyx_v___pyx_result->index = __pyx_t_2;
91852 if (unlikely(__pyx_v___pyx_state == Py_None)) {
91853 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
91854 __PYX_ERR(4, 12, __pyx_L1_error)
91855 }
91856 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
91857 __Pyx_GOTREF(__pyx_t_1);
91858 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_7libcbcf_VariantRecord))))) __PYX_ERR(4, 12, __pyx_L1_error)
91859 __Pyx_GIVEREF(__pyx_t_1);
91860 __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->record);
91861 __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->record);
91862 __pyx_v___pyx_result->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)__pyx_t_1);
91863 __pyx_t_1 = 0;
91864
91865 /* "(tree fragment)":13
91866 * cdef __pyx_unpickle_VariantRecordSample__set_state(VariantRecordSample __pyx_result, tuple __pyx_state):
91867 * __pyx_result.index = __pyx_state[0]; __pyx_result.record = __pyx_state[1]
91868 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
91869 * __pyx_result.__dict__.update(__pyx_state[2])
91870 */
91871 if (unlikely(__pyx_v___pyx_state == Py_None)) {
91872 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
91873 __PYX_ERR(4, 13, __pyx_L1_error)
91874 }
91875 __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
91876 __pyx_t_5 = (__pyx_t_4 > 2);
91877 if (__pyx_t_5) {
91878 } else {
91879 __pyx_t_3 = __pyx_t_5;
91880 goto __pyx_L4_bool_binop_done;
91881 }
91882 __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
91883 __pyx_t_3 = __pyx_t_5;
91884 __pyx_L4_bool_binop_done:;
91885 if (__pyx_t_3) {
91886
91887 /* "(tree fragment)":14
91888 * __pyx_result.index = __pyx_state[0]; __pyx_result.record = __pyx_state[1]
91889 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
91890 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
91891 */
91892 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
91893 __Pyx_GOTREF(__pyx_t_6);
91894 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 14, __pyx_L1_error)
91895 __Pyx_GOTREF(__pyx_t_7);
91896 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
91897 if (unlikely(__pyx_v___pyx_state == Py_None)) {
91898 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
91899 __PYX_ERR(4, 14, __pyx_L1_error)
91900 }
91901 __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
91902 __Pyx_GOTREF(__pyx_t_6);
91903 __pyx_t_8 = NULL;
91904 __pyx_t_9 = 0;
91905 #if CYTHON_UNPACK_METHODS
91906 if (likely(PyMethod_Check(__pyx_t_7))) {
91907 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
91908 if (likely(__pyx_t_8)) {
91909 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
91910 __Pyx_INCREF(__pyx_t_8);
91911 __Pyx_INCREF(function);
91912 __Pyx_DECREF_SET(__pyx_t_7, function);
91913 __pyx_t_9 = 1;
91914 }
91915 }
91916 #endif
91917 {
91918 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
91919 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
91920 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
91921 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
91922 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
91923 __Pyx_GOTREF(__pyx_t_1);
91924 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
91925 }
91926 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91927
91928 /* "(tree fragment)":13
91929 * cdef __pyx_unpickle_VariantRecordSample__set_state(VariantRecordSample __pyx_result, tuple __pyx_state):
91930 * __pyx_result.index = __pyx_state[0]; __pyx_result.record = __pyx_state[1]
91931 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
91932 * __pyx_result.__dict__.update(__pyx_state[2])
91933 */
91934 }
91935
91936 /* "(tree fragment)":11
91937 * __pyx_unpickle_VariantRecordSample__set_state(<VariantRecordSample> __pyx_result, __pyx_state)
91938 * return __pyx_result
91939 * cdef __pyx_unpickle_VariantRecordSample__set_state(VariantRecordSample __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
91940 * __pyx_result.index = __pyx_state[0]; __pyx_result.record = __pyx_state[1]
91941 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
91942 */
91943
91944 /* function exit code */
91945 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
91946 goto __pyx_L0;
91947 __pyx_L1_error:;
91948 __Pyx_XDECREF(__pyx_t_1);
91949 __Pyx_XDECREF(__pyx_t_6);
91950 __Pyx_XDECREF(__pyx_t_7);
91951 __Pyx_XDECREF(__pyx_t_8);
91952 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_VariantRecordSample__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
91953 __pyx_r = 0;
91954 __pyx_L0:;
91955 __Pyx_XGIVEREF(__pyx_r);
91956 __Pyx_TraceReturn(__pyx_r, 0);
91957 __Pyx_RefNannyFinishContext();
91958 return __pyx_r;
91959 }
91960
91961 /* "(tree fragment)":1
91962 * def __pyx_unpickle_BaseIndex(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
91963 * cdef object __pyx_PickleError
91964 * cdef object __pyx_result
91965 */
91966
91967 /* Python wrapper */
91968 static PyObject *__pyx_pw_5pysam_7libcbcf_23__pyx_unpickle_BaseIndex(PyObject *__pyx_self,
91969 #if CYTHON_METH_FASTCALL
91970 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
91971 #else
91972 PyObject *__pyx_args, PyObject *__pyx_kwds
91973 #endif
91974 ); /*proto*/
91975 PyDoc_STRVAR(__pyx_doc_5pysam_7libcbcf_22__pyx_unpickle_BaseIndex, "__pyx_unpickle_BaseIndex(__pyx_type, long __pyx_checksum, __pyx_state)");
91976 static PyMethodDef __pyx_mdef_5pysam_7libcbcf_23__pyx_unpickle_BaseIndex = {"__pyx_unpickle_BaseIndex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_23__pyx_unpickle_BaseIndex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_22__pyx_unpickle_BaseIndex};
91977 static PyObject *__pyx_pw_5pysam_7libcbcf_23__pyx_unpickle_BaseIndex(PyObject *__pyx_self,
91978 #if CYTHON_METH_FASTCALL
91979 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
91980 #else
91981 PyObject *__pyx_args, PyObject *__pyx_kwds
91982 #endif
91983 ) {
91984 PyObject *__pyx_v___pyx_type = 0;
91985 long __pyx_v___pyx_checksum;
91986 PyObject *__pyx_v___pyx_state = 0;
91987 #if !CYTHON_METH_FASTCALL
91988 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
91989 #endif
91990 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
91991 PyObject* values[3] = {0,0,0};
91992 int __pyx_lineno = 0;
91993 const char *__pyx_filename = NULL;
91994 int __pyx_clineno = 0;
91995 PyObject *__pyx_r = 0;
91996 __Pyx_RefNannyDeclarations
91997 __Pyx_RefNannySetupContext("__pyx_unpickle_BaseIndex (wrapper)", 0);
91998 #if !CYTHON_METH_FASTCALL
91999 #if CYTHON_ASSUME_SAFE_MACROS
92000 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
92001 #else
92002 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
92003 #endif
92004 #endif
92005 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
92006 {
92007 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
92008 if (__pyx_kwds) {
92009 Py_ssize_t kw_args;
92010 switch (__pyx_nargs) {
92011 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
92012 CYTHON_FALLTHROUGH;
92013 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
92014 CYTHON_FALLTHROUGH;
92015 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
92016 CYTHON_FALLTHROUGH;
92017 case 0: break;
92018 default: goto __pyx_L5_argtuple_error;
92019 }
92020 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
92021 switch (__pyx_nargs) {
92022 case 0:
92023 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
92024 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
92025 kw_args--;
92026 }
92027 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
92028 else goto __pyx_L5_argtuple_error;
92029 CYTHON_FALLTHROUGH;
92030 case 1:
92031 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
92032 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
92033 kw_args--;
92034 }
92035 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
92036 else {
92037 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseIndex", 1, 3, 3, 1); __PYX_ERR(4, 1, __pyx_L3_error)
92038 }
92039 CYTHON_FALLTHROUGH;
92040 case 2:
92041 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
92042 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
92043 kw_args--;
92044 }
92045 else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
92046 else {
92047 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseIndex", 1, 3, 3, 2); __PYX_ERR(4, 1, __pyx_L3_error)
92048 }
92049 }
92050 if (unlikely(kw_args > 0)) {
92051 const Py_ssize_t kwd_pos_args = __pyx_nargs;
92052 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_BaseIndex") < 0)) __PYX_ERR(4, 1, __pyx_L3_error)
92053 }
92054 } else if (unlikely(__pyx_nargs != 3)) {
92055 goto __pyx_L5_argtuple_error;
92056 } else {
92057 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
92058 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
92059 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
92060 }
92061 __pyx_v___pyx_type = values[0];
92062 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 1, __pyx_L3_error)
92063 __pyx_v___pyx_state = values[2];
92064 }
92065 goto __pyx_L6_skip;
92066 __pyx_L5_argtuple_error:;
92067 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseIndex", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 1, __pyx_L3_error)
92068 __pyx_L6_skip:;
92069 goto __pyx_L4_argument_unpacking_done;
92070 __pyx_L3_error:;
92071 {
92072 Py_ssize_t __pyx_temp;
92073 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
92074 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
92075 }
92076 }
92077 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_BaseIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
92078 __Pyx_RefNannyFinishContext();
92079 return NULL;
92080 __pyx_L4_argument_unpacking_done:;
92081 __pyx_r = __pyx_pf_5pysam_7libcbcf_22__pyx_unpickle_BaseIndex(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
92082
92083 /* function exit code */
92084 {
92085 Py_ssize_t __pyx_temp;
92086 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
92087 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
92088 }
92089 }
92090 __Pyx_RefNannyFinishContext();
92091 return __pyx_r;
92092 }
92093
92094 static PyObject *__pyx_pf_5pysam_7libcbcf_22__pyx_unpickle_BaseIndex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
92095 PyObject *__pyx_v___pyx_PickleError = 0;
92096 PyObject *__pyx_v___pyx_result = 0;
92097 PyObject *__pyx_r = NULL;
92098 __Pyx_TraceDeclarations
92099 __Pyx_RefNannyDeclarations
92100 PyObject *__pyx_t_1 = NULL;
92101 int __pyx_t_2;
92102 PyObject *__pyx_t_3 = NULL;
92103 PyObject *__pyx_t_4 = NULL;
92104 unsigned int __pyx_t_5;
92105 int __pyx_lineno = 0;
92106 const char *__pyx_filename = NULL;
92107 int __pyx_clineno = 0;
92108 __Pyx_TraceFrameInit(__pyx_codeobj__276)
92109 __Pyx_RefNannySetupContext("__pyx_unpickle_BaseIndex", 1);
92110 __Pyx_TraceCall("__pyx_unpickle_BaseIndex", __pyx_f[4], 1, 0, __PYX_ERR(4, 1, __pyx_L1_error));
92111
92112 /* "(tree fragment)":4
92113 * cdef object __pyx_PickleError
92114 * cdef object __pyx_result
92115 * if __pyx_checksum not in (0x7898a51, 0x1fe4488, 0xd936de3): # <<<<<<<<<<<<<<
92116 * from pickle import PickleError as __pyx_PickleError
92117 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7898a51, 0x1fe4488, 0xd936de3) = (refmap, refs))" % __pyx_checksum
92118 */
92119 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 4, __pyx_L1_error)
92120 __Pyx_GOTREF(__pyx_t_1);
92121 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__277, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(4, 4, __pyx_L1_error)
92122 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
92123 if (__pyx_t_2) {
92124
92125 /* "(tree fragment)":5
92126 * cdef object __pyx_result
92127 * if __pyx_checksum not in (0x7898a51, 0x1fe4488, 0xd936de3):
92128 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
92129 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7898a51, 0x1fe4488, 0xd936de3) = (refmap, refs))" % __pyx_checksum
92130 * __pyx_result = BaseIndex.__new__(__pyx_type)
92131 */
92132 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
92133 __Pyx_GOTREF(__pyx_t_1);
92134 __Pyx_INCREF(__pyx_n_s_PickleError);
92135 __Pyx_GIVEREF(__pyx_n_s_PickleError);
92136 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(4, 5, __pyx_L1_error);
92137 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
92138 __Pyx_GOTREF(__pyx_t_3);
92139 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
92140 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
92141 __Pyx_GOTREF(__pyx_t_1);
92142 __Pyx_INCREF(__pyx_t_1);
92143 __pyx_v___pyx_PickleError = __pyx_t_1;
92144 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
92145 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
92146
92147 /* "(tree fragment)":6
92148 * if __pyx_checksum not in (0x7898a51, 0x1fe4488, 0xd936de3):
92149 * from pickle import PickleError as __pyx_PickleError
92150 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7898a51, 0x1fe4488, 0xd936de3) = (refmap, refs))" % __pyx_checksum # <<<<<<<<<<<<<<
92151 * __pyx_result = BaseIndex.__new__(__pyx_type)
92152 * if __pyx_state is not None:
92153 */
92154 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 6, __pyx_L1_error)
92155 __Pyx_GOTREF(__pyx_t_3);
92156 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 6, __pyx_L1_error)
92157 __Pyx_GOTREF(__pyx_t_1);
92158 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
92159 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
92160 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
92161 __PYX_ERR(4, 6, __pyx_L1_error)
92162
92163 /* "(tree fragment)":4
92164 * cdef object __pyx_PickleError
92165 * cdef object __pyx_result
92166 * if __pyx_checksum not in (0x7898a51, 0x1fe4488, 0xd936de3): # <<<<<<<<<<<<<<
92167 * from pickle import PickleError as __pyx_PickleError
92168 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7898a51, 0x1fe4488, 0xd936de3) = (refmap, refs))" % __pyx_checksum
92169 */
92170 }
92171
92172 /* "(tree fragment)":7
92173 * from pickle import PickleError as __pyx_PickleError
92174 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7898a51, 0x1fe4488, 0xd936de3) = (refmap, refs))" % __pyx_checksum
92175 * __pyx_result = BaseIndex.__new__(__pyx_type) # <<<<<<<<<<<<<<
92176 * if __pyx_state is not None:
92177 * __pyx_unpickle_BaseIndex__set_state(<BaseIndex> __pyx_result, __pyx_state)
92178 */
92179 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 7, __pyx_L1_error)
92180 __Pyx_GOTREF(__pyx_t_3);
92181 __pyx_t_4 = NULL;
92182 __pyx_t_5 = 0;
92183 #if CYTHON_UNPACK_METHODS
92184 if (likely(PyMethod_Check(__pyx_t_3))) {
92185 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
92186 if (likely(__pyx_t_4)) {
92187 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
92188 __Pyx_INCREF(__pyx_t_4);
92189 __Pyx_INCREF(function);
92190 __Pyx_DECREF_SET(__pyx_t_3, function);
92191 __pyx_t_5 = 1;
92192 }
92193 }
92194 #endif
92195 {
92196 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
92197 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
92198 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
92199 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 7, __pyx_L1_error)
92200 __Pyx_GOTREF(__pyx_t_1);
92201 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
92202 }
92203 __pyx_v___pyx_result = __pyx_t_1;
92204 __pyx_t_1 = 0;
92205
92206 /* "(tree fragment)":8
92207 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7898a51, 0x1fe4488, 0xd936de3) = (refmap, refs))" % __pyx_checksum
92208 * __pyx_result = BaseIndex.__new__(__pyx_type)
92209 * if __pyx_state is not None: # <<<<<<<<<<<<<<
92210 * __pyx_unpickle_BaseIndex__set_state(<BaseIndex> __pyx_result, __pyx_state)
92211 * return __pyx_result
92212 */
92213 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
92214 if (__pyx_t_2) {
92215
92216 /* "(tree fragment)":9
92217 * __pyx_result = BaseIndex.__new__(__pyx_type)
92218 * if __pyx_state is not None:
92219 * __pyx_unpickle_BaseIndex__set_state(<BaseIndex> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
92220 * return __pyx_result
92221 * cdef __pyx_unpickle_BaseIndex__set_state(BaseIndex __pyx_result, tuple __pyx_state):
92222 */
92223 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(4, 9, __pyx_L1_error)
92224 __pyx_t_1 = __pyx_f_5pysam_7libcbcf___pyx_unpickle_BaseIndex__set_state(((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
92225 __Pyx_GOTREF(__pyx_t_1);
92226 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
92227
92228 /* "(tree fragment)":8
92229 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x7898a51, 0x1fe4488, 0xd936de3) = (refmap, refs))" % __pyx_checksum
92230 * __pyx_result = BaseIndex.__new__(__pyx_type)
92231 * if __pyx_state is not None: # <<<<<<<<<<<<<<
92232 * __pyx_unpickle_BaseIndex__set_state(<BaseIndex> __pyx_result, __pyx_state)
92233 * return __pyx_result
92234 */
92235 }
92236
92237 /* "(tree fragment)":10
92238 * if __pyx_state is not None:
92239 * __pyx_unpickle_BaseIndex__set_state(<BaseIndex> __pyx_result, __pyx_state)
92240 * return __pyx_result # <<<<<<<<<<<<<<
92241 * cdef __pyx_unpickle_BaseIndex__set_state(BaseIndex __pyx_result, tuple __pyx_state):
92242 * __pyx_result.refmap = __pyx_state[0]; __pyx_result.refs = __pyx_state[1]
92243 */
92244 __Pyx_XDECREF(__pyx_r);
92245 __Pyx_INCREF(__pyx_v___pyx_result);
92246 __pyx_r = __pyx_v___pyx_result;
92247 goto __pyx_L0;
92248
92249 /* "(tree fragment)":1
92250 * def __pyx_unpickle_BaseIndex(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
92251 * cdef object __pyx_PickleError
92252 * cdef object __pyx_result
92253 */
92254
92255 /* function exit code */
92256 __pyx_L1_error:;
92257 __Pyx_XDECREF(__pyx_t_1);
92258 __Pyx_XDECREF(__pyx_t_3);
92259 __Pyx_XDECREF(__pyx_t_4);
92260 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_BaseIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
92261 __pyx_r = NULL;
92262 __pyx_L0:;
92263 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
92264 __Pyx_XDECREF(__pyx_v___pyx_result);
92265 __Pyx_XGIVEREF(__pyx_r);
92266 __Pyx_TraceReturn(__pyx_r, 0);
92267 __Pyx_RefNannyFinishContext();
92268 return __pyx_r;
92269 }
92270
92271 /* "(tree fragment)":11
92272 * __pyx_unpickle_BaseIndex__set_state(<BaseIndex> __pyx_result, __pyx_state)
92273 * return __pyx_result
92274 * cdef __pyx_unpickle_BaseIndex__set_state(BaseIndex __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
92275 * __pyx_result.refmap = __pyx_state[0]; __pyx_result.refs = __pyx_state[1]
92276 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
92277 */
92278
92279 static PyObject *__pyx_f_5pysam_7libcbcf___pyx_unpickle_BaseIndex__set_state(struct __pyx_obj_5pysam_7libcbcf_BaseIndex *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
92280 PyObject *__pyx_r = NULL;
92281 __Pyx_TraceDeclarations
92282 __Pyx_RefNannyDeclarations
92283 PyObject *__pyx_t_1 = NULL;
92284 int __pyx_t_2;
92285 Py_ssize_t __pyx_t_3;
92286 int __pyx_t_4;
92287 PyObject *__pyx_t_5 = NULL;
92288 PyObject *__pyx_t_6 = NULL;
92289 PyObject *__pyx_t_7 = NULL;
92290 unsigned int __pyx_t_8;
92291 int __pyx_lineno = 0;
92292 const char *__pyx_filename = NULL;
92293 int __pyx_clineno = 0;
92294 __Pyx_RefNannySetupContext("__pyx_unpickle_BaseIndex__set_state", 1);
92295 __Pyx_TraceCall("__pyx_unpickle_BaseIndex__set_state", __pyx_f[4], 11, 0, __PYX_ERR(4, 11, __pyx_L1_error));
92296
92297 /* "(tree fragment)":12
92298 * return __pyx_result
92299 * cdef __pyx_unpickle_BaseIndex__set_state(BaseIndex __pyx_result, tuple __pyx_state):
92300 * __pyx_result.refmap = __pyx_state[0]; __pyx_result.refs = __pyx_state[1] # <<<<<<<<<<<<<<
92301 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
92302 * __pyx_result.__dict__.update(__pyx_state[2])
92303 */
92304 if (unlikely(__pyx_v___pyx_state == Py_None)) {
92305 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
92306 __PYX_ERR(4, 12, __pyx_L1_error)
92307 }
92308 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
92309 __Pyx_GOTREF(__pyx_t_1);
92310 if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(4, 12, __pyx_L1_error)
92311 __Pyx_GIVEREF(__pyx_t_1);
92312 __Pyx_GOTREF(__pyx_v___pyx_result->refmap);
92313 __Pyx_DECREF(__pyx_v___pyx_result->refmap);
92314 __pyx_v___pyx_result->refmap = ((PyObject*)__pyx_t_1);
92315 __pyx_t_1 = 0;
92316 if (unlikely(__pyx_v___pyx_state == Py_None)) {
92317 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
92318 __PYX_ERR(4, 12, __pyx_L1_error)
92319 }
92320 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error)
92321 __Pyx_GOTREF(__pyx_t_1);
92322 if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(4, 12, __pyx_L1_error)
92323 __Pyx_GIVEREF(__pyx_t_1);
92324 __Pyx_GOTREF(__pyx_v___pyx_result->refs);
92325 __Pyx_DECREF(__pyx_v___pyx_result->refs);
92326 __pyx_v___pyx_result->refs = ((PyObject*)__pyx_t_1);
92327 __pyx_t_1 = 0;
92328
92329 /* "(tree fragment)":13
92330 * cdef __pyx_unpickle_BaseIndex__set_state(BaseIndex __pyx_result, tuple __pyx_state):
92331 * __pyx_result.refmap = __pyx_state[0]; __pyx_result.refs = __pyx_state[1]
92332 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
92333 * __pyx_result.__dict__.update(__pyx_state[2])
92334 */
92335 if (unlikely(__pyx_v___pyx_state == Py_None)) {
92336 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
92337 __PYX_ERR(4, 13, __pyx_L1_error)
92338 }
92339 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
92340 __pyx_t_4 = (__pyx_t_3 > 2);
92341 if (__pyx_t_4) {
92342 } else {
92343 __pyx_t_2 = __pyx_t_4;
92344 goto __pyx_L4_bool_binop_done;
92345 }
92346 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error)
92347 __pyx_t_2 = __pyx_t_4;
92348 __pyx_L4_bool_binop_done:;
92349 if (__pyx_t_2) {
92350
92351 /* "(tree fragment)":14
92352 * __pyx_result.refmap = __pyx_state[0]; __pyx_result.refs = __pyx_state[1]
92353 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
92354 * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
92355 */
92356 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
92357 __Pyx_GOTREF(__pyx_t_5);
92358 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 14, __pyx_L1_error)
92359 __Pyx_GOTREF(__pyx_t_6);
92360 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
92361 if (unlikely(__pyx_v___pyx_state == Py_None)) {
92362 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
92363 __PYX_ERR(4, 14, __pyx_L1_error)
92364 }
92365 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 14, __pyx_L1_error)
92366 __Pyx_GOTREF(__pyx_t_5);
92367 __pyx_t_7 = NULL;
92368 __pyx_t_8 = 0;
92369 #if CYTHON_UNPACK_METHODS
92370 if (likely(PyMethod_Check(__pyx_t_6))) {
92371 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
92372 if (likely(__pyx_t_7)) {
92373 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
92374 __Pyx_INCREF(__pyx_t_7);
92375 __Pyx_INCREF(function);
92376 __Pyx_DECREF_SET(__pyx_t_6, function);
92377 __pyx_t_8 = 1;
92378 }
92379 }
92380 #endif
92381 {
92382 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
92383 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
92384 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
92385 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
92386 if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error)
92387 __Pyx_GOTREF(__pyx_t_1);
92388 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
92389 }
92390 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
92391
92392 /* "(tree fragment)":13
92393 * cdef __pyx_unpickle_BaseIndex__set_state(BaseIndex __pyx_result, tuple __pyx_state):
92394 * __pyx_result.refmap = __pyx_state[0]; __pyx_result.refs = __pyx_state[1]
92395 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
92396 * __pyx_result.__dict__.update(__pyx_state[2])
92397 */
92398 }
92399
92400 /* "(tree fragment)":11
92401 * __pyx_unpickle_BaseIndex__set_state(<BaseIndex> __pyx_result, __pyx_state)
92402 * return __pyx_result
92403 * cdef __pyx_unpickle_BaseIndex__set_state(BaseIndex __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
92404 * __pyx_result.refmap = __pyx_state[0]; __pyx_result.refs = __pyx_state[1]
92405 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
92406 */
92407
92408 /* function exit code */
92409 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
92410 goto __pyx_L0;
92411 __pyx_L1_error:;
92412 __Pyx_XDECREF(__pyx_t_1);
92413 __Pyx_XDECREF(__pyx_t_5);
92414 __Pyx_XDECREF(__pyx_t_6);
92415 __Pyx_XDECREF(__pyx_t_7);
92416 __Pyx_AddTraceback("pysam.libcbcf.__pyx_unpickle_BaseIndex__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
92417 __pyx_r = 0;
92418 __pyx_L0:;
92419 __Pyx_XGIVEREF(__pyx_r);
92420 __Pyx_TraceReturn(__pyx_r, 0);
92421 __Pyx_RefNannyFinishContext();
92422 return __pyx_r;
92423 }
92424 static struct __pyx_vtabstruct_5pysam_7libcbcf_VariantHeader __pyx_vtable_5pysam_7libcbcf_VariantHeader;
92425
92426 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
92427 struct __pyx_obj_5pysam_7libcbcf_VariantHeader *p;
92428 PyObject *o;
92429 #if CYTHON_COMPILING_IN_LIMITED_API
92430 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
92431 o = alloc_func(t, 0);
92432 #else
92433 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
92434 o = (*t->tp_alloc)(t, 0);
92435 } else {
92436 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
92437 }
92438 if (unlikely(!o)) return 0;
92439 #endif
92440 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)o);
92441 p->__pyx_vtab = __pyx_vtabptr_5pysam_7libcbcf_VariantHeader;
92442 if (unlikely(__pyx_pw_5pysam_7libcbcf_13VariantHeader_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
92443 return o;
92444 bad:
92445 Py_DECREF(o); o = 0;
92446 return NULL;
92447 }
92448
92449 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeader(PyObject *o) {
92450 #if CYTHON_USE_TP_FINALIZE
92451 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
92452 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeader) {
92453 if (PyObject_CallFinalizerFromDealloc(o)) return;
92454 }
92455 }
92456 #endif
92457 {
92458 PyObject *etype, *eval, *etb;
92459 PyErr_Fetch(&etype, &eval, &etb);
92460 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
92461 __pyx_pw_5pysam_7libcbcf_13VariantHeader_5__dealloc__(o);
92462 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
92463 PyErr_Restore(etype, eval, etb);
92464 }
92465 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
92466 (*Py_TYPE(o)->tp_free)(o);
92467 #else
92468 {
92469 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
92470 if (tp_free) tp_free(o);
92471 }
92472 #endif
92473 }
92474
92475 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantHeader_version(PyObject *o, CYTHON_UNUSED void *x) {
92476 return __pyx_pw_5pysam_7libcbcf_13VariantHeader_7version_1__get__(o);
92477 }
92478
92479 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantHeader_samples(PyObject *o, CYTHON_UNUSED void *x) {
92480 return __pyx_pw_5pysam_7libcbcf_13VariantHeader_7samples_1__get__(o);
92481 }
92482
92483 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantHeader_records(PyObject *o, CYTHON_UNUSED void *x) {
92484 return __pyx_pw_5pysam_7libcbcf_13VariantHeader_7records_1__get__(o);
92485 }
92486
92487 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantHeader_contigs(PyObject *o, CYTHON_UNUSED void *x) {
92488 return __pyx_pw_5pysam_7libcbcf_13VariantHeader_7contigs_1__get__(o);
92489 }
92490
92491 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantHeader_filters(PyObject *o, CYTHON_UNUSED void *x) {
92492 return __pyx_pw_5pysam_7libcbcf_13VariantHeader_7filters_1__get__(o);
92493 }
92494
92495 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantHeader_info(PyObject *o, CYTHON_UNUSED void *x) {
92496 return __pyx_pw_5pysam_7libcbcf_13VariantHeader_4info_1__get__(o);
92497 }
92498
92499 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantHeader_formats(PyObject *o, CYTHON_UNUSED void *x) {
92500 return __pyx_pw_5pysam_7libcbcf_13VariantHeader_7formats_1__get__(o);
92501 }
92502
92503 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantHeader_alts(PyObject *o, CYTHON_UNUSED void *x) {
92504 return __pyx_pw_5pysam_7libcbcf_13VariantHeader_4alts_1__get__(o);
92505 }
92506
92507 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantHeader[] = {
92508 {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_9copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_8copy},
92509 {"merge", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_11merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_10merge},
92510 {"new_record", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_15new_record, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_14new_record},
92511 {"add_record", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_17add_record, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_16add_record},
92512 {"add_line", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_19add_line, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_18add_line},
92513 {"add_meta", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_21add_meta, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_20add_meta},
92514 {"add_sample", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_23add_sample, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_22add_sample},
92515 {"add_samples", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_25add_samples, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_24add_samples},
92516 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_26__reduce_cython__},
92517 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantHeader_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantHeader_28__setstate_cython__},
92518 {0, 0, 0, 0}
92519 };
92520
92521 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantHeader[] = {
92522 {(char *)"version", __pyx_getprop_5pysam_7libcbcf_13VariantHeader_version, 0, (char *)PyDoc_STR("VCF version"), 0},
92523 {(char *)"samples", __pyx_getprop_5pysam_7libcbcf_13VariantHeader_samples, 0, (char *)PyDoc_STR("samples (:class:`VariantHeaderSamples`)"), 0},
92524 {(char *)"records", __pyx_getprop_5pysam_7libcbcf_13VariantHeader_records, 0, (char *)PyDoc_STR("header records (:class:`VariantHeaderRecords`)"), 0},
92525 {(char *)"contigs", __pyx_getprop_5pysam_7libcbcf_13VariantHeader_contigs, 0, (char *)PyDoc_STR("contig information (:class:`VariantHeaderContigs`)"), 0},
92526 {(char *)"filters", __pyx_getprop_5pysam_7libcbcf_13VariantHeader_filters, 0, (char *)PyDoc_STR("filter metadata (:class:`VariantHeaderMetadata`)"), 0},
92527 {(char *)"info", __pyx_getprop_5pysam_7libcbcf_13VariantHeader_info, 0, (char *)PyDoc_STR("info metadata (:class:`VariantHeaderMetadata`)"), 0},
92528 {(char *)"formats", __pyx_getprop_5pysam_7libcbcf_13VariantHeader_formats, 0, (char *)PyDoc_STR("format metadata (:class:`VariantHeaderMetadata`)"), 0},
92529 {(char *)"alts", __pyx_getprop_5pysam_7libcbcf_13VariantHeader_alts, 0, (char *)PyDoc_STR("alt metadata (:class:`dict` ID->record).\n\n The data returned just a snapshot of alt records, is created\n every time the property is requested, and modifications will\n not be reflected in the header metadata and vice versa.\n\n i.e. it is just a dict that reflects the state of alt records\n at the time it is created.\n "), 0},
92530 {0, 0, 0, 0, 0}
92531 };
92532 #if CYTHON_USE_TYPE_SPECS
92533 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantHeader_slots[] = {
92534 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantHeader},
92535 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_13VariantHeader_7__bool__},
92536 {Py_tp_str, (void *)__pyx_pw_5pysam_7libcbcf_13VariantHeader_13__str__},
92537 {Py_tp_doc, (void *)PyDoc_STR("VariantHeader()\nheader information for a :class:`VariantFile` object")},
92538 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantHeader},
92539 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantHeader},
92540 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_13VariantHeader_3__init__},
92541 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantHeader},
92542 {0, 0},
92543 };
92544 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantHeader_spec = {
92545 "pysam.libcbcf.VariantHeader",
92546 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeader),
92547 0,
92548 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
92549 __pyx_type_5pysam_7libcbcf_VariantHeader_slots,
92550 };
92551 #else
92552
92553 static PyNumberMethods __pyx_tp_as_number_VariantHeader = {
92554 0, /*nb_add*/
92555 0, /*nb_subtract*/
92556 0, /*nb_multiply*/
92557 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92558 0, /*nb_divide*/
92559 #endif
92560 0, /*nb_remainder*/
92561 0, /*nb_divmod*/
92562 0, /*nb_power*/
92563 0, /*nb_negative*/
92564 0, /*nb_positive*/
92565 0, /*nb_absolute*/
92566 __pyx_pw_5pysam_7libcbcf_13VariantHeader_7__bool__, /*nb_bool*/
92567 0, /*nb_invert*/
92568 0, /*nb_lshift*/
92569 0, /*nb_rshift*/
92570 0, /*nb_and*/
92571 0, /*nb_xor*/
92572 0, /*nb_or*/
92573 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92574 0, /*nb_coerce*/
92575 #endif
92576 0, /*nb_int*/
92577 #if PY_MAJOR_VERSION < 3
92578 0, /*nb_long*/
92579 #else
92580 0, /*reserved*/
92581 #endif
92582 0, /*nb_float*/
92583 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92584 0, /*nb_oct*/
92585 #endif
92586 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92587 0, /*nb_hex*/
92588 #endif
92589 0, /*nb_inplace_add*/
92590 0, /*nb_inplace_subtract*/
92591 0, /*nb_inplace_multiply*/
92592 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92593 0, /*nb_inplace_divide*/
92594 #endif
92595 0, /*nb_inplace_remainder*/
92596 0, /*nb_inplace_power*/
92597 0, /*nb_inplace_lshift*/
92598 0, /*nb_inplace_rshift*/
92599 0, /*nb_inplace_and*/
92600 0, /*nb_inplace_xor*/
92601 0, /*nb_inplace_or*/
92602 0, /*nb_floor_divide*/
92603 0, /*nb_true_divide*/
92604 0, /*nb_inplace_floor_divide*/
92605 0, /*nb_inplace_true_divide*/
92606 0, /*nb_index*/
92607 #if PY_VERSION_HEX >= 0x03050000
92608 0, /*nb_matrix_multiply*/
92609 #endif
92610 #if PY_VERSION_HEX >= 0x03050000
92611 0, /*nb_inplace_matrix_multiply*/
92612 #endif
92613 };
92614
92615 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantHeader = {
92616 PyVarObject_HEAD_INIT(0, 0)
92617 "pysam.libcbcf.""VariantHeader", /*tp_name*/
92618 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeader), /*tp_basicsize*/
92619 0, /*tp_itemsize*/
92620 __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeader, /*tp_dealloc*/
92621 #if PY_VERSION_HEX < 0x030800b4
92622 0, /*tp_print*/
92623 #endif
92624 #if PY_VERSION_HEX >= 0x030800b4
92625 0, /*tp_vectorcall_offset*/
92626 #endif
92627 0, /*tp_getattr*/
92628 0, /*tp_setattr*/
92629 #if PY_MAJOR_VERSION < 3
92630 0, /*tp_compare*/
92631 #endif
92632 #if PY_MAJOR_VERSION >= 3
92633 0, /*tp_as_async*/
92634 #endif
92635 0, /*tp_repr*/
92636 &__pyx_tp_as_number_VariantHeader, /*tp_as_number*/
92637 0, /*tp_as_sequence*/
92638 0, /*tp_as_mapping*/
92639 0, /*tp_hash*/
92640 0, /*tp_call*/
92641 __pyx_pw_5pysam_7libcbcf_13VariantHeader_13__str__, /*tp_str*/
92642 0, /*tp_getattro*/
92643 0, /*tp_setattro*/
92644 0, /*tp_as_buffer*/
92645 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
92646 PyDoc_STR("VariantHeader()\nheader information for a :class:`VariantFile` object"), /*tp_doc*/
92647 0, /*tp_traverse*/
92648 0, /*tp_clear*/
92649 0, /*tp_richcompare*/
92650 0, /*tp_weaklistoffset*/
92651 0, /*tp_iter*/
92652 0, /*tp_iternext*/
92653 __pyx_methods_5pysam_7libcbcf_VariantHeader, /*tp_methods*/
92654 0, /*tp_members*/
92655 __pyx_getsets_5pysam_7libcbcf_VariantHeader, /*tp_getset*/
92656 0, /*tp_base*/
92657 0, /*tp_dict*/
92658 0, /*tp_descr_get*/
92659 0, /*tp_descr_set*/
92660 #if !CYTHON_USE_TYPE_SPECS
92661 0, /*tp_dictoffset*/
92662 #endif
92663 __pyx_pw_5pysam_7libcbcf_13VariantHeader_3__init__, /*tp_init*/
92664 0, /*tp_alloc*/
92665 __pyx_tp_new_5pysam_7libcbcf_VariantHeader, /*tp_new*/
92666 0, /*tp_free*/
92667 0, /*tp_is_gc*/
92668 0, /*tp_bases*/
92669 0, /*tp_mro*/
92670 0, /*tp_cache*/
92671 0, /*tp_subclasses*/
92672 0, /*tp_weaklist*/
92673 0, /*tp_del*/
92674 0, /*tp_version_tag*/
92675 #if PY_VERSION_HEX >= 0x030400a1
92676 #if CYTHON_USE_TP_FINALIZE
92677 0, /*tp_finalize*/
92678 #else
92679 NULL, /*tp_finalize*/
92680 #endif
92681 #endif
92682 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
92683 0, /*tp_vectorcall*/
92684 #endif
92685 #if __PYX_NEED_TP_PRINT_SLOT == 1
92686 0, /*tp_print*/
92687 #endif
92688 #if PY_VERSION_HEX >= 0x030C0000
92689 0, /*tp_watched*/
92690 #endif
92691 #if PY_VERSION_HEX >= 0x030d00A4
92692 0, /*tp_versions_used*/
92693 #endif
92694 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
92695 0, /*tp_pypy_flags*/
92696 #endif
92697 };
92698 #endif
92699
92700 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecord(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
92701 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *p;
92702 PyObject *o;
92703 #if CYTHON_COMPILING_IN_LIMITED_API
92704 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
92705 o = alloc_func(t, 0);
92706 #else
92707 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
92708 o = (*t->tp_alloc)(t, 0);
92709 } else {
92710 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
92711 }
92712 if (unlikely(!o)) return 0;
92713 #endif
92714 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)o);
92715 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
92716 return o;
92717 }
92718
92719 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderRecord(PyObject *o) {
92720 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)o;
92721 #if CYTHON_USE_TP_FINALIZE
92722 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
92723 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderRecord) {
92724 if (PyObject_CallFinalizerFromDealloc(o)) return;
92725 }
92726 }
92727 #endif
92728 PyObject_GC_UnTrack(o);
92729 Py_CLEAR(p->header);
92730 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
92731 (*Py_TYPE(o)->tp_free)(o);
92732 #else
92733 {
92734 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
92735 if (tp_free) tp_free(o);
92736 }
92737 #endif
92738 }
92739
92740 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderRecord(PyObject *o, visitproc v, void *a) {
92741 int e;
92742 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)o;
92743 if (p->header) {
92744 e = (*v)(((PyObject *)p->header), a); if (e) return e;
92745 }
92746 return 0;
92747 }
92748
92749 static int __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderRecord(PyObject *o) {
92750 PyObject* tmp;
92751 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord *)o;
92752 tmp = ((PyObject*)p->header);
92753 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
92754 Py_XDECREF(tmp);
92755 return 0;
92756 }
92757 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantHeaderRecord(PyObject *o, Py_ssize_t i) {
92758 PyObject *r;
92759 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
92760 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
92761 Py_DECREF(x);
92762 return r;
92763 }
92764
92765 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_type(PyObject *o, CYTHON_UNUSED void *x) {
92766 return __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_4type_1__get__(o);
92767 }
92768
92769 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_key(PyObject *o, CYTHON_UNUSED void *x) {
92770 return __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3key_1__get__(o);
92771 }
92772
92773 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_value(PyObject *o, CYTHON_UNUSED void *x) {
92774 return __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5value_1__get__(o);
92775 }
92776
92777 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_attrs(PyObject *o, CYTHON_UNUSED void *x) {
92778 return __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5attrs_1__get__(o);
92779 }
92780
92781 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_header(PyObject *o, CYTHON_UNUSED void *x) {
92782 return __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_6header_1__get__(o);
92783 }
92784
92785 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantHeaderRecord[] = {
92786 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_12get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_11get},
92787 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_16iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_15iterkeys},
92788 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_18itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_17itervalues},
92789 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_21iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_20iteritems},
92790 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_24keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_23keys},
92791 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_26items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_25items},
92792 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_28values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_27values},
92793 {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_30update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_29update},
92794 {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_32pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_31pop},
92795 {"remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_36remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_35remove},
92796 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_38__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_37__reduce_cython__},
92797 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_40__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_39__setstate_cython__},
92798 {0, 0, 0, 0}
92799 };
92800
92801 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantHeaderRecord[] = {
92802 {(char *)"type", __pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_type, 0, (char *)PyDoc_STR("header type: FILTER, INFO, FORMAT, CONTIG, STRUCTURED, or GENERIC"), 0},
92803 {(char *)"key", __pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_key, 0, (char *)PyDoc_STR("header key (the part before '=', in FILTER/INFO/FORMAT/contig/fileformat etc.)"), 0},
92804 {(char *)"value", __pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_value, 0, (char *)PyDoc_STR("header value. Set only for generic lines, None for FILTER/INFO, etc."), 0},
92805 {(char *)"attrs", __pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_attrs, 0, (char *)PyDoc_STR("sequence of additional header attributes"), 0},
92806 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_19VariantHeaderRecord_header, 0, (char *)0, 0},
92807 {0, 0, 0, 0, 0}
92808 };
92809 #if CYTHON_USE_TYPE_SPECS
92810 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantHeaderRecord_slots[] = {
92811 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderRecord},
92812 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5__bool__},
92813 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3__len__},
92814 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantHeaderRecord},
92815 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_14__contains__},
92816 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3__len__},
92817 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_7__getitem__},
92818 {Py_tp_str, (void *)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_34__str__},
92819 {Py_tp_doc, (void *)PyDoc_STR("VariantHeaderRecord(*args, **kwargs)\nheader record from a :class:`VariantHeader` object")},
92820 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderRecord},
92821 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantHeaderRecord},
92822 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_9__iter__},
92823 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantHeaderRecord},
92824 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantHeaderRecord},
92825 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_1__init__},
92826 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecord},
92827 {0, 0},
92828 };
92829 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantHeaderRecord_spec = {
92830 "pysam.libcbcf.VariantHeaderRecord",
92831 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord),
92832 0,
92833 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
92834 __pyx_type_5pysam_7libcbcf_VariantHeaderRecord_slots,
92835 };
92836 #else
92837
92838 static PyNumberMethods __pyx_tp_as_number_VariantHeaderRecord = {
92839 0, /*nb_add*/
92840 0, /*nb_subtract*/
92841 0, /*nb_multiply*/
92842 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92843 0, /*nb_divide*/
92844 #endif
92845 0, /*nb_remainder*/
92846 0, /*nb_divmod*/
92847 0, /*nb_power*/
92848 0, /*nb_negative*/
92849 0, /*nb_positive*/
92850 0, /*nb_absolute*/
92851 __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_5__bool__, /*nb_bool*/
92852 0, /*nb_invert*/
92853 0, /*nb_lshift*/
92854 0, /*nb_rshift*/
92855 0, /*nb_and*/
92856 0, /*nb_xor*/
92857 0, /*nb_or*/
92858 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92859 0, /*nb_coerce*/
92860 #endif
92861 0, /*nb_int*/
92862 #if PY_MAJOR_VERSION < 3
92863 0, /*nb_long*/
92864 #else
92865 0, /*reserved*/
92866 #endif
92867 0, /*nb_float*/
92868 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92869 0, /*nb_oct*/
92870 #endif
92871 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92872 0, /*nb_hex*/
92873 #endif
92874 0, /*nb_inplace_add*/
92875 0, /*nb_inplace_subtract*/
92876 0, /*nb_inplace_multiply*/
92877 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
92878 0, /*nb_inplace_divide*/
92879 #endif
92880 0, /*nb_inplace_remainder*/
92881 0, /*nb_inplace_power*/
92882 0, /*nb_inplace_lshift*/
92883 0, /*nb_inplace_rshift*/
92884 0, /*nb_inplace_and*/
92885 0, /*nb_inplace_xor*/
92886 0, /*nb_inplace_or*/
92887 0, /*nb_floor_divide*/
92888 0, /*nb_true_divide*/
92889 0, /*nb_inplace_floor_divide*/
92890 0, /*nb_inplace_true_divide*/
92891 0, /*nb_index*/
92892 #if PY_VERSION_HEX >= 0x03050000
92893 0, /*nb_matrix_multiply*/
92894 #endif
92895 #if PY_VERSION_HEX >= 0x03050000
92896 0, /*nb_inplace_matrix_multiply*/
92897 #endif
92898 };
92899
92900 static PySequenceMethods __pyx_tp_as_sequence_VariantHeaderRecord = {
92901 __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3__len__, /*sq_length*/
92902 0, /*sq_concat*/
92903 0, /*sq_repeat*/
92904 __pyx_sq_item_5pysam_7libcbcf_VariantHeaderRecord, /*sq_item*/
92905 0, /*sq_slice*/
92906 0, /*sq_ass_item*/
92907 0, /*sq_ass_slice*/
92908 __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_14__contains__, /*sq_contains*/
92909 0, /*sq_inplace_concat*/
92910 0, /*sq_inplace_repeat*/
92911 };
92912
92913 static PyMappingMethods __pyx_tp_as_mapping_VariantHeaderRecord = {
92914 __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_3__len__, /*mp_length*/
92915 __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_7__getitem__, /*mp_subscript*/
92916 0, /*mp_ass_subscript*/
92917 };
92918
92919 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantHeaderRecord = {
92920 PyVarObject_HEAD_INIT(0, 0)
92921 "pysam.libcbcf.""VariantHeaderRecord", /*tp_name*/
92922 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecord), /*tp_basicsize*/
92923 0, /*tp_itemsize*/
92924 __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderRecord, /*tp_dealloc*/
92925 #if PY_VERSION_HEX < 0x030800b4
92926 0, /*tp_print*/
92927 #endif
92928 #if PY_VERSION_HEX >= 0x030800b4
92929 0, /*tp_vectorcall_offset*/
92930 #endif
92931 0, /*tp_getattr*/
92932 0, /*tp_setattr*/
92933 #if PY_MAJOR_VERSION < 3
92934 0, /*tp_compare*/
92935 #endif
92936 #if PY_MAJOR_VERSION >= 3
92937 0, /*tp_as_async*/
92938 #endif
92939 0, /*tp_repr*/
92940 &__pyx_tp_as_number_VariantHeaderRecord, /*tp_as_number*/
92941 &__pyx_tp_as_sequence_VariantHeaderRecord, /*tp_as_sequence*/
92942 &__pyx_tp_as_mapping_VariantHeaderRecord, /*tp_as_mapping*/
92943 0, /*tp_hash*/
92944 0, /*tp_call*/
92945 __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_34__str__, /*tp_str*/
92946 0, /*tp_getattro*/
92947 0, /*tp_setattro*/
92948 0, /*tp_as_buffer*/
92949 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
92950 PyDoc_STR("VariantHeaderRecord(*args, **kwargs)\nheader record from a :class:`VariantHeader` object"), /*tp_doc*/
92951 __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderRecord, /*tp_traverse*/
92952 __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderRecord, /*tp_clear*/
92953 0, /*tp_richcompare*/
92954 0, /*tp_weaklistoffset*/
92955 __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_9__iter__, /*tp_iter*/
92956 0, /*tp_iternext*/
92957 __pyx_methods_5pysam_7libcbcf_VariantHeaderRecord, /*tp_methods*/
92958 0, /*tp_members*/
92959 __pyx_getsets_5pysam_7libcbcf_VariantHeaderRecord, /*tp_getset*/
92960 0, /*tp_base*/
92961 0, /*tp_dict*/
92962 0, /*tp_descr_get*/
92963 0, /*tp_descr_set*/
92964 #if !CYTHON_USE_TYPE_SPECS
92965 0, /*tp_dictoffset*/
92966 #endif
92967 __pyx_pw_5pysam_7libcbcf_19VariantHeaderRecord_1__init__, /*tp_init*/
92968 0, /*tp_alloc*/
92969 __pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecord, /*tp_new*/
92970 0, /*tp_free*/
92971 0, /*tp_is_gc*/
92972 0, /*tp_bases*/
92973 0, /*tp_mro*/
92974 0, /*tp_cache*/
92975 0, /*tp_subclasses*/
92976 0, /*tp_weaklist*/
92977 0, /*tp_del*/
92978 0, /*tp_version_tag*/
92979 #if PY_VERSION_HEX >= 0x030400a1
92980 #if CYTHON_USE_TP_FINALIZE
92981 0, /*tp_finalize*/
92982 #else
92983 NULL, /*tp_finalize*/
92984 #endif
92985 #endif
92986 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
92987 0, /*tp_vectorcall*/
92988 #endif
92989 #if __PYX_NEED_TP_PRINT_SLOT == 1
92990 0, /*tp_print*/
92991 #endif
92992 #if PY_VERSION_HEX >= 0x030C0000
92993 0, /*tp_watched*/
92994 #endif
92995 #if PY_VERSION_HEX >= 0x030d00A4
92996 0, /*tp_versions_used*/
92997 #endif
92998 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
92999 0, /*tp_pypy_flags*/
93000 #endif
93001 };
93002 #endif
93003
93004 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecords(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
93005 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *p;
93006 PyObject *o;
93007 #if CYTHON_COMPILING_IN_LIMITED_API
93008 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
93009 o = alloc_func(t, 0);
93010 #else
93011 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
93012 o = (*t->tp_alloc)(t, 0);
93013 } else {
93014 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
93015 }
93016 if (unlikely(!o)) return 0;
93017 #endif
93018 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)o);
93019 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
93020 return o;
93021 }
93022
93023 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderRecords(PyObject *o) {
93024 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)o;
93025 #if CYTHON_USE_TP_FINALIZE
93026 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
93027 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderRecords) {
93028 if (PyObject_CallFinalizerFromDealloc(o)) return;
93029 }
93030 }
93031 #endif
93032 PyObject_GC_UnTrack(o);
93033 Py_CLEAR(p->header);
93034 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
93035 (*Py_TYPE(o)->tp_free)(o);
93036 #else
93037 {
93038 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
93039 if (tp_free) tp_free(o);
93040 }
93041 #endif
93042 }
93043
93044 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderRecords(PyObject *o, visitproc v, void *a) {
93045 int e;
93046 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)o;
93047 if (p->header) {
93048 e = (*v)(((PyObject *)p->header), a); if (e) return e;
93049 }
93050 return 0;
93051 }
93052
93053 static int __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderRecords(PyObject *o) {
93054 PyObject* tmp;
93055 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords *)o;
93056 tmp = ((PyObject*)p->header);
93057 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
93058 Py_XDECREF(tmp);
93059 return 0;
93060 }
93061 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantHeaderRecords(PyObject *o, Py_ssize_t i) {
93062 PyObject *r;
93063 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
93064 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
93065 Py_DECREF(x);
93066 return r;
93067 }
93068
93069 static PyObject *__pyx_getprop_5pysam_7libcbcf_20VariantHeaderRecords_header(PyObject *o, CYTHON_UNUSED void *x) {
93070 return __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_6header_1__get__(o);
93071 }
93072
93073 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantHeaderRecords[] = {
93074 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_12__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderRecords_11__reduce_cython__},
93075 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_14__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderRecords_13__setstate_cython__},
93076 {0, 0, 0, 0}
93077 };
93078
93079 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantHeaderRecords[] = {
93080 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_20VariantHeaderRecords_header, 0, (char *)0, 0},
93081 {0, 0, 0, 0, 0}
93082 };
93083 #if CYTHON_USE_TYPE_SPECS
93084 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantHeaderRecords_slots[] = {
93085 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderRecords},
93086 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_5__bool__},
93087 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_3__len__},
93088 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantHeaderRecords},
93089 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_3__len__},
93090 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_7__getitem__},
93091 {Py_tp_doc, (void *)PyDoc_STR("VariantHeaderRecords(*args, **kwargs)\nsequence of :class:`VariantHeaderRecord` object from a :class:`VariantHeader` object")},
93092 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderRecords},
93093 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantHeaderRecords},
93094 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_9__iter__},
93095 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantHeaderRecords},
93096 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantHeaderRecords},
93097 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_1__init__},
93098 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecords},
93099 {0, 0},
93100 };
93101 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantHeaderRecords_spec = {
93102 "pysam.libcbcf.VariantHeaderRecords",
93103 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords),
93104 0,
93105 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
93106 __pyx_type_5pysam_7libcbcf_VariantHeaderRecords_slots,
93107 };
93108 #else
93109
93110 static PyNumberMethods __pyx_tp_as_number_VariantHeaderRecords = {
93111 0, /*nb_add*/
93112 0, /*nb_subtract*/
93113 0, /*nb_multiply*/
93114 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93115 0, /*nb_divide*/
93116 #endif
93117 0, /*nb_remainder*/
93118 0, /*nb_divmod*/
93119 0, /*nb_power*/
93120 0, /*nb_negative*/
93121 0, /*nb_positive*/
93122 0, /*nb_absolute*/
93123 __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_5__bool__, /*nb_bool*/
93124 0, /*nb_invert*/
93125 0, /*nb_lshift*/
93126 0, /*nb_rshift*/
93127 0, /*nb_and*/
93128 0, /*nb_xor*/
93129 0, /*nb_or*/
93130 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93131 0, /*nb_coerce*/
93132 #endif
93133 0, /*nb_int*/
93134 #if PY_MAJOR_VERSION < 3
93135 0, /*nb_long*/
93136 #else
93137 0, /*reserved*/
93138 #endif
93139 0, /*nb_float*/
93140 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93141 0, /*nb_oct*/
93142 #endif
93143 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93144 0, /*nb_hex*/
93145 #endif
93146 0, /*nb_inplace_add*/
93147 0, /*nb_inplace_subtract*/
93148 0, /*nb_inplace_multiply*/
93149 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93150 0, /*nb_inplace_divide*/
93151 #endif
93152 0, /*nb_inplace_remainder*/
93153 0, /*nb_inplace_power*/
93154 0, /*nb_inplace_lshift*/
93155 0, /*nb_inplace_rshift*/
93156 0, /*nb_inplace_and*/
93157 0, /*nb_inplace_xor*/
93158 0, /*nb_inplace_or*/
93159 0, /*nb_floor_divide*/
93160 0, /*nb_true_divide*/
93161 0, /*nb_inplace_floor_divide*/
93162 0, /*nb_inplace_true_divide*/
93163 0, /*nb_index*/
93164 #if PY_VERSION_HEX >= 0x03050000
93165 0, /*nb_matrix_multiply*/
93166 #endif
93167 #if PY_VERSION_HEX >= 0x03050000
93168 0, /*nb_inplace_matrix_multiply*/
93169 #endif
93170 };
93171
93172 static PySequenceMethods __pyx_tp_as_sequence_VariantHeaderRecords = {
93173 __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_3__len__, /*sq_length*/
93174 0, /*sq_concat*/
93175 0, /*sq_repeat*/
93176 __pyx_sq_item_5pysam_7libcbcf_VariantHeaderRecords, /*sq_item*/
93177 0, /*sq_slice*/
93178 0, /*sq_ass_item*/
93179 0, /*sq_ass_slice*/
93180 0, /*sq_contains*/
93181 0, /*sq_inplace_concat*/
93182 0, /*sq_inplace_repeat*/
93183 };
93184
93185 static PyMappingMethods __pyx_tp_as_mapping_VariantHeaderRecords = {
93186 __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_3__len__, /*mp_length*/
93187 __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_7__getitem__, /*mp_subscript*/
93188 0, /*mp_ass_subscript*/
93189 };
93190
93191 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantHeaderRecords = {
93192 PyVarObject_HEAD_INIT(0, 0)
93193 "pysam.libcbcf.""VariantHeaderRecords", /*tp_name*/
93194 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderRecords), /*tp_basicsize*/
93195 0, /*tp_itemsize*/
93196 __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderRecords, /*tp_dealloc*/
93197 #if PY_VERSION_HEX < 0x030800b4
93198 0, /*tp_print*/
93199 #endif
93200 #if PY_VERSION_HEX >= 0x030800b4
93201 0, /*tp_vectorcall_offset*/
93202 #endif
93203 0, /*tp_getattr*/
93204 0, /*tp_setattr*/
93205 #if PY_MAJOR_VERSION < 3
93206 0, /*tp_compare*/
93207 #endif
93208 #if PY_MAJOR_VERSION >= 3
93209 0, /*tp_as_async*/
93210 #endif
93211 0, /*tp_repr*/
93212 &__pyx_tp_as_number_VariantHeaderRecords, /*tp_as_number*/
93213 &__pyx_tp_as_sequence_VariantHeaderRecords, /*tp_as_sequence*/
93214 &__pyx_tp_as_mapping_VariantHeaderRecords, /*tp_as_mapping*/
93215 0, /*tp_hash*/
93216 0, /*tp_call*/
93217 0, /*tp_str*/
93218 0, /*tp_getattro*/
93219 0, /*tp_setattro*/
93220 0, /*tp_as_buffer*/
93221 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
93222 PyDoc_STR("VariantHeaderRecords(*args, **kwargs)\nsequence of :class:`VariantHeaderRecord` object from a :class:`VariantHeader` object"), /*tp_doc*/
93223 __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderRecords, /*tp_traverse*/
93224 __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderRecords, /*tp_clear*/
93225 0, /*tp_richcompare*/
93226 0, /*tp_weaklistoffset*/
93227 __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_9__iter__, /*tp_iter*/
93228 0, /*tp_iternext*/
93229 __pyx_methods_5pysam_7libcbcf_VariantHeaderRecords, /*tp_methods*/
93230 0, /*tp_members*/
93231 __pyx_getsets_5pysam_7libcbcf_VariantHeaderRecords, /*tp_getset*/
93232 0, /*tp_base*/
93233 0, /*tp_dict*/
93234 0, /*tp_descr_get*/
93235 0, /*tp_descr_set*/
93236 #if !CYTHON_USE_TYPE_SPECS
93237 0, /*tp_dictoffset*/
93238 #endif
93239 __pyx_pw_5pysam_7libcbcf_20VariantHeaderRecords_1__init__, /*tp_init*/
93240 0, /*tp_alloc*/
93241 __pyx_tp_new_5pysam_7libcbcf_VariantHeaderRecords, /*tp_new*/
93242 0, /*tp_free*/
93243 0, /*tp_is_gc*/
93244 0, /*tp_bases*/
93245 0, /*tp_mro*/
93246 0, /*tp_cache*/
93247 0, /*tp_subclasses*/
93248 0, /*tp_weaklist*/
93249 0, /*tp_del*/
93250 0, /*tp_version_tag*/
93251 #if PY_VERSION_HEX >= 0x030400a1
93252 #if CYTHON_USE_TP_FINALIZE
93253 0, /*tp_finalize*/
93254 #else
93255 NULL, /*tp_finalize*/
93256 #endif
93257 #endif
93258 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
93259 0, /*tp_vectorcall*/
93260 #endif
93261 #if __PYX_NEED_TP_PRINT_SLOT == 1
93262 0, /*tp_print*/
93263 #endif
93264 #if PY_VERSION_HEX >= 0x030C0000
93265 0, /*tp_watched*/
93266 #endif
93267 #if PY_VERSION_HEX >= 0x030d00A4
93268 0, /*tp_versions_used*/
93269 #endif
93270 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
93271 0, /*tp_pypy_flags*/
93272 #endif
93273 };
93274 #endif
93275
93276 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderContigs(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
93277 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *p;
93278 PyObject *o;
93279 #if CYTHON_COMPILING_IN_LIMITED_API
93280 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
93281 o = alloc_func(t, 0);
93282 #else
93283 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
93284 o = (*t->tp_alloc)(t, 0);
93285 } else {
93286 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
93287 }
93288 if (unlikely(!o)) return 0;
93289 #endif
93290 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)o);
93291 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
93292 return o;
93293 }
93294
93295 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderContigs(PyObject *o) {
93296 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)o;
93297 #if CYTHON_USE_TP_FINALIZE
93298 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
93299 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderContigs) {
93300 if (PyObject_CallFinalizerFromDealloc(o)) return;
93301 }
93302 }
93303 #endif
93304 PyObject_GC_UnTrack(o);
93305 Py_CLEAR(p->header);
93306 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
93307 (*Py_TYPE(o)->tp_free)(o);
93308 #else
93309 {
93310 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
93311 if (tp_free) tp_free(o);
93312 }
93313 #endif
93314 }
93315
93316 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderContigs(PyObject *o, visitproc v, void *a) {
93317 int e;
93318 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)o;
93319 if (p->header) {
93320 e = (*v)(((PyObject *)p->header), a); if (e) return e;
93321 }
93322 return 0;
93323 }
93324
93325 static int __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderContigs(PyObject *o) {
93326 PyObject* tmp;
93327 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs *)o;
93328 tmp = ((PyObject*)p->header);
93329 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
93330 Py_XDECREF(tmp);
93331 return 0;
93332 }
93333 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantHeaderContigs(PyObject *o, Py_ssize_t i) {
93334 PyObject *r;
93335 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
93336 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
93337 Py_DECREF(x);
93338 return r;
93339 }
93340
93341 static PyObject *__pyx_getprop_5pysam_7libcbcf_20VariantHeaderContigs_header(PyObject *o, CYTHON_UNUSED void *x) {
93342 return __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_6header_1__get__(o);
93343 }
93344
93345 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantHeaderContigs[] = {
93346 {"remove_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_9remove_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_8remove_header},
93347 {"clear_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_11clear_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_10clear_header},
93348 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_16get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_15get},
93349 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_20iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_19iterkeys},
93350 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_22itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_21itervalues},
93351 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_25iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_24iteritems},
93352 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_28keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_27keys},
93353 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_30items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_29items},
93354 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_32values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_31values},
93355 {"add", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_34add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_33add},
93356 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_36__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_35__reduce_cython__},
93357 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_38__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderContigs_37__setstate_cython__},
93358 {0, 0, 0, 0}
93359 };
93360
93361 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantHeaderContigs[] = {
93362 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_20VariantHeaderContigs_header, 0, (char *)0, 0},
93363 {0, 0, 0, 0, 0}
93364 };
93365 #if CYTHON_USE_TYPE_SPECS
93366 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantHeaderContigs_slots[] = {
93367 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderContigs},
93368 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_5__bool__},
93369 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_3__len__},
93370 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantHeaderContigs},
93371 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_18__contains__},
93372 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_3__len__},
93373 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_7__getitem__},
93374 {Py_tp_doc, (void *)PyDoc_STR("VariantHeaderContigs(*args, **kwargs)\nmapping from contig name or index to :class:`VariantContig` object.")},
93375 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderContigs},
93376 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantHeaderContigs},
93377 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_13__iter__},
93378 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantHeaderContigs},
93379 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantHeaderContigs},
93380 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_1__init__},
93381 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderContigs},
93382 {0, 0},
93383 };
93384 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantHeaderContigs_spec = {
93385 "pysam.libcbcf.VariantHeaderContigs",
93386 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs),
93387 0,
93388 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
93389 __pyx_type_5pysam_7libcbcf_VariantHeaderContigs_slots,
93390 };
93391 #else
93392
93393 static PyNumberMethods __pyx_tp_as_number_VariantHeaderContigs = {
93394 0, /*nb_add*/
93395 0, /*nb_subtract*/
93396 0, /*nb_multiply*/
93397 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93398 0, /*nb_divide*/
93399 #endif
93400 0, /*nb_remainder*/
93401 0, /*nb_divmod*/
93402 0, /*nb_power*/
93403 0, /*nb_negative*/
93404 0, /*nb_positive*/
93405 0, /*nb_absolute*/
93406 __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_5__bool__, /*nb_bool*/
93407 0, /*nb_invert*/
93408 0, /*nb_lshift*/
93409 0, /*nb_rshift*/
93410 0, /*nb_and*/
93411 0, /*nb_xor*/
93412 0, /*nb_or*/
93413 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93414 0, /*nb_coerce*/
93415 #endif
93416 0, /*nb_int*/
93417 #if PY_MAJOR_VERSION < 3
93418 0, /*nb_long*/
93419 #else
93420 0, /*reserved*/
93421 #endif
93422 0, /*nb_float*/
93423 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93424 0, /*nb_oct*/
93425 #endif
93426 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93427 0, /*nb_hex*/
93428 #endif
93429 0, /*nb_inplace_add*/
93430 0, /*nb_inplace_subtract*/
93431 0, /*nb_inplace_multiply*/
93432 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93433 0, /*nb_inplace_divide*/
93434 #endif
93435 0, /*nb_inplace_remainder*/
93436 0, /*nb_inplace_power*/
93437 0, /*nb_inplace_lshift*/
93438 0, /*nb_inplace_rshift*/
93439 0, /*nb_inplace_and*/
93440 0, /*nb_inplace_xor*/
93441 0, /*nb_inplace_or*/
93442 0, /*nb_floor_divide*/
93443 0, /*nb_true_divide*/
93444 0, /*nb_inplace_floor_divide*/
93445 0, /*nb_inplace_true_divide*/
93446 0, /*nb_index*/
93447 #if PY_VERSION_HEX >= 0x03050000
93448 0, /*nb_matrix_multiply*/
93449 #endif
93450 #if PY_VERSION_HEX >= 0x03050000
93451 0, /*nb_inplace_matrix_multiply*/
93452 #endif
93453 };
93454
93455 static PySequenceMethods __pyx_tp_as_sequence_VariantHeaderContigs = {
93456 __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_3__len__, /*sq_length*/
93457 0, /*sq_concat*/
93458 0, /*sq_repeat*/
93459 __pyx_sq_item_5pysam_7libcbcf_VariantHeaderContigs, /*sq_item*/
93460 0, /*sq_slice*/
93461 0, /*sq_ass_item*/
93462 0, /*sq_ass_slice*/
93463 __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_18__contains__, /*sq_contains*/
93464 0, /*sq_inplace_concat*/
93465 0, /*sq_inplace_repeat*/
93466 };
93467
93468 static PyMappingMethods __pyx_tp_as_mapping_VariantHeaderContigs = {
93469 __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_3__len__, /*mp_length*/
93470 __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_7__getitem__, /*mp_subscript*/
93471 0, /*mp_ass_subscript*/
93472 };
93473
93474 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantHeaderContigs = {
93475 PyVarObject_HEAD_INIT(0, 0)
93476 "pysam.libcbcf.""VariantHeaderContigs", /*tp_name*/
93477 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderContigs), /*tp_basicsize*/
93478 0, /*tp_itemsize*/
93479 __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderContigs, /*tp_dealloc*/
93480 #if PY_VERSION_HEX < 0x030800b4
93481 0, /*tp_print*/
93482 #endif
93483 #if PY_VERSION_HEX >= 0x030800b4
93484 0, /*tp_vectorcall_offset*/
93485 #endif
93486 0, /*tp_getattr*/
93487 0, /*tp_setattr*/
93488 #if PY_MAJOR_VERSION < 3
93489 0, /*tp_compare*/
93490 #endif
93491 #if PY_MAJOR_VERSION >= 3
93492 0, /*tp_as_async*/
93493 #endif
93494 0, /*tp_repr*/
93495 &__pyx_tp_as_number_VariantHeaderContigs, /*tp_as_number*/
93496 &__pyx_tp_as_sequence_VariantHeaderContigs, /*tp_as_sequence*/
93497 &__pyx_tp_as_mapping_VariantHeaderContigs, /*tp_as_mapping*/
93498 0, /*tp_hash*/
93499 0, /*tp_call*/
93500 0, /*tp_str*/
93501 0, /*tp_getattro*/
93502 0, /*tp_setattro*/
93503 0, /*tp_as_buffer*/
93504 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
93505 PyDoc_STR("VariantHeaderContigs(*args, **kwargs)\nmapping from contig name or index to :class:`VariantContig` object."), /*tp_doc*/
93506 __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderContigs, /*tp_traverse*/
93507 __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderContigs, /*tp_clear*/
93508 0, /*tp_richcompare*/
93509 0, /*tp_weaklistoffset*/
93510 __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_13__iter__, /*tp_iter*/
93511 0, /*tp_iternext*/
93512 __pyx_methods_5pysam_7libcbcf_VariantHeaderContigs, /*tp_methods*/
93513 0, /*tp_members*/
93514 __pyx_getsets_5pysam_7libcbcf_VariantHeaderContigs, /*tp_getset*/
93515 0, /*tp_base*/
93516 0, /*tp_dict*/
93517 0, /*tp_descr_get*/
93518 0, /*tp_descr_set*/
93519 #if !CYTHON_USE_TYPE_SPECS
93520 0, /*tp_dictoffset*/
93521 #endif
93522 __pyx_pw_5pysam_7libcbcf_20VariantHeaderContigs_1__init__, /*tp_init*/
93523 0, /*tp_alloc*/
93524 __pyx_tp_new_5pysam_7libcbcf_VariantHeaderContigs, /*tp_new*/
93525 0, /*tp_free*/
93526 0, /*tp_is_gc*/
93527 0, /*tp_bases*/
93528 0, /*tp_mro*/
93529 0, /*tp_cache*/
93530 0, /*tp_subclasses*/
93531 0, /*tp_weaklist*/
93532 0, /*tp_del*/
93533 0, /*tp_version_tag*/
93534 #if PY_VERSION_HEX >= 0x030400a1
93535 #if CYTHON_USE_TP_FINALIZE
93536 0, /*tp_finalize*/
93537 #else
93538 NULL, /*tp_finalize*/
93539 #endif
93540 #endif
93541 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
93542 0, /*tp_vectorcall*/
93543 #endif
93544 #if __PYX_NEED_TP_PRINT_SLOT == 1
93545 0, /*tp_print*/
93546 #endif
93547 #if PY_VERSION_HEX >= 0x030C0000
93548 0, /*tp_watched*/
93549 #endif
93550 #if PY_VERSION_HEX >= 0x030d00A4
93551 0, /*tp_versions_used*/
93552 #endif
93553 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
93554 0, /*tp_pypy_flags*/
93555 #endif
93556 };
93557 #endif
93558
93559 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderSamples(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
93560 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *p;
93561 PyObject *o;
93562 #if CYTHON_COMPILING_IN_LIMITED_API
93563 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
93564 o = alloc_func(t, 0);
93565 #else
93566 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
93567 o = (*t->tp_alloc)(t, 0);
93568 } else {
93569 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
93570 }
93571 if (unlikely(!o)) return 0;
93572 #endif
93573 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)o);
93574 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
93575 return o;
93576 }
93577
93578 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderSamples(PyObject *o) {
93579 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)o;
93580 #if CYTHON_USE_TP_FINALIZE
93581 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
93582 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderSamples) {
93583 if (PyObject_CallFinalizerFromDealloc(o)) return;
93584 }
93585 }
93586 #endif
93587 PyObject_GC_UnTrack(o);
93588 Py_CLEAR(p->header);
93589 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
93590 (*Py_TYPE(o)->tp_free)(o);
93591 #else
93592 {
93593 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
93594 if (tp_free) tp_free(o);
93595 }
93596 #endif
93597 }
93598
93599 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderSamples(PyObject *o, visitproc v, void *a) {
93600 int e;
93601 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)o;
93602 if (p->header) {
93603 e = (*v)(((PyObject *)p->header), a); if (e) return e;
93604 }
93605 return 0;
93606 }
93607
93608 static int __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderSamples(PyObject *o) {
93609 PyObject* tmp;
93610 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples *)o;
93611 tmp = ((PyObject*)p->header);
93612 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
93613 Py_XDECREF(tmp);
93614 return 0;
93615 }
93616 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantHeaderSamples(PyObject *o, Py_ssize_t i) {
93617 PyObject *r;
93618 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
93619 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
93620 Py_DECREF(x);
93621 return r;
93622 }
93623
93624 static PyObject *__pyx_getprop_5pysam_7libcbcf_20VariantHeaderSamples_header(PyObject *o, CYTHON_UNUSED void *x) {
93625 return __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_6header_1__get__(o);
93626 }
93627
93628 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantHeaderSamples[] = {
93629 {"add", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_14add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_13add},
93630 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_16__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_15__reduce_cython__},
93631 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_18__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantHeaderSamples_17__setstate_cython__},
93632 {0, 0, 0, 0}
93633 };
93634
93635 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantHeaderSamples[] = {
93636 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_20VariantHeaderSamples_header, 0, (char *)0, 0},
93637 {0, 0, 0, 0, 0}
93638 };
93639 #if CYTHON_USE_TYPE_SPECS
93640 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantHeaderSamples_slots[] = {
93641 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderSamples},
93642 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_5__bool__},
93643 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_3__len__},
93644 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantHeaderSamples},
93645 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_12__contains__},
93646 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_3__len__},
93647 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_7__getitem__},
93648 {Py_tp_doc, (void *)PyDoc_STR("VariantHeaderSamples(*args, **kwargs)\nsequence of sample names from a :class:`VariantHeader` object")},
93649 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderSamples},
93650 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantHeaderSamples},
93651 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_9__iter__},
93652 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantHeaderSamples},
93653 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantHeaderSamples},
93654 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_1__init__},
93655 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderSamples},
93656 {0, 0},
93657 };
93658 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantHeaderSamples_spec = {
93659 "pysam.libcbcf.VariantHeaderSamples",
93660 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples),
93661 0,
93662 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
93663 __pyx_type_5pysam_7libcbcf_VariantHeaderSamples_slots,
93664 };
93665 #else
93666
93667 static PyNumberMethods __pyx_tp_as_number_VariantHeaderSamples = {
93668 0, /*nb_add*/
93669 0, /*nb_subtract*/
93670 0, /*nb_multiply*/
93671 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93672 0, /*nb_divide*/
93673 #endif
93674 0, /*nb_remainder*/
93675 0, /*nb_divmod*/
93676 0, /*nb_power*/
93677 0, /*nb_negative*/
93678 0, /*nb_positive*/
93679 0, /*nb_absolute*/
93680 __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_5__bool__, /*nb_bool*/
93681 0, /*nb_invert*/
93682 0, /*nb_lshift*/
93683 0, /*nb_rshift*/
93684 0, /*nb_and*/
93685 0, /*nb_xor*/
93686 0, /*nb_or*/
93687 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93688 0, /*nb_coerce*/
93689 #endif
93690 0, /*nb_int*/
93691 #if PY_MAJOR_VERSION < 3
93692 0, /*nb_long*/
93693 #else
93694 0, /*reserved*/
93695 #endif
93696 0, /*nb_float*/
93697 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93698 0, /*nb_oct*/
93699 #endif
93700 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93701 0, /*nb_hex*/
93702 #endif
93703 0, /*nb_inplace_add*/
93704 0, /*nb_inplace_subtract*/
93705 0, /*nb_inplace_multiply*/
93706 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
93707 0, /*nb_inplace_divide*/
93708 #endif
93709 0, /*nb_inplace_remainder*/
93710 0, /*nb_inplace_power*/
93711 0, /*nb_inplace_lshift*/
93712 0, /*nb_inplace_rshift*/
93713 0, /*nb_inplace_and*/
93714 0, /*nb_inplace_xor*/
93715 0, /*nb_inplace_or*/
93716 0, /*nb_floor_divide*/
93717 0, /*nb_true_divide*/
93718 0, /*nb_inplace_floor_divide*/
93719 0, /*nb_inplace_true_divide*/
93720 0, /*nb_index*/
93721 #if PY_VERSION_HEX >= 0x03050000
93722 0, /*nb_matrix_multiply*/
93723 #endif
93724 #if PY_VERSION_HEX >= 0x03050000
93725 0, /*nb_inplace_matrix_multiply*/
93726 #endif
93727 };
93728
93729 static PySequenceMethods __pyx_tp_as_sequence_VariantHeaderSamples = {
93730 __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_3__len__, /*sq_length*/
93731 0, /*sq_concat*/
93732 0, /*sq_repeat*/
93733 __pyx_sq_item_5pysam_7libcbcf_VariantHeaderSamples, /*sq_item*/
93734 0, /*sq_slice*/
93735 0, /*sq_ass_item*/
93736 0, /*sq_ass_slice*/
93737 __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_12__contains__, /*sq_contains*/
93738 0, /*sq_inplace_concat*/
93739 0, /*sq_inplace_repeat*/
93740 };
93741
93742 static PyMappingMethods __pyx_tp_as_mapping_VariantHeaderSamples = {
93743 __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_3__len__, /*mp_length*/
93744 __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_7__getitem__, /*mp_subscript*/
93745 0, /*mp_ass_subscript*/
93746 };
93747
93748 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantHeaderSamples = {
93749 PyVarObject_HEAD_INIT(0, 0)
93750 "pysam.libcbcf.""VariantHeaderSamples", /*tp_name*/
93751 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderSamples), /*tp_basicsize*/
93752 0, /*tp_itemsize*/
93753 __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderSamples, /*tp_dealloc*/
93754 #if PY_VERSION_HEX < 0x030800b4
93755 0, /*tp_print*/
93756 #endif
93757 #if PY_VERSION_HEX >= 0x030800b4
93758 0, /*tp_vectorcall_offset*/
93759 #endif
93760 0, /*tp_getattr*/
93761 0, /*tp_setattr*/
93762 #if PY_MAJOR_VERSION < 3
93763 0, /*tp_compare*/
93764 #endif
93765 #if PY_MAJOR_VERSION >= 3
93766 0, /*tp_as_async*/
93767 #endif
93768 0, /*tp_repr*/
93769 &__pyx_tp_as_number_VariantHeaderSamples, /*tp_as_number*/
93770 &__pyx_tp_as_sequence_VariantHeaderSamples, /*tp_as_sequence*/
93771 &__pyx_tp_as_mapping_VariantHeaderSamples, /*tp_as_mapping*/
93772 0, /*tp_hash*/
93773 0, /*tp_call*/
93774 0, /*tp_str*/
93775 0, /*tp_getattro*/
93776 0, /*tp_setattro*/
93777 0, /*tp_as_buffer*/
93778 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
93779 PyDoc_STR("VariantHeaderSamples(*args, **kwargs)\nsequence of sample names from a :class:`VariantHeader` object"), /*tp_doc*/
93780 __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderSamples, /*tp_traverse*/
93781 __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderSamples, /*tp_clear*/
93782 0, /*tp_richcompare*/
93783 0, /*tp_weaklistoffset*/
93784 __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_9__iter__, /*tp_iter*/
93785 0, /*tp_iternext*/
93786 __pyx_methods_5pysam_7libcbcf_VariantHeaderSamples, /*tp_methods*/
93787 0, /*tp_members*/
93788 __pyx_getsets_5pysam_7libcbcf_VariantHeaderSamples, /*tp_getset*/
93789 0, /*tp_base*/
93790 0, /*tp_dict*/
93791 0, /*tp_descr_get*/
93792 0, /*tp_descr_set*/
93793 #if !CYTHON_USE_TYPE_SPECS
93794 0, /*tp_dictoffset*/
93795 #endif
93796 __pyx_pw_5pysam_7libcbcf_20VariantHeaderSamples_1__init__, /*tp_init*/
93797 0, /*tp_alloc*/
93798 __pyx_tp_new_5pysam_7libcbcf_VariantHeaderSamples, /*tp_new*/
93799 0, /*tp_free*/
93800 0, /*tp_is_gc*/
93801 0, /*tp_bases*/
93802 0, /*tp_mro*/
93803 0, /*tp_cache*/
93804 0, /*tp_subclasses*/
93805 0, /*tp_weaklist*/
93806 0, /*tp_del*/
93807 0, /*tp_version_tag*/
93808 #if PY_VERSION_HEX >= 0x030400a1
93809 #if CYTHON_USE_TP_FINALIZE
93810 0, /*tp_finalize*/
93811 #else
93812 NULL, /*tp_finalize*/
93813 #endif
93814 #endif
93815 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
93816 0, /*tp_vectorcall*/
93817 #endif
93818 #if __PYX_NEED_TP_PRINT_SLOT == 1
93819 0, /*tp_print*/
93820 #endif
93821 #if PY_VERSION_HEX >= 0x030C0000
93822 0, /*tp_watched*/
93823 #endif
93824 #if PY_VERSION_HEX >= 0x030d00A4
93825 0, /*tp_versions_used*/
93826 #endif
93827 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
93828 0, /*tp_pypy_flags*/
93829 #endif
93830 };
93831 #endif
93832
93833 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantContig(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
93834 struct __pyx_obj_5pysam_7libcbcf_VariantContig *p;
93835 PyObject *o;
93836 #if CYTHON_COMPILING_IN_LIMITED_API
93837 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
93838 o = alloc_func(t, 0);
93839 #else
93840 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
93841 o = (*t->tp_alloc)(t, 0);
93842 } else {
93843 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
93844 }
93845 if (unlikely(!o)) return 0;
93846 #endif
93847 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantContig *)o);
93848 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
93849 return o;
93850 }
93851
93852 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantContig(PyObject *o) {
93853 struct __pyx_obj_5pysam_7libcbcf_VariantContig *p = (struct __pyx_obj_5pysam_7libcbcf_VariantContig *)o;
93854 #if CYTHON_USE_TP_FINALIZE
93855 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
93856 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantContig) {
93857 if (PyObject_CallFinalizerFromDealloc(o)) return;
93858 }
93859 }
93860 #endif
93861 PyObject_GC_UnTrack(o);
93862 Py_CLEAR(p->header);
93863 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
93864 (*Py_TYPE(o)->tp_free)(o);
93865 #else
93866 {
93867 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
93868 if (tp_free) tp_free(o);
93869 }
93870 #endif
93871 }
93872
93873 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantContig(PyObject *o, visitproc v, void *a) {
93874 int e;
93875 struct __pyx_obj_5pysam_7libcbcf_VariantContig *p = (struct __pyx_obj_5pysam_7libcbcf_VariantContig *)o;
93876 if (p->header) {
93877 e = (*v)(((PyObject *)p->header), a); if (e) return e;
93878 }
93879 return 0;
93880 }
93881
93882 static int __pyx_tp_clear_5pysam_7libcbcf_VariantContig(PyObject *o) {
93883 PyObject* tmp;
93884 struct __pyx_obj_5pysam_7libcbcf_VariantContig *p = (struct __pyx_obj_5pysam_7libcbcf_VariantContig *)o;
93885 tmp = ((PyObject*)p->header);
93886 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
93887 Py_XDECREF(tmp);
93888 return 0;
93889 }
93890
93891 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantContig_name(PyObject *o, CYTHON_UNUSED void *x) {
93892 return __pyx_pw_5pysam_7libcbcf_13VariantContig_4name_1__get__(o);
93893 }
93894
93895 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantContig_id(PyObject *o, CYTHON_UNUSED void *x) {
93896 return __pyx_pw_5pysam_7libcbcf_13VariantContig_2id_1__get__(o);
93897 }
93898
93899 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantContig_length(PyObject *o, CYTHON_UNUSED void *x) {
93900 return __pyx_pw_5pysam_7libcbcf_13VariantContig_6length_1__get__(o);
93901 }
93902
93903 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantContig_header_record(PyObject *o, CYTHON_UNUSED void *x) {
93904 return __pyx_pw_5pysam_7libcbcf_13VariantContig_13header_record_1__get__(o);
93905 }
93906
93907 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantContig_header(PyObject *o, CYTHON_UNUSED void *x) {
93908 return __pyx_pw_5pysam_7libcbcf_13VariantContig_6header_1__get__(o);
93909 }
93910
93911 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantContig[] = {
93912 {"remove_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantContig_3remove_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantContig_2remove_header},
93913 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantContig_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantContig_4__reduce_cython__},
93914 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantContig_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantContig_6__setstate_cython__},
93915 {0, 0, 0, 0}
93916 };
93917
93918 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantContig[] = {
93919 {(char *)"name", __pyx_getprop_5pysam_7libcbcf_13VariantContig_name, 0, (char *)PyDoc_STR("contig name"), 0},
93920 {(char *)"id", __pyx_getprop_5pysam_7libcbcf_13VariantContig_id, 0, (char *)PyDoc_STR("contig internal id number"), 0},
93921 {(char *)"length", __pyx_getprop_5pysam_7libcbcf_13VariantContig_length, 0, (char *)PyDoc_STR("contig length or None if not available"), 0},
93922 {(char *)"header_record", __pyx_getprop_5pysam_7libcbcf_13VariantContig_header_record, 0, (char *)PyDoc_STR(":class:`VariantHeaderRecord` associated with this :class:`VariantContig` object"), 0},
93923 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_13VariantContig_header, 0, (char *)0, 0},
93924 {0, 0, 0, 0, 0}
93925 };
93926 #if CYTHON_USE_TYPE_SPECS
93927 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantContig_slots[] = {
93928 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantContig},
93929 {Py_tp_doc, (void *)PyDoc_STR("VariantContig(*args, **kwargs)\ncontig metadata from a :class:`VariantHeader`")},
93930 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantContig},
93931 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantContig},
93932 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantContig},
93933 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantContig},
93934 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_13VariantContig_1__init__},
93935 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantContig},
93936 {0, 0},
93937 };
93938 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantContig_spec = {
93939 "pysam.libcbcf.VariantContig",
93940 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantContig),
93941 0,
93942 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
93943 __pyx_type_5pysam_7libcbcf_VariantContig_slots,
93944 };
93945 #else
93946
93947 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantContig = {
93948 PyVarObject_HEAD_INIT(0, 0)
93949 "pysam.libcbcf.""VariantContig", /*tp_name*/
93950 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantContig), /*tp_basicsize*/
93951 0, /*tp_itemsize*/
93952 __pyx_tp_dealloc_5pysam_7libcbcf_VariantContig, /*tp_dealloc*/
93953 #if PY_VERSION_HEX < 0x030800b4
93954 0, /*tp_print*/
93955 #endif
93956 #if PY_VERSION_HEX >= 0x030800b4
93957 0, /*tp_vectorcall_offset*/
93958 #endif
93959 0, /*tp_getattr*/
93960 0, /*tp_setattr*/
93961 #if PY_MAJOR_VERSION < 3
93962 0, /*tp_compare*/
93963 #endif
93964 #if PY_MAJOR_VERSION >= 3
93965 0, /*tp_as_async*/
93966 #endif
93967 0, /*tp_repr*/
93968 0, /*tp_as_number*/
93969 0, /*tp_as_sequence*/
93970 0, /*tp_as_mapping*/
93971 0, /*tp_hash*/
93972 0, /*tp_call*/
93973 0, /*tp_str*/
93974 0, /*tp_getattro*/
93975 0, /*tp_setattro*/
93976 0, /*tp_as_buffer*/
93977 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
93978 PyDoc_STR("VariantContig(*args, **kwargs)\ncontig metadata from a :class:`VariantHeader`"), /*tp_doc*/
93979 __pyx_tp_traverse_5pysam_7libcbcf_VariantContig, /*tp_traverse*/
93980 __pyx_tp_clear_5pysam_7libcbcf_VariantContig, /*tp_clear*/
93981 0, /*tp_richcompare*/
93982 0, /*tp_weaklistoffset*/
93983 0, /*tp_iter*/
93984 0, /*tp_iternext*/
93985 __pyx_methods_5pysam_7libcbcf_VariantContig, /*tp_methods*/
93986 0, /*tp_members*/
93987 __pyx_getsets_5pysam_7libcbcf_VariantContig, /*tp_getset*/
93988 0, /*tp_base*/
93989 0, /*tp_dict*/
93990 0, /*tp_descr_get*/
93991 0, /*tp_descr_set*/
93992 #if !CYTHON_USE_TYPE_SPECS
93993 0, /*tp_dictoffset*/
93994 #endif
93995 __pyx_pw_5pysam_7libcbcf_13VariantContig_1__init__, /*tp_init*/
93996 0, /*tp_alloc*/
93997 __pyx_tp_new_5pysam_7libcbcf_VariantContig, /*tp_new*/
93998 0, /*tp_free*/
93999 0, /*tp_is_gc*/
94000 0, /*tp_bases*/
94001 0, /*tp_mro*/
94002 0, /*tp_cache*/
94003 0, /*tp_subclasses*/
94004 0, /*tp_weaklist*/
94005 0, /*tp_del*/
94006 0, /*tp_version_tag*/
94007 #if PY_VERSION_HEX >= 0x030400a1
94008 #if CYTHON_USE_TP_FINALIZE
94009 0, /*tp_finalize*/
94010 #else
94011 NULL, /*tp_finalize*/
94012 #endif
94013 #endif
94014 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
94015 0, /*tp_vectorcall*/
94016 #endif
94017 #if __PYX_NEED_TP_PRINT_SLOT == 1
94018 0, /*tp_print*/
94019 #endif
94020 #if PY_VERSION_HEX >= 0x030C0000
94021 0, /*tp_watched*/
94022 #endif
94023 #if PY_VERSION_HEX >= 0x030d00A4
94024 0, /*tp_versions_used*/
94025 #endif
94026 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
94027 0, /*tp_pypy_flags*/
94028 #endif
94029 };
94030 #endif
94031
94032 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantMetadata(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
94033 struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *p;
94034 PyObject *o;
94035 #if CYTHON_COMPILING_IN_LIMITED_API
94036 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
94037 o = alloc_func(t, 0);
94038 #else
94039 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
94040 o = (*t->tp_alloc)(t, 0);
94041 } else {
94042 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
94043 }
94044 if (unlikely(!o)) return 0;
94045 #endif
94046 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)o);
94047 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
94048 return o;
94049 }
94050
94051 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantMetadata(PyObject *o) {
94052 struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *p = (struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)o;
94053 #if CYTHON_USE_TP_FINALIZE
94054 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
94055 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantMetadata) {
94056 if (PyObject_CallFinalizerFromDealloc(o)) return;
94057 }
94058 }
94059 #endif
94060 PyObject_GC_UnTrack(o);
94061 Py_CLEAR(p->header);
94062 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
94063 (*Py_TYPE(o)->tp_free)(o);
94064 #else
94065 {
94066 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
94067 if (tp_free) tp_free(o);
94068 }
94069 #endif
94070 }
94071
94072 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantMetadata(PyObject *o, visitproc v, void *a) {
94073 int e;
94074 struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *p = (struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)o;
94075 if (p->header) {
94076 e = (*v)(((PyObject *)p->header), a); if (e) return e;
94077 }
94078 return 0;
94079 }
94080
94081 static int __pyx_tp_clear_5pysam_7libcbcf_VariantMetadata(PyObject *o) {
94082 PyObject* tmp;
94083 struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *p = (struct __pyx_obj_5pysam_7libcbcf_VariantMetadata *)o;
94084 tmp = ((PyObject*)p->header);
94085 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
94086 Py_XDECREF(tmp);
94087 return 0;
94088 }
94089
94090 static PyObject *__pyx_getprop_5pysam_7libcbcf_15VariantMetadata_name(PyObject *o, CYTHON_UNUSED void *x) {
94091 return __pyx_pw_5pysam_7libcbcf_15VariantMetadata_4name_1__get__(o);
94092 }
94093
94094 static PyObject *__pyx_getprop_5pysam_7libcbcf_15VariantMetadata_id(PyObject *o, CYTHON_UNUSED void *x) {
94095 return __pyx_pw_5pysam_7libcbcf_15VariantMetadata_2id_1__get__(o);
94096 }
94097
94098 static PyObject *__pyx_getprop_5pysam_7libcbcf_15VariantMetadata_number(PyObject *o, CYTHON_UNUSED void *x) {
94099 return __pyx_pw_5pysam_7libcbcf_15VariantMetadata_6number_1__get__(o);
94100 }
94101
94102 static PyObject *__pyx_getprop_5pysam_7libcbcf_15VariantMetadata_type(PyObject *o, CYTHON_UNUSED void *x) {
94103 return __pyx_pw_5pysam_7libcbcf_15VariantMetadata_4type_1__get__(o);
94104 }
94105
94106 static PyObject *__pyx_getprop_5pysam_7libcbcf_15VariantMetadata_description(PyObject *o, CYTHON_UNUSED void *x) {
94107 return __pyx_pw_5pysam_7libcbcf_15VariantMetadata_11description_1__get__(o);
94108 }
94109
94110 static PyObject *__pyx_getprop_5pysam_7libcbcf_15VariantMetadata_record(PyObject *o, CYTHON_UNUSED void *x) {
94111 return __pyx_pw_5pysam_7libcbcf_15VariantMetadata_6record_1__get__(o);
94112 }
94113
94114 static PyObject *__pyx_getprop_5pysam_7libcbcf_15VariantMetadata_header(PyObject *o, CYTHON_UNUSED void *x) {
94115 return __pyx_pw_5pysam_7libcbcf_15VariantMetadata_6header_1__get__(o);
94116 }
94117
94118 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantMetadata[] = {
94119 {"remove_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_15VariantMetadata_3remove_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_15VariantMetadata_2remove_header},
94120 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_15VariantMetadata_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_15VariantMetadata_4__reduce_cython__},
94121 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_15VariantMetadata_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_15VariantMetadata_6__setstate_cython__},
94122 {0, 0, 0, 0}
94123 };
94124
94125 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantMetadata[] = {
94126 {(char *)"name", __pyx_getprop_5pysam_7libcbcf_15VariantMetadata_name, 0, (char *)PyDoc_STR("metadata name"), 0},
94127 {(char *)"id", __pyx_getprop_5pysam_7libcbcf_15VariantMetadata_id, 0, (char *)PyDoc_STR("metadata internal header id number"), 0},
94128 {(char *)"number", __pyx_getprop_5pysam_7libcbcf_15VariantMetadata_number, 0, (char *)PyDoc_STR("metadata number (i.e. cardinality)"), 0},
94129 {(char *)"type", __pyx_getprop_5pysam_7libcbcf_15VariantMetadata_type, 0, (char *)PyDoc_STR("metadata value type"), 0},
94130 {(char *)"description", __pyx_getprop_5pysam_7libcbcf_15VariantMetadata_description, 0, (char *)PyDoc_STR("metadata description (or None if not set)"), 0},
94131 {(char *)"record", __pyx_getprop_5pysam_7libcbcf_15VariantMetadata_record, 0, (char *)PyDoc_STR(":class:`VariantHeaderRecord` associated with this :class:`VariantMetadata` object"), 0},
94132 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_15VariantMetadata_header, 0, (char *)0, 0},
94133 {0, 0, 0, 0, 0}
94134 };
94135 #if CYTHON_USE_TYPE_SPECS
94136 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantMetadata_slots[] = {
94137 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantMetadata},
94138 {Py_tp_doc, (void *)PyDoc_STR("VariantMetadata(*args, **kwargs)\nfilter, info or format metadata record from a :class:`VariantHeader` object")},
94139 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantMetadata},
94140 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantMetadata},
94141 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantMetadata},
94142 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantMetadata},
94143 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_15VariantMetadata_1__init__},
94144 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantMetadata},
94145 {0, 0},
94146 };
94147 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantMetadata_spec = {
94148 "pysam.libcbcf.VariantMetadata",
94149 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata),
94150 0,
94151 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
94152 __pyx_type_5pysam_7libcbcf_VariantMetadata_slots,
94153 };
94154 #else
94155
94156 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantMetadata = {
94157 PyVarObject_HEAD_INIT(0, 0)
94158 "pysam.libcbcf.""VariantMetadata", /*tp_name*/
94159 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantMetadata), /*tp_basicsize*/
94160 0, /*tp_itemsize*/
94161 __pyx_tp_dealloc_5pysam_7libcbcf_VariantMetadata, /*tp_dealloc*/
94162 #if PY_VERSION_HEX < 0x030800b4
94163 0, /*tp_print*/
94164 #endif
94165 #if PY_VERSION_HEX >= 0x030800b4
94166 0, /*tp_vectorcall_offset*/
94167 #endif
94168 0, /*tp_getattr*/
94169 0, /*tp_setattr*/
94170 #if PY_MAJOR_VERSION < 3
94171 0, /*tp_compare*/
94172 #endif
94173 #if PY_MAJOR_VERSION >= 3
94174 0, /*tp_as_async*/
94175 #endif
94176 0, /*tp_repr*/
94177 0, /*tp_as_number*/
94178 0, /*tp_as_sequence*/
94179 0, /*tp_as_mapping*/
94180 0, /*tp_hash*/
94181 0, /*tp_call*/
94182 0, /*tp_str*/
94183 0, /*tp_getattro*/
94184 0, /*tp_setattro*/
94185 0, /*tp_as_buffer*/
94186 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
94187 PyDoc_STR("VariantMetadata(*args, **kwargs)\nfilter, info or format metadata record from a :class:`VariantHeader` object"), /*tp_doc*/
94188 __pyx_tp_traverse_5pysam_7libcbcf_VariantMetadata, /*tp_traverse*/
94189 __pyx_tp_clear_5pysam_7libcbcf_VariantMetadata, /*tp_clear*/
94190 0, /*tp_richcompare*/
94191 0, /*tp_weaklistoffset*/
94192 0, /*tp_iter*/
94193 0, /*tp_iternext*/
94194 __pyx_methods_5pysam_7libcbcf_VariantMetadata, /*tp_methods*/
94195 0, /*tp_members*/
94196 __pyx_getsets_5pysam_7libcbcf_VariantMetadata, /*tp_getset*/
94197 0, /*tp_base*/
94198 0, /*tp_dict*/
94199 0, /*tp_descr_get*/
94200 0, /*tp_descr_set*/
94201 #if !CYTHON_USE_TYPE_SPECS
94202 0, /*tp_dictoffset*/
94203 #endif
94204 __pyx_pw_5pysam_7libcbcf_15VariantMetadata_1__init__, /*tp_init*/
94205 0, /*tp_alloc*/
94206 __pyx_tp_new_5pysam_7libcbcf_VariantMetadata, /*tp_new*/
94207 0, /*tp_free*/
94208 0, /*tp_is_gc*/
94209 0, /*tp_bases*/
94210 0, /*tp_mro*/
94211 0, /*tp_cache*/
94212 0, /*tp_subclasses*/
94213 0, /*tp_weaklist*/
94214 0, /*tp_del*/
94215 0, /*tp_version_tag*/
94216 #if PY_VERSION_HEX >= 0x030400a1
94217 #if CYTHON_USE_TP_FINALIZE
94218 0, /*tp_finalize*/
94219 #else
94220 NULL, /*tp_finalize*/
94221 #endif
94222 #endif
94223 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
94224 0, /*tp_vectorcall*/
94225 #endif
94226 #if __PYX_NEED_TP_PRINT_SLOT == 1
94227 0, /*tp_print*/
94228 #endif
94229 #if PY_VERSION_HEX >= 0x030C0000
94230 0, /*tp_watched*/
94231 #endif
94232 #if PY_VERSION_HEX >= 0x030d00A4
94233 0, /*tp_versions_used*/
94234 #endif
94235 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
94236 0, /*tp_pypy_flags*/
94237 #endif
94238 };
94239 #endif
94240
94241 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantHeaderMetadata(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
94242 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *p;
94243 PyObject *o;
94244 #if CYTHON_COMPILING_IN_LIMITED_API
94245 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
94246 o = alloc_func(t, 0);
94247 #else
94248 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
94249 o = (*t->tp_alloc)(t, 0);
94250 } else {
94251 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
94252 }
94253 if (unlikely(!o)) return 0;
94254 #endif
94255 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)o);
94256 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
94257 return o;
94258 }
94259
94260 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderMetadata(PyObject *o) {
94261 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)o;
94262 #if CYTHON_USE_TP_FINALIZE
94263 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
94264 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderMetadata) {
94265 if (PyObject_CallFinalizerFromDealloc(o)) return;
94266 }
94267 }
94268 #endif
94269 PyObject_GC_UnTrack(o);
94270 Py_CLEAR(p->header);
94271 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
94272 (*Py_TYPE(o)->tp_free)(o);
94273 #else
94274 {
94275 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
94276 if (tp_free) tp_free(o);
94277 }
94278 #endif
94279 }
94280
94281 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderMetadata(PyObject *o, visitproc v, void *a) {
94282 int e;
94283 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)o;
94284 if (p->header) {
94285 e = (*v)(((PyObject *)p->header), a); if (e) return e;
94286 }
94287 return 0;
94288 }
94289
94290 static int __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderMetadata(PyObject *o) {
94291 PyObject* tmp;
94292 struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *p = (struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata *)o;
94293 tmp = ((PyObject*)p->header);
94294 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
94295 Py_XDECREF(tmp);
94296 return 0;
94297 }
94298 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantHeaderMetadata(PyObject *o, Py_ssize_t i) {
94299 PyObject *r;
94300 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
94301 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
94302 Py_DECREF(x);
94303 return r;
94304 }
94305
94306 static PyObject *__pyx_getprop_5pysam_7libcbcf_21VariantHeaderMetadata_header(PyObject *o, CYTHON_UNUSED void *x) {
94307 return __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_6header_1__get__(o);
94308 }
94309
94310 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantHeaderMetadata[] = {
94311 {"add", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_3add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_2add},
94312 {"remove_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_11remove_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_10remove_header},
94313 {"clear_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_13clear_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_12clear_header},
94314 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_18get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_17get},
94315 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_22iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_21iterkeys},
94316 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_24itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_23itervalues},
94317 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_27iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_26iteritems},
94318 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_30keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_29keys},
94319 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_32items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_31items},
94320 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_34values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_33values},
94321 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_36__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_35__reduce_cython__},
94322 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_38__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_21VariantHeaderMetadata_37__setstate_cython__},
94323 {0, 0, 0, 0}
94324 };
94325
94326 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantHeaderMetadata[] = {
94327 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_21VariantHeaderMetadata_header, 0, (char *)0, 0},
94328 {0, 0, 0, 0, 0}
94329 };
94330 #if CYTHON_USE_TYPE_SPECS
94331 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantHeaderMetadata_slots[] = {
94332 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderMetadata},
94333 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_7__bool__},
94334 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_5__len__},
94335 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantHeaderMetadata},
94336 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_20__contains__},
94337 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_5__len__},
94338 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_9__getitem__},
94339 {Py_tp_doc, (void *)PyDoc_STR("VariantHeaderMetadata(*args, **kwargs)\nmapping from filter, info or format name to :class:`VariantMetadata` object")},
94340 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderMetadata},
94341 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantHeaderMetadata},
94342 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_15__iter__},
94343 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantHeaderMetadata},
94344 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantHeaderMetadata},
94345 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_1__init__},
94346 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantHeaderMetadata},
94347 {0, 0},
94348 };
94349 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantHeaderMetadata_spec = {
94350 "pysam.libcbcf.VariantHeaderMetadata",
94351 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata),
94352 0,
94353 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
94354 __pyx_type_5pysam_7libcbcf_VariantHeaderMetadata_slots,
94355 };
94356 #else
94357
94358 static PyNumberMethods __pyx_tp_as_number_VariantHeaderMetadata = {
94359 0, /*nb_add*/
94360 0, /*nb_subtract*/
94361 0, /*nb_multiply*/
94362 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
94363 0, /*nb_divide*/
94364 #endif
94365 0, /*nb_remainder*/
94366 0, /*nb_divmod*/
94367 0, /*nb_power*/
94368 0, /*nb_negative*/
94369 0, /*nb_positive*/
94370 0, /*nb_absolute*/
94371 __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_7__bool__, /*nb_bool*/
94372 0, /*nb_invert*/
94373 0, /*nb_lshift*/
94374 0, /*nb_rshift*/
94375 0, /*nb_and*/
94376 0, /*nb_xor*/
94377 0, /*nb_or*/
94378 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
94379 0, /*nb_coerce*/
94380 #endif
94381 0, /*nb_int*/
94382 #if PY_MAJOR_VERSION < 3
94383 0, /*nb_long*/
94384 #else
94385 0, /*reserved*/
94386 #endif
94387 0, /*nb_float*/
94388 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
94389 0, /*nb_oct*/
94390 #endif
94391 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
94392 0, /*nb_hex*/
94393 #endif
94394 0, /*nb_inplace_add*/
94395 0, /*nb_inplace_subtract*/
94396 0, /*nb_inplace_multiply*/
94397 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
94398 0, /*nb_inplace_divide*/
94399 #endif
94400 0, /*nb_inplace_remainder*/
94401 0, /*nb_inplace_power*/
94402 0, /*nb_inplace_lshift*/
94403 0, /*nb_inplace_rshift*/
94404 0, /*nb_inplace_and*/
94405 0, /*nb_inplace_xor*/
94406 0, /*nb_inplace_or*/
94407 0, /*nb_floor_divide*/
94408 0, /*nb_true_divide*/
94409 0, /*nb_inplace_floor_divide*/
94410 0, /*nb_inplace_true_divide*/
94411 0, /*nb_index*/
94412 #if PY_VERSION_HEX >= 0x03050000
94413 0, /*nb_matrix_multiply*/
94414 #endif
94415 #if PY_VERSION_HEX >= 0x03050000
94416 0, /*nb_inplace_matrix_multiply*/
94417 #endif
94418 };
94419
94420 static PySequenceMethods __pyx_tp_as_sequence_VariantHeaderMetadata = {
94421 __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_5__len__, /*sq_length*/
94422 0, /*sq_concat*/
94423 0, /*sq_repeat*/
94424 __pyx_sq_item_5pysam_7libcbcf_VariantHeaderMetadata, /*sq_item*/
94425 0, /*sq_slice*/
94426 0, /*sq_ass_item*/
94427 0, /*sq_ass_slice*/
94428 __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_20__contains__, /*sq_contains*/
94429 0, /*sq_inplace_concat*/
94430 0, /*sq_inplace_repeat*/
94431 };
94432
94433 static PyMappingMethods __pyx_tp_as_mapping_VariantHeaderMetadata = {
94434 __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_5__len__, /*mp_length*/
94435 __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_9__getitem__, /*mp_subscript*/
94436 0, /*mp_ass_subscript*/
94437 };
94438
94439 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantHeaderMetadata = {
94440 PyVarObject_HEAD_INIT(0, 0)
94441 "pysam.libcbcf.""VariantHeaderMetadata", /*tp_name*/
94442 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantHeaderMetadata), /*tp_basicsize*/
94443 0, /*tp_itemsize*/
94444 __pyx_tp_dealloc_5pysam_7libcbcf_VariantHeaderMetadata, /*tp_dealloc*/
94445 #if PY_VERSION_HEX < 0x030800b4
94446 0, /*tp_print*/
94447 #endif
94448 #if PY_VERSION_HEX >= 0x030800b4
94449 0, /*tp_vectorcall_offset*/
94450 #endif
94451 0, /*tp_getattr*/
94452 0, /*tp_setattr*/
94453 #if PY_MAJOR_VERSION < 3
94454 0, /*tp_compare*/
94455 #endif
94456 #if PY_MAJOR_VERSION >= 3
94457 0, /*tp_as_async*/
94458 #endif
94459 0, /*tp_repr*/
94460 &__pyx_tp_as_number_VariantHeaderMetadata, /*tp_as_number*/
94461 &__pyx_tp_as_sequence_VariantHeaderMetadata, /*tp_as_sequence*/
94462 &__pyx_tp_as_mapping_VariantHeaderMetadata, /*tp_as_mapping*/
94463 0, /*tp_hash*/
94464 0, /*tp_call*/
94465 0, /*tp_str*/
94466 0, /*tp_getattro*/
94467 0, /*tp_setattro*/
94468 0, /*tp_as_buffer*/
94469 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
94470 PyDoc_STR("VariantHeaderMetadata(*args, **kwargs)\nmapping from filter, info or format name to :class:`VariantMetadata` object"), /*tp_doc*/
94471 __pyx_tp_traverse_5pysam_7libcbcf_VariantHeaderMetadata, /*tp_traverse*/
94472 __pyx_tp_clear_5pysam_7libcbcf_VariantHeaderMetadata, /*tp_clear*/
94473 0, /*tp_richcompare*/
94474 0, /*tp_weaklistoffset*/
94475 __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_15__iter__, /*tp_iter*/
94476 0, /*tp_iternext*/
94477 __pyx_methods_5pysam_7libcbcf_VariantHeaderMetadata, /*tp_methods*/
94478 0, /*tp_members*/
94479 __pyx_getsets_5pysam_7libcbcf_VariantHeaderMetadata, /*tp_getset*/
94480 0, /*tp_base*/
94481 0, /*tp_dict*/
94482 0, /*tp_descr_get*/
94483 0, /*tp_descr_set*/
94484 #if !CYTHON_USE_TYPE_SPECS
94485 0, /*tp_dictoffset*/
94486 #endif
94487 __pyx_pw_5pysam_7libcbcf_21VariantHeaderMetadata_1__init__, /*tp_init*/
94488 0, /*tp_alloc*/
94489 __pyx_tp_new_5pysam_7libcbcf_VariantHeaderMetadata, /*tp_new*/
94490 0, /*tp_free*/
94491 0, /*tp_is_gc*/
94492 0, /*tp_bases*/
94493 0, /*tp_mro*/
94494 0, /*tp_cache*/
94495 0, /*tp_subclasses*/
94496 0, /*tp_weaklist*/
94497 0, /*tp_del*/
94498 0, /*tp_version_tag*/
94499 #if PY_VERSION_HEX >= 0x030400a1
94500 #if CYTHON_USE_TP_FINALIZE
94501 0, /*tp_finalize*/
94502 #else
94503 NULL, /*tp_finalize*/
94504 #endif
94505 #endif
94506 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
94507 0, /*tp_vectorcall*/
94508 #endif
94509 #if __PYX_NEED_TP_PRINT_SLOT == 1
94510 0, /*tp_print*/
94511 #endif
94512 #if PY_VERSION_HEX >= 0x030C0000
94513 0, /*tp_watched*/
94514 #endif
94515 #if PY_VERSION_HEX >= 0x030d00A4
94516 0, /*tp_versions_used*/
94517 #endif
94518 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
94519 0, /*tp_pypy_flags*/
94520 #endif
94521 };
94522 #endif
94523
94524 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecord(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
94525 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *p;
94526 PyObject *o;
94527 #if CYTHON_COMPILING_IN_LIMITED_API
94528 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
94529 o = alloc_func(t, 0);
94530 #else
94531 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
94532 o = (*t->tp_alloc)(t, 0);
94533 } else {
94534 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
94535 }
94536 if (unlikely(!o)) return 0;
94537 #endif
94538 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)o);
94539 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
94540 return o;
94541 }
94542
94543 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecord(PyObject *o) {
94544 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)o;
94545 #if CYTHON_USE_TP_FINALIZE
94546 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
94547 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecord) {
94548 if (PyObject_CallFinalizerFromDealloc(o)) return;
94549 }
94550 }
94551 #endif
94552 PyObject_GC_UnTrack(o);
94553 {
94554 PyObject *etype, *eval, *etb;
94555 PyErr_Fetch(&etype, &eval, &etb);
94556 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
94557 __pyx_pw_5pysam_7libcbcf_13VariantRecord_3__dealloc__(o);
94558 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
94559 PyErr_Restore(etype, eval, etb);
94560 }
94561 Py_CLEAR(p->header);
94562 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
94563 (*Py_TYPE(o)->tp_free)(o);
94564 #else
94565 {
94566 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
94567 if (tp_free) tp_free(o);
94568 }
94569 #endif
94570 }
94571
94572 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantRecord(PyObject *o, visitproc v, void *a) {
94573 int e;
94574 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)o;
94575 if (p->header) {
94576 e = (*v)(((PyObject *)p->header), a); if (e) return e;
94577 }
94578 return 0;
94579 }
94580
94581 static int __pyx_tp_clear_5pysam_7libcbcf_VariantRecord(PyObject *o) {
94582 PyObject* tmp;
94583 struct __pyx_obj_5pysam_7libcbcf_VariantRecord *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)o;
94584 tmp = ((PyObject*)p->header);
94585 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
94586 Py_XDECREF(tmp);
94587 return 0;
94588 }
94589
94590 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_rid(PyObject *o, CYTHON_UNUSED void *x) {
94591 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_3rid_1__get__(o);
94592 }
94593
94594 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_rid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94595 if (v) {
94596 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_3rid_3__set__(o, v);
94597 }
94598 else {
94599 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94600 return -1;
94601 }
94602 }
94603
94604 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_chrom(PyObject *o, CYTHON_UNUSED void *x) {
94605 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_5chrom_1__get__(o);
94606 }
94607
94608 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_chrom(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94609 if (v) {
94610 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_5chrom_3__set__(o, v);
94611 }
94612 else {
94613 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94614 return -1;
94615 }
94616 }
94617
94618 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_contig(PyObject *o, CYTHON_UNUSED void *x) {
94619 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_6contig_1__get__(o);
94620 }
94621
94622 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_contig(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94623 if (v) {
94624 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_6contig_3__set__(o, v);
94625 }
94626 else {
94627 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94628 return -1;
94629 }
94630 }
94631
94632 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_pos(PyObject *o, CYTHON_UNUSED void *x) {
94633 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_3pos_1__get__(o);
94634 }
94635
94636 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94637 if (v) {
94638 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_3pos_3__set__(o, v);
94639 }
94640 else {
94641 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94642 return -1;
94643 }
94644 }
94645
94646 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_start(PyObject *o, CYTHON_UNUSED void *x) {
94647 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_5start_1__get__(o);
94648 }
94649
94650 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_start(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94651 if (v) {
94652 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_5start_3__set__(o, v);
94653 }
94654 else {
94655 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94656 return -1;
94657 }
94658 }
94659
94660 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_stop(PyObject *o, CYTHON_UNUSED void *x) {
94661 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4stop_1__get__(o);
94662 }
94663
94664 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_stop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94665 if (v) {
94666 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4stop_3__set__(o, v);
94667 }
94668 else {
94669 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94670 return -1;
94671 }
94672 }
94673
94674 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_rlen(PyObject *o, CYTHON_UNUSED void *x) {
94675 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4rlen_1__get__(o);
94676 }
94677
94678 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_rlen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94679 if (v) {
94680 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4rlen_3__set__(o, v);
94681 }
94682 else {
94683 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94684 return -1;
94685 }
94686 }
94687
94688 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_qual(PyObject *o, CYTHON_UNUSED void *x) {
94689 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4qual_1__get__(o);
94690 }
94691
94692 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_qual(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94693 if (v) {
94694 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4qual_3__set__(o, v);
94695 }
94696 else {
94697 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94698 return -1;
94699 }
94700 }
94701
94702 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_id(PyObject *o, CYTHON_UNUSED void *x) {
94703 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_2id_1__get__(o);
94704 }
94705
94706 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94707 if (v) {
94708 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_2id_3__set__(o, v);
94709 }
94710 else {
94711 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94712 return -1;
94713 }
94714 }
94715
94716 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_ref(PyObject *o, CYTHON_UNUSED void *x) {
94717 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_3ref_1__get__(o);
94718 }
94719
94720 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94721 if (v) {
94722 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_3ref_3__set__(o, v);
94723 }
94724 else {
94725 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94726 return -1;
94727 }
94728 }
94729
94730 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_alleles(PyObject *o, CYTHON_UNUSED void *x) {
94731 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_7alleles_1__get__(o);
94732 }
94733
94734 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_alleles(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94735 if (v) {
94736 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_7alleles_3__set__(o, v);
94737 }
94738 else {
94739 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94740 return -1;
94741 }
94742 }
94743
94744 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_alts(PyObject *o, CYTHON_UNUSED void *x) {
94745 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4alts_1__get__(o);
94746 }
94747
94748 static int __pyx_setprop_5pysam_7libcbcf_13VariantRecord_alts(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
94749 if (v) {
94750 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4alts_3__set__(o, v);
94751 }
94752 else {
94753 PyErr_SetString(PyExc_NotImplementedError, "__del__");
94754 return -1;
94755 }
94756 }
94757
94758 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_filter(PyObject *o, CYTHON_UNUSED void *x) {
94759 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_6filter_1__get__(o);
94760 }
94761
94762 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_info(PyObject *o, CYTHON_UNUSED void *x) {
94763 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_4info_1__get__(o);
94764 }
94765
94766 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_format(PyObject *o, CYTHON_UNUSED void *x) {
94767 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_6format_1__get__(o);
94768 }
94769
94770 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_samples(PyObject *o, CYTHON_UNUSED void *x) {
94771 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_7samples_1__get__(o);
94772 }
94773
94774 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_alleles_variant_types(PyObject *o, CYTHON_UNUSED void *x) {
94775 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_21alleles_variant_types_1__get__(o);
94776 }
94777
94778 static PyObject *__pyx_getprop_5pysam_7libcbcf_13VariantRecord_header(PyObject *o, CYTHON_UNUSED void *x) {
94779 return __pyx_pw_5pysam_7libcbcf_13VariantRecord_6header_1__get__(o);
94780 }
94781
94782 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantRecord[] = {
94783 {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantRecord_5copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantRecord_4copy},
94784 {"translate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantRecord_7translate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantRecord_6translate},
94785 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantRecord_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantRecord_12__reduce_cython__},
94786 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13VariantRecord_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13VariantRecord_14__setstate_cython__},
94787 {0, 0, 0, 0}
94788 };
94789
94790 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantRecord[] = {
94791 {(char *)"rid", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_rid, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_rid, (char *)PyDoc_STR("internal reference id number"), 0},
94792 {(char *)"chrom", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_chrom, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_chrom, (char *)PyDoc_STR("chromosome/contig name"), 0},
94793 {(char *)"contig", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_contig, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_contig, (char *)PyDoc_STR("chromosome/contig name"), 0},
94794 {(char *)"pos", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_pos, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_pos, (char *)PyDoc_STR("record start position on chrom/contig (1-based inclusive)"), 0},
94795 {(char *)"start", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_start, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_start, (char *)PyDoc_STR("record start position on chrom/contig (0-based inclusive)"), 0},
94796 {(char *)"stop", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_stop, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_stop, (char *)PyDoc_STR("record stop position on chrom/contig (0-based exclusive)"), 0},
94797 {(char *)"rlen", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_rlen, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_rlen, (char *)PyDoc_STR("record length on chrom/contig (aka rec.stop - rec.start)"), 0},
94798 {(char *)"qual", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_qual, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_qual, (char *)PyDoc_STR("phred scaled quality score or None if not available"), 0},
94799 {(char *)"id", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_id, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_id, (char *)PyDoc_STR("record identifier or None if not available"), 0},
94800 {(char *)"ref", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_ref, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_ref, (char *)PyDoc_STR("reference allele"), 0},
94801 {(char *)"alleles", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_alleles, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_alleles, (char *)PyDoc_STR("tuple of reference allele followed by alt alleles"), 0},
94802 {(char *)"alts", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_alts, __pyx_setprop_5pysam_7libcbcf_13VariantRecord_alts, (char *)PyDoc_STR("tuple of alt alleles"), 0},
94803 {(char *)"filter", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_filter, 0, (char *)PyDoc_STR("filter information (see :class:`VariantRecordFilter`)"), 0},
94804 {(char *)"info", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_info, 0, (char *)PyDoc_STR("info data (see :class:`VariantRecordInfo`)"), 0},
94805 {(char *)"format", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_format, 0, (char *)PyDoc_STR("sample format metadata (see :class:`VariantRecordFormat`)"), 0},
94806 {(char *)"samples", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_samples, 0, (char *)PyDoc_STR("sample data (see :class:`VariantRecordSamples`)"), 0},
94807 {(char *)"alleles_variant_types", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_alleles_variant_types, 0, (char *)0, 0},
94808 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_13VariantRecord_header, 0, (char *)0, 0},
94809 {0, 0, 0, 0, 0}
94810 };
94811 #if CYTHON_USE_TYPE_SPECS
94812 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantRecord_slots[] = {
94813 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantRecord},
94814 {Py_tp_str, (void *)__pyx_pw_5pysam_7libcbcf_13VariantRecord_11__str__},
94815 {Py_tp_doc, (void *)PyDoc_STR("VariantRecord(*args, **kwargs)\nVariant record")},
94816 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantRecord},
94817 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantRecord},
94818 {Py_tp_richcompare, (void *)__pyx_pw_5pysam_7libcbcf_13VariantRecord_9__richcmp__},
94819 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantRecord},
94820 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantRecord},
94821 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_13VariantRecord_1__init__},
94822 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantRecord},
94823 {0, 0},
94824 };
94825 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantRecord_spec = {
94826 "pysam.libcbcf.VariantRecord",
94827 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecord),
94828 0,
94829 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
94830 __pyx_type_5pysam_7libcbcf_VariantRecord_slots,
94831 };
94832 #else
94833
94834 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantRecord = {
94835 PyVarObject_HEAD_INIT(0, 0)
94836 "pysam.libcbcf.""VariantRecord", /*tp_name*/
94837 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecord), /*tp_basicsize*/
94838 0, /*tp_itemsize*/
94839 __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecord, /*tp_dealloc*/
94840 #if PY_VERSION_HEX < 0x030800b4
94841 0, /*tp_print*/
94842 #endif
94843 #if PY_VERSION_HEX >= 0x030800b4
94844 0, /*tp_vectorcall_offset*/
94845 #endif
94846 0, /*tp_getattr*/
94847 0, /*tp_setattr*/
94848 #if PY_MAJOR_VERSION < 3
94849 0, /*tp_compare*/
94850 #endif
94851 #if PY_MAJOR_VERSION >= 3
94852 0, /*tp_as_async*/
94853 #endif
94854 0, /*tp_repr*/
94855 0, /*tp_as_number*/
94856 0, /*tp_as_sequence*/
94857 0, /*tp_as_mapping*/
94858 0, /*tp_hash*/
94859 0, /*tp_call*/
94860 __pyx_pw_5pysam_7libcbcf_13VariantRecord_11__str__, /*tp_str*/
94861 0, /*tp_getattro*/
94862 0, /*tp_setattro*/
94863 0, /*tp_as_buffer*/
94864 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
94865 PyDoc_STR("VariantRecord(*args, **kwargs)\nVariant record"), /*tp_doc*/
94866 __pyx_tp_traverse_5pysam_7libcbcf_VariantRecord, /*tp_traverse*/
94867 __pyx_tp_clear_5pysam_7libcbcf_VariantRecord, /*tp_clear*/
94868 __pyx_pw_5pysam_7libcbcf_13VariantRecord_9__richcmp__, /*tp_richcompare*/
94869 0, /*tp_weaklistoffset*/
94870 0, /*tp_iter*/
94871 0, /*tp_iternext*/
94872 __pyx_methods_5pysam_7libcbcf_VariantRecord, /*tp_methods*/
94873 0, /*tp_members*/
94874 __pyx_getsets_5pysam_7libcbcf_VariantRecord, /*tp_getset*/
94875 0, /*tp_base*/
94876 0, /*tp_dict*/
94877 0, /*tp_descr_get*/
94878 0, /*tp_descr_set*/
94879 #if !CYTHON_USE_TYPE_SPECS
94880 0, /*tp_dictoffset*/
94881 #endif
94882 __pyx_pw_5pysam_7libcbcf_13VariantRecord_1__init__, /*tp_init*/
94883 0, /*tp_alloc*/
94884 __pyx_tp_new_5pysam_7libcbcf_VariantRecord, /*tp_new*/
94885 0, /*tp_free*/
94886 0, /*tp_is_gc*/
94887 0, /*tp_bases*/
94888 0, /*tp_mro*/
94889 0, /*tp_cache*/
94890 0, /*tp_subclasses*/
94891 0, /*tp_weaklist*/
94892 0, /*tp_del*/
94893 0, /*tp_version_tag*/
94894 #if PY_VERSION_HEX >= 0x030400a1
94895 #if CYTHON_USE_TP_FINALIZE
94896 0, /*tp_finalize*/
94897 #else
94898 NULL, /*tp_finalize*/
94899 #endif
94900 #endif
94901 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
94902 0, /*tp_vectorcall*/
94903 #endif
94904 #if __PYX_NEED_TP_PRINT_SLOT == 1
94905 0, /*tp_print*/
94906 #endif
94907 #if PY_VERSION_HEX >= 0x030C0000
94908 0, /*tp_watched*/
94909 #endif
94910 #if PY_VERSION_HEX >= 0x030d00A4
94911 0, /*tp_versions_used*/
94912 #endif
94913 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
94914 0, /*tp_pypy_flags*/
94915 #endif
94916 };
94917 #endif
94918
94919 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordFilter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
94920 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *p;
94921 PyObject *o;
94922 #if CYTHON_COMPILING_IN_LIMITED_API
94923 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
94924 o = alloc_func(t, 0);
94925 #else
94926 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
94927 o = (*t->tp_alloc)(t, 0);
94928 } else {
94929 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
94930 }
94931 if (unlikely(!o)) return 0;
94932 #endif
94933 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)o);
94934 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
94935 return o;
94936 }
94937
94938 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordFilter(PyObject *o) {
94939 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)o;
94940 #if CYTHON_USE_TP_FINALIZE
94941 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
94942 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordFilter) {
94943 if (PyObject_CallFinalizerFromDealloc(o)) return;
94944 }
94945 }
94946 #endif
94947 PyObject_GC_UnTrack(o);
94948 Py_CLEAR(p->record);
94949 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
94950 (*Py_TYPE(o)->tp_free)(o);
94951 #else
94952 {
94953 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
94954 if (tp_free) tp_free(o);
94955 }
94956 #endif
94957 }
94958
94959 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordFilter(PyObject *o, visitproc v, void *a) {
94960 int e;
94961 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)o;
94962 if (p->record) {
94963 e = (*v)(((PyObject *)p->record), a); if (e) return e;
94964 }
94965 return 0;
94966 }
94967
94968 static int __pyx_tp_clear_5pysam_7libcbcf_VariantRecordFilter(PyObject *o) {
94969 PyObject* tmp;
94970 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter *)o;
94971 tmp = ((PyObject*)p->record);
94972 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
94973 Py_XDECREF(tmp);
94974 return 0;
94975 }
94976 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantRecordFilter(PyObject *o, Py_ssize_t i) {
94977 PyObject *r;
94978 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
94979 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
94980 Py_DECREF(x);
94981 return r;
94982 }
94983
94984 static int __pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordFilter(PyObject *o, PyObject *i, PyObject *v) {
94985 if (v) {
94986 __Pyx_TypeName o_type_name;
94987 o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
94988 PyErr_Format(PyExc_NotImplementedError,
94989 "Subscript assignment not supported by " __Pyx_FMT_TYPENAME, o_type_name);
94990 __Pyx_DECREF_TypeName(o_type_name);
94991 return -1;
94992 }
94993 else {
94994 return __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_11__delitem__(o, i);
94995 }
94996 }
94997
94998 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantRecordFilter[] = {
94999 {"add", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_9add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_8add},
95000 {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_13clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_12clear},
95001 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_18get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_17get},
95002 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_22iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_21iterkeys},
95003 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_24itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_23itervalues},
95004 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_27iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_26iteritems},
95005 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_30keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_29keys},
95006 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_32items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_31items},
95007 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_34values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_33values},
95008 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_38__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_37__reduce_cython__},
95009 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_40__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFilter_39__setstate_cython__},
95010 {0, 0, 0, 0}
95011 };
95012 #if CYTHON_USE_TYPE_SPECS
95013 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantRecordFilter_slots[] = {
95014 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordFilter},
95015 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_5__bool__},
95016 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_3__len__},
95017 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantRecordFilter},
95018 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_20__contains__},
95019 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_3__len__},
95020 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_7__getitem__},
95021 {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordFilter},
95022 {Py_tp_doc, (void *)PyDoc_STR("VariantRecordFilter(*args, **kwargs)\nFilters set on a :class:`VariantRecord` object, presented as a mapping from\n filter index or name to :class:`VariantMetadata` object")},
95023 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantRecordFilter},
95024 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantRecordFilter},
95025 {Py_tp_richcompare, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_36__richcmp__},
95026 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_15__iter__},
95027 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantRecordFilter},
95028 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_1__init__},
95029 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordFilter},
95030 {0, 0},
95031 };
95032 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantRecordFilter_spec = {
95033 "pysam.libcbcf.VariantRecordFilter",
95034 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter),
95035 0,
95036 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
95037 __pyx_type_5pysam_7libcbcf_VariantRecordFilter_slots,
95038 };
95039 #else
95040
95041 static PyNumberMethods __pyx_tp_as_number_VariantRecordFilter = {
95042 0, /*nb_add*/
95043 0, /*nb_subtract*/
95044 0, /*nb_multiply*/
95045 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95046 0, /*nb_divide*/
95047 #endif
95048 0, /*nb_remainder*/
95049 0, /*nb_divmod*/
95050 0, /*nb_power*/
95051 0, /*nb_negative*/
95052 0, /*nb_positive*/
95053 0, /*nb_absolute*/
95054 __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_5__bool__, /*nb_bool*/
95055 0, /*nb_invert*/
95056 0, /*nb_lshift*/
95057 0, /*nb_rshift*/
95058 0, /*nb_and*/
95059 0, /*nb_xor*/
95060 0, /*nb_or*/
95061 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95062 0, /*nb_coerce*/
95063 #endif
95064 0, /*nb_int*/
95065 #if PY_MAJOR_VERSION < 3
95066 0, /*nb_long*/
95067 #else
95068 0, /*reserved*/
95069 #endif
95070 0, /*nb_float*/
95071 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95072 0, /*nb_oct*/
95073 #endif
95074 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95075 0, /*nb_hex*/
95076 #endif
95077 0, /*nb_inplace_add*/
95078 0, /*nb_inplace_subtract*/
95079 0, /*nb_inplace_multiply*/
95080 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95081 0, /*nb_inplace_divide*/
95082 #endif
95083 0, /*nb_inplace_remainder*/
95084 0, /*nb_inplace_power*/
95085 0, /*nb_inplace_lshift*/
95086 0, /*nb_inplace_rshift*/
95087 0, /*nb_inplace_and*/
95088 0, /*nb_inplace_xor*/
95089 0, /*nb_inplace_or*/
95090 0, /*nb_floor_divide*/
95091 0, /*nb_true_divide*/
95092 0, /*nb_inplace_floor_divide*/
95093 0, /*nb_inplace_true_divide*/
95094 0, /*nb_index*/
95095 #if PY_VERSION_HEX >= 0x03050000
95096 0, /*nb_matrix_multiply*/
95097 #endif
95098 #if PY_VERSION_HEX >= 0x03050000
95099 0, /*nb_inplace_matrix_multiply*/
95100 #endif
95101 };
95102
95103 static PySequenceMethods __pyx_tp_as_sequence_VariantRecordFilter = {
95104 __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_3__len__, /*sq_length*/
95105 0, /*sq_concat*/
95106 0, /*sq_repeat*/
95107 __pyx_sq_item_5pysam_7libcbcf_VariantRecordFilter, /*sq_item*/
95108 0, /*sq_slice*/
95109 0, /*sq_ass_item*/
95110 0, /*sq_ass_slice*/
95111 __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_20__contains__, /*sq_contains*/
95112 0, /*sq_inplace_concat*/
95113 0, /*sq_inplace_repeat*/
95114 };
95115
95116 static PyMappingMethods __pyx_tp_as_mapping_VariantRecordFilter = {
95117 __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_3__len__, /*mp_length*/
95118 __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_7__getitem__, /*mp_subscript*/
95119 __pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordFilter, /*mp_ass_subscript*/
95120 };
95121
95122 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantRecordFilter = {
95123 PyVarObject_HEAD_INIT(0, 0)
95124 "pysam.libcbcf.""VariantRecordFilter", /*tp_name*/
95125 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFilter), /*tp_basicsize*/
95126 0, /*tp_itemsize*/
95127 __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordFilter, /*tp_dealloc*/
95128 #if PY_VERSION_HEX < 0x030800b4
95129 0, /*tp_print*/
95130 #endif
95131 #if PY_VERSION_HEX >= 0x030800b4
95132 0, /*tp_vectorcall_offset*/
95133 #endif
95134 0, /*tp_getattr*/
95135 0, /*tp_setattr*/
95136 #if PY_MAJOR_VERSION < 3
95137 0, /*tp_compare*/
95138 #endif
95139 #if PY_MAJOR_VERSION >= 3
95140 0, /*tp_as_async*/
95141 #endif
95142 0, /*tp_repr*/
95143 &__pyx_tp_as_number_VariantRecordFilter, /*tp_as_number*/
95144 &__pyx_tp_as_sequence_VariantRecordFilter, /*tp_as_sequence*/
95145 &__pyx_tp_as_mapping_VariantRecordFilter, /*tp_as_mapping*/
95146 0, /*tp_hash*/
95147 0, /*tp_call*/
95148 0, /*tp_str*/
95149 0, /*tp_getattro*/
95150 0, /*tp_setattro*/
95151 0, /*tp_as_buffer*/
95152 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
95153 PyDoc_STR("VariantRecordFilter(*args, **kwargs)\nFilters set on a :class:`VariantRecord` object, presented as a mapping from\n filter index or name to :class:`VariantMetadata` object"), /*tp_doc*/
95154 __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordFilter, /*tp_traverse*/
95155 __pyx_tp_clear_5pysam_7libcbcf_VariantRecordFilter, /*tp_clear*/
95156 __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_36__richcmp__, /*tp_richcompare*/
95157 0, /*tp_weaklistoffset*/
95158 __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_15__iter__, /*tp_iter*/
95159 0, /*tp_iternext*/
95160 __pyx_methods_5pysam_7libcbcf_VariantRecordFilter, /*tp_methods*/
95161 0, /*tp_members*/
95162 0, /*tp_getset*/
95163 0, /*tp_base*/
95164 0, /*tp_dict*/
95165 0, /*tp_descr_get*/
95166 0, /*tp_descr_set*/
95167 #if !CYTHON_USE_TYPE_SPECS
95168 0, /*tp_dictoffset*/
95169 #endif
95170 __pyx_pw_5pysam_7libcbcf_19VariantRecordFilter_1__init__, /*tp_init*/
95171 0, /*tp_alloc*/
95172 __pyx_tp_new_5pysam_7libcbcf_VariantRecordFilter, /*tp_new*/
95173 0, /*tp_free*/
95174 0, /*tp_is_gc*/
95175 0, /*tp_bases*/
95176 0, /*tp_mro*/
95177 0, /*tp_cache*/
95178 0, /*tp_subclasses*/
95179 0, /*tp_weaklist*/
95180 0, /*tp_del*/
95181 0, /*tp_version_tag*/
95182 #if PY_VERSION_HEX >= 0x030400a1
95183 #if CYTHON_USE_TP_FINALIZE
95184 0, /*tp_finalize*/
95185 #else
95186 NULL, /*tp_finalize*/
95187 #endif
95188 #endif
95189 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
95190 0, /*tp_vectorcall*/
95191 #endif
95192 #if __PYX_NEED_TP_PRINT_SLOT == 1
95193 0, /*tp_print*/
95194 #endif
95195 #if PY_VERSION_HEX >= 0x030C0000
95196 0, /*tp_watched*/
95197 #endif
95198 #if PY_VERSION_HEX >= 0x030d00A4
95199 0, /*tp_versions_used*/
95200 #endif
95201 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
95202 0, /*tp_pypy_flags*/
95203 #endif
95204 };
95205 #endif
95206
95207 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordFormat(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
95208 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *p;
95209 PyObject *o;
95210 #if CYTHON_COMPILING_IN_LIMITED_API
95211 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
95212 o = alloc_func(t, 0);
95213 #else
95214 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
95215 o = (*t->tp_alloc)(t, 0);
95216 } else {
95217 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
95218 }
95219 if (unlikely(!o)) return 0;
95220 #endif
95221 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)o);
95222 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
95223 return o;
95224 }
95225
95226 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordFormat(PyObject *o) {
95227 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)o;
95228 #if CYTHON_USE_TP_FINALIZE
95229 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
95230 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordFormat) {
95231 if (PyObject_CallFinalizerFromDealloc(o)) return;
95232 }
95233 }
95234 #endif
95235 PyObject_GC_UnTrack(o);
95236 Py_CLEAR(p->record);
95237 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
95238 (*Py_TYPE(o)->tp_free)(o);
95239 #else
95240 {
95241 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
95242 if (tp_free) tp_free(o);
95243 }
95244 #endif
95245 }
95246
95247 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordFormat(PyObject *o, visitproc v, void *a) {
95248 int e;
95249 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)o;
95250 if (p->record) {
95251 e = (*v)(((PyObject *)p->record), a); if (e) return e;
95252 }
95253 return 0;
95254 }
95255
95256 static int __pyx_tp_clear_5pysam_7libcbcf_VariantRecordFormat(PyObject *o) {
95257 PyObject* tmp;
95258 struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat *)o;
95259 tmp = ((PyObject*)p->record);
95260 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
95261 Py_XDECREF(tmp);
95262 return 0;
95263 }
95264 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantRecordFormat(PyObject *o, Py_ssize_t i) {
95265 PyObject *r;
95266 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
95267 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
95268 Py_DECREF(x);
95269 return r;
95270 }
95271
95272 static int __pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordFormat(PyObject *o, PyObject *i, PyObject *v) {
95273 if (v) {
95274 __Pyx_TypeName o_type_name;
95275 o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
95276 PyErr_Format(PyExc_NotImplementedError,
95277 "Subscript assignment not supported by " __Pyx_FMT_TYPENAME, o_type_name);
95278 __Pyx_DECREF_TypeName(o_type_name);
95279 return -1;
95280 }
95281 else {
95282 return __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_9__delitem__(o, i);
95283 }
95284 }
95285
95286 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantRecordFormat[] = {
95287 {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_11clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_10clear},
95288 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_16get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_15get},
95289 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_20iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_19iterkeys},
95290 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_22itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_21itervalues},
95291 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_25iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_24iteritems},
95292 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_28keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_27keys},
95293 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_30items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_29items},
95294 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_32values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_31values},
95295 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_34__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_33__reduce_cython__},
95296 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_36__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordFormat_35__setstate_cython__},
95297 {0, 0, 0, 0}
95298 };
95299 #if CYTHON_USE_TYPE_SPECS
95300 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantRecordFormat_slots[] = {
95301 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordFormat},
95302 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_5__bool__},
95303 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_3__len__},
95304 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantRecordFormat},
95305 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_18__contains__},
95306 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_3__len__},
95307 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_7__getitem__},
95308 {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordFormat},
95309 {Py_tp_doc, (void *)PyDoc_STR("VariantRecordFormat(*args, **kwargs)\nFormat data present for each sample in a :class:`VariantRecord` object,\n presented as mapping from format name to :class:`VariantMetadata` object.")},
95310 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantRecordFormat},
95311 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantRecordFormat},
95312 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_13__iter__},
95313 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantRecordFormat},
95314 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_1__init__},
95315 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordFormat},
95316 {0, 0},
95317 };
95318 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantRecordFormat_spec = {
95319 "pysam.libcbcf.VariantRecordFormat",
95320 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat),
95321 0,
95322 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
95323 __pyx_type_5pysam_7libcbcf_VariantRecordFormat_slots,
95324 };
95325 #else
95326
95327 static PyNumberMethods __pyx_tp_as_number_VariantRecordFormat = {
95328 0, /*nb_add*/
95329 0, /*nb_subtract*/
95330 0, /*nb_multiply*/
95331 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95332 0, /*nb_divide*/
95333 #endif
95334 0, /*nb_remainder*/
95335 0, /*nb_divmod*/
95336 0, /*nb_power*/
95337 0, /*nb_negative*/
95338 0, /*nb_positive*/
95339 0, /*nb_absolute*/
95340 __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_5__bool__, /*nb_bool*/
95341 0, /*nb_invert*/
95342 0, /*nb_lshift*/
95343 0, /*nb_rshift*/
95344 0, /*nb_and*/
95345 0, /*nb_xor*/
95346 0, /*nb_or*/
95347 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95348 0, /*nb_coerce*/
95349 #endif
95350 0, /*nb_int*/
95351 #if PY_MAJOR_VERSION < 3
95352 0, /*nb_long*/
95353 #else
95354 0, /*reserved*/
95355 #endif
95356 0, /*nb_float*/
95357 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95358 0, /*nb_oct*/
95359 #endif
95360 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95361 0, /*nb_hex*/
95362 #endif
95363 0, /*nb_inplace_add*/
95364 0, /*nb_inplace_subtract*/
95365 0, /*nb_inplace_multiply*/
95366 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95367 0, /*nb_inplace_divide*/
95368 #endif
95369 0, /*nb_inplace_remainder*/
95370 0, /*nb_inplace_power*/
95371 0, /*nb_inplace_lshift*/
95372 0, /*nb_inplace_rshift*/
95373 0, /*nb_inplace_and*/
95374 0, /*nb_inplace_xor*/
95375 0, /*nb_inplace_or*/
95376 0, /*nb_floor_divide*/
95377 0, /*nb_true_divide*/
95378 0, /*nb_inplace_floor_divide*/
95379 0, /*nb_inplace_true_divide*/
95380 0, /*nb_index*/
95381 #if PY_VERSION_HEX >= 0x03050000
95382 0, /*nb_matrix_multiply*/
95383 #endif
95384 #if PY_VERSION_HEX >= 0x03050000
95385 0, /*nb_inplace_matrix_multiply*/
95386 #endif
95387 };
95388
95389 static PySequenceMethods __pyx_tp_as_sequence_VariantRecordFormat = {
95390 __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_3__len__, /*sq_length*/
95391 0, /*sq_concat*/
95392 0, /*sq_repeat*/
95393 __pyx_sq_item_5pysam_7libcbcf_VariantRecordFormat, /*sq_item*/
95394 0, /*sq_slice*/
95395 0, /*sq_ass_item*/
95396 0, /*sq_ass_slice*/
95397 __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_18__contains__, /*sq_contains*/
95398 0, /*sq_inplace_concat*/
95399 0, /*sq_inplace_repeat*/
95400 };
95401
95402 static PyMappingMethods __pyx_tp_as_mapping_VariantRecordFormat = {
95403 __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_3__len__, /*mp_length*/
95404 __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_7__getitem__, /*mp_subscript*/
95405 __pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordFormat, /*mp_ass_subscript*/
95406 };
95407
95408 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantRecordFormat = {
95409 PyVarObject_HEAD_INIT(0, 0)
95410 "pysam.libcbcf.""VariantRecordFormat", /*tp_name*/
95411 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordFormat), /*tp_basicsize*/
95412 0, /*tp_itemsize*/
95413 __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordFormat, /*tp_dealloc*/
95414 #if PY_VERSION_HEX < 0x030800b4
95415 0, /*tp_print*/
95416 #endif
95417 #if PY_VERSION_HEX >= 0x030800b4
95418 0, /*tp_vectorcall_offset*/
95419 #endif
95420 0, /*tp_getattr*/
95421 0, /*tp_setattr*/
95422 #if PY_MAJOR_VERSION < 3
95423 0, /*tp_compare*/
95424 #endif
95425 #if PY_MAJOR_VERSION >= 3
95426 0, /*tp_as_async*/
95427 #endif
95428 0, /*tp_repr*/
95429 &__pyx_tp_as_number_VariantRecordFormat, /*tp_as_number*/
95430 &__pyx_tp_as_sequence_VariantRecordFormat, /*tp_as_sequence*/
95431 &__pyx_tp_as_mapping_VariantRecordFormat, /*tp_as_mapping*/
95432 0, /*tp_hash*/
95433 0, /*tp_call*/
95434 0, /*tp_str*/
95435 0, /*tp_getattro*/
95436 0, /*tp_setattro*/
95437 0, /*tp_as_buffer*/
95438 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
95439 PyDoc_STR("VariantRecordFormat(*args, **kwargs)\nFormat data present for each sample in a :class:`VariantRecord` object,\n presented as mapping from format name to :class:`VariantMetadata` object."), /*tp_doc*/
95440 __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordFormat, /*tp_traverse*/
95441 __pyx_tp_clear_5pysam_7libcbcf_VariantRecordFormat, /*tp_clear*/
95442 0, /*tp_richcompare*/
95443 0, /*tp_weaklistoffset*/
95444 __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_13__iter__, /*tp_iter*/
95445 0, /*tp_iternext*/
95446 __pyx_methods_5pysam_7libcbcf_VariantRecordFormat, /*tp_methods*/
95447 0, /*tp_members*/
95448 0, /*tp_getset*/
95449 0, /*tp_base*/
95450 0, /*tp_dict*/
95451 0, /*tp_descr_get*/
95452 0, /*tp_descr_set*/
95453 #if !CYTHON_USE_TYPE_SPECS
95454 0, /*tp_dictoffset*/
95455 #endif
95456 __pyx_pw_5pysam_7libcbcf_19VariantRecordFormat_1__init__, /*tp_init*/
95457 0, /*tp_alloc*/
95458 __pyx_tp_new_5pysam_7libcbcf_VariantRecordFormat, /*tp_new*/
95459 0, /*tp_free*/
95460 0, /*tp_is_gc*/
95461 0, /*tp_bases*/
95462 0, /*tp_mro*/
95463 0, /*tp_cache*/
95464 0, /*tp_subclasses*/
95465 0, /*tp_weaklist*/
95466 0, /*tp_del*/
95467 0, /*tp_version_tag*/
95468 #if PY_VERSION_HEX >= 0x030400a1
95469 #if CYTHON_USE_TP_FINALIZE
95470 0, /*tp_finalize*/
95471 #else
95472 NULL, /*tp_finalize*/
95473 #endif
95474 #endif
95475 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
95476 0, /*tp_vectorcall*/
95477 #endif
95478 #if __PYX_NEED_TP_PRINT_SLOT == 1
95479 0, /*tp_print*/
95480 #endif
95481 #if PY_VERSION_HEX >= 0x030C0000
95482 0, /*tp_watched*/
95483 #endif
95484 #if PY_VERSION_HEX >= 0x030d00A4
95485 0, /*tp_versions_used*/
95486 #endif
95487 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
95488 0, /*tp_pypy_flags*/
95489 #endif
95490 };
95491 #endif
95492
95493 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
95494 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *p;
95495 PyObject *o;
95496 #if CYTHON_COMPILING_IN_LIMITED_API
95497 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
95498 o = alloc_func(t, 0);
95499 #else
95500 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
95501 o = (*t->tp_alloc)(t, 0);
95502 } else {
95503 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
95504 }
95505 if (unlikely(!o)) return 0;
95506 #endif
95507 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)o);
95508 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
95509 return o;
95510 }
95511
95512 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordInfo(PyObject *o) {
95513 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)o;
95514 #if CYTHON_USE_TP_FINALIZE
95515 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
95516 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordInfo) {
95517 if (PyObject_CallFinalizerFromDealloc(o)) return;
95518 }
95519 }
95520 #endif
95521 PyObject_GC_UnTrack(o);
95522 Py_CLEAR(p->record);
95523 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
95524 (*Py_TYPE(o)->tp_free)(o);
95525 #else
95526 {
95527 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
95528 if (tp_free) tp_free(o);
95529 }
95530 #endif
95531 }
95532
95533 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordInfo(PyObject *o, visitproc v, void *a) {
95534 int e;
95535 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)o;
95536 if (p->record) {
95537 e = (*v)(((PyObject *)p->record), a); if (e) return e;
95538 }
95539 return 0;
95540 }
95541
95542 static int __pyx_tp_clear_5pysam_7libcbcf_VariantRecordInfo(PyObject *o) {
95543 PyObject* tmp;
95544 struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo *)o;
95545 tmp = ((PyObject*)p->record);
95546 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
95547 Py_XDECREF(tmp);
95548 return 0;
95549 }
95550 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantRecordInfo(PyObject *o, Py_ssize_t i) {
95551 PyObject *r;
95552 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
95553 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
95554 Py_DECREF(x);
95555 return r;
95556 }
95557
95558 static int __pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordInfo(PyObject *o, PyObject *i, PyObject *v) {
95559 if (v) {
95560 return __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_9__setitem__(o, i, v);
95561 }
95562 else {
95563 return __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_11__delitem__(o, i);
95564 }
95565 }
95566
95567 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantRecordInfo[] = {
95568 {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_13clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_12clear},
95569 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_18get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_17get},
95570 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_22iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_21iterkeys},
95571 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_24itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_23itervalues},
95572 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_27iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_26iteritems},
95573 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_30keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_29keys},
95574 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_32items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_31items},
95575 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_34values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_33values},
95576 {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_36update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_35update},
95577 {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_38pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_37pop},
95578 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_42__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_41__reduce_cython__},
95579 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_44__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_17VariantRecordInfo_43__setstate_cython__},
95580 {0, 0, 0, 0}
95581 };
95582 #if CYTHON_USE_TYPE_SPECS
95583 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantRecordInfo_slots[] = {
95584 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordInfo},
95585 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_5__bool__},
95586 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_3__len__},
95587 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantRecordInfo},
95588 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_20__contains__},
95589 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_3__len__},
95590 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_7__getitem__},
95591 {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordInfo},
95592 {Py_tp_doc, (void *)PyDoc_STR("VariantRecordInfo(*args, **kwargs)\nInfo data stored in a :class:`VariantRecord` object, presented as a\n mapping from info metadata name to value.")},
95593 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantRecordInfo},
95594 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantRecordInfo},
95595 {Py_tp_richcompare, (void *)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_40__richcmp__},
95596 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_15__iter__},
95597 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantRecordInfo},
95598 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_1__init__},
95599 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordInfo},
95600 {0, 0},
95601 };
95602 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantRecordInfo_spec = {
95603 "pysam.libcbcf.VariantRecordInfo",
95604 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo),
95605 0,
95606 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
95607 __pyx_type_5pysam_7libcbcf_VariantRecordInfo_slots,
95608 };
95609 #else
95610
95611 static PyNumberMethods __pyx_tp_as_number_VariantRecordInfo = {
95612 0, /*nb_add*/
95613 0, /*nb_subtract*/
95614 0, /*nb_multiply*/
95615 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95616 0, /*nb_divide*/
95617 #endif
95618 0, /*nb_remainder*/
95619 0, /*nb_divmod*/
95620 0, /*nb_power*/
95621 0, /*nb_negative*/
95622 0, /*nb_positive*/
95623 0, /*nb_absolute*/
95624 __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_5__bool__, /*nb_bool*/
95625 0, /*nb_invert*/
95626 0, /*nb_lshift*/
95627 0, /*nb_rshift*/
95628 0, /*nb_and*/
95629 0, /*nb_xor*/
95630 0, /*nb_or*/
95631 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95632 0, /*nb_coerce*/
95633 #endif
95634 0, /*nb_int*/
95635 #if PY_MAJOR_VERSION < 3
95636 0, /*nb_long*/
95637 #else
95638 0, /*reserved*/
95639 #endif
95640 0, /*nb_float*/
95641 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95642 0, /*nb_oct*/
95643 #endif
95644 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95645 0, /*nb_hex*/
95646 #endif
95647 0, /*nb_inplace_add*/
95648 0, /*nb_inplace_subtract*/
95649 0, /*nb_inplace_multiply*/
95650 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95651 0, /*nb_inplace_divide*/
95652 #endif
95653 0, /*nb_inplace_remainder*/
95654 0, /*nb_inplace_power*/
95655 0, /*nb_inplace_lshift*/
95656 0, /*nb_inplace_rshift*/
95657 0, /*nb_inplace_and*/
95658 0, /*nb_inplace_xor*/
95659 0, /*nb_inplace_or*/
95660 0, /*nb_floor_divide*/
95661 0, /*nb_true_divide*/
95662 0, /*nb_inplace_floor_divide*/
95663 0, /*nb_inplace_true_divide*/
95664 0, /*nb_index*/
95665 #if PY_VERSION_HEX >= 0x03050000
95666 0, /*nb_matrix_multiply*/
95667 #endif
95668 #if PY_VERSION_HEX >= 0x03050000
95669 0, /*nb_inplace_matrix_multiply*/
95670 #endif
95671 };
95672
95673 static PySequenceMethods __pyx_tp_as_sequence_VariantRecordInfo = {
95674 __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_3__len__, /*sq_length*/
95675 0, /*sq_concat*/
95676 0, /*sq_repeat*/
95677 __pyx_sq_item_5pysam_7libcbcf_VariantRecordInfo, /*sq_item*/
95678 0, /*sq_slice*/
95679 0, /*sq_ass_item*/
95680 0, /*sq_ass_slice*/
95681 __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_20__contains__, /*sq_contains*/
95682 0, /*sq_inplace_concat*/
95683 0, /*sq_inplace_repeat*/
95684 };
95685
95686 static PyMappingMethods __pyx_tp_as_mapping_VariantRecordInfo = {
95687 __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_3__len__, /*mp_length*/
95688 __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_7__getitem__, /*mp_subscript*/
95689 __pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordInfo, /*mp_ass_subscript*/
95690 };
95691
95692 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantRecordInfo = {
95693 PyVarObject_HEAD_INIT(0, 0)
95694 "pysam.libcbcf.""VariantRecordInfo", /*tp_name*/
95695 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordInfo), /*tp_basicsize*/
95696 0, /*tp_itemsize*/
95697 __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordInfo, /*tp_dealloc*/
95698 #if PY_VERSION_HEX < 0x030800b4
95699 0, /*tp_print*/
95700 #endif
95701 #if PY_VERSION_HEX >= 0x030800b4
95702 0, /*tp_vectorcall_offset*/
95703 #endif
95704 0, /*tp_getattr*/
95705 0, /*tp_setattr*/
95706 #if PY_MAJOR_VERSION < 3
95707 0, /*tp_compare*/
95708 #endif
95709 #if PY_MAJOR_VERSION >= 3
95710 0, /*tp_as_async*/
95711 #endif
95712 0, /*tp_repr*/
95713 &__pyx_tp_as_number_VariantRecordInfo, /*tp_as_number*/
95714 &__pyx_tp_as_sequence_VariantRecordInfo, /*tp_as_sequence*/
95715 &__pyx_tp_as_mapping_VariantRecordInfo, /*tp_as_mapping*/
95716 0, /*tp_hash*/
95717 0, /*tp_call*/
95718 0, /*tp_str*/
95719 0, /*tp_getattro*/
95720 0, /*tp_setattro*/
95721 0, /*tp_as_buffer*/
95722 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
95723 PyDoc_STR("VariantRecordInfo(*args, **kwargs)\nInfo data stored in a :class:`VariantRecord` object, presented as a\n mapping from info metadata name to value."), /*tp_doc*/
95724 __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordInfo, /*tp_traverse*/
95725 __pyx_tp_clear_5pysam_7libcbcf_VariantRecordInfo, /*tp_clear*/
95726 __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_40__richcmp__, /*tp_richcompare*/
95727 0, /*tp_weaklistoffset*/
95728 __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_15__iter__, /*tp_iter*/
95729 0, /*tp_iternext*/
95730 __pyx_methods_5pysam_7libcbcf_VariantRecordInfo, /*tp_methods*/
95731 0, /*tp_members*/
95732 0, /*tp_getset*/
95733 0, /*tp_base*/
95734 0, /*tp_dict*/
95735 0, /*tp_descr_get*/
95736 0, /*tp_descr_set*/
95737 #if !CYTHON_USE_TYPE_SPECS
95738 0, /*tp_dictoffset*/
95739 #endif
95740 __pyx_pw_5pysam_7libcbcf_17VariantRecordInfo_1__init__, /*tp_init*/
95741 0, /*tp_alloc*/
95742 __pyx_tp_new_5pysam_7libcbcf_VariantRecordInfo, /*tp_new*/
95743 0, /*tp_free*/
95744 0, /*tp_is_gc*/
95745 0, /*tp_bases*/
95746 0, /*tp_mro*/
95747 0, /*tp_cache*/
95748 0, /*tp_subclasses*/
95749 0, /*tp_weaklist*/
95750 0, /*tp_del*/
95751 0, /*tp_version_tag*/
95752 #if PY_VERSION_HEX >= 0x030400a1
95753 #if CYTHON_USE_TP_FINALIZE
95754 0, /*tp_finalize*/
95755 #else
95756 NULL, /*tp_finalize*/
95757 #endif
95758 #endif
95759 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
95760 0, /*tp_vectorcall*/
95761 #endif
95762 #if __PYX_NEED_TP_PRINT_SLOT == 1
95763 0, /*tp_print*/
95764 #endif
95765 #if PY_VERSION_HEX >= 0x030C0000
95766 0, /*tp_watched*/
95767 #endif
95768 #if PY_VERSION_HEX >= 0x030d00A4
95769 0, /*tp_versions_used*/
95770 #endif
95771 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
95772 0, /*tp_pypy_flags*/
95773 #endif
95774 };
95775 #endif
95776
95777 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordSamples(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
95778 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *p;
95779 PyObject *o;
95780 #if CYTHON_COMPILING_IN_LIMITED_API
95781 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
95782 o = alloc_func(t, 0);
95783 #else
95784 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
95785 o = (*t->tp_alloc)(t, 0);
95786 } else {
95787 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
95788 }
95789 if (unlikely(!o)) return 0;
95790 #endif
95791 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)o);
95792 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
95793 return o;
95794 }
95795
95796 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordSamples(PyObject *o) {
95797 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)o;
95798 #if CYTHON_USE_TP_FINALIZE
95799 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
95800 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordSamples) {
95801 if (PyObject_CallFinalizerFromDealloc(o)) return;
95802 }
95803 }
95804 #endif
95805 PyObject_GC_UnTrack(o);
95806 Py_CLEAR(p->record);
95807 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
95808 (*Py_TYPE(o)->tp_free)(o);
95809 #else
95810 {
95811 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
95812 if (tp_free) tp_free(o);
95813 }
95814 #endif
95815 }
95816
95817 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordSamples(PyObject *o, visitproc v, void *a) {
95818 int e;
95819 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)o;
95820 if (p->record) {
95821 e = (*v)(((PyObject *)p->record), a); if (e) return e;
95822 }
95823 return 0;
95824 }
95825
95826 static int __pyx_tp_clear_5pysam_7libcbcf_VariantRecordSamples(PyObject *o) {
95827 PyObject* tmp;
95828 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples *)o;
95829 tmp = ((PyObject*)p->record);
95830 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
95831 Py_XDECREF(tmp);
95832 return 0;
95833 }
95834 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantRecordSamples(PyObject *o, Py_ssize_t i) {
95835 PyObject *r;
95836 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
95837 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
95838 Py_DECREF(x);
95839 return r;
95840 }
95841
95842 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantRecordSamples[] = {
95843 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_12get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_11get},
95844 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_16iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_15iterkeys},
95845 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_18itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_17itervalues},
95846 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_21iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_20iteritems},
95847 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_24keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_23keys},
95848 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_26items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_25items},
95849 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_28values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_27values},
95850 {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_30update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_29update},
95851 {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_32pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_31pop},
95852 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_36__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_35__reduce_cython__},
95853 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_38__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_20VariantRecordSamples_37__setstate_cython__},
95854 {0, 0, 0, 0}
95855 };
95856 #if CYTHON_USE_TYPE_SPECS
95857 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantRecordSamples_slots[] = {
95858 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordSamples},
95859 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_5__bool__},
95860 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_3__len__},
95861 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantRecordSamples},
95862 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_14__contains__},
95863 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_3__len__},
95864 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_7__getitem__},
95865 {Py_tp_doc, (void *)PyDoc_STR("VariantRecordSamples(*args, **kwargs)\nmapping from sample index or name to :class:`VariantRecordSample` object.")},
95866 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantRecordSamples},
95867 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantRecordSamples},
95868 {Py_tp_richcompare, (void *)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_34__richcmp__},
95869 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_9__iter__},
95870 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantRecordSamples},
95871 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_1__init__},
95872 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordSamples},
95873 {0, 0},
95874 };
95875 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantRecordSamples_spec = {
95876 "pysam.libcbcf.VariantRecordSamples",
95877 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples),
95878 0,
95879 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
95880 __pyx_type_5pysam_7libcbcf_VariantRecordSamples_slots,
95881 };
95882 #else
95883
95884 static PyNumberMethods __pyx_tp_as_number_VariantRecordSamples = {
95885 0, /*nb_add*/
95886 0, /*nb_subtract*/
95887 0, /*nb_multiply*/
95888 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95889 0, /*nb_divide*/
95890 #endif
95891 0, /*nb_remainder*/
95892 0, /*nb_divmod*/
95893 0, /*nb_power*/
95894 0, /*nb_negative*/
95895 0, /*nb_positive*/
95896 0, /*nb_absolute*/
95897 __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_5__bool__, /*nb_bool*/
95898 0, /*nb_invert*/
95899 0, /*nb_lshift*/
95900 0, /*nb_rshift*/
95901 0, /*nb_and*/
95902 0, /*nb_xor*/
95903 0, /*nb_or*/
95904 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95905 0, /*nb_coerce*/
95906 #endif
95907 0, /*nb_int*/
95908 #if PY_MAJOR_VERSION < 3
95909 0, /*nb_long*/
95910 #else
95911 0, /*reserved*/
95912 #endif
95913 0, /*nb_float*/
95914 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95915 0, /*nb_oct*/
95916 #endif
95917 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95918 0, /*nb_hex*/
95919 #endif
95920 0, /*nb_inplace_add*/
95921 0, /*nb_inplace_subtract*/
95922 0, /*nb_inplace_multiply*/
95923 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
95924 0, /*nb_inplace_divide*/
95925 #endif
95926 0, /*nb_inplace_remainder*/
95927 0, /*nb_inplace_power*/
95928 0, /*nb_inplace_lshift*/
95929 0, /*nb_inplace_rshift*/
95930 0, /*nb_inplace_and*/
95931 0, /*nb_inplace_xor*/
95932 0, /*nb_inplace_or*/
95933 0, /*nb_floor_divide*/
95934 0, /*nb_true_divide*/
95935 0, /*nb_inplace_floor_divide*/
95936 0, /*nb_inplace_true_divide*/
95937 0, /*nb_index*/
95938 #if PY_VERSION_HEX >= 0x03050000
95939 0, /*nb_matrix_multiply*/
95940 #endif
95941 #if PY_VERSION_HEX >= 0x03050000
95942 0, /*nb_inplace_matrix_multiply*/
95943 #endif
95944 };
95945
95946 static PySequenceMethods __pyx_tp_as_sequence_VariantRecordSamples = {
95947 __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_3__len__, /*sq_length*/
95948 0, /*sq_concat*/
95949 0, /*sq_repeat*/
95950 __pyx_sq_item_5pysam_7libcbcf_VariantRecordSamples, /*sq_item*/
95951 0, /*sq_slice*/
95952 0, /*sq_ass_item*/
95953 0, /*sq_ass_slice*/
95954 __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_14__contains__, /*sq_contains*/
95955 0, /*sq_inplace_concat*/
95956 0, /*sq_inplace_repeat*/
95957 };
95958
95959 static PyMappingMethods __pyx_tp_as_mapping_VariantRecordSamples = {
95960 __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_3__len__, /*mp_length*/
95961 __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_7__getitem__, /*mp_subscript*/
95962 0, /*mp_ass_subscript*/
95963 };
95964
95965 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantRecordSamples = {
95966 PyVarObject_HEAD_INIT(0, 0)
95967 "pysam.libcbcf.""VariantRecordSamples", /*tp_name*/
95968 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSamples), /*tp_basicsize*/
95969 0, /*tp_itemsize*/
95970 __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordSamples, /*tp_dealloc*/
95971 #if PY_VERSION_HEX < 0x030800b4
95972 0, /*tp_print*/
95973 #endif
95974 #if PY_VERSION_HEX >= 0x030800b4
95975 0, /*tp_vectorcall_offset*/
95976 #endif
95977 0, /*tp_getattr*/
95978 0, /*tp_setattr*/
95979 #if PY_MAJOR_VERSION < 3
95980 0, /*tp_compare*/
95981 #endif
95982 #if PY_MAJOR_VERSION >= 3
95983 0, /*tp_as_async*/
95984 #endif
95985 0, /*tp_repr*/
95986 &__pyx_tp_as_number_VariantRecordSamples, /*tp_as_number*/
95987 &__pyx_tp_as_sequence_VariantRecordSamples, /*tp_as_sequence*/
95988 &__pyx_tp_as_mapping_VariantRecordSamples, /*tp_as_mapping*/
95989 0, /*tp_hash*/
95990 0, /*tp_call*/
95991 0, /*tp_str*/
95992 0, /*tp_getattro*/
95993 0, /*tp_setattro*/
95994 0, /*tp_as_buffer*/
95995 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
95996 PyDoc_STR("VariantRecordSamples(*args, **kwargs)\nmapping from sample index or name to :class:`VariantRecordSample` object."), /*tp_doc*/
95997 __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordSamples, /*tp_traverse*/
95998 __pyx_tp_clear_5pysam_7libcbcf_VariantRecordSamples, /*tp_clear*/
95999 __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_34__richcmp__, /*tp_richcompare*/
96000 0, /*tp_weaklistoffset*/
96001 __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_9__iter__, /*tp_iter*/
96002 0, /*tp_iternext*/
96003 __pyx_methods_5pysam_7libcbcf_VariantRecordSamples, /*tp_methods*/
96004 0, /*tp_members*/
96005 0, /*tp_getset*/
96006 0, /*tp_base*/
96007 0, /*tp_dict*/
96008 0, /*tp_descr_get*/
96009 0, /*tp_descr_set*/
96010 #if !CYTHON_USE_TYPE_SPECS
96011 0, /*tp_dictoffset*/
96012 #endif
96013 __pyx_pw_5pysam_7libcbcf_20VariantRecordSamples_1__init__, /*tp_init*/
96014 0, /*tp_alloc*/
96015 __pyx_tp_new_5pysam_7libcbcf_VariantRecordSamples, /*tp_new*/
96016 0, /*tp_free*/
96017 0, /*tp_is_gc*/
96018 0, /*tp_bases*/
96019 0, /*tp_mro*/
96020 0, /*tp_cache*/
96021 0, /*tp_subclasses*/
96022 0, /*tp_weaklist*/
96023 0, /*tp_del*/
96024 0, /*tp_version_tag*/
96025 #if PY_VERSION_HEX >= 0x030400a1
96026 #if CYTHON_USE_TP_FINALIZE
96027 0, /*tp_finalize*/
96028 #else
96029 NULL, /*tp_finalize*/
96030 #endif
96031 #endif
96032 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
96033 0, /*tp_vectorcall*/
96034 #endif
96035 #if __PYX_NEED_TP_PRINT_SLOT == 1
96036 0, /*tp_print*/
96037 #endif
96038 #if PY_VERSION_HEX >= 0x030C0000
96039 0, /*tp_watched*/
96040 #endif
96041 #if PY_VERSION_HEX >= 0x030d00A4
96042 0, /*tp_versions_used*/
96043 #endif
96044 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
96045 0, /*tp_pypy_flags*/
96046 #endif
96047 };
96048 #endif
96049
96050 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantRecordSample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
96051 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *p;
96052 PyObject *o;
96053 #if CYTHON_COMPILING_IN_LIMITED_API
96054 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
96055 o = alloc_func(t, 0);
96056 #else
96057 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
96058 o = (*t->tp_alloc)(t, 0);
96059 } else {
96060 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
96061 }
96062 if (unlikely(!o)) return 0;
96063 #endif
96064 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)o);
96065 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
96066 return o;
96067 }
96068
96069 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordSample(PyObject *o) {
96070 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)o;
96071 #if CYTHON_USE_TP_FINALIZE
96072 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
96073 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordSample) {
96074 if (PyObject_CallFinalizerFromDealloc(o)) return;
96075 }
96076 }
96077 #endif
96078 PyObject_GC_UnTrack(o);
96079 Py_CLEAR(p->record);
96080 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
96081 (*Py_TYPE(o)->tp_free)(o);
96082 #else
96083 {
96084 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
96085 if (tp_free) tp_free(o);
96086 }
96087 #endif
96088 }
96089
96090 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordSample(PyObject *o, visitproc v, void *a) {
96091 int e;
96092 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)o;
96093 if (p->record) {
96094 e = (*v)(((PyObject *)p->record), a); if (e) return e;
96095 }
96096 return 0;
96097 }
96098
96099 static int __pyx_tp_clear_5pysam_7libcbcf_VariantRecordSample(PyObject *o) {
96100 PyObject* tmp;
96101 struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *p = (struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)o;
96102 tmp = ((PyObject*)p->record);
96103 p->record = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecord *)Py_None); Py_INCREF(Py_None);
96104 Py_XDECREF(tmp);
96105 return 0;
96106 }
96107 static PyObject *__pyx_sq_item_5pysam_7libcbcf_VariantRecordSample(PyObject *o, Py_ssize_t i) {
96108 PyObject *r;
96109 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
96110 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
96111 Py_DECREF(x);
96112 return r;
96113 }
96114
96115 static int __pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordSample(PyObject *o, PyObject *i, PyObject *v) {
96116 if (v) {
96117 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_9__setitem__(o, i, v);
96118 }
96119 else {
96120 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_11__delitem__(o, i);
96121 }
96122 }
96123
96124 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_name(PyObject *o, CYTHON_UNUSED void *x) {
96125 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_4name_1__get__(o);
96126 }
96127
96128 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_allele_indices(PyObject *o, CYTHON_UNUSED void *x) {
96129 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_1__get__(o);
96130 }
96131
96132 static int __pyx_setprop_5pysam_7libcbcf_19VariantRecordSample_allele_indices(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
96133 if (v) {
96134 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_3__set__(o, v);
96135 }
96136 else {
96137 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_14allele_indices_5__del__(o);
96138 }
96139 }
96140
96141 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_alleles(PyObject *o, CYTHON_UNUSED void *x) {
96142 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_1__get__(o);
96143 }
96144
96145 static int __pyx_setprop_5pysam_7libcbcf_19VariantRecordSample_alleles(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
96146 if (v) {
96147 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_3__set__(o, v);
96148 }
96149 else {
96150 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7alleles_5__del__(o);
96151 }
96152 }
96153
96154 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_phased(PyObject *o, CYTHON_UNUSED void *x) {
96155 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_6phased_1__get__(o);
96156 }
96157
96158 static int __pyx_setprop_5pysam_7libcbcf_19VariantRecordSample_phased(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
96159 if (v) {
96160 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_6phased_3__set__(o, v);
96161 }
96162 else {
96163 PyErr_SetString(PyExc_NotImplementedError, "__del__");
96164 return -1;
96165 }
96166 }
96167
96168 static PyObject *__pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_index(PyObject *o, CYTHON_UNUSED void *x) {
96169 return __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_5index_1__get__(o);
96170 }
96171
96172 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantRecordSample[] = {
96173 {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_13clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_12clear},
96174 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_18get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_17get},
96175 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_22iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_21iterkeys},
96176 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_24itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_23itervalues},
96177 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_27iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_26iteritems},
96178 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_30keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_29keys},
96179 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_32items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_31items},
96180 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_34values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_33values},
96181 {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_36update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_35update},
96182 {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_38pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_37pop},
96183 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_42__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_41__reduce_cython__},
96184 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_44__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_19VariantRecordSample_43__setstate_cython__},
96185 {0, 0, 0, 0}
96186 };
96187
96188 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantRecordSample[] = {
96189 {(char *)"name", __pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_name, 0, (char *)PyDoc_STR("sample name"), 0},
96190 {(char *)"allele_indices", __pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_allele_indices, __pyx_setprop_5pysam_7libcbcf_19VariantRecordSample_allele_indices, (char *)PyDoc_STR("allele indices for called genotype, if present. Otherwise None"), 0},
96191 {(char *)"alleles", __pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_alleles, __pyx_setprop_5pysam_7libcbcf_19VariantRecordSample_alleles, (char *)PyDoc_STR("alleles for called genotype, if present. Otherwise None"), 0},
96192 {(char *)"phased", __pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_phased, __pyx_setprop_5pysam_7libcbcf_19VariantRecordSample_phased, (char *)PyDoc_STR("False if genotype is missing or any allele is unphased. Otherwise True."), 0},
96193 {(char *)"index", __pyx_getprop_5pysam_7libcbcf_19VariantRecordSample_index, 0, (char *)0, 0},
96194 {0, 0, 0, 0, 0}
96195 };
96196 #if CYTHON_USE_TYPE_SPECS
96197 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantRecordSample_slots[] = {
96198 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordSample},
96199 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_5__bool__},
96200 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_3__len__},
96201 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_VariantRecordSample},
96202 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_20__contains__},
96203 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_3__len__},
96204 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7__getitem__},
96205 {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordSample},
96206 {Py_tp_doc, (void *)PyDoc_STR("VariantRecordSample(*args, **kwargs)\nData for a single sample from a :class:`VariantRecord` object.\n Provides data accessors for genotypes and a mapping interface\n from format name to values.\n ")},
96207 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantRecordSample},
96208 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantRecordSample},
96209 {Py_tp_richcompare, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_40__richcmp__},
96210 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_15__iter__},
96211 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantRecordSample},
96212 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantRecordSample},
96213 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_19VariantRecordSample_1__init__},
96214 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantRecordSample},
96215 {0, 0},
96216 };
96217 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantRecordSample_spec = {
96218 "pysam.libcbcf.VariantRecordSample",
96219 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample),
96220 0,
96221 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
96222 __pyx_type_5pysam_7libcbcf_VariantRecordSample_slots,
96223 };
96224 #else
96225
96226 static PyNumberMethods __pyx_tp_as_number_VariantRecordSample = {
96227 0, /*nb_add*/
96228 0, /*nb_subtract*/
96229 0, /*nb_multiply*/
96230 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96231 0, /*nb_divide*/
96232 #endif
96233 0, /*nb_remainder*/
96234 0, /*nb_divmod*/
96235 0, /*nb_power*/
96236 0, /*nb_negative*/
96237 0, /*nb_positive*/
96238 0, /*nb_absolute*/
96239 __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_5__bool__, /*nb_bool*/
96240 0, /*nb_invert*/
96241 0, /*nb_lshift*/
96242 0, /*nb_rshift*/
96243 0, /*nb_and*/
96244 0, /*nb_xor*/
96245 0, /*nb_or*/
96246 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96247 0, /*nb_coerce*/
96248 #endif
96249 0, /*nb_int*/
96250 #if PY_MAJOR_VERSION < 3
96251 0, /*nb_long*/
96252 #else
96253 0, /*reserved*/
96254 #endif
96255 0, /*nb_float*/
96256 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96257 0, /*nb_oct*/
96258 #endif
96259 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96260 0, /*nb_hex*/
96261 #endif
96262 0, /*nb_inplace_add*/
96263 0, /*nb_inplace_subtract*/
96264 0, /*nb_inplace_multiply*/
96265 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96266 0, /*nb_inplace_divide*/
96267 #endif
96268 0, /*nb_inplace_remainder*/
96269 0, /*nb_inplace_power*/
96270 0, /*nb_inplace_lshift*/
96271 0, /*nb_inplace_rshift*/
96272 0, /*nb_inplace_and*/
96273 0, /*nb_inplace_xor*/
96274 0, /*nb_inplace_or*/
96275 0, /*nb_floor_divide*/
96276 0, /*nb_true_divide*/
96277 0, /*nb_inplace_floor_divide*/
96278 0, /*nb_inplace_true_divide*/
96279 0, /*nb_index*/
96280 #if PY_VERSION_HEX >= 0x03050000
96281 0, /*nb_matrix_multiply*/
96282 #endif
96283 #if PY_VERSION_HEX >= 0x03050000
96284 0, /*nb_inplace_matrix_multiply*/
96285 #endif
96286 };
96287
96288 static PySequenceMethods __pyx_tp_as_sequence_VariantRecordSample = {
96289 __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_3__len__, /*sq_length*/
96290 0, /*sq_concat*/
96291 0, /*sq_repeat*/
96292 __pyx_sq_item_5pysam_7libcbcf_VariantRecordSample, /*sq_item*/
96293 0, /*sq_slice*/
96294 0, /*sq_ass_item*/
96295 0, /*sq_ass_slice*/
96296 __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_20__contains__, /*sq_contains*/
96297 0, /*sq_inplace_concat*/
96298 0, /*sq_inplace_repeat*/
96299 };
96300
96301 static PyMappingMethods __pyx_tp_as_mapping_VariantRecordSample = {
96302 __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_3__len__, /*mp_length*/
96303 __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_7__getitem__, /*mp_subscript*/
96304 __pyx_mp_ass_subscript_5pysam_7libcbcf_VariantRecordSample, /*mp_ass_subscript*/
96305 };
96306
96307 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantRecordSample = {
96308 PyVarObject_HEAD_INIT(0, 0)
96309 "pysam.libcbcf.""VariantRecordSample", /*tp_name*/
96310 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample), /*tp_basicsize*/
96311 0, /*tp_itemsize*/
96312 __pyx_tp_dealloc_5pysam_7libcbcf_VariantRecordSample, /*tp_dealloc*/
96313 #if PY_VERSION_HEX < 0x030800b4
96314 0, /*tp_print*/
96315 #endif
96316 #if PY_VERSION_HEX >= 0x030800b4
96317 0, /*tp_vectorcall_offset*/
96318 #endif
96319 0, /*tp_getattr*/
96320 0, /*tp_setattr*/
96321 #if PY_MAJOR_VERSION < 3
96322 0, /*tp_compare*/
96323 #endif
96324 #if PY_MAJOR_VERSION >= 3
96325 0, /*tp_as_async*/
96326 #endif
96327 0, /*tp_repr*/
96328 &__pyx_tp_as_number_VariantRecordSample, /*tp_as_number*/
96329 &__pyx_tp_as_sequence_VariantRecordSample, /*tp_as_sequence*/
96330 &__pyx_tp_as_mapping_VariantRecordSample, /*tp_as_mapping*/
96331 0, /*tp_hash*/
96332 0, /*tp_call*/
96333 0, /*tp_str*/
96334 0, /*tp_getattro*/
96335 0, /*tp_setattro*/
96336 0, /*tp_as_buffer*/
96337 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
96338 PyDoc_STR("VariantRecordSample(*args, **kwargs)\nData for a single sample from a :class:`VariantRecord` object.\n Provides data accessors for genotypes and a mapping interface\n from format name to values.\n "), /*tp_doc*/
96339 __pyx_tp_traverse_5pysam_7libcbcf_VariantRecordSample, /*tp_traverse*/
96340 __pyx_tp_clear_5pysam_7libcbcf_VariantRecordSample, /*tp_clear*/
96341 __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_40__richcmp__, /*tp_richcompare*/
96342 0, /*tp_weaklistoffset*/
96343 __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_15__iter__, /*tp_iter*/
96344 0, /*tp_iternext*/
96345 __pyx_methods_5pysam_7libcbcf_VariantRecordSample, /*tp_methods*/
96346 0, /*tp_members*/
96347 __pyx_getsets_5pysam_7libcbcf_VariantRecordSample, /*tp_getset*/
96348 0, /*tp_base*/
96349 0, /*tp_dict*/
96350 0, /*tp_descr_get*/
96351 0, /*tp_descr_set*/
96352 #if !CYTHON_USE_TYPE_SPECS
96353 0, /*tp_dictoffset*/
96354 #endif
96355 __pyx_pw_5pysam_7libcbcf_19VariantRecordSample_1__init__, /*tp_init*/
96356 0, /*tp_alloc*/
96357 __pyx_tp_new_5pysam_7libcbcf_VariantRecordSample, /*tp_new*/
96358 0, /*tp_free*/
96359 0, /*tp_is_gc*/
96360 0, /*tp_bases*/
96361 0, /*tp_mro*/
96362 0, /*tp_cache*/
96363 0, /*tp_subclasses*/
96364 0, /*tp_weaklist*/
96365 0, /*tp_del*/
96366 0, /*tp_version_tag*/
96367 #if PY_VERSION_HEX >= 0x030400a1
96368 #if CYTHON_USE_TP_FINALIZE
96369 0, /*tp_finalize*/
96370 #else
96371 NULL, /*tp_finalize*/
96372 #endif
96373 #endif
96374 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
96375 0, /*tp_vectorcall*/
96376 #endif
96377 #if __PYX_NEED_TP_PRINT_SLOT == 1
96378 0, /*tp_print*/
96379 #endif
96380 #if PY_VERSION_HEX >= 0x030C0000
96381 0, /*tp_watched*/
96382 #endif
96383 #if PY_VERSION_HEX >= 0x030d00A4
96384 0, /*tp_versions_used*/
96385 #endif
96386 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
96387 0, /*tp_pypy_flags*/
96388 #endif
96389 };
96390 #endif
96391
96392 static PyObject *__pyx_tp_new_5pysam_7libcbcf_BaseIndex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
96393 struct __pyx_obj_5pysam_7libcbcf_BaseIndex *p;
96394 PyObject *o;
96395 #if CYTHON_COMPILING_IN_LIMITED_API
96396 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
96397 o = alloc_func(t, 0);
96398 #else
96399 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
96400 o = (*t->tp_alloc)(t, 0);
96401 } else {
96402 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
96403 }
96404 if (unlikely(!o)) return 0;
96405 #endif
96406 p = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)o);
96407 p->refs = ((PyObject*)Py_None); Py_INCREF(Py_None);
96408 p->refmap = ((PyObject*)Py_None); Py_INCREF(Py_None);
96409 return o;
96410 }
96411
96412 static void __pyx_tp_dealloc_5pysam_7libcbcf_BaseIndex(PyObject *o) {
96413 struct __pyx_obj_5pysam_7libcbcf_BaseIndex *p = (struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)o;
96414 #if CYTHON_USE_TP_FINALIZE
96415 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
96416 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_BaseIndex) {
96417 if (PyObject_CallFinalizerFromDealloc(o)) return;
96418 }
96419 }
96420 #endif
96421 PyObject_GC_UnTrack(o);
96422 Py_CLEAR(p->refs);
96423 Py_CLEAR(p->refmap);
96424 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
96425 (*Py_TYPE(o)->tp_free)(o);
96426 #else
96427 {
96428 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
96429 if (tp_free) tp_free(o);
96430 }
96431 #endif
96432 }
96433
96434 static int __pyx_tp_traverse_5pysam_7libcbcf_BaseIndex(PyObject *o, visitproc v, void *a) {
96435 int e;
96436 struct __pyx_obj_5pysam_7libcbcf_BaseIndex *p = (struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)o;
96437 if (p->refs) {
96438 e = (*v)(p->refs, a); if (e) return e;
96439 }
96440 if (p->refmap) {
96441 e = (*v)(p->refmap, a); if (e) return e;
96442 }
96443 return 0;
96444 }
96445
96446 static int __pyx_tp_clear_5pysam_7libcbcf_BaseIndex(PyObject *o) {
96447 PyObject* tmp;
96448 struct __pyx_obj_5pysam_7libcbcf_BaseIndex *p = (struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)o;
96449 tmp = ((PyObject*)p->refs);
96450 p->refs = ((PyObject*)Py_None); Py_INCREF(Py_None);
96451 Py_XDECREF(tmp);
96452 tmp = ((PyObject*)p->refmap);
96453 p->refmap = ((PyObject*)Py_None); Py_INCREF(Py_None);
96454 Py_XDECREF(tmp);
96455 return 0;
96456 }
96457 static PyObject *__pyx_sq_item_5pysam_7libcbcf_BaseIndex(PyObject *o, Py_ssize_t i) {
96458 PyObject *r;
96459 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
96460 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
96461 Py_DECREF(x);
96462 return r;
96463 }
96464
96465 static PyMethodDef __pyx_methods_5pysam_7libcbcf_BaseIndex[] = {
96466 {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_11get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_10get},
96467 {"iterkeys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_15iterkeys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_14iterkeys},
96468 {"itervalues", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_17itervalues, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_16itervalues},
96469 {"iteritems", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_20iteritems, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_19iteritems},
96470 {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_23keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_22keys},
96471 {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_25items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_24items},
96472 {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_27values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_26values},
96473 {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_29update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_28update},
96474 {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_31pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_30pop},
96475 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_33__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_32__reduce_cython__},
96476 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_9BaseIndex_35__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_9BaseIndex_34__setstate_cython__},
96477 {0, 0, 0, 0}
96478 };
96479 #if CYTHON_USE_TYPE_SPECS
96480 static PyType_Slot __pyx_type_5pysam_7libcbcf_BaseIndex_slots[] = {
96481 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_BaseIndex},
96482 {Py_nb_bool, (void *)__pyx_pw_5pysam_7libcbcf_9BaseIndex_5__bool__},
96483 {Py_sq_length, (void *)__pyx_pw_5pysam_7libcbcf_9BaseIndex_3__len__},
96484 {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcbcf_BaseIndex},
96485 {Py_sq_contains, (void *)__pyx_pw_5pysam_7libcbcf_9BaseIndex_13__contains__},
96486 {Py_mp_length, (void *)__pyx_pw_5pysam_7libcbcf_9BaseIndex_3__len__},
96487 {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcbcf_9BaseIndex_7__getitem__},
96488 {Py_tp_doc, (void *)PyDoc_STR("BaseIndex()")},
96489 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_BaseIndex},
96490 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_BaseIndex},
96491 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_9BaseIndex_9__iter__},
96492 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_BaseIndex},
96493 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_9BaseIndex_1__init__},
96494 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_BaseIndex},
96495 {0, 0},
96496 };
96497 static PyType_Spec __pyx_type_5pysam_7libcbcf_BaseIndex_spec = {
96498 "pysam.libcbcf.BaseIndex",
96499 sizeof(struct __pyx_obj_5pysam_7libcbcf_BaseIndex),
96500 0,
96501 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
96502 __pyx_type_5pysam_7libcbcf_BaseIndex_slots,
96503 };
96504 #else
96505
96506 static PyNumberMethods __pyx_tp_as_number_BaseIndex = {
96507 0, /*nb_add*/
96508 0, /*nb_subtract*/
96509 0, /*nb_multiply*/
96510 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96511 0, /*nb_divide*/
96512 #endif
96513 0, /*nb_remainder*/
96514 0, /*nb_divmod*/
96515 0, /*nb_power*/
96516 0, /*nb_negative*/
96517 0, /*nb_positive*/
96518 0, /*nb_absolute*/
96519 __pyx_pw_5pysam_7libcbcf_9BaseIndex_5__bool__, /*nb_bool*/
96520 0, /*nb_invert*/
96521 0, /*nb_lshift*/
96522 0, /*nb_rshift*/
96523 0, /*nb_and*/
96524 0, /*nb_xor*/
96525 0, /*nb_or*/
96526 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96527 0, /*nb_coerce*/
96528 #endif
96529 0, /*nb_int*/
96530 #if PY_MAJOR_VERSION < 3
96531 0, /*nb_long*/
96532 #else
96533 0, /*reserved*/
96534 #endif
96535 0, /*nb_float*/
96536 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96537 0, /*nb_oct*/
96538 #endif
96539 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96540 0, /*nb_hex*/
96541 #endif
96542 0, /*nb_inplace_add*/
96543 0, /*nb_inplace_subtract*/
96544 0, /*nb_inplace_multiply*/
96545 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
96546 0, /*nb_inplace_divide*/
96547 #endif
96548 0, /*nb_inplace_remainder*/
96549 0, /*nb_inplace_power*/
96550 0, /*nb_inplace_lshift*/
96551 0, /*nb_inplace_rshift*/
96552 0, /*nb_inplace_and*/
96553 0, /*nb_inplace_xor*/
96554 0, /*nb_inplace_or*/
96555 0, /*nb_floor_divide*/
96556 0, /*nb_true_divide*/
96557 0, /*nb_inplace_floor_divide*/
96558 0, /*nb_inplace_true_divide*/
96559 0, /*nb_index*/
96560 #if PY_VERSION_HEX >= 0x03050000
96561 0, /*nb_matrix_multiply*/
96562 #endif
96563 #if PY_VERSION_HEX >= 0x03050000
96564 0, /*nb_inplace_matrix_multiply*/
96565 #endif
96566 };
96567
96568 static PySequenceMethods __pyx_tp_as_sequence_BaseIndex = {
96569 __pyx_pw_5pysam_7libcbcf_9BaseIndex_3__len__, /*sq_length*/
96570 0, /*sq_concat*/
96571 0, /*sq_repeat*/
96572 __pyx_sq_item_5pysam_7libcbcf_BaseIndex, /*sq_item*/
96573 0, /*sq_slice*/
96574 0, /*sq_ass_item*/
96575 0, /*sq_ass_slice*/
96576 __pyx_pw_5pysam_7libcbcf_9BaseIndex_13__contains__, /*sq_contains*/
96577 0, /*sq_inplace_concat*/
96578 0, /*sq_inplace_repeat*/
96579 };
96580
96581 static PyMappingMethods __pyx_tp_as_mapping_BaseIndex = {
96582 __pyx_pw_5pysam_7libcbcf_9BaseIndex_3__len__, /*mp_length*/
96583 __pyx_pw_5pysam_7libcbcf_9BaseIndex_7__getitem__, /*mp_subscript*/
96584 0, /*mp_ass_subscript*/
96585 };
96586
96587 static PyTypeObject __pyx_type_5pysam_7libcbcf_BaseIndex = {
96588 PyVarObject_HEAD_INIT(0, 0)
96589 "pysam.libcbcf.""BaseIndex", /*tp_name*/
96590 sizeof(struct __pyx_obj_5pysam_7libcbcf_BaseIndex), /*tp_basicsize*/
96591 0, /*tp_itemsize*/
96592 __pyx_tp_dealloc_5pysam_7libcbcf_BaseIndex, /*tp_dealloc*/
96593 #if PY_VERSION_HEX < 0x030800b4
96594 0, /*tp_print*/
96595 #endif
96596 #if PY_VERSION_HEX >= 0x030800b4
96597 0, /*tp_vectorcall_offset*/
96598 #endif
96599 0, /*tp_getattr*/
96600 0, /*tp_setattr*/
96601 #if PY_MAJOR_VERSION < 3
96602 0, /*tp_compare*/
96603 #endif
96604 #if PY_MAJOR_VERSION >= 3
96605 0, /*tp_as_async*/
96606 #endif
96607 0, /*tp_repr*/
96608 &__pyx_tp_as_number_BaseIndex, /*tp_as_number*/
96609 &__pyx_tp_as_sequence_BaseIndex, /*tp_as_sequence*/
96610 &__pyx_tp_as_mapping_BaseIndex, /*tp_as_mapping*/
96611 0, /*tp_hash*/
96612 0, /*tp_call*/
96613 0, /*tp_str*/
96614 0, /*tp_getattro*/
96615 0, /*tp_setattro*/
96616 0, /*tp_as_buffer*/
96617 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
96618 PyDoc_STR("BaseIndex()"), /*tp_doc*/
96619 __pyx_tp_traverse_5pysam_7libcbcf_BaseIndex, /*tp_traverse*/
96620 __pyx_tp_clear_5pysam_7libcbcf_BaseIndex, /*tp_clear*/
96621 0, /*tp_richcompare*/
96622 0, /*tp_weaklistoffset*/
96623 __pyx_pw_5pysam_7libcbcf_9BaseIndex_9__iter__, /*tp_iter*/
96624 0, /*tp_iternext*/
96625 __pyx_methods_5pysam_7libcbcf_BaseIndex, /*tp_methods*/
96626 0, /*tp_members*/
96627 0, /*tp_getset*/
96628 0, /*tp_base*/
96629 0, /*tp_dict*/
96630 0, /*tp_descr_get*/
96631 0, /*tp_descr_set*/
96632 #if !CYTHON_USE_TYPE_SPECS
96633 0, /*tp_dictoffset*/
96634 #endif
96635 __pyx_pw_5pysam_7libcbcf_9BaseIndex_1__init__, /*tp_init*/
96636 0, /*tp_alloc*/
96637 __pyx_tp_new_5pysam_7libcbcf_BaseIndex, /*tp_new*/
96638 0, /*tp_free*/
96639 0, /*tp_is_gc*/
96640 0, /*tp_bases*/
96641 0, /*tp_mro*/
96642 0, /*tp_cache*/
96643 0, /*tp_subclasses*/
96644 0, /*tp_weaklist*/
96645 0, /*tp_del*/
96646 0, /*tp_version_tag*/
96647 #if PY_VERSION_HEX >= 0x030400a1
96648 #if CYTHON_USE_TP_FINALIZE
96649 0, /*tp_finalize*/
96650 #else
96651 NULL, /*tp_finalize*/
96652 #endif
96653 #endif
96654 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
96655 0, /*tp_vectorcall*/
96656 #endif
96657 #if __PYX_NEED_TP_PRINT_SLOT == 1
96658 0, /*tp_print*/
96659 #endif
96660 #if PY_VERSION_HEX >= 0x030C0000
96661 0, /*tp_watched*/
96662 #endif
96663 #if PY_VERSION_HEX >= 0x030d00A4
96664 0, /*tp_versions_used*/
96665 #endif
96666 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
96667 0, /*tp_pypy_flags*/
96668 #endif
96669 };
96670 #endif
96671
96672 static PyObject *__pyx_tp_new_5pysam_7libcbcf_BCFIndex(PyTypeObject *t, PyObject *a, PyObject *k) {
96673 struct __pyx_obj_5pysam_7libcbcf_BCFIndex *p;
96674 PyObject *o = __pyx_tp_new_5pysam_7libcbcf_BaseIndex(t, a, k);
96675 if (unlikely(!o)) return 0;
96676 p = ((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)o);
96677 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
96678 return o;
96679 }
96680
96681 static void __pyx_tp_dealloc_5pysam_7libcbcf_BCFIndex(PyObject *o) {
96682 struct __pyx_obj_5pysam_7libcbcf_BCFIndex *p = (struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)o;
96683 #if CYTHON_USE_TP_FINALIZE
96684 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
96685 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_BCFIndex) {
96686 if (PyObject_CallFinalizerFromDealloc(o)) return;
96687 }
96688 }
96689 #endif
96690 PyObject_GC_UnTrack(o);
96691 {
96692 PyObject *etype, *eval, *etb;
96693 PyErr_Fetch(&etype, &eval, &etb);
96694 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
96695 __pyx_pw_5pysam_7libcbcf_8BCFIndex_3__dealloc__(o);
96696 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
96697 PyErr_Restore(etype, eval, etb);
96698 }
96699 Py_CLEAR(p->header);
96700 PyObject_GC_Track(o);
96701 __pyx_tp_dealloc_5pysam_7libcbcf_BaseIndex(o);
96702 }
96703
96704 static int __pyx_tp_traverse_5pysam_7libcbcf_BCFIndex(PyObject *o, visitproc v, void *a) {
96705 int e;
96706 struct __pyx_obj_5pysam_7libcbcf_BCFIndex *p = (struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)o;
96707 e = __pyx_tp_traverse_5pysam_7libcbcf_BaseIndex(o, v, a); if (e) return e;
96708 if (p->header) {
96709 e = (*v)(((PyObject *)p->header), a); if (e) return e;
96710 }
96711 return 0;
96712 }
96713
96714 static int __pyx_tp_clear_5pysam_7libcbcf_BCFIndex(PyObject *o) {
96715 PyObject* tmp;
96716 struct __pyx_obj_5pysam_7libcbcf_BCFIndex *p = (struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)o;
96717 __pyx_tp_clear_5pysam_7libcbcf_BaseIndex(o);
96718 tmp = ((PyObject*)p->header);
96719 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
96720 Py_XDECREF(tmp);
96721 return 0;
96722 }
96723
96724 static PyObject *__pyx_getprop_5pysam_7libcbcf_8BCFIndex_header(PyObject *o, CYTHON_UNUSED void *x) {
96725 return __pyx_pw_5pysam_7libcbcf_8BCFIndex_6header_1__get__(o);
96726 }
96727
96728 static PyMethodDef __pyx_methods_5pysam_7libcbcf_BCFIndex[] = {
96729 {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_8BCFIndex_5fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_8BCFIndex_4fetch},
96730 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_8BCFIndex_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_8BCFIndex_6__reduce_cython__},
96731 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_8BCFIndex_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_8BCFIndex_8__setstate_cython__},
96732 {0, 0, 0, 0}
96733 };
96734
96735 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_BCFIndex[] = {
96736 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_8BCFIndex_header, 0, (char *)0, 0},
96737 {0, 0, 0, 0, 0}
96738 };
96739 #if CYTHON_USE_TYPE_SPECS
96740 static PyType_Slot __pyx_type_5pysam_7libcbcf_BCFIndex_slots[] = {
96741 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_BCFIndex},
96742 {Py_tp_doc, (void *)PyDoc_STR("BCFIndex()\nCSI index data structure for BCF files")},
96743 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_BCFIndex},
96744 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_BCFIndex},
96745 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_BCFIndex},
96746 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_BCFIndex},
96747 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_8BCFIndex_1__init__},
96748 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_BCFIndex},
96749 {0, 0},
96750 };
96751 static PyType_Spec __pyx_type_5pysam_7libcbcf_BCFIndex_spec = {
96752 "pysam.libcbcf.BCFIndex",
96753 sizeof(struct __pyx_obj_5pysam_7libcbcf_BCFIndex),
96754 0,
96755 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
96756 __pyx_type_5pysam_7libcbcf_BCFIndex_slots,
96757 };
96758 #else
96759
96760 static PyTypeObject __pyx_type_5pysam_7libcbcf_BCFIndex = {
96761 PyVarObject_HEAD_INIT(0, 0)
96762 "pysam.libcbcf.""BCFIndex", /*tp_name*/
96763 sizeof(struct __pyx_obj_5pysam_7libcbcf_BCFIndex), /*tp_basicsize*/
96764 0, /*tp_itemsize*/
96765 __pyx_tp_dealloc_5pysam_7libcbcf_BCFIndex, /*tp_dealloc*/
96766 #if PY_VERSION_HEX < 0x030800b4
96767 0, /*tp_print*/
96768 #endif
96769 #if PY_VERSION_HEX >= 0x030800b4
96770 0, /*tp_vectorcall_offset*/
96771 #endif
96772 0, /*tp_getattr*/
96773 0, /*tp_setattr*/
96774 #if PY_MAJOR_VERSION < 3
96775 0, /*tp_compare*/
96776 #endif
96777 #if PY_MAJOR_VERSION >= 3
96778 0, /*tp_as_async*/
96779 #endif
96780 0, /*tp_repr*/
96781 0, /*tp_as_number*/
96782 0, /*tp_as_sequence*/
96783 0, /*tp_as_mapping*/
96784 0, /*tp_hash*/
96785 0, /*tp_call*/
96786 0, /*tp_str*/
96787 0, /*tp_getattro*/
96788 0, /*tp_setattro*/
96789 0, /*tp_as_buffer*/
96790 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
96791 PyDoc_STR("BCFIndex()\nCSI index data structure for BCF files"), /*tp_doc*/
96792 __pyx_tp_traverse_5pysam_7libcbcf_BCFIndex, /*tp_traverse*/
96793 __pyx_tp_clear_5pysam_7libcbcf_BCFIndex, /*tp_clear*/
96794 0, /*tp_richcompare*/
96795 0, /*tp_weaklistoffset*/
96796 #if CYTHON_COMPILING_IN_PYPY || 0
96797 __pyx_pw_5pysam_7libcbcf_9BaseIndex_9__iter__, /*tp_iter*/
96798 #else
96799 0, /*tp_iter*/
96800 #endif
96801 0, /*tp_iternext*/
96802 __pyx_methods_5pysam_7libcbcf_BCFIndex, /*tp_methods*/
96803 0, /*tp_members*/
96804 __pyx_getsets_5pysam_7libcbcf_BCFIndex, /*tp_getset*/
96805 0, /*tp_base*/
96806 0, /*tp_dict*/
96807 0, /*tp_descr_get*/
96808 0, /*tp_descr_set*/
96809 #if !CYTHON_USE_TYPE_SPECS
96810 0, /*tp_dictoffset*/
96811 #endif
96812 __pyx_pw_5pysam_7libcbcf_8BCFIndex_1__init__, /*tp_init*/
96813 0, /*tp_alloc*/
96814 __pyx_tp_new_5pysam_7libcbcf_BCFIndex, /*tp_new*/
96815 0, /*tp_free*/
96816 0, /*tp_is_gc*/
96817 0, /*tp_bases*/
96818 0, /*tp_mro*/
96819 0, /*tp_cache*/
96820 0, /*tp_subclasses*/
96821 0, /*tp_weaklist*/
96822 0, /*tp_del*/
96823 0, /*tp_version_tag*/
96824 #if PY_VERSION_HEX >= 0x030400a1
96825 #if CYTHON_USE_TP_FINALIZE
96826 0, /*tp_finalize*/
96827 #else
96828 NULL, /*tp_finalize*/
96829 #endif
96830 #endif
96831 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
96832 0, /*tp_vectorcall*/
96833 #endif
96834 #if __PYX_NEED_TP_PRINT_SLOT == 1
96835 0, /*tp_print*/
96836 #endif
96837 #if PY_VERSION_HEX >= 0x030C0000
96838 0, /*tp_watched*/
96839 #endif
96840 #if PY_VERSION_HEX >= 0x030d00A4
96841 0, /*tp_versions_used*/
96842 #endif
96843 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
96844 0, /*tp_pypy_flags*/
96845 #endif
96846 };
96847 #endif
96848
96849 static void __pyx_tp_dealloc_5pysam_7libcbcf_TabixIndex(PyObject *o) {
96850 #if CYTHON_USE_TP_FINALIZE
96851 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
96852 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_TabixIndex) {
96853 if (PyObject_CallFinalizerFromDealloc(o)) return;
96854 }
96855 }
96856 #endif
96857 PyObject_GC_UnTrack(o);
96858 {
96859 PyObject *etype, *eval, *etb;
96860 PyErr_Fetch(&etype, &eval, &etb);
96861 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
96862 __pyx_pw_5pysam_7libcbcf_10TabixIndex_3__dealloc__(o);
96863 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
96864 PyErr_Restore(etype, eval, etb);
96865 }
96866 PyObject_GC_Track(o);
96867 __pyx_tp_dealloc_5pysam_7libcbcf_BaseIndex(o);
96868 }
96869
96870 static PyMethodDef __pyx_methods_5pysam_7libcbcf_TabixIndex[] = {
96871 {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_10TabixIndex_5fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_10TabixIndex_4fetch},
96872 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_10TabixIndex_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_10TabixIndex_6__reduce_cython__},
96873 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_10TabixIndex_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_10TabixIndex_8__setstate_cython__},
96874 {0, 0, 0, 0}
96875 };
96876 #if CYTHON_USE_TYPE_SPECS
96877 static PyType_Slot __pyx_type_5pysam_7libcbcf_TabixIndex_slots[] = {
96878 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_TabixIndex},
96879 {Py_tp_doc, (void *)PyDoc_STR("TabixIndex()\nTabix index data structure for VCF files")},
96880 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_BaseIndex},
96881 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_BaseIndex},
96882 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_TabixIndex},
96883 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_10TabixIndex_1__init__},
96884 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_BaseIndex},
96885 {0, 0},
96886 };
96887 static PyType_Spec __pyx_type_5pysam_7libcbcf_TabixIndex_spec = {
96888 "pysam.libcbcf.TabixIndex",
96889 sizeof(struct __pyx_obj_5pysam_7libcbcf_TabixIndex),
96890 0,
96891 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
96892 __pyx_type_5pysam_7libcbcf_TabixIndex_slots,
96893 };
96894 #else
96895
96896 static PyTypeObject __pyx_type_5pysam_7libcbcf_TabixIndex = {
96897 PyVarObject_HEAD_INIT(0, 0)
96898 "pysam.libcbcf.""TabixIndex", /*tp_name*/
96899 sizeof(struct __pyx_obj_5pysam_7libcbcf_TabixIndex), /*tp_basicsize*/
96900 0, /*tp_itemsize*/
96901 __pyx_tp_dealloc_5pysam_7libcbcf_TabixIndex, /*tp_dealloc*/
96902 #if PY_VERSION_HEX < 0x030800b4
96903 0, /*tp_print*/
96904 #endif
96905 #if PY_VERSION_HEX >= 0x030800b4
96906 0, /*tp_vectorcall_offset*/
96907 #endif
96908 0, /*tp_getattr*/
96909 0, /*tp_setattr*/
96910 #if PY_MAJOR_VERSION < 3
96911 0, /*tp_compare*/
96912 #endif
96913 #if PY_MAJOR_VERSION >= 3
96914 0, /*tp_as_async*/
96915 #endif
96916 0, /*tp_repr*/
96917 0, /*tp_as_number*/
96918 0, /*tp_as_sequence*/
96919 0, /*tp_as_mapping*/
96920 0, /*tp_hash*/
96921 0, /*tp_call*/
96922 0, /*tp_str*/
96923 0, /*tp_getattro*/
96924 0, /*tp_setattro*/
96925 0, /*tp_as_buffer*/
96926 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
96927 PyDoc_STR("TabixIndex()\nTabix index data structure for VCF files"), /*tp_doc*/
96928 __pyx_tp_traverse_5pysam_7libcbcf_BaseIndex, /*tp_traverse*/
96929 __pyx_tp_clear_5pysam_7libcbcf_BaseIndex, /*tp_clear*/
96930 0, /*tp_richcompare*/
96931 0, /*tp_weaklistoffset*/
96932 #if CYTHON_COMPILING_IN_PYPY || 0
96933 __pyx_pw_5pysam_7libcbcf_9BaseIndex_9__iter__, /*tp_iter*/
96934 #else
96935 0, /*tp_iter*/
96936 #endif
96937 0, /*tp_iternext*/
96938 __pyx_methods_5pysam_7libcbcf_TabixIndex, /*tp_methods*/
96939 0, /*tp_members*/
96940 0, /*tp_getset*/
96941 0, /*tp_base*/
96942 0, /*tp_dict*/
96943 0, /*tp_descr_get*/
96944 0, /*tp_descr_set*/
96945 #if !CYTHON_USE_TYPE_SPECS
96946 0, /*tp_dictoffset*/
96947 #endif
96948 __pyx_pw_5pysam_7libcbcf_10TabixIndex_1__init__, /*tp_init*/
96949 0, /*tp_alloc*/
96950 __pyx_tp_new_5pysam_7libcbcf_BaseIndex, /*tp_new*/
96951 0, /*tp_free*/
96952 0, /*tp_is_gc*/
96953 0, /*tp_bases*/
96954 0, /*tp_mro*/
96955 0, /*tp_cache*/
96956 0, /*tp_subclasses*/
96957 0, /*tp_weaklist*/
96958 0, /*tp_del*/
96959 0, /*tp_version_tag*/
96960 #if PY_VERSION_HEX >= 0x030400a1
96961 #if CYTHON_USE_TP_FINALIZE
96962 0, /*tp_finalize*/
96963 #else
96964 NULL, /*tp_finalize*/
96965 #endif
96966 #endif
96967 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
96968 0, /*tp_vectorcall*/
96969 #endif
96970 #if __PYX_NEED_TP_PRINT_SLOT == 1
96971 0, /*tp_print*/
96972 #endif
96973 #if PY_VERSION_HEX >= 0x030C0000
96974 0, /*tp_watched*/
96975 #endif
96976 #if PY_VERSION_HEX >= 0x030d00A4
96977 0, /*tp_versions_used*/
96978 #endif
96979 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
96980 0, /*tp_pypy_flags*/
96981 #endif
96982 };
96983 #endif
96984
96985 static PyObject *__pyx_tp_new_5pysam_7libcbcf_BaseIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
96986 struct __pyx_obj_5pysam_7libcbcf_BaseIterator *p;
96987 PyObject *o;
96988 #if CYTHON_COMPILING_IN_LIMITED_API
96989 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
96990 o = alloc_func(t, 0);
96991 #else
96992 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
96993 o = (*t->tp_alloc)(t, 0);
96994 } else {
96995 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
96996 }
96997 if (unlikely(!o)) return 0;
96998 #endif
96999 p = ((struct __pyx_obj_5pysam_7libcbcf_BaseIterator *)o);
97000 p->bcf = ((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)Py_None); Py_INCREF(Py_None);
97001 return o;
97002 }
97003
97004 static void __pyx_tp_dealloc_5pysam_7libcbcf_BaseIterator(PyObject *o) {
97005 struct __pyx_obj_5pysam_7libcbcf_BaseIterator *p = (struct __pyx_obj_5pysam_7libcbcf_BaseIterator *)o;
97006 #if CYTHON_USE_TP_FINALIZE
97007 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
97008 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_BaseIterator) {
97009 if (PyObject_CallFinalizerFromDealloc(o)) return;
97010 }
97011 }
97012 #endif
97013 PyObject_GC_UnTrack(o);
97014 Py_CLEAR(p->bcf);
97015 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
97016 (*Py_TYPE(o)->tp_free)(o);
97017 #else
97018 {
97019 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
97020 if (tp_free) tp_free(o);
97021 }
97022 #endif
97023 }
97024
97025 static int __pyx_tp_traverse_5pysam_7libcbcf_BaseIterator(PyObject *o, visitproc v, void *a) {
97026 int e;
97027 struct __pyx_obj_5pysam_7libcbcf_BaseIterator *p = (struct __pyx_obj_5pysam_7libcbcf_BaseIterator *)o;
97028 if (p->bcf) {
97029 e = (*v)(((PyObject *)p->bcf), a); if (e) return e;
97030 }
97031 return 0;
97032 }
97033
97034 static int __pyx_tp_clear_5pysam_7libcbcf_BaseIterator(PyObject *o) {
97035 PyObject* tmp;
97036 struct __pyx_obj_5pysam_7libcbcf_BaseIterator *p = (struct __pyx_obj_5pysam_7libcbcf_BaseIterator *)o;
97037 tmp = ((PyObject*)p->bcf);
97038 p->bcf = ((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)Py_None); Py_INCREF(Py_None);
97039 Py_XDECREF(tmp);
97040 return 0;
97041 }
97042
97043 static PyMethodDef __pyx_methods_5pysam_7libcbcf_BaseIterator[] = {
97044 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_12BaseIterator_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_12BaseIterator___reduce_cython__},
97045 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_12BaseIterator_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_12BaseIterator_2__setstate_cython__},
97046 {0, 0, 0, 0}
97047 };
97048 #if CYTHON_USE_TYPE_SPECS
97049 static PyType_Slot __pyx_type_5pysam_7libcbcf_BaseIterator_slots[] = {
97050 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_BaseIterator},
97051 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_BaseIterator},
97052 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_BaseIterator},
97053 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_BaseIterator},
97054 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_BaseIterator},
97055 {0, 0},
97056 };
97057 static PyType_Spec __pyx_type_5pysam_7libcbcf_BaseIterator_spec = {
97058 "pysam.libcbcf.BaseIterator",
97059 sizeof(struct __pyx_obj_5pysam_7libcbcf_BaseIterator),
97060 0,
97061 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
97062 __pyx_type_5pysam_7libcbcf_BaseIterator_slots,
97063 };
97064 #else
97065
97066 static PyTypeObject __pyx_type_5pysam_7libcbcf_BaseIterator = {
97067 PyVarObject_HEAD_INIT(0, 0)
97068 "pysam.libcbcf.""BaseIterator", /*tp_name*/
97069 sizeof(struct __pyx_obj_5pysam_7libcbcf_BaseIterator), /*tp_basicsize*/
97070 0, /*tp_itemsize*/
97071 __pyx_tp_dealloc_5pysam_7libcbcf_BaseIterator, /*tp_dealloc*/
97072 #if PY_VERSION_HEX < 0x030800b4
97073 0, /*tp_print*/
97074 #endif
97075 #if PY_VERSION_HEX >= 0x030800b4
97076 0, /*tp_vectorcall_offset*/
97077 #endif
97078 0, /*tp_getattr*/
97079 0, /*tp_setattr*/
97080 #if PY_MAJOR_VERSION < 3
97081 0, /*tp_compare*/
97082 #endif
97083 #if PY_MAJOR_VERSION >= 3
97084 0, /*tp_as_async*/
97085 #endif
97086 0, /*tp_repr*/
97087 0, /*tp_as_number*/
97088 0, /*tp_as_sequence*/
97089 0, /*tp_as_mapping*/
97090 0, /*tp_hash*/
97091 0, /*tp_call*/
97092 0, /*tp_str*/
97093 0, /*tp_getattro*/
97094 0, /*tp_setattro*/
97095 0, /*tp_as_buffer*/
97096 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
97097 0, /*tp_doc*/
97098 __pyx_tp_traverse_5pysam_7libcbcf_BaseIterator, /*tp_traverse*/
97099 __pyx_tp_clear_5pysam_7libcbcf_BaseIterator, /*tp_clear*/
97100 0, /*tp_richcompare*/
97101 0, /*tp_weaklistoffset*/
97102 0, /*tp_iter*/
97103 0, /*tp_iternext*/
97104 __pyx_methods_5pysam_7libcbcf_BaseIterator, /*tp_methods*/
97105 0, /*tp_members*/
97106 0, /*tp_getset*/
97107 0, /*tp_base*/
97108 0, /*tp_dict*/
97109 0, /*tp_descr_get*/
97110 0, /*tp_descr_set*/
97111 #if !CYTHON_USE_TYPE_SPECS
97112 0, /*tp_dictoffset*/
97113 #endif
97114 0, /*tp_init*/
97115 0, /*tp_alloc*/
97116 __pyx_tp_new_5pysam_7libcbcf_BaseIterator, /*tp_new*/
97117 0, /*tp_free*/
97118 0, /*tp_is_gc*/
97119 0, /*tp_bases*/
97120 0, /*tp_mro*/
97121 0, /*tp_cache*/
97122 0, /*tp_subclasses*/
97123 0, /*tp_weaklist*/
97124 0, /*tp_del*/
97125 0, /*tp_version_tag*/
97126 #if PY_VERSION_HEX >= 0x030400a1
97127 #if CYTHON_USE_TP_FINALIZE
97128 0, /*tp_finalize*/
97129 #else
97130 NULL, /*tp_finalize*/
97131 #endif
97132 #endif
97133 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
97134 0, /*tp_vectorcall*/
97135 #endif
97136 #if __PYX_NEED_TP_PRINT_SLOT == 1
97137 0, /*tp_print*/
97138 #endif
97139 #if PY_VERSION_HEX >= 0x030C0000
97140 0, /*tp_watched*/
97141 #endif
97142 #if PY_VERSION_HEX >= 0x030d00A4
97143 0, /*tp_versions_used*/
97144 #endif
97145 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
97146 0, /*tp_pypy_flags*/
97147 #endif
97148 };
97149 #endif
97150
97151 static PyObject *__pyx_tp_new_5pysam_7libcbcf_BCFIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
97152 struct __pyx_obj_5pysam_7libcbcf_BCFIterator *p;
97153 PyObject *o = __pyx_tp_new_5pysam_7libcbcf_BaseIterator(t, a, k);
97154 if (unlikely(!o)) return 0;
97155 p = ((struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)o);
97156 p->index = ((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)Py_None); Py_INCREF(Py_None);
97157 return o;
97158 }
97159
97160 static void __pyx_tp_dealloc_5pysam_7libcbcf_BCFIterator(PyObject *o) {
97161 struct __pyx_obj_5pysam_7libcbcf_BCFIterator *p = (struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)o;
97162 #if CYTHON_USE_TP_FINALIZE
97163 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
97164 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_BCFIterator) {
97165 if (PyObject_CallFinalizerFromDealloc(o)) return;
97166 }
97167 }
97168 #endif
97169 PyObject_GC_UnTrack(o);
97170 {
97171 PyObject *etype, *eval, *etb;
97172 PyErr_Fetch(&etype, &eval, &etb);
97173 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
97174 __pyx_pw_5pysam_7libcbcf_11BCFIterator_3__dealloc__(o);
97175 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
97176 PyErr_Restore(etype, eval, etb);
97177 }
97178 Py_CLEAR(p->index);
97179 PyObject_GC_Track(o);
97180 __pyx_tp_dealloc_5pysam_7libcbcf_BaseIterator(o);
97181 }
97182
97183 static int __pyx_tp_traverse_5pysam_7libcbcf_BCFIterator(PyObject *o, visitproc v, void *a) {
97184 int e;
97185 struct __pyx_obj_5pysam_7libcbcf_BCFIterator *p = (struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)o;
97186 e = __pyx_tp_traverse_5pysam_7libcbcf_BaseIterator(o, v, a); if (e) return e;
97187 if (p->index) {
97188 e = (*v)(((PyObject *)p->index), a); if (e) return e;
97189 }
97190 return 0;
97191 }
97192
97193 static int __pyx_tp_clear_5pysam_7libcbcf_BCFIterator(PyObject *o) {
97194 PyObject* tmp;
97195 struct __pyx_obj_5pysam_7libcbcf_BCFIterator *p = (struct __pyx_obj_5pysam_7libcbcf_BCFIterator *)o;
97196 __pyx_tp_clear_5pysam_7libcbcf_BaseIterator(o);
97197 tmp = ((PyObject*)p->index);
97198 p->index = ((struct __pyx_obj_5pysam_7libcbcf_BCFIndex *)Py_None); Py_INCREF(Py_None);
97199 Py_XDECREF(tmp);
97200 return 0;
97201 }
97202
97203 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_7libcbcf_11BCFIterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
97204 PyObject *res = __pyx_pw_5pysam_7libcbcf_11BCFIterator_7__next__(self);
97205 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
97206 return res;
97207 }
97208
97209 static PyMethodDef __pyx_methods_5pysam_7libcbcf_BCFIterator[] = {
97210 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_7libcbcf_11BCFIterator_7__next__, METH_NOARGS|METH_COEXIST, 0},
97211 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11BCFIterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11BCFIterator_8__reduce_cython__},
97212 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11BCFIterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11BCFIterator_10__setstate_cython__},
97213 {0, 0, 0, 0}
97214 };
97215 #if CYTHON_USE_TYPE_SPECS
97216 static PyType_Slot __pyx_type_5pysam_7libcbcf_BCFIterator_slots[] = {
97217 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_BCFIterator},
97218 {Py_tp_doc, (void *)PyDoc_STR("BCFIterator(VariantFile bcf, contig=None, start=None, stop=None, reopen=True)")},
97219 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_BCFIterator},
97220 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_BCFIterator},
97221 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_11BCFIterator_5__iter__},
97222 {Py_tp_iternext, (void *)__pyx_pw_5pysam_7libcbcf_11BCFIterator_7__next__},
97223 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_BCFIterator},
97224 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_11BCFIterator_1__init__},
97225 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_BCFIterator},
97226 {0, 0},
97227 };
97228 static PyType_Spec __pyx_type_5pysam_7libcbcf_BCFIterator_spec = {
97229 "pysam.libcbcf.BCFIterator",
97230 sizeof(struct __pyx_obj_5pysam_7libcbcf_BCFIterator),
97231 0,
97232 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
97233 __pyx_type_5pysam_7libcbcf_BCFIterator_slots,
97234 };
97235 #else
97236
97237 static PyTypeObject __pyx_type_5pysam_7libcbcf_BCFIterator = {
97238 PyVarObject_HEAD_INIT(0, 0)
97239 "pysam.libcbcf.""BCFIterator", /*tp_name*/
97240 sizeof(struct __pyx_obj_5pysam_7libcbcf_BCFIterator), /*tp_basicsize*/
97241 0, /*tp_itemsize*/
97242 __pyx_tp_dealloc_5pysam_7libcbcf_BCFIterator, /*tp_dealloc*/
97243 #if PY_VERSION_HEX < 0x030800b4
97244 0, /*tp_print*/
97245 #endif
97246 #if PY_VERSION_HEX >= 0x030800b4
97247 0, /*tp_vectorcall_offset*/
97248 #endif
97249 0, /*tp_getattr*/
97250 0, /*tp_setattr*/
97251 #if PY_MAJOR_VERSION < 3
97252 0, /*tp_compare*/
97253 #endif
97254 #if PY_MAJOR_VERSION >= 3
97255 0, /*tp_as_async*/
97256 #endif
97257 0, /*tp_repr*/
97258 0, /*tp_as_number*/
97259 0, /*tp_as_sequence*/
97260 0, /*tp_as_mapping*/
97261 0, /*tp_hash*/
97262 0, /*tp_call*/
97263 0, /*tp_str*/
97264 0, /*tp_getattro*/
97265 0, /*tp_setattro*/
97266 0, /*tp_as_buffer*/
97267 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
97268 PyDoc_STR("BCFIterator(VariantFile bcf, contig=None, start=None, stop=None, reopen=True)"), /*tp_doc*/
97269 __pyx_tp_traverse_5pysam_7libcbcf_BCFIterator, /*tp_traverse*/
97270 __pyx_tp_clear_5pysam_7libcbcf_BCFIterator, /*tp_clear*/
97271 0, /*tp_richcompare*/
97272 0, /*tp_weaklistoffset*/
97273 __pyx_pw_5pysam_7libcbcf_11BCFIterator_5__iter__, /*tp_iter*/
97274 __pyx_pw_5pysam_7libcbcf_11BCFIterator_7__next__, /*tp_iternext*/
97275 __pyx_methods_5pysam_7libcbcf_BCFIterator, /*tp_methods*/
97276 0, /*tp_members*/
97277 0, /*tp_getset*/
97278 0, /*tp_base*/
97279 0, /*tp_dict*/
97280 0, /*tp_descr_get*/
97281 0, /*tp_descr_set*/
97282 #if !CYTHON_USE_TYPE_SPECS
97283 0, /*tp_dictoffset*/
97284 #endif
97285 __pyx_pw_5pysam_7libcbcf_11BCFIterator_1__init__, /*tp_init*/
97286 0, /*tp_alloc*/
97287 __pyx_tp_new_5pysam_7libcbcf_BCFIterator, /*tp_new*/
97288 0, /*tp_free*/
97289 0, /*tp_is_gc*/
97290 0, /*tp_bases*/
97291 0, /*tp_mro*/
97292 0, /*tp_cache*/
97293 0, /*tp_subclasses*/
97294 0, /*tp_weaklist*/
97295 0, /*tp_del*/
97296 0, /*tp_version_tag*/
97297 #if PY_VERSION_HEX >= 0x030400a1
97298 #if CYTHON_USE_TP_FINALIZE
97299 0, /*tp_finalize*/
97300 #else
97301 NULL, /*tp_finalize*/
97302 #endif
97303 #endif
97304 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
97305 0, /*tp_vectorcall*/
97306 #endif
97307 #if __PYX_NEED_TP_PRINT_SLOT == 1
97308 0, /*tp_print*/
97309 #endif
97310 #if PY_VERSION_HEX >= 0x030C0000
97311 0, /*tp_watched*/
97312 #endif
97313 #if PY_VERSION_HEX >= 0x030d00A4
97314 0, /*tp_versions_used*/
97315 #endif
97316 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
97317 0, /*tp_pypy_flags*/
97318 #endif
97319 };
97320 #endif
97321
97322 static PyObject *__pyx_tp_new_5pysam_7libcbcf_TabixIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
97323 struct __pyx_obj_5pysam_7libcbcf_TabixIterator *p;
97324 PyObject *o = __pyx_tp_new_5pysam_7libcbcf_BaseIterator(t, a, k);
97325 if (unlikely(!o)) return 0;
97326 p = ((struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)o);
97327 p->index = ((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)Py_None); Py_INCREF(Py_None);
97328 if (unlikely(__pyx_pw_5pysam_7libcbcf_13TabixIterator_1__cinit__(o, a, k) < 0)) goto bad;
97329 return o;
97330 bad:
97331 Py_DECREF(o); o = 0;
97332 return NULL;
97333 }
97334
97335 static void __pyx_tp_dealloc_5pysam_7libcbcf_TabixIterator(PyObject *o) {
97336 struct __pyx_obj_5pysam_7libcbcf_TabixIterator *p = (struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)o;
97337 #if CYTHON_USE_TP_FINALIZE
97338 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
97339 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_TabixIterator) {
97340 if (PyObject_CallFinalizerFromDealloc(o)) return;
97341 }
97342 }
97343 #endif
97344 PyObject_GC_UnTrack(o);
97345 {
97346 PyObject *etype, *eval, *etb;
97347 PyErr_Fetch(&etype, &eval, &etb);
97348 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
97349 __pyx_pw_5pysam_7libcbcf_13TabixIterator_5__dealloc__(o);
97350 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
97351 PyErr_Restore(etype, eval, etb);
97352 }
97353 Py_CLEAR(p->index);
97354 PyObject_GC_Track(o);
97355 __pyx_tp_dealloc_5pysam_7libcbcf_BaseIterator(o);
97356 }
97357
97358 static int __pyx_tp_traverse_5pysam_7libcbcf_TabixIterator(PyObject *o, visitproc v, void *a) {
97359 int e;
97360 struct __pyx_obj_5pysam_7libcbcf_TabixIterator *p = (struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)o;
97361 e = __pyx_tp_traverse_5pysam_7libcbcf_BaseIterator(o, v, a); if (e) return e;
97362 if (p->index) {
97363 e = (*v)(((PyObject *)p->index), a); if (e) return e;
97364 }
97365 return 0;
97366 }
97367
97368 static int __pyx_tp_clear_5pysam_7libcbcf_TabixIterator(PyObject *o) {
97369 PyObject* tmp;
97370 struct __pyx_obj_5pysam_7libcbcf_TabixIterator *p = (struct __pyx_obj_5pysam_7libcbcf_TabixIterator *)o;
97371 __pyx_tp_clear_5pysam_7libcbcf_BaseIterator(o);
97372 tmp = ((PyObject*)p->index);
97373 p->index = ((struct __pyx_obj_5pysam_7libcbcf_TabixIndex *)Py_None); Py_INCREF(Py_None);
97374 Py_XDECREF(tmp);
97375 return 0;
97376 }
97377
97378 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_7libcbcf_13TabixIterator_9__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
97379 PyObject *res = __pyx_pw_5pysam_7libcbcf_13TabixIterator_9__next__(self);
97380 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
97381 return res;
97382 }
97383
97384 static PyMethodDef __pyx_methods_5pysam_7libcbcf_TabixIterator[] = {
97385 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_7libcbcf_13TabixIterator_9__next__, METH_NOARGS|METH_COEXIST, 0},
97386 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13TabixIterator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13TabixIterator_10__reduce_cython__},
97387 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_13TabixIterator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_13TabixIterator_12__setstate_cython__},
97388 {0, 0, 0, 0}
97389 };
97390 #if CYTHON_USE_TYPE_SPECS
97391 static PyType_Slot __pyx_type_5pysam_7libcbcf_TabixIterator_slots[] = {
97392 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_TabixIterator},
97393 {Py_tp_doc, (void *)PyDoc_STR("TabixIterator(VariantFile bcf, contig=None, start=None, stop=None, reopen=True)")},
97394 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_TabixIterator},
97395 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_TabixIterator},
97396 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_13TabixIterator_7__iter__},
97397 {Py_tp_iternext, (void *)__pyx_pw_5pysam_7libcbcf_13TabixIterator_9__next__},
97398 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_TabixIterator},
97399 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_13TabixIterator_3__init__},
97400 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_TabixIterator},
97401 {0, 0},
97402 };
97403 static PyType_Spec __pyx_type_5pysam_7libcbcf_TabixIterator_spec = {
97404 "pysam.libcbcf.TabixIterator",
97405 sizeof(struct __pyx_obj_5pysam_7libcbcf_TabixIterator),
97406 0,
97407 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
97408 __pyx_type_5pysam_7libcbcf_TabixIterator_slots,
97409 };
97410 #else
97411
97412 static PyTypeObject __pyx_type_5pysam_7libcbcf_TabixIterator = {
97413 PyVarObject_HEAD_INIT(0, 0)
97414 "pysam.libcbcf.""TabixIterator", /*tp_name*/
97415 sizeof(struct __pyx_obj_5pysam_7libcbcf_TabixIterator), /*tp_basicsize*/
97416 0, /*tp_itemsize*/
97417 __pyx_tp_dealloc_5pysam_7libcbcf_TabixIterator, /*tp_dealloc*/
97418 #if PY_VERSION_HEX < 0x030800b4
97419 0, /*tp_print*/
97420 #endif
97421 #if PY_VERSION_HEX >= 0x030800b4
97422 0, /*tp_vectorcall_offset*/
97423 #endif
97424 0, /*tp_getattr*/
97425 0, /*tp_setattr*/
97426 #if PY_MAJOR_VERSION < 3
97427 0, /*tp_compare*/
97428 #endif
97429 #if PY_MAJOR_VERSION >= 3
97430 0, /*tp_as_async*/
97431 #endif
97432 0, /*tp_repr*/
97433 0, /*tp_as_number*/
97434 0, /*tp_as_sequence*/
97435 0, /*tp_as_mapping*/
97436 0, /*tp_hash*/
97437 0, /*tp_call*/
97438 0, /*tp_str*/
97439 0, /*tp_getattro*/
97440 0, /*tp_setattro*/
97441 0, /*tp_as_buffer*/
97442 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
97443 PyDoc_STR("TabixIterator(VariantFile bcf, contig=None, start=None, stop=None, reopen=True)"), /*tp_doc*/
97444 __pyx_tp_traverse_5pysam_7libcbcf_TabixIterator, /*tp_traverse*/
97445 __pyx_tp_clear_5pysam_7libcbcf_TabixIterator, /*tp_clear*/
97446 0, /*tp_richcompare*/
97447 0, /*tp_weaklistoffset*/
97448 __pyx_pw_5pysam_7libcbcf_13TabixIterator_7__iter__, /*tp_iter*/
97449 __pyx_pw_5pysam_7libcbcf_13TabixIterator_9__next__, /*tp_iternext*/
97450 __pyx_methods_5pysam_7libcbcf_TabixIterator, /*tp_methods*/
97451 0, /*tp_members*/
97452 0, /*tp_getset*/
97453 0, /*tp_base*/
97454 0, /*tp_dict*/
97455 0, /*tp_descr_get*/
97456 0, /*tp_descr_set*/
97457 #if !CYTHON_USE_TYPE_SPECS
97458 0, /*tp_dictoffset*/
97459 #endif
97460 __pyx_pw_5pysam_7libcbcf_13TabixIterator_3__init__, /*tp_init*/
97461 0, /*tp_alloc*/
97462 __pyx_tp_new_5pysam_7libcbcf_TabixIterator, /*tp_new*/
97463 0, /*tp_free*/
97464 0, /*tp_is_gc*/
97465 0, /*tp_bases*/
97466 0, /*tp_mro*/
97467 0, /*tp_cache*/
97468 0, /*tp_subclasses*/
97469 0, /*tp_weaklist*/
97470 0, /*tp_del*/
97471 0, /*tp_version_tag*/
97472 #if PY_VERSION_HEX >= 0x030400a1
97473 #if CYTHON_USE_TP_FINALIZE
97474 0, /*tp_finalize*/
97475 #else
97476 NULL, /*tp_finalize*/
97477 #endif
97478 #endif
97479 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
97480 0, /*tp_vectorcall*/
97481 #endif
97482 #if __PYX_NEED_TP_PRINT_SLOT == 1
97483 0, /*tp_print*/
97484 #endif
97485 #if PY_VERSION_HEX >= 0x030C0000
97486 0, /*tp_watched*/
97487 #endif
97488 #if PY_VERSION_HEX >= 0x030d00A4
97489 0, /*tp_versions_used*/
97490 #endif
97491 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
97492 0, /*tp_pypy_flags*/
97493 #endif
97494 };
97495 #endif
97496 static struct __pyx_vtabstruct_5pysam_7libcbcf_VariantFile __pyx_vtable_5pysam_7libcbcf_VariantFile;
97497
97498 static PyObject *__pyx_tp_new_5pysam_7libcbcf_VariantFile(PyTypeObject *t, PyObject *a, PyObject *k) {
97499 struct __pyx_obj_5pysam_7libcbcf_VariantFile *p;
97500 PyObject *o = __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_10libchtslib_HTSFile, tp_new, newfunc)(t, a, k);
97501 if (unlikely(!o)) return 0;
97502 p = ((struct __pyx_obj_5pysam_7libcbcf_VariantFile *)o);
97503 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile*)__pyx_vtabptr_5pysam_7libcbcf_VariantFile;
97504 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
97505 p->index = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)Py_None); Py_INCREF(Py_None);
97506 if (unlikely(__pyx_pw_5pysam_7libcbcf_11VariantFile_1__cinit__(o, a, k) < 0)) goto bad;
97507 return o;
97508 bad:
97509 Py_DECREF(o); o = 0;
97510 return NULL;
97511 }
97512
97513 static void __pyx_tp_dealloc_5pysam_7libcbcf_VariantFile(PyObject *o) {
97514 struct __pyx_obj_5pysam_7libcbcf_VariantFile *p = (struct __pyx_obj_5pysam_7libcbcf_VariantFile *)o;
97515 #if CYTHON_USE_TP_FINALIZE
97516 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
97517 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf_VariantFile) {
97518 if (PyObject_CallFinalizerFromDealloc(o)) return;
97519 }
97520 }
97521 #endif
97522 PyObject_GC_UnTrack(o);
97523 {
97524 PyObject *etype, *eval, *etb;
97525 PyErr_Fetch(&etype, &eval, &etb);
97526 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
97527 __pyx_pw_5pysam_7libcbcf_11VariantFile_5__dealloc__(o);
97528 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
97529 PyErr_Restore(etype, eval, etb);
97530 }
97531 Py_CLEAR(p->header);
97532 Py_CLEAR(p->index);
97533 #if PY_MAJOR_VERSION < 3
97534 if (!(__pyx_ptype_5pysam_10libchtslib_HTSFile) || PyType_IS_GC(__pyx_ptype_5pysam_10libchtslib_HTSFile)) PyObject_GC_Track(o);
97535 #else
97536 if (PyType_IS_GC(__pyx_ptype_5pysam_10libchtslib_HTSFile)) PyObject_GC_Track(o);
97537 #endif
97538 if (likely(__pyx_ptype_5pysam_10libchtslib_HTSFile)) __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_10libchtslib_HTSFile, tp_dealloc, destructor)(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_5pysam_7libcbcf_VariantFile);
97539 }
97540
97541 static int __pyx_tp_traverse_5pysam_7libcbcf_VariantFile(PyObject *o, visitproc v, void *a) {
97542 int e;
97543 struct __pyx_obj_5pysam_7libcbcf_VariantFile *p = (struct __pyx_obj_5pysam_7libcbcf_VariantFile *)o;
97544 e = ((likely(__pyx_ptype_5pysam_10libchtslib_HTSFile)) ? ((__pyx_ptype_5pysam_10libchtslib_HTSFile->tp_traverse) ? __pyx_ptype_5pysam_10libchtslib_HTSFile->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_7libcbcf_VariantFile)); if (e) return e;
97545 if (p->header) {
97546 e = (*v)(((PyObject *)p->header), a); if (e) return e;
97547 }
97548 if (p->index) {
97549 e = (*v)(((PyObject *)p->index), a); if (e) return e;
97550 }
97551 return 0;
97552 }
97553
97554 static int __pyx_tp_clear_5pysam_7libcbcf_VariantFile(PyObject *o) {
97555 PyObject* tmp;
97556 struct __pyx_obj_5pysam_7libcbcf_VariantFile *p = (struct __pyx_obj_5pysam_7libcbcf_VariantFile *)o;
97557 if (likely(__pyx_ptype_5pysam_10libchtslib_HTSFile)) { if (__pyx_ptype_5pysam_10libchtslib_HTSFile->tp_clear) __pyx_ptype_5pysam_10libchtslib_HTSFile->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_7libcbcf_VariantFile);
97558 tmp = ((PyObject*)p->header);
97559 p->header = ((struct __pyx_obj_5pysam_7libcbcf_VariantHeader *)Py_None); Py_INCREF(Py_None);
97560 Py_XDECREF(tmp);
97561 tmp = ((PyObject*)p->index);
97562 p->index = ((struct __pyx_obj_5pysam_7libcbcf_BaseIndex *)Py_None); Py_INCREF(Py_None);
97563 Py_XDECREF(tmp);
97564 return 0;
97565 }
97566
97567 static PyObject *__pyx_getprop_5pysam_7libcbcf_11VariantFile_header(PyObject *o, CYTHON_UNUSED void *x) {
97568 return __pyx_pw_5pysam_7libcbcf_11VariantFile_6header_1__get__(o);
97569 }
97570
97571 static PyObject *__pyx_getprop_5pysam_7libcbcf_11VariantFile_index(PyObject *o, CYTHON_UNUSED void *x) {
97572 return __pyx_pw_5pysam_7libcbcf_11VariantFile_5index_1__get__(o);
97573 }
97574
97575 static PyObject *__pyx_getprop_5pysam_7libcbcf_11VariantFile_drop_samples(PyObject *o, CYTHON_UNUSED void *x) {
97576 return __pyx_pw_5pysam_7libcbcf_11VariantFile_12drop_samples_1__get__(o);
97577 }
97578
97579 static PyObject *__pyx_getprop_5pysam_7libcbcf_11VariantFile_is_reading(PyObject *o, CYTHON_UNUSED void *x) {
97580 return __pyx_pw_5pysam_7libcbcf_11VariantFile_10is_reading_1__get__(o);
97581 }
97582
97583 static PyObject *__pyx_getprop_5pysam_7libcbcf_11VariantFile_header_written(PyObject *o, CYTHON_UNUSED void *x) {
97584 return __pyx_pw_5pysam_7libcbcf_11VariantFile_14header_written_1__get__(o);
97585 }
97586
97587 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_7libcbcf_11VariantFile_11__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
97588 PyObject *res = __pyx_pw_5pysam_7libcbcf_11VariantFile_11__next__(self);
97589 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
97590 return res;
97591 }
97592
97593 static PyMethodDef __pyx_methods_5pysam_7libcbcf_VariantFile[] = {
97594 {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_7close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_6close},
97595 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_7libcbcf_11VariantFile_11__next__, METH_NOARGS|METH_COEXIST, 0},
97596 {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_13copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_12copy},
97597 {"open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_15open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_14open},
97598 {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_17reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_16reset},
97599 {"is_valid_tid", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_19is_valid_tid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_18is_valid_tid},
97600 {"get_tid", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_21get_tid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_20get_tid},
97601 {"get_reference_name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_23get_reference_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_22get_reference_name},
97602 {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_25fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_24fetch},
97603 {"new_record", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_27new_record, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_26new_record},
97604 {"subset_samples", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_31subset_samples, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_30subset_samples},
97605 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_33__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_32__reduce_cython__},
97606 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcbcf_11VariantFile_35__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcbcf_11VariantFile_34__setstate_cython__},
97607 {0, 0, 0, 0}
97608 };
97609
97610 static struct PyGetSetDef __pyx_getsets_5pysam_7libcbcf_VariantFile[] = {
97611 {(char *)"header", __pyx_getprop_5pysam_7libcbcf_11VariantFile_header, 0, (char *)0, 0},
97612 {(char *)"index", __pyx_getprop_5pysam_7libcbcf_11VariantFile_index, 0, (char *)0, 0},
97613 {(char *)"drop_samples", __pyx_getprop_5pysam_7libcbcf_11VariantFile_drop_samples, 0, (char *)0, 0},
97614 {(char *)"is_reading", __pyx_getprop_5pysam_7libcbcf_11VariantFile_is_reading, 0, (char *)0, 0},
97615 {(char *)"header_written", __pyx_getprop_5pysam_7libcbcf_11VariantFile_header_written, 0, (char *)0, 0},
97616 {0, 0, 0, 0, 0}
97617 };
97618 #if CYTHON_USE_TYPE_SPECS
97619 static PyType_Slot __pyx_type_5pysam_7libcbcf_VariantFile_slots[] = {
97620 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf_VariantFile},
97621 {Py_tp_doc, (void *)PyDoc_STR("VariantFile(*args, **kwargs)\n*(filename, mode=None, index_filename=None, header=None, drop_samples=False,\n duplicate_filehandle=True, ignore_truncation=False, threads=1)*\n\n A :term:`VCF`/:term:`BCF` formatted file. The file is automatically\n opened.\n\n If an index for a variant file exists (.csi or .tbi), it will be\n opened automatically. Without an index random access to records\n via :meth:`fetch` is disabled.\n\n For writing, a :class:`VariantHeader` object must be provided,\n typically obtained from another :term:`VCF` file/:term:`BCF`\n file.\n\n Parameters\n ----------\n mode : string\n *mode* should be ``r`` for reading or ``w`` for writing. The default is\n text mode (:term:`VCF`). For binary (:term:`BCF`) I/O you should append\n ``b`` for compressed or ``u`` for uncompressed :term:`BCF` output.\n\n If ``b`` is present, it must immediately follow ``r`` or ``w``. Valid\n modes are ``r``, ``w``, ``wh``, ``rb``, ``wb``, ``wbu`` and ``wb0``.\n For instance, to open a :term:`BCF` formatted file for reading, type::\n\n f = pysam.VariantFile('ex1.bcf','r')\n\n If mode is not specified, we will try to auto-detect the file type. All\n of the following should work::\n\n f1 = pysam.VariantFile('ex1.bcf')\n f2 = pysam.VariantFile('ex1.vcf')\n f3 = pysam.VariantFile('ex1.vcf.gz')\n\n index_filename : string\n Explicit path to an index file.\n\n header : VariantHeader\n :class:`VariantHeader` object required for writing.\n\n drop_samples: bool\n Ignore sample information when reading.\n\n duplicate_filehandle: bool\n By default, file handles passed either directly or through\n File-like objects will be duplicated before passing them to\n htslib. The duplication prevents issues where the same stream\n will be closed by htslib and through destruction of the\n hig""h-level python object. Set to False to turn off\n duplication.\n\n ignore_truncation: bool\n Issue a warning, instead of raising an error if the current file\n appears to be truncated due to a missing EOF marker. Only applies\n to bgzipped formats. (Default=False)\n\n threads: integer\n Number of threads to use for compressing/decompressing VCF/BCF files.\n Setting threads to > 1 cannot be combined with `ignore_truncation`.\n (Default=1)\n\n ")},
97622 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf_VariantFile},
97623 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf_VariantFile},
97624 {Py_tp_iter, (void *)__pyx_pw_5pysam_7libcbcf_11VariantFile_9__iter__},
97625 {Py_tp_iternext, (void *)__pyx_pw_5pysam_7libcbcf_11VariantFile_11__next__},
97626 {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcbcf_VariantFile},
97627 {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcbcf_VariantFile},
97628 {Py_tp_init, (void *)__pyx_pw_5pysam_7libcbcf_11VariantFile_3__init__},
97629 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf_VariantFile},
97630 {0, 0},
97631 };
97632 static PyType_Spec __pyx_type_5pysam_7libcbcf_VariantFile_spec = {
97633 "pysam.libcbcf.VariantFile",
97634 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantFile),
97635 0,
97636 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
97637 __pyx_type_5pysam_7libcbcf_VariantFile_slots,
97638 };
97639 #else
97640
97641 static PyTypeObject __pyx_type_5pysam_7libcbcf_VariantFile = {
97642 PyVarObject_HEAD_INIT(0, 0)
97643 "pysam.libcbcf.""VariantFile", /*tp_name*/
97644 sizeof(struct __pyx_obj_5pysam_7libcbcf_VariantFile), /*tp_basicsize*/
97645 0, /*tp_itemsize*/
97646 __pyx_tp_dealloc_5pysam_7libcbcf_VariantFile, /*tp_dealloc*/
97647 #if PY_VERSION_HEX < 0x030800b4
97648 0, /*tp_print*/
97649 #endif
97650 #if PY_VERSION_HEX >= 0x030800b4
97651 0, /*tp_vectorcall_offset*/
97652 #endif
97653 0, /*tp_getattr*/
97654 0, /*tp_setattr*/
97655 #if PY_MAJOR_VERSION < 3
97656 0, /*tp_compare*/
97657 #endif
97658 #if PY_MAJOR_VERSION >= 3
97659 0, /*tp_as_async*/
97660 #endif
97661 0, /*tp_repr*/
97662 0, /*tp_as_number*/
97663 0, /*tp_as_sequence*/
97664 0, /*tp_as_mapping*/
97665 0, /*tp_hash*/
97666 0, /*tp_call*/
97667 0, /*tp_str*/
97668 0, /*tp_getattro*/
97669 0, /*tp_setattro*/
97670 0, /*tp_as_buffer*/
97671 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
97672 PyDoc_STR("VariantFile(*args, **kwargs)\n*(filename, mode=None, index_filename=None, header=None, drop_samples=False,\n duplicate_filehandle=True, ignore_truncation=False, threads=1)*\n\n A :term:`VCF`/:term:`BCF` formatted file. The file is automatically\n opened.\n\n If an index for a variant file exists (.csi or .tbi), it will be\n opened automatically. Without an index random access to records\n via :meth:`fetch` is disabled.\n\n For writing, a :class:`VariantHeader` object must be provided,\n typically obtained from another :term:`VCF` file/:term:`BCF`\n file.\n\n Parameters\n ----------\n mode : string\n *mode* should be ``r`` for reading or ``w`` for writing. The default is\n text mode (:term:`VCF`). For binary (:term:`BCF`) I/O you should append\n ``b`` for compressed or ``u`` for uncompressed :term:`BCF` output.\n\n If ``b`` is present, it must immediately follow ``r`` or ``w``. Valid\n modes are ``r``, ``w``, ``wh``, ``rb``, ``wb``, ``wbu`` and ``wb0``.\n For instance, to open a :term:`BCF` formatted file for reading, type::\n\n f = pysam.VariantFile('ex1.bcf','r')\n\n If mode is not specified, we will try to auto-detect the file type. All\n of the following should work::\n\n f1 = pysam.VariantFile('ex1.bcf')\n f2 = pysam.VariantFile('ex1.vcf')\n f3 = pysam.VariantFile('ex1.vcf.gz')\n\n index_filename : string\n Explicit path to an index file.\n\n header : VariantHeader\n :class:`VariantHeader` object required for writing.\n\n drop_samples: bool\n Ignore sample information when reading.\n\n duplicate_filehandle: bool\n By default, file handles passed either directly or through\n File-like objects will be duplicated before passing them to\n htslib. The duplication prevents issues where the same stream\n will be closed by htslib and through destruction of the\n hig""h-level python object. Set to False to turn off\n duplication.\n\n ignore_truncation: bool\n Issue a warning, instead of raising an error if the current file\n appears to be truncated due to a missing EOF marker. Only applies\n to bgzipped formats. (Default=False)\n\n threads: integer\n Number of threads to use for compressing/decompressing VCF/BCF files.\n Setting threads to > 1 cannot be combined with `ignore_truncation`.\n (Default=1)\n\n "), /*tp_doc*/
97673 __pyx_tp_traverse_5pysam_7libcbcf_VariantFile, /*tp_traverse*/
97674 __pyx_tp_clear_5pysam_7libcbcf_VariantFile, /*tp_clear*/
97675 0, /*tp_richcompare*/
97676 0, /*tp_weaklistoffset*/
97677 __pyx_pw_5pysam_7libcbcf_11VariantFile_9__iter__, /*tp_iter*/
97678 __pyx_pw_5pysam_7libcbcf_11VariantFile_11__next__, /*tp_iternext*/
97679 __pyx_methods_5pysam_7libcbcf_VariantFile, /*tp_methods*/
97680 0, /*tp_members*/
97681 __pyx_getsets_5pysam_7libcbcf_VariantFile, /*tp_getset*/
97682 0, /*tp_base*/
97683 0, /*tp_dict*/
97684 0, /*tp_descr_get*/
97685 0, /*tp_descr_set*/
97686 #if !CYTHON_USE_TYPE_SPECS
97687 0, /*tp_dictoffset*/
97688 #endif
97689 __pyx_pw_5pysam_7libcbcf_11VariantFile_3__init__, /*tp_init*/
97690 0, /*tp_alloc*/
97691 __pyx_tp_new_5pysam_7libcbcf_VariantFile, /*tp_new*/
97692 0, /*tp_free*/
97693 0, /*tp_is_gc*/
97694 0, /*tp_bases*/
97695 0, /*tp_mro*/
97696 0, /*tp_cache*/
97697 0, /*tp_subclasses*/
97698 0, /*tp_weaklist*/
97699 0, /*tp_del*/
97700 0, /*tp_version_tag*/
97701 #if PY_VERSION_HEX >= 0x030400a1
97702 #if CYTHON_USE_TP_FINALIZE
97703 0, /*tp_finalize*/
97704 #else
97705 NULL, /*tp_finalize*/
97706 #endif
97707 #endif
97708 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
97709 0, /*tp_vectorcall*/
97710 #endif
97711 #if __PYX_NEED_TP_PRINT_SLOT == 1
97712 0, /*tp_print*/
97713 #endif
97714 #if PY_VERSION_HEX >= 0x030C0000
97715 0, /*tp_watched*/
97716 #endif
97717 #if PY_VERSION_HEX >= 0x030d00A4
97718 0, /*tp_versions_used*/
97719 #endif
97720 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
97721 0, /*tp_pypy_flags*/
97722 #endif
97723 };
97724 #endif
97725
97726 #if CYTHON_USE_FREELISTS
97727 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple[8];
97728 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple = 0;
97729 #endif
97730
97731 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
97732 PyObject *o;
97733 #if CYTHON_COMPILING_IN_LIMITED_API
97734 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
97735 o = alloc_func(t, 0);
97736 #else
97737 #if CYTHON_USE_FREELISTS
97738 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple)))) {
97739 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple];
97740 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple));
97741 (void) PyObject_INIT(o, t);
97742 } else
97743 #endif
97744 {
97745 o = (*t->tp_alloc)(t, 0);
97746 if (unlikely(!o)) return 0;
97747 }
97748 #endif
97749 return o;
97750 }
97751
97752 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple(PyObject *o) {
97753 #if CYTHON_USE_TP_FINALIZE
97754 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
97755 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple) {
97756 if (PyObject_CallFinalizerFromDealloc(o)) return;
97757 }
97758 }
97759 #endif
97760 #if CYTHON_USE_FREELISTS
97761 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple)))) {
97762 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple *)o);
97763 } else
97764 #endif
97765 {
97766 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
97767 (*Py_TYPE(o)->tp_free)(o);
97768 #else
97769 {
97770 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
97771 if (tp_free) tp_free(o);
97772 }
97773 #endif
97774 }
97775 }
97776 #if CYTHON_USE_TYPE_SPECS
97777 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple_slots[] = {
97778 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple},
97779 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple},
97780 {0, 0},
97781 };
97782 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple_spec = {
97783 "pysam.libcbcf.__pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple",
97784 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple),
97785 0,
97786 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE,
97787 __pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple_slots,
97788 };
97789 #else
97790
97791 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple = {
97792 PyVarObject_HEAD_INIT(0, 0)
97793 "pysam.libcbcf.""__pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple", /*tp_name*/
97794 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple), /*tp_basicsize*/
97795 0, /*tp_itemsize*/
97796 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple, /*tp_dealloc*/
97797 #if PY_VERSION_HEX < 0x030800b4
97798 0, /*tp_print*/
97799 #endif
97800 #if PY_VERSION_HEX >= 0x030800b4
97801 0, /*tp_vectorcall_offset*/
97802 #endif
97803 0, /*tp_getattr*/
97804 0, /*tp_setattr*/
97805 #if PY_MAJOR_VERSION < 3
97806 0, /*tp_compare*/
97807 #endif
97808 #if PY_MAJOR_VERSION >= 3
97809 0, /*tp_as_async*/
97810 #endif
97811 0, /*tp_repr*/
97812 0, /*tp_as_number*/
97813 0, /*tp_as_sequence*/
97814 0, /*tp_as_mapping*/
97815 0, /*tp_hash*/
97816 0, /*tp_call*/
97817 0, /*tp_str*/
97818 0, /*tp_getattro*/
97819 0, /*tp_setattro*/
97820 0, /*tp_as_buffer*/
97821 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
97822 0, /*tp_doc*/
97823 0, /*tp_traverse*/
97824 0, /*tp_clear*/
97825 0, /*tp_richcompare*/
97826 0, /*tp_weaklistoffset*/
97827 0, /*tp_iter*/
97828 0, /*tp_iternext*/
97829 0, /*tp_methods*/
97830 0, /*tp_members*/
97831 0, /*tp_getset*/
97832 0, /*tp_base*/
97833 0, /*tp_dict*/
97834 0, /*tp_descr_get*/
97835 0, /*tp_descr_set*/
97836 #if !CYTHON_USE_TYPE_SPECS
97837 0, /*tp_dictoffset*/
97838 #endif
97839 0, /*tp_init*/
97840 0, /*tp_alloc*/
97841 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple, /*tp_new*/
97842 0, /*tp_free*/
97843 0, /*tp_is_gc*/
97844 0, /*tp_bases*/
97845 0, /*tp_mro*/
97846 0, /*tp_cache*/
97847 0, /*tp_subclasses*/
97848 0, /*tp_weaklist*/
97849 0, /*tp_del*/
97850 0, /*tp_version_tag*/
97851 #if PY_VERSION_HEX >= 0x030400a1
97852 #if CYTHON_USE_TP_FINALIZE
97853 0, /*tp_finalize*/
97854 #else
97855 NULL, /*tp_finalize*/
97856 #endif
97857 #endif
97858 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
97859 0, /*tp_vectorcall*/
97860 #endif
97861 #if __PYX_NEED_TP_PRINT_SLOT == 1
97862 0, /*tp_print*/
97863 #endif
97864 #if PY_VERSION_HEX >= 0x030C0000
97865 0, /*tp_watched*/
97866 #endif
97867 #if PY_VERSION_HEX >= 0x030d00A4
97868 0, /*tp_versions_used*/
97869 #endif
97870 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
97871 0, /*tp_pypy_flags*/
97872 #endif
97873 };
97874 #endif
97875
97876 #if CYTHON_USE_FREELISTS
97877 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_1_genexpr[8];
97878 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_1_genexpr = 0;
97879 #endif
97880
97881 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
97882 PyObject *o;
97883 #if CYTHON_COMPILING_IN_LIMITED_API
97884 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
97885 o = alloc_func(t, 0);
97886 #else
97887 #if CYTHON_USE_FREELISTS
97888 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_1_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr)))) {
97889 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_1_genexpr[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_1_genexpr];
97890 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr));
97891 (void) PyObject_INIT(o, t);
97892 PyObject_GC_Track(o);
97893 } else
97894 #endif
97895 {
97896 o = (*t->tp_alloc)(t, 0);
97897 if (unlikely(!o)) return 0;
97898 }
97899 #endif
97900 return o;
97901 }
97902
97903 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_1_genexpr(PyObject *o) {
97904 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *)o;
97905 #if CYTHON_USE_TP_FINALIZE
97906 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
97907 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_1_genexpr) {
97908 if (PyObject_CallFinalizerFromDealloc(o)) return;
97909 }
97910 }
97911 #endif
97912 PyObject_GC_UnTrack(o);
97913 Py_CLEAR(p->__pyx_outer_scope);
97914 #if CYTHON_USE_FREELISTS
97915 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_1_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr)))) {
97916 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_1_genexpr[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *)o);
97917 } else
97918 #endif
97919 {
97920 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
97921 (*Py_TYPE(o)->tp_free)(o);
97922 #else
97923 {
97924 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
97925 if (tp_free) tp_free(o);
97926 }
97927 #endif
97928 }
97929 }
97930
97931 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
97932 int e;
97933 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr *)o;
97934 if (p->__pyx_outer_scope) {
97935 e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
97936 }
97937 return 0;
97938 }
97939 #if CYTHON_USE_TYPE_SPECS
97940 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr_slots[] = {
97941 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_1_genexpr},
97942 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_1_genexpr},
97943 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_1_genexpr},
97944 {0, 0},
97945 };
97946 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr_spec = {
97947 "pysam.libcbcf.__pyx_scope_struct_1_genexpr",
97948 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr),
97949 0,
97950 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
97951 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr_slots,
97952 };
97953 #else
97954
97955 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr = {
97956 PyVarObject_HEAD_INIT(0, 0)
97957 "pysam.libcbcf.""__pyx_scope_struct_1_genexpr", /*tp_name*/
97958 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
97959 0, /*tp_itemsize*/
97960 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
97961 #if PY_VERSION_HEX < 0x030800b4
97962 0, /*tp_print*/
97963 #endif
97964 #if PY_VERSION_HEX >= 0x030800b4
97965 0, /*tp_vectorcall_offset*/
97966 #endif
97967 0, /*tp_getattr*/
97968 0, /*tp_setattr*/
97969 #if PY_MAJOR_VERSION < 3
97970 0, /*tp_compare*/
97971 #endif
97972 #if PY_MAJOR_VERSION >= 3
97973 0, /*tp_as_async*/
97974 #endif
97975 0, /*tp_repr*/
97976 0, /*tp_as_number*/
97977 0, /*tp_as_sequence*/
97978 0, /*tp_as_mapping*/
97979 0, /*tp_hash*/
97980 0, /*tp_call*/
97981 0, /*tp_str*/
97982 0, /*tp_getattro*/
97983 0, /*tp_setattro*/
97984 0, /*tp_as_buffer*/
97985 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
97986 0, /*tp_doc*/
97987 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_1_genexpr, /*tp_traverse*/
97988 0, /*tp_clear*/
97989 0, /*tp_richcompare*/
97990 0, /*tp_weaklistoffset*/
97991 0, /*tp_iter*/
97992 0, /*tp_iternext*/
97993 0, /*tp_methods*/
97994 0, /*tp_members*/
97995 0, /*tp_getset*/
97996 0, /*tp_base*/
97997 0, /*tp_dict*/
97998 0, /*tp_descr_get*/
97999 0, /*tp_descr_set*/
98000 #if !CYTHON_USE_TYPE_SPECS
98001 0, /*tp_dictoffset*/
98002 #endif
98003 0, /*tp_init*/
98004 0, /*tp_alloc*/
98005 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_1_genexpr, /*tp_new*/
98006 0, /*tp_free*/
98007 0, /*tp_is_gc*/
98008 0, /*tp_bases*/
98009 0, /*tp_mro*/
98010 0, /*tp_cache*/
98011 0, /*tp_subclasses*/
98012 0, /*tp_weaklist*/
98013 0, /*tp_del*/
98014 0, /*tp_version_tag*/
98015 #if PY_VERSION_HEX >= 0x030400a1
98016 #if CYTHON_USE_TP_FINALIZE
98017 0, /*tp_finalize*/
98018 #else
98019 NULL, /*tp_finalize*/
98020 #endif
98021 #endif
98022 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
98023 0, /*tp_vectorcall*/
98024 #endif
98025 #if __PYX_NEED_TP_PRINT_SLOT == 1
98026 0, /*tp_print*/
98027 #endif
98028 #if PY_VERSION_HEX >= 0x030C0000
98029 0, /*tp_watched*/
98030 #endif
98031 #if PY_VERSION_HEX >= 0x030d00A4
98032 0, /*tp_versions_used*/
98033 #endif
98034 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
98035 0, /*tp_pypy_flags*/
98036 #endif
98037 };
98038 #endif
98039
98040 #if CYTHON_USE_FREELISTS
98041 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_2_genexpr[8];
98042 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_2_genexpr = 0;
98043 #endif
98044
98045 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
98046 PyObject *o;
98047 #if CYTHON_COMPILING_IN_LIMITED_API
98048 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
98049 o = alloc_func(t, 0);
98050 #else
98051 #if CYTHON_USE_FREELISTS
98052 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_2_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr)))) {
98053 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_2_genexpr[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_2_genexpr];
98054 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr));
98055 (void) PyObject_INIT(o, t);
98056 PyObject_GC_Track(o);
98057 } else
98058 #endif
98059 {
98060 o = (*t->tp_alloc)(t, 0);
98061 if (unlikely(!o)) return 0;
98062 }
98063 #endif
98064 return o;
98065 }
98066
98067 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_2_genexpr(PyObject *o) {
98068 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *)o;
98069 #if CYTHON_USE_TP_FINALIZE
98070 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
98071 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_2_genexpr) {
98072 if (PyObject_CallFinalizerFromDealloc(o)) return;
98073 }
98074 }
98075 #endif
98076 PyObject_GC_UnTrack(o);
98077 Py_CLEAR(p->__pyx_genexpr_arg_0);
98078 Py_CLEAR(p->__pyx_v_v);
98079 Py_CLEAR(p->__pyx_t_0);
98080 #if CYTHON_USE_FREELISTS
98081 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_2_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr)))) {
98082 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_2_genexpr[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *)o);
98083 } else
98084 #endif
98085 {
98086 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
98087 (*Py_TYPE(o)->tp_free)(o);
98088 #else
98089 {
98090 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
98091 if (tp_free) tp_free(o);
98092 }
98093 #endif
98094 }
98095 }
98096
98097 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
98098 int e;
98099 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr *)o;
98100 if (p->__pyx_v_v) {
98101 e = (*v)(p->__pyx_v_v, a); if (e) return e;
98102 }
98103 if (p->__pyx_t_0) {
98104 e = (*v)(p->__pyx_t_0, a); if (e) return e;
98105 }
98106 return 0;
98107 }
98108 #if CYTHON_USE_TYPE_SPECS
98109 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr_slots[] = {
98110 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_2_genexpr},
98111 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_2_genexpr},
98112 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_2_genexpr},
98113 {0, 0},
98114 };
98115 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr_spec = {
98116 "pysam.libcbcf.__pyx_scope_struct_2_genexpr",
98117 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr),
98118 0,
98119 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
98120 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr_slots,
98121 };
98122 #else
98123
98124 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr = {
98125 PyVarObject_HEAD_INIT(0, 0)
98126 "pysam.libcbcf.""__pyx_scope_struct_2_genexpr", /*tp_name*/
98127 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
98128 0, /*tp_itemsize*/
98129 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
98130 #if PY_VERSION_HEX < 0x030800b4
98131 0, /*tp_print*/
98132 #endif
98133 #if PY_VERSION_HEX >= 0x030800b4
98134 0, /*tp_vectorcall_offset*/
98135 #endif
98136 0, /*tp_getattr*/
98137 0, /*tp_setattr*/
98138 #if PY_MAJOR_VERSION < 3
98139 0, /*tp_compare*/
98140 #endif
98141 #if PY_MAJOR_VERSION >= 3
98142 0, /*tp_as_async*/
98143 #endif
98144 0, /*tp_repr*/
98145 0, /*tp_as_number*/
98146 0, /*tp_as_sequence*/
98147 0, /*tp_as_mapping*/
98148 0, /*tp_hash*/
98149 0, /*tp_call*/
98150 0, /*tp_str*/
98151 0, /*tp_getattro*/
98152 0, /*tp_setattro*/
98153 0, /*tp_as_buffer*/
98154 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
98155 0, /*tp_doc*/
98156 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_2_genexpr, /*tp_traverse*/
98157 0, /*tp_clear*/
98158 0, /*tp_richcompare*/
98159 0, /*tp_weaklistoffset*/
98160 0, /*tp_iter*/
98161 0, /*tp_iternext*/
98162 0, /*tp_methods*/
98163 0, /*tp_members*/
98164 0, /*tp_getset*/
98165 0, /*tp_base*/
98166 0, /*tp_dict*/
98167 0, /*tp_descr_get*/
98168 0, /*tp_descr_set*/
98169 #if !CYTHON_USE_TYPE_SPECS
98170 0, /*tp_dictoffset*/
98171 #endif
98172 0, /*tp_init*/
98173 0, /*tp_alloc*/
98174 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_2_genexpr, /*tp_new*/
98175 0, /*tp_free*/
98176 0, /*tp_is_gc*/
98177 0, /*tp_bases*/
98178 0, /*tp_mro*/
98179 0, /*tp_cache*/
98180 0, /*tp_subclasses*/
98181 0, /*tp_weaklist*/
98182 0, /*tp_del*/
98183 0, /*tp_version_tag*/
98184 #if PY_VERSION_HEX >= 0x030400a1
98185 #if CYTHON_USE_TP_FINALIZE
98186 0, /*tp_finalize*/
98187 #else
98188 NULL, /*tp_finalize*/
98189 #endif
98190 #endif
98191 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
98192 0, /*tp_vectorcall*/
98193 #endif
98194 #if __PYX_NEED_TP_PRINT_SLOT == 1
98195 0, /*tp_print*/
98196 #endif
98197 #if PY_VERSION_HEX >= 0x030C0000
98198 0, /*tp_watched*/
98199 #endif
98200 #if PY_VERSION_HEX >= 0x030d00A4
98201 0, /*tp_versions_used*/
98202 #endif
98203 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
98204 0, /*tp_pypy_flags*/
98205 #endif
98206 };
98207 #endif
98208
98209 #if CYTHON_USE_FREELISTS
98210 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_3_genexpr[8];
98211 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_3_genexpr = 0;
98212 #endif
98213
98214 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
98215 PyObject *o;
98216 #if CYTHON_COMPILING_IN_LIMITED_API
98217 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
98218 o = alloc_func(t, 0);
98219 #else
98220 #if CYTHON_USE_FREELISTS
98221 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_3_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr)))) {
98222 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_3_genexpr[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_3_genexpr];
98223 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr));
98224 (void) PyObject_INIT(o, t);
98225 PyObject_GC_Track(o);
98226 } else
98227 #endif
98228 {
98229 o = (*t->tp_alloc)(t, 0);
98230 if (unlikely(!o)) return 0;
98231 }
98232 #endif
98233 return o;
98234 }
98235
98236 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_3_genexpr(PyObject *o) {
98237 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *)o;
98238 #if CYTHON_USE_TP_FINALIZE
98239 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
98240 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_3_genexpr) {
98241 if (PyObject_CallFinalizerFromDealloc(o)) return;
98242 }
98243 }
98244 #endif
98245 PyObject_GC_UnTrack(o);
98246 Py_CLEAR(p->__pyx_genexpr_arg_0);
98247 Py_CLEAR(p->__pyx_v_v);
98248 Py_CLEAR(p->__pyx_t_0);
98249 #if CYTHON_USE_FREELISTS
98250 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_3_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr)))) {
98251 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_3_genexpr[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *)o);
98252 } else
98253 #endif
98254 {
98255 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
98256 (*Py_TYPE(o)->tp_free)(o);
98257 #else
98258 {
98259 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
98260 if (tp_free) tp_free(o);
98261 }
98262 #endif
98263 }
98264 }
98265
98266 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
98267 int e;
98268 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr *)o;
98269 if (p->__pyx_genexpr_arg_0) {
98270 e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
98271 }
98272 if (p->__pyx_v_v) {
98273 e = (*v)(p->__pyx_v_v, a); if (e) return e;
98274 }
98275 if (p->__pyx_t_0) {
98276 e = (*v)(p->__pyx_t_0, a); if (e) return e;
98277 }
98278 return 0;
98279 }
98280 #if CYTHON_USE_TYPE_SPECS
98281 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr_slots[] = {
98282 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_3_genexpr},
98283 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_3_genexpr},
98284 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_3_genexpr},
98285 {0, 0},
98286 };
98287 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr_spec = {
98288 "pysam.libcbcf.__pyx_scope_struct_3_genexpr",
98289 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr),
98290 0,
98291 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
98292 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr_slots,
98293 };
98294 #else
98295
98296 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr = {
98297 PyVarObject_HEAD_INIT(0, 0)
98298 "pysam.libcbcf.""__pyx_scope_struct_3_genexpr", /*tp_name*/
98299 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
98300 0, /*tp_itemsize*/
98301 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_3_genexpr, /*tp_dealloc*/
98302 #if PY_VERSION_HEX < 0x030800b4
98303 0, /*tp_print*/
98304 #endif
98305 #if PY_VERSION_HEX >= 0x030800b4
98306 0, /*tp_vectorcall_offset*/
98307 #endif
98308 0, /*tp_getattr*/
98309 0, /*tp_setattr*/
98310 #if PY_MAJOR_VERSION < 3
98311 0, /*tp_compare*/
98312 #endif
98313 #if PY_MAJOR_VERSION >= 3
98314 0, /*tp_as_async*/
98315 #endif
98316 0, /*tp_repr*/
98317 0, /*tp_as_number*/
98318 0, /*tp_as_sequence*/
98319 0, /*tp_as_mapping*/
98320 0, /*tp_hash*/
98321 0, /*tp_call*/
98322 0, /*tp_str*/
98323 0, /*tp_getattro*/
98324 0, /*tp_setattro*/
98325 0, /*tp_as_buffer*/
98326 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
98327 0, /*tp_doc*/
98328 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_3_genexpr, /*tp_traverse*/
98329 0, /*tp_clear*/
98330 0, /*tp_richcompare*/
98331 0, /*tp_weaklistoffset*/
98332 0, /*tp_iter*/
98333 0, /*tp_iternext*/
98334 0, /*tp_methods*/
98335 0, /*tp_members*/
98336 0, /*tp_getset*/
98337 0, /*tp_base*/
98338 0, /*tp_dict*/
98339 0, /*tp_descr_get*/
98340 0, /*tp_descr_set*/
98341 #if !CYTHON_USE_TYPE_SPECS
98342 0, /*tp_dictoffset*/
98343 #endif
98344 0, /*tp_init*/
98345 0, /*tp_alloc*/
98346 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_3_genexpr, /*tp_new*/
98347 0, /*tp_free*/
98348 0, /*tp_is_gc*/
98349 0, /*tp_bases*/
98350 0, /*tp_mro*/
98351 0, /*tp_cache*/
98352 0, /*tp_subclasses*/
98353 0, /*tp_weaklist*/
98354 0, /*tp_del*/
98355 0, /*tp_version_tag*/
98356 #if PY_VERSION_HEX >= 0x030400a1
98357 #if CYTHON_USE_TP_FINALIZE
98358 0, /*tp_finalize*/
98359 #else
98360 NULL, /*tp_finalize*/
98361 #endif
98362 #endif
98363 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
98364 0, /*tp_vectorcall*/
98365 #endif
98366 #if __PYX_NEED_TP_PRINT_SLOT == 1
98367 0, /*tp_print*/
98368 #endif
98369 #if PY_VERSION_HEX >= 0x030C0000
98370 0, /*tp_watched*/
98371 #endif
98372 #if PY_VERSION_HEX >= 0x030d00A4
98373 0, /*tp_versions_used*/
98374 #endif
98375 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
98376 0, /*tp_pypy_flags*/
98377 #endif
98378 };
98379 #endif
98380
98381 #if CYTHON_USE_FREELISTS
98382 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_4_genexpr[8];
98383 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_4_genexpr = 0;
98384 #endif
98385
98386 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
98387 PyObject *o;
98388 #if CYTHON_COMPILING_IN_LIMITED_API
98389 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
98390 o = alloc_func(t, 0);
98391 #else
98392 #if CYTHON_USE_FREELISTS
98393 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_4_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr)))) {
98394 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_4_genexpr[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_4_genexpr];
98395 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr));
98396 (void) PyObject_INIT(o, t);
98397 PyObject_GC_Track(o);
98398 } else
98399 #endif
98400 {
98401 o = (*t->tp_alloc)(t, 0);
98402 if (unlikely(!o)) return 0;
98403 }
98404 #endif
98405 return o;
98406 }
98407
98408 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_4_genexpr(PyObject *o) {
98409 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *)o;
98410 #if CYTHON_USE_TP_FINALIZE
98411 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
98412 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_4_genexpr) {
98413 if (PyObject_CallFinalizerFromDealloc(o)) return;
98414 }
98415 }
98416 #endif
98417 PyObject_GC_UnTrack(o);
98418 Py_CLEAR(p->__pyx_genexpr_arg_0);
98419 Py_CLEAR(p->__pyx_v_v);
98420 Py_CLEAR(p->__pyx_t_0);
98421 #if CYTHON_USE_FREELISTS
98422 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_4_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr)))) {
98423 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_4_genexpr[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *)o);
98424 } else
98425 #endif
98426 {
98427 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
98428 (*Py_TYPE(o)->tp_free)(o);
98429 #else
98430 {
98431 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
98432 if (tp_free) tp_free(o);
98433 }
98434 #endif
98435 }
98436 }
98437
98438 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
98439 int e;
98440 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr *)o;
98441 if (p->__pyx_genexpr_arg_0) {
98442 e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
98443 }
98444 if (p->__pyx_v_v) {
98445 e = (*v)(p->__pyx_v_v, a); if (e) return e;
98446 }
98447 if (p->__pyx_t_0) {
98448 e = (*v)(p->__pyx_t_0, a); if (e) return e;
98449 }
98450 return 0;
98451 }
98452 #if CYTHON_USE_TYPE_SPECS
98453 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr_slots[] = {
98454 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_4_genexpr},
98455 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_4_genexpr},
98456 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_4_genexpr},
98457 {0, 0},
98458 };
98459 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr_spec = {
98460 "pysam.libcbcf.__pyx_scope_struct_4_genexpr",
98461 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr),
98462 0,
98463 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
98464 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr_slots,
98465 };
98466 #else
98467
98468 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr = {
98469 PyVarObject_HEAD_INIT(0, 0)
98470 "pysam.libcbcf.""__pyx_scope_struct_4_genexpr", /*tp_name*/
98471 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
98472 0, /*tp_itemsize*/
98473 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
98474 #if PY_VERSION_HEX < 0x030800b4
98475 0, /*tp_print*/
98476 #endif
98477 #if PY_VERSION_HEX >= 0x030800b4
98478 0, /*tp_vectorcall_offset*/
98479 #endif
98480 0, /*tp_getattr*/
98481 0, /*tp_setattr*/
98482 #if PY_MAJOR_VERSION < 3
98483 0, /*tp_compare*/
98484 #endif
98485 #if PY_MAJOR_VERSION >= 3
98486 0, /*tp_as_async*/
98487 #endif
98488 0, /*tp_repr*/
98489 0, /*tp_as_number*/
98490 0, /*tp_as_sequence*/
98491 0, /*tp_as_mapping*/
98492 0, /*tp_hash*/
98493 0, /*tp_call*/
98494 0, /*tp_str*/
98495 0, /*tp_getattro*/
98496 0, /*tp_setattro*/
98497 0, /*tp_as_buffer*/
98498 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
98499 0, /*tp_doc*/
98500 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_4_genexpr, /*tp_traverse*/
98501 0, /*tp_clear*/
98502 0, /*tp_richcompare*/
98503 0, /*tp_weaklistoffset*/
98504 0, /*tp_iter*/
98505 0, /*tp_iternext*/
98506 0, /*tp_methods*/
98507 0, /*tp_members*/
98508 0, /*tp_getset*/
98509 0, /*tp_base*/
98510 0, /*tp_dict*/
98511 0, /*tp_descr_get*/
98512 0, /*tp_descr_set*/
98513 #if !CYTHON_USE_TYPE_SPECS
98514 0, /*tp_dictoffset*/
98515 #endif
98516 0, /*tp_init*/
98517 0, /*tp_alloc*/
98518 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_4_genexpr, /*tp_new*/
98519 0, /*tp_free*/
98520 0, /*tp_is_gc*/
98521 0, /*tp_bases*/
98522 0, /*tp_mro*/
98523 0, /*tp_cache*/
98524 0, /*tp_subclasses*/
98525 0, /*tp_weaklist*/
98526 0, /*tp_del*/
98527 0, /*tp_version_tag*/
98528 #if PY_VERSION_HEX >= 0x030400a1
98529 #if CYTHON_USE_TP_FINALIZE
98530 0, /*tp_finalize*/
98531 #else
98532 NULL, /*tp_finalize*/
98533 #endif
98534 #endif
98535 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
98536 0, /*tp_vectorcall*/
98537 #endif
98538 #if __PYX_NEED_TP_PRINT_SLOT == 1
98539 0, /*tp_print*/
98540 #endif
98541 #if PY_VERSION_HEX >= 0x030C0000
98542 0, /*tp_watched*/
98543 #endif
98544 #if PY_VERSION_HEX >= 0x030d00A4
98545 0, /*tp_versions_used*/
98546 #endif
98547 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
98548 0, /*tp_pypy_flags*/
98549 #endif
98550 };
98551 #endif
98552
98553 #if CYTHON_USE_FREELISTS
98554 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_5___get__[8];
98555 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_5___get__ = 0;
98556 #endif
98557
98558 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_5___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
98559 PyObject *o;
98560 #if CYTHON_COMPILING_IN_LIMITED_API
98561 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
98562 o = alloc_func(t, 0);
98563 #else
98564 #if CYTHON_USE_FREELISTS
98565 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_5___get__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__)))) {
98566 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_5___get__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_5___get__];
98567 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__));
98568 (void) PyObject_INIT(o, t);
98569 } else
98570 #endif
98571 {
98572 o = (*t->tp_alloc)(t, 0);
98573 if (unlikely(!o)) return 0;
98574 }
98575 #endif
98576 return o;
98577 }
98578
98579 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_5___get__(PyObject *o) {
98580 #if CYTHON_USE_TP_FINALIZE
98581 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
98582 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_5___get__) {
98583 if (PyObject_CallFinalizerFromDealloc(o)) return;
98584 }
98585 }
98586 #endif
98587 #if CYTHON_USE_FREELISTS
98588 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_5___get__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__)))) {
98589 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_5___get__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_5___get__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__ *)o);
98590 } else
98591 #endif
98592 {
98593 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
98594 (*Py_TYPE(o)->tp_free)(o);
98595 #else
98596 {
98597 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
98598 if (tp_free) tp_free(o);
98599 }
98600 #endif
98601 }
98602 }
98603 #if CYTHON_USE_TYPE_SPECS
98604 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get___slots[] = {
98605 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_5___get__},
98606 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_5___get__},
98607 {0, 0},
98608 };
98609 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get___spec = {
98610 "pysam.libcbcf.__pyx_scope_struct_5___get__",
98611 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__),
98612 0,
98613 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE,
98614 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get___slots,
98615 };
98616 #else
98617
98618 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get__ = {
98619 PyVarObject_HEAD_INIT(0, 0)
98620 "pysam.libcbcf.""__pyx_scope_struct_5___get__", /*tp_name*/
98621 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_5___get__), /*tp_basicsize*/
98622 0, /*tp_itemsize*/
98623 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_5___get__, /*tp_dealloc*/
98624 #if PY_VERSION_HEX < 0x030800b4
98625 0, /*tp_print*/
98626 #endif
98627 #if PY_VERSION_HEX >= 0x030800b4
98628 0, /*tp_vectorcall_offset*/
98629 #endif
98630 0, /*tp_getattr*/
98631 0, /*tp_setattr*/
98632 #if PY_MAJOR_VERSION < 3
98633 0, /*tp_compare*/
98634 #endif
98635 #if PY_MAJOR_VERSION >= 3
98636 0, /*tp_as_async*/
98637 #endif
98638 0, /*tp_repr*/
98639 0, /*tp_as_number*/
98640 0, /*tp_as_sequence*/
98641 0, /*tp_as_mapping*/
98642 0, /*tp_hash*/
98643 0, /*tp_call*/
98644 0, /*tp_str*/
98645 0, /*tp_getattro*/
98646 0, /*tp_setattro*/
98647 0, /*tp_as_buffer*/
98648 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
98649 0, /*tp_doc*/
98650 0, /*tp_traverse*/
98651 0, /*tp_clear*/
98652 0, /*tp_richcompare*/
98653 0, /*tp_weaklistoffset*/
98654 0, /*tp_iter*/
98655 0, /*tp_iternext*/
98656 0, /*tp_methods*/
98657 0, /*tp_members*/
98658 0, /*tp_getset*/
98659 0, /*tp_base*/
98660 0, /*tp_dict*/
98661 0, /*tp_descr_get*/
98662 0, /*tp_descr_set*/
98663 #if !CYTHON_USE_TYPE_SPECS
98664 0, /*tp_dictoffset*/
98665 #endif
98666 0, /*tp_init*/
98667 0, /*tp_alloc*/
98668 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_5___get__, /*tp_new*/
98669 0, /*tp_free*/
98670 0, /*tp_is_gc*/
98671 0, /*tp_bases*/
98672 0, /*tp_mro*/
98673 0, /*tp_cache*/
98674 0, /*tp_subclasses*/
98675 0, /*tp_weaklist*/
98676 0, /*tp_del*/
98677 0, /*tp_version_tag*/
98678 #if PY_VERSION_HEX >= 0x030400a1
98679 #if CYTHON_USE_TP_FINALIZE
98680 0, /*tp_finalize*/
98681 #else
98682 NULL, /*tp_finalize*/
98683 #endif
98684 #endif
98685 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
98686 0, /*tp_vectorcall*/
98687 #endif
98688 #if __PYX_NEED_TP_PRINT_SLOT == 1
98689 0, /*tp_print*/
98690 #endif
98691 #if PY_VERSION_HEX >= 0x030C0000
98692 0, /*tp_watched*/
98693 #endif
98694 #if PY_VERSION_HEX >= 0x030d00A4
98695 0, /*tp_versions_used*/
98696 #endif
98697 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
98698 0, /*tp_pypy_flags*/
98699 #endif
98700 };
98701 #endif
98702
98703 #if CYTHON_USE_FREELISTS
98704 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_6_genexpr[8];
98705 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_6_genexpr = 0;
98706 #endif
98707
98708 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
98709 PyObject *o;
98710 #if CYTHON_COMPILING_IN_LIMITED_API
98711 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
98712 o = alloc_func(t, 0);
98713 #else
98714 #if CYTHON_USE_FREELISTS
98715 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_6_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr)))) {
98716 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_6_genexpr[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_6_genexpr];
98717 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr));
98718 (void) PyObject_INIT(o, t);
98719 PyObject_GC_Track(o);
98720 } else
98721 #endif
98722 {
98723 o = (*t->tp_alloc)(t, 0);
98724 if (unlikely(!o)) return 0;
98725 }
98726 #endif
98727 return o;
98728 }
98729
98730 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_6_genexpr(PyObject *o) {
98731 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *)o;
98732 #if CYTHON_USE_TP_FINALIZE
98733 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
98734 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_6_genexpr) {
98735 if (PyObject_CallFinalizerFromDealloc(o)) return;
98736 }
98737 }
98738 #endif
98739 PyObject_GC_UnTrack(o);
98740 Py_CLEAR(p->__pyx_outer_scope);
98741 #if CYTHON_USE_FREELISTS
98742 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_6_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr)))) {
98743 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_6_genexpr[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *)o);
98744 } else
98745 #endif
98746 {
98747 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
98748 (*Py_TYPE(o)->tp_free)(o);
98749 #else
98750 {
98751 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
98752 if (tp_free) tp_free(o);
98753 }
98754 #endif
98755 }
98756 }
98757
98758 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) {
98759 int e;
98760 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr *)o;
98761 if (p->__pyx_outer_scope) {
98762 e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
98763 }
98764 return 0;
98765 }
98766 #if CYTHON_USE_TYPE_SPECS
98767 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr_slots[] = {
98768 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_6_genexpr},
98769 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_6_genexpr},
98770 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_6_genexpr},
98771 {0, 0},
98772 };
98773 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr_spec = {
98774 "pysam.libcbcf.__pyx_scope_struct_6_genexpr",
98775 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr),
98776 0,
98777 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
98778 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr_slots,
98779 };
98780 #else
98781
98782 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr = {
98783 PyVarObject_HEAD_INIT(0, 0)
98784 "pysam.libcbcf.""__pyx_scope_struct_6_genexpr", /*tp_name*/
98785 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_6_genexpr), /*tp_basicsize*/
98786 0, /*tp_itemsize*/
98787 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_6_genexpr, /*tp_dealloc*/
98788 #if PY_VERSION_HEX < 0x030800b4
98789 0, /*tp_print*/
98790 #endif
98791 #if PY_VERSION_HEX >= 0x030800b4
98792 0, /*tp_vectorcall_offset*/
98793 #endif
98794 0, /*tp_getattr*/
98795 0, /*tp_setattr*/
98796 #if PY_MAJOR_VERSION < 3
98797 0, /*tp_compare*/
98798 #endif
98799 #if PY_MAJOR_VERSION >= 3
98800 0, /*tp_as_async*/
98801 #endif
98802 0, /*tp_repr*/
98803 0, /*tp_as_number*/
98804 0, /*tp_as_sequence*/
98805 0, /*tp_as_mapping*/
98806 0, /*tp_hash*/
98807 0, /*tp_call*/
98808 0, /*tp_str*/
98809 0, /*tp_getattro*/
98810 0, /*tp_setattro*/
98811 0, /*tp_as_buffer*/
98812 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
98813 0, /*tp_doc*/
98814 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_6_genexpr, /*tp_traverse*/
98815 0, /*tp_clear*/
98816 0, /*tp_richcompare*/
98817 0, /*tp_weaklistoffset*/
98818 0, /*tp_iter*/
98819 0, /*tp_iternext*/
98820 0, /*tp_methods*/
98821 0, /*tp_members*/
98822 0, /*tp_getset*/
98823 0, /*tp_base*/
98824 0, /*tp_dict*/
98825 0, /*tp_descr_get*/
98826 0, /*tp_descr_set*/
98827 #if !CYTHON_USE_TYPE_SPECS
98828 0, /*tp_dictoffset*/
98829 #endif
98830 0, /*tp_init*/
98831 0, /*tp_alloc*/
98832 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_6_genexpr, /*tp_new*/
98833 0, /*tp_free*/
98834 0, /*tp_is_gc*/
98835 0, /*tp_bases*/
98836 0, /*tp_mro*/
98837 0, /*tp_cache*/
98838 0, /*tp_subclasses*/
98839 0, /*tp_weaklist*/
98840 0, /*tp_del*/
98841 0, /*tp_version_tag*/
98842 #if PY_VERSION_HEX >= 0x030400a1
98843 #if CYTHON_USE_TP_FINALIZE
98844 0, /*tp_finalize*/
98845 #else
98846 NULL, /*tp_finalize*/
98847 #endif
98848 #endif
98849 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
98850 0, /*tp_vectorcall*/
98851 #endif
98852 #if __PYX_NEED_TP_PRINT_SLOT == 1
98853 0, /*tp_print*/
98854 #endif
98855 #if PY_VERSION_HEX >= 0x030C0000
98856 0, /*tp_watched*/
98857 #endif
98858 #if PY_VERSION_HEX >= 0x030d00A4
98859 0, /*tp_versions_used*/
98860 #endif
98861 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
98862 0, /*tp_pypy_flags*/
98863 #endif
98864 };
98865 #endif
98866
98867 #if CYTHON_USE_FREELISTS
98868 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_7___iter__[8];
98869 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_7___iter__ = 0;
98870 #endif
98871
98872 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
98873 PyObject *o;
98874 #if CYTHON_COMPILING_IN_LIMITED_API
98875 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
98876 o = alloc_func(t, 0);
98877 #else
98878 #if CYTHON_USE_FREELISTS
98879 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_7___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__)))) {
98880 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_7___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_7___iter__];
98881 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__));
98882 (void) PyObject_INIT(o, t);
98883 PyObject_GC_Track(o);
98884 } else
98885 #endif
98886 {
98887 o = (*t->tp_alloc)(t, 0);
98888 if (unlikely(!o)) return 0;
98889 }
98890 #endif
98891 return o;
98892 }
98893
98894 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_7___iter__(PyObject *o) {
98895 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *)o;
98896 #if CYTHON_USE_TP_FINALIZE
98897 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
98898 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_7___iter__) {
98899 if (PyObject_CallFinalizerFromDealloc(o)) return;
98900 }
98901 }
98902 #endif
98903 PyObject_GC_UnTrack(o);
98904 Py_CLEAR(p->__pyx_v_self);
98905 #if CYTHON_USE_FREELISTS
98906 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_7___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__)))) {
98907 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_7___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *)o);
98908 } else
98909 #endif
98910 {
98911 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
98912 (*Py_TYPE(o)->tp_free)(o);
98913 #else
98914 {
98915 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
98916 if (tp_free) tp_free(o);
98917 }
98918 #endif
98919 }
98920 }
98921
98922 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) {
98923 int e;
98924 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__ *)o;
98925 if (p->__pyx_v_self) {
98926 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
98927 }
98928 return 0;
98929 }
98930 #if CYTHON_USE_TYPE_SPECS
98931 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter___slots[] = {
98932 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_7___iter__},
98933 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_7___iter__},
98934 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_7___iter__},
98935 {0, 0},
98936 };
98937 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter___spec = {
98938 "pysam.libcbcf.__pyx_scope_struct_7___iter__",
98939 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__),
98940 0,
98941 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
98942 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter___slots,
98943 };
98944 #else
98945
98946 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter__ = {
98947 PyVarObject_HEAD_INIT(0, 0)
98948 "pysam.libcbcf.""__pyx_scope_struct_7___iter__", /*tp_name*/
98949 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_7___iter__), /*tp_basicsize*/
98950 0, /*tp_itemsize*/
98951 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_7___iter__, /*tp_dealloc*/
98952 #if PY_VERSION_HEX < 0x030800b4
98953 0, /*tp_print*/
98954 #endif
98955 #if PY_VERSION_HEX >= 0x030800b4
98956 0, /*tp_vectorcall_offset*/
98957 #endif
98958 0, /*tp_getattr*/
98959 0, /*tp_setattr*/
98960 #if PY_MAJOR_VERSION < 3
98961 0, /*tp_compare*/
98962 #endif
98963 #if PY_MAJOR_VERSION >= 3
98964 0, /*tp_as_async*/
98965 #endif
98966 0, /*tp_repr*/
98967 0, /*tp_as_number*/
98968 0, /*tp_as_sequence*/
98969 0, /*tp_as_mapping*/
98970 0, /*tp_hash*/
98971 0, /*tp_call*/
98972 0, /*tp_str*/
98973 0, /*tp_getattro*/
98974 0, /*tp_setattro*/
98975 0, /*tp_as_buffer*/
98976 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
98977 0, /*tp_doc*/
98978 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_7___iter__, /*tp_traverse*/
98979 0, /*tp_clear*/
98980 0, /*tp_richcompare*/
98981 0, /*tp_weaklistoffset*/
98982 0, /*tp_iter*/
98983 0, /*tp_iternext*/
98984 0, /*tp_methods*/
98985 0, /*tp_members*/
98986 0, /*tp_getset*/
98987 0, /*tp_base*/
98988 0, /*tp_dict*/
98989 0, /*tp_descr_get*/
98990 0, /*tp_descr_set*/
98991 #if !CYTHON_USE_TYPE_SPECS
98992 0, /*tp_dictoffset*/
98993 #endif
98994 0, /*tp_init*/
98995 0, /*tp_alloc*/
98996 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_7___iter__, /*tp_new*/
98997 0, /*tp_free*/
98998 0, /*tp_is_gc*/
98999 0, /*tp_bases*/
99000 0, /*tp_mro*/
99001 0, /*tp_cache*/
99002 0, /*tp_subclasses*/
99003 0, /*tp_weaklist*/
99004 0, /*tp_del*/
99005 0, /*tp_version_tag*/
99006 #if PY_VERSION_HEX >= 0x030400a1
99007 #if CYTHON_USE_TP_FINALIZE
99008 0, /*tp_finalize*/
99009 #else
99010 NULL, /*tp_finalize*/
99011 #endif
99012 #endif
99013 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
99014 0, /*tp_vectorcall*/
99015 #endif
99016 #if __PYX_NEED_TP_PRINT_SLOT == 1
99017 0, /*tp_print*/
99018 #endif
99019 #if PY_VERSION_HEX >= 0x030C0000
99020 0, /*tp_watched*/
99021 #endif
99022 #if PY_VERSION_HEX >= 0x030d00A4
99023 0, /*tp_versions_used*/
99024 #endif
99025 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
99026 0, /*tp_pypy_flags*/
99027 #endif
99028 };
99029 #endif
99030
99031 #if CYTHON_USE_FREELISTS
99032 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_8_itervalues[8];
99033 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_8_itervalues = 0;
99034 #endif
99035
99036 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_8_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
99037 PyObject *o;
99038 #if CYTHON_COMPILING_IN_LIMITED_API
99039 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
99040 o = alloc_func(t, 0);
99041 #else
99042 #if CYTHON_USE_FREELISTS
99043 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_8_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues)))) {
99044 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_8_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_8_itervalues];
99045 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues));
99046 (void) PyObject_INIT(o, t);
99047 PyObject_GC_Track(o);
99048 } else
99049 #endif
99050 {
99051 o = (*t->tp_alloc)(t, 0);
99052 if (unlikely(!o)) return 0;
99053 }
99054 #endif
99055 return o;
99056 }
99057
99058 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_8_itervalues(PyObject *o) {
99059 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *)o;
99060 #if CYTHON_USE_TP_FINALIZE
99061 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
99062 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_8_itervalues) {
99063 if (PyObject_CallFinalizerFromDealloc(o)) return;
99064 }
99065 }
99066 #endif
99067 PyObject_GC_UnTrack(o);
99068 Py_CLEAR(p->__pyx_v_self);
99069 #if CYTHON_USE_FREELISTS
99070 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_8_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues)))) {
99071 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_8_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_8_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *)o);
99072 } else
99073 #endif
99074 {
99075 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
99076 (*Py_TYPE(o)->tp_free)(o);
99077 #else
99078 {
99079 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
99080 if (tp_free) tp_free(o);
99081 }
99082 #endif
99083 }
99084 }
99085
99086 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_8_itervalues(PyObject *o, visitproc v, void *a) {
99087 int e;
99088 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues *)o;
99089 if (p->__pyx_v_self) {
99090 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
99091 }
99092 return 0;
99093 }
99094 #if CYTHON_USE_TYPE_SPECS
99095 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues_slots[] = {
99096 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_8_itervalues},
99097 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_8_itervalues},
99098 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_8_itervalues},
99099 {0, 0},
99100 };
99101 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues_spec = {
99102 "pysam.libcbcf.__pyx_scope_struct_8_itervalues",
99103 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues),
99104 0,
99105 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
99106 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues_slots,
99107 };
99108 #else
99109
99110 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues = {
99111 PyVarObject_HEAD_INIT(0, 0)
99112 "pysam.libcbcf.""__pyx_scope_struct_8_itervalues", /*tp_name*/
99113 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_8_itervalues), /*tp_basicsize*/
99114 0, /*tp_itemsize*/
99115 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_8_itervalues, /*tp_dealloc*/
99116 #if PY_VERSION_HEX < 0x030800b4
99117 0, /*tp_print*/
99118 #endif
99119 #if PY_VERSION_HEX >= 0x030800b4
99120 0, /*tp_vectorcall_offset*/
99121 #endif
99122 0, /*tp_getattr*/
99123 0, /*tp_setattr*/
99124 #if PY_MAJOR_VERSION < 3
99125 0, /*tp_compare*/
99126 #endif
99127 #if PY_MAJOR_VERSION >= 3
99128 0, /*tp_as_async*/
99129 #endif
99130 0, /*tp_repr*/
99131 0, /*tp_as_number*/
99132 0, /*tp_as_sequence*/
99133 0, /*tp_as_mapping*/
99134 0, /*tp_hash*/
99135 0, /*tp_call*/
99136 0, /*tp_str*/
99137 0, /*tp_getattro*/
99138 0, /*tp_setattro*/
99139 0, /*tp_as_buffer*/
99140 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
99141 0, /*tp_doc*/
99142 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_8_itervalues, /*tp_traverse*/
99143 0, /*tp_clear*/
99144 0, /*tp_richcompare*/
99145 0, /*tp_weaklistoffset*/
99146 0, /*tp_iter*/
99147 0, /*tp_iternext*/
99148 0, /*tp_methods*/
99149 0, /*tp_members*/
99150 0, /*tp_getset*/
99151 0, /*tp_base*/
99152 0, /*tp_dict*/
99153 0, /*tp_descr_get*/
99154 0, /*tp_descr_set*/
99155 #if !CYTHON_USE_TYPE_SPECS
99156 0, /*tp_dictoffset*/
99157 #endif
99158 0, /*tp_init*/
99159 0, /*tp_alloc*/
99160 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_8_itervalues, /*tp_new*/
99161 0, /*tp_free*/
99162 0, /*tp_is_gc*/
99163 0, /*tp_bases*/
99164 0, /*tp_mro*/
99165 0, /*tp_cache*/
99166 0, /*tp_subclasses*/
99167 0, /*tp_weaklist*/
99168 0, /*tp_del*/
99169 0, /*tp_version_tag*/
99170 #if PY_VERSION_HEX >= 0x030400a1
99171 #if CYTHON_USE_TP_FINALIZE
99172 0, /*tp_finalize*/
99173 #else
99174 NULL, /*tp_finalize*/
99175 #endif
99176 #endif
99177 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
99178 0, /*tp_vectorcall*/
99179 #endif
99180 #if __PYX_NEED_TP_PRINT_SLOT == 1
99181 0, /*tp_print*/
99182 #endif
99183 #if PY_VERSION_HEX >= 0x030C0000
99184 0, /*tp_watched*/
99185 #endif
99186 #if PY_VERSION_HEX >= 0x030d00A4
99187 0, /*tp_versions_used*/
99188 #endif
99189 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
99190 0, /*tp_pypy_flags*/
99191 #endif
99192 };
99193 #endif
99194
99195 #if CYTHON_USE_FREELISTS
99196 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_9_iteritems[8];
99197 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_9_iteritems = 0;
99198 #endif
99199
99200 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_9_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
99201 PyObject *o;
99202 #if CYTHON_COMPILING_IN_LIMITED_API
99203 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
99204 o = alloc_func(t, 0);
99205 #else
99206 #if CYTHON_USE_FREELISTS
99207 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_9_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems)))) {
99208 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_9_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_9_iteritems];
99209 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems));
99210 (void) PyObject_INIT(o, t);
99211 PyObject_GC_Track(o);
99212 } else
99213 #endif
99214 {
99215 o = (*t->tp_alloc)(t, 0);
99216 if (unlikely(!o)) return 0;
99217 }
99218 #endif
99219 return o;
99220 }
99221
99222 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_9_iteritems(PyObject *o) {
99223 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *)o;
99224 #if CYTHON_USE_TP_FINALIZE
99225 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
99226 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_9_iteritems) {
99227 if (PyObject_CallFinalizerFromDealloc(o)) return;
99228 }
99229 }
99230 #endif
99231 PyObject_GC_UnTrack(o);
99232 Py_CLEAR(p->__pyx_v_self);
99233 #if CYTHON_USE_FREELISTS
99234 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_9_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems)))) {
99235 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_9_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_9_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *)o);
99236 } else
99237 #endif
99238 {
99239 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
99240 (*Py_TYPE(o)->tp_free)(o);
99241 #else
99242 {
99243 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
99244 if (tp_free) tp_free(o);
99245 }
99246 #endif
99247 }
99248 }
99249
99250 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_9_iteritems(PyObject *o, visitproc v, void *a) {
99251 int e;
99252 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems *)o;
99253 if (p->__pyx_v_self) {
99254 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
99255 }
99256 return 0;
99257 }
99258 #if CYTHON_USE_TYPE_SPECS
99259 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems_slots[] = {
99260 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_9_iteritems},
99261 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_9_iteritems},
99262 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_9_iteritems},
99263 {0, 0},
99264 };
99265 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems_spec = {
99266 "pysam.libcbcf.__pyx_scope_struct_9_iteritems",
99267 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems),
99268 0,
99269 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
99270 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems_slots,
99271 };
99272 #else
99273
99274 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems = {
99275 PyVarObject_HEAD_INIT(0, 0)
99276 "pysam.libcbcf.""__pyx_scope_struct_9_iteritems", /*tp_name*/
99277 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_9_iteritems), /*tp_basicsize*/
99278 0, /*tp_itemsize*/
99279 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_9_iteritems, /*tp_dealloc*/
99280 #if PY_VERSION_HEX < 0x030800b4
99281 0, /*tp_print*/
99282 #endif
99283 #if PY_VERSION_HEX >= 0x030800b4
99284 0, /*tp_vectorcall_offset*/
99285 #endif
99286 0, /*tp_getattr*/
99287 0, /*tp_setattr*/
99288 #if PY_MAJOR_VERSION < 3
99289 0, /*tp_compare*/
99290 #endif
99291 #if PY_MAJOR_VERSION >= 3
99292 0, /*tp_as_async*/
99293 #endif
99294 0, /*tp_repr*/
99295 0, /*tp_as_number*/
99296 0, /*tp_as_sequence*/
99297 0, /*tp_as_mapping*/
99298 0, /*tp_hash*/
99299 0, /*tp_call*/
99300 0, /*tp_str*/
99301 0, /*tp_getattro*/
99302 0, /*tp_setattro*/
99303 0, /*tp_as_buffer*/
99304 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
99305 0, /*tp_doc*/
99306 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_9_iteritems, /*tp_traverse*/
99307 0, /*tp_clear*/
99308 0, /*tp_richcompare*/
99309 0, /*tp_weaklistoffset*/
99310 0, /*tp_iter*/
99311 0, /*tp_iternext*/
99312 0, /*tp_methods*/
99313 0, /*tp_members*/
99314 0, /*tp_getset*/
99315 0, /*tp_base*/
99316 0, /*tp_dict*/
99317 0, /*tp_descr_get*/
99318 0, /*tp_descr_set*/
99319 #if !CYTHON_USE_TYPE_SPECS
99320 0, /*tp_dictoffset*/
99321 #endif
99322 0, /*tp_init*/
99323 0, /*tp_alloc*/
99324 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_9_iteritems, /*tp_new*/
99325 0, /*tp_free*/
99326 0, /*tp_is_gc*/
99327 0, /*tp_bases*/
99328 0, /*tp_mro*/
99329 0, /*tp_cache*/
99330 0, /*tp_subclasses*/
99331 0, /*tp_weaklist*/
99332 0, /*tp_del*/
99333 0, /*tp_version_tag*/
99334 #if PY_VERSION_HEX >= 0x030400a1
99335 #if CYTHON_USE_TP_FINALIZE
99336 0, /*tp_finalize*/
99337 #else
99338 NULL, /*tp_finalize*/
99339 #endif
99340 #endif
99341 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
99342 0, /*tp_vectorcall*/
99343 #endif
99344 #if __PYX_NEED_TP_PRINT_SLOT == 1
99345 0, /*tp_print*/
99346 #endif
99347 #if PY_VERSION_HEX >= 0x030C0000
99348 0, /*tp_watched*/
99349 #endif
99350 #if PY_VERSION_HEX >= 0x030d00A4
99351 0, /*tp_versions_used*/
99352 #endif
99353 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
99354 0, /*tp_pypy_flags*/
99355 #endif
99356 };
99357 #endif
99358
99359 #if CYTHON_USE_FREELISTS
99360 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_10___iter__[8];
99361 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_10___iter__ = 0;
99362 #endif
99363
99364 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_10___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
99365 PyObject *o;
99366 #if CYTHON_COMPILING_IN_LIMITED_API
99367 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
99368 o = alloc_func(t, 0);
99369 #else
99370 #if CYTHON_USE_FREELISTS
99371 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_10___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__)))) {
99372 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_10___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_10___iter__];
99373 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__));
99374 (void) PyObject_INIT(o, t);
99375 PyObject_GC_Track(o);
99376 } else
99377 #endif
99378 {
99379 o = (*t->tp_alloc)(t, 0);
99380 if (unlikely(!o)) return 0;
99381 }
99382 #endif
99383 return o;
99384 }
99385
99386 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_10___iter__(PyObject *o) {
99387 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *)o;
99388 #if CYTHON_USE_TP_FINALIZE
99389 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
99390 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_10___iter__) {
99391 if (PyObject_CallFinalizerFromDealloc(o)) return;
99392 }
99393 }
99394 #endif
99395 PyObject_GC_UnTrack(o);
99396 Py_CLEAR(p->__pyx_v_self);
99397 #if CYTHON_USE_FREELISTS
99398 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_10___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__)))) {
99399 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_10___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_10___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *)o);
99400 } else
99401 #endif
99402 {
99403 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
99404 (*Py_TYPE(o)->tp_free)(o);
99405 #else
99406 {
99407 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
99408 if (tp_free) tp_free(o);
99409 }
99410 #endif
99411 }
99412 }
99413
99414 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_10___iter__(PyObject *o, visitproc v, void *a) {
99415 int e;
99416 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__ *)o;
99417 if (p->__pyx_v_self) {
99418 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
99419 }
99420 return 0;
99421 }
99422 #if CYTHON_USE_TYPE_SPECS
99423 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter___slots[] = {
99424 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_10___iter__},
99425 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_10___iter__},
99426 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_10___iter__},
99427 {0, 0},
99428 };
99429 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter___spec = {
99430 "pysam.libcbcf.__pyx_scope_struct_10___iter__",
99431 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__),
99432 0,
99433 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
99434 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter___slots,
99435 };
99436 #else
99437
99438 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter__ = {
99439 PyVarObject_HEAD_INIT(0, 0)
99440 "pysam.libcbcf.""__pyx_scope_struct_10___iter__", /*tp_name*/
99441 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_10___iter__), /*tp_basicsize*/
99442 0, /*tp_itemsize*/
99443 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_10___iter__, /*tp_dealloc*/
99444 #if PY_VERSION_HEX < 0x030800b4
99445 0, /*tp_print*/
99446 #endif
99447 #if PY_VERSION_HEX >= 0x030800b4
99448 0, /*tp_vectorcall_offset*/
99449 #endif
99450 0, /*tp_getattr*/
99451 0, /*tp_setattr*/
99452 #if PY_MAJOR_VERSION < 3
99453 0, /*tp_compare*/
99454 #endif
99455 #if PY_MAJOR_VERSION >= 3
99456 0, /*tp_as_async*/
99457 #endif
99458 0, /*tp_repr*/
99459 0, /*tp_as_number*/
99460 0, /*tp_as_sequence*/
99461 0, /*tp_as_mapping*/
99462 0, /*tp_hash*/
99463 0, /*tp_call*/
99464 0, /*tp_str*/
99465 0, /*tp_getattro*/
99466 0, /*tp_setattro*/
99467 0, /*tp_as_buffer*/
99468 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
99469 0, /*tp_doc*/
99470 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_10___iter__, /*tp_traverse*/
99471 0, /*tp_clear*/
99472 0, /*tp_richcompare*/
99473 0, /*tp_weaklistoffset*/
99474 0, /*tp_iter*/
99475 0, /*tp_iternext*/
99476 0, /*tp_methods*/
99477 0, /*tp_members*/
99478 0, /*tp_getset*/
99479 0, /*tp_base*/
99480 0, /*tp_dict*/
99481 0, /*tp_descr_get*/
99482 0, /*tp_descr_set*/
99483 #if !CYTHON_USE_TYPE_SPECS
99484 0, /*tp_dictoffset*/
99485 #endif
99486 0, /*tp_init*/
99487 0, /*tp_alloc*/
99488 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_10___iter__, /*tp_new*/
99489 0, /*tp_free*/
99490 0, /*tp_is_gc*/
99491 0, /*tp_bases*/
99492 0, /*tp_mro*/
99493 0, /*tp_cache*/
99494 0, /*tp_subclasses*/
99495 0, /*tp_weaklist*/
99496 0, /*tp_del*/
99497 0, /*tp_version_tag*/
99498 #if PY_VERSION_HEX >= 0x030400a1
99499 #if CYTHON_USE_TP_FINALIZE
99500 0, /*tp_finalize*/
99501 #else
99502 NULL, /*tp_finalize*/
99503 #endif
99504 #endif
99505 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
99506 0, /*tp_vectorcall*/
99507 #endif
99508 #if __PYX_NEED_TP_PRINT_SLOT == 1
99509 0, /*tp_print*/
99510 #endif
99511 #if PY_VERSION_HEX >= 0x030C0000
99512 0, /*tp_watched*/
99513 #endif
99514 #if PY_VERSION_HEX >= 0x030d00A4
99515 0, /*tp_versions_used*/
99516 #endif
99517 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
99518 0, /*tp_pypy_flags*/
99519 #endif
99520 };
99521 #endif
99522
99523 #if CYTHON_USE_FREELISTS
99524 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_11___iter__[8];
99525 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_11___iter__ = 0;
99526 #endif
99527
99528 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_11___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
99529 PyObject *o;
99530 #if CYTHON_COMPILING_IN_LIMITED_API
99531 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
99532 o = alloc_func(t, 0);
99533 #else
99534 #if CYTHON_USE_FREELISTS
99535 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_11___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__)))) {
99536 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_11___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_11___iter__];
99537 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__));
99538 (void) PyObject_INIT(o, t);
99539 PyObject_GC_Track(o);
99540 } else
99541 #endif
99542 {
99543 o = (*t->tp_alloc)(t, 0);
99544 if (unlikely(!o)) return 0;
99545 }
99546 #endif
99547 return o;
99548 }
99549
99550 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_11___iter__(PyObject *o) {
99551 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *)o;
99552 #if CYTHON_USE_TP_FINALIZE
99553 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
99554 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_11___iter__) {
99555 if (PyObject_CallFinalizerFromDealloc(o)) return;
99556 }
99557 }
99558 #endif
99559 PyObject_GC_UnTrack(o);
99560 Py_CLEAR(p->__pyx_v_self);
99561 #if CYTHON_USE_FREELISTS
99562 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_11___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__)))) {
99563 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_11___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_11___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *)o);
99564 } else
99565 #endif
99566 {
99567 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
99568 (*Py_TYPE(o)->tp_free)(o);
99569 #else
99570 {
99571 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
99572 if (tp_free) tp_free(o);
99573 }
99574 #endif
99575 }
99576 }
99577
99578 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_11___iter__(PyObject *o, visitproc v, void *a) {
99579 int e;
99580 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__ *)o;
99581 if (p->__pyx_v_self) {
99582 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
99583 }
99584 return 0;
99585 }
99586 #if CYTHON_USE_TYPE_SPECS
99587 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter___slots[] = {
99588 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_11___iter__},
99589 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_11___iter__},
99590 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_11___iter__},
99591 {0, 0},
99592 };
99593 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter___spec = {
99594 "pysam.libcbcf.__pyx_scope_struct_11___iter__",
99595 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__),
99596 0,
99597 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
99598 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter___slots,
99599 };
99600 #else
99601
99602 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter__ = {
99603 PyVarObject_HEAD_INIT(0, 0)
99604 "pysam.libcbcf.""__pyx_scope_struct_11___iter__", /*tp_name*/
99605 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_11___iter__), /*tp_basicsize*/
99606 0, /*tp_itemsize*/
99607 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_11___iter__, /*tp_dealloc*/
99608 #if PY_VERSION_HEX < 0x030800b4
99609 0, /*tp_print*/
99610 #endif
99611 #if PY_VERSION_HEX >= 0x030800b4
99612 0, /*tp_vectorcall_offset*/
99613 #endif
99614 0, /*tp_getattr*/
99615 0, /*tp_setattr*/
99616 #if PY_MAJOR_VERSION < 3
99617 0, /*tp_compare*/
99618 #endif
99619 #if PY_MAJOR_VERSION >= 3
99620 0, /*tp_as_async*/
99621 #endif
99622 0, /*tp_repr*/
99623 0, /*tp_as_number*/
99624 0, /*tp_as_sequence*/
99625 0, /*tp_as_mapping*/
99626 0, /*tp_hash*/
99627 0, /*tp_call*/
99628 0, /*tp_str*/
99629 0, /*tp_getattro*/
99630 0, /*tp_setattro*/
99631 0, /*tp_as_buffer*/
99632 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
99633 0, /*tp_doc*/
99634 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_11___iter__, /*tp_traverse*/
99635 0, /*tp_clear*/
99636 0, /*tp_richcompare*/
99637 0, /*tp_weaklistoffset*/
99638 0, /*tp_iter*/
99639 0, /*tp_iternext*/
99640 0, /*tp_methods*/
99641 0, /*tp_members*/
99642 0, /*tp_getset*/
99643 0, /*tp_base*/
99644 0, /*tp_dict*/
99645 0, /*tp_descr_get*/
99646 0, /*tp_descr_set*/
99647 #if !CYTHON_USE_TYPE_SPECS
99648 0, /*tp_dictoffset*/
99649 #endif
99650 0, /*tp_init*/
99651 0, /*tp_alloc*/
99652 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_11___iter__, /*tp_new*/
99653 0, /*tp_free*/
99654 0, /*tp_is_gc*/
99655 0, /*tp_bases*/
99656 0, /*tp_mro*/
99657 0, /*tp_cache*/
99658 0, /*tp_subclasses*/
99659 0, /*tp_weaklist*/
99660 0, /*tp_del*/
99661 0, /*tp_version_tag*/
99662 #if PY_VERSION_HEX >= 0x030400a1
99663 #if CYTHON_USE_TP_FINALIZE
99664 0, /*tp_finalize*/
99665 #else
99666 NULL, /*tp_finalize*/
99667 #endif
99668 #endif
99669 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
99670 0, /*tp_vectorcall*/
99671 #endif
99672 #if __PYX_NEED_TP_PRINT_SLOT == 1
99673 0, /*tp_print*/
99674 #endif
99675 #if PY_VERSION_HEX >= 0x030C0000
99676 0, /*tp_watched*/
99677 #endif
99678 #if PY_VERSION_HEX >= 0x030d00A4
99679 0, /*tp_versions_used*/
99680 #endif
99681 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
99682 0, /*tp_pypy_flags*/
99683 #endif
99684 };
99685 #endif
99686
99687 #if CYTHON_USE_FREELISTS
99688 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_12_itervalues[8];
99689 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_12_itervalues = 0;
99690 #endif
99691
99692 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_12_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
99693 PyObject *o;
99694 #if CYTHON_COMPILING_IN_LIMITED_API
99695 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
99696 o = alloc_func(t, 0);
99697 #else
99698 #if CYTHON_USE_FREELISTS
99699 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_12_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues)))) {
99700 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_12_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_12_itervalues];
99701 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues));
99702 (void) PyObject_INIT(o, t);
99703 PyObject_GC_Track(o);
99704 } else
99705 #endif
99706 {
99707 o = (*t->tp_alloc)(t, 0);
99708 if (unlikely(!o)) return 0;
99709 }
99710 #endif
99711 return o;
99712 }
99713
99714 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_12_itervalues(PyObject *o) {
99715 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *)o;
99716 #if CYTHON_USE_TP_FINALIZE
99717 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
99718 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_12_itervalues) {
99719 if (PyObject_CallFinalizerFromDealloc(o)) return;
99720 }
99721 }
99722 #endif
99723 PyObject_GC_UnTrack(o);
99724 Py_CLEAR(p->__pyx_v_key);
99725 Py_CLEAR(p->__pyx_v_self);
99726 Py_CLEAR(p->__pyx_t_0);
99727 #if CYTHON_USE_FREELISTS
99728 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_12_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues)))) {
99729 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_12_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_12_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *)o);
99730 } else
99731 #endif
99732 {
99733 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
99734 (*Py_TYPE(o)->tp_free)(o);
99735 #else
99736 {
99737 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
99738 if (tp_free) tp_free(o);
99739 }
99740 #endif
99741 }
99742 }
99743
99744 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_12_itervalues(PyObject *o, visitproc v, void *a) {
99745 int e;
99746 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues *)o;
99747 if (p->__pyx_v_key) {
99748 e = (*v)(p->__pyx_v_key, a); if (e) return e;
99749 }
99750 if (p->__pyx_v_self) {
99751 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
99752 }
99753 if (p->__pyx_t_0) {
99754 e = (*v)(p->__pyx_t_0, a); if (e) return e;
99755 }
99756 return 0;
99757 }
99758 #if CYTHON_USE_TYPE_SPECS
99759 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues_slots[] = {
99760 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_12_itervalues},
99761 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_12_itervalues},
99762 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_12_itervalues},
99763 {0, 0},
99764 };
99765 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues_spec = {
99766 "pysam.libcbcf.__pyx_scope_struct_12_itervalues",
99767 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues),
99768 0,
99769 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
99770 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues_slots,
99771 };
99772 #else
99773
99774 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues = {
99775 PyVarObject_HEAD_INIT(0, 0)
99776 "pysam.libcbcf.""__pyx_scope_struct_12_itervalues", /*tp_name*/
99777 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_12_itervalues), /*tp_basicsize*/
99778 0, /*tp_itemsize*/
99779 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_12_itervalues, /*tp_dealloc*/
99780 #if PY_VERSION_HEX < 0x030800b4
99781 0, /*tp_print*/
99782 #endif
99783 #if PY_VERSION_HEX >= 0x030800b4
99784 0, /*tp_vectorcall_offset*/
99785 #endif
99786 0, /*tp_getattr*/
99787 0, /*tp_setattr*/
99788 #if PY_MAJOR_VERSION < 3
99789 0, /*tp_compare*/
99790 #endif
99791 #if PY_MAJOR_VERSION >= 3
99792 0, /*tp_as_async*/
99793 #endif
99794 0, /*tp_repr*/
99795 0, /*tp_as_number*/
99796 0, /*tp_as_sequence*/
99797 0, /*tp_as_mapping*/
99798 0, /*tp_hash*/
99799 0, /*tp_call*/
99800 0, /*tp_str*/
99801 0, /*tp_getattro*/
99802 0, /*tp_setattro*/
99803 0, /*tp_as_buffer*/
99804 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
99805 0, /*tp_doc*/
99806 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_12_itervalues, /*tp_traverse*/
99807 0, /*tp_clear*/
99808 0, /*tp_richcompare*/
99809 0, /*tp_weaklistoffset*/
99810 0, /*tp_iter*/
99811 0, /*tp_iternext*/
99812 0, /*tp_methods*/
99813 0, /*tp_members*/
99814 0, /*tp_getset*/
99815 0, /*tp_base*/
99816 0, /*tp_dict*/
99817 0, /*tp_descr_get*/
99818 0, /*tp_descr_set*/
99819 #if !CYTHON_USE_TYPE_SPECS
99820 0, /*tp_dictoffset*/
99821 #endif
99822 0, /*tp_init*/
99823 0, /*tp_alloc*/
99824 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_12_itervalues, /*tp_new*/
99825 0, /*tp_free*/
99826 0, /*tp_is_gc*/
99827 0, /*tp_bases*/
99828 0, /*tp_mro*/
99829 0, /*tp_cache*/
99830 0, /*tp_subclasses*/
99831 0, /*tp_weaklist*/
99832 0, /*tp_del*/
99833 0, /*tp_version_tag*/
99834 #if PY_VERSION_HEX >= 0x030400a1
99835 #if CYTHON_USE_TP_FINALIZE
99836 0, /*tp_finalize*/
99837 #else
99838 NULL, /*tp_finalize*/
99839 #endif
99840 #endif
99841 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
99842 0, /*tp_vectorcall*/
99843 #endif
99844 #if __PYX_NEED_TP_PRINT_SLOT == 1
99845 0, /*tp_print*/
99846 #endif
99847 #if PY_VERSION_HEX >= 0x030C0000
99848 0, /*tp_watched*/
99849 #endif
99850 #if PY_VERSION_HEX >= 0x030d00A4
99851 0, /*tp_versions_used*/
99852 #endif
99853 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
99854 0, /*tp_pypy_flags*/
99855 #endif
99856 };
99857 #endif
99858
99859 #if CYTHON_USE_FREELISTS
99860 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_13_iteritems[8];
99861 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_13_iteritems = 0;
99862 #endif
99863
99864 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_13_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
99865 PyObject *o;
99866 #if CYTHON_COMPILING_IN_LIMITED_API
99867 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
99868 o = alloc_func(t, 0);
99869 #else
99870 #if CYTHON_USE_FREELISTS
99871 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_13_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems)))) {
99872 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_13_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_13_iteritems];
99873 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems));
99874 (void) PyObject_INIT(o, t);
99875 PyObject_GC_Track(o);
99876 } else
99877 #endif
99878 {
99879 o = (*t->tp_alloc)(t, 0);
99880 if (unlikely(!o)) return 0;
99881 }
99882 #endif
99883 return o;
99884 }
99885
99886 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_13_iteritems(PyObject *o) {
99887 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *)o;
99888 #if CYTHON_USE_TP_FINALIZE
99889 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
99890 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_13_iteritems) {
99891 if (PyObject_CallFinalizerFromDealloc(o)) return;
99892 }
99893 }
99894 #endif
99895 PyObject_GC_UnTrack(o);
99896 Py_CLEAR(p->__pyx_v_key);
99897 Py_CLEAR(p->__pyx_v_self);
99898 Py_CLEAR(p->__pyx_t_0);
99899 #if CYTHON_USE_FREELISTS
99900 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_13_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems)))) {
99901 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_13_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_13_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *)o);
99902 } else
99903 #endif
99904 {
99905 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
99906 (*Py_TYPE(o)->tp_free)(o);
99907 #else
99908 {
99909 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
99910 if (tp_free) tp_free(o);
99911 }
99912 #endif
99913 }
99914 }
99915
99916 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_13_iteritems(PyObject *o, visitproc v, void *a) {
99917 int e;
99918 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems *)o;
99919 if (p->__pyx_v_key) {
99920 e = (*v)(p->__pyx_v_key, a); if (e) return e;
99921 }
99922 if (p->__pyx_v_self) {
99923 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
99924 }
99925 if (p->__pyx_t_0) {
99926 e = (*v)(p->__pyx_t_0, a); if (e) return e;
99927 }
99928 return 0;
99929 }
99930 #if CYTHON_USE_TYPE_SPECS
99931 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems_slots[] = {
99932 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_13_iteritems},
99933 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_13_iteritems},
99934 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_13_iteritems},
99935 {0, 0},
99936 };
99937 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems_spec = {
99938 "pysam.libcbcf.__pyx_scope_struct_13_iteritems",
99939 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems),
99940 0,
99941 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
99942 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems_slots,
99943 };
99944 #else
99945
99946 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems = {
99947 PyVarObject_HEAD_INIT(0, 0)
99948 "pysam.libcbcf.""__pyx_scope_struct_13_iteritems", /*tp_name*/
99949 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_13_iteritems), /*tp_basicsize*/
99950 0, /*tp_itemsize*/
99951 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_13_iteritems, /*tp_dealloc*/
99952 #if PY_VERSION_HEX < 0x030800b4
99953 0, /*tp_print*/
99954 #endif
99955 #if PY_VERSION_HEX >= 0x030800b4
99956 0, /*tp_vectorcall_offset*/
99957 #endif
99958 0, /*tp_getattr*/
99959 0, /*tp_setattr*/
99960 #if PY_MAJOR_VERSION < 3
99961 0, /*tp_compare*/
99962 #endif
99963 #if PY_MAJOR_VERSION >= 3
99964 0, /*tp_as_async*/
99965 #endif
99966 0, /*tp_repr*/
99967 0, /*tp_as_number*/
99968 0, /*tp_as_sequence*/
99969 0, /*tp_as_mapping*/
99970 0, /*tp_hash*/
99971 0, /*tp_call*/
99972 0, /*tp_str*/
99973 0, /*tp_getattro*/
99974 0, /*tp_setattro*/
99975 0, /*tp_as_buffer*/
99976 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
99977 0, /*tp_doc*/
99978 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_13_iteritems, /*tp_traverse*/
99979 0, /*tp_clear*/
99980 0, /*tp_richcompare*/
99981 0, /*tp_weaklistoffset*/
99982 0, /*tp_iter*/
99983 0, /*tp_iternext*/
99984 0, /*tp_methods*/
99985 0, /*tp_members*/
99986 0, /*tp_getset*/
99987 0, /*tp_base*/
99988 0, /*tp_dict*/
99989 0, /*tp_descr_get*/
99990 0, /*tp_descr_set*/
99991 #if !CYTHON_USE_TYPE_SPECS
99992 0, /*tp_dictoffset*/
99993 #endif
99994 0, /*tp_init*/
99995 0, /*tp_alloc*/
99996 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_13_iteritems, /*tp_new*/
99997 0, /*tp_free*/
99998 0, /*tp_is_gc*/
99999 0, /*tp_bases*/
100000 0, /*tp_mro*/
100001 0, /*tp_cache*/
100002 0, /*tp_subclasses*/
100003 0, /*tp_weaklist*/
100004 0, /*tp_del*/
100005 0, /*tp_version_tag*/
100006 #if PY_VERSION_HEX >= 0x030400a1
100007 #if CYTHON_USE_TP_FINALIZE
100008 0, /*tp_finalize*/
100009 #else
100010 NULL, /*tp_finalize*/
100011 #endif
100012 #endif
100013 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
100014 0, /*tp_vectorcall*/
100015 #endif
100016 #if __PYX_NEED_TP_PRINT_SLOT == 1
100017 0, /*tp_print*/
100018 #endif
100019 #if PY_VERSION_HEX >= 0x030C0000
100020 0, /*tp_watched*/
100021 #endif
100022 #if PY_VERSION_HEX >= 0x030d00A4
100023 0, /*tp_versions_used*/
100024 #endif
100025 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
100026 0, /*tp_pypy_flags*/
100027 #endif
100028 };
100029 #endif
100030
100031 #if CYTHON_USE_FREELISTS
100032 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_14___iter__[8];
100033 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_14___iter__ = 0;
100034 #endif
100035
100036 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_14___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
100037 PyObject *o;
100038 #if CYTHON_COMPILING_IN_LIMITED_API
100039 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
100040 o = alloc_func(t, 0);
100041 #else
100042 #if CYTHON_USE_FREELISTS
100043 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_14___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__)))) {
100044 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_14___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_14___iter__];
100045 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__));
100046 (void) PyObject_INIT(o, t);
100047 PyObject_GC_Track(o);
100048 } else
100049 #endif
100050 {
100051 o = (*t->tp_alloc)(t, 0);
100052 if (unlikely(!o)) return 0;
100053 }
100054 #endif
100055 return o;
100056 }
100057
100058 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_14___iter__(PyObject *o) {
100059 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *)o;
100060 #if CYTHON_USE_TP_FINALIZE
100061 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
100062 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_14___iter__) {
100063 if (PyObject_CallFinalizerFromDealloc(o)) return;
100064 }
100065 }
100066 #endif
100067 PyObject_GC_UnTrack(o);
100068 Py_CLEAR(p->__pyx_v_self);
100069 #if CYTHON_USE_FREELISTS
100070 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_14___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__)))) {
100071 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_14___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_14___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *)o);
100072 } else
100073 #endif
100074 {
100075 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
100076 (*Py_TYPE(o)->tp_free)(o);
100077 #else
100078 {
100079 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
100080 if (tp_free) tp_free(o);
100081 }
100082 #endif
100083 }
100084 }
100085
100086 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_14___iter__(PyObject *o, visitproc v, void *a) {
100087 int e;
100088 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__ *)o;
100089 if (p->__pyx_v_self) {
100090 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
100091 }
100092 return 0;
100093 }
100094 #if CYTHON_USE_TYPE_SPECS
100095 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter___slots[] = {
100096 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_14___iter__},
100097 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_14___iter__},
100098 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_14___iter__},
100099 {0, 0},
100100 };
100101 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter___spec = {
100102 "pysam.libcbcf.__pyx_scope_struct_14___iter__",
100103 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__),
100104 0,
100105 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
100106 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter___slots,
100107 };
100108 #else
100109
100110 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter__ = {
100111 PyVarObject_HEAD_INIT(0, 0)
100112 "pysam.libcbcf.""__pyx_scope_struct_14___iter__", /*tp_name*/
100113 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_14___iter__), /*tp_basicsize*/
100114 0, /*tp_itemsize*/
100115 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_14___iter__, /*tp_dealloc*/
100116 #if PY_VERSION_HEX < 0x030800b4
100117 0, /*tp_print*/
100118 #endif
100119 #if PY_VERSION_HEX >= 0x030800b4
100120 0, /*tp_vectorcall_offset*/
100121 #endif
100122 0, /*tp_getattr*/
100123 0, /*tp_setattr*/
100124 #if PY_MAJOR_VERSION < 3
100125 0, /*tp_compare*/
100126 #endif
100127 #if PY_MAJOR_VERSION >= 3
100128 0, /*tp_as_async*/
100129 #endif
100130 0, /*tp_repr*/
100131 0, /*tp_as_number*/
100132 0, /*tp_as_sequence*/
100133 0, /*tp_as_mapping*/
100134 0, /*tp_hash*/
100135 0, /*tp_call*/
100136 0, /*tp_str*/
100137 0, /*tp_getattro*/
100138 0, /*tp_setattro*/
100139 0, /*tp_as_buffer*/
100140 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
100141 0, /*tp_doc*/
100142 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_14___iter__, /*tp_traverse*/
100143 0, /*tp_clear*/
100144 0, /*tp_richcompare*/
100145 0, /*tp_weaklistoffset*/
100146 0, /*tp_iter*/
100147 0, /*tp_iternext*/
100148 0, /*tp_methods*/
100149 0, /*tp_members*/
100150 0, /*tp_getset*/
100151 0, /*tp_base*/
100152 0, /*tp_dict*/
100153 0, /*tp_descr_get*/
100154 0, /*tp_descr_set*/
100155 #if !CYTHON_USE_TYPE_SPECS
100156 0, /*tp_dictoffset*/
100157 #endif
100158 0, /*tp_init*/
100159 0, /*tp_alloc*/
100160 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_14___iter__, /*tp_new*/
100161 0, /*tp_free*/
100162 0, /*tp_is_gc*/
100163 0, /*tp_bases*/
100164 0, /*tp_mro*/
100165 0, /*tp_cache*/
100166 0, /*tp_subclasses*/
100167 0, /*tp_weaklist*/
100168 0, /*tp_del*/
100169 0, /*tp_version_tag*/
100170 #if PY_VERSION_HEX >= 0x030400a1
100171 #if CYTHON_USE_TP_FINALIZE
100172 0, /*tp_finalize*/
100173 #else
100174 NULL, /*tp_finalize*/
100175 #endif
100176 #endif
100177 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
100178 0, /*tp_vectorcall*/
100179 #endif
100180 #if __PYX_NEED_TP_PRINT_SLOT == 1
100181 0, /*tp_print*/
100182 #endif
100183 #if PY_VERSION_HEX >= 0x030C0000
100184 0, /*tp_watched*/
100185 #endif
100186 #if PY_VERSION_HEX >= 0x030d00A4
100187 0, /*tp_versions_used*/
100188 #endif
100189 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
100190 0, /*tp_pypy_flags*/
100191 #endif
100192 };
100193 #endif
100194
100195 #if CYTHON_USE_FREELISTS
100196 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_15_itervalues[8];
100197 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_15_itervalues = 0;
100198 #endif
100199
100200 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_15_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
100201 PyObject *o;
100202 #if CYTHON_COMPILING_IN_LIMITED_API
100203 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
100204 o = alloc_func(t, 0);
100205 #else
100206 #if CYTHON_USE_FREELISTS
100207 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_15_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues)))) {
100208 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_15_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_15_itervalues];
100209 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues));
100210 (void) PyObject_INIT(o, t);
100211 PyObject_GC_Track(o);
100212 } else
100213 #endif
100214 {
100215 o = (*t->tp_alloc)(t, 0);
100216 if (unlikely(!o)) return 0;
100217 }
100218 #endif
100219 return o;
100220 }
100221
100222 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_15_itervalues(PyObject *o) {
100223 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *)o;
100224 #if CYTHON_USE_TP_FINALIZE
100225 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
100226 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_15_itervalues) {
100227 if (PyObject_CallFinalizerFromDealloc(o)) return;
100228 }
100229 }
100230 #endif
100231 PyObject_GC_UnTrack(o);
100232 Py_CLEAR(p->__pyx_v_key);
100233 Py_CLEAR(p->__pyx_v_self);
100234 Py_CLEAR(p->__pyx_t_0);
100235 #if CYTHON_USE_FREELISTS
100236 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_15_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues)))) {
100237 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_15_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_15_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *)o);
100238 } else
100239 #endif
100240 {
100241 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
100242 (*Py_TYPE(o)->tp_free)(o);
100243 #else
100244 {
100245 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
100246 if (tp_free) tp_free(o);
100247 }
100248 #endif
100249 }
100250 }
100251
100252 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_15_itervalues(PyObject *o, visitproc v, void *a) {
100253 int e;
100254 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues *)o;
100255 if (p->__pyx_v_key) {
100256 e = (*v)(p->__pyx_v_key, a); if (e) return e;
100257 }
100258 if (p->__pyx_v_self) {
100259 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
100260 }
100261 if (p->__pyx_t_0) {
100262 e = (*v)(p->__pyx_t_0, a); if (e) return e;
100263 }
100264 return 0;
100265 }
100266 #if CYTHON_USE_TYPE_SPECS
100267 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues_slots[] = {
100268 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_15_itervalues},
100269 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_15_itervalues},
100270 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_15_itervalues},
100271 {0, 0},
100272 };
100273 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues_spec = {
100274 "pysam.libcbcf.__pyx_scope_struct_15_itervalues",
100275 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues),
100276 0,
100277 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
100278 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues_slots,
100279 };
100280 #else
100281
100282 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues = {
100283 PyVarObject_HEAD_INIT(0, 0)
100284 "pysam.libcbcf.""__pyx_scope_struct_15_itervalues", /*tp_name*/
100285 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_15_itervalues), /*tp_basicsize*/
100286 0, /*tp_itemsize*/
100287 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_15_itervalues, /*tp_dealloc*/
100288 #if PY_VERSION_HEX < 0x030800b4
100289 0, /*tp_print*/
100290 #endif
100291 #if PY_VERSION_HEX >= 0x030800b4
100292 0, /*tp_vectorcall_offset*/
100293 #endif
100294 0, /*tp_getattr*/
100295 0, /*tp_setattr*/
100296 #if PY_MAJOR_VERSION < 3
100297 0, /*tp_compare*/
100298 #endif
100299 #if PY_MAJOR_VERSION >= 3
100300 0, /*tp_as_async*/
100301 #endif
100302 0, /*tp_repr*/
100303 0, /*tp_as_number*/
100304 0, /*tp_as_sequence*/
100305 0, /*tp_as_mapping*/
100306 0, /*tp_hash*/
100307 0, /*tp_call*/
100308 0, /*tp_str*/
100309 0, /*tp_getattro*/
100310 0, /*tp_setattro*/
100311 0, /*tp_as_buffer*/
100312 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
100313 0, /*tp_doc*/
100314 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_15_itervalues, /*tp_traverse*/
100315 0, /*tp_clear*/
100316 0, /*tp_richcompare*/
100317 0, /*tp_weaklistoffset*/
100318 0, /*tp_iter*/
100319 0, /*tp_iternext*/
100320 0, /*tp_methods*/
100321 0, /*tp_members*/
100322 0, /*tp_getset*/
100323 0, /*tp_base*/
100324 0, /*tp_dict*/
100325 0, /*tp_descr_get*/
100326 0, /*tp_descr_set*/
100327 #if !CYTHON_USE_TYPE_SPECS
100328 0, /*tp_dictoffset*/
100329 #endif
100330 0, /*tp_init*/
100331 0, /*tp_alloc*/
100332 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_15_itervalues, /*tp_new*/
100333 0, /*tp_free*/
100334 0, /*tp_is_gc*/
100335 0, /*tp_bases*/
100336 0, /*tp_mro*/
100337 0, /*tp_cache*/
100338 0, /*tp_subclasses*/
100339 0, /*tp_weaklist*/
100340 0, /*tp_del*/
100341 0, /*tp_version_tag*/
100342 #if PY_VERSION_HEX >= 0x030400a1
100343 #if CYTHON_USE_TP_FINALIZE
100344 0, /*tp_finalize*/
100345 #else
100346 NULL, /*tp_finalize*/
100347 #endif
100348 #endif
100349 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
100350 0, /*tp_vectorcall*/
100351 #endif
100352 #if __PYX_NEED_TP_PRINT_SLOT == 1
100353 0, /*tp_print*/
100354 #endif
100355 #if PY_VERSION_HEX >= 0x030C0000
100356 0, /*tp_watched*/
100357 #endif
100358 #if PY_VERSION_HEX >= 0x030d00A4
100359 0, /*tp_versions_used*/
100360 #endif
100361 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
100362 0, /*tp_pypy_flags*/
100363 #endif
100364 };
100365 #endif
100366
100367 #if CYTHON_USE_FREELISTS
100368 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_16_iteritems[8];
100369 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_16_iteritems = 0;
100370 #endif
100371
100372 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_16_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
100373 PyObject *o;
100374 #if CYTHON_COMPILING_IN_LIMITED_API
100375 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
100376 o = alloc_func(t, 0);
100377 #else
100378 #if CYTHON_USE_FREELISTS
100379 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_16_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems)))) {
100380 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_16_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_16_iteritems];
100381 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems));
100382 (void) PyObject_INIT(o, t);
100383 PyObject_GC_Track(o);
100384 } else
100385 #endif
100386 {
100387 o = (*t->tp_alloc)(t, 0);
100388 if (unlikely(!o)) return 0;
100389 }
100390 #endif
100391 return o;
100392 }
100393
100394 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_16_iteritems(PyObject *o) {
100395 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *)o;
100396 #if CYTHON_USE_TP_FINALIZE
100397 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
100398 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_16_iteritems) {
100399 if (PyObject_CallFinalizerFromDealloc(o)) return;
100400 }
100401 }
100402 #endif
100403 PyObject_GC_UnTrack(o);
100404 Py_CLEAR(p->__pyx_v_key);
100405 Py_CLEAR(p->__pyx_v_self);
100406 Py_CLEAR(p->__pyx_t_0);
100407 #if CYTHON_USE_FREELISTS
100408 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_16_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems)))) {
100409 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_16_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_16_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *)o);
100410 } else
100411 #endif
100412 {
100413 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
100414 (*Py_TYPE(o)->tp_free)(o);
100415 #else
100416 {
100417 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
100418 if (tp_free) tp_free(o);
100419 }
100420 #endif
100421 }
100422 }
100423
100424 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_16_iteritems(PyObject *o, visitproc v, void *a) {
100425 int e;
100426 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems *)o;
100427 if (p->__pyx_v_key) {
100428 e = (*v)(p->__pyx_v_key, a); if (e) return e;
100429 }
100430 if (p->__pyx_v_self) {
100431 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
100432 }
100433 if (p->__pyx_t_0) {
100434 e = (*v)(p->__pyx_t_0, a); if (e) return e;
100435 }
100436 return 0;
100437 }
100438 #if CYTHON_USE_TYPE_SPECS
100439 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems_slots[] = {
100440 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_16_iteritems},
100441 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_16_iteritems},
100442 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_16_iteritems},
100443 {0, 0},
100444 };
100445 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems_spec = {
100446 "pysam.libcbcf.__pyx_scope_struct_16_iteritems",
100447 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems),
100448 0,
100449 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
100450 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems_slots,
100451 };
100452 #else
100453
100454 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems = {
100455 PyVarObject_HEAD_INIT(0, 0)
100456 "pysam.libcbcf.""__pyx_scope_struct_16_iteritems", /*tp_name*/
100457 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_16_iteritems), /*tp_basicsize*/
100458 0, /*tp_itemsize*/
100459 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_16_iteritems, /*tp_dealloc*/
100460 #if PY_VERSION_HEX < 0x030800b4
100461 0, /*tp_print*/
100462 #endif
100463 #if PY_VERSION_HEX >= 0x030800b4
100464 0, /*tp_vectorcall_offset*/
100465 #endif
100466 0, /*tp_getattr*/
100467 0, /*tp_setattr*/
100468 #if PY_MAJOR_VERSION < 3
100469 0, /*tp_compare*/
100470 #endif
100471 #if PY_MAJOR_VERSION >= 3
100472 0, /*tp_as_async*/
100473 #endif
100474 0, /*tp_repr*/
100475 0, /*tp_as_number*/
100476 0, /*tp_as_sequence*/
100477 0, /*tp_as_mapping*/
100478 0, /*tp_hash*/
100479 0, /*tp_call*/
100480 0, /*tp_str*/
100481 0, /*tp_getattro*/
100482 0, /*tp_setattro*/
100483 0, /*tp_as_buffer*/
100484 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
100485 0, /*tp_doc*/
100486 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_16_iteritems, /*tp_traverse*/
100487 0, /*tp_clear*/
100488 0, /*tp_richcompare*/
100489 0, /*tp_weaklistoffset*/
100490 0, /*tp_iter*/
100491 0, /*tp_iternext*/
100492 0, /*tp_methods*/
100493 0, /*tp_members*/
100494 0, /*tp_getset*/
100495 0, /*tp_base*/
100496 0, /*tp_dict*/
100497 0, /*tp_descr_get*/
100498 0, /*tp_descr_set*/
100499 #if !CYTHON_USE_TYPE_SPECS
100500 0, /*tp_dictoffset*/
100501 #endif
100502 0, /*tp_init*/
100503 0, /*tp_alloc*/
100504 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_16_iteritems, /*tp_new*/
100505 0, /*tp_free*/
100506 0, /*tp_is_gc*/
100507 0, /*tp_bases*/
100508 0, /*tp_mro*/
100509 0, /*tp_cache*/
100510 0, /*tp_subclasses*/
100511 0, /*tp_weaklist*/
100512 0, /*tp_del*/
100513 0, /*tp_version_tag*/
100514 #if PY_VERSION_HEX >= 0x030400a1
100515 #if CYTHON_USE_TP_FINALIZE
100516 0, /*tp_finalize*/
100517 #else
100518 NULL, /*tp_finalize*/
100519 #endif
100520 #endif
100521 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
100522 0, /*tp_vectorcall*/
100523 #endif
100524 #if __PYX_NEED_TP_PRINT_SLOT == 1
100525 0, /*tp_print*/
100526 #endif
100527 #if PY_VERSION_HEX >= 0x030C0000
100528 0, /*tp_watched*/
100529 #endif
100530 #if PY_VERSION_HEX >= 0x030d00A4
100531 0, /*tp_versions_used*/
100532 #endif
100533 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
100534 0, /*tp_pypy_flags*/
100535 #endif
100536 };
100537 #endif
100538
100539 #if CYTHON_USE_FREELISTS
100540 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_17___iter__[8];
100541 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_17___iter__ = 0;
100542 #endif
100543
100544 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_17___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
100545 PyObject *o;
100546 #if CYTHON_COMPILING_IN_LIMITED_API
100547 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
100548 o = alloc_func(t, 0);
100549 #else
100550 #if CYTHON_USE_FREELISTS
100551 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_17___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__)))) {
100552 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_17___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_17___iter__];
100553 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__));
100554 (void) PyObject_INIT(o, t);
100555 PyObject_GC_Track(o);
100556 } else
100557 #endif
100558 {
100559 o = (*t->tp_alloc)(t, 0);
100560 if (unlikely(!o)) return 0;
100561 }
100562 #endif
100563 return o;
100564 }
100565
100566 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_17___iter__(PyObject *o) {
100567 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *)o;
100568 #if CYTHON_USE_TP_FINALIZE
100569 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
100570 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_17___iter__) {
100571 if (PyObject_CallFinalizerFromDealloc(o)) return;
100572 }
100573 }
100574 #endif
100575 PyObject_GC_UnTrack(o);
100576 Py_CLEAR(p->__pyx_v_self);
100577 #if CYTHON_USE_FREELISTS
100578 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_17___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__)))) {
100579 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_17___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_17___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *)o);
100580 } else
100581 #endif
100582 {
100583 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
100584 (*Py_TYPE(o)->tp_free)(o);
100585 #else
100586 {
100587 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
100588 if (tp_free) tp_free(o);
100589 }
100590 #endif
100591 }
100592 }
100593
100594 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_17___iter__(PyObject *o, visitproc v, void *a) {
100595 int e;
100596 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__ *)o;
100597 if (p->__pyx_v_self) {
100598 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
100599 }
100600 return 0;
100601 }
100602 #if CYTHON_USE_TYPE_SPECS
100603 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter___slots[] = {
100604 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_17___iter__},
100605 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_17___iter__},
100606 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_17___iter__},
100607 {0, 0},
100608 };
100609 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter___spec = {
100610 "pysam.libcbcf.__pyx_scope_struct_17___iter__",
100611 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__),
100612 0,
100613 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
100614 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter___slots,
100615 };
100616 #else
100617
100618 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter__ = {
100619 PyVarObject_HEAD_INIT(0, 0)
100620 "pysam.libcbcf.""__pyx_scope_struct_17___iter__", /*tp_name*/
100621 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_17___iter__), /*tp_basicsize*/
100622 0, /*tp_itemsize*/
100623 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_17___iter__, /*tp_dealloc*/
100624 #if PY_VERSION_HEX < 0x030800b4
100625 0, /*tp_print*/
100626 #endif
100627 #if PY_VERSION_HEX >= 0x030800b4
100628 0, /*tp_vectorcall_offset*/
100629 #endif
100630 0, /*tp_getattr*/
100631 0, /*tp_setattr*/
100632 #if PY_MAJOR_VERSION < 3
100633 0, /*tp_compare*/
100634 #endif
100635 #if PY_MAJOR_VERSION >= 3
100636 0, /*tp_as_async*/
100637 #endif
100638 0, /*tp_repr*/
100639 0, /*tp_as_number*/
100640 0, /*tp_as_sequence*/
100641 0, /*tp_as_mapping*/
100642 0, /*tp_hash*/
100643 0, /*tp_call*/
100644 0, /*tp_str*/
100645 0, /*tp_getattro*/
100646 0, /*tp_setattro*/
100647 0, /*tp_as_buffer*/
100648 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
100649 0, /*tp_doc*/
100650 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_17___iter__, /*tp_traverse*/
100651 0, /*tp_clear*/
100652 0, /*tp_richcompare*/
100653 0, /*tp_weaklistoffset*/
100654 0, /*tp_iter*/
100655 0, /*tp_iternext*/
100656 0, /*tp_methods*/
100657 0, /*tp_members*/
100658 0, /*tp_getset*/
100659 0, /*tp_base*/
100660 0, /*tp_dict*/
100661 0, /*tp_descr_get*/
100662 0, /*tp_descr_set*/
100663 #if !CYTHON_USE_TYPE_SPECS
100664 0, /*tp_dictoffset*/
100665 #endif
100666 0, /*tp_init*/
100667 0, /*tp_alloc*/
100668 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_17___iter__, /*tp_new*/
100669 0, /*tp_free*/
100670 0, /*tp_is_gc*/
100671 0, /*tp_bases*/
100672 0, /*tp_mro*/
100673 0, /*tp_cache*/
100674 0, /*tp_subclasses*/
100675 0, /*tp_weaklist*/
100676 0, /*tp_del*/
100677 0, /*tp_version_tag*/
100678 #if PY_VERSION_HEX >= 0x030400a1
100679 #if CYTHON_USE_TP_FINALIZE
100680 0, /*tp_finalize*/
100681 #else
100682 NULL, /*tp_finalize*/
100683 #endif
100684 #endif
100685 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
100686 0, /*tp_vectorcall*/
100687 #endif
100688 #if __PYX_NEED_TP_PRINT_SLOT == 1
100689 0, /*tp_print*/
100690 #endif
100691 #if PY_VERSION_HEX >= 0x030C0000
100692 0, /*tp_watched*/
100693 #endif
100694 #if PY_VERSION_HEX >= 0x030d00A4
100695 0, /*tp_versions_used*/
100696 #endif
100697 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
100698 0, /*tp_pypy_flags*/
100699 #endif
100700 };
100701 #endif
100702
100703 #if CYTHON_USE_FREELISTS
100704 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_18___iter__[8];
100705 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_18___iter__ = 0;
100706 #endif
100707
100708 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_18___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
100709 PyObject *o;
100710 #if CYTHON_COMPILING_IN_LIMITED_API
100711 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
100712 o = alloc_func(t, 0);
100713 #else
100714 #if CYTHON_USE_FREELISTS
100715 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_18___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__)))) {
100716 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_18___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_18___iter__];
100717 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__));
100718 (void) PyObject_INIT(o, t);
100719 PyObject_GC_Track(o);
100720 } else
100721 #endif
100722 {
100723 o = (*t->tp_alloc)(t, 0);
100724 if (unlikely(!o)) return 0;
100725 }
100726 #endif
100727 return o;
100728 }
100729
100730 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_18___iter__(PyObject *o) {
100731 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *)o;
100732 #if CYTHON_USE_TP_FINALIZE
100733 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
100734 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_18___iter__) {
100735 if (PyObject_CallFinalizerFromDealloc(o)) return;
100736 }
100737 }
100738 #endif
100739 PyObject_GC_UnTrack(o);
100740 Py_CLEAR(p->__pyx_v_self);
100741 #if CYTHON_USE_FREELISTS
100742 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_18___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__)))) {
100743 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_18___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_18___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *)o);
100744 } else
100745 #endif
100746 {
100747 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
100748 (*Py_TYPE(o)->tp_free)(o);
100749 #else
100750 {
100751 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
100752 if (tp_free) tp_free(o);
100753 }
100754 #endif
100755 }
100756 }
100757
100758 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_18___iter__(PyObject *o, visitproc v, void *a) {
100759 int e;
100760 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__ *)o;
100761 if (p->__pyx_v_self) {
100762 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
100763 }
100764 return 0;
100765 }
100766 #if CYTHON_USE_TYPE_SPECS
100767 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter___slots[] = {
100768 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_18___iter__},
100769 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_18___iter__},
100770 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_18___iter__},
100771 {0, 0},
100772 };
100773 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter___spec = {
100774 "pysam.libcbcf.__pyx_scope_struct_18___iter__",
100775 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__),
100776 0,
100777 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
100778 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter___slots,
100779 };
100780 #else
100781
100782 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter__ = {
100783 PyVarObject_HEAD_INIT(0, 0)
100784 "pysam.libcbcf.""__pyx_scope_struct_18___iter__", /*tp_name*/
100785 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_18___iter__), /*tp_basicsize*/
100786 0, /*tp_itemsize*/
100787 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_18___iter__, /*tp_dealloc*/
100788 #if PY_VERSION_HEX < 0x030800b4
100789 0, /*tp_print*/
100790 #endif
100791 #if PY_VERSION_HEX >= 0x030800b4
100792 0, /*tp_vectorcall_offset*/
100793 #endif
100794 0, /*tp_getattr*/
100795 0, /*tp_setattr*/
100796 #if PY_MAJOR_VERSION < 3
100797 0, /*tp_compare*/
100798 #endif
100799 #if PY_MAJOR_VERSION >= 3
100800 0, /*tp_as_async*/
100801 #endif
100802 0, /*tp_repr*/
100803 0, /*tp_as_number*/
100804 0, /*tp_as_sequence*/
100805 0, /*tp_as_mapping*/
100806 0, /*tp_hash*/
100807 0, /*tp_call*/
100808 0, /*tp_str*/
100809 0, /*tp_getattro*/
100810 0, /*tp_setattro*/
100811 0, /*tp_as_buffer*/
100812 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
100813 0, /*tp_doc*/
100814 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_18___iter__, /*tp_traverse*/
100815 0, /*tp_clear*/
100816 0, /*tp_richcompare*/
100817 0, /*tp_weaklistoffset*/
100818 0, /*tp_iter*/
100819 0, /*tp_iternext*/
100820 0, /*tp_methods*/
100821 0, /*tp_members*/
100822 0, /*tp_getset*/
100823 0, /*tp_base*/
100824 0, /*tp_dict*/
100825 0, /*tp_descr_get*/
100826 0, /*tp_descr_set*/
100827 #if !CYTHON_USE_TYPE_SPECS
100828 0, /*tp_dictoffset*/
100829 #endif
100830 0, /*tp_init*/
100831 0, /*tp_alloc*/
100832 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_18___iter__, /*tp_new*/
100833 0, /*tp_free*/
100834 0, /*tp_is_gc*/
100835 0, /*tp_bases*/
100836 0, /*tp_mro*/
100837 0, /*tp_cache*/
100838 0, /*tp_subclasses*/
100839 0, /*tp_weaklist*/
100840 0, /*tp_del*/
100841 0, /*tp_version_tag*/
100842 #if PY_VERSION_HEX >= 0x030400a1
100843 #if CYTHON_USE_TP_FINALIZE
100844 0, /*tp_finalize*/
100845 #else
100846 NULL, /*tp_finalize*/
100847 #endif
100848 #endif
100849 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
100850 0, /*tp_vectorcall*/
100851 #endif
100852 #if __PYX_NEED_TP_PRINT_SLOT == 1
100853 0, /*tp_print*/
100854 #endif
100855 #if PY_VERSION_HEX >= 0x030C0000
100856 0, /*tp_watched*/
100857 #endif
100858 #if PY_VERSION_HEX >= 0x030d00A4
100859 0, /*tp_versions_used*/
100860 #endif
100861 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
100862 0, /*tp_pypy_flags*/
100863 #endif
100864 };
100865 #endif
100866
100867 #if CYTHON_USE_FREELISTS
100868 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_19_itervalues[8];
100869 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_19_itervalues = 0;
100870 #endif
100871
100872 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_19_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
100873 PyObject *o;
100874 #if CYTHON_COMPILING_IN_LIMITED_API
100875 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
100876 o = alloc_func(t, 0);
100877 #else
100878 #if CYTHON_USE_FREELISTS
100879 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_19_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues)))) {
100880 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_19_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_19_itervalues];
100881 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues));
100882 (void) PyObject_INIT(o, t);
100883 PyObject_GC_Track(o);
100884 } else
100885 #endif
100886 {
100887 o = (*t->tp_alloc)(t, 0);
100888 if (unlikely(!o)) return 0;
100889 }
100890 #endif
100891 return o;
100892 }
100893
100894 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_19_itervalues(PyObject *o) {
100895 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *)o;
100896 #if CYTHON_USE_TP_FINALIZE
100897 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
100898 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_19_itervalues) {
100899 if (PyObject_CallFinalizerFromDealloc(o)) return;
100900 }
100901 }
100902 #endif
100903 PyObject_GC_UnTrack(o);
100904 Py_CLEAR(p->__pyx_v_key);
100905 Py_CLEAR(p->__pyx_v_self);
100906 Py_CLEAR(p->__pyx_t_0);
100907 #if CYTHON_USE_FREELISTS
100908 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_19_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues)))) {
100909 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_19_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_19_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *)o);
100910 } else
100911 #endif
100912 {
100913 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
100914 (*Py_TYPE(o)->tp_free)(o);
100915 #else
100916 {
100917 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
100918 if (tp_free) tp_free(o);
100919 }
100920 #endif
100921 }
100922 }
100923
100924 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_19_itervalues(PyObject *o, visitproc v, void *a) {
100925 int e;
100926 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues *)o;
100927 if (p->__pyx_v_key) {
100928 e = (*v)(p->__pyx_v_key, a); if (e) return e;
100929 }
100930 if (p->__pyx_v_self) {
100931 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
100932 }
100933 if (p->__pyx_t_0) {
100934 e = (*v)(p->__pyx_t_0, a); if (e) return e;
100935 }
100936 return 0;
100937 }
100938 #if CYTHON_USE_TYPE_SPECS
100939 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues_slots[] = {
100940 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_19_itervalues},
100941 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_19_itervalues},
100942 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_19_itervalues},
100943 {0, 0},
100944 };
100945 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues_spec = {
100946 "pysam.libcbcf.__pyx_scope_struct_19_itervalues",
100947 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues),
100948 0,
100949 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
100950 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues_slots,
100951 };
100952 #else
100953
100954 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues = {
100955 PyVarObject_HEAD_INIT(0, 0)
100956 "pysam.libcbcf.""__pyx_scope_struct_19_itervalues", /*tp_name*/
100957 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_19_itervalues), /*tp_basicsize*/
100958 0, /*tp_itemsize*/
100959 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_19_itervalues, /*tp_dealloc*/
100960 #if PY_VERSION_HEX < 0x030800b4
100961 0, /*tp_print*/
100962 #endif
100963 #if PY_VERSION_HEX >= 0x030800b4
100964 0, /*tp_vectorcall_offset*/
100965 #endif
100966 0, /*tp_getattr*/
100967 0, /*tp_setattr*/
100968 #if PY_MAJOR_VERSION < 3
100969 0, /*tp_compare*/
100970 #endif
100971 #if PY_MAJOR_VERSION >= 3
100972 0, /*tp_as_async*/
100973 #endif
100974 0, /*tp_repr*/
100975 0, /*tp_as_number*/
100976 0, /*tp_as_sequence*/
100977 0, /*tp_as_mapping*/
100978 0, /*tp_hash*/
100979 0, /*tp_call*/
100980 0, /*tp_str*/
100981 0, /*tp_getattro*/
100982 0, /*tp_setattro*/
100983 0, /*tp_as_buffer*/
100984 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
100985 0, /*tp_doc*/
100986 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_19_itervalues, /*tp_traverse*/
100987 0, /*tp_clear*/
100988 0, /*tp_richcompare*/
100989 0, /*tp_weaklistoffset*/
100990 0, /*tp_iter*/
100991 0, /*tp_iternext*/
100992 0, /*tp_methods*/
100993 0, /*tp_members*/
100994 0, /*tp_getset*/
100995 0, /*tp_base*/
100996 0, /*tp_dict*/
100997 0, /*tp_descr_get*/
100998 0, /*tp_descr_set*/
100999 #if !CYTHON_USE_TYPE_SPECS
101000 0, /*tp_dictoffset*/
101001 #endif
101002 0, /*tp_init*/
101003 0, /*tp_alloc*/
101004 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_19_itervalues, /*tp_new*/
101005 0, /*tp_free*/
101006 0, /*tp_is_gc*/
101007 0, /*tp_bases*/
101008 0, /*tp_mro*/
101009 0, /*tp_cache*/
101010 0, /*tp_subclasses*/
101011 0, /*tp_weaklist*/
101012 0, /*tp_del*/
101013 0, /*tp_version_tag*/
101014 #if PY_VERSION_HEX >= 0x030400a1
101015 #if CYTHON_USE_TP_FINALIZE
101016 0, /*tp_finalize*/
101017 #else
101018 NULL, /*tp_finalize*/
101019 #endif
101020 #endif
101021 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101022 0, /*tp_vectorcall*/
101023 #endif
101024 #if __PYX_NEED_TP_PRINT_SLOT == 1
101025 0, /*tp_print*/
101026 #endif
101027 #if PY_VERSION_HEX >= 0x030C0000
101028 0, /*tp_watched*/
101029 #endif
101030 #if PY_VERSION_HEX >= 0x030d00A4
101031 0, /*tp_versions_used*/
101032 #endif
101033 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
101034 0, /*tp_pypy_flags*/
101035 #endif
101036 };
101037 #endif
101038
101039 #if CYTHON_USE_FREELISTS
101040 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_20_iteritems[8];
101041 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_20_iteritems = 0;
101042 #endif
101043
101044 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_20_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101045 PyObject *o;
101046 #if CYTHON_COMPILING_IN_LIMITED_API
101047 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
101048 o = alloc_func(t, 0);
101049 #else
101050 #if CYTHON_USE_FREELISTS
101051 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_20_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems)))) {
101052 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_20_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_20_iteritems];
101053 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems));
101054 (void) PyObject_INIT(o, t);
101055 PyObject_GC_Track(o);
101056 } else
101057 #endif
101058 {
101059 o = (*t->tp_alloc)(t, 0);
101060 if (unlikely(!o)) return 0;
101061 }
101062 #endif
101063 return o;
101064 }
101065
101066 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_20_iteritems(PyObject *o) {
101067 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *)o;
101068 #if CYTHON_USE_TP_FINALIZE
101069 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
101070 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_20_iteritems) {
101071 if (PyObject_CallFinalizerFromDealloc(o)) return;
101072 }
101073 }
101074 #endif
101075 PyObject_GC_UnTrack(o);
101076 Py_CLEAR(p->__pyx_v_key);
101077 Py_CLEAR(p->__pyx_v_self);
101078 Py_CLEAR(p->__pyx_t_0);
101079 #if CYTHON_USE_FREELISTS
101080 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_20_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems)))) {
101081 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_20_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_20_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *)o);
101082 } else
101083 #endif
101084 {
101085 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
101086 (*Py_TYPE(o)->tp_free)(o);
101087 #else
101088 {
101089 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
101090 if (tp_free) tp_free(o);
101091 }
101092 #endif
101093 }
101094 }
101095
101096 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_20_iteritems(PyObject *o, visitproc v, void *a) {
101097 int e;
101098 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems *)o;
101099 if (p->__pyx_v_key) {
101100 e = (*v)(p->__pyx_v_key, a); if (e) return e;
101101 }
101102 if (p->__pyx_v_self) {
101103 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
101104 }
101105 if (p->__pyx_t_0) {
101106 e = (*v)(p->__pyx_t_0, a); if (e) return e;
101107 }
101108 return 0;
101109 }
101110 #if CYTHON_USE_TYPE_SPECS
101111 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems_slots[] = {
101112 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_20_iteritems},
101113 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_20_iteritems},
101114 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_20_iteritems},
101115 {0, 0},
101116 };
101117 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems_spec = {
101118 "pysam.libcbcf.__pyx_scope_struct_20_iteritems",
101119 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems),
101120 0,
101121 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
101122 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems_slots,
101123 };
101124 #else
101125
101126 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems = {
101127 PyVarObject_HEAD_INIT(0, 0)
101128 "pysam.libcbcf.""__pyx_scope_struct_20_iteritems", /*tp_name*/
101129 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_20_iteritems), /*tp_basicsize*/
101130 0, /*tp_itemsize*/
101131 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_20_iteritems, /*tp_dealloc*/
101132 #if PY_VERSION_HEX < 0x030800b4
101133 0, /*tp_print*/
101134 #endif
101135 #if PY_VERSION_HEX >= 0x030800b4
101136 0, /*tp_vectorcall_offset*/
101137 #endif
101138 0, /*tp_getattr*/
101139 0, /*tp_setattr*/
101140 #if PY_MAJOR_VERSION < 3
101141 0, /*tp_compare*/
101142 #endif
101143 #if PY_MAJOR_VERSION >= 3
101144 0, /*tp_as_async*/
101145 #endif
101146 0, /*tp_repr*/
101147 0, /*tp_as_number*/
101148 0, /*tp_as_sequence*/
101149 0, /*tp_as_mapping*/
101150 0, /*tp_hash*/
101151 0, /*tp_call*/
101152 0, /*tp_str*/
101153 0, /*tp_getattro*/
101154 0, /*tp_setattro*/
101155 0, /*tp_as_buffer*/
101156 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
101157 0, /*tp_doc*/
101158 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_20_iteritems, /*tp_traverse*/
101159 0, /*tp_clear*/
101160 0, /*tp_richcompare*/
101161 0, /*tp_weaklistoffset*/
101162 0, /*tp_iter*/
101163 0, /*tp_iternext*/
101164 0, /*tp_methods*/
101165 0, /*tp_members*/
101166 0, /*tp_getset*/
101167 0, /*tp_base*/
101168 0, /*tp_dict*/
101169 0, /*tp_descr_get*/
101170 0, /*tp_descr_set*/
101171 #if !CYTHON_USE_TYPE_SPECS
101172 0, /*tp_dictoffset*/
101173 #endif
101174 0, /*tp_init*/
101175 0, /*tp_alloc*/
101176 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_20_iteritems, /*tp_new*/
101177 0, /*tp_free*/
101178 0, /*tp_is_gc*/
101179 0, /*tp_bases*/
101180 0, /*tp_mro*/
101181 0, /*tp_cache*/
101182 0, /*tp_subclasses*/
101183 0, /*tp_weaklist*/
101184 0, /*tp_del*/
101185 0, /*tp_version_tag*/
101186 #if PY_VERSION_HEX >= 0x030400a1
101187 #if CYTHON_USE_TP_FINALIZE
101188 0, /*tp_finalize*/
101189 #else
101190 NULL, /*tp_finalize*/
101191 #endif
101192 #endif
101193 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101194 0, /*tp_vectorcall*/
101195 #endif
101196 #if __PYX_NEED_TP_PRINT_SLOT == 1
101197 0, /*tp_print*/
101198 #endif
101199 #if PY_VERSION_HEX >= 0x030C0000
101200 0, /*tp_watched*/
101201 #endif
101202 #if PY_VERSION_HEX >= 0x030d00A4
101203 0, /*tp_versions_used*/
101204 #endif
101205 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
101206 0, /*tp_pypy_flags*/
101207 #endif
101208 };
101209 #endif
101210
101211 #if CYTHON_USE_FREELISTS
101212 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_21___iter__[8];
101213 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_21___iter__ = 0;
101214 #endif
101215
101216 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_21___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101217 PyObject *o;
101218 #if CYTHON_COMPILING_IN_LIMITED_API
101219 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
101220 o = alloc_func(t, 0);
101221 #else
101222 #if CYTHON_USE_FREELISTS
101223 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_21___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__)))) {
101224 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_21___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_21___iter__];
101225 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__));
101226 (void) PyObject_INIT(o, t);
101227 PyObject_GC_Track(o);
101228 } else
101229 #endif
101230 {
101231 o = (*t->tp_alloc)(t, 0);
101232 if (unlikely(!o)) return 0;
101233 }
101234 #endif
101235 return o;
101236 }
101237
101238 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_21___iter__(PyObject *o) {
101239 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *)o;
101240 #if CYTHON_USE_TP_FINALIZE
101241 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
101242 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_21___iter__) {
101243 if (PyObject_CallFinalizerFromDealloc(o)) return;
101244 }
101245 }
101246 #endif
101247 PyObject_GC_UnTrack(o);
101248 Py_CLEAR(p->__pyx_v_self);
101249 #if CYTHON_USE_FREELISTS
101250 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_21___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__)))) {
101251 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_21___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_21___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *)o);
101252 } else
101253 #endif
101254 {
101255 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
101256 (*Py_TYPE(o)->tp_free)(o);
101257 #else
101258 {
101259 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
101260 if (tp_free) tp_free(o);
101261 }
101262 #endif
101263 }
101264 }
101265
101266 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_21___iter__(PyObject *o, visitproc v, void *a) {
101267 int e;
101268 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__ *)o;
101269 if (p->__pyx_v_self) {
101270 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
101271 }
101272 return 0;
101273 }
101274 #if CYTHON_USE_TYPE_SPECS
101275 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter___slots[] = {
101276 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_21___iter__},
101277 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_21___iter__},
101278 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_21___iter__},
101279 {0, 0},
101280 };
101281 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter___spec = {
101282 "pysam.libcbcf.__pyx_scope_struct_21___iter__",
101283 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__),
101284 0,
101285 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
101286 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter___slots,
101287 };
101288 #else
101289
101290 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter__ = {
101291 PyVarObject_HEAD_INIT(0, 0)
101292 "pysam.libcbcf.""__pyx_scope_struct_21___iter__", /*tp_name*/
101293 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_21___iter__), /*tp_basicsize*/
101294 0, /*tp_itemsize*/
101295 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_21___iter__, /*tp_dealloc*/
101296 #if PY_VERSION_HEX < 0x030800b4
101297 0, /*tp_print*/
101298 #endif
101299 #if PY_VERSION_HEX >= 0x030800b4
101300 0, /*tp_vectorcall_offset*/
101301 #endif
101302 0, /*tp_getattr*/
101303 0, /*tp_setattr*/
101304 #if PY_MAJOR_VERSION < 3
101305 0, /*tp_compare*/
101306 #endif
101307 #if PY_MAJOR_VERSION >= 3
101308 0, /*tp_as_async*/
101309 #endif
101310 0, /*tp_repr*/
101311 0, /*tp_as_number*/
101312 0, /*tp_as_sequence*/
101313 0, /*tp_as_mapping*/
101314 0, /*tp_hash*/
101315 0, /*tp_call*/
101316 0, /*tp_str*/
101317 0, /*tp_getattro*/
101318 0, /*tp_setattro*/
101319 0, /*tp_as_buffer*/
101320 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
101321 0, /*tp_doc*/
101322 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_21___iter__, /*tp_traverse*/
101323 0, /*tp_clear*/
101324 0, /*tp_richcompare*/
101325 0, /*tp_weaklistoffset*/
101326 0, /*tp_iter*/
101327 0, /*tp_iternext*/
101328 0, /*tp_methods*/
101329 0, /*tp_members*/
101330 0, /*tp_getset*/
101331 0, /*tp_base*/
101332 0, /*tp_dict*/
101333 0, /*tp_descr_get*/
101334 0, /*tp_descr_set*/
101335 #if !CYTHON_USE_TYPE_SPECS
101336 0, /*tp_dictoffset*/
101337 #endif
101338 0, /*tp_init*/
101339 0, /*tp_alloc*/
101340 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_21___iter__, /*tp_new*/
101341 0, /*tp_free*/
101342 0, /*tp_is_gc*/
101343 0, /*tp_bases*/
101344 0, /*tp_mro*/
101345 0, /*tp_cache*/
101346 0, /*tp_subclasses*/
101347 0, /*tp_weaklist*/
101348 0, /*tp_del*/
101349 0, /*tp_version_tag*/
101350 #if PY_VERSION_HEX >= 0x030400a1
101351 #if CYTHON_USE_TP_FINALIZE
101352 0, /*tp_finalize*/
101353 #else
101354 NULL, /*tp_finalize*/
101355 #endif
101356 #endif
101357 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101358 0, /*tp_vectorcall*/
101359 #endif
101360 #if __PYX_NEED_TP_PRINT_SLOT == 1
101361 0, /*tp_print*/
101362 #endif
101363 #if PY_VERSION_HEX >= 0x030C0000
101364 0, /*tp_watched*/
101365 #endif
101366 #if PY_VERSION_HEX >= 0x030d00A4
101367 0, /*tp_versions_used*/
101368 #endif
101369 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
101370 0, /*tp_pypy_flags*/
101371 #endif
101372 };
101373 #endif
101374
101375 #if CYTHON_USE_FREELISTS
101376 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_22_itervalues[8];
101377 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_22_itervalues = 0;
101378 #endif
101379
101380 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_22_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101381 PyObject *o;
101382 #if CYTHON_COMPILING_IN_LIMITED_API
101383 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
101384 o = alloc_func(t, 0);
101385 #else
101386 #if CYTHON_USE_FREELISTS
101387 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_22_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues)))) {
101388 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_22_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_22_itervalues];
101389 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues));
101390 (void) PyObject_INIT(o, t);
101391 PyObject_GC_Track(o);
101392 } else
101393 #endif
101394 {
101395 o = (*t->tp_alloc)(t, 0);
101396 if (unlikely(!o)) return 0;
101397 }
101398 #endif
101399 return o;
101400 }
101401
101402 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_22_itervalues(PyObject *o) {
101403 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *)o;
101404 #if CYTHON_USE_TP_FINALIZE
101405 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
101406 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_22_itervalues) {
101407 if (PyObject_CallFinalizerFromDealloc(o)) return;
101408 }
101409 }
101410 #endif
101411 PyObject_GC_UnTrack(o);
101412 Py_CLEAR(p->__pyx_v_key);
101413 Py_CLEAR(p->__pyx_v_self);
101414 Py_CLEAR(p->__pyx_t_0);
101415 #if CYTHON_USE_FREELISTS
101416 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_22_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues)))) {
101417 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_22_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_22_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *)o);
101418 } else
101419 #endif
101420 {
101421 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
101422 (*Py_TYPE(o)->tp_free)(o);
101423 #else
101424 {
101425 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
101426 if (tp_free) tp_free(o);
101427 }
101428 #endif
101429 }
101430 }
101431
101432 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_22_itervalues(PyObject *o, visitproc v, void *a) {
101433 int e;
101434 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues *)o;
101435 if (p->__pyx_v_key) {
101436 e = (*v)(p->__pyx_v_key, a); if (e) return e;
101437 }
101438 if (p->__pyx_v_self) {
101439 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
101440 }
101441 if (p->__pyx_t_0) {
101442 e = (*v)(p->__pyx_t_0, a); if (e) return e;
101443 }
101444 return 0;
101445 }
101446 #if CYTHON_USE_TYPE_SPECS
101447 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues_slots[] = {
101448 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_22_itervalues},
101449 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_22_itervalues},
101450 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_22_itervalues},
101451 {0, 0},
101452 };
101453 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues_spec = {
101454 "pysam.libcbcf.__pyx_scope_struct_22_itervalues",
101455 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues),
101456 0,
101457 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
101458 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues_slots,
101459 };
101460 #else
101461
101462 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues = {
101463 PyVarObject_HEAD_INIT(0, 0)
101464 "pysam.libcbcf.""__pyx_scope_struct_22_itervalues", /*tp_name*/
101465 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_22_itervalues), /*tp_basicsize*/
101466 0, /*tp_itemsize*/
101467 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_22_itervalues, /*tp_dealloc*/
101468 #if PY_VERSION_HEX < 0x030800b4
101469 0, /*tp_print*/
101470 #endif
101471 #if PY_VERSION_HEX >= 0x030800b4
101472 0, /*tp_vectorcall_offset*/
101473 #endif
101474 0, /*tp_getattr*/
101475 0, /*tp_setattr*/
101476 #if PY_MAJOR_VERSION < 3
101477 0, /*tp_compare*/
101478 #endif
101479 #if PY_MAJOR_VERSION >= 3
101480 0, /*tp_as_async*/
101481 #endif
101482 0, /*tp_repr*/
101483 0, /*tp_as_number*/
101484 0, /*tp_as_sequence*/
101485 0, /*tp_as_mapping*/
101486 0, /*tp_hash*/
101487 0, /*tp_call*/
101488 0, /*tp_str*/
101489 0, /*tp_getattro*/
101490 0, /*tp_setattro*/
101491 0, /*tp_as_buffer*/
101492 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
101493 0, /*tp_doc*/
101494 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_22_itervalues, /*tp_traverse*/
101495 0, /*tp_clear*/
101496 0, /*tp_richcompare*/
101497 0, /*tp_weaklistoffset*/
101498 0, /*tp_iter*/
101499 0, /*tp_iternext*/
101500 0, /*tp_methods*/
101501 0, /*tp_members*/
101502 0, /*tp_getset*/
101503 0, /*tp_base*/
101504 0, /*tp_dict*/
101505 0, /*tp_descr_get*/
101506 0, /*tp_descr_set*/
101507 #if !CYTHON_USE_TYPE_SPECS
101508 0, /*tp_dictoffset*/
101509 #endif
101510 0, /*tp_init*/
101511 0, /*tp_alloc*/
101512 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_22_itervalues, /*tp_new*/
101513 0, /*tp_free*/
101514 0, /*tp_is_gc*/
101515 0, /*tp_bases*/
101516 0, /*tp_mro*/
101517 0, /*tp_cache*/
101518 0, /*tp_subclasses*/
101519 0, /*tp_weaklist*/
101520 0, /*tp_del*/
101521 0, /*tp_version_tag*/
101522 #if PY_VERSION_HEX >= 0x030400a1
101523 #if CYTHON_USE_TP_FINALIZE
101524 0, /*tp_finalize*/
101525 #else
101526 NULL, /*tp_finalize*/
101527 #endif
101528 #endif
101529 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101530 0, /*tp_vectorcall*/
101531 #endif
101532 #if __PYX_NEED_TP_PRINT_SLOT == 1
101533 0, /*tp_print*/
101534 #endif
101535 #if PY_VERSION_HEX >= 0x030C0000
101536 0, /*tp_watched*/
101537 #endif
101538 #if PY_VERSION_HEX >= 0x030d00A4
101539 0, /*tp_versions_used*/
101540 #endif
101541 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
101542 0, /*tp_pypy_flags*/
101543 #endif
101544 };
101545 #endif
101546
101547 #if CYTHON_USE_FREELISTS
101548 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_23_iteritems[8];
101549 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_23_iteritems = 0;
101550 #endif
101551
101552 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_23_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101553 PyObject *o;
101554 #if CYTHON_COMPILING_IN_LIMITED_API
101555 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
101556 o = alloc_func(t, 0);
101557 #else
101558 #if CYTHON_USE_FREELISTS
101559 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_23_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems)))) {
101560 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_23_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_23_iteritems];
101561 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems));
101562 (void) PyObject_INIT(o, t);
101563 PyObject_GC_Track(o);
101564 } else
101565 #endif
101566 {
101567 o = (*t->tp_alloc)(t, 0);
101568 if (unlikely(!o)) return 0;
101569 }
101570 #endif
101571 return o;
101572 }
101573
101574 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_23_iteritems(PyObject *o) {
101575 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *)o;
101576 #if CYTHON_USE_TP_FINALIZE
101577 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
101578 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_23_iteritems) {
101579 if (PyObject_CallFinalizerFromDealloc(o)) return;
101580 }
101581 }
101582 #endif
101583 PyObject_GC_UnTrack(o);
101584 Py_CLEAR(p->__pyx_v_key);
101585 Py_CLEAR(p->__pyx_v_self);
101586 Py_CLEAR(p->__pyx_t_0);
101587 #if CYTHON_USE_FREELISTS
101588 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_23_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems)))) {
101589 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_23_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_23_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *)o);
101590 } else
101591 #endif
101592 {
101593 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
101594 (*Py_TYPE(o)->tp_free)(o);
101595 #else
101596 {
101597 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
101598 if (tp_free) tp_free(o);
101599 }
101600 #endif
101601 }
101602 }
101603
101604 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_23_iteritems(PyObject *o, visitproc v, void *a) {
101605 int e;
101606 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems *)o;
101607 if (p->__pyx_v_key) {
101608 e = (*v)(p->__pyx_v_key, a); if (e) return e;
101609 }
101610 if (p->__pyx_v_self) {
101611 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
101612 }
101613 if (p->__pyx_t_0) {
101614 e = (*v)(p->__pyx_t_0, a); if (e) return e;
101615 }
101616 return 0;
101617 }
101618 #if CYTHON_USE_TYPE_SPECS
101619 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems_slots[] = {
101620 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_23_iteritems},
101621 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_23_iteritems},
101622 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_23_iteritems},
101623 {0, 0},
101624 };
101625 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems_spec = {
101626 "pysam.libcbcf.__pyx_scope_struct_23_iteritems",
101627 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems),
101628 0,
101629 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
101630 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems_slots,
101631 };
101632 #else
101633
101634 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems = {
101635 PyVarObject_HEAD_INIT(0, 0)
101636 "pysam.libcbcf.""__pyx_scope_struct_23_iteritems", /*tp_name*/
101637 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_23_iteritems), /*tp_basicsize*/
101638 0, /*tp_itemsize*/
101639 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_23_iteritems, /*tp_dealloc*/
101640 #if PY_VERSION_HEX < 0x030800b4
101641 0, /*tp_print*/
101642 #endif
101643 #if PY_VERSION_HEX >= 0x030800b4
101644 0, /*tp_vectorcall_offset*/
101645 #endif
101646 0, /*tp_getattr*/
101647 0, /*tp_setattr*/
101648 #if PY_MAJOR_VERSION < 3
101649 0, /*tp_compare*/
101650 #endif
101651 #if PY_MAJOR_VERSION >= 3
101652 0, /*tp_as_async*/
101653 #endif
101654 0, /*tp_repr*/
101655 0, /*tp_as_number*/
101656 0, /*tp_as_sequence*/
101657 0, /*tp_as_mapping*/
101658 0, /*tp_hash*/
101659 0, /*tp_call*/
101660 0, /*tp_str*/
101661 0, /*tp_getattro*/
101662 0, /*tp_setattro*/
101663 0, /*tp_as_buffer*/
101664 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
101665 0, /*tp_doc*/
101666 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_23_iteritems, /*tp_traverse*/
101667 0, /*tp_clear*/
101668 0, /*tp_richcompare*/
101669 0, /*tp_weaklistoffset*/
101670 0, /*tp_iter*/
101671 0, /*tp_iternext*/
101672 0, /*tp_methods*/
101673 0, /*tp_members*/
101674 0, /*tp_getset*/
101675 0, /*tp_base*/
101676 0, /*tp_dict*/
101677 0, /*tp_descr_get*/
101678 0, /*tp_descr_set*/
101679 #if !CYTHON_USE_TYPE_SPECS
101680 0, /*tp_dictoffset*/
101681 #endif
101682 0, /*tp_init*/
101683 0, /*tp_alloc*/
101684 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_23_iteritems, /*tp_new*/
101685 0, /*tp_free*/
101686 0, /*tp_is_gc*/
101687 0, /*tp_bases*/
101688 0, /*tp_mro*/
101689 0, /*tp_cache*/
101690 0, /*tp_subclasses*/
101691 0, /*tp_weaklist*/
101692 0, /*tp_del*/
101693 0, /*tp_version_tag*/
101694 #if PY_VERSION_HEX >= 0x030400a1
101695 #if CYTHON_USE_TP_FINALIZE
101696 0, /*tp_finalize*/
101697 #else
101698 NULL, /*tp_finalize*/
101699 #endif
101700 #endif
101701 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101702 0, /*tp_vectorcall*/
101703 #endif
101704 #if __PYX_NEED_TP_PRINT_SLOT == 1
101705 0, /*tp_print*/
101706 #endif
101707 #if PY_VERSION_HEX >= 0x030C0000
101708 0, /*tp_watched*/
101709 #endif
101710 #if PY_VERSION_HEX >= 0x030d00A4
101711 0, /*tp_versions_used*/
101712 #endif
101713 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
101714 0, /*tp_pypy_flags*/
101715 #endif
101716 };
101717 #endif
101718
101719 #if CYTHON_USE_FREELISTS
101720 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_24___iter__[8];
101721 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_24___iter__ = 0;
101722 #endif
101723
101724 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_24___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101725 PyObject *o;
101726 #if CYTHON_COMPILING_IN_LIMITED_API
101727 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
101728 o = alloc_func(t, 0);
101729 #else
101730 #if CYTHON_USE_FREELISTS
101731 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_24___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__)))) {
101732 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_24___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_24___iter__];
101733 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__));
101734 (void) PyObject_INIT(o, t);
101735 PyObject_GC_Track(o);
101736 } else
101737 #endif
101738 {
101739 o = (*t->tp_alloc)(t, 0);
101740 if (unlikely(!o)) return 0;
101741 }
101742 #endif
101743 return o;
101744 }
101745
101746 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_24___iter__(PyObject *o) {
101747 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *)o;
101748 #if CYTHON_USE_TP_FINALIZE
101749 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
101750 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_24___iter__) {
101751 if (PyObject_CallFinalizerFromDealloc(o)) return;
101752 }
101753 }
101754 #endif
101755 PyObject_GC_UnTrack(o);
101756 Py_CLEAR(p->__pyx_v_self);
101757 #if CYTHON_USE_FREELISTS
101758 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_24___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__)))) {
101759 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_24___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_24___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *)o);
101760 } else
101761 #endif
101762 {
101763 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
101764 (*Py_TYPE(o)->tp_free)(o);
101765 #else
101766 {
101767 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
101768 if (tp_free) tp_free(o);
101769 }
101770 #endif
101771 }
101772 }
101773
101774 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_24___iter__(PyObject *o, visitproc v, void *a) {
101775 int e;
101776 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__ *)o;
101777 if (p->__pyx_v_self) {
101778 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
101779 }
101780 return 0;
101781 }
101782 #if CYTHON_USE_TYPE_SPECS
101783 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter___slots[] = {
101784 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_24___iter__},
101785 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_24___iter__},
101786 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_24___iter__},
101787 {0, 0},
101788 };
101789 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter___spec = {
101790 "pysam.libcbcf.__pyx_scope_struct_24___iter__",
101791 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__),
101792 0,
101793 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
101794 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter___slots,
101795 };
101796 #else
101797
101798 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter__ = {
101799 PyVarObject_HEAD_INIT(0, 0)
101800 "pysam.libcbcf.""__pyx_scope_struct_24___iter__", /*tp_name*/
101801 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_24___iter__), /*tp_basicsize*/
101802 0, /*tp_itemsize*/
101803 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_24___iter__, /*tp_dealloc*/
101804 #if PY_VERSION_HEX < 0x030800b4
101805 0, /*tp_print*/
101806 #endif
101807 #if PY_VERSION_HEX >= 0x030800b4
101808 0, /*tp_vectorcall_offset*/
101809 #endif
101810 0, /*tp_getattr*/
101811 0, /*tp_setattr*/
101812 #if PY_MAJOR_VERSION < 3
101813 0, /*tp_compare*/
101814 #endif
101815 #if PY_MAJOR_VERSION >= 3
101816 0, /*tp_as_async*/
101817 #endif
101818 0, /*tp_repr*/
101819 0, /*tp_as_number*/
101820 0, /*tp_as_sequence*/
101821 0, /*tp_as_mapping*/
101822 0, /*tp_hash*/
101823 0, /*tp_call*/
101824 0, /*tp_str*/
101825 0, /*tp_getattro*/
101826 0, /*tp_setattro*/
101827 0, /*tp_as_buffer*/
101828 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
101829 0, /*tp_doc*/
101830 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_24___iter__, /*tp_traverse*/
101831 0, /*tp_clear*/
101832 0, /*tp_richcompare*/
101833 0, /*tp_weaklistoffset*/
101834 0, /*tp_iter*/
101835 0, /*tp_iternext*/
101836 0, /*tp_methods*/
101837 0, /*tp_members*/
101838 0, /*tp_getset*/
101839 0, /*tp_base*/
101840 0, /*tp_dict*/
101841 0, /*tp_descr_get*/
101842 0, /*tp_descr_set*/
101843 #if !CYTHON_USE_TYPE_SPECS
101844 0, /*tp_dictoffset*/
101845 #endif
101846 0, /*tp_init*/
101847 0, /*tp_alloc*/
101848 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_24___iter__, /*tp_new*/
101849 0, /*tp_free*/
101850 0, /*tp_is_gc*/
101851 0, /*tp_bases*/
101852 0, /*tp_mro*/
101853 0, /*tp_cache*/
101854 0, /*tp_subclasses*/
101855 0, /*tp_weaklist*/
101856 0, /*tp_del*/
101857 0, /*tp_version_tag*/
101858 #if PY_VERSION_HEX >= 0x030400a1
101859 #if CYTHON_USE_TP_FINALIZE
101860 0, /*tp_finalize*/
101861 #else
101862 NULL, /*tp_finalize*/
101863 #endif
101864 #endif
101865 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101866 0, /*tp_vectorcall*/
101867 #endif
101868 #if __PYX_NEED_TP_PRINT_SLOT == 1
101869 0, /*tp_print*/
101870 #endif
101871 #if PY_VERSION_HEX >= 0x030C0000
101872 0, /*tp_watched*/
101873 #endif
101874 #if PY_VERSION_HEX >= 0x030d00A4
101875 0, /*tp_versions_used*/
101876 #endif
101877 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
101878 0, /*tp_pypy_flags*/
101879 #endif
101880 };
101881 #endif
101882
101883 #if CYTHON_USE_FREELISTS
101884 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_25_itervalues[8];
101885 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_25_itervalues = 0;
101886 #endif
101887
101888 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_25_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101889 PyObject *o;
101890 #if CYTHON_COMPILING_IN_LIMITED_API
101891 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
101892 o = alloc_func(t, 0);
101893 #else
101894 #if CYTHON_USE_FREELISTS
101895 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_25_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues)))) {
101896 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_25_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_25_itervalues];
101897 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues));
101898 (void) PyObject_INIT(o, t);
101899 PyObject_GC_Track(o);
101900 } else
101901 #endif
101902 {
101903 o = (*t->tp_alloc)(t, 0);
101904 if (unlikely(!o)) return 0;
101905 }
101906 #endif
101907 return o;
101908 }
101909
101910 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_25_itervalues(PyObject *o) {
101911 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *)o;
101912 #if CYTHON_USE_TP_FINALIZE
101913 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
101914 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_25_itervalues) {
101915 if (PyObject_CallFinalizerFromDealloc(o)) return;
101916 }
101917 }
101918 #endif
101919 PyObject_GC_UnTrack(o);
101920 Py_CLEAR(p->__pyx_v_self);
101921 #if CYTHON_USE_FREELISTS
101922 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_25_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues)))) {
101923 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_25_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_25_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *)o);
101924 } else
101925 #endif
101926 {
101927 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
101928 (*Py_TYPE(o)->tp_free)(o);
101929 #else
101930 {
101931 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
101932 if (tp_free) tp_free(o);
101933 }
101934 #endif
101935 }
101936 }
101937
101938 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_25_itervalues(PyObject *o, visitproc v, void *a) {
101939 int e;
101940 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues *)o;
101941 if (p->__pyx_v_self) {
101942 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
101943 }
101944 return 0;
101945 }
101946 #if CYTHON_USE_TYPE_SPECS
101947 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues_slots[] = {
101948 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_25_itervalues},
101949 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_25_itervalues},
101950 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_25_itervalues},
101951 {0, 0},
101952 };
101953 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues_spec = {
101954 "pysam.libcbcf.__pyx_scope_struct_25_itervalues",
101955 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues),
101956 0,
101957 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
101958 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues_slots,
101959 };
101960 #else
101961
101962 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues = {
101963 PyVarObject_HEAD_INIT(0, 0)
101964 "pysam.libcbcf.""__pyx_scope_struct_25_itervalues", /*tp_name*/
101965 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_25_itervalues), /*tp_basicsize*/
101966 0, /*tp_itemsize*/
101967 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_25_itervalues, /*tp_dealloc*/
101968 #if PY_VERSION_HEX < 0x030800b4
101969 0, /*tp_print*/
101970 #endif
101971 #if PY_VERSION_HEX >= 0x030800b4
101972 0, /*tp_vectorcall_offset*/
101973 #endif
101974 0, /*tp_getattr*/
101975 0, /*tp_setattr*/
101976 #if PY_MAJOR_VERSION < 3
101977 0, /*tp_compare*/
101978 #endif
101979 #if PY_MAJOR_VERSION >= 3
101980 0, /*tp_as_async*/
101981 #endif
101982 0, /*tp_repr*/
101983 0, /*tp_as_number*/
101984 0, /*tp_as_sequence*/
101985 0, /*tp_as_mapping*/
101986 0, /*tp_hash*/
101987 0, /*tp_call*/
101988 0, /*tp_str*/
101989 0, /*tp_getattro*/
101990 0, /*tp_setattro*/
101991 0, /*tp_as_buffer*/
101992 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
101993 0, /*tp_doc*/
101994 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_25_itervalues, /*tp_traverse*/
101995 0, /*tp_clear*/
101996 0, /*tp_richcompare*/
101997 0, /*tp_weaklistoffset*/
101998 0, /*tp_iter*/
101999 0, /*tp_iternext*/
102000 0, /*tp_methods*/
102001 0, /*tp_members*/
102002 0, /*tp_getset*/
102003 0, /*tp_base*/
102004 0, /*tp_dict*/
102005 0, /*tp_descr_get*/
102006 0, /*tp_descr_set*/
102007 #if !CYTHON_USE_TYPE_SPECS
102008 0, /*tp_dictoffset*/
102009 #endif
102010 0, /*tp_init*/
102011 0, /*tp_alloc*/
102012 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_25_itervalues, /*tp_new*/
102013 0, /*tp_free*/
102014 0, /*tp_is_gc*/
102015 0, /*tp_bases*/
102016 0, /*tp_mro*/
102017 0, /*tp_cache*/
102018 0, /*tp_subclasses*/
102019 0, /*tp_weaklist*/
102020 0, /*tp_del*/
102021 0, /*tp_version_tag*/
102022 #if PY_VERSION_HEX >= 0x030400a1
102023 #if CYTHON_USE_TP_FINALIZE
102024 0, /*tp_finalize*/
102025 #else
102026 NULL, /*tp_finalize*/
102027 #endif
102028 #endif
102029 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102030 0, /*tp_vectorcall*/
102031 #endif
102032 #if __PYX_NEED_TP_PRINT_SLOT == 1
102033 0, /*tp_print*/
102034 #endif
102035 #if PY_VERSION_HEX >= 0x030C0000
102036 0, /*tp_watched*/
102037 #endif
102038 #if PY_VERSION_HEX >= 0x030d00A4
102039 0, /*tp_versions_used*/
102040 #endif
102041 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
102042 0, /*tp_pypy_flags*/
102043 #endif
102044 };
102045 #endif
102046
102047 #if CYTHON_USE_FREELISTS
102048 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_26_iteritems[8];
102049 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_26_iteritems = 0;
102050 #endif
102051
102052 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_26_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
102053 PyObject *o;
102054 #if CYTHON_COMPILING_IN_LIMITED_API
102055 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
102056 o = alloc_func(t, 0);
102057 #else
102058 #if CYTHON_USE_FREELISTS
102059 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_26_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems)))) {
102060 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_26_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_26_iteritems];
102061 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems));
102062 (void) PyObject_INIT(o, t);
102063 PyObject_GC_Track(o);
102064 } else
102065 #endif
102066 {
102067 o = (*t->tp_alloc)(t, 0);
102068 if (unlikely(!o)) return 0;
102069 }
102070 #endif
102071 return o;
102072 }
102073
102074 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_26_iteritems(PyObject *o) {
102075 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *)o;
102076 #if CYTHON_USE_TP_FINALIZE
102077 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
102078 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_26_iteritems) {
102079 if (PyObject_CallFinalizerFromDealloc(o)) return;
102080 }
102081 }
102082 #endif
102083 PyObject_GC_UnTrack(o);
102084 Py_CLEAR(p->__pyx_v_self);
102085 Py_CLEAR(p->__pyx_v_value);
102086 #if CYTHON_USE_FREELISTS
102087 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_26_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems)))) {
102088 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_26_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_26_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *)o);
102089 } else
102090 #endif
102091 {
102092 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
102093 (*Py_TYPE(o)->tp_free)(o);
102094 #else
102095 {
102096 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
102097 if (tp_free) tp_free(o);
102098 }
102099 #endif
102100 }
102101 }
102102
102103 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_26_iteritems(PyObject *o, visitproc v, void *a) {
102104 int e;
102105 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems *)o;
102106 if (p->__pyx_v_self) {
102107 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
102108 }
102109 if (p->__pyx_v_value) {
102110 e = (*v)(p->__pyx_v_value, a); if (e) return e;
102111 }
102112 return 0;
102113 }
102114 #if CYTHON_USE_TYPE_SPECS
102115 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems_slots[] = {
102116 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_26_iteritems},
102117 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_26_iteritems},
102118 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_26_iteritems},
102119 {0, 0},
102120 };
102121 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems_spec = {
102122 "pysam.libcbcf.__pyx_scope_struct_26_iteritems",
102123 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems),
102124 0,
102125 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
102126 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems_slots,
102127 };
102128 #else
102129
102130 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems = {
102131 PyVarObject_HEAD_INIT(0, 0)
102132 "pysam.libcbcf.""__pyx_scope_struct_26_iteritems", /*tp_name*/
102133 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_26_iteritems), /*tp_basicsize*/
102134 0, /*tp_itemsize*/
102135 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_26_iteritems, /*tp_dealloc*/
102136 #if PY_VERSION_HEX < 0x030800b4
102137 0, /*tp_print*/
102138 #endif
102139 #if PY_VERSION_HEX >= 0x030800b4
102140 0, /*tp_vectorcall_offset*/
102141 #endif
102142 0, /*tp_getattr*/
102143 0, /*tp_setattr*/
102144 #if PY_MAJOR_VERSION < 3
102145 0, /*tp_compare*/
102146 #endif
102147 #if PY_MAJOR_VERSION >= 3
102148 0, /*tp_as_async*/
102149 #endif
102150 0, /*tp_repr*/
102151 0, /*tp_as_number*/
102152 0, /*tp_as_sequence*/
102153 0, /*tp_as_mapping*/
102154 0, /*tp_hash*/
102155 0, /*tp_call*/
102156 0, /*tp_str*/
102157 0, /*tp_getattro*/
102158 0, /*tp_setattro*/
102159 0, /*tp_as_buffer*/
102160 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
102161 0, /*tp_doc*/
102162 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_26_iteritems, /*tp_traverse*/
102163 0, /*tp_clear*/
102164 0, /*tp_richcompare*/
102165 0, /*tp_weaklistoffset*/
102166 0, /*tp_iter*/
102167 0, /*tp_iternext*/
102168 0, /*tp_methods*/
102169 0, /*tp_members*/
102170 0, /*tp_getset*/
102171 0, /*tp_base*/
102172 0, /*tp_dict*/
102173 0, /*tp_descr_get*/
102174 0, /*tp_descr_set*/
102175 #if !CYTHON_USE_TYPE_SPECS
102176 0, /*tp_dictoffset*/
102177 #endif
102178 0, /*tp_init*/
102179 0, /*tp_alloc*/
102180 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_26_iteritems, /*tp_new*/
102181 0, /*tp_free*/
102182 0, /*tp_is_gc*/
102183 0, /*tp_bases*/
102184 0, /*tp_mro*/
102185 0, /*tp_cache*/
102186 0, /*tp_subclasses*/
102187 0, /*tp_weaklist*/
102188 0, /*tp_del*/
102189 0, /*tp_version_tag*/
102190 #if PY_VERSION_HEX >= 0x030400a1
102191 #if CYTHON_USE_TP_FINALIZE
102192 0, /*tp_finalize*/
102193 #else
102194 NULL, /*tp_finalize*/
102195 #endif
102196 #endif
102197 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102198 0, /*tp_vectorcall*/
102199 #endif
102200 #if __PYX_NEED_TP_PRINT_SLOT == 1
102201 0, /*tp_print*/
102202 #endif
102203 #if PY_VERSION_HEX >= 0x030C0000
102204 0, /*tp_watched*/
102205 #endif
102206 #if PY_VERSION_HEX >= 0x030d00A4
102207 0, /*tp_versions_used*/
102208 #endif
102209 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
102210 0, /*tp_pypy_flags*/
102211 #endif
102212 };
102213 #endif
102214
102215 #if CYTHON_USE_FREELISTS
102216 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_27___iter__[8];
102217 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_27___iter__ = 0;
102218 #endif
102219
102220 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_27___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
102221 PyObject *o;
102222 #if CYTHON_COMPILING_IN_LIMITED_API
102223 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
102224 o = alloc_func(t, 0);
102225 #else
102226 #if CYTHON_USE_FREELISTS
102227 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_27___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__)))) {
102228 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_27___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_27___iter__];
102229 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__));
102230 (void) PyObject_INIT(o, t);
102231 PyObject_GC_Track(o);
102232 } else
102233 #endif
102234 {
102235 o = (*t->tp_alloc)(t, 0);
102236 if (unlikely(!o)) return 0;
102237 }
102238 #endif
102239 return o;
102240 }
102241
102242 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_27___iter__(PyObject *o) {
102243 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *)o;
102244 #if CYTHON_USE_TP_FINALIZE
102245 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
102246 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_27___iter__) {
102247 if (PyObject_CallFinalizerFromDealloc(o)) return;
102248 }
102249 }
102250 #endif
102251 PyObject_GC_UnTrack(o);
102252 Py_CLEAR(p->__pyx_v_self);
102253 #if CYTHON_USE_FREELISTS
102254 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_27___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__)))) {
102255 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_27___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_27___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *)o);
102256 } else
102257 #endif
102258 {
102259 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
102260 (*Py_TYPE(o)->tp_free)(o);
102261 #else
102262 {
102263 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
102264 if (tp_free) tp_free(o);
102265 }
102266 #endif
102267 }
102268 }
102269
102270 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_27___iter__(PyObject *o, visitproc v, void *a) {
102271 int e;
102272 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__ *)o;
102273 if (p->__pyx_v_self) {
102274 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
102275 }
102276 return 0;
102277 }
102278 #if CYTHON_USE_TYPE_SPECS
102279 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter___slots[] = {
102280 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_27___iter__},
102281 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_27___iter__},
102282 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_27___iter__},
102283 {0, 0},
102284 };
102285 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter___spec = {
102286 "pysam.libcbcf.__pyx_scope_struct_27___iter__",
102287 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__),
102288 0,
102289 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
102290 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter___slots,
102291 };
102292 #else
102293
102294 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter__ = {
102295 PyVarObject_HEAD_INIT(0, 0)
102296 "pysam.libcbcf.""__pyx_scope_struct_27___iter__", /*tp_name*/
102297 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_27___iter__), /*tp_basicsize*/
102298 0, /*tp_itemsize*/
102299 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_27___iter__, /*tp_dealloc*/
102300 #if PY_VERSION_HEX < 0x030800b4
102301 0, /*tp_print*/
102302 #endif
102303 #if PY_VERSION_HEX >= 0x030800b4
102304 0, /*tp_vectorcall_offset*/
102305 #endif
102306 0, /*tp_getattr*/
102307 0, /*tp_setattr*/
102308 #if PY_MAJOR_VERSION < 3
102309 0, /*tp_compare*/
102310 #endif
102311 #if PY_MAJOR_VERSION >= 3
102312 0, /*tp_as_async*/
102313 #endif
102314 0, /*tp_repr*/
102315 0, /*tp_as_number*/
102316 0, /*tp_as_sequence*/
102317 0, /*tp_as_mapping*/
102318 0, /*tp_hash*/
102319 0, /*tp_call*/
102320 0, /*tp_str*/
102321 0, /*tp_getattro*/
102322 0, /*tp_setattro*/
102323 0, /*tp_as_buffer*/
102324 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
102325 0, /*tp_doc*/
102326 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_27___iter__, /*tp_traverse*/
102327 0, /*tp_clear*/
102328 0, /*tp_richcompare*/
102329 0, /*tp_weaklistoffset*/
102330 0, /*tp_iter*/
102331 0, /*tp_iternext*/
102332 0, /*tp_methods*/
102333 0, /*tp_members*/
102334 0, /*tp_getset*/
102335 0, /*tp_base*/
102336 0, /*tp_dict*/
102337 0, /*tp_descr_get*/
102338 0, /*tp_descr_set*/
102339 #if !CYTHON_USE_TYPE_SPECS
102340 0, /*tp_dictoffset*/
102341 #endif
102342 0, /*tp_init*/
102343 0, /*tp_alloc*/
102344 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_27___iter__, /*tp_new*/
102345 0, /*tp_free*/
102346 0, /*tp_is_gc*/
102347 0, /*tp_bases*/
102348 0, /*tp_mro*/
102349 0, /*tp_cache*/
102350 0, /*tp_subclasses*/
102351 0, /*tp_weaklist*/
102352 0, /*tp_del*/
102353 0, /*tp_version_tag*/
102354 #if PY_VERSION_HEX >= 0x030400a1
102355 #if CYTHON_USE_TP_FINALIZE
102356 0, /*tp_finalize*/
102357 #else
102358 NULL, /*tp_finalize*/
102359 #endif
102360 #endif
102361 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102362 0, /*tp_vectorcall*/
102363 #endif
102364 #if __PYX_NEED_TP_PRINT_SLOT == 1
102365 0, /*tp_print*/
102366 #endif
102367 #if PY_VERSION_HEX >= 0x030C0000
102368 0, /*tp_watched*/
102369 #endif
102370 #if PY_VERSION_HEX >= 0x030d00A4
102371 0, /*tp_versions_used*/
102372 #endif
102373 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
102374 0, /*tp_pypy_flags*/
102375 #endif
102376 };
102377 #endif
102378
102379 #if CYTHON_USE_FREELISTS
102380 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_28_itervalues[8];
102381 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_28_itervalues = 0;
102382 #endif
102383
102384 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_28_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
102385 PyObject *o;
102386 #if CYTHON_COMPILING_IN_LIMITED_API
102387 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
102388 o = alloc_func(t, 0);
102389 #else
102390 #if CYTHON_USE_FREELISTS
102391 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_28_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues)))) {
102392 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_28_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_28_itervalues];
102393 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues));
102394 (void) PyObject_INIT(o, t);
102395 PyObject_GC_Track(o);
102396 } else
102397 #endif
102398 {
102399 o = (*t->tp_alloc)(t, 0);
102400 if (unlikely(!o)) return 0;
102401 }
102402 #endif
102403 return o;
102404 }
102405
102406 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_28_itervalues(PyObject *o) {
102407 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *)o;
102408 #if CYTHON_USE_TP_FINALIZE
102409 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
102410 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_28_itervalues) {
102411 if (PyObject_CallFinalizerFromDealloc(o)) return;
102412 }
102413 }
102414 #endif
102415 PyObject_GC_UnTrack(o);
102416 Py_CLEAR(p->__pyx_v_self);
102417 #if CYTHON_USE_FREELISTS
102418 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_28_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues)))) {
102419 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_28_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_28_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *)o);
102420 } else
102421 #endif
102422 {
102423 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
102424 (*Py_TYPE(o)->tp_free)(o);
102425 #else
102426 {
102427 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
102428 if (tp_free) tp_free(o);
102429 }
102430 #endif
102431 }
102432 }
102433
102434 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_28_itervalues(PyObject *o, visitproc v, void *a) {
102435 int e;
102436 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues *)o;
102437 if (p->__pyx_v_self) {
102438 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
102439 }
102440 return 0;
102441 }
102442 #if CYTHON_USE_TYPE_SPECS
102443 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues_slots[] = {
102444 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_28_itervalues},
102445 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_28_itervalues},
102446 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_28_itervalues},
102447 {0, 0},
102448 };
102449 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues_spec = {
102450 "pysam.libcbcf.__pyx_scope_struct_28_itervalues",
102451 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues),
102452 0,
102453 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
102454 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues_slots,
102455 };
102456 #else
102457
102458 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues = {
102459 PyVarObject_HEAD_INIT(0, 0)
102460 "pysam.libcbcf.""__pyx_scope_struct_28_itervalues", /*tp_name*/
102461 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_28_itervalues), /*tp_basicsize*/
102462 0, /*tp_itemsize*/
102463 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_28_itervalues, /*tp_dealloc*/
102464 #if PY_VERSION_HEX < 0x030800b4
102465 0, /*tp_print*/
102466 #endif
102467 #if PY_VERSION_HEX >= 0x030800b4
102468 0, /*tp_vectorcall_offset*/
102469 #endif
102470 0, /*tp_getattr*/
102471 0, /*tp_setattr*/
102472 #if PY_MAJOR_VERSION < 3
102473 0, /*tp_compare*/
102474 #endif
102475 #if PY_MAJOR_VERSION >= 3
102476 0, /*tp_as_async*/
102477 #endif
102478 0, /*tp_repr*/
102479 0, /*tp_as_number*/
102480 0, /*tp_as_sequence*/
102481 0, /*tp_as_mapping*/
102482 0, /*tp_hash*/
102483 0, /*tp_call*/
102484 0, /*tp_str*/
102485 0, /*tp_getattro*/
102486 0, /*tp_setattro*/
102487 0, /*tp_as_buffer*/
102488 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
102489 0, /*tp_doc*/
102490 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_28_itervalues, /*tp_traverse*/
102491 0, /*tp_clear*/
102492 0, /*tp_richcompare*/
102493 0, /*tp_weaklistoffset*/
102494 0, /*tp_iter*/
102495 0, /*tp_iternext*/
102496 0, /*tp_methods*/
102497 0, /*tp_members*/
102498 0, /*tp_getset*/
102499 0, /*tp_base*/
102500 0, /*tp_dict*/
102501 0, /*tp_descr_get*/
102502 0, /*tp_descr_set*/
102503 #if !CYTHON_USE_TYPE_SPECS
102504 0, /*tp_dictoffset*/
102505 #endif
102506 0, /*tp_init*/
102507 0, /*tp_alloc*/
102508 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_28_itervalues, /*tp_new*/
102509 0, /*tp_free*/
102510 0, /*tp_is_gc*/
102511 0, /*tp_bases*/
102512 0, /*tp_mro*/
102513 0, /*tp_cache*/
102514 0, /*tp_subclasses*/
102515 0, /*tp_weaklist*/
102516 0, /*tp_del*/
102517 0, /*tp_version_tag*/
102518 #if PY_VERSION_HEX >= 0x030400a1
102519 #if CYTHON_USE_TP_FINALIZE
102520 0, /*tp_finalize*/
102521 #else
102522 NULL, /*tp_finalize*/
102523 #endif
102524 #endif
102525 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102526 0, /*tp_vectorcall*/
102527 #endif
102528 #if __PYX_NEED_TP_PRINT_SLOT == 1
102529 0, /*tp_print*/
102530 #endif
102531 #if PY_VERSION_HEX >= 0x030C0000
102532 0, /*tp_watched*/
102533 #endif
102534 #if PY_VERSION_HEX >= 0x030d00A4
102535 0, /*tp_versions_used*/
102536 #endif
102537 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
102538 0, /*tp_pypy_flags*/
102539 #endif
102540 };
102541 #endif
102542
102543 #if CYTHON_USE_FREELISTS
102544 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_29_iteritems[8];
102545 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_29_iteritems = 0;
102546 #endif
102547
102548 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_29_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
102549 PyObject *o;
102550 #if CYTHON_COMPILING_IN_LIMITED_API
102551 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
102552 o = alloc_func(t, 0);
102553 #else
102554 #if CYTHON_USE_FREELISTS
102555 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_29_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems)))) {
102556 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_29_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_29_iteritems];
102557 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems));
102558 (void) PyObject_INIT(o, t);
102559 PyObject_GC_Track(o);
102560 } else
102561 #endif
102562 {
102563 o = (*t->tp_alloc)(t, 0);
102564 if (unlikely(!o)) return 0;
102565 }
102566 #endif
102567 return o;
102568 }
102569
102570 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_29_iteritems(PyObject *o) {
102571 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *)o;
102572 #if CYTHON_USE_TP_FINALIZE
102573 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
102574 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_29_iteritems) {
102575 if (PyObject_CallFinalizerFromDealloc(o)) return;
102576 }
102577 }
102578 #endif
102579 PyObject_GC_UnTrack(o);
102580 Py_CLEAR(p->__pyx_v_self);
102581 #if CYTHON_USE_FREELISTS
102582 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_29_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems)))) {
102583 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_29_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_29_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *)o);
102584 } else
102585 #endif
102586 {
102587 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
102588 (*Py_TYPE(o)->tp_free)(o);
102589 #else
102590 {
102591 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
102592 if (tp_free) tp_free(o);
102593 }
102594 #endif
102595 }
102596 }
102597
102598 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_29_iteritems(PyObject *o, visitproc v, void *a) {
102599 int e;
102600 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems *)o;
102601 if (p->__pyx_v_self) {
102602 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
102603 }
102604 return 0;
102605 }
102606 #if CYTHON_USE_TYPE_SPECS
102607 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems_slots[] = {
102608 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_29_iteritems},
102609 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_29_iteritems},
102610 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_29_iteritems},
102611 {0, 0},
102612 };
102613 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems_spec = {
102614 "pysam.libcbcf.__pyx_scope_struct_29_iteritems",
102615 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems),
102616 0,
102617 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
102618 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems_slots,
102619 };
102620 #else
102621
102622 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems = {
102623 PyVarObject_HEAD_INIT(0, 0)
102624 "pysam.libcbcf.""__pyx_scope_struct_29_iteritems", /*tp_name*/
102625 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_29_iteritems), /*tp_basicsize*/
102626 0, /*tp_itemsize*/
102627 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_29_iteritems, /*tp_dealloc*/
102628 #if PY_VERSION_HEX < 0x030800b4
102629 0, /*tp_print*/
102630 #endif
102631 #if PY_VERSION_HEX >= 0x030800b4
102632 0, /*tp_vectorcall_offset*/
102633 #endif
102634 0, /*tp_getattr*/
102635 0, /*tp_setattr*/
102636 #if PY_MAJOR_VERSION < 3
102637 0, /*tp_compare*/
102638 #endif
102639 #if PY_MAJOR_VERSION >= 3
102640 0, /*tp_as_async*/
102641 #endif
102642 0, /*tp_repr*/
102643 0, /*tp_as_number*/
102644 0, /*tp_as_sequence*/
102645 0, /*tp_as_mapping*/
102646 0, /*tp_hash*/
102647 0, /*tp_call*/
102648 0, /*tp_str*/
102649 0, /*tp_getattro*/
102650 0, /*tp_setattro*/
102651 0, /*tp_as_buffer*/
102652 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
102653 0, /*tp_doc*/
102654 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_29_iteritems, /*tp_traverse*/
102655 0, /*tp_clear*/
102656 0, /*tp_richcompare*/
102657 0, /*tp_weaklistoffset*/
102658 0, /*tp_iter*/
102659 0, /*tp_iternext*/
102660 0, /*tp_methods*/
102661 0, /*tp_members*/
102662 0, /*tp_getset*/
102663 0, /*tp_base*/
102664 0, /*tp_dict*/
102665 0, /*tp_descr_get*/
102666 0, /*tp_descr_set*/
102667 #if !CYTHON_USE_TYPE_SPECS
102668 0, /*tp_dictoffset*/
102669 #endif
102670 0, /*tp_init*/
102671 0, /*tp_alloc*/
102672 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_29_iteritems, /*tp_new*/
102673 0, /*tp_free*/
102674 0, /*tp_is_gc*/
102675 0, /*tp_bases*/
102676 0, /*tp_mro*/
102677 0, /*tp_cache*/
102678 0, /*tp_subclasses*/
102679 0, /*tp_weaklist*/
102680 0, /*tp_del*/
102681 0, /*tp_version_tag*/
102682 #if PY_VERSION_HEX >= 0x030400a1
102683 #if CYTHON_USE_TP_FINALIZE
102684 0, /*tp_finalize*/
102685 #else
102686 NULL, /*tp_finalize*/
102687 #endif
102688 #endif
102689 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102690 0, /*tp_vectorcall*/
102691 #endif
102692 #if __PYX_NEED_TP_PRINT_SLOT == 1
102693 0, /*tp_print*/
102694 #endif
102695 #if PY_VERSION_HEX >= 0x030C0000
102696 0, /*tp_watched*/
102697 #endif
102698 #if PY_VERSION_HEX >= 0x030d00A4
102699 0, /*tp_versions_used*/
102700 #endif
102701 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
102702 0, /*tp_pypy_flags*/
102703 #endif
102704 };
102705 #endif
102706
102707 #if CYTHON_USE_FREELISTS
102708 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_30___set__[8];
102709 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_30___set__ = 0;
102710 #endif
102711
102712 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_30___set__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
102713 PyObject *o;
102714 #if CYTHON_COMPILING_IN_LIMITED_API
102715 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
102716 o = alloc_func(t, 0);
102717 #else
102718 #if CYTHON_USE_FREELISTS
102719 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_30___set__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__)))) {
102720 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_30___set__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_30___set__];
102721 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__));
102722 (void) PyObject_INIT(o, t);
102723 PyObject_GC_Track(o);
102724 } else
102725 #endif
102726 {
102727 o = (*t->tp_alloc)(t, 0);
102728 if (unlikely(!o)) return 0;
102729 }
102730 #endif
102731 return o;
102732 }
102733
102734 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_30___set__(PyObject *o) {
102735 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *)o;
102736 #if CYTHON_USE_TP_FINALIZE
102737 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
102738 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_30___set__) {
102739 if (PyObject_CallFinalizerFromDealloc(o)) return;
102740 }
102741 }
102742 #endif
102743 PyObject_GC_UnTrack(o);
102744 Py_CLEAR(p->__pyx_v_self);
102745 #if CYTHON_USE_FREELISTS
102746 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_30___set__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__)))) {
102747 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_30___set__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_30___set__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *)o);
102748 } else
102749 #endif
102750 {
102751 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
102752 (*Py_TYPE(o)->tp_free)(o);
102753 #else
102754 {
102755 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
102756 if (tp_free) tp_free(o);
102757 }
102758 #endif
102759 }
102760 }
102761
102762 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_30___set__(PyObject *o, visitproc v, void *a) {
102763 int e;
102764 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *)o;
102765 if (p->__pyx_v_self) {
102766 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
102767 }
102768 return 0;
102769 }
102770
102771 static int __pyx_tp_clear_5pysam_7libcbcf___pyx_scope_struct_30___set__(PyObject *o) {
102772 PyObject* tmp;
102773 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__ *)o;
102774 tmp = ((PyObject*)p->__pyx_v_self);
102775 p->__pyx_v_self = ((struct __pyx_obj_5pysam_7libcbcf_VariantRecordSample *)Py_None); Py_INCREF(Py_None);
102776 Py_XDECREF(tmp);
102777 return 0;
102778 }
102779 #if CYTHON_USE_TYPE_SPECS
102780 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set___slots[] = {
102781 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_30___set__},
102782 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_30___set__},
102783 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcbcf___pyx_scope_struct_30___set__},
102784 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_30___set__},
102785 {0, 0},
102786 };
102787 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set___spec = {
102788 "pysam.libcbcf.__pyx_scope_struct_30___set__",
102789 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__),
102790 0,
102791 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
102792 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set___slots,
102793 };
102794 #else
102795
102796 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set__ = {
102797 PyVarObject_HEAD_INIT(0, 0)
102798 "pysam.libcbcf.""__pyx_scope_struct_30___set__", /*tp_name*/
102799 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_30___set__), /*tp_basicsize*/
102800 0, /*tp_itemsize*/
102801 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_30___set__, /*tp_dealloc*/
102802 #if PY_VERSION_HEX < 0x030800b4
102803 0, /*tp_print*/
102804 #endif
102805 #if PY_VERSION_HEX >= 0x030800b4
102806 0, /*tp_vectorcall_offset*/
102807 #endif
102808 0, /*tp_getattr*/
102809 0, /*tp_setattr*/
102810 #if PY_MAJOR_VERSION < 3
102811 0, /*tp_compare*/
102812 #endif
102813 #if PY_MAJOR_VERSION >= 3
102814 0, /*tp_as_async*/
102815 #endif
102816 0, /*tp_repr*/
102817 0, /*tp_as_number*/
102818 0, /*tp_as_sequence*/
102819 0, /*tp_as_mapping*/
102820 0, /*tp_hash*/
102821 0, /*tp_call*/
102822 0, /*tp_str*/
102823 0, /*tp_getattro*/
102824 0, /*tp_setattro*/
102825 0, /*tp_as_buffer*/
102826 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
102827 0, /*tp_doc*/
102828 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_30___set__, /*tp_traverse*/
102829 __pyx_tp_clear_5pysam_7libcbcf___pyx_scope_struct_30___set__, /*tp_clear*/
102830 0, /*tp_richcompare*/
102831 0, /*tp_weaklistoffset*/
102832 0, /*tp_iter*/
102833 0, /*tp_iternext*/
102834 0, /*tp_methods*/
102835 0, /*tp_members*/
102836 0, /*tp_getset*/
102837 0, /*tp_base*/
102838 0, /*tp_dict*/
102839 0, /*tp_descr_get*/
102840 0, /*tp_descr_set*/
102841 #if !CYTHON_USE_TYPE_SPECS
102842 0, /*tp_dictoffset*/
102843 #endif
102844 0, /*tp_init*/
102845 0, /*tp_alloc*/
102846 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_30___set__, /*tp_new*/
102847 0, /*tp_free*/
102848 0, /*tp_is_gc*/
102849 0, /*tp_bases*/
102850 0, /*tp_mro*/
102851 0, /*tp_cache*/
102852 0, /*tp_subclasses*/
102853 0, /*tp_weaklist*/
102854 0, /*tp_del*/
102855 0, /*tp_version_tag*/
102856 #if PY_VERSION_HEX >= 0x030400a1
102857 #if CYTHON_USE_TP_FINALIZE
102858 0, /*tp_finalize*/
102859 #else
102860 NULL, /*tp_finalize*/
102861 #endif
102862 #endif
102863 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102864 0, /*tp_vectorcall*/
102865 #endif
102866 #if __PYX_NEED_TP_PRINT_SLOT == 1
102867 0, /*tp_print*/
102868 #endif
102869 #if PY_VERSION_HEX >= 0x030C0000
102870 0, /*tp_watched*/
102871 #endif
102872 #if PY_VERSION_HEX >= 0x030d00A4
102873 0, /*tp_versions_used*/
102874 #endif
102875 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
102876 0, /*tp_pypy_flags*/
102877 #endif
102878 };
102879 #endif
102880
102881 #if CYTHON_USE_FREELISTS
102882 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_31_genexpr[8];
102883 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_31_genexpr = 0;
102884 #endif
102885
102886 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_31_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
102887 PyObject *o;
102888 #if CYTHON_COMPILING_IN_LIMITED_API
102889 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
102890 o = alloc_func(t, 0);
102891 #else
102892 #if CYTHON_USE_FREELISTS
102893 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_31_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr)))) {
102894 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_31_genexpr[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_31_genexpr];
102895 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr));
102896 (void) PyObject_INIT(o, t);
102897 PyObject_GC_Track(o);
102898 } else
102899 #endif
102900 {
102901 o = (*t->tp_alloc)(t, 0);
102902 if (unlikely(!o)) return 0;
102903 }
102904 #endif
102905 return o;
102906 }
102907
102908 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_31_genexpr(PyObject *o) {
102909 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *)o;
102910 #if CYTHON_USE_TP_FINALIZE
102911 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
102912 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_31_genexpr) {
102913 if (PyObject_CallFinalizerFromDealloc(o)) return;
102914 }
102915 }
102916 #endif
102917 PyObject_GC_UnTrack(o);
102918 Py_CLEAR(p->__pyx_genexpr_arg_0);
102919 Py_CLEAR(p->__pyx_v_x);
102920 #if CYTHON_USE_FREELISTS
102921 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_31_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr)))) {
102922 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_31_genexpr[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_31_genexpr++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *)o);
102923 } else
102924 #endif
102925 {
102926 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
102927 (*Py_TYPE(o)->tp_free)(o);
102928 #else
102929 {
102930 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
102931 if (tp_free) tp_free(o);
102932 }
102933 #endif
102934 }
102935 }
102936
102937 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_31_genexpr(PyObject *o, visitproc v, void *a) {
102938 int e;
102939 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr *)o;
102940 if (p->__pyx_genexpr_arg_0) {
102941 e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
102942 }
102943 if (p->__pyx_v_x) {
102944 e = (*v)(p->__pyx_v_x, a); if (e) return e;
102945 }
102946 return 0;
102947 }
102948 #if CYTHON_USE_TYPE_SPECS
102949 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr_slots[] = {
102950 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_31_genexpr},
102951 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_31_genexpr},
102952 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_31_genexpr},
102953 {0, 0},
102954 };
102955 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr_spec = {
102956 "pysam.libcbcf.__pyx_scope_struct_31_genexpr",
102957 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr),
102958 0,
102959 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
102960 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr_slots,
102961 };
102962 #else
102963
102964 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr = {
102965 PyVarObject_HEAD_INIT(0, 0)
102966 "pysam.libcbcf.""__pyx_scope_struct_31_genexpr", /*tp_name*/
102967 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_31_genexpr), /*tp_basicsize*/
102968 0, /*tp_itemsize*/
102969 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_31_genexpr, /*tp_dealloc*/
102970 #if PY_VERSION_HEX < 0x030800b4
102971 0, /*tp_print*/
102972 #endif
102973 #if PY_VERSION_HEX >= 0x030800b4
102974 0, /*tp_vectorcall_offset*/
102975 #endif
102976 0, /*tp_getattr*/
102977 0, /*tp_setattr*/
102978 #if PY_MAJOR_VERSION < 3
102979 0, /*tp_compare*/
102980 #endif
102981 #if PY_MAJOR_VERSION >= 3
102982 0, /*tp_as_async*/
102983 #endif
102984 0, /*tp_repr*/
102985 0, /*tp_as_number*/
102986 0, /*tp_as_sequence*/
102987 0, /*tp_as_mapping*/
102988 0, /*tp_hash*/
102989 0, /*tp_call*/
102990 0, /*tp_str*/
102991 0, /*tp_getattro*/
102992 0, /*tp_setattro*/
102993 0, /*tp_as_buffer*/
102994 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
102995 0, /*tp_doc*/
102996 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_31_genexpr, /*tp_traverse*/
102997 0, /*tp_clear*/
102998 0, /*tp_richcompare*/
102999 0, /*tp_weaklistoffset*/
103000 0, /*tp_iter*/
103001 0, /*tp_iternext*/
103002 0, /*tp_methods*/
103003 0, /*tp_members*/
103004 0, /*tp_getset*/
103005 0, /*tp_base*/
103006 0, /*tp_dict*/
103007 0, /*tp_descr_get*/
103008 0, /*tp_descr_set*/
103009 #if !CYTHON_USE_TYPE_SPECS
103010 0, /*tp_dictoffset*/
103011 #endif
103012 0, /*tp_init*/
103013 0, /*tp_alloc*/
103014 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_31_genexpr, /*tp_new*/
103015 0, /*tp_free*/
103016 0, /*tp_is_gc*/
103017 0, /*tp_bases*/
103018 0, /*tp_mro*/
103019 0, /*tp_cache*/
103020 0, /*tp_subclasses*/
103021 0, /*tp_weaklist*/
103022 0, /*tp_del*/
103023 0, /*tp_version_tag*/
103024 #if PY_VERSION_HEX >= 0x030400a1
103025 #if CYTHON_USE_TP_FINALIZE
103026 0, /*tp_finalize*/
103027 #else
103028 NULL, /*tp_finalize*/
103029 #endif
103030 #endif
103031 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
103032 0, /*tp_vectorcall*/
103033 #endif
103034 #if __PYX_NEED_TP_PRINT_SLOT == 1
103035 0, /*tp_print*/
103036 #endif
103037 #if PY_VERSION_HEX >= 0x030C0000
103038 0, /*tp_watched*/
103039 #endif
103040 #if PY_VERSION_HEX >= 0x030d00A4
103041 0, /*tp_versions_used*/
103042 #endif
103043 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
103044 0, /*tp_pypy_flags*/
103045 #endif
103046 };
103047 #endif
103048
103049 #if CYTHON_USE_FREELISTS
103050 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_32_genexpr[8];
103051 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_32_genexpr = 0;
103052 #endif
103053
103054 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_32_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
103055 PyObject *o;
103056 #if CYTHON_COMPILING_IN_LIMITED_API
103057 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
103058 o = alloc_func(t, 0);
103059 #else
103060 #if CYTHON_USE_FREELISTS
103061 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_32_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr)))) {
103062 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_32_genexpr[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_32_genexpr];
103063 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr));
103064 (void) PyObject_INIT(o, t);
103065 PyObject_GC_Track(o);
103066 } else
103067 #endif
103068 {
103069 o = (*t->tp_alloc)(t, 0);
103070 if (unlikely(!o)) return 0;
103071 }
103072 #endif
103073 return o;
103074 }
103075
103076 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_32_genexpr(PyObject *o) {
103077 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *)o;
103078 #if CYTHON_USE_TP_FINALIZE
103079 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
103080 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_32_genexpr) {
103081 if (PyObject_CallFinalizerFromDealloc(o)) return;
103082 }
103083 }
103084 #endif
103085 PyObject_GC_UnTrack(o);
103086 Py_CLEAR(p->__pyx_outer_scope);
103087 Py_CLEAR(p->__pyx_genexpr_arg_0);
103088 Py_CLEAR(p->__pyx_v_allele);
103089 Py_CLEAR(p->__pyx_t_0);
103090 #if CYTHON_USE_FREELISTS
103091 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_32_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr)))) {
103092 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_32_genexpr[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_32_genexpr++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *)o);
103093 } else
103094 #endif
103095 {
103096 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
103097 (*Py_TYPE(o)->tp_free)(o);
103098 #else
103099 {
103100 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
103101 if (tp_free) tp_free(o);
103102 }
103103 #endif
103104 }
103105 }
103106
103107 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_32_genexpr(PyObject *o, visitproc v, void *a) {
103108 int e;
103109 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr *)o;
103110 if (p->__pyx_outer_scope) {
103111 e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
103112 }
103113 if (p->__pyx_genexpr_arg_0) {
103114 e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
103115 }
103116 if (p->__pyx_v_allele) {
103117 e = (*v)(p->__pyx_v_allele, a); if (e) return e;
103118 }
103119 if (p->__pyx_t_0) {
103120 e = (*v)(p->__pyx_t_0, a); if (e) return e;
103121 }
103122 return 0;
103123 }
103124 #if CYTHON_USE_TYPE_SPECS
103125 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr_slots[] = {
103126 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_32_genexpr},
103127 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_32_genexpr},
103128 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_32_genexpr},
103129 {0, 0},
103130 };
103131 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr_spec = {
103132 "pysam.libcbcf.__pyx_scope_struct_32_genexpr",
103133 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr),
103134 0,
103135 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
103136 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr_slots,
103137 };
103138 #else
103139
103140 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr = {
103141 PyVarObject_HEAD_INIT(0, 0)
103142 "pysam.libcbcf.""__pyx_scope_struct_32_genexpr", /*tp_name*/
103143 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_32_genexpr), /*tp_basicsize*/
103144 0, /*tp_itemsize*/
103145 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_32_genexpr, /*tp_dealloc*/
103146 #if PY_VERSION_HEX < 0x030800b4
103147 0, /*tp_print*/
103148 #endif
103149 #if PY_VERSION_HEX >= 0x030800b4
103150 0, /*tp_vectorcall_offset*/
103151 #endif
103152 0, /*tp_getattr*/
103153 0, /*tp_setattr*/
103154 #if PY_MAJOR_VERSION < 3
103155 0, /*tp_compare*/
103156 #endif
103157 #if PY_MAJOR_VERSION >= 3
103158 0, /*tp_as_async*/
103159 #endif
103160 0, /*tp_repr*/
103161 0, /*tp_as_number*/
103162 0, /*tp_as_sequence*/
103163 0, /*tp_as_mapping*/
103164 0, /*tp_hash*/
103165 0, /*tp_call*/
103166 0, /*tp_str*/
103167 0, /*tp_getattro*/
103168 0, /*tp_setattro*/
103169 0, /*tp_as_buffer*/
103170 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
103171 0, /*tp_doc*/
103172 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_32_genexpr, /*tp_traverse*/
103173 0, /*tp_clear*/
103174 0, /*tp_richcompare*/
103175 0, /*tp_weaklistoffset*/
103176 0, /*tp_iter*/
103177 0, /*tp_iternext*/
103178 0, /*tp_methods*/
103179 0, /*tp_members*/
103180 0, /*tp_getset*/
103181 0, /*tp_base*/
103182 0, /*tp_dict*/
103183 0, /*tp_descr_get*/
103184 0, /*tp_descr_set*/
103185 #if !CYTHON_USE_TYPE_SPECS
103186 0, /*tp_dictoffset*/
103187 #endif
103188 0, /*tp_init*/
103189 0, /*tp_alloc*/
103190 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_32_genexpr, /*tp_new*/
103191 0, /*tp_free*/
103192 0, /*tp_is_gc*/
103193 0, /*tp_bases*/
103194 0, /*tp_mro*/
103195 0, /*tp_cache*/
103196 0, /*tp_subclasses*/
103197 0, /*tp_weaklist*/
103198 0, /*tp_del*/
103199 0, /*tp_version_tag*/
103200 #if PY_VERSION_HEX >= 0x030400a1
103201 #if CYTHON_USE_TP_FINALIZE
103202 0, /*tp_finalize*/
103203 #else
103204 NULL, /*tp_finalize*/
103205 #endif
103206 #endif
103207 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
103208 0, /*tp_vectorcall*/
103209 #endif
103210 #if __PYX_NEED_TP_PRINT_SLOT == 1
103211 0, /*tp_print*/
103212 #endif
103213 #if PY_VERSION_HEX >= 0x030C0000
103214 0, /*tp_watched*/
103215 #endif
103216 #if PY_VERSION_HEX >= 0x030d00A4
103217 0, /*tp_versions_used*/
103218 #endif
103219 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
103220 0, /*tp_pypy_flags*/
103221 #endif
103222 };
103223 #endif
103224
103225 #if CYTHON_USE_FREELISTS
103226 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_33___iter__[8];
103227 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_33___iter__ = 0;
103228 #endif
103229
103230 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_33___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
103231 PyObject *o;
103232 #if CYTHON_COMPILING_IN_LIMITED_API
103233 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
103234 o = alloc_func(t, 0);
103235 #else
103236 #if CYTHON_USE_FREELISTS
103237 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_33___iter__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__)))) {
103238 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_33___iter__[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_33___iter__];
103239 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__));
103240 (void) PyObject_INIT(o, t);
103241 PyObject_GC_Track(o);
103242 } else
103243 #endif
103244 {
103245 o = (*t->tp_alloc)(t, 0);
103246 if (unlikely(!o)) return 0;
103247 }
103248 #endif
103249 return o;
103250 }
103251
103252 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_33___iter__(PyObject *o) {
103253 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *)o;
103254 #if CYTHON_USE_TP_FINALIZE
103255 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
103256 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_33___iter__) {
103257 if (PyObject_CallFinalizerFromDealloc(o)) return;
103258 }
103259 }
103260 #endif
103261 PyObject_GC_UnTrack(o);
103262 Py_CLEAR(p->__pyx_v_self);
103263 #if CYTHON_USE_FREELISTS
103264 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_33___iter__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__)))) {
103265 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_33___iter__[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_33___iter__++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *)o);
103266 } else
103267 #endif
103268 {
103269 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
103270 (*Py_TYPE(o)->tp_free)(o);
103271 #else
103272 {
103273 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
103274 if (tp_free) tp_free(o);
103275 }
103276 #endif
103277 }
103278 }
103279
103280 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_33___iter__(PyObject *o, visitproc v, void *a) {
103281 int e;
103282 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__ *)o;
103283 if (p->__pyx_v_self) {
103284 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
103285 }
103286 return 0;
103287 }
103288 #if CYTHON_USE_TYPE_SPECS
103289 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter___slots[] = {
103290 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_33___iter__},
103291 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_33___iter__},
103292 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_33___iter__},
103293 {0, 0},
103294 };
103295 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter___spec = {
103296 "pysam.libcbcf.__pyx_scope_struct_33___iter__",
103297 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__),
103298 0,
103299 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
103300 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter___slots,
103301 };
103302 #else
103303
103304 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter__ = {
103305 PyVarObject_HEAD_INIT(0, 0)
103306 "pysam.libcbcf.""__pyx_scope_struct_33___iter__", /*tp_name*/
103307 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_33___iter__), /*tp_basicsize*/
103308 0, /*tp_itemsize*/
103309 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_33___iter__, /*tp_dealloc*/
103310 #if PY_VERSION_HEX < 0x030800b4
103311 0, /*tp_print*/
103312 #endif
103313 #if PY_VERSION_HEX >= 0x030800b4
103314 0, /*tp_vectorcall_offset*/
103315 #endif
103316 0, /*tp_getattr*/
103317 0, /*tp_setattr*/
103318 #if PY_MAJOR_VERSION < 3
103319 0, /*tp_compare*/
103320 #endif
103321 #if PY_MAJOR_VERSION >= 3
103322 0, /*tp_as_async*/
103323 #endif
103324 0, /*tp_repr*/
103325 0, /*tp_as_number*/
103326 0, /*tp_as_sequence*/
103327 0, /*tp_as_mapping*/
103328 0, /*tp_hash*/
103329 0, /*tp_call*/
103330 0, /*tp_str*/
103331 0, /*tp_getattro*/
103332 0, /*tp_setattro*/
103333 0, /*tp_as_buffer*/
103334 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
103335 0, /*tp_doc*/
103336 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_33___iter__, /*tp_traverse*/
103337 0, /*tp_clear*/
103338 0, /*tp_richcompare*/
103339 0, /*tp_weaklistoffset*/
103340 0, /*tp_iter*/
103341 0, /*tp_iternext*/
103342 0, /*tp_methods*/
103343 0, /*tp_members*/
103344 0, /*tp_getset*/
103345 0, /*tp_base*/
103346 0, /*tp_dict*/
103347 0, /*tp_descr_get*/
103348 0, /*tp_descr_set*/
103349 #if !CYTHON_USE_TYPE_SPECS
103350 0, /*tp_dictoffset*/
103351 #endif
103352 0, /*tp_init*/
103353 0, /*tp_alloc*/
103354 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_33___iter__, /*tp_new*/
103355 0, /*tp_free*/
103356 0, /*tp_is_gc*/
103357 0, /*tp_bases*/
103358 0, /*tp_mro*/
103359 0, /*tp_cache*/
103360 0, /*tp_subclasses*/
103361 0, /*tp_weaklist*/
103362 0, /*tp_del*/
103363 0, /*tp_version_tag*/
103364 #if PY_VERSION_HEX >= 0x030400a1
103365 #if CYTHON_USE_TP_FINALIZE
103366 0, /*tp_finalize*/
103367 #else
103368 NULL, /*tp_finalize*/
103369 #endif
103370 #endif
103371 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
103372 0, /*tp_vectorcall*/
103373 #endif
103374 #if __PYX_NEED_TP_PRINT_SLOT == 1
103375 0, /*tp_print*/
103376 #endif
103377 #if PY_VERSION_HEX >= 0x030C0000
103378 0, /*tp_watched*/
103379 #endif
103380 #if PY_VERSION_HEX >= 0x030d00A4
103381 0, /*tp_versions_used*/
103382 #endif
103383 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
103384 0, /*tp_pypy_flags*/
103385 #endif
103386 };
103387 #endif
103388
103389 #if CYTHON_USE_FREELISTS
103390 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_34_itervalues[8];
103391 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_34_itervalues = 0;
103392 #endif
103393
103394 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_34_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
103395 PyObject *o;
103396 #if CYTHON_COMPILING_IN_LIMITED_API
103397 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
103398 o = alloc_func(t, 0);
103399 #else
103400 #if CYTHON_USE_FREELISTS
103401 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_34_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues)))) {
103402 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_34_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_34_itervalues];
103403 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues));
103404 (void) PyObject_INIT(o, t);
103405 PyObject_GC_Track(o);
103406 } else
103407 #endif
103408 {
103409 o = (*t->tp_alloc)(t, 0);
103410 if (unlikely(!o)) return 0;
103411 }
103412 #endif
103413 return o;
103414 }
103415
103416 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_34_itervalues(PyObject *o) {
103417 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *)o;
103418 #if CYTHON_USE_TP_FINALIZE
103419 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
103420 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_34_itervalues) {
103421 if (PyObject_CallFinalizerFromDealloc(o)) return;
103422 }
103423 }
103424 #endif
103425 PyObject_GC_UnTrack(o);
103426 Py_CLEAR(p->__pyx_v_key);
103427 Py_CLEAR(p->__pyx_v_self);
103428 Py_CLEAR(p->__pyx_t_0);
103429 #if CYTHON_USE_FREELISTS
103430 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_34_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues)))) {
103431 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_34_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_34_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *)o);
103432 } else
103433 #endif
103434 {
103435 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
103436 (*Py_TYPE(o)->tp_free)(o);
103437 #else
103438 {
103439 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
103440 if (tp_free) tp_free(o);
103441 }
103442 #endif
103443 }
103444 }
103445
103446 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_34_itervalues(PyObject *o, visitproc v, void *a) {
103447 int e;
103448 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues *)o;
103449 if (p->__pyx_v_key) {
103450 e = (*v)(p->__pyx_v_key, a); if (e) return e;
103451 }
103452 if (p->__pyx_v_self) {
103453 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
103454 }
103455 if (p->__pyx_t_0) {
103456 e = (*v)(p->__pyx_t_0, a); if (e) return e;
103457 }
103458 return 0;
103459 }
103460 #if CYTHON_USE_TYPE_SPECS
103461 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues_slots[] = {
103462 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_34_itervalues},
103463 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_34_itervalues},
103464 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_34_itervalues},
103465 {0, 0},
103466 };
103467 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues_spec = {
103468 "pysam.libcbcf.__pyx_scope_struct_34_itervalues",
103469 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues),
103470 0,
103471 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
103472 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues_slots,
103473 };
103474 #else
103475
103476 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues = {
103477 PyVarObject_HEAD_INIT(0, 0)
103478 "pysam.libcbcf.""__pyx_scope_struct_34_itervalues", /*tp_name*/
103479 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_34_itervalues), /*tp_basicsize*/
103480 0, /*tp_itemsize*/
103481 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_34_itervalues, /*tp_dealloc*/
103482 #if PY_VERSION_HEX < 0x030800b4
103483 0, /*tp_print*/
103484 #endif
103485 #if PY_VERSION_HEX >= 0x030800b4
103486 0, /*tp_vectorcall_offset*/
103487 #endif
103488 0, /*tp_getattr*/
103489 0, /*tp_setattr*/
103490 #if PY_MAJOR_VERSION < 3
103491 0, /*tp_compare*/
103492 #endif
103493 #if PY_MAJOR_VERSION >= 3
103494 0, /*tp_as_async*/
103495 #endif
103496 0, /*tp_repr*/
103497 0, /*tp_as_number*/
103498 0, /*tp_as_sequence*/
103499 0, /*tp_as_mapping*/
103500 0, /*tp_hash*/
103501 0, /*tp_call*/
103502 0, /*tp_str*/
103503 0, /*tp_getattro*/
103504 0, /*tp_setattro*/
103505 0, /*tp_as_buffer*/
103506 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
103507 0, /*tp_doc*/
103508 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_34_itervalues, /*tp_traverse*/
103509 0, /*tp_clear*/
103510 0, /*tp_richcompare*/
103511 0, /*tp_weaklistoffset*/
103512 0, /*tp_iter*/
103513 0, /*tp_iternext*/
103514 0, /*tp_methods*/
103515 0, /*tp_members*/
103516 0, /*tp_getset*/
103517 0, /*tp_base*/
103518 0, /*tp_dict*/
103519 0, /*tp_descr_get*/
103520 0, /*tp_descr_set*/
103521 #if !CYTHON_USE_TYPE_SPECS
103522 0, /*tp_dictoffset*/
103523 #endif
103524 0, /*tp_init*/
103525 0, /*tp_alloc*/
103526 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_34_itervalues, /*tp_new*/
103527 0, /*tp_free*/
103528 0, /*tp_is_gc*/
103529 0, /*tp_bases*/
103530 0, /*tp_mro*/
103531 0, /*tp_cache*/
103532 0, /*tp_subclasses*/
103533 0, /*tp_weaklist*/
103534 0, /*tp_del*/
103535 0, /*tp_version_tag*/
103536 #if PY_VERSION_HEX >= 0x030400a1
103537 #if CYTHON_USE_TP_FINALIZE
103538 0, /*tp_finalize*/
103539 #else
103540 NULL, /*tp_finalize*/
103541 #endif
103542 #endif
103543 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
103544 0, /*tp_vectorcall*/
103545 #endif
103546 #if __PYX_NEED_TP_PRINT_SLOT == 1
103547 0, /*tp_print*/
103548 #endif
103549 #if PY_VERSION_HEX >= 0x030C0000
103550 0, /*tp_watched*/
103551 #endif
103552 #if PY_VERSION_HEX >= 0x030d00A4
103553 0, /*tp_versions_used*/
103554 #endif
103555 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
103556 0, /*tp_pypy_flags*/
103557 #endif
103558 };
103559 #endif
103560
103561 #if CYTHON_USE_FREELISTS
103562 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_35_iteritems[8];
103563 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_35_iteritems = 0;
103564 #endif
103565
103566 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_35_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
103567 PyObject *o;
103568 #if CYTHON_COMPILING_IN_LIMITED_API
103569 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
103570 o = alloc_func(t, 0);
103571 #else
103572 #if CYTHON_USE_FREELISTS
103573 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_35_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems)))) {
103574 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_35_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_35_iteritems];
103575 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems));
103576 (void) PyObject_INIT(o, t);
103577 PyObject_GC_Track(o);
103578 } else
103579 #endif
103580 {
103581 o = (*t->tp_alloc)(t, 0);
103582 if (unlikely(!o)) return 0;
103583 }
103584 #endif
103585 return o;
103586 }
103587
103588 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_35_iteritems(PyObject *o) {
103589 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *)o;
103590 #if CYTHON_USE_TP_FINALIZE
103591 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
103592 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_35_iteritems) {
103593 if (PyObject_CallFinalizerFromDealloc(o)) return;
103594 }
103595 }
103596 #endif
103597 PyObject_GC_UnTrack(o);
103598 Py_CLEAR(p->__pyx_v_key);
103599 Py_CLEAR(p->__pyx_v_self);
103600 Py_CLEAR(p->__pyx_t_0);
103601 #if CYTHON_USE_FREELISTS
103602 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_35_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems)))) {
103603 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_35_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_35_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *)o);
103604 } else
103605 #endif
103606 {
103607 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
103608 (*Py_TYPE(o)->tp_free)(o);
103609 #else
103610 {
103611 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
103612 if (tp_free) tp_free(o);
103613 }
103614 #endif
103615 }
103616 }
103617
103618 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_35_iteritems(PyObject *o, visitproc v, void *a) {
103619 int e;
103620 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems *)o;
103621 if (p->__pyx_v_key) {
103622 e = (*v)(p->__pyx_v_key, a); if (e) return e;
103623 }
103624 if (p->__pyx_v_self) {
103625 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
103626 }
103627 if (p->__pyx_t_0) {
103628 e = (*v)(p->__pyx_t_0, a); if (e) return e;
103629 }
103630 return 0;
103631 }
103632 #if CYTHON_USE_TYPE_SPECS
103633 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems_slots[] = {
103634 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_35_iteritems},
103635 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_35_iteritems},
103636 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_35_iteritems},
103637 {0, 0},
103638 };
103639 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems_spec = {
103640 "pysam.libcbcf.__pyx_scope_struct_35_iteritems",
103641 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems),
103642 0,
103643 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
103644 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems_slots,
103645 };
103646 #else
103647
103648 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems = {
103649 PyVarObject_HEAD_INIT(0, 0)
103650 "pysam.libcbcf.""__pyx_scope_struct_35_iteritems", /*tp_name*/
103651 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_35_iteritems), /*tp_basicsize*/
103652 0, /*tp_itemsize*/
103653 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_35_iteritems, /*tp_dealloc*/
103654 #if PY_VERSION_HEX < 0x030800b4
103655 0, /*tp_print*/
103656 #endif
103657 #if PY_VERSION_HEX >= 0x030800b4
103658 0, /*tp_vectorcall_offset*/
103659 #endif
103660 0, /*tp_getattr*/
103661 0, /*tp_setattr*/
103662 #if PY_MAJOR_VERSION < 3
103663 0, /*tp_compare*/
103664 #endif
103665 #if PY_MAJOR_VERSION >= 3
103666 0, /*tp_as_async*/
103667 #endif
103668 0, /*tp_repr*/
103669 0, /*tp_as_number*/
103670 0, /*tp_as_sequence*/
103671 0, /*tp_as_mapping*/
103672 0, /*tp_hash*/
103673 0, /*tp_call*/
103674 0, /*tp_str*/
103675 0, /*tp_getattro*/
103676 0, /*tp_setattro*/
103677 0, /*tp_as_buffer*/
103678 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
103679 0, /*tp_doc*/
103680 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_35_iteritems, /*tp_traverse*/
103681 0, /*tp_clear*/
103682 0, /*tp_richcompare*/
103683 0, /*tp_weaklistoffset*/
103684 0, /*tp_iter*/
103685 0, /*tp_iternext*/
103686 0, /*tp_methods*/
103687 0, /*tp_members*/
103688 0, /*tp_getset*/
103689 0, /*tp_base*/
103690 0, /*tp_dict*/
103691 0, /*tp_descr_get*/
103692 0, /*tp_descr_set*/
103693 #if !CYTHON_USE_TYPE_SPECS
103694 0, /*tp_dictoffset*/
103695 #endif
103696 0, /*tp_init*/
103697 0, /*tp_alloc*/
103698 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_35_iteritems, /*tp_new*/
103699 0, /*tp_free*/
103700 0, /*tp_is_gc*/
103701 0, /*tp_bases*/
103702 0, /*tp_mro*/
103703 0, /*tp_cache*/
103704 0, /*tp_subclasses*/
103705 0, /*tp_weaklist*/
103706 0, /*tp_del*/
103707 0, /*tp_version_tag*/
103708 #if PY_VERSION_HEX >= 0x030400a1
103709 #if CYTHON_USE_TP_FINALIZE
103710 0, /*tp_finalize*/
103711 #else
103712 NULL, /*tp_finalize*/
103713 #endif
103714 #endif
103715 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
103716 0, /*tp_vectorcall*/
103717 #endif
103718 #if __PYX_NEED_TP_PRINT_SLOT == 1
103719 0, /*tp_print*/
103720 #endif
103721 #if PY_VERSION_HEX >= 0x030C0000
103722 0, /*tp_watched*/
103723 #endif
103724 #if PY_VERSION_HEX >= 0x030d00A4
103725 0, /*tp_versions_used*/
103726 #endif
103727 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
103728 0, /*tp_pypy_flags*/
103729 #endif
103730 };
103731 #endif
103732
103733 #if CYTHON_USE_FREELISTS
103734 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_36_itervalues[8];
103735 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_36_itervalues = 0;
103736 #endif
103737
103738 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_36_itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
103739 PyObject *o;
103740 #if CYTHON_COMPILING_IN_LIMITED_API
103741 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
103742 o = alloc_func(t, 0);
103743 #else
103744 #if CYTHON_USE_FREELISTS
103745 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_36_itervalues > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues)))) {
103746 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_36_itervalues[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_36_itervalues];
103747 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues));
103748 (void) PyObject_INIT(o, t);
103749 PyObject_GC_Track(o);
103750 } else
103751 #endif
103752 {
103753 o = (*t->tp_alloc)(t, 0);
103754 if (unlikely(!o)) return 0;
103755 }
103756 #endif
103757 return o;
103758 }
103759
103760 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_36_itervalues(PyObject *o) {
103761 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *)o;
103762 #if CYTHON_USE_TP_FINALIZE
103763 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
103764 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_36_itervalues) {
103765 if (PyObject_CallFinalizerFromDealloc(o)) return;
103766 }
103767 }
103768 #endif
103769 PyObject_GC_UnTrack(o);
103770 Py_CLEAR(p->__pyx_v_key);
103771 Py_CLEAR(p->__pyx_v_self);
103772 Py_CLEAR(p->__pyx_t_0);
103773 #if CYTHON_USE_FREELISTS
103774 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_36_itervalues < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues)))) {
103775 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_36_itervalues[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_36_itervalues++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *)o);
103776 } else
103777 #endif
103778 {
103779 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
103780 (*Py_TYPE(o)->tp_free)(o);
103781 #else
103782 {
103783 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
103784 if (tp_free) tp_free(o);
103785 }
103786 #endif
103787 }
103788 }
103789
103790 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_36_itervalues(PyObject *o, visitproc v, void *a) {
103791 int e;
103792 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues *)o;
103793 if (p->__pyx_v_key) {
103794 e = (*v)(p->__pyx_v_key, a); if (e) return e;
103795 }
103796 if (p->__pyx_v_self) {
103797 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
103798 }
103799 if (p->__pyx_t_0) {
103800 e = (*v)(p->__pyx_t_0, a); if (e) return e;
103801 }
103802 return 0;
103803 }
103804 #if CYTHON_USE_TYPE_SPECS
103805 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues_slots[] = {
103806 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_36_itervalues},
103807 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_36_itervalues},
103808 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_36_itervalues},
103809 {0, 0},
103810 };
103811 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues_spec = {
103812 "pysam.libcbcf.__pyx_scope_struct_36_itervalues",
103813 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues),
103814 0,
103815 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
103816 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues_slots,
103817 };
103818 #else
103819
103820 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues = {
103821 PyVarObject_HEAD_INIT(0, 0)
103822 "pysam.libcbcf.""__pyx_scope_struct_36_itervalues", /*tp_name*/
103823 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_36_itervalues), /*tp_basicsize*/
103824 0, /*tp_itemsize*/
103825 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_36_itervalues, /*tp_dealloc*/
103826 #if PY_VERSION_HEX < 0x030800b4
103827 0, /*tp_print*/
103828 #endif
103829 #if PY_VERSION_HEX >= 0x030800b4
103830 0, /*tp_vectorcall_offset*/
103831 #endif
103832 0, /*tp_getattr*/
103833 0, /*tp_setattr*/
103834 #if PY_MAJOR_VERSION < 3
103835 0, /*tp_compare*/
103836 #endif
103837 #if PY_MAJOR_VERSION >= 3
103838 0, /*tp_as_async*/
103839 #endif
103840 0, /*tp_repr*/
103841 0, /*tp_as_number*/
103842 0, /*tp_as_sequence*/
103843 0, /*tp_as_mapping*/
103844 0, /*tp_hash*/
103845 0, /*tp_call*/
103846 0, /*tp_str*/
103847 0, /*tp_getattro*/
103848 0, /*tp_setattro*/
103849 0, /*tp_as_buffer*/
103850 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
103851 0, /*tp_doc*/
103852 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_36_itervalues, /*tp_traverse*/
103853 0, /*tp_clear*/
103854 0, /*tp_richcompare*/
103855 0, /*tp_weaklistoffset*/
103856 0, /*tp_iter*/
103857 0, /*tp_iternext*/
103858 0, /*tp_methods*/
103859 0, /*tp_members*/
103860 0, /*tp_getset*/
103861 0, /*tp_base*/
103862 0, /*tp_dict*/
103863 0, /*tp_descr_get*/
103864 0, /*tp_descr_set*/
103865 #if !CYTHON_USE_TYPE_SPECS
103866 0, /*tp_dictoffset*/
103867 #endif
103868 0, /*tp_init*/
103869 0, /*tp_alloc*/
103870 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_36_itervalues, /*tp_new*/
103871 0, /*tp_free*/
103872 0, /*tp_is_gc*/
103873 0, /*tp_bases*/
103874 0, /*tp_mro*/
103875 0, /*tp_cache*/
103876 0, /*tp_subclasses*/
103877 0, /*tp_weaklist*/
103878 0, /*tp_del*/
103879 0, /*tp_version_tag*/
103880 #if PY_VERSION_HEX >= 0x030400a1
103881 #if CYTHON_USE_TP_FINALIZE
103882 0, /*tp_finalize*/
103883 #else
103884 NULL, /*tp_finalize*/
103885 #endif
103886 #endif
103887 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
103888 0, /*tp_vectorcall*/
103889 #endif
103890 #if __PYX_NEED_TP_PRINT_SLOT == 1
103891 0, /*tp_print*/
103892 #endif
103893 #if PY_VERSION_HEX >= 0x030C0000
103894 0, /*tp_watched*/
103895 #endif
103896 #if PY_VERSION_HEX >= 0x030d00A4
103897 0, /*tp_versions_used*/
103898 #endif
103899 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
103900 0, /*tp_pypy_flags*/
103901 #endif
103902 };
103903 #endif
103904
103905 #if CYTHON_USE_FREELISTS
103906 static struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_37_iteritems[8];
103907 static int __pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_37_iteritems = 0;
103908 #endif
103909
103910 static PyObject *__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_37_iteritems(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
103911 PyObject *o;
103912 #if CYTHON_COMPILING_IN_LIMITED_API
103913 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
103914 o = alloc_func(t, 0);
103915 #else
103916 #if CYTHON_USE_FREELISTS
103917 if (likely((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_37_iteritems > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems)))) {
103918 o = (PyObject*)__pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_37_iteritems[--__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_37_iteritems];
103919 memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems));
103920 (void) PyObject_INIT(o, t);
103921 PyObject_GC_Track(o);
103922 } else
103923 #endif
103924 {
103925 o = (*t->tp_alloc)(t, 0);
103926 if (unlikely(!o)) return 0;
103927 }
103928 #endif
103929 return o;
103930 }
103931
103932 static void __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_37_iteritems(PyObject *o) {
103933 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *)o;
103934 #if CYTHON_USE_TP_FINALIZE
103935 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
103936 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_37_iteritems) {
103937 if (PyObject_CallFinalizerFromDealloc(o)) return;
103938 }
103939 }
103940 #endif
103941 PyObject_GC_UnTrack(o);
103942 Py_CLEAR(p->__pyx_v_key);
103943 Py_CLEAR(p->__pyx_v_self);
103944 Py_CLEAR(p->__pyx_t_0);
103945 #if CYTHON_USE_FREELISTS
103946 if (((int)(__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_37_iteritems < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems)))) {
103947 __pyx_freelist_5pysam_7libcbcf___pyx_scope_struct_37_iteritems[__pyx_freecount_5pysam_7libcbcf___pyx_scope_struct_37_iteritems++] = ((struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *)o);
103948 } else
103949 #endif
103950 {
103951 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
103952 (*Py_TYPE(o)->tp_free)(o);
103953 #else
103954 {
103955 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
103956 if (tp_free) tp_free(o);
103957 }
103958 #endif
103959 }
103960 }
103961
103962 static int __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_37_iteritems(PyObject *o, visitproc v, void *a) {
103963 int e;
103964 struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *p = (struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems *)o;
103965 if (p->__pyx_v_key) {
103966 e = (*v)(p->__pyx_v_key, a); if (e) return e;
103967 }
103968 if (p->__pyx_v_self) {
103969 e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
103970 }
103971 if (p->__pyx_t_0) {
103972 e = (*v)(p->__pyx_t_0, a); if (e) return e;
103973 }
103974 return 0;
103975 }
103976 #if CYTHON_USE_TYPE_SPECS
103977 static PyType_Slot __pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems_slots[] = {
103978 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_37_iteritems},
103979 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_37_iteritems},
103980 {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_37_iteritems},
103981 {0, 0},
103982 };
103983 static PyType_Spec __pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems_spec = {
103984 "pysam.libcbcf.__pyx_scope_struct_37_iteritems",
103985 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems),
103986 0,
103987 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
103988 __pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems_slots,
103989 };
103990 #else
103991
103992 static PyTypeObject __pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems = {
103993 PyVarObject_HEAD_INIT(0, 0)
103994 "pysam.libcbcf.""__pyx_scope_struct_37_iteritems", /*tp_name*/
103995 sizeof(struct __pyx_obj_5pysam_7libcbcf___pyx_scope_struct_37_iteritems), /*tp_basicsize*/
103996 0, /*tp_itemsize*/
103997 __pyx_tp_dealloc_5pysam_7libcbcf___pyx_scope_struct_37_iteritems, /*tp_dealloc*/
103998 #if PY_VERSION_HEX < 0x030800b4
103999 0, /*tp_print*/
104000 #endif
104001 #if PY_VERSION_HEX >= 0x030800b4
104002 0, /*tp_vectorcall_offset*/
104003 #endif
104004 0, /*tp_getattr*/
104005 0, /*tp_setattr*/
104006 #if PY_MAJOR_VERSION < 3
104007 0, /*tp_compare*/
104008 #endif
104009 #if PY_MAJOR_VERSION >= 3
104010 0, /*tp_as_async*/
104011 #endif
104012 0, /*tp_repr*/
104013 0, /*tp_as_number*/
104014 0, /*tp_as_sequence*/
104015 0, /*tp_as_mapping*/
104016 0, /*tp_hash*/
104017 0, /*tp_call*/
104018 0, /*tp_str*/
104019 0, /*tp_getattro*/
104020 0, /*tp_setattro*/
104021 0, /*tp_as_buffer*/
104022 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
104023 0, /*tp_doc*/
104024 __pyx_tp_traverse_5pysam_7libcbcf___pyx_scope_struct_37_iteritems, /*tp_traverse*/
104025 0, /*tp_clear*/
104026 0, /*tp_richcompare*/
104027 0, /*tp_weaklistoffset*/
104028 0, /*tp_iter*/
104029 0, /*tp_iternext*/
104030 0, /*tp_methods*/
104031 0, /*tp_members*/
104032 0, /*tp_getset*/
104033 0, /*tp_base*/
104034 0, /*tp_dict*/
104035 0, /*tp_descr_get*/
104036 0, /*tp_descr_set*/
104037 #if !CYTHON_USE_TYPE_SPECS
104038 0, /*tp_dictoffset*/
104039 #endif
104040 0, /*tp_init*/
104041 0, /*tp_alloc*/
104042 __pyx_tp_new_5pysam_7libcbcf___pyx_scope_struct_37_iteritems, /*tp_new*/
104043 0, /*tp_free*/
104044 0, /*tp_is_gc*/
104045 0, /*tp_bases*/
104046 0, /*tp_mro*/
104047 0, /*tp_cache*/
104048 0, /*tp_subclasses*/
104049 0, /*tp_weaklist*/
104050 0, /*tp_del*/
104051 0, /*tp_version_tag*/
104052 #if PY_VERSION_HEX >= 0x030400a1
104053 #if CYTHON_USE_TP_FINALIZE
104054 0, /*tp_finalize*/
104055 #else
104056 NULL, /*tp_finalize*/
104057 #endif
104058 #endif
104059 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
104060 0, /*tp_vectorcall*/
104061 #endif
104062 #if __PYX_NEED_TP_PRINT_SLOT == 1
104063 0, /*tp_print*/
104064 #endif
104065 #if PY_VERSION_HEX >= 0x030C0000
104066 0, /*tp_watched*/
104067 #endif
104068 #if PY_VERSION_HEX >= 0x030d00A4
104069 0, /*tp_versions_used*/
104070 #endif
104071 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
104072 0, /*tp_pypy_flags*/
104073 #endif
104074 };
104075 #endif
104076
104077 static PyMethodDef __pyx_methods[] = {
104078 {0, 0, 0, 0}
104079 };
104080 #ifndef CYTHON_SMALL_CODE
104081 #if defined(__clang__)
104082 #define CYTHON_SMALL_CODE
104083 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
104084 #define CYTHON_SMALL_CODE __attribute__((cold))
104085 #else
104086 #define CYTHON_SMALL_CODE
104087 #endif
104088 #endif
104089 /* #### Code section: pystring_table ### */
104090
104091 static int __Pyx_CreateStringTabAndInitStrings(void) {
104092 __Pyx_StringTabEntry __pyx_string_tab[] = {
104093 {&__pyx_n_u_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 1, 0, 1},
104094 {&__pyx_n_u_ALT, __pyx_k_ALT, sizeof(__pyx_k_ALT), 0, 1, 0, 1},
104095 {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
104096 {&__pyx_n_s_BCFIndex, __pyx_k_BCFIndex, sizeof(__pyx_k_BCFIndex), 0, 0, 1, 1},
104097 {&__pyx_n_u_BCFIndex, __pyx_k_BCFIndex, sizeof(__pyx_k_BCFIndex), 0, 1, 0, 1},
104098 {&__pyx_n_s_BCFIndex___reduce_cython, __pyx_k_BCFIndex___reduce_cython, sizeof(__pyx_k_BCFIndex___reduce_cython), 0, 0, 1, 1},
104099 {&__pyx_n_s_BCFIndex___setstate_cython, __pyx_k_BCFIndex___setstate_cython, sizeof(__pyx_k_BCFIndex___setstate_cython), 0, 0, 1, 1},
104100 {&__pyx_n_s_BCFIndex_fetch, __pyx_k_BCFIndex_fetch, sizeof(__pyx_k_BCFIndex_fetch), 0, 0, 1, 1},
104101 {&__pyx_n_s_BCFIterator, __pyx_k_BCFIterator, sizeof(__pyx_k_BCFIterator), 0, 0, 1, 1},
104102 {&__pyx_n_u_BCFIterator, __pyx_k_BCFIterator, sizeof(__pyx_k_BCFIterator), 0, 1, 0, 1},
104103 {&__pyx_n_s_BCFIterator___reduce_cython, __pyx_k_BCFIterator___reduce_cython, sizeof(__pyx_k_BCFIterator___reduce_cython), 0, 0, 1, 1},
104104 {&__pyx_n_s_BCFIterator___setstate_cython, __pyx_k_BCFIterator___setstate_cython, sizeof(__pyx_k_BCFIterator___setstate_cython), 0, 0, 1, 1},
104105 {&__pyx_n_u_BND, __pyx_k_BND, sizeof(__pyx_k_BND), 0, 1, 0, 1},
104106 {&__pyx_n_s_BaseIndex, __pyx_k_BaseIndex, sizeof(__pyx_k_BaseIndex), 0, 0, 1, 1},
104107 {&__pyx_n_u_BaseIndex, __pyx_k_BaseIndex, sizeof(__pyx_k_BaseIndex), 0, 1, 0, 1},
104108 {&__pyx_n_s_BaseIndex___reduce_cython, __pyx_k_BaseIndex___reduce_cython, sizeof(__pyx_k_BaseIndex___reduce_cython), 0, 0, 1, 1},
104109 {&__pyx_n_s_BaseIndex___setstate_cython, __pyx_k_BaseIndex___setstate_cython, sizeof(__pyx_k_BaseIndex___setstate_cython), 0, 0, 1, 1},
104110 {&__pyx_n_s_BaseIndex_get, __pyx_k_BaseIndex_get, sizeof(__pyx_k_BaseIndex_get), 0, 0, 1, 1},
104111 {&__pyx_n_s_BaseIndex_items, __pyx_k_BaseIndex_items, sizeof(__pyx_k_BaseIndex_items), 0, 0, 1, 1},
104112 {&__pyx_n_s_BaseIndex_iteritems, __pyx_k_BaseIndex_iteritems, sizeof(__pyx_k_BaseIndex_iteritems), 0, 0, 1, 1},
104113 {&__pyx_n_s_BaseIndex_iterkeys, __pyx_k_BaseIndex_iterkeys, sizeof(__pyx_k_BaseIndex_iterkeys), 0, 0, 1, 1},
104114 {&__pyx_n_s_BaseIndex_itervalues, __pyx_k_BaseIndex_itervalues, sizeof(__pyx_k_BaseIndex_itervalues), 0, 0, 1, 1},
104115 {&__pyx_n_s_BaseIndex_keys, __pyx_k_BaseIndex_keys, sizeof(__pyx_k_BaseIndex_keys), 0, 0, 1, 1},
104116 {&__pyx_n_s_BaseIndex_pop, __pyx_k_BaseIndex_pop, sizeof(__pyx_k_BaseIndex_pop), 0, 0, 1, 1},
104117 {&__pyx_n_s_BaseIndex_update, __pyx_k_BaseIndex_update, sizeof(__pyx_k_BaseIndex_update), 0, 0, 1, 1},
104118 {&__pyx_n_s_BaseIndex_values, __pyx_k_BaseIndex_values, sizeof(__pyx_k_BaseIndex_values), 0, 0, 1, 1},
104119 {&__pyx_n_s_BaseIterator, __pyx_k_BaseIterator, sizeof(__pyx_k_BaseIterator), 0, 0, 1, 1},
104120 {&__pyx_n_u_BaseIterator, __pyx_k_BaseIterator, sizeof(__pyx_k_BaseIterator), 0, 1, 0, 1},
104121 {&__pyx_n_s_BaseIterator___reduce_cython, __pyx_k_BaseIterator___reduce_cython, sizeof(__pyx_k_BaseIterator___reduce_cython), 0, 0, 1, 1},
104122 {&__pyx_n_s_BaseIterator___setstate_cython, __pyx_k_BaseIterator___setstate_cython, sizeof(__pyx_k_BaseIterator___setstate_cython), 0, 0, 1, 1},
104123 {&__pyx_n_u_CONTIG, __pyx_k_CONTIG, sizeof(__pyx_k_CONTIG), 0, 1, 0, 1},
104124 {&__pyx_kp_u_Cannot_add_extra_threads_when_ig, __pyx_k_Cannot_add_extra_threads_when_ig, sizeof(__pyx_k_Cannot_add_extra_threads_when_ig), 0, 1, 0, 0},
104125 {&__pyx_kp_u_Cannot_copy_arrays_with_src_valu, __pyx_k_Cannot_copy_arrays_with_src_valu, sizeof(__pyx_k_Cannot_copy_arrays_with_src_valu), 0, 1, 0, 0},
104126 {&__pyx_kp_u_Cannot_create_empty_array, __pyx_k_Cannot_create_empty_array, sizeof(__pyx_k_Cannot_create_empty_array), 0, 1, 0, 0},
104127 {&__pyx_kp_u_Cannot_re_open_htsfile, __pyx_k_Cannot_re_open_htsfile, sizeof(__pyx_k_Cannot_re_open_htsfile), 0, 1, 0, 0},
104128 {&__pyx_kp_u_Cannot_set_phased_before_genotyp, __pyx_k_Cannot_set_phased_before_genotyp, sizeof(__pyx_k_Cannot_set_phased_before_genotyp), 0, 1, 0, 0},
104129 {&__pyx_kp_u_Cannot_specify_an_index_filename, __pyx_k_Cannot_specify_an_index_filename, sizeof(__pyx_k_Cannot_specify_an_index_filename), 0, 1, 0, 0},
104130 {&__pyx_kp_u_Cannot_translate_record_Number_o, __pyx_k_Cannot_translate_record_Number_o, sizeof(__pyx_k_Cannot_translate_record_Number_o), 0, 1, 0, 0},
104131 {&__pyx_n_u_Description, __pyx_k_Description, sizeof(__pyx_k_Description), 0, 1, 0, 1},
104132 {&__pyx_kp_u_Duplicated_sample_name, __pyx_k_Duplicated_sample_name, sizeof(__pyx_k_Duplicated_sample_name), 0, 1, 0, 0},
104133 {&__pyx_n_b_END, __pyx_k_END, sizeof(__pyx_k_END), 0, 0, 0, 1},
104134 {&__pyx_n_u_END, __pyx_k_END, sizeof(__pyx_k_END), 0, 1, 0, 1},
104135 {&__pyx_kp_u_END_is_a_reserved_attribute_acce, __pyx_k_END_is_a_reserved_attribute_acce, sizeof(__pyx_k_END_is_a_reserved_attribute_acce), 0, 1, 0, 0},
104136 {&__pyx_kp_u_Error_extracting_ID, __pyx_k_Error_extracting_ID, sizeof(__pyx_k_Error_extracting_ID), 0, 1, 0, 0},
104137 {&__pyx_kp_u_Error_s_reading_record, __pyx_k_Error_s_reading_record, sizeof(__pyx_k_Error_s_reading_record), 0, 1, 0, 0},
104138 {&__pyx_kp_u_Error_unpacking_VariantRecord, __pyx_k_Error_unpacking_VariantRecord, sizeof(__pyx_k_Error_unpacking_VariantRecord), 0, 1, 0, 0},
104139 {&__pyx_kp_u_Error_updating_alleles, __pyx_k_Error_updating_alleles, sizeof(__pyx_k_Error_updating_alleles), 0, 1, 0, 0},
104140 {&__pyx_kp_u_Error_updating_id, __pyx_k_Error_updating_id, sizeof(__pyx_k_Error_updating_id), 0, 1, 0, 0},
104141 {&__pyx_n_u_FILTER, __pyx_k_FILTER, sizeof(__pyx_k_FILTER), 0, 1, 0, 1},
104142 {&__pyx_n_u_FIXED, __pyx_k_FIXED, sizeof(__pyx_k_FIXED), 0, 1, 0, 1},
104143 {&__pyx_n_u_FORMAT, __pyx_k_FORMAT, sizeof(__pyx_k_FORMAT), 0, 1, 0, 1},
104144 {&__pyx_n_u_Flag, __pyx_k_Flag, sizeof(__pyx_k_Flag), 0, 1, 0, 1},
104145 {&__pyx_kp_u_Flag_types_are_not_allowed_on_FO, __pyx_k_Flag_types_are_not_allowed_on_FO, sizeof(__pyx_k_Flag_types_are_not_allowed_on_FO), 0, 1, 0, 0},
104146 {&__pyx_kp_u_Flag_values_must_be_True_False_N, __pyx_k_Flag_values_must_be_True_False_N, sizeof(__pyx_k_Flag_values_must_be_True_False_N), 0, 1, 0, 0},
104147 {&__pyx_n_u_Float, __pyx_k_Float, sizeof(__pyx_k_Float), 0, 1, 0, 1},
104148 {&__pyx_n_u_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 1, 0, 1},
104149 {&__pyx_n_u_GENERIC, __pyx_k_GENERIC, sizeof(__pyx_k_GENERIC), 0, 1, 0, 1},
104150 {&__pyx_n_u_GT, __pyx_k_GT, sizeof(__pyx_k_GT), 0, 1, 0, 1},
104151 {&__pyx_kp_u_Header_already_exists_for_contig, __pyx_k_Header_already_exists_for_contig, sizeof(__pyx_k_Header_already_exists_for_contig), 0, 1, 0, 0},
104152 {&__pyx_kp_u_Header_already_exists_for_id, __pyx_k_Header_already_exists_for_id, sizeof(__pyx_k_Header_already_exists_for_id), 0, 1, 0, 0},
104153 {&__pyx_n_u_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 0, 1, 0, 1},
104154 {&__pyx_n_u_INDEL, __pyx_k_INDEL, sizeof(__pyx_k_INDEL), 0, 1, 0, 1},
104155 {&__pyx_n_u_INFO, __pyx_k_INFO, sizeof(__pyx_k_INFO), 0, 1, 0, 1},
104156 {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
104157 {&__pyx_kp_u_I_O_operation_on_closed_file, __pyx_k_I_O_operation_on_closed_file, sizeof(__pyx_k_I_O_operation_on_closed_file), 0, 1, 0, 0},
104158 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
104159 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0},
104160 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_k_Incompatible_checksums_0x_x_vs_0_3, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_3), 0, 0, 1, 0},
104161 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_k_Incompatible_checksums_0x_x_vs_0_4, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_4), 0, 0, 1, 0},
104162 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_k_Incompatible_checksums_0x_x_vs_0_5, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_5), 0, 0, 1, 0},
104163 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6, __pyx_k_Incompatible_checksums_0x_x_vs_0_6, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_6), 0, 0, 1, 0},
104164 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7, __pyx_k_Incompatible_checksums_0x_x_vs_0_7, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_7), 0, 0, 1, 0},
104165 {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
104166 {&__pyx_n_u_Integer, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 1, 0, 1},
104167 {&__pyx_kp_u_Integer_value_too_small_large_to, __pyx_k_Integer_value_too_small_large_to, sizeof(__pyx_k_Integer_value_too_small_large_to), 0, 1, 0, 0},
104168 {&__pyx_kp_u_Invalid_INFO_field, __pyx_k_Invalid_INFO_field, sizeof(__pyx_k_Invalid_INFO_field), 0, 1, 0, 0},
104169 {&__pyx_kp_u_Invalid_VariantRecord_Number_of, __pyx_k_Invalid_VariantRecord_Number_of, sizeof(__pyx_k_Invalid_VariantRecord_Number_of), 0, 1, 0, 0},
104170 {&__pyx_kp_u_Invalid_allele_index, __pyx_k_Invalid_allele_index, sizeof(__pyx_k_Invalid_allele_index), 0, 1, 0, 0},
104171 {&__pyx_kp_u_Invalid_chromosome_contig, __pyx_k_Invalid_chromosome_contig, sizeof(__pyx_k_Invalid_chromosome_contig), 0, 1, 0, 0},
104172 {&__pyx_kp_u_Invalid_filter, __pyx_k_Invalid_filter, sizeof(__pyx_k_Invalid_filter), 0, 1, 0, 0},
104173 {&__pyx_kp_u_Invalid_header, __pyx_k_Invalid_header, sizeof(__pyx_k_Invalid_header), 0, 1, 0, 0},
104174 {&__pyx_kp_u_Invalid_header_id, __pyx_k_Invalid_header_id, sizeof(__pyx_k_Invalid_header_id), 0, 1, 0, 0},
104175 {&__pyx_kp_u_Invalid_header_record_index, __pyx_k_Invalid_header_record_index, sizeof(__pyx_k_Invalid_header_record_index), 0, 1, 0, 0},
104176 {&__pyx_kp_u_Invalid_index_object, __pyx_k_Invalid_index_object, sizeof(__pyx_k_Invalid_index_object), 0, 1, 0, 0},
104177 {&__pyx_kp_u_Invalid_tid, __pyx_k_Invalid_tid, sizeof(__pyx_k_Invalid_tid), 0, 1, 0, 0},
104178 {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
104179 {&__pyx_n_u_MNP, __pyx_k_MNP, sizeof(__pyx_k_MNP), 0, 1, 0, 1},
104180 {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
104181 {&__pyx_kp_u_NON_REF, __pyx_k_NON_REF, sizeof(__pyx_k_NON_REF), 0, 1, 0, 0},
104182 {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
104183 {&__pyx_n_u_Number, __pyx_k_Number, sizeof(__pyx_k_Number), 0, 1, 0, 1},
104184 {&__pyx_kp_u_Number_must_be_None_when_adding, __pyx_k_Number_must_be_None_when_adding, sizeof(__pyx_k_Number_must_be_None_when_adding), 0, 1, 0, 0},
104185 {&__pyx_n_u_OTHER, __pyx_k_OTHER, sizeof(__pyx_k_OTHER), 0, 1, 0, 1},
104186 {&__pyx_n_u_OVERLAP, __pyx_k_OVERLAP, sizeof(__pyx_k_OVERLAP), 0, 1, 0, 1},
104187 {&__pyx_kp_u_One_or_more_of_the_supplied_samp, __pyx_k_One_or_more_of_the_supplied_samp, sizeof(__pyx_k_One_or_more_of_the_supplied_samp), 0, 1, 0, 0},
104188 {&__pyx_n_u_PASS, __pyx_k_PASS, sizeof(__pyx_k_PASS), 0, 1, 0, 1},
104189 {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
104190 {&__pyx_kp_u_Position_must_be_positive, __pyx_k_Position_must_be_positive, sizeof(__pyx_k_Position_must_be_positive), 0, 1, 0, 0},
104191 {&__pyx_n_u_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 1, 0, 1},
104192 {&__pyx_n_u_REF, __pyx_k_REF, sizeof(__pyx_k_REF), 0, 1, 0, 1},
104193 {&__pyx_n_u_SNP, __pyx_k_SNP, sizeof(__pyx_k_SNP), 0, 1, 0, 1},
104194 {&__pyx_n_u_STRUCTURED, __pyx_k_STRUCTURED, sizeof(__pyx_k_STRUCTURED), 0, 1, 0, 1},
104195 {&__pyx_kp_u_Start_coordinate_must_be_non_neg, __pyx_k_Start_coordinate_must_be_non_neg, sizeof(__pyx_k_Start_coordinate_must_be_non_neg), 0, 1, 0, 0},
104196 {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
104197 {&__pyx_kp_u_Stop_coordinate_must_be_non_nega, __pyx_k_Stop_coordinate_must_be_non_nega, sizeof(__pyx_k_Stop_coordinate_must_be_non_nega), 0, 1, 0, 0},
104198 {&__pyx_kp_u_Stop_position_of_the_interval, __pyx_k_Stop_position_of_the_interval, sizeof(__pyx_k_Stop_position_of_the_interval), 0, 1, 0, 0},
104199 {&__pyx_n_u_String, __pyx_k_String, sizeof(__pyx_k_String), 0, 1, 0, 1},
104200 {&__pyx_n_s_TabixIndex, __pyx_k_TabixIndex, sizeof(__pyx_k_TabixIndex), 0, 0, 1, 1},
104201 {&__pyx_n_u_TabixIndex, __pyx_k_TabixIndex, sizeof(__pyx_k_TabixIndex), 0, 1, 0, 1},
104202 {&__pyx_n_s_TabixIndex___reduce_cython, __pyx_k_TabixIndex___reduce_cython, sizeof(__pyx_k_TabixIndex___reduce_cython), 0, 0, 1, 1},
104203 {&__pyx_n_s_TabixIndex___setstate_cython, __pyx_k_TabixIndex___setstate_cython, sizeof(__pyx_k_TabixIndex___setstate_cython), 0, 0, 1, 1},
104204 {&__pyx_n_s_TabixIndex_fetch, __pyx_k_TabixIndex_fetch, sizeof(__pyx_k_TabixIndex_fetch), 0, 0, 1, 1},
104205 {&__pyx_n_s_TabixIterator, __pyx_k_TabixIterator, sizeof(__pyx_k_TabixIterator), 0, 0, 1, 1},
104206 {&__pyx_n_u_TabixIterator, __pyx_k_TabixIterator, sizeof(__pyx_k_TabixIterator), 0, 1, 0, 1},
104207 {&__pyx_n_s_TabixIterator___reduce_cython, __pyx_k_TabixIterator___reduce_cython, sizeof(__pyx_k_TabixIterator___reduce_cython), 0, 0, 1, 1},
104208 {&__pyx_n_s_TabixIterator___setstate_cython, __pyx_k_TabixIterator___setstate_cython, sizeof(__pyx_k_TabixIterator___setstate_cython), 0, 0, 1, 1},
104209 {&__pyx_n_u_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 1, 0, 1},
104210 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
104211 {&__pyx_kp_u_Type_must_be_None_when_adding_a, __pyx_k_Type_must_be_None_when_adding_a, sizeof(__pyx_k_Type_must_be_None_when_adding_a), 0, 1, 0, 0},
104212 {&__pyx_kp_u_Unable_to_delete_END, __pyx_k_Unable_to_delete_END, sizeof(__pyx_k_Unable_to_delete_END), 0, 1, 0, 0},
104213 {&__pyx_kp_u_Unable_to_delete_FORMAT, __pyx_k_Unable_to_delete_FORMAT, sizeof(__pyx_k_Unable_to_delete_FORMAT), 0, 1, 0, 0},
104214 {&__pyx_kp_u_Unable_to_delete_INFO, __pyx_k_Unable_to_delete_INFO, sizeof(__pyx_k_Unable_to_delete_INFO), 0, 1, 0, 0},
104215 {&__pyx_kp_u_Unable_to_update_INFO_values, __pyx_k_Unable_to_update_INFO_values, sizeof(__pyx_k_Unable_to_update_INFO_values), 0, 1, 0, 0},
104216 {&__pyx_kp_u_Unable_to_update_format_values, __pyx_k_Unable_to_update_format_values, sizeof(__pyx_k_Unable_to_update_format_values), 0, 1, 0, 0},
104217 {&__pyx_kp_u_Unknown_INFO_field, __pyx_k_Unknown_INFO_field, sizeof(__pyx_k_Unknown_INFO_field), 0, 1, 0, 0},
104218 {&__pyx_kp_u_Unknown_allele, __pyx_k_Unknown_allele, sizeof(__pyx_k_Unknown_allele), 0, 1, 0, 0},
104219 {&__pyx_kp_u_Unknown_format_length, __pyx_k_Unknown_format_length, sizeof(__pyx_k_Unknown_format_length), 0, 1, 0, 0},
104220 {&__pyx_kp_u_Unsupported_FORMAT_type, __pyx_k_Unsupported_FORMAT_type, sizeof(__pyx_k_Unsupported_FORMAT_type), 0, 1, 0, 0},
104221 {&__pyx_kp_u_Unsupported_INFO_type, __pyx_k_Unsupported_INFO_type, sizeof(__pyx_k_Unsupported_INFO_type), 0, 1, 0, 0},
104222 {&__pyx_kp_u_Use_allele_indices_to_set_intege, __pyx_k_Use_allele_indices_to_set_intege, sizeof(__pyx_k_Use_allele_indices_to_set_intege), 0, 1, 0, 0},
104223 {&__pyx_n_u_VARIABLE, __pyx_k_VARIABLE, sizeof(__pyx_k_VARIABLE), 0, 1, 0, 1},
104224 {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
104225 {&__pyx_n_s_VariantContig, __pyx_k_VariantContig, sizeof(__pyx_k_VariantContig), 0, 0, 1, 1},
104226 {&__pyx_n_u_VariantContig, __pyx_k_VariantContig, sizeof(__pyx_k_VariantContig), 0, 1, 0, 1},
104227 {&__pyx_n_s_VariantContig___reduce_cython, __pyx_k_VariantContig___reduce_cython, sizeof(__pyx_k_VariantContig___reduce_cython), 0, 0, 1, 1},
104228 {&__pyx_n_s_VariantContig___setstate_cython, __pyx_k_VariantContig___setstate_cython, sizeof(__pyx_k_VariantContig___setstate_cython), 0, 0, 1, 1},
104229 {&__pyx_n_s_VariantContig_remove_header, __pyx_k_VariantContig_remove_header, sizeof(__pyx_k_VariantContig_remove_header), 0, 0, 1, 1},
104230 {&__pyx_n_s_VariantFile, __pyx_k_VariantFile, sizeof(__pyx_k_VariantFile), 0, 0, 1, 1},
104231 {&__pyx_n_u_VariantFile, __pyx_k_VariantFile, sizeof(__pyx_k_VariantFile), 0, 1, 0, 1},
104232 {&__pyx_n_s_VariantFile___reduce_cython, __pyx_k_VariantFile___reduce_cython, sizeof(__pyx_k_VariantFile___reduce_cython), 0, 0, 1, 1},
104233 {&__pyx_n_s_VariantFile___setstate_cython, __pyx_k_VariantFile___setstate_cython, sizeof(__pyx_k_VariantFile___setstate_cython), 0, 0, 1, 1},
104234 {&__pyx_n_s_VariantFile_close, __pyx_k_VariantFile_close, sizeof(__pyx_k_VariantFile_close), 0, 0, 1, 1},
104235 {&__pyx_n_s_VariantFile_copy, __pyx_k_VariantFile_copy, sizeof(__pyx_k_VariantFile_copy), 0, 0, 1, 1},
104236 {&__pyx_n_s_VariantFile_fetch, __pyx_k_VariantFile_fetch, sizeof(__pyx_k_VariantFile_fetch), 0, 0, 1, 1},
104237 {&__pyx_n_s_VariantFile_get_reference_name, __pyx_k_VariantFile_get_reference_name, sizeof(__pyx_k_VariantFile_get_reference_name), 0, 0, 1, 1},
104238 {&__pyx_n_s_VariantFile_get_tid, __pyx_k_VariantFile_get_tid, sizeof(__pyx_k_VariantFile_get_tid), 0, 0, 1, 1},
104239 {&__pyx_n_s_VariantFile_is_valid_tid, __pyx_k_VariantFile_is_valid_tid, sizeof(__pyx_k_VariantFile_is_valid_tid), 0, 0, 1, 1},
104240 {&__pyx_n_s_VariantFile_new_record, __pyx_k_VariantFile_new_record, sizeof(__pyx_k_VariantFile_new_record), 0, 0, 1, 1},
104241 {&__pyx_n_s_VariantFile_open, __pyx_k_VariantFile_open, sizeof(__pyx_k_VariantFile_open), 0, 0, 1, 1},
104242 {&__pyx_n_s_VariantFile_reset, __pyx_k_VariantFile_reset, sizeof(__pyx_k_VariantFile_reset), 0, 0, 1, 1},
104243 {&__pyx_n_s_VariantFile_subset_samples, __pyx_k_VariantFile_subset_samples, sizeof(__pyx_k_VariantFile_subset_samples), 0, 0, 1, 1},
104244 {&__pyx_n_s_VariantFile_write, __pyx_k_VariantFile_write, sizeof(__pyx_k_VariantFile_write), 0, 0, 1, 1},
104245 {&__pyx_n_s_VariantHeader, __pyx_k_VariantHeader, sizeof(__pyx_k_VariantHeader), 0, 0, 1, 1},
104246 {&__pyx_n_u_VariantHeader, __pyx_k_VariantHeader, sizeof(__pyx_k_VariantHeader), 0, 1, 0, 1},
104247 {&__pyx_n_s_VariantHeaderContigs, __pyx_k_VariantHeaderContigs, sizeof(__pyx_k_VariantHeaderContigs), 0, 0, 1, 1},
104248 {&__pyx_n_u_VariantHeaderContigs, __pyx_k_VariantHeaderContigs, sizeof(__pyx_k_VariantHeaderContigs), 0, 1, 0, 1},
104249 {&__pyx_n_s_VariantHeaderContigs___iter, __pyx_k_VariantHeaderContigs___iter, sizeof(__pyx_k_VariantHeaderContigs___iter), 0, 0, 1, 1},
104250 {&__pyx_n_s_VariantHeaderContigs___reduce_cy, __pyx_k_VariantHeaderContigs___reduce_cy, sizeof(__pyx_k_VariantHeaderContigs___reduce_cy), 0, 0, 1, 1},
104251 {&__pyx_n_s_VariantHeaderContigs___setstate, __pyx_k_VariantHeaderContigs___setstate, sizeof(__pyx_k_VariantHeaderContigs___setstate), 0, 0, 1, 1},
104252 {&__pyx_n_s_VariantHeaderContigs_add, __pyx_k_VariantHeaderContigs_add, sizeof(__pyx_k_VariantHeaderContigs_add), 0, 0, 1, 1},
104253 {&__pyx_n_s_VariantHeaderContigs_clear_heade, __pyx_k_VariantHeaderContigs_clear_heade, sizeof(__pyx_k_VariantHeaderContigs_clear_heade), 0, 0, 1, 1},
104254 {&__pyx_n_s_VariantHeaderContigs_get, __pyx_k_VariantHeaderContigs_get, sizeof(__pyx_k_VariantHeaderContigs_get), 0, 0, 1, 1},
104255 {&__pyx_n_s_VariantHeaderContigs_items, __pyx_k_VariantHeaderContigs_items, sizeof(__pyx_k_VariantHeaderContigs_items), 0, 0, 1, 1},
104256 {&__pyx_n_s_VariantHeaderContigs_iteritems, __pyx_k_VariantHeaderContigs_iteritems, sizeof(__pyx_k_VariantHeaderContigs_iteritems), 0, 0, 1, 1},
104257 {&__pyx_n_s_VariantHeaderContigs_iterkeys, __pyx_k_VariantHeaderContigs_iterkeys, sizeof(__pyx_k_VariantHeaderContigs_iterkeys), 0, 0, 1, 1},
104258 {&__pyx_n_s_VariantHeaderContigs_itervalues, __pyx_k_VariantHeaderContigs_itervalues, sizeof(__pyx_k_VariantHeaderContigs_itervalues), 0, 0, 1, 1},
104259 {&__pyx_n_s_VariantHeaderContigs_keys, __pyx_k_VariantHeaderContigs_keys, sizeof(__pyx_k_VariantHeaderContigs_keys), 0, 0, 1, 1},
104260 {&__pyx_n_s_VariantHeaderContigs_remove_head, __pyx_k_VariantHeaderContigs_remove_head, sizeof(__pyx_k_VariantHeaderContigs_remove_head), 0, 0, 1, 1},
104261 {&__pyx_n_s_VariantHeaderContigs_values, __pyx_k_VariantHeaderContigs_values, sizeof(__pyx_k_VariantHeaderContigs_values), 0, 0, 1, 1},
104262 {&__pyx_n_s_VariantHeaderMetadata, __pyx_k_VariantHeaderMetadata, sizeof(__pyx_k_VariantHeaderMetadata), 0, 0, 1, 1},
104263 {&__pyx_n_u_VariantHeaderMetadata, __pyx_k_VariantHeaderMetadata, sizeof(__pyx_k_VariantHeaderMetadata), 0, 1, 0, 1},
104264 {&__pyx_n_s_VariantHeaderMetadata___iter, __pyx_k_VariantHeaderMetadata___iter, sizeof(__pyx_k_VariantHeaderMetadata___iter), 0, 0, 1, 1},
104265 {&__pyx_n_s_VariantHeaderMetadata___reduce_c, __pyx_k_VariantHeaderMetadata___reduce_c, sizeof(__pyx_k_VariantHeaderMetadata___reduce_c), 0, 0, 1, 1},
104266 {&__pyx_n_s_VariantHeaderMetadata___setstate, __pyx_k_VariantHeaderMetadata___setstate, sizeof(__pyx_k_VariantHeaderMetadata___setstate), 0, 0, 1, 1},
104267 {&__pyx_n_s_VariantHeaderMetadata_add, __pyx_k_VariantHeaderMetadata_add, sizeof(__pyx_k_VariantHeaderMetadata_add), 0, 0, 1, 1},
104268 {&__pyx_n_s_VariantHeaderMetadata_clear_head, __pyx_k_VariantHeaderMetadata_clear_head, sizeof(__pyx_k_VariantHeaderMetadata_clear_head), 0, 0, 1, 1},
104269 {&__pyx_n_s_VariantHeaderMetadata_get, __pyx_k_VariantHeaderMetadata_get, sizeof(__pyx_k_VariantHeaderMetadata_get), 0, 0, 1, 1},
104270 {&__pyx_n_s_VariantHeaderMetadata_items, __pyx_k_VariantHeaderMetadata_items, sizeof(__pyx_k_VariantHeaderMetadata_items), 0, 0, 1, 1},
104271 {&__pyx_n_s_VariantHeaderMetadata_iteritems, __pyx_k_VariantHeaderMetadata_iteritems, sizeof(__pyx_k_VariantHeaderMetadata_iteritems), 0, 0, 1, 1},
104272 {&__pyx_n_s_VariantHeaderMetadata_iterkeys, __pyx_k_VariantHeaderMetadata_iterkeys, sizeof(__pyx_k_VariantHeaderMetadata_iterkeys), 0, 0, 1, 1},
104273 {&__pyx_n_s_VariantHeaderMetadata_itervalues, __pyx_k_VariantHeaderMetadata_itervalues, sizeof(__pyx_k_VariantHeaderMetadata_itervalues), 0, 0, 1, 1},
104274 {&__pyx_n_s_VariantHeaderMetadata_keys, __pyx_k_VariantHeaderMetadata_keys, sizeof(__pyx_k_VariantHeaderMetadata_keys), 0, 0, 1, 1},
104275 {&__pyx_n_s_VariantHeaderMetadata_remove_hea, __pyx_k_VariantHeaderMetadata_remove_hea, sizeof(__pyx_k_VariantHeaderMetadata_remove_hea), 0, 0, 1, 1},
104276 {&__pyx_n_s_VariantHeaderMetadata_values, __pyx_k_VariantHeaderMetadata_values, sizeof(__pyx_k_VariantHeaderMetadata_values), 0, 0, 1, 1},
104277 {&__pyx_n_s_VariantHeaderRecord, __pyx_k_VariantHeaderRecord, sizeof(__pyx_k_VariantHeaderRecord), 0, 0, 1, 1},
104278 {&__pyx_n_u_VariantHeaderRecord, __pyx_k_VariantHeaderRecord, sizeof(__pyx_k_VariantHeaderRecord), 0, 1, 0, 1},
104279 {&__pyx_n_s_VariantHeaderRecord___get___loca, __pyx_k_VariantHeaderRecord___get___loca, sizeof(__pyx_k_VariantHeaderRecord___get___loca), 0, 0, 1, 1},
104280 {&__pyx_n_s_VariantHeaderRecord___iter, __pyx_k_VariantHeaderRecord___iter, sizeof(__pyx_k_VariantHeaderRecord___iter), 0, 0, 1, 1},
104281 {&__pyx_n_s_VariantHeaderRecord___reduce_cyt, __pyx_k_VariantHeaderRecord___reduce_cyt, sizeof(__pyx_k_VariantHeaderRecord___reduce_cyt), 0, 0, 1, 1},
104282 {&__pyx_n_s_VariantHeaderRecord___setstate_c, __pyx_k_VariantHeaderRecord___setstate_c, sizeof(__pyx_k_VariantHeaderRecord___setstate_c), 0, 0, 1, 1},
104283 {&__pyx_n_s_VariantHeaderRecord_get, __pyx_k_VariantHeaderRecord_get, sizeof(__pyx_k_VariantHeaderRecord_get), 0, 0, 1, 1},
104284 {&__pyx_n_s_VariantHeaderRecord_items, __pyx_k_VariantHeaderRecord_items, sizeof(__pyx_k_VariantHeaderRecord_items), 0, 0, 1, 1},
104285 {&__pyx_n_s_VariantHeaderRecord_iteritems, __pyx_k_VariantHeaderRecord_iteritems, sizeof(__pyx_k_VariantHeaderRecord_iteritems), 0, 0, 1, 1},
104286 {&__pyx_n_s_VariantHeaderRecord_iterkeys, __pyx_k_VariantHeaderRecord_iterkeys, sizeof(__pyx_k_VariantHeaderRecord_iterkeys), 0, 0, 1, 1},
104287 {&__pyx_n_s_VariantHeaderRecord_itervalues, __pyx_k_VariantHeaderRecord_itervalues, sizeof(__pyx_k_VariantHeaderRecord_itervalues), 0, 0, 1, 1},
104288 {&__pyx_n_s_VariantHeaderRecord_keys, __pyx_k_VariantHeaderRecord_keys, sizeof(__pyx_k_VariantHeaderRecord_keys), 0, 0, 1, 1},
104289 {&__pyx_n_s_VariantHeaderRecord_pop, __pyx_k_VariantHeaderRecord_pop, sizeof(__pyx_k_VariantHeaderRecord_pop), 0, 0, 1, 1},
104290 {&__pyx_n_s_VariantHeaderRecord_remove, __pyx_k_VariantHeaderRecord_remove, sizeof(__pyx_k_VariantHeaderRecord_remove), 0, 0, 1, 1},
104291 {&__pyx_n_s_VariantHeaderRecord_update, __pyx_k_VariantHeaderRecord_update, sizeof(__pyx_k_VariantHeaderRecord_update), 0, 0, 1, 1},
104292 {&__pyx_n_s_VariantHeaderRecord_values, __pyx_k_VariantHeaderRecord_values, sizeof(__pyx_k_VariantHeaderRecord_values), 0, 0, 1, 1},
104293 {&__pyx_n_s_VariantHeaderRecords, __pyx_k_VariantHeaderRecords, sizeof(__pyx_k_VariantHeaderRecords), 0, 0, 1, 1},
104294 {&__pyx_n_u_VariantHeaderRecords, __pyx_k_VariantHeaderRecords, sizeof(__pyx_k_VariantHeaderRecords), 0, 1, 0, 1},
104295 {&__pyx_n_s_VariantHeaderRecords___iter, __pyx_k_VariantHeaderRecords___iter, sizeof(__pyx_k_VariantHeaderRecords___iter), 0, 0, 1, 1},
104296 {&__pyx_n_s_VariantHeaderRecords___reduce_cy, __pyx_k_VariantHeaderRecords___reduce_cy, sizeof(__pyx_k_VariantHeaderRecords___reduce_cy), 0, 0, 1, 1},
104297 {&__pyx_n_s_VariantHeaderRecords___setstate, __pyx_k_VariantHeaderRecords___setstate, sizeof(__pyx_k_VariantHeaderRecords___setstate), 0, 0, 1, 1},
104298 {&__pyx_n_s_VariantHeaderSamples, __pyx_k_VariantHeaderSamples, sizeof(__pyx_k_VariantHeaderSamples), 0, 0, 1, 1},
104299 {&__pyx_n_u_VariantHeaderSamples, __pyx_k_VariantHeaderSamples, sizeof(__pyx_k_VariantHeaderSamples), 0, 1, 0, 1},
104300 {&__pyx_n_s_VariantHeaderSamples___iter, __pyx_k_VariantHeaderSamples___iter, sizeof(__pyx_k_VariantHeaderSamples___iter), 0, 0, 1, 1},
104301 {&__pyx_n_s_VariantHeaderSamples___reduce_cy, __pyx_k_VariantHeaderSamples___reduce_cy, sizeof(__pyx_k_VariantHeaderSamples___reduce_cy), 0, 0, 1, 1},
104302 {&__pyx_n_s_VariantHeaderSamples___setstate, __pyx_k_VariantHeaderSamples___setstate, sizeof(__pyx_k_VariantHeaderSamples___setstate), 0, 0, 1, 1},
104303 {&__pyx_n_s_VariantHeaderSamples_add, __pyx_k_VariantHeaderSamples_add, sizeof(__pyx_k_VariantHeaderSamples_add), 0, 0, 1, 1},
104304 {&__pyx_n_s_VariantHeader___reduce_cython, __pyx_k_VariantHeader___reduce_cython, sizeof(__pyx_k_VariantHeader___reduce_cython), 0, 0, 1, 1},
104305 {&__pyx_n_s_VariantHeader___setstate_cython, __pyx_k_VariantHeader___setstate_cython, sizeof(__pyx_k_VariantHeader___setstate_cython), 0, 0, 1, 1},
104306 {&__pyx_n_s_VariantHeader_add_line, __pyx_k_VariantHeader_add_line, sizeof(__pyx_k_VariantHeader_add_line), 0, 0, 1, 1},
104307 {&__pyx_n_s_VariantHeader_add_meta, __pyx_k_VariantHeader_add_meta, sizeof(__pyx_k_VariantHeader_add_meta), 0, 0, 1, 1},
104308 {&__pyx_n_s_VariantHeader_add_record, __pyx_k_VariantHeader_add_record, sizeof(__pyx_k_VariantHeader_add_record), 0, 0, 1, 1},
104309 {&__pyx_n_s_VariantHeader_add_sample, __pyx_k_VariantHeader_add_sample, sizeof(__pyx_k_VariantHeader_add_sample), 0, 0, 1, 1},
104310 {&__pyx_n_s_VariantHeader_add_samples, __pyx_k_VariantHeader_add_samples, sizeof(__pyx_k_VariantHeader_add_samples), 0, 0, 1, 1},
104311 {&__pyx_n_s_VariantHeader_copy, __pyx_k_VariantHeader_copy, sizeof(__pyx_k_VariantHeader_copy), 0, 0, 1, 1},
104312 {&__pyx_n_s_VariantHeader_merge, __pyx_k_VariantHeader_merge, sizeof(__pyx_k_VariantHeader_merge), 0, 0, 1, 1},
104313 {&__pyx_n_s_VariantHeader_new_record, __pyx_k_VariantHeader_new_record, sizeof(__pyx_k_VariantHeader_new_record), 0, 0, 1, 1},
104314 {&__pyx_n_s_VariantMetadata, __pyx_k_VariantMetadata, sizeof(__pyx_k_VariantMetadata), 0, 0, 1, 1},
104315 {&__pyx_n_u_VariantMetadata, __pyx_k_VariantMetadata, sizeof(__pyx_k_VariantMetadata), 0, 1, 0, 1},
104316 {&__pyx_n_s_VariantMetadata___reduce_cython, __pyx_k_VariantMetadata___reduce_cython, sizeof(__pyx_k_VariantMetadata___reduce_cython), 0, 0, 1, 1},
104317 {&__pyx_n_s_VariantMetadata___setstate_cytho, __pyx_k_VariantMetadata___setstate_cytho, sizeof(__pyx_k_VariantMetadata___setstate_cytho), 0, 0, 1, 1},
104318 {&__pyx_n_s_VariantMetadata_remove_header, __pyx_k_VariantMetadata_remove_header, sizeof(__pyx_k_VariantMetadata_remove_header), 0, 0, 1, 1},
104319 {&__pyx_n_s_VariantRecord, __pyx_k_VariantRecord, sizeof(__pyx_k_VariantRecord), 0, 0, 1, 1},
104320 {&__pyx_n_u_VariantRecord, __pyx_k_VariantRecord, sizeof(__pyx_k_VariantRecord), 0, 1, 0, 1},
104321 {&__pyx_n_s_VariantRecordFilter, __pyx_k_VariantRecordFilter, sizeof(__pyx_k_VariantRecordFilter), 0, 0, 1, 1},
104322 {&__pyx_n_u_VariantRecordFilter, __pyx_k_VariantRecordFilter, sizeof(__pyx_k_VariantRecordFilter), 0, 1, 0, 1},
104323 {&__pyx_n_s_VariantRecordFilter___iter, __pyx_k_VariantRecordFilter___iter, sizeof(__pyx_k_VariantRecordFilter___iter), 0, 0, 1, 1},
104324 {&__pyx_n_s_VariantRecordFilter___reduce_cyt, __pyx_k_VariantRecordFilter___reduce_cyt, sizeof(__pyx_k_VariantRecordFilter___reduce_cyt), 0, 0, 1, 1},
104325 {&__pyx_n_s_VariantRecordFilter___setstate_c, __pyx_k_VariantRecordFilter___setstate_c, sizeof(__pyx_k_VariantRecordFilter___setstate_c), 0, 0, 1, 1},
104326 {&__pyx_n_s_VariantRecordFilter_add, __pyx_k_VariantRecordFilter_add, sizeof(__pyx_k_VariantRecordFilter_add), 0, 0, 1, 1},
104327 {&__pyx_n_s_VariantRecordFilter_clear, __pyx_k_VariantRecordFilter_clear, sizeof(__pyx_k_VariantRecordFilter_clear), 0, 0, 1, 1},
104328 {&__pyx_n_s_VariantRecordFilter_get, __pyx_k_VariantRecordFilter_get, sizeof(__pyx_k_VariantRecordFilter_get), 0, 0, 1, 1},
104329 {&__pyx_n_s_VariantRecordFilter_items, __pyx_k_VariantRecordFilter_items, sizeof(__pyx_k_VariantRecordFilter_items), 0, 0, 1, 1},
104330 {&__pyx_n_s_VariantRecordFilter_iteritems, __pyx_k_VariantRecordFilter_iteritems, sizeof(__pyx_k_VariantRecordFilter_iteritems), 0, 0, 1, 1},
104331 {&__pyx_n_s_VariantRecordFilter_iterkeys, __pyx_k_VariantRecordFilter_iterkeys, sizeof(__pyx_k_VariantRecordFilter_iterkeys), 0, 0, 1, 1},
104332 {&__pyx_n_s_VariantRecordFilter_itervalues, __pyx_k_VariantRecordFilter_itervalues, sizeof(__pyx_k_VariantRecordFilter_itervalues), 0, 0, 1, 1},
104333 {&__pyx_n_s_VariantRecordFilter_keys, __pyx_k_VariantRecordFilter_keys, sizeof(__pyx_k_VariantRecordFilter_keys), 0, 0, 1, 1},
104334 {&__pyx_n_s_VariantRecordFilter_values, __pyx_k_VariantRecordFilter_values, sizeof(__pyx_k_VariantRecordFilter_values), 0, 0, 1, 1},
104335 {&__pyx_n_s_VariantRecordFormat, __pyx_k_VariantRecordFormat, sizeof(__pyx_k_VariantRecordFormat), 0, 0, 1, 1},
104336 {&__pyx_n_u_VariantRecordFormat, __pyx_k_VariantRecordFormat, sizeof(__pyx_k_VariantRecordFormat), 0, 1, 0, 1},
104337 {&__pyx_n_s_VariantRecordFormat___iter, __pyx_k_VariantRecordFormat___iter, sizeof(__pyx_k_VariantRecordFormat___iter), 0, 0, 1, 1},
104338 {&__pyx_n_s_VariantRecordFormat___reduce_cyt, __pyx_k_VariantRecordFormat___reduce_cyt, sizeof(__pyx_k_VariantRecordFormat___reduce_cyt), 0, 0, 1, 1},
104339 {&__pyx_n_s_VariantRecordFormat___setstate_c, __pyx_k_VariantRecordFormat___setstate_c, sizeof(__pyx_k_VariantRecordFormat___setstate_c), 0, 0, 1, 1},
104340 {&__pyx_n_s_VariantRecordFormat_clear, __pyx_k_VariantRecordFormat_clear, sizeof(__pyx_k_VariantRecordFormat_clear), 0, 0, 1, 1},
104341 {&__pyx_n_s_VariantRecordFormat_get, __pyx_k_VariantRecordFormat_get, sizeof(__pyx_k_VariantRecordFormat_get), 0, 0, 1, 1},
104342 {&__pyx_n_s_VariantRecordFormat_items, __pyx_k_VariantRecordFormat_items, sizeof(__pyx_k_VariantRecordFormat_items), 0, 0, 1, 1},
104343 {&__pyx_n_s_VariantRecordFormat_iteritems, __pyx_k_VariantRecordFormat_iteritems, sizeof(__pyx_k_VariantRecordFormat_iteritems), 0, 0, 1, 1},
104344 {&__pyx_n_s_VariantRecordFormat_iterkeys, __pyx_k_VariantRecordFormat_iterkeys, sizeof(__pyx_k_VariantRecordFormat_iterkeys), 0, 0, 1, 1},
104345 {&__pyx_n_s_VariantRecordFormat_itervalues, __pyx_k_VariantRecordFormat_itervalues, sizeof(__pyx_k_VariantRecordFormat_itervalues), 0, 0, 1, 1},
104346 {&__pyx_n_s_VariantRecordFormat_keys, __pyx_k_VariantRecordFormat_keys, sizeof(__pyx_k_VariantRecordFormat_keys), 0, 0, 1, 1},
104347 {&__pyx_n_s_VariantRecordFormat_values, __pyx_k_VariantRecordFormat_values, sizeof(__pyx_k_VariantRecordFormat_values), 0, 0, 1, 1},
104348 {&__pyx_n_s_VariantRecordInfo, __pyx_k_VariantRecordInfo, sizeof(__pyx_k_VariantRecordInfo), 0, 0, 1, 1},
104349 {&__pyx_n_u_VariantRecordInfo, __pyx_k_VariantRecordInfo, sizeof(__pyx_k_VariantRecordInfo), 0, 1, 0, 1},
104350 {&__pyx_n_s_VariantRecordInfo___iter, __pyx_k_VariantRecordInfo___iter, sizeof(__pyx_k_VariantRecordInfo___iter), 0, 0, 1, 1},
104351 {&__pyx_n_s_VariantRecordInfo___reduce_cytho, __pyx_k_VariantRecordInfo___reduce_cytho, sizeof(__pyx_k_VariantRecordInfo___reduce_cytho), 0, 0, 1, 1},
104352 {&__pyx_n_s_VariantRecordInfo___setstate_cyt, __pyx_k_VariantRecordInfo___setstate_cyt, sizeof(__pyx_k_VariantRecordInfo___setstate_cyt), 0, 0, 1, 1},
104353 {&__pyx_n_s_VariantRecordInfo_clear, __pyx_k_VariantRecordInfo_clear, sizeof(__pyx_k_VariantRecordInfo_clear), 0, 0, 1, 1},
104354 {&__pyx_n_s_VariantRecordInfo_get, __pyx_k_VariantRecordInfo_get, sizeof(__pyx_k_VariantRecordInfo_get), 0, 0, 1, 1},
104355 {&__pyx_n_s_VariantRecordInfo_items, __pyx_k_VariantRecordInfo_items, sizeof(__pyx_k_VariantRecordInfo_items), 0, 0, 1, 1},
104356 {&__pyx_n_s_VariantRecordInfo_iteritems, __pyx_k_VariantRecordInfo_iteritems, sizeof(__pyx_k_VariantRecordInfo_iteritems), 0, 0, 1, 1},
104357 {&__pyx_n_s_VariantRecordInfo_iterkeys, __pyx_k_VariantRecordInfo_iterkeys, sizeof(__pyx_k_VariantRecordInfo_iterkeys), 0, 0, 1, 1},
104358 {&__pyx_n_s_VariantRecordInfo_itervalues, __pyx_k_VariantRecordInfo_itervalues, sizeof(__pyx_k_VariantRecordInfo_itervalues), 0, 0, 1, 1},
104359 {&__pyx_n_s_VariantRecordInfo_keys, __pyx_k_VariantRecordInfo_keys, sizeof(__pyx_k_VariantRecordInfo_keys), 0, 0, 1, 1},
104360 {&__pyx_n_s_VariantRecordInfo_pop, __pyx_k_VariantRecordInfo_pop, sizeof(__pyx_k_VariantRecordInfo_pop), 0, 0, 1, 1},
104361 {&__pyx_n_s_VariantRecordInfo_update, __pyx_k_VariantRecordInfo_update, sizeof(__pyx_k_VariantRecordInfo_update), 0, 0, 1, 1},
104362 {&__pyx_n_s_VariantRecordInfo_values, __pyx_k_VariantRecordInfo_values, sizeof(__pyx_k_VariantRecordInfo_values), 0, 0, 1, 1},
104363 {&__pyx_n_s_VariantRecordSample, __pyx_k_VariantRecordSample, sizeof(__pyx_k_VariantRecordSample), 0, 0, 1, 1},
104364 {&__pyx_n_u_VariantRecordSample, __pyx_k_VariantRecordSample, sizeof(__pyx_k_VariantRecordSample), 0, 1, 0, 1},
104365 {&__pyx_n_s_VariantRecordSample___iter, __pyx_k_VariantRecordSample___iter, sizeof(__pyx_k_VariantRecordSample___iter), 0, 0, 1, 1},
104366 {&__pyx_n_s_VariantRecordSample___reduce_cyt, __pyx_k_VariantRecordSample___reduce_cyt, sizeof(__pyx_k_VariantRecordSample___reduce_cyt), 0, 0, 1, 1},
104367 {&__pyx_n_s_VariantRecordSample___set___loca, __pyx_k_VariantRecordSample___set___loca, sizeof(__pyx_k_VariantRecordSample___set___loca), 0, 0, 1, 1},
104368 {&__pyx_n_s_VariantRecordSample___setstate_c, __pyx_k_VariantRecordSample___setstate_c, sizeof(__pyx_k_VariantRecordSample___setstate_c), 0, 0, 1, 1},
104369 {&__pyx_n_s_VariantRecordSample_clear, __pyx_k_VariantRecordSample_clear, sizeof(__pyx_k_VariantRecordSample_clear), 0, 0, 1, 1},
104370 {&__pyx_n_s_VariantRecordSample_get, __pyx_k_VariantRecordSample_get, sizeof(__pyx_k_VariantRecordSample_get), 0, 0, 1, 1},
104371 {&__pyx_n_s_VariantRecordSample_items, __pyx_k_VariantRecordSample_items, sizeof(__pyx_k_VariantRecordSample_items), 0, 0, 1, 1},
104372 {&__pyx_n_s_VariantRecordSample_iteritems, __pyx_k_VariantRecordSample_iteritems, sizeof(__pyx_k_VariantRecordSample_iteritems), 0, 0, 1, 1},
104373 {&__pyx_n_s_VariantRecordSample_iterkeys, __pyx_k_VariantRecordSample_iterkeys, sizeof(__pyx_k_VariantRecordSample_iterkeys), 0, 0, 1, 1},
104374 {&__pyx_n_s_VariantRecordSample_itervalues, __pyx_k_VariantRecordSample_itervalues, sizeof(__pyx_k_VariantRecordSample_itervalues), 0, 0, 1, 1},
104375 {&__pyx_n_s_VariantRecordSample_keys, __pyx_k_VariantRecordSample_keys, sizeof(__pyx_k_VariantRecordSample_keys), 0, 0, 1, 1},
104376 {&__pyx_n_s_VariantRecordSample_pop, __pyx_k_VariantRecordSample_pop, sizeof(__pyx_k_VariantRecordSample_pop), 0, 0, 1, 1},
104377 {&__pyx_n_s_VariantRecordSample_update, __pyx_k_VariantRecordSample_update, sizeof(__pyx_k_VariantRecordSample_update), 0, 0, 1, 1},
104378 {&__pyx_n_s_VariantRecordSample_values, __pyx_k_VariantRecordSample_values, sizeof(__pyx_k_VariantRecordSample_values), 0, 0, 1, 1},
104379 {&__pyx_n_s_VariantRecordSamples, __pyx_k_VariantRecordSamples, sizeof(__pyx_k_VariantRecordSamples), 0, 0, 1, 1},
104380 {&__pyx_n_u_VariantRecordSamples, __pyx_k_VariantRecordSamples, sizeof(__pyx_k_VariantRecordSamples), 0, 1, 0, 1},
104381 {&__pyx_n_s_VariantRecordSamples___iter, __pyx_k_VariantRecordSamples___iter, sizeof(__pyx_k_VariantRecordSamples___iter), 0, 0, 1, 1},
104382 {&__pyx_n_s_VariantRecordSamples___reduce_cy, __pyx_k_VariantRecordSamples___reduce_cy, sizeof(__pyx_k_VariantRecordSamples___reduce_cy), 0, 0, 1, 1},
104383 {&__pyx_n_s_VariantRecordSamples___setstate, __pyx_k_VariantRecordSamples___setstate, sizeof(__pyx_k_VariantRecordSamples___setstate), 0, 0, 1, 1},
104384 {&__pyx_n_s_VariantRecordSamples_get, __pyx_k_VariantRecordSamples_get, sizeof(__pyx_k_VariantRecordSamples_get), 0, 0, 1, 1},
104385 {&__pyx_n_s_VariantRecordSamples_items, __pyx_k_VariantRecordSamples_items, sizeof(__pyx_k_VariantRecordSamples_items), 0, 0, 1, 1},
104386 {&__pyx_n_s_VariantRecordSamples_iteritems, __pyx_k_VariantRecordSamples_iteritems, sizeof(__pyx_k_VariantRecordSamples_iteritems), 0, 0, 1, 1},
104387 {&__pyx_n_s_VariantRecordSamples_iterkeys, __pyx_k_VariantRecordSamples_iterkeys, sizeof(__pyx_k_VariantRecordSamples_iterkeys), 0, 0, 1, 1},
104388 {&__pyx_n_s_VariantRecordSamples_itervalues, __pyx_k_VariantRecordSamples_itervalues, sizeof(__pyx_k_VariantRecordSamples_itervalues), 0, 0, 1, 1},
104389 {&__pyx_n_s_VariantRecordSamples_keys, __pyx_k_VariantRecordSamples_keys, sizeof(__pyx_k_VariantRecordSamples_keys), 0, 0, 1, 1},
104390 {&__pyx_n_s_VariantRecordSamples_pop, __pyx_k_VariantRecordSamples_pop, sizeof(__pyx_k_VariantRecordSamples_pop), 0, 0, 1, 1},
104391 {&__pyx_n_s_VariantRecordSamples_update, __pyx_k_VariantRecordSamples_update, sizeof(__pyx_k_VariantRecordSamples_update), 0, 0, 1, 1},
104392 {&__pyx_n_s_VariantRecordSamples_values, __pyx_k_VariantRecordSamples_values, sizeof(__pyx_k_VariantRecordSamples_values), 0, 0, 1, 1},
104393 {&__pyx_n_s_VariantRecord___reduce_cython, __pyx_k_VariantRecord___reduce_cython, sizeof(__pyx_k_VariantRecord___reduce_cython), 0, 0, 1, 1},
104394 {&__pyx_n_s_VariantRecord___setstate_cython, __pyx_k_VariantRecord___setstate_cython, sizeof(__pyx_k_VariantRecord___setstate_cython), 0, 0, 1, 1},
104395 {&__pyx_n_s_VariantRecord_copy, __pyx_k_VariantRecord_copy, sizeof(__pyx_k_VariantRecord_copy), 0, 0, 1, 1},
104396 {&__pyx_n_s_VariantRecord_translate, __pyx_k_VariantRecord_translate, sizeof(__pyx_k_VariantRecord_translate), 0, 0, 1, 1},
104397 {&__pyx_kp_b__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 0, 0},
104398 {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0},
104399 {&__pyx_kp_u__181, __pyx_k__181, sizeof(__pyx_k__181), 0, 1, 0, 0},
104400 {&__pyx_kp_b__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 0, 0},
104401 {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
104402 {&__pyx_kp_b__241, __pyx_k__241, sizeof(__pyx_k__241), 0, 0, 0, 0},
104403 {&__pyx_n_s__278, __pyx_k__278, sizeof(__pyx_k__278), 0, 0, 1, 1},
104404 {&__pyx_n_s__323, __pyx_k__323, sizeof(__pyx_k__323), 0, 0, 1, 1},
104405 {&__pyx_n_s__330, __pyx_k__330, sizeof(__pyx_k__330), 0, 0, 1, 1},
104406 {&__pyx_kp_b__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 0, 0, 0},
104407 {&__pyx_kp_u__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 1, 0, 0},
104408 {&__pyx_kp_u__53, __pyx_k__53, sizeof(__pyx_k__53), 0, 1, 0, 0},
104409 {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
104410 {&__pyx_n_s_add_line, __pyx_k_add_line, sizeof(__pyx_k_add_line), 0, 0, 1, 1},
104411 {&__pyx_n_s_add_meta, __pyx_k_add_meta, sizeof(__pyx_k_add_meta), 0, 0, 1, 1},
104412 {&__pyx_n_s_add_record, __pyx_k_add_record, sizeof(__pyx_k_add_record), 0, 0, 1, 1},
104413 {&__pyx_n_s_add_sample, __pyx_k_add_sample, sizeof(__pyx_k_add_sample), 0, 0, 1, 1},
104414 {&__pyx_n_s_add_samples, __pyx_k_add_samples, sizeof(__pyx_k_add_samples), 0, 0, 1, 1},
104415 {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
104416 {&__pyx_n_s_alleles, __pyx_k_alleles, sizeof(__pyx_k_alleles), 0, 0, 1, 1},
104417 {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
104418 {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
104419 {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
104420 {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
104421 {&__pyx_n_s_bcf, __pyx_k_bcf, sizeof(__pyx_k_bcf), 0, 0, 1, 1},
104422 {&__pyx_kp_u_bcf_2, __pyx_k_bcf_2, sizeof(__pyx_k_bcf_2), 0, 1, 0, 0},
104423 {&__pyx_n_s_bcf_array_to_object_locals_genex, __pyx_k_bcf_array_to_object_locals_genex, sizeof(__pyx_k_bcf_array_to_object_locals_genex), 0, 0, 1, 1},
104424 {&__pyx_n_s_bcf_check_values_locals_genexpr, __pyx_k_bcf_check_values_locals_genexpr, sizeof(__pyx_k_bcf_check_values_locals_genexpr), 0, 0, 1, 1},
104425 {&__pyx_kp_u_bcf_hdr_format_failed, __pyx_k_bcf_hdr_format_failed, sizeof(__pyx_k_bcf_hdr_format_failed), 0, 1, 0, 0},
104426 {&__pyx_kp_u_bcf_hdr_set_samples_failed_ret, __pyx_k_bcf_hdr_set_samples_failed_ret, sizeof(__pyx_k_bcf_hdr_set_samples_failed_ret), 0, 1, 0, 0},
104427 {&__pyx_kp_u_bcf_index_required, __pyx_k_bcf_index_required, sizeof(__pyx_k_bcf_index_required), 0, 1, 0, 0},
104428 {&__pyx_kp_u_bcf_must_not_be_None, __pyx_k_bcf_must_not_be_None, sizeof(__pyx_k_bcf_must_not_be_None), 0, 1, 0, 0},
104429 {&__pyx_n_s_bcf_object_to_array_locals_genex, __pyx_k_bcf_object_to_array_locals_genex, sizeof(__pyx_k_bcf_object_to_array_locals_genex), 0, 0, 1, 1},
104430 {&__pyx_n_u_bcguz, __pyx_k_bcguz, sizeof(__pyx_k_bcguz), 0, 1, 0, 1},
104431 {&__pyx_n_u_bcguz0123456789ex, __pyx_k_bcguz0123456789ex, sizeof(__pyx_k_bcguz0123456789ex), 0, 1, 0, 1},
104432 {&__pyx_n_s_bgzfp, __pyx_k_bgzfp, sizeof(__pyx_k_bgzfp), 0, 0, 1, 1},
104433 {&__pyx_n_s_bkey, __pyx_k_bkey, sizeof(__pyx_k_bkey), 0, 0, 1, 1},
104434 {&__pyx_n_s_bline, __pyx_k_bline, sizeof(__pyx_k_bline), 0, 0, 1, 1},
104435 {&__pyx_kp_u_cannot_convert_deleted_record_to, __pyx_k_cannot_convert_deleted_record_to, sizeof(__pyx_k_cannot_convert_deleted_record_to), 0, 1, 0, 0},
104436 {&__pyx_kp_u_cannot_create_VariantHeader, __pyx_k_cannot_create_VariantHeader, sizeof(__pyx_k_cannot_create_VariantHeader), 0, 1, 0, 0},
104437 {&__pyx_kp_u_cannot_create_VariantRecord, __pyx_k_cannot_create_VariantRecord, sizeof(__pyx_k_cannot_create_VariantRecord), 0, 1, 0, 0},
104438 {&__pyx_kp_u_cannot_create_VariantRecordSampl, __pyx_k_cannot_create_VariantRecordSampl, sizeof(__pyx_k_cannot_create_VariantRecordSampl), 0, 1, 0, 0},
104439 {&__pyx_kp_u_cannot_fetch_from_Variantfile_op, __pyx_k_cannot_fetch_from_Variantfile_op, sizeof(__pyx_k_cannot_fetch_from_Variantfile_op), 0, 1, 0, 0},
104440 {&__pyx_kp_u_cannot_find_metadata_key, __pyx_k_cannot_find_metadata_key, sizeof(__pyx_k_cannot_find_metadata_key), 0, 1, 0, 0},
104441 {&__pyx_kp_u_cannot_iterate_over_Variantfile, __pyx_k_cannot_iterate_over_Variantfile, sizeof(__pyx_k_cannot_iterate_over_Variantfile), 0, 1, 0, 0},
104442 {&__pyx_kp_u_cannot_set_null_allele, __pyx_k_cannot_set_null_allele, sizeof(__pyx_k_cannot_set_null_allele), 0, 1, 0, 0},
104443 {&__pyx_kp_u_cannot_set_null_alt_allele, __pyx_k_cannot_set_null_alt_allele, sizeof(__pyx_k_cannot_set_null_alt_allele), 0, 1, 0, 0},
104444 {&__pyx_kp_u_cannot_subset_samples_after_fetc, __pyx_k_cannot_subset_samples_after_fetc, sizeof(__pyx_k_cannot_subset_samples_after_fetc), 0, 1, 0, 0},
104445 {&__pyx_kp_u_cannot_subset_samples_from_Varia, __pyx_k_cannot_subset_samples_from_Varia, sizeof(__pyx_k_cannot_subset_samples_from_Varia), 0, 1, 0, 0},
104446 {&__pyx_kp_u_cannot_write_to_a_Variantfile_op, __pyx_k_cannot_write_to_a_Variantfile_op, sizeof(__pyx_k_cannot_write_to_a_Variantfile_op), 0, 1, 0, 0},
104447 {&__pyx_n_s_cfilename, __pyx_k_cfilename, sizeof(__pyx_k_cfilename), 0, 0, 1, 1},
104448 {&__pyx_n_s_char_array_to_tuple_locals_genex, __pyx_k_char_array_to_tuple_locals_genex, sizeof(__pyx_k_char_array_to_tuple_locals_genex), 0, 0, 1, 1},
104449 {&__pyx_n_s_check_truncation, __pyx_k_check_truncation, sizeof(__pyx_k_check_truncation), 0, 0, 1, 1},
104450 {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
104451 {&__pyx_n_s_cindex_filename, __pyx_k_cindex_filename, sizeof(__pyx_k_cindex_filename), 0, 0, 1, 1},
104452 {&__pyx_n_s_ckey, __pyx_k_ckey, sizeof(__pyx_k_ckey), 0, 0, 1, 1},
104453 {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
104454 {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
104455 {&__pyx_n_s_clear_header, __pyx_k_clear_header, sizeof(__pyx_k_clear_header), 0, 0, 1, 1},
104456 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
104457 {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
104458 {&__pyx_n_s_cmode, __pyx_k_cmode, sizeof(__pyx_k_cmode), 0, 0, 1, 1},
104459 {&__pyx_n_s_contig, __pyx_k_contig, sizeof(__pyx_k_contig), 0, 0, 1, 1},
104460 {&__pyx_n_u_contig, __pyx_k_contig, sizeof(__pyx_k_contig), 0, 1, 0, 1},
104461 {&__pyx_kp_u_contig_must_be_specified, __pyx_k_contig_must_be_specified, sizeof(__pyx_k_contig_must_be_specified), 0, 1, 0, 0},
104462 {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
104463 {&__pyx_kp_u_could_not_open_file_mode, __pyx_k_could_not_open_file_mode, sizeof(__pyx_k_could_not_open_file_mode), 0, 1, 0, 0},
104464 {&__pyx_kp_u_could_not_open_variant_file, __pyx_k_could_not_open_variant_file, sizeof(__pyx_k_could_not_open_variant_file), 0, 1, 0, 0},
104465 {&__pyx_kp_u_could_not_open_variant_file_2, __pyx_k_could_not_open_variant_file_2, sizeof(__pyx_k_could_not_open_variant_file_2), 0, 1, 0, 0},
104466 {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
104467 {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
104468 {&__pyx_n_s_description, __pyx_k_description, sizeof(__pyx_k_description), 0, 0, 1, 1},
104469 {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
104470 {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
104471 {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
104472 {&__pyx_n_s_drop_samples, __pyx_k_drop_samples, sizeof(__pyx_k_drop_samples), 0, 0, 1, 1},
104473 {&__pyx_n_s_dst_hdr, __pyx_k_dst_hdr, sizeof(__pyx_k_dst_hdr), 0, 0, 1, 1},
104474 {&__pyx_n_s_dst_header, __pyx_k_dst_header, sizeof(__pyx_k_dst_header), 0, 0, 1, 1},
104475 {&__pyx_kp_u_dst_header_must_not_be_None, __pyx_k_dst_header_must_not_be_None, sizeof(__pyx_k_dst_header_must_not_be_None), 0, 1, 0, 0},
104476 {&__pyx_n_s_duplicate_filehandle, __pyx_k_duplicate_filehandle, sizeof(__pyx_k_duplicate_filehandle), 0, 0, 1, 1},
104477 {&__pyx_kp_u_either_value_or_items_must_be_sp, __pyx_k_either_value_or_items_must_be_sp, sizeof(__pyx_k_either_value_or_items_must_be_sp), 0, 1, 0, 0},
104478 {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
104479 {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
104480 {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
104481 {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
104482 {&__pyx_kp_u_error_in_bcf_subset_format, __pyx_k_error_in_bcf_subset_format, sizeof(__pyx_k_error_in_bcf_subset_format), 0, 1, 0, 0},
104483 {&__pyx_kp_u_error_in_vcf_parse, __pyx_k_error_in_vcf_parse, sizeof(__pyx_k_error_in_vcf_parse), 0, 1, 0, 0},
104484 {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
104485 {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
104486 {&__pyx_kp_u_fetch_requires_an_index, __pyx_k_fetch_requires_an_index, sizeof(__pyx_k_fetch_requires_an_index), 0, 1, 0, 0},
104487 {&__pyx_kp_u_file_does_not_have_valid_header, __pyx_k_file_does_not_have_valid_header, sizeof(__pyx_k_file_does_not_have_valid_header), 0, 1, 0, 0},
104488 {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
104489 {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
104490 {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
104491 {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
104492 {&__pyx_n_s_format_modes, __pyx_k_format_modes, sizeof(__pyx_k_format_modes), 0, 0, 1, 1},
104493 {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
104494 {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
104495 {&__pyx_kp_u_genotype_is_only_valid_as_a_form, __pyx_k_genotype_is_only_valid_as_a_form, sizeof(__pyx_k_genotype_is_only_valid_as_a_form), 0, 1, 0, 0},
104496 {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
104497 {&__pyx_n_s_get_reference_name, __pyx_k_get_reference_name, sizeof(__pyx_k_get_reference_name), 0, 0, 1, 1},
104498 {&__pyx_n_s_get_tid, __pyx_k_get_tid, sizeof(__pyx_k_get_tid), 0, 0, 1, 1},
104499 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
104500 {&__pyx_kp_u_gz, __pyx_k_gz, sizeof(__pyx_k_gz), 0, 1, 0, 0},
104501 {&__pyx_n_s_hash, __pyx_k_hash, sizeof(__pyx_k_hash), 0, 0, 1, 1},
104502 {&__pyx_n_s_hdr, __pyx_k_hdr, sizeof(__pyx_k_hdr), 0, 0, 1, 1},
104503 {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1},
104504 {&__pyx_kp_u_header_must_not_be_None, __pyx_k_header_must_not_be_None, sizeof(__pyx_k_header_must_not_be_None), 0, 1, 0, 0},
104505 {&__pyx_n_s_hrec, __pyx_k_hrec, sizeof(__pyx_k_hrec), 0, 0, 1, 1},
104506 {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
104507 {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
104508 {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
104509 {&__pyx_n_s_ignore_truncation, __pyx_k_ignore_truncation, sizeof(__pyx_k_ignore_truncation), 0, 0, 1, 1},
104510 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
104511 {&__pyx_n_s_include_samples, __pyx_k_include_samples, sizeof(__pyx_k_include_samples), 0, 0, 1, 1},
104512 {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
104513 {&__pyx_n_s_index_filename, __pyx_k_index_filename, sizeof(__pyx_k_index_filename), 0, 0, 1, 1},
104514 {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
104515 {&__pyx_n_s_info_id, __pyx_k_info_id, sizeof(__pyx_k_info_id), 0, 0, 1, 1},
104516 {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
104517 {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
104518 {&__pyx_kp_u_invalid_FORMAT, __pyx_k_invalid_FORMAT, sizeof(__pyx_k_invalid_FORMAT), 0, 1, 0, 0},
104519 {&__pyx_kp_u_invalid_VariantHeader, __pyx_k_invalid_VariantHeader, sizeof(__pyx_k_invalid_VariantHeader), 0, 1, 0, 0},
104520 {&__pyx_kp_u_invalid_VariantRecord, __pyx_k_invalid_VariantRecord, sizeof(__pyx_k_invalid_VariantRecord), 0, 1, 0, 0},
104521 {&__pyx_kp_u_invalid_character_found, __pyx_k_invalid_character_found, sizeof(__pyx_k_invalid_character_found), 0, 1, 0, 0},
104522 {&__pyx_kp_u_invalid_contig, __pyx_k_invalid_contig, sizeof(__pyx_k_invalid_contig), 0, 1, 0, 0},
104523 {&__pyx_kp_u_invalid_contig_2, __pyx_k_invalid_contig_2, sizeof(__pyx_k_invalid_contig_2), 0, 1, 0, 0},
104524 {&__pyx_kp_u_invalid_contig_id, __pyx_k_invalid_contig_id, sizeof(__pyx_k_invalid_contig_id), 0, 1, 0, 0},
104525 {&__pyx_kp_u_invalid_contig_index, __pyx_k_invalid_contig_index, sizeof(__pyx_k_invalid_contig_index), 0, 1, 0, 0},
104526 {&__pyx_kp_u_invalid_file_mode_is_it_VCF_BCF, __pyx_k_invalid_file_mode_is_it_VCF_BCF, sizeof(__pyx_k_invalid_file_mode_is_it_VCF_BCF), 0, 1, 0, 0},
104527 {&__pyx_kp_u_invalid_filter_index, __pyx_k_invalid_filter_index, sizeof(__pyx_k_invalid_filter_index), 0, 1, 0, 0},
104528 {&__pyx_kp_u_invalid_header_line, __pyx_k_invalid_header_line, sizeof(__pyx_k_invalid_header_line), 0, 1, 0, 0},
104529 {&__pyx_kp_u_invalid_header_record_index, __pyx_k_invalid_header_record_index, sizeof(__pyx_k_invalid_header_record_index), 0, 1, 0, 0},
104530 {&__pyx_kp_u_invalid_key, __pyx_k_invalid_key, sizeof(__pyx_k_invalid_key), 0, 1, 0, 0},
104531 {&__pyx_kp_u_invalid_metadata_id, __pyx_k_invalid_metadata_id, sizeof(__pyx_k_invalid_metadata_id), 0, 1, 0, 0},
104532 {&__pyx_kp_u_invalid_metadata_type, __pyx_k_invalid_metadata_type, sizeof(__pyx_k_invalid_metadata_type), 0, 1, 0, 0},
104533 {&__pyx_kp_u_invalid_mode_options, __pyx_k_invalid_mode_options, sizeof(__pyx_k_invalid_mode_options), 0, 1, 0, 0},
104534 {&__pyx_n_s_invalid_modes, __pyx_k_invalid_modes, sizeof(__pyx_k_invalid_modes), 0, 0, 1, 1},
104535 {&__pyx_kp_u_invalid_number_of_columns, __pyx_k_invalid_number_of_columns, sizeof(__pyx_k_invalid_number_of_columns), 0, 1, 0, 0},
104536 {&__pyx_kp_u_invalid_reference_id, __pyx_k_invalid_reference_id, sizeof(__pyx_k_invalid_reference_id), 0, 1, 0, 0},
104537 {&__pyx_kp_u_invalid_sample_index, __pyx_k_invalid_sample_index, sizeof(__pyx_k_invalid_sample_index), 0, 1, 0, 0},
104538 {&__pyx_kp_u_invalid_sample_name, __pyx_k_invalid_sample_name, sizeof(__pyx_k_invalid_sample_name), 0, 1, 0, 0},
104539 {&__pyx_kp_u_invalid_tag, __pyx_k_invalid_tag, sizeof(__pyx_k_invalid_tag), 0, 1, 0, 0},
104540 {&__pyx_kp_u_invalid_value_for_Float_format, __pyx_k_invalid_value_for_Float_format, sizeof(__pyx_k_invalid_value_for_Float_format), 0, 1, 0, 0},
104541 {&__pyx_kp_u_invalid_value_for_Integer_format, __pyx_k_invalid_value_for_Integer_format, sizeof(__pyx_k_invalid_value_for_Integer_format), 0, 1, 0, 0},
104542 {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
104543 {&__pyx_n_s_is_open, __pyx_k_is_open, sizeof(__pyx_k_is_open), 0, 0, 1, 1},
104544 {&__pyx_n_s_is_valid_tid, __pyx_k_is_valid_tid, sizeof(__pyx_k_is_valid_tid), 0, 0, 1, 1},
104545 {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
104546 {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
104547 {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
104548 {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
104549 {&__pyx_n_s_iterkeys, __pyx_k_iterkeys, sizeof(__pyx_k_iterkeys), 0, 0, 1, 1},
104550 {&__pyx_n_s_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 0, 0, 1, 1},
104551 {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
104552 {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
104553 {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
104554 {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
104555 {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
104556 {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
104557 {&__pyx_n_u_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 1, 0, 1},
104558 {&__pyx_kp_u_limits_violated, __pyx_k_limits_violated, sizeof(__pyx_k_limits_violated), 0, 1, 0, 0},
104559 {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
104560 {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
104561 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
104562 {&__pyx_n_s_merge, __pyx_k_merge, sizeof(__pyx_k_merge), 0, 0, 1, 1},
104563 {&__pyx_kp_u_missing_d_requested_samples, __pyx_k_missing_d_requested_samples, sizeof(__pyx_k_missing_d_requested_samples), 0, 1, 0, 0},
104564 {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
104565 {&__pyx_kp_u_mode_contains_conflicting_format, __pyx_k_mode_contains_conflicting_format, sizeof(__pyx_k_mode_contains_conflicting_format), 0, 1, 0, 0},
104566 {&__pyx_kp_u_mode_must_begin_with_r_w_or_a, __pyx_k_mode_must_begin_with_r_w_or_a, sizeof(__pyx_k_mode_must_begin_with_r_w_or_a), 0, 1, 0, 0},
104567 {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
104568 {&__pyx_kp_u_must_set_at_least_2_alleles, __pyx_k_must_set_at_least_2_alleles, sizeof(__pyx_k_must_set_at_least_2_alleles), 0, 1, 0, 0},
104569 {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
104570 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
104571 {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
104572 {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
104573 {&__pyx_n_s_new_record, __pyx_k_new_record, sizeof(__pyx_k_new_record), 0, 0, 1, 1},
104574 {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
104575 {&__pyx_n_s_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1},
104576 {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
104577 {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
104578 {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
104579 {&__pyx_n_s_parse_region, __pyx_k_parse_region, sizeof(__pyx_k_parse_region), 0, 0, 1, 1},
104580 {&__pyx_n_s_phased, __pyx_k_phased, sizeof(__pyx_k_phased), 0, 0, 1, 1},
104581 {&__pyx_n_u_phased, __pyx_k_phased, sizeof(__pyx_k_phased), 0, 1, 0, 1},
104582 {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
104583 {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
104584 {&__pyx_n_s_pysam_libcbcf, __pyx_k_pysam_libcbcf, sizeof(__pyx_k_pysam_libcbcf), 0, 0, 1, 1},
104585 {&__pyx_kp_s_pysam_libcbcf_pyx, __pyx_k_pysam_libcbcf_pyx, sizeof(__pyx_k_pysam_libcbcf_pyx), 0, 0, 1, 0},
104586 {&__pyx_n_s_pysam_utils, __pyx_k_pysam_utils, sizeof(__pyx_k_pysam_utils), 0, 0, 1, 1},
104587 {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
104588 {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
104589 {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
104590 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
104591 {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
104592 {&__pyx_n_s_pyx_unpickle_BaseIndex, __pyx_k_pyx_unpickle_BaseIndex, sizeof(__pyx_k_pyx_unpickle_BaseIndex), 0, 0, 1, 1},
104593 {&__pyx_n_s_pyx_unpickle_VariantContig, __pyx_k_pyx_unpickle_VariantContig, sizeof(__pyx_k_pyx_unpickle_VariantContig), 0, 0, 1, 1},
104594 {&__pyx_n_s_pyx_unpickle_VariantHeaderCont, __pyx_k_pyx_unpickle_VariantHeaderCont, sizeof(__pyx_k_pyx_unpickle_VariantHeaderCont), 0, 0, 1, 1},
104595 {&__pyx_n_s_pyx_unpickle_VariantHeaderMeta, __pyx_k_pyx_unpickle_VariantHeaderMeta, sizeof(__pyx_k_pyx_unpickle_VariantHeaderMeta), 0, 0, 1, 1},
104596 {&__pyx_n_s_pyx_unpickle_VariantHeaderReco, __pyx_k_pyx_unpickle_VariantHeaderReco, sizeof(__pyx_k_pyx_unpickle_VariantHeaderReco), 0, 0, 1, 1},
104597 {&__pyx_n_s_pyx_unpickle_VariantHeaderSamp, __pyx_k_pyx_unpickle_VariantHeaderSamp, sizeof(__pyx_k_pyx_unpickle_VariantHeaderSamp), 0, 0, 1, 1},
104598 {&__pyx_n_s_pyx_unpickle_VariantMetadata, __pyx_k_pyx_unpickle_VariantMetadata, sizeof(__pyx_k_pyx_unpickle_VariantMetadata), 0, 0, 1, 1},
104599 {&__pyx_n_s_pyx_unpickle_VariantRecordFilt, __pyx_k_pyx_unpickle_VariantRecordFilt, sizeof(__pyx_k_pyx_unpickle_VariantRecordFilt), 0, 0, 1, 1},
104600 {&__pyx_n_s_pyx_unpickle_VariantRecordForm, __pyx_k_pyx_unpickle_VariantRecordForm, sizeof(__pyx_k_pyx_unpickle_VariantRecordForm), 0, 0, 1, 1},
104601 {&__pyx_n_s_pyx_unpickle_VariantRecordInfo, __pyx_k_pyx_unpickle_VariantRecordInfo, sizeof(__pyx_k_pyx_unpickle_VariantRecordInfo), 0, 0, 1, 1},
104602 {&__pyx_n_s_pyx_unpickle_VariantRecordSamp, __pyx_k_pyx_unpickle_VariantRecordSamp, sizeof(__pyx_k_pyx_unpickle_VariantRecordSamp), 0, 0, 1, 1},
104603 {&__pyx_n_s_pyx_unpickle_VariantRecordSamp_2, __pyx_k_pyx_unpickle_VariantRecordSamp_2, sizeof(__pyx_k_pyx_unpickle_VariantRecordSamp_2), 0, 0, 1, 1},
104604 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
104605 {&__pyx_n_s_qual, __pyx_k_qual, sizeof(__pyx_k_qual), 0, 0, 1, 1},
104606 {&__pyx_n_s_quoted, __pyx_k_quoted, sizeof(__pyx_k_quoted), 0, 0, 1, 1},
104607 {&__pyx_n_b_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 0, 1},
104608 {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
104609 {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
104610 {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
104611 {&__pyx_n_s_rec, __pyx_k_rec, sizeof(__pyx_k_rec), 0, 0, 1, 1},
104612 {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
104613 {&__pyx_kp_u_record_must_not_be_None, __pyx_k_record_must_not_be_None, sizeof(__pyx_k_record_must_not_be_None), 0, 1, 0, 0},
104614 {&__pyx_n_s_records, __pyx_k_records, sizeof(__pyx_k_records), 0, 0, 1, 1},
104615 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
104616 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
104617 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
104618 {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
104619 {&__pyx_kp_u_ref_allele_must_not_be_null, __pyx_k_ref_allele_must_not_be_null, sizeof(__pyx_k_ref_allele_must_not_be_null), 0, 1, 0, 0},
104620 {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1},
104621 {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1},
104622 {&__pyx_n_s_remap, __pyx_k_remap, sizeof(__pyx_k_remap), 0, 0, 1, 1},
104623 {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
104624 {&__pyx_n_s_remove_header, __pyx_k_remove_header, sizeof(__pyx_k_remove_header), 0, 0, 1, 1},
104625 {&__pyx_n_s_reopen, __pyx_k_reopen, sizeof(__pyx_k_reopen), 0, 0, 1, 1},
104626 {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
104627 {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
104628 {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
104629 {&__pyx_n_s_rid, __pyx_k_rid, sizeof(__pyx_k_rid), 0, 0, 1, 1},
104630 {&__pyx_n_u_rwa, __pyx_k_rwa, sizeof(__pyx_k_rwa), 0, 1, 0, 1},
104631 {&__pyx_n_s_sample, __pyx_k_sample, sizeof(__pyx_k_sample), 0, 0, 1, 1},
104632 {&__pyx_kp_u_sample_must_not_be_None, __pyx_k_sample_must_not_be_None, sizeof(__pyx_k_sample_must_not_be_None), 0, 1, 0, 0},
104633 {&__pyx_n_s_samples, __pyx_k_samples, sizeof(__pyx_k_samples), 0, 0, 1, 1},
104634 {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
104635 {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
104636 {&__pyx_kp_s_self_iter_cannot_be_converted_to, __pyx_k_self_iter_cannot_be_converted_to, sizeof(__pyx_k_self_iter_cannot_be_converted_to), 0, 0, 1, 0},
104637 {&__pyx_kp_s_self_ptr_cannot_be_converted_to, __pyx_k_self_ptr_cannot_be_converted_to, sizeof(__pyx_k_self_ptr_cannot_be_converted_to), 0, 0, 1, 0},
104638 {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
104639 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
104640 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
104641 {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
104642 {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
104643 {&__pyx_n_s_src_hdr, __pyx_k_src_hdr, sizeof(__pyx_k_src_hdr), 0, 0, 1, 1},
104644 {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
104645 {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
104646 {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
104647 {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
104648 {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
104649 {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
104650 {&__pyx_n_s_subset_samples, __pyx_k_subset_samples, sizeof(__pyx_k_subset_samples), 0, 0, 1, 1},
104651 {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
104652 {&__pyx_kp_u_tabix_index_required, __pyx_k_tabix_index_required, sizeof(__pyx_k_tabix_index_required), 0, 1, 0, 0},
104653 {&__pyx_n_s_tell, __pyx_k_tell, sizeof(__pyx_k_tell), 0, 0, 1, 1},
104654 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
104655 {&__pyx_kp_u_this_class_cannot_be_instantiate, __pyx_k_this_class_cannot_be_instantiate, sizeof(__pyx_k_this_class_cannot_be_instantiate), 0, 1, 0, 0},
104656 {&__pyx_n_s_threads, __pyx_k_threads, sizeof(__pyx_k_threads), 0, 0, 1, 1},
104657 {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
104658 {&__pyx_n_s_tid, __pyx_k_tid, sizeof(__pyx_k_tid), 0, 0, 1, 1},
104659 {&__pyx_n_s_tidx, __pyx_k_tidx, sizeof(__pyx_k_tidx), 0, 0, 1, 1},
104660 {&__pyx_n_s_translate, __pyx_k_translate, sizeof(__pyx_k_translate), 0, 0, 1, 1},
104661 {&__pyx_kp_u_truncated_file, __pyx_k_truncated_file, sizeof(__pyx_k_truncated_file), 0, 1, 0, 0},
104662 {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
104663 {&__pyx_kp_u_unable_to_allocate_BCF_record, __pyx_k_unable_to_allocate_BCF_record, sizeof(__pyx_k_unable_to_allocate_BCF_record), 0, 1, 0, 0},
104664 {&__pyx_kp_u_unable_to_fetch, __pyx_k_unable_to_fetch, sizeof(__pyx_k_unable_to_fetch), 0, 1, 0, 0},
104665 {&__pyx_kp_u_unable_to_fetch_next_record, __pyx_k_unable_to_fetch_next_record, sizeof(__pyx_k_unable_to_fetch_next_record), 0, 1, 0, 0},
104666 {&__pyx_kp_u_unable_to_parse_next_record, __pyx_k_unable_to_parse_next_record, sizeof(__pyx_k_unable_to_parse_next_record), 0, 1, 0, 0},
104667 {&__pyx_kp_u_unable_to_reallocate_VariantHead, __pyx_k_unable_to_reallocate_VariantHead, sizeof(__pyx_k_unable_to_reallocate_VariantHead), 0, 1, 0, 0},
104668 {&__pyx_kp_u_unknown_INFO, __pyx_k_unknown_INFO, sizeof(__pyx_k_unknown_INFO), 0, 1, 0, 0},
104669 {&__pyx_kp_u_unknown_format, __pyx_k_unknown_format, sizeof(__pyx_k_unknown_format), 0, 1, 0, 0},
104670 {&__pyx_kp_u_unknown_mode, __pyx_k_unknown_mode, sizeof(__pyx_k_unknown_mode), 0, 1, 0, 0},
104671 {&__pyx_kp_u_unknown_type_specified, __pyx_k_unknown_type_specified, sizeof(__pyx_k_unknown_type_specified), 0, 1, 0, 0},
104672 {&__pyx_n_s_unquoted_str, __pyx_k_unquoted_str, sizeof(__pyx_k_unquoted_str), 0, 0, 1, 1},
104673 {&__pyx_kp_u_unsupported_header_type_code, __pyx_k_unsupported_header_type_code, sizeof(__pyx_k_unsupported_header_type_code), 0, 1, 0, 0},
104674 {&__pyx_kp_u_unsupported_info_type_code, __pyx_k_unsupported_info_type_code, sizeof(__pyx_k_unsupported_info_type_code), 0, 1, 0, 0},
104675 {&__pyx_kp_u_unsupported_type, __pyx_k_unsupported_type, sizeof(__pyx_k_unsupported_type), 0, 1, 0, 0},
104676 {&__pyx_kp_u_unsupported_types, __pyx_k_unsupported_types, sizeof(__pyx_k_unsupported_types), 0, 1, 0, 0},
104677 {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
104678 {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
104679 {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
104680 {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
104681 {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
104682 {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
104683 {&__pyx_kp_u_value_expected_to_be_scalar_give, __pyx_k_value_expected_to_be_scalar_give, sizeof(__pyx_k_value_expected_to_be_scalar_give), 0, 1, 0, 0},
104684 {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
104685 {&__pyx_kp_u_values_expected_to_be_tuple_give, __pyx_k_values_expected_to_be_tuple_give, sizeof(__pyx_k_values_expected_to_be_tuple_give), 0, 1, 0, 0},
104686 {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1},
104687 {&__pyx_kp_u_vcf_format_failed, __pyx_k_vcf_format_failed, sizeof(__pyx_k_vcf_format_failed), 0, 1, 0, 0},
104688 {&__pyx_n_b_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 0, 1},
104689 {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1},
104690 {&__pyx_n_u_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 1, 0, 1},
104691 {&__pyx_n_u_wb0, __pyx_k_wb0, sizeof(__pyx_k_wb0), 0, 1, 0, 1},
104692 {&__pyx_n_u_wbu, __pyx_k_wbu, sizeof(__pyx_k_wbu), 0, 1, 0, 1},
104693 {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
104694 {&__pyx_n_u_wz, __pyx_k_wz, sizeof(__pyx_k_wz), 0, 1, 0, 1},
104695 {0, 0, 0, 0, 0, 0, 0}
104696 };
104697 return __Pyx_InitStrings(__pyx_string_tab);
104698 }
104699 /* #### Code section: cached_builtins ### */
104700 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
104701 __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 154, __pyx_L1_error)
104702 __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 205, __pyx_L1_error)
104703 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 244, __pyx_L1_error)
104704 __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 253, __pyx_L1_error)
104705 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 330, __pyx_L1_error)
104706 __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) __PYX_ERR(0, 563, __pyx_L1_error)
104707 __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 698, __pyx_L1_error)
104708 __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 1450, __pyx_L1_error)
104709 __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 2088, __pyx_L1_error)
104710 __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 2117, __pyx_L1_error)
104711 __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 2370, __pyx_L1_error)
104712 __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 2458, __pyx_L1_error)
104713 __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 3881, __pyx_L1_error)
104714 __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 3895, __pyx_L1_error)
104715 return 0;
104716 __pyx_L1_error:;
104717 return -1;
104718 }
104719 /* #### Code section: cached_constants ### */
104720
104721 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
104722 __Pyx_RefNannyDeclarations
104723 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
104724
104725 /* "pysam/libcbcf.pyx":244
104726 *
104727 * if sample < 0:
104728 * raise ValueError('genotype is only valid as a format field') # <<<<<<<<<<<<<<
104729 *
104730 * cdef int32_t *gt_arr = NULL
104731 */
104732 __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_genotype_is_only_valid_as_a_form); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 244, __pyx_L1_error)
104733 __Pyx_GOTREF(__pyx_tuple_);
104734 __Pyx_GIVEREF(__pyx_tuple_);
104735
104736 /* "pysam/libcbcf.pyx":330
104737 * value.append(dataf[i] if not bcf_float_is_missing(dataf[i]) else None)
104738 * else:
104739 * raise TypeError('unsupported info type code') # <<<<<<<<<<<<<<
104740 *
104741 * # FIXME: Need to know length? Report errors? Pad with missing values? Not clear what to do.
104742 */
104743 __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_unsupported_info_type_code); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 330, __pyx_L1_error)
104744 __Pyx_GOTREF(__pyx_tuple__3);
104745 __Pyx_GIVEREF(__pyx_tuple__3);
104746
104747 /* "pysam/libcbcf.pyx":339
104748 * value = ()
104749 * else:
104750 * value = (None,)*count # <<<<<<<<<<<<<<
104751 * elif scalar and len(value) == 1:
104752 * value = value[0]
104753 */
104754 __pyx_tuple__4 = PyTuple_New(1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 339, __pyx_L1_error)
104755 __Pyx_GOTREF(__pyx_tuple__4);
104756 __Pyx_INCREF(Py_None);
104757 __Pyx_GIVEREF(Py_None);
104758 if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__4, 0, Py_None)) __PYX_ERR(0, 339, __pyx_L1_error);
104759 __Pyx_GIVEREF(__pyx_tuple__4);
104760
104761 /* "pysam/libcbcf.pyx":399
104762 * bcf_float_set(dataf + i, bcf_float_vector_end)
104763 * else:
104764 * raise TypeError('unsupported type') # <<<<<<<<<<<<<<
104765 *
104766 *
104767 */
104768 __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_unsupported_type); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 399, __pyx_L1_error)
104769 __Pyx_GOTREF(__pyx_tuple__5);
104770 __Pyx_GIVEREF(__pyx_tuple__5);
104771
104772 /* "pysam/libcbcf.pyx":409
104773 *
104774 * if n <= 0:
104775 * raise ValueError('Cannot create empty array') # <<<<<<<<<<<<<<
104776 *
104777 * if type == BCF_HT_STR:
104778 */
104779 __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Cannot_create_empty_array); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 409, __pyx_L1_error)
104780 __Pyx_GOTREF(__pyx_tuple__6);
104781 __Pyx_GIVEREF(__pyx_tuple__6);
104782
104783 /* "pysam/libcbcf.pyx":427
104784 * bcf_float_set(dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end)
104785 * else:
104786 * raise TypeError('unsupported header type code') # <<<<<<<<<<<<<<
104787 *
104788 * return value
104789 */
104790 __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_unsupported_header_type_code); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 427, __pyx_L1_error)
104791 __Pyx_GOTREF(__pyx_tuple__7);
104792 __Pyx_GIVEREF(__pyx_tuple__7);
104793
104794 /* "pysam/libcbcf.pyx":498
104795 * bcf_float_set(dst_dataf + i, bcf_float_missing if not vlen else bcf_float_vector_end)
104796 * else:
104797 * raise TypeError('unsupported types') # <<<<<<<<<<<<<<
104798 *
104799 *
104800 */
104801 __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_unsupported_types); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 498, __pyx_L1_error)
104802 __Pyx_GOTREF(__pyx_tuple__8);
104803 __Pyx_GIVEREF(__pyx_tuple__8);
104804
104805 /* "pysam/libcbcf.pyx":503
104806 * cdef bcf_get_value_count(VariantRecord record, int hl_type, int id, ssize_t *count, int *scalar, int sample):
104807 * if record is None:
104808 * raise ValueError('record must not be None') # <<<<<<<<<<<<<<
104809 *
104810 * cdef bcf_hdr_t *hdr = record.header.ptr
104811 */
104812 __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_record_must_not_be_None); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 503, __pyx_L1_error)
104813 __Pyx_GOTREF(__pyx_tuple__9);
104814 __Pyx_GIVEREF(__pyx_tuple__9);
104815
104816 /* "pysam/libcbcf.pyx":509
104817 *
104818 * if not check_header_id(hdr, hl_type, id):
104819 * raise ValueError('Invalid header') # <<<<<<<<<<<<<<
104820 *
104821 * cdef int length = bcf_hdr_id2length(hdr, hl_type, id)
104822 */
104823 __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Invalid_header); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 509, __pyx_L1_error)
104824 __Pyx_GOTREF(__pyx_tuple__10);
104825 __Pyx_GIVEREF(__pyx_tuple__10);
104826
104827 /* "pysam/libcbcf.pyx":531
104828 * count[0] = -1
104829 * else:
104830 * raise ValueError('Unknown format length') # <<<<<<<<<<<<<<
104831 *
104832 *
104833 */
104834 __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_Unknown_format_length); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 531, __pyx_L1_error)
104835 __Pyx_GOTREF(__pyx_tuple__11);
104836 __Pyx_GIVEREF(__pyx_tuple__11);
104837
104838 /* "pysam/libcbcf.pyx":605
104839 * for v in values:
104840 * if not(v is None or isinstance(v, (float, int))):
104841 * raise TypeError('invalid value for Float format') # <<<<<<<<<<<<<<
104842 * elif ht_type == BCF_HT_INT:
104843 * for v in values:
104844 */
104845 __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_invalid_value_for_Float_format); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 605, __pyx_L1_error)
104846 __Pyx_GOTREF(__pyx_tuple__13);
104847 __Pyx_GIVEREF(__pyx_tuple__13);
104848
104849 /* "pysam/libcbcf.pyx":609
104850 * for v in values:
104851 * if not(v is None or (isinstance(v, (float, int)) and int(v) == v)):
104852 * raise TypeError('invalid value for Integer format') # <<<<<<<<<<<<<<
104853 * for v in values:
104854 * if not(v is None or bcf_int32_missing < v <= INT32_MAX):
104855 */
104856 __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_invalid_value_for_Integer_format); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 609, __pyx_L1_error)
104857 __Pyx_GOTREF(__pyx_tuple__14);
104858 __Pyx_GIVEREF(__pyx_tuple__14);
104859
104860 /* "pysam/libcbcf.pyx":612
104861 * for v in values:
104862 * if not(v is None or bcf_int32_missing < v <= INT32_MAX):
104863 * raise ValueError('Integer value too small/large to store in VCF/BCF') # <<<<<<<<<<<<<<
104864 * elif ht_type == BCF_HT_STR:
104865 * values = b','.join(force_bytes(v) if v is not None else b'' for v in values)
104866 */
104867 __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Integer_value_too_small_large_to); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 612, __pyx_L1_error)
104868 __Pyx_GOTREF(__pyx_tuple__15);
104869 __Pyx_GIVEREF(__pyx_tuple__15);
104870
104871 /* "pysam/libcbcf.pyx":617
104872 * elif ht_type == BCF_HT_FLAG:
104873 * if values[0] not in (True, False, None, 1, 0):
104874 * raise ValueError('Flag values must be: True, False, None, 1, 0') # <<<<<<<<<<<<<<
104875 * else:
104876 * raise TypeError('unsupported type')
104877 */
104878 __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Flag_values_must_be_True_False_N); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 617, __pyx_L1_error)
104879 __Pyx_GOTREF(__pyx_tuple__16);
104880 __Pyx_GIVEREF(__pyx_tuple__16);
104881
104882 /* "pysam/libcbcf.pyx":667
104883 * break
104884 * else:
104885 * raise ValueError('Unknown allele') # <<<<<<<<<<<<<<
104886 * else:
104887 * i = value
104888 */
104889 __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_Unknown_allele); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 667, __pyx_L1_error)
104890 __Pyx_GOTREF(__pyx_tuple__17);
104891 __Pyx_GIVEREF(__pyx_tuple__17);
104892
104893 /* "pysam/libcbcf.pyx":671
104894 * i = value
104895 * if not (0 <= i < nalleles):
104896 * raise ValueError('Invalid allele index') # <<<<<<<<<<<<<<
104897 * gt_values.append(bcf_gt_unphased(i))
104898 *
104899 */
104900 __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_Invalid_allele_index); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 671, __pyx_L1_error)
104901 __Pyx_GOTREF(__pyx_tuple__18);
104902 __Pyx_GIVEREF(__pyx_tuple__18);
104903
104904 /* "pysam/libcbcf.pyx":687
104905 *
104906 * if bcf_unpack(r, BCF_UN_INFO) < 0:
104907 * raise ValueError('Error unpacking VariantRecord') # <<<<<<<<<<<<<<
104908 *
104909 * cdef bytes bkey = force_bytes(key)
104910 */
104911 __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_Error_unpacking_VariantRecord); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 687, __pyx_L1_error)
104912 __Pyx_GOTREF(__pyx_tuple__19);
104913 __Pyx_GIVEREF(__pyx_tuple__19);
104914
104915 /* "pysam/libcbcf.pyx":712
104916 * if info_type == BCF_HT_FLAG:
104917 * if bcf_update_info(hdr, r, bkey, NULL, bool(values[0]), info_type) < 0:
104918 * raise ValueError('Unable to update INFO values') # <<<<<<<<<<<<<<
104919 * return
104920 *
104921 */
104922 __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_update_INFO_values); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 712, __pyx_L1_error)
104923 __Pyx_GOTREF(__pyx_tuple__20);
104924 __Pyx_GIVEREF(__pyx_tuple__20);
104925
104926 /* "pysam/libcbcf.pyx":759
104927 * dst_type = BCF_BT_CHAR
104928 * else:
104929 * raise ValueError('Unsupported INFO type') # <<<<<<<<<<<<<<
104930 *
104931 * bcf_object_to_array(values, valp, dst_type, alloc_len, vlen)
104932 */
104933 __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_Unsupported_INFO_type); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 759, __pyx_L1_error)
104934 __Pyx_GOTREF(__pyx_tuple__21);
104935 __Pyx_GIVEREF(__pyx_tuple__21);
104936
104937 /* "pysam/libcbcf.pyx":799
104938 * cdef bcf_format_get_value(VariantRecordSample sample, key):
104939 * if sample is None:
104940 * raise ValueError('sample must not be None') # <<<<<<<<<<<<<<
104941 *
104942 * cdef bcf_hdr_t *hdr = sample.record.header.ptr
104943 */
104944 __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_sample_must_not_be_None); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 799, __pyx_L1_error)
104945 __Pyx_GOTREF(__pyx_tuple__22);
104946 __Pyx_GIVEREF(__pyx_tuple__22);
104947
104948 /* "pysam/libcbcf.pyx":869
104949 *
104950 * if fmt_type == BCF_HT_FLAG:
104951 * raise ValueError('Flag types are not allowed on FORMATs') # <<<<<<<<<<<<<<
104952 *
104953 * if is_gt_fmt(hdr, fmt_id):
104954 */
104955 __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_Flag_types_are_not_allowed_on_FO); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 869, __pyx_L1_error)
104956 __Pyx_GOTREF(__pyx_tuple__23);
104957 __Pyx_GIVEREF(__pyx_tuple__23);
104958
104959 /* "pysam/libcbcf.pyx":908
104960 * dst_size = sizeof(char) * alloc_len
104961 * else:
104962 * raise ValueError('Unsupported FORMAT type') # <<<<<<<<<<<<<<
104963 *
104964 * if fmt and nsamples > 1:
104965 */
104966 __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_Unsupported_FORMAT_type); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 908, __pyx_L1_error)
104967 __Pyx_GOTREF(__pyx_tuple__24);
104968 __Pyx_GIVEREF(__pyx_tuple__24);
104969
104970 /* "pysam/libcbcf.pyx":919
104971 *
104972 * if bcf_update_format(hdr, r, bkey, new_values_p, <int>(nsamples * alloc_len), fmt_type) < 0:
104973 * raise ValueError('Unable to update format values') # <<<<<<<<<<<<<<
104974 *
104975 *
104976 */
104977 __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_update_format_values); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 919, __pyx_L1_error)
104978 __Pyx_GOTREF(__pyx_tuple__25);
104979 __Pyx_GIVEREF(__pyx_tuple__25);
104980
104981 /* "pysam/libcbcf.pyx":1144
104982 *
104983 * if not gt0 or not fmt0.n:
104984 * raise ValueError('Cannot set phased before genotype is set') # <<<<<<<<<<<<<<
104985 *
104986 * cdef int8_t *data8
104987 */
104988 __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Cannot_set_phased_before_genotyp); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1144, __pyx_L1_error)
104989 __Pyx_GOTREF(__pyx_tuple__26);
104990 __Pyx_GIVEREF(__pyx_tuple__26);
104991
104992 /* "pysam/libcbcf.pyx":1199
104993 * if info and info.vptr:
104994 * if bcf_update_info(hdr, record.ptr, b'END', NULL, 0, info.type) < 0:
104995 * raise ValueError('Unable to delete END') # <<<<<<<<<<<<<<
104996 * else:
104997 * # Create END header, if not present
104998 */
104999 __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_delete_END); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1199, __pyx_L1_error)
105000 __Pyx_GOTREF(__pyx_tuple__27);
105001 __Pyx_GIVEREF(__pyx_tuple__27);
105002
105003 /* "pysam/libcbcf.pyx":1203
105004 * # Create END header, if not present
105005 * if end_id < 0:
105006 * record.header.info.add('END', number=1, type='Integer', description='Stop position of the interval') # <<<<<<<<<<<<<<
105007 *
105008 * # Update to reflect stop position
105009 */
105010 __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_u_END); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1203, __pyx_L1_error)
105011 __Pyx_GOTREF(__pyx_tuple__28);
105012 __Pyx_GIVEREF(__pyx_tuple__28);
105013
105014 /* "pysam/libcbcf.pyx":1228
105015 * cdef bcf_header_remove_hrec(VariantHeader header, int i):
105016 * if header is None:
105017 * raise ValueError('header must not be None') # <<<<<<<<<<<<<<
105018 *
105019 * cdef bcf_hdr_t *hdr = header.ptr
105020 */
105021 __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_header_must_not_be_None); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1228, __pyx_L1_error)
105022 __Pyx_GOTREF(__pyx_tuple__29);
105023 __Pyx_GIVEREF(__pyx_tuple__29);
105024
105025 /* "pysam/libcbcf.pyx":1233
105026 *
105027 * if i < 0 or i >= hdr.nhrec:
105028 * raise ValueError('Invalid header record index') # <<<<<<<<<<<<<<
105029 *
105030 * cdef bcf_hrec_t *hrec = hdr.hrec[i]
105031 */
105032 __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_Invalid_header_record_index); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 1233, __pyx_L1_error)
105033 __Pyx_GOTREF(__pyx_tuple__30);
105034 __Pyx_GIVEREF(__pyx_tuple__30);
105035
105036 /* "pysam/libcbcf.pyx":1252
105037 * """header record from a :class:`VariantHeader` object"""
105038 * def __init__(self, *args, **kwargs):
105039 * raise TypeError('this class cannot be instantiated from Python') # <<<<<<<<<<<<<<
105040 *
105041 * @property
105042 */
105043 __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_this_class_cannot_be_instantiate); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 1252, __pyx_L1_error)
105044 __Pyx_GOTREF(__pyx_tuple__31);
105045 __Pyx_GIVEREF(__pyx_tuple__31);
105046
105047 /* "pysam/libcbcf.pyx":1302
105048 * if r.keys[i] and r.keys[i] == bkey:
105049 * return charptr_to_str(r.vals[i]) if r.vals[i] else None
105050 * raise KeyError('cannot find metadata key') # <<<<<<<<<<<<<<
105051 *
105052 * def __iter__(self):
105053 */
105054 __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_cannot_find_metadata_key); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1302, __pyx_L1_error)
105055 __Pyx_GOTREF(__pyx_tuple__32);
105056 __Pyx_GIVEREF(__pyx_tuple__32);
105057
105058 /* "pysam/libcbcf.pyx":1395
105059 *
105060 * if not r:
105061 * raise ValueError('cannot convert deleted record to str') # <<<<<<<<<<<<<<
105062 *
105063 * cdef kstring_t hrec_str
105064 */
105065 __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_cannot_convert_deleted_record_to); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1395, __pyx_L1_error)
105066 __Pyx_GOTREF(__pyx_tuple__43);
105067 __Pyx_GIVEREF(__pyx_tuple__43);
105068
105069 /* "pysam/libcbcf.pyx":1424
105070 * cdef VariantHeaderRecord makeVariantHeaderRecord(VariantHeader header, bcf_hrec_t *hdr):
105071 * if not header:
105072 * raise ValueError('invalid VariantHeader') # <<<<<<<<<<<<<<
105073 *
105074 * if not hdr:
105075 */
105076 __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_invalid_VariantHeader); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1424, __pyx_L1_error)
105077 __Pyx_GOTREF(__pyx_tuple__47);
105078 __Pyx_GIVEREF(__pyx_tuple__47);
105079
105080 /* "pysam/libcbcf.pyx":1450
105081 * cdef int32_t i = index
105082 * if i < 0 or i >= self.header.ptr.nhrec:
105083 * raise IndexError('invalid header record index') # <<<<<<<<<<<<<<
105084 * return makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
105085 *
105086 */
105087 __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_invalid_header_record_index); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1450, __pyx_L1_error)
105088 __Pyx_GOTREF(__pyx_tuple__48);
105089 __Pyx_GIVEREF(__pyx_tuple__48);
105090
105091 /* "pysam/libcbcf.pyx":1493
105092 *
105093 * if not check_header_id(hdr, self.type, self.id):
105094 * raise ValueError('Invalid header id') # <<<<<<<<<<<<<<
105095 *
105096 * if self.type == BCF_HL_FLT:
105097 */
105098 __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_Invalid_header_id); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1493, __pyx_L1_error)
105099 __Pyx_GOTREF(__pyx_tuple__51);
105100 __Pyx_GIVEREF(__pyx_tuple__51);
105101
105102 /* "pysam/libcbcf.pyx":1547
105103 *
105104 * if type != BCF_HL_FLT and type != BCF_HL_INFO and type != BCF_HL_FMT:
105105 * raise ValueError('invalid metadata type') # <<<<<<<<<<<<<<
105106 *
105107 * if id < 0 or id >= header.ptr.n[BCF_DT_ID]:
105108 */
105109 __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_invalid_metadata_type); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1547, __pyx_L1_error)
105110 __Pyx_GOTREF(__pyx_tuple__57);
105111 __Pyx_GIVEREF(__pyx_tuple__57);
105112
105113 /* "pysam/libcbcf.pyx":1550
105114 *
105115 * if id < 0 or id >= header.ptr.n[BCF_DT_ID]:
105116 * raise ValueError('invalid metadata id') # <<<<<<<<<<<<<<
105117 *
105118 * cdef VariantMetadata meta = VariantMetadata.__new__(VariantMetadata)
105119 */
105120 __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_invalid_metadata_id); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 1550, __pyx_L1_error)
105121 __Pyx_GOTREF(__pyx_tuple__58);
105122 __Pyx_GIVEREF(__pyx_tuple__58);
105123
105124 /* "pysam/libcbcf.pyx":1572
105125 * if self.type == BCF_HL_FLT:
105126 * if number is not None:
105127 * raise ValueError('Number must be None when adding a filter') # <<<<<<<<<<<<<<
105128 * if type is not None:
105129 * raise ValueError('Type must be None when adding a filter')
105130 */
105131 __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_Number_must_be_None_when_adding); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1572, __pyx_L1_error)
105132 __Pyx_GOTREF(__pyx_tuple__60);
105133 __Pyx_GIVEREF(__pyx_tuple__60);
105134
105135 /* "pysam/libcbcf.pyx":1574
105136 * raise ValueError('Number must be None when adding a filter')
105137 * if type is not None:
105138 * raise ValueError('Type must be None when adding a filter') # <<<<<<<<<<<<<<
105139 *
105140 * items = [('ID', unquoted_str(id)), ('Description', description)]
105141 */
105142 __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_Type_must_be_None_when_adding_a); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1574, __pyx_L1_error)
105143 __Pyx_GOTREF(__pyx_tuple__61);
105144 __Pyx_GIVEREF(__pyx_tuple__61);
105145
105146 /* "pysam/libcbcf.pyx":1752
105147 *
105148 * if id < 0 or id >= header.ptr.n[BCF_DT_CTG]:
105149 * raise ValueError('invalid contig id') # <<<<<<<<<<<<<<
105150 *
105151 * cdef VariantContig contig = VariantContig.__new__(VariantContig)
105152 */
105153 __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_invalid_contig_id); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1752, __pyx_L1_error)
105154 __Pyx_GOTREF(__pyx_tuple__76);
105155 __Pyx_GIVEREF(__pyx_tuple__76);
105156
105157 /* "pysam/libcbcf.pyx":1783
105158 * index = key
105159 * if index < 0 or index >= hdr.n[BCF_DT_CTG]:
105160 * raise IndexError('invalid contig index') # <<<<<<<<<<<<<<
105161 * return makeVariantContig(self.header, index)
105162 *
105163 */
105164 __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_invalid_contig_index); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1783, __pyx_L1_error)
105165 __Pyx_GOTREF(__pyx_tuple__77);
105166 __Pyx_GIVEREF(__pyx_tuple__77);
105167
105168 /* "pysam/libcbcf.pyx":1888
105169 * items.append(("length", unquoted_str(length)))
105170 * items += kwargs.items()
105171 * self.header.add_meta('contig', items=items) # <<<<<<<<<<<<<<
105172 *
105173 *
105174 */
105175 __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_u_contig); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1888, __pyx_L1_error)
105176 __Pyx_GOTREF(__pyx_tuple__88);
105177 __Pyx_GIVEREF(__pyx_tuple__88);
105178
105179 /* "pysam/libcbcf.pyx":1918
105180 *
105181 * if i < 0 or i >= n:
105182 * raise IndexError('invalid sample index') # <<<<<<<<<<<<<<
105183 *
105184 * return charptr_to_str(hdr.samples[i])
105185 */
105186 __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_u_invalid_sample_index); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 1918, __pyx_L1_error)
105187 __Pyx_GOTREF(__pyx_tuple__91);
105188 __Pyx_GIVEREF(__pyx_tuple__91);
105189
105190 /* "pysam/libcbcf.pyx":1971
105191 * self.ptr = bcf_hdr_init(b'w')
105192 * if not self.ptr:
105193 * raise ValueError('cannot create VariantHeader') # <<<<<<<<<<<<<<
105194 *
105195 * def __dealloc__(self):
105196 */
105197 __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_u_cannot_create_VariantHeader); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1971, __pyx_L1_error)
105198 __Pyx_GOTREF(__pyx_tuple__95);
105199 __Pyx_GIVEREF(__pyx_tuple__95);
105200
105201 /* "pysam/libcbcf.pyx":2068
105202 * if line.m:
105203 * free(line.s)
105204 * raise ValueError('bcf_hdr_format failed') # <<<<<<<<<<<<<<
105205 *
105206 * ret = charptr_to_str_w_len(line.s, line.l)
105207 */
105208 __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_bcf_hdr_format_failed); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 2068, __pyx_L1_error)
105209 __Pyx_GOTREF(__pyx_tuple__98);
105210 __Pyx_GIVEREF(__pyx_tuple__98);
105211
105212 /* "pysam/libcbcf.pyx":2088
105213 *
105214 * if not rec:
105215 * raise MemoryError('unable to allocate BCF record') # <<<<<<<<<<<<<<
105216 *
105217 * rec.ptr.n_sample = bcf_hdr_nsamples(self.ptr)
105218 */
105219 __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_u_unable_to_allocate_BCF_record); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 2088, __pyx_L1_error)
105220 __Pyx_GOTREF(__pyx_tuple__100);
105221 __Pyx_GIVEREF(__pyx_tuple__100);
105222
105223 /* "pysam/libcbcf.pyx":2137
105224 * bline = force_bytes(line)
105225 * if bcf_hdr_append(self.ptr, bline) < 0:
105226 * raise ValueError('invalid header line') # <<<<<<<<<<<<<<
105227 *
105228 * self._hdr_sync()
105229 */
105230 __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_u_invalid_header_line); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 2137, __pyx_L1_error)
105231 __Pyx_GOTREF(__pyx_tuple__103);
105232 __Pyx_GIVEREF(__pyx_tuple__103);
105233
105234 /* "pysam/libcbcf.pyx":2145
105235 * """Add metadata to this header"""
105236 * if not ((value is not None) ^ (items is not None)):
105237 * raise ValueError('either value or items must be specified') # <<<<<<<<<<<<<<
105238 *
105239 * cdef bcf_hrec_t *hrec = <bcf_hrec_t*>calloc(1, sizeof(bcf_hrec_t))
105240 */
105241 __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_u_either_value_or_items_must_be_sp); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 2145, __pyx_L1_error)
105242 __Pyx_GOTREF(__pyx_tuple__105);
105243 __Pyx_GIVEREF(__pyx_tuple__105);
105244
105245 /* "pysam/libcbcf.pyx":2182
105246 * if hdr.dirty:
105247 * if bcf_hdr_sync(hdr) < 0:
105248 * raise MemoryError('unable to reallocate VariantHeader') # <<<<<<<<<<<<<<
105249 *
105250 * def add_sample(self, name):
105251 */
105252 __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_u_unable_to_reallocate_VariantHead); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 2182, __pyx_L1_error)
105253 __Pyx_GOTREF(__pyx_tuple__106);
105254 __Pyx_GIVEREF(__pyx_tuple__106);
105255
105256 /* "pysam/libcbcf.pyx":2258
105257 *
105258 * if index < 0 or index >= n:
105259 * raise IndexError('invalid filter index') # <<<<<<<<<<<<<<
105260 *
105261 * id = r.d.flt[index]
105262 */
105263 __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_u_invalid_filter_index); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 2258, __pyx_L1_error)
105264 __Pyx_GOTREF(__pyx_tuple__111);
105265 __Pyx_GIVEREF(__pyx_tuple__111);
105266
105267 /* "pysam/libcbcf.pyx":2390
105268 * cdef VariantRecordFilter makeVariantRecordFilter(VariantRecord record):
105269 * if not record:
105270 * raise ValueError('invalid VariantRecord') # <<<<<<<<<<<<<<
105271 *
105272 * cdef VariantRecordFilter filter = VariantRecordFilter.__new__(VariantRecordFilter)
105273 */
105274 __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_u_invalid_VariantRecord); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 2390, __pyx_L1_error)
105275 __Pyx_GOTREF(__pyx_tuple__123);
105276 __Pyx_GIVEREF(__pyx_tuple__123);
105277
105278 /* "pysam/libcbcf.pyx":2447
105279 *
105280 * if bcf_update_format(hdr, r, bkey, fmt.p, 0, fmt.type) < 0:
105281 * raise ValueError('Unable to delete FORMAT') # <<<<<<<<<<<<<<
105282 *
105283 * def clear(self):
105284 */
105285 __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_delete_FORMAT); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 2447, __pyx_L1_error)
105286 __Pyx_GOTREF(__pyx_tuple__124);
105287 __Pyx_GIVEREF(__pyx_tuple__124);
105288
105289 /* "pysam/libcbcf.pyx":2586
105290 *
105291 * if strcmp(bkey, b'END') == 0:
105292 * raise KeyError('END is a reserved attribute; access is via record.stop') # <<<<<<<<<<<<<<
105293 *
105294 * cdef bcf_info_t *info = bcf_get_info(hdr, r, bkey)
105295 */
105296 __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_u_END_is_a_reserved_attribute_acce); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 2586, __pyx_L1_error)
105297 __Pyx_GOTREF(__pyx_tuple__135);
105298 __Pyx_GIVEREF(__pyx_tuple__135);
105299
105300 /* "pysam/libcbcf.pyx":2649
105301 *
105302 * if bcf_update_info(hdr, r, bkey, NULL, 0, info.type) < 0:
105303 * raise ValueError('Unable to delete INFO') # <<<<<<<<<<<<<<
105304 *
105305 * def clear(self):
105306 */
105307 __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_u_Unable_to_delete_INFO); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 2649, __pyx_L1_error)
105308 __Pyx_GOTREF(__pyx_tuple__136);
105309 __Pyx_GIVEREF(__pyx_tuple__136);
105310
105311 /* "pysam/libcbcf.pyx":3033
105312 * def translate(self, VariantHeader dst_header):
105313 * if dst_header is None:
105314 * raise ValueError('dst_header must not be None') # <<<<<<<<<<<<<<
105315 *
105316 * cdef bcf_hdr_t *src_hdr = self.header.ptr
105317 */
105318 __pyx_tuple__164 = PyTuple_Pack(1, __pyx_kp_u_dst_header_must_not_be_None); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 3033, __pyx_L1_error)
105319 __Pyx_GOTREF(__pyx_tuple__164);
105320 __Pyx_GIVEREF(__pyx_tuple__164);
105321
105322 /* "pysam/libcbcf.pyx":3056
105323 * cdef int r = value
105324 * if r < 0 or r >= hdr.n[BCF_DT_CTG] or not hdr.id[BCF_DT_CTG][r].val:
105325 * raise ValueError('invalid reference id') # <<<<<<<<<<<<<<
105326 * self.ptr.rid = r
105327 *
105328 */
105329 __pyx_tuple__165 = PyTuple_Pack(1, __pyx_kp_u_invalid_reference_id); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 3056, __pyx_L1_error)
105330 __Pyx_GOTREF(__pyx_tuple__165);
105331 __Pyx_GIVEREF(__pyx_tuple__165);
105332
105333 /* "pysam/libcbcf.pyx":3074
105334 * cdef khint_t k = kh_get_vdict(d, bchrom)
105335 * if k == kh_end(d):
105336 * raise ValueError('Invalid chromosome/contig') # <<<<<<<<<<<<<<
105337 * self.ptr.rid = kh_val_vdict(d, k).id
105338 *
105339 */
105340 __pyx_tuple__166 = PyTuple_Pack(1, __pyx_kp_u_Invalid_chromosome_contig); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 3074, __pyx_L1_error)
105341 __Pyx_GOTREF(__pyx_tuple__166);
105342 __Pyx_GIVEREF(__pyx_tuple__166);
105343
105344 /* "pysam/libcbcf.pyx":3104
105345 * cdef int p = value
105346 * if p < 1:
105347 * raise ValueError('Position must be positive') # <<<<<<<<<<<<<<
105348 * self.ptr.pos = p - 1
105349 * bcf_sync_end(self)
105350 */
105351 __pyx_tuple__167 = PyTuple_Pack(1, __pyx_kp_u_Position_must_be_positive); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 3104, __pyx_L1_error)
105352 __Pyx_GOTREF(__pyx_tuple__167);
105353 __Pyx_GIVEREF(__pyx_tuple__167);
105354
105355 /* "pysam/libcbcf.pyx":3117
105356 * cdef int s = value
105357 * if s < 0:
105358 * raise ValueError('Start coordinate must be non-negative') # <<<<<<<<<<<<<<
105359 * self.ptr.pos = s
105360 * bcf_sync_end(self)
105361 */
105362 __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_u_Start_coordinate_must_be_non_neg); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 3117, __pyx_L1_error)
105363 __Pyx_GOTREF(__pyx_tuple__168);
105364 __Pyx_GIVEREF(__pyx_tuple__168);
105365
105366 /* "pysam/libcbcf.pyx":3130
105367 * cdef int s = value
105368 * if s < 0:
105369 * raise ValueError('Stop coordinate must be non-negative') # <<<<<<<<<<<<<<
105370 * self.ptr.rlen = s - self.ptr.pos
105371 * bcf_sync_end(self)
105372 */
105373 __pyx_tuple__169 = PyTuple_Pack(1, __pyx_kp_u_Stop_coordinate_must_be_non_nega); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 3130, __pyx_L1_error)
105374 __Pyx_GOTREF(__pyx_tuple__169);
105375 __Pyx_GIVEREF(__pyx_tuple__169);
105376
105377 /* "pysam/libcbcf.pyx":3175
105378 * # return bcf_str_cache_get_charptr(r.d.id) if r.d.id != b'.' else None
105379 * if (r.d.m_id == 0):
105380 * raise ValueError('Error extracting ID') # <<<<<<<<<<<<<<
105381 * return charptr_to_str(r.d.id) if r.d.id != b'.' else None
105382 *
105383 */
105384 __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_u_Error_extracting_ID); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 3175, __pyx_L1_error)
105385 __Pyx_GOTREF(__pyx_tuple__170);
105386 __Pyx_GIVEREF(__pyx_tuple__170);
105387
105388 /* "pysam/libcbcf.pyx":3188
105389 * idstr = bid
105390 * if bcf_update_id(self.header.ptr, self.ptr, idstr) < 0:
105391 * raise ValueError('Error updating id') # <<<<<<<<<<<<<<
105392 *
105393 * @property
105394 */
105395 __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_u_Error_updating_id); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 3188, __pyx_L1_error)
105396 __Pyx_GOTREF(__pyx_tuple__171);
105397 __Pyx_GIVEREF(__pyx_tuple__171);
105398
105399 /* "pysam/libcbcf.pyx":3205
105400 * #FIXME: Set alleles directly -- this is stupid
105401 * if not value:
105402 * raise ValueError('ref allele must not be null') # <<<<<<<<<<<<<<
105403 * value = force_bytes(value)
105404 * if r.d.allele and r.n_allele:
105405 */
105406 __pyx_tuple__172 = PyTuple_Pack(1, __pyx_kp_u_ref_allele_must_not_be_null); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 3205, __pyx_L1_error)
105407 __Pyx_GOTREF(__pyx_tuple__172);
105408 __Pyx_GIVEREF(__pyx_tuple__172);
105409
105410 /* "pysam/libcbcf.pyx":3243
105411 *
105412 * if len(values) < 2:
105413 * raise ValueError('must set at least 2 alleles') # <<<<<<<<<<<<<<
105414 *
105415 * if b'' in values:
105416 */
105417 __pyx_tuple__173 = PyTuple_Pack(1, __pyx_kp_u_must_set_at_least_2_alleles); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 3243, __pyx_L1_error)
105418 __Pyx_GOTREF(__pyx_tuple__173);
105419 __Pyx_GIVEREF(__pyx_tuple__173);
105420
105421 /* "pysam/libcbcf.pyx":3246
105422 *
105423 * if b'' in values:
105424 * raise ValueError('cannot set null allele') # <<<<<<<<<<<<<<
105425 *
105426 * value = b','.join(values)
105427 */
105428 __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_u_cannot_set_null_allele); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 3246, __pyx_L1_error)
105429 __Pyx_GOTREF(__pyx_tuple__174);
105430 __Pyx_GIVEREF(__pyx_tuple__174);
105431
105432 /* "pysam/libcbcf.pyx":3251
105433 *
105434 * if bcf_update_alleles_str(self.header.ptr, r, value) < 0:
105435 * raise ValueError('Error updating alleles') # <<<<<<<<<<<<<<
105436 *
105437 * # Reset rlen if alternate allele isn't symbolic, otherwise used cached
105438 */
105439 __pyx_tuple__175 = PyTuple_Pack(1, __pyx_kp_u_Error_updating_alleles); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 3251, __pyx_L1_error)
105440 __Pyx_GOTREF(__pyx_tuple__175);
105441 __Pyx_GIVEREF(__pyx_tuple__175);
105442
105443 /* "pysam/libcbcf.pyx":3284
105444 * value = [force_bytes(v) for v in value]
105445 * if b'' in value:
105446 * raise ValueError('cannot set null alt allele') # <<<<<<<<<<<<<<
105447 * ref = [r.d.allele[0] if r.d.allele and r.n_allele else b'.']
105448 * self.alleles = ref + value
105449 */
105450 __pyx_tuple__176 = PyTuple_Pack(1, __pyx_kp_u_cannot_set_null_alt_allele); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 3284, __pyx_L1_error)
105451 __Pyx_GOTREF(__pyx_tuple__176);
105452 __Pyx_GIVEREF(__pyx_tuple__176);
105453
105454 /* "pysam/libcbcf.pyx":3381
105455 * if line.m:
105456 * free(line.s)
105457 * raise ValueError('vcf_format failed') # <<<<<<<<<<<<<<
105458 *
105459 * # Strip CR/LF?
105460 */
105461 __pyx_tuple__177 = PyTuple_Pack(1, __pyx_kp_u_vcf_format_failed); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 3381, __pyx_L1_error)
105462 __Pyx_GOTREF(__pyx_tuple__177);
105463 __Pyx_GIVEREF(__pyx_tuple__177);
105464
105465 /* "pysam/libcbcf.pyx":3403
105466 *
105467 * if not r:
105468 * raise ValueError('cannot create VariantRecord') # <<<<<<<<<<<<<<
105469 *
105470 * if r.errcode:
105471 */
105472 __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_u_cannot_create_VariantRecord); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 3403, __pyx_L1_error)
105473 __Pyx_GOTREF(__pyx_tuple__180);
105474 __Pyx_GIVEREF(__pyx_tuple__180);
105475
105476 /* "pysam/libcbcf.pyx":3488
105477 *
105478 * if any((type(x) == int for x in value)):
105479 * raise ValueError('Use .allele_indices to set integer allele indices') # <<<<<<<<<<<<<<
105480 *
105481 * # determine and set allele indices:
105482 */
105483 __pyx_tuple__182 = PyTuple_Pack(1, __pyx_kp_u_Use_allele_indices_to_set_intege); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 3488, __pyx_L1_error)
105484 __Pyx_GOTREF(__pyx_tuple__182);
105485 __Pyx_GIVEREF(__pyx_tuple__182);
105486
105487 /* "pysam/libcbcf.pyx":3494
105488 * self['GT'] = tuple( (self.record.alleles.index(allele) for allele in value) )
105489 * except ValueError:
105490 * raise ValueError("One or more of the supplied sample alleles are not defined as alleles of the corresponding pysam.libcbcf.VariantRecord." # <<<<<<<<<<<<<<
105491 * "First set the .alleles of this record to define the alleles")
105492 *
105493 */
105494 __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_u_One_or_more_of_the_supplied_samp); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 3494, __pyx_L1_error)
105495 __Pyx_GOTREF(__pyx_tuple__183);
105496 __Pyx_GIVEREF(__pyx_tuple__183);
105497
105498 /* "pysam/libcbcf.pyx":3647
105499 * cdef VariantRecordSample makeVariantRecordSample(VariantRecord record, int32_t sample_index):
105500 * if not record or sample_index < 0:
105501 * raise ValueError('cannot create VariantRecordSample') # <<<<<<<<<<<<<<
105502 *
105503 * cdef VariantRecordSample sample = VariantRecordSample.__new__(VariantRecordSample)
105504 */
105505 __pyx_tuple__197 = PyTuple_Pack(1, __pyx_kp_u_cannot_create_VariantRecordSampl); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 3647, __pyx_L1_error)
105506 __Pyx_GOTREF(__pyx_tuple__197);
105507 __Pyx_GIVEREF(__pyx_tuple__197);
105508
105509 /* "pysam/libcbcf.pyx":3758
105510 *
105511 * if not self.ptr:
105512 * raise ValueError('Invalid index object') # <<<<<<<<<<<<<<
105513 *
105514 * cdef int n
105515 */
105516 __pyx_tuple__210 = PyTuple_Pack(1, __pyx_kp_u_Invalid_index_object); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 3758, __pyx_L1_error)
105517 __Pyx_GOTREF(__pyx_tuple__210);
105518 __Pyx_GIVEREF(__pyx_tuple__210);
105519
105520 /* "pysam/libcbcf.pyx":3848
105521 * def __init__(self, VariantFile bcf, contig=None, start=None, stop=None, reopen=True):
105522 * if bcf is None:
105523 * raise ValueError('bcf must not be None') # <<<<<<<<<<<<<<
105524 *
105525 * if contig is None:
105526 */
105527 __pyx_tuple__219 = PyTuple_Pack(1, __pyx_kp_u_bcf_must_not_be_None); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 3848, __pyx_L1_error)
105528 __Pyx_GOTREF(__pyx_tuple__219);
105529 __Pyx_GIVEREF(__pyx_tuple__219);
105530
105531 /* "pysam/libcbcf.pyx":3851
105532 *
105533 * if contig is None:
105534 * raise ValueError('contig must be specified') # <<<<<<<<<<<<<<
105535 *
105536 * if not isinstance(bcf.index, BCFIndex):
105537 */
105538 __pyx_tuple__220 = PyTuple_Pack(1, __pyx_kp_u_contig_must_be_specified); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 3851, __pyx_L1_error)
105539 __Pyx_GOTREF(__pyx_tuple__220);
105540 __Pyx_GIVEREF(__pyx_tuple__220);
105541
105542 /* "pysam/libcbcf.pyx":3854
105543 *
105544 * if not isinstance(bcf.index, BCFIndex):
105545 * raise ValueError('bcf index required') # <<<<<<<<<<<<<<
105546 *
105547 * cdef BCFIndex index = bcf.index
105548 */
105549 __pyx_tuple__221 = PyTuple_Pack(1, __pyx_kp_u_bcf_index_required); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 3854, __pyx_L1_error)
105550 __Pyx_GOTREF(__pyx_tuple__221);
105551 __Pyx_GIVEREF(__pyx_tuple__221);
105552
105553 /* "pysam/libcbcf.pyx":3916
105554 * raise StopIteration
105555 * elif ret == -2:
105556 * raise IOError('truncated file') # <<<<<<<<<<<<<<
105557 * elif errno:
105558 * raise IOError(errno, strerror(errno))
105559 */
105560 __pyx_tuple__222 = PyTuple_Pack(1, __pyx_kp_u_truncated_file); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 3916, __pyx_L1_error)
105561 __Pyx_GOTREF(__pyx_tuple__222);
105562 __Pyx_GIVEREF(__pyx_tuple__222);
105563
105564 /* "pysam/libcbcf.pyx":3920
105565 * raise IOError(errno, strerror(errno))
105566 * else:
105567 * raise IOError('unable to fetch next record') # <<<<<<<<<<<<<<
105568 *
105569 * ret = bcf_subset_format(self.bcf.header.ptr, record)
105570 */
105571 __pyx_tuple__223 = PyTuple_Pack(1, __pyx_kp_u_unable_to_fetch_next_record); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 3920, __pyx_L1_error)
105572 __Pyx_GOTREF(__pyx_tuple__223);
105573 __Pyx_GIVEREF(__pyx_tuple__223);
105574
105575 /* "pysam/libcbcf.pyx":3926
105576 * if ret < 0:
105577 * _stop_BCFIterator(self, record)
105578 * raise ValueError('error in bcf_subset_format') # <<<<<<<<<<<<<<
105579 *
105580 * return makeVariantRecord(self.bcf.header, record)
105581 */
105582 __pyx_tuple__224 = PyTuple_Pack(1, __pyx_kp_u_error_in_bcf_subset_format); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 3926, __pyx_L1_error)
105583 __Pyx_GOTREF(__pyx_tuple__224);
105584 __Pyx_GIVEREF(__pyx_tuple__224);
105585
105586 /* "pysam/libcbcf.pyx":3942
105587 *
105588 * if not isinstance(bcf.index, TabixIndex):
105589 * raise ValueError('tabix index required') # <<<<<<<<<<<<<<
105590 *
105591 * cdef TabixIndex index = bcf.index
105592 */
105593 __pyx_tuple__227 = PyTuple_Pack(1, __pyx_kp_u_tabix_index_required); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 3942, __pyx_L1_error)
105594 __Pyx_GOTREF(__pyx_tuple__227);
105595 __Pyx_GIVEREF(__pyx_tuple__227);
105596
105597 /* "pysam/libcbcf.pyx":4022
105598 * if ret < 0:
105599 * bcf_destroy1(record)
105600 * raise ValueError('error in vcf_parse') # <<<<<<<<<<<<<<
105601 *
105602 * return makeVariantRecord(self.bcf.header, record)
105603 */
105604 __pyx_tuple__228 = PyTuple_Pack(1, __pyx_kp_u_error_in_vcf_parse); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 4022, __pyx_L1_error)
105605 __Pyx_GOTREF(__pyx_tuple__228);
105606 __Pyx_GIVEREF(__pyx_tuple__228);
105607
105608 /* "pysam/libcbcf.pyx":4158
105609 * def __iter__(self):
105610 * if not self.is_open:
105611 * raise ValueError('I/O operation on closed file') # <<<<<<<<<<<<<<
105612 *
105613 * if self.htsfile.is_write:
105614 */
105615 __pyx_tuple__232 = PyTuple_Pack(1, __pyx_kp_u_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 4158, __pyx_L1_error)
105616 __Pyx_GOTREF(__pyx_tuple__232);
105617 __Pyx_GIVEREF(__pyx_tuple__232);
105618
105619 /* "pysam/libcbcf.pyx":4161
105620 *
105621 * if self.htsfile.is_write:
105622 * raise ValueError('cannot iterate over Variantfile opened for writing') # <<<<<<<<<<<<<<
105623 *
105624 * self.is_reading = 1
105625 */
105626 __pyx_tuple__233 = PyTuple_Pack(1, __pyx_kp_u_cannot_iterate_over_Variantfile); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 4161, __pyx_L1_error)
105627 __Pyx_GOTREF(__pyx_tuple__233);
105628 __Pyx_GIVEREF(__pyx_tuple__233);
105629
105630 /* "pysam/libcbcf.pyx":4185
105631 * bcf_destroy1(record)
105632 * if errcode:
105633 * raise IOError('unable to parse next record') # <<<<<<<<<<<<<<
105634 * if ret == -1:
105635 * raise StopIteration
105636 */
105637 __pyx_tuple__234 = PyTuple_Pack(1, __pyx_kp_u_unable_to_parse_next_record); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 4185, __pyx_L1_error)
105638 __Pyx_GOTREF(__pyx_tuple__234);
105639 __Pyx_GIVEREF(__pyx_tuple__234);
105640
105641 /* "pysam/libcbcf.pyx":4208
105642 *
105643 * if not vars.htsfile:
105644 * raise ValueError('Cannot re-open htsfile') # <<<<<<<<<<<<<<
105645 *
105646 * # minimize overhead by re-using header and index. This approach is
105647 */
105648 __pyx_tuple__236 = PyTuple_Pack(1, __pyx_kp_u_Cannot_re_open_htsfile); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 4208, __pyx_L1_error)
105649 __Pyx_GOTREF(__pyx_tuple__236);
105650 __Pyx_GIVEREF(__pyx_tuple__236);
105651
105652 /* "pysam/libcbcf.pyx":4261
105653 * # to bgzf_read (https://github.com/samtools/htslib/blob/1.7/bgzf.c#L888)
105654 * # Better to avoid this (for now) than to produce seemingly correct results.
105655 * raise ValueError('Cannot add extra threads when "ignore_truncation" is True') # <<<<<<<<<<<<<<
105656 * self.threads = threads
105657 *
105658 */
105659 __pyx_tuple__238 = PyTuple_Pack(1, __pyx_kp_u_Cannot_add_extra_threads_when_ig); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 4261, __pyx_L1_error)
105660 __Pyx_GOTREF(__pyx_tuple__238);
105661 __Pyx_GIVEREF(__pyx_tuple__238);
105662
105663 /* "pysam/libcbcf.pyx":4269
105664 *
105665 * if not mode or mode[0] not in 'rwa':
105666 * raise ValueError('mode must begin with r, w or a') # <<<<<<<<<<<<<<
105667 *
105668 * self.duplicate_filehandle = duplicate_filehandle
105669 */
105670 __pyx_tuple__239 = PyTuple_Pack(1, __pyx_kp_u_mode_must_begin_with_r_w_or_a); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 4269, __pyx_L1_error)
105671 __Pyx_GOTREF(__pyx_tuple__239);
105672 __Pyx_GIVEREF(__pyx_tuple__239);
105673
105674 /* "pysam/libcbcf.pyx":4273
105675 * self.duplicate_filehandle = duplicate_filehandle
105676 *
105677 * format_modes = [m for m in mode[1:] if m in 'bcguz'] # <<<<<<<<<<<<<<
105678 * if len(format_modes) > 1:
105679 * raise ValueError('mode contains conflicting format specifiers: {}'.format(''.join(format_modes)))
105680 */
105681 __pyx_slice__240 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__240)) __PYX_ERR(0, 4273, __pyx_L1_error)
105682 __Pyx_GOTREF(__pyx_slice__240);
105683 __Pyx_GIVEREF(__pyx_slice__240);
105684
105685 /* "pysam/libcbcf.pyx":4317
105686 * # open file for writing
105687 * if index_filename is not None:
105688 * raise ValueError('Cannot specify an index filename when writing a VCF/BCF file') # <<<<<<<<<<<<<<
105689 *
105690 * # header structure (used for writing)
105691 */
105692 __pyx_tuple__242 = PyTuple_Pack(1, __pyx_kp_u_Cannot_specify_an_index_filename); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 4317, __pyx_L1_error)
105693 __Pyx_GOTREF(__pyx_tuple__242);
105694 __Pyx_GIVEREF(__pyx_tuple__242);
105695
105696 /* "pysam/libcbcf.pyx":4422
105697 * cdef int rid = tid
105698 * if rid < 0 or rid >= hdr.n[BCF_DT_CTG]:
105699 * raise ValueError('Invalid tid') # <<<<<<<<<<<<<<
105700 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
105701 *
105702 */
105703 __pyx_tuple__247 = PyTuple_Pack(1, __pyx_kp_u_Invalid_tid); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 4422, __pyx_L1_error)
105704 __Pyx_GOTREF(__pyx_tuple__247);
105705 __Pyx_GIVEREF(__pyx_tuple__247);
105706
105707 /* "pysam/libcbcf.pyx":4451
105708 *
105709 * if self.htsfile.is_write:
105710 * raise ValueError('cannot fetch from Variantfile opened for writing') # <<<<<<<<<<<<<<
105711 *
105712 * if contig is None and region is None:
105713 */
105714 __pyx_tuple__249 = PyTuple_Pack(1, __pyx_kp_u_cannot_fetch_from_Variantfile_op); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 4451, __pyx_L1_error)
105715 __Pyx_GOTREF(__pyx_tuple__249);
105716 __Pyx_GIVEREF(__pyx_tuple__249);
105717
105718 /* "pysam/libcbcf.pyx":4460
105719 *
105720 * if self.index is None:
105721 * raise ValueError('fetch requires an index') # <<<<<<<<<<<<<<
105722 *
105723 * _, tid, start, stop = self.parse_region(contig, start, stop, region,
105724 */
105725 __pyx_tuple__250 = PyTuple_Pack(1, __pyx_kp_u_fetch_requires_an_index); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 4460, __pyx_L1_error)
105726 __Pyx_GOTREF(__pyx_tuple__250);
105727 __Pyx_GIVEREF(__pyx_tuple__250);
105728
105729 /* "pysam/libcbcf.pyx":4491
105730 *
105731 * if not self.htsfile.is_write:
105732 * raise ValueError('cannot write to a Variantfile opened for reading') # <<<<<<<<<<<<<<
105733 *
105734 * if not self.header_written:
105735 */
105736 __pyx_tuple__253 = PyTuple_Pack(1, __pyx_kp_u_cannot_write_to_a_Variantfile_op); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 4491, __pyx_L1_error)
105737 __Pyx_GOTREF(__pyx_tuple__253);
105738 __Pyx_GIVEREF(__pyx_tuple__253);
105739
105740 /* "pysam/libcbcf.pyx":4528
105741 *
105742 * if self.htsfile.is_write:
105743 * raise ValueError('cannot subset samples from Variantfile opened for writing') # <<<<<<<<<<<<<<
105744 *
105745 * if self.is_reading:
105746 */
105747 __pyx_tuple__255 = PyTuple_Pack(1, __pyx_kp_u_cannot_subset_samples_from_Varia); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 4528, __pyx_L1_error)
105748 __Pyx_GOTREF(__pyx_tuple__255);
105749 __Pyx_GIVEREF(__pyx_tuple__255);
105750
105751 /* "pysam/libcbcf.pyx":4531
105752 *
105753 * if self.is_reading:
105754 * raise ValueError('cannot subset samples after fetching records') # <<<<<<<<<<<<<<
105755 *
105756 * self.header._subset_samples(include_samples)
105757 */
105758 __pyx_tuple__256 = PyTuple_Pack(1, __pyx_kp_u_cannot_subset_samples_after_fetc); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 4531, __pyx_L1_error)
105759 __Pyx_GOTREF(__pyx_tuple__256);
105760 __Pyx_GIVEREF(__pyx_tuple__256);
105761
105762 /* "(tree fragment)":4
105763 * cdef object __pyx_PickleError
105764 * cdef object __pyx_result
105765 * if __pyx_checksum not in (0x1e0584a, 0x594fd16, 0x099fb99): # <<<<<<<<<<<<<<
105766 * from pickle import PickleError as __pyx_PickleError
105767 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1e0584a, 0x594fd16, 0x099fb99) = (header))" % __pyx_checksum
105768 */
105769 __pyx_tuple__260 = PyTuple_Pack(3, __pyx_int_31479882, __pyx_int_93650198, __pyx_int_10091417); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(4, 4, __pyx_L1_error)
105770 __Pyx_GOTREF(__pyx_tuple__260);
105771 __Pyx_GIVEREF(__pyx_tuple__260);
105772 __pyx_tuple__262 = PyTuple_Pack(3, __pyx_int_215036767, __pyx_int_168021462, __pyx_int_164668780); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(4, 4, __pyx_L1_error)
105773 __Pyx_GOTREF(__pyx_tuple__262);
105774 __Pyx_GIVEREF(__pyx_tuple__262);
105775 __pyx_tuple__264 = PyTuple_Pack(3, __pyx_int_135711299, __pyx_int_10698032, __pyx_int_248899179); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(4, 4, __pyx_L1_error)
105776 __Pyx_GOTREF(__pyx_tuple__264);
105777 __Pyx_GIVEREF(__pyx_tuple__264);
105778 __pyx_tuple__266 = PyTuple_Pack(3, __pyx_int_39264352, __pyx_int_145625440, __pyx_int_199651019); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(4, 4, __pyx_L1_error)
105779 __Pyx_GOTREF(__pyx_tuple__266);
105780 __Pyx_GIVEREF(__pyx_tuple__266);
105781 __pyx_tuple__270 = PyTuple_Pack(3, __pyx_int_118286449, __pyx_int_41264896, __pyx_int_232881935); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(4, 4, __pyx_L1_error)
105782 __Pyx_GOTREF(__pyx_tuple__270);
105783 __Pyx_GIVEREF(__pyx_tuple__270);
105784 __pyx_tuple__275 = PyTuple_Pack(3, __pyx_int_250317299, __pyx_int_94171383, __pyx_int_97976187); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(4, 4, __pyx_L1_error)
105785 __Pyx_GOTREF(__pyx_tuple__275);
105786 __Pyx_GIVEREF(__pyx_tuple__275);
105787 __pyx_tuple__277 = PyTuple_Pack(3, __pyx_int_126454353, __pyx_int_33440904, __pyx_int_227765731); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(4, 4, __pyx_L1_error)
105788 __Pyx_GOTREF(__pyx_tuple__277);
105789 __Pyx_GIVEREF(__pyx_tuple__277);
105790
105791 /* "pysam/libcbcf.pyx":135
105792 *
105793 * cdef int MAX_POS = (1 << 31) - 1
105794 * cdef tuple VALUE_TYPES = ('Flag', 'Integer', 'Float', 'String') # <<<<<<<<<<<<<<
105795 * cdef tuple METADATA_TYPES = ('FILTER', 'INFO', 'FORMAT', 'CONTIG', 'STRUCTURED', 'GENERIC')
105796 * cdef tuple METADATA_LENGTHS = ('FIXED', 'VARIABLE', 'A', 'G', 'R')
105797 */
105798 __pyx_tuple__279 = PyTuple_Pack(4, __pyx_n_u_Flag, __pyx_n_u_Integer, __pyx_n_u_Float, __pyx_n_u_String); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 135, __pyx_L1_error)
105799 __Pyx_GOTREF(__pyx_tuple__279);
105800 __Pyx_GIVEREF(__pyx_tuple__279);
105801
105802 /* "pysam/libcbcf.pyx":136
105803 * cdef int MAX_POS = (1 << 31) - 1
105804 * cdef tuple VALUE_TYPES = ('Flag', 'Integer', 'Float', 'String')
105805 * cdef tuple METADATA_TYPES = ('FILTER', 'INFO', 'FORMAT', 'CONTIG', 'STRUCTURED', 'GENERIC') # <<<<<<<<<<<<<<
105806 * cdef tuple METADATA_LENGTHS = ('FIXED', 'VARIABLE', 'A', 'G', 'R')
105807 *
105808 */
105809 __pyx_tuple__280 = PyTuple_Pack(6, __pyx_n_u_FILTER, __pyx_n_u_INFO, __pyx_n_u_FORMAT, __pyx_n_u_CONTIG, __pyx_n_u_STRUCTURED, __pyx_n_u_GENERIC); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 136, __pyx_L1_error)
105810 __Pyx_GOTREF(__pyx_tuple__280);
105811 __Pyx_GIVEREF(__pyx_tuple__280);
105812
105813 /* "pysam/libcbcf.pyx":137
105814 * cdef tuple VALUE_TYPES = ('Flag', 'Integer', 'Float', 'String')
105815 * cdef tuple METADATA_TYPES = ('FILTER', 'INFO', 'FORMAT', 'CONTIG', 'STRUCTURED', 'GENERIC')
105816 * cdef tuple METADATA_LENGTHS = ('FIXED', 'VARIABLE', 'A', 'G', 'R') # <<<<<<<<<<<<<<
105817 *
105818 *
105819 */
105820 __pyx_tuple__281 = PyTuple_Pack(5, __pyx_n_u_FIXED, __pyx_n_u_VARIABLE, __pyx_n_u_A, __pyx_n_u_G, __pyx_n_u_R); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 137, __pyx_L1_error)
105821 __Pyx_GOTREF(__pyx_tuple__281);
105822 __Pyx_GIVEREF(__pyx_tuple__281);
105823
105824 /* "pysam/libcbcf.pyx":1313
105825 * yield bcf_str_cache_get_charptr(r.keys[i])
105826 *
105827 * def get(self, key, default=None): # <<<<<<<<<<<<<<
105828 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
105829 * try:
105830 */
105831 __pyx_tuple__282 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 1313, __pyx_L1_error)
105832 __Pyx_GOTREF(__pyx_tuple__282);
105833 __Pyx_GIVEREF(__pyx_tuple__282);
105834 __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 1313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 1313, __pyx_L1_error)
105835
105836 /* "pysam/libcbcf.pyx":1328
105837 * return True
105838 *
105839 * def iterkeys(self): # <<<<<<<<<<<<<<
105840 * """D.iterkeys() -> an iterator over the keys of D"""
105841 * return iter(self)
105842 */
105843 __pyx_tuple__283 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 1328, __pyx_L1_error)
105844 __Pyx_GOTREF(__pyx_tuple__283);
105845 __Pyx_GIVEREF(__pyx_tuple__283);
105846 __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 1328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 1328, __pyx_L1_error)
105847
105848 /* "pysam/libcbcf.pyx":1332
105849 * return iter(self)
105850 *
105851 * def itervalues(self): # <<<<<<<<<<<<<<
105852 * """D.itervalues() -> an iterator over the values of D"""
105853 * cdef bcf_hrec_t *r = self.ptr
105854 */
105855 __pyx_tuple__284 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_r, __pyx_n_s_i); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 1332, __pyx_L1_error)
105856 __Pyx_GOTREF(__pyx_tuple__284);
105857 __Pyx_GIVEREF(__pyx_tuple__284);
105858 __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 1332, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1332, __pyx_L1_error)
105859
105860 /* "pysam/libcbcf.pyx":1342
105861 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None
105862 *
105863 * def iteritems(self): # <<<<<<<<<<<<<<
105864 * """D.iteritems() -> an iterator over the (key, value) items of D"""
105865 * cdef bcf_hrec_t *r = self.ptr
105866 */
105867 __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 1342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 1342, __pyx_L1_error)
105868
105869 /* "pysam/libcbcf.pyx":1352
105870 * yield (bcf_str_cache_get_charptr(r.keys[i]), charptr_to_str(r.vals[i]) if r.vals[i] else None)
105871 *
105872 * def keys(self): # <<<<<<<<<<<<<<
105873 * """D.keys() -> list of D's keys"""
105874 * return list(self)
105875 */
105876 __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 1352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1352, __pyx_L1_error)
105877
105878 /* "pysam/libcbcf.pyx":1356
105879 * return list(self)
105880 *
105881 * def items(self): # <<<<<<<<<<<<<<
105882 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
105883 * return list(self.iteritems())
105884 */
105885 __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 1356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 1356, __pyx_L1_error)
105886
105887 /* "pysam/libcbcf.pyx":1360
105888 * return list(self.iteritems())
105889 *
105890 * def values(self): # <<<<<<<<<<<<<<
105891 * """D.values() -> list of D's values"""
105892 * return list(self.itervalues())
105893 */
105894 __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 1360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1360, __pyx_L1_error)
105895
105896 /* "pysam/libcbcf.pyx":1364
105897 * return list(self.itervalues())
105898 *
105899 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
105900 * """D.update([E, ]**F) -> None.
105901 *
105902 */
105903 __pyx_tuple__285 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_items, __pyx_n_s_kwargs, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 1364, __pyx_L1_error)
105904 __Pyx_GOTREF(__pyx_tuple__285);
105905 __Pyx_GIVEREF(__pyx_tuple__285);
105906 __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_update, 1364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 1364, __pyx_L1_error)
105907
105908 /* "pysam/libcbcf.pyx":1376
105909 * self[k] = v
105910 *
105911 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
105912 * try:
105913 * value = self[key]
105914 */
105915 __pyx_tuple__286 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default, __pyx_n_s_value); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 1376, __pyx_L1_error)
105916 __Pyx_GOTREF(__pyx_tuple__286);
105917 __Pyx_GIVEREF(__pyx_tuple__286);
105918 __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_pop, 1376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1376, __pyx_L1_error)
105919
105920 /* "pysam/libcbcf.pyx":1411
105921 *
105922 * # FIXME: Not safe -- causes trivial segfaults at the moment
105923 * def remove(self): # <<<<<<<<<<<<<<
105924 * cdef bcf_hdr_t *hdr = self.header.ptr
105925 * cdef bcf_hrec_t *r = self.ptr
105926 */
105927 __pyx_tuple__287 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_key); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 1411, __pyx_L1_error)
105928 __Pyx_GOTREF(__pyx_tuple__287);
105929 __Pyx_GIVEREF(__pyx_tuple__287);
105930 __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_remove, 1411, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 1411, __pyx_L1_error)
105931
105932 /* "(tree fragment)":1
105933 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
105934 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
105935 * def __setstate_cython__(self, __pyx_state):
105936 */
105937 __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(4, 1, __pyx_L1_error)
105938
105939 /* "(tree fragment)":3
105940 * def __reduce_cython__(self):
105941 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
105942 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
105943 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
105944 */
105945 __pyx_tuple__288 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(4, 3, __pyx_L1_error)
105946 __Pyx_GOTREF(__pyx_tuple__288);
105947 __Pyx_GIVEREF(__pyx_tuple__288);
105948 __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(4, 3, __pyx_L1_error)
105949
105950 /* "(tree fragment)":1
105951 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
105952 * cdef tuple state
105953 * cdef object _dict
105954 */
105955 __pyx_tuple__289 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(4, 1, __pyx_L1_error)
105956 __Pyx_GOTREF(__pyx_tuple__289);
105957 __Pyx_GIVEREF(__pyx_tuple__289);
105958 __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(4, 1, __pyx_L1_error)
105959
105960 /* "(tree fragment)":16
105961 * else:
105962 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, state)
105963 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
105964 * __pyx_unpickle_VariantHeaderRecords__set_state(self, __pyx_state)
105965 */
105966 __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(4, 16, __pyx_L1_error)
105967
105968 /* "pysam/libcbcf.pyx":1536
105969 * return makeVariantHeaderRecord(self.header, hrec)
105970 *
105971 * def remove_header(self): # <<<<<<<<<<<<<<
105972 * cdef bcf_hdr_t *hdr = self.header.ptr
105973 * cdef const char *key = hdr.id[BCF_DT_ID][self.id].key
105974 */
105975 __pyx_tuple__290 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_hdr, __pyx_n_s_key); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 1536, __pyx_L1_error)
105976 __Pyx_GOTREF(__pyx_tuple__290);
105977 __Pyx_GIVEREF(__pyx_tuple__290);
105978 __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_remove_header, 1536, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 1536, __pyx_L1_error)
105979
105980 /* "(tree fragment)":1
105981 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
105982 * cdef tuple state
105983 * cdef object _dict
105984 */
105985 __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(4, 1, __pyx_L1_error)
105986
105987 /* "(tree fragment)":16
105988 * else:
105989 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, state)
105990 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
105991 * __pyx_unpickle_VariantMetadata__set_state(self, __pyx_state)
105992 */
105993 __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(4, 16, __pyx_L1_error)
105994
105995 /* "pysam/libcbcf.pyx":1565
105996 * raise TypeError('this class cannot be instantiated from Python')
105997 *
105998 * def add(self, id, number, type, description, **kwargs): # <<<<<<<<<<<<<<
105999 * """Add a new filter, info or format record"""
106000 * if id in self:
106001 */
106002 __pyx_tuple__291 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_id, __pyx_n_s_number, __pyx_n_s_type, __pyx_n_s_description, __pyx_n_s_kwargs, __pyx_n_s_items); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 1565, __pyx_L1_error)
106003 __Pyx_GOTREF(__pyx_tuple__291);
106004 __Pyx_GIVEREF(__pyx_tuple__291);
106005 __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add, 1565, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 1565, __pyx_L1_error)
106006
106007 /* "pysam/libcbcf.pyx":1625
106008 * return makeVariantMetadata(self.header, self.type, kh_val_vdict(d, k).id)
106009 *
106010 * def remove_header(self, key): # <<<<<<<<<<<<<<
106011 * cdef bcf_hdr_t *hdr = self.header.ptr
106012 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
106013 */
106014 __pyx_tuple__292 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_hdr, __pyx_n_s_d, __pyx_n_s_bkey, __pyx_n_s_k); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 1625, __pyx_L1_error)
106015 __Pyx_GOTREF(__pyx_tuple__292);
106016 __Pyx_GIVEREF(__pyx_tuple__292);
106017 __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_remove_header, 1625, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 1625, __pyx_L1_error)
106018
106019 /* "pysam/libcbcf.pyx":1638
106020 * #bcf_hdr_sync(hdr)
106021 *
106022 * def clear_header(self): # <<<<<<<<<<<<<<
106023 * cdef bcf_hdr_t *hdr = self.header.ptr
106024 * bcf_hdr_remove(hdr, self.type, NULL)
106025 */
106026 __pyx_tuple__293 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hdr); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 1638, __pyx_L1_error)
106027 __Pyx_GOTREF(__pyx_tuple__293);
106028 __Pyx_GIVEREF(__pyx_tuple__293);
106029 __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_clear_header, 1638, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 1638, __pyx_L1_error)
106030
106031 /* "pysam/libcbcf.pyx":1653
106032 * yield bcf_str_cache_get_charptr(idpair.key)
106033 *
106034 * def get(self, key, default=None): # <<<<<<<<<<<<<<
106035 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
106036 * try:
106037 */
106038 __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 1653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 1653, __pyx_L1_error)
106039
106040 /* "pysam/libcbcf.pyx":1668
106041 * return True
106042 *
106043 * def iterkeys(self): # <<<<<<<<<<<<<<
106044 * """D.iterkeys() -> an iterator over the keys of D"""
106045 * return iter(self)
106046 */
106047 __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 1668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 1668, __pyx_L1_error)
106048
106049 /* "pysam/libcbcf.pyx":1672
106050 * return iter(self)
106051 *
106052 * def itervalues(self): # <<<<<<<<<<<<<<
106053 * """D.itervalues() -> an iterator over the values of D"""
106054 * for key in self:
106055 */
106056 __pyx_tuple__294 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 1672, __pyx_L1_error)
106057 __Pyx_GOTREF(__pyx_tuple__294);
106058 __Pyx_GIVEREF(__pyx_tuple__294);
106059 __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 1672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 1672, __pyx_L1_error)
106060
106061 /* "pysam/libcbcf.pyx":1677
106062 * yield self[key]
106063 *
106064 * def iteritems(self): # <<<<<<<<<<<<<<
106065 * """D.iteritems() -> an iterator over the (key, value) items of D"""
106066 * for key in self:
106067 */
106068 __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 1677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 1677, __pyx_L1_error)
106069
106070 /* "pysam/libcbcf.pyx":1682
106071 * yield (key, self[key])
106072 *
106073 * def keys(self): # <<<<<<<<<<<<<<
106074 * """D.keys() -> list of D's keys"""
106075 * return list(self)
106076 */
106077 __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 1682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1682, __pyx_L1_error)
106078
106079 /* "pysam/libcbcf.pyx":1686
106080 * return list(self)
106081 *
106082 * def items(self): # <<<<<<<<<<<<<<
106083 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
106084 * return list(self.iteritems())
106085 */
106086 __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 1686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1686, __pyx_L1_error)
106087
106088 /* "pysam/libcbcf.pyx":1690
106089 * return list(self.iteritems())
106090 *
106091 * def values(self): # <<<<<<<<<<<<<<
106092 * """D.values() -> list of D's values"""
106093 * return list(self.itervalues())
106094 */
106095 __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 1690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1690, __pyx_L1_error)
106096
106097 /* "(tree fragment)":1
106098 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106099 * cdef tuple state
106100 * cdef object _dict
106101 */
106102 __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(4, 1, __pyx_L1_error)
106103
106104 /* "(tree fragment)":16
106105 * else:
106106 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, state)
106107 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106108 * __pyx_unpickle_VariantHeaderMetadata__set_state(self, __pyx_state)
106109 */
106110 __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(4, 16, __pyx_L1_error)
106111
106112 /* "pysam/libcbcf.pyx":1741
106113 * return makeVariantHeaderRecord(self.header, hrec)
106114 *
106115 * def remove_header(self): # <<<<<<<<<<<<<<
106116 * cdef bcf_hdr_t *hdr = self.header.ptr
106117 * cdef const char *key = hdr.id[BCF_DT_CTG][self.id].key
106118 */
106119 __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_remove_header, 1741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 1741, __pyx_L1_error)
106120
106121 /* "(tree fragment)":1
106122 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106123 * cdef tuple state
106124 * cdef object _dict
106125 */
106126 __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(4, 1, __pyx_L1_error)
106127
106128 /* "(tree fragment)":16
106129 * else:
106130 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, state)
106131 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106132 * __pyx_unpickle_VariantContig__set_state(self, __pyx_state)
106133 */
106134 __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(4, 16, __pyx_L1_error)
106135
106136 /* "pysam/libcbcf.pyx":1797
106137 * return makeVariantContig(self.header, id)
106138 *
106139 * def remove_header(self, key): # <<<<<<<<<<<<<<
106140 * cdef bcf_hdr_t *hdr = self.header.ptr
106141 * cdef int index
106142 */
106143 __pyx_tuple__295 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_hdr, __pyx_n_s_index, __pyx_n_s_ckey, __pyx_n_s_d, __pyx_n_s_k); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 1797, __pyx_L1_error)
106144 __Pyx_GOTREF(__pyx_tuple__295);
106145 __Pyx_GIVEREF(__pyx_tuple__295);
106146 __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_remove_header, 1797, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1797, __pyx_L1_error)
106147
106148 /* "pysam/libcbcf.pyx":1818
106149 * bcf_hdr_remove(hdr, BCF_HL_CTG, ckey)
106150 *
106151 * def clear_header(self): # <<<<<<<<<<<<<<
106152 * cdef bcf_hdr_t *hdr = self.header.ptr
106153 * bcf_hdr_remove(hdr, BCF_HL_CTG, NULL)
106154 */
106155 __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_clear_header, 1818, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 1818, __pyx_L1_error)
106156
106157 /* "pysam/libcbcf.pyx":1833
106158 * yield bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, i))
106159 *
106160 * def get(self, key, default=None): # <<<<<<<<<<<<<<
106161 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
106162 * try:
106163 */
106164 __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 1833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1833, __pyx_L1_error)
106165
106166 /* "pysam/libcbcf.pyx":1848
106167 * return True
106168 *
106169 * def iterkeys(self): # <<<<<<<<<<<<<<
106170 * """D.iterkeys() -> an iterator over the keys of D"""
106171 * return iter(self)
106172 */
106173 __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 1848, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 1848, __pyx_L1_error)
106174
106175 /* "pysam/libcbcf.pyx":1852
106176 * return iter(self)
106177 *
106178 * def itervalues(self): # <<<<<<<<<<<<<<
106179 * """D.itervalues() -> an iterator over the values of D"""
106180 * for key in self:
106181 */
106182 __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 1852, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1852, __pyx_L1_error)
106183
106184 /* "pysam/libcbcf.pyx":1857
106185 * yield self[key]
106186 *
106187 * def iteritems(self): # <<<<<<<<<<<<<<
106188 * """D.iteritems() -> an iterator over the (key, value) items of D"""
106189 * for key in self:
106190 */
106191 __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 1857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1857, __pyx_L1_error)
106192
106193 /* "pysam/libcbcf.pyx":1862
106194 * yield (key, self[key])
106195 *
106196 * def keys(self): # <<<<<<<<<<<<<<
106197 * """D.keys() -> list of D's keys"""
106198 * return list(self)
106199 */
106200 __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 1862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1862, __pyx_L1_error)
106201
106202 /* "pysam/libcbcf.pyx":1866
106203 * return list(self)
106204 *
106205 * def items(self): # <<<<<<<<<<<<<<
106206 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
106207 * return list(self.iteritems())
106208 */
106209 __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 1866, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1866, __pyx_L1_error)
106210
106211 /* "pysam/libcbcf.pyx":1870
106212 * return list(self.iteritems())
106213 *
106214 * def values(self): # <<<<<<<<<<<<<<
106215 * """D.values() -> list of D's values"""
106216 * return list(self.itervalues())
106217 */
106218 __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 1870, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1870, __pyx_L1_error)
106219
106220 /* "pysam/libcbcf.pyx":1879
106221 * #TODO: implement __richcmp__
106222 *
106223 * def add(self, id, length=None, **kwargs): # <<<<<<<<<<<<<<
106224 * """Add a new contig record"""
106225 * if id in self:
106226 */
106227 __pyx_tuple__296 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_id, __pyx_n_s_length, __pyx_n_s_kwargs, __pyx_n_s_items); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 1879, __pyx_L1_error)
106228 __Pyx_GOTREF(__pyx_tuple__296);
106229 __Pyx_GIVEREF(__pyx_tuple__296);
106230 __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add, 1879, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1879, __pyx_L1_error)
106231
106232 /* "(tree fragment)":1
106233 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106234 * cdef tuple state
106235 * cdef object _dict
106236 */
106237 __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(4, 1, __pyx_L1_error)
106238
106239 /* "(tree fragment)":16
106240 * else:
106241 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, state)
106242 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106243 * __pyx_unpickle_VariantHeaderContigs__set_state(self, __pyx_state)
106244 */
106245 __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(4, 16, __pyx_L1_error)
106246
106247 /* "pysam/libcbcf.pyx":1942
106248 * #TODO: implement __richcmp__
106249 *
106250 * def add(self, name): # <<<<<<<<<<<<<<
106251 * """Add a new sample"""
106252 * self.header.add_sample(name)
106253 */
106254 __pyx_tuple__297 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 1942, __pyx_L1_error)
106255 __Pyx_GOTREF(__pyx_tuple__297);
106256 __Pyx_GIVEREF(__pyx_tuple__297);
106257 __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add, 1942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1942, __pyx_L1_error)
106258
106259 /* "(tree fragment)":1
106260 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106261 * cdef tuple state
106262 * cdef object _dict
106263 */
106264 __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(4, 1, __pyx_L1_error)
106265
106266 /* "(tree fragment)":16
106267 * else:
106268 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, state)
106269 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106270 * __pyx_unpickle_VariantHeaderSamples__set_state(self, __pyx_state)
106271 */
106272 __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(4, 16, __pyx_L1_error)
106273
106274 /* "pysam/libcbcf.pyx":1981
106275 * return self.ptr != NULL
106276 *
106277 * def copy(self): # <<<<<<<<<<<<<<
106278 * return makeVariantHeader(bcf_hdr_dup(self.ptr))
106279 *
106280 */
106281 __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_copy, 1981, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1981, __pyx_L1_error)
106282
106283 /* "pysam/libcbcf.pyx":1984
106284 * return makeVariantHeader(bcf_hdr_dup(self.ptr))
106285 *
106286 * def merge(self, VariantHeader header): # <<<<<<<<<<<<<<
106287 * if header is None:
106288 * raise ValueError('header must not be None')
106289 */
106290 __pyx_tuple__298 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_header); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 1984, __pyx_L1_error)
106291 __Pyx_GOTREF(__pyx_tuple__298);
106292 __Pyx_GIVEREF(__pyx_tuple__298);
106293 __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_merge, 1984, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1984, __pyx_L1_error)
106294
106295 /* "pysam/libcbcf.pyx":2076
106296 * return ret
106297 *
106298 * def new_record(self, contig=None, start=0, stop=0, alleles=None, # <<<<<<<<<<<<<<
106299 * id=None, qual=None, filter=None, info=None, samples=None,
106300 * **kwargs):
106301 */
106302 __pyx_tuple__299 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_contig, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_alleles, __pyx_n_s_id, __pyx_n_s_qual, __pyx_n_s_filter, __pyx_n_s_info, __pyx_n_s_samples, __pyx_n_s_kwargs, __pyx_n_s_rec, __pyx_n_s_f, __pyx_n_s_i, __pyx_n_s_sample); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 2076, __pyx_L1_error)
106303 __Pyx_GOTREF(__pyx_tuple__299);
106304 __Pyx_GIVEREF(__pyx_tuple__299);
106305 __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(10, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_new_record, 2076, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 2076, __pyx_L1_error)
106306 __pyx_tuple__300 = PyTuple_Pack(9, Py_None, __pyx_int_0, __pyx_int_0, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 2076, __pyx_L1_error)
106307 __Pyx_GOTREF(__pyx_tuple__300);
106308 __Pyx_GIVEREF(__pyx_tuple__300);
106309
106310 /* "pysam/libcbcf.pyx":2122
106311 * return rec
106312 *
106313 * def add_record(self, VariantHeaderRecord record): # <<<<<<<<<<<<<<
106314 * """Add an existing :class:`VariantHeaderRecord` to this header"""
106315 * if record is None:
106316 */
106317 __pyx_tuple__301 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_record, __pyx_n_s_hrec); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 2122, __pyx_L1_error)
106318 __Pyx_GOTREF(__pyx_tuple__301);
106319 __Pyx_GIVEREF(__pyx_tuple__301);
106320 __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add_record, 2122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 2122, __pyx_L1_error)
106321
106322 /* "pysam/libcbcf.pyx":2133
106323 * self._hdr_sync()
106324 *
106325 * def add_line(self, line): # <<<<<<<<<<<<<<
106326 * """Add a metadata line to this header"""
106327 * bline = force_bytes(line)
106328 */
106329 __pyx_tuple__302 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_bline); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 2133, __pyx_L1_error)
106330 __Pyx_GOTREF(__pyx_tuple__302);
106331 __Pyx_GIVEREF(__pyx_tuple__302);
106332 __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add_line, 2133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 2133, __pyx_L1_error)
106333
106334 /* "pysam/libcbcf.pyx":2142
106335 *
106336 *
106337 * def add_meta(self, key, value=None, items=None): # <<<<<<<<<<<<<<
106338 * """Add metadata to this header"""
106339 * if not ((value is not None) ^ (items is not None)):
106340 */
106341 __pyx_tuple__303 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_items, __pyx_n_s_hrec, __pyx_n_s_quoted); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 2142, __pyx_L1_error)
106342 __Pyx_GOTREF(__pyx_tuple__303);
106343 __Pyx_GIVEREF(__pyx_tuple__303);
106344 __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add_meta, 2142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 2142, __pyx_L1_error)
106345 __pyx_tuple__304 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 2142, __pyx_L1_error)
106346 __Pyx_GOTREF(__pyx_tuple__304);
106347 __Pyx_GIVEREF(__pyx_tuple__304);
106348
106349 /* "pysam/libcbcf.pyx":2184
106350 * raise MemoryError('unable to reallocate VariantHeader')
106351 *
106352 * def add_sample(self, name): # <<<<<<<<<<<<<<
106353 * """Add a new sample to this header"""
106354 * self._add_sample(name)
106355 */
106356 __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add_sample, 2184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 2184, __pyx_L1_error)
106357
106358 /* "pysam/libcbcf.pyx":2189
106359 * self._hdr_sync()
106360 *
106361 * def add_samples(self, *args): # <<<<<<<<<<<<<<
106362 * """Add several new samples to this header.
106363 * This function takes multiple arguments, each of which may
106364 */
106365 __pyx_tuple__305 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_arg, __pyx_n_s_name); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 2189, __pyx_L1_error)
106366 __Pyx_GOTREF(__pyx_tuple__305);
106367 __Pyx_GIVEREF(__pyx_tuple__305);
106368 __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add_samples, 2189, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 2189, __pyx_L1_error)
106369
106370 /* "(tree fragment)":1
106371 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106372 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
106373 * def __setstate_cython__(self, __pyx_state):
106374 */
106375 __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(4, 1, __pyx_L1_error)
106376
106377 /* "(tree fragment)":3
106378 * def __reduce_cython__(self):
106379 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
106380 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106381 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
106382 */
106383 __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(4, 3, __pyx_L1_error)
106384
106385 /* "pysam/libcbcf.pyx":2273
106386 * return makeVariantMetadata(self.record.header, BCF_HL_FLT, id)
106387 *
106388 * def add(self, key): # <<<<<<<<<<<<<<
106389 * """Add a new filter"""
106390 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106391 */
106392 __pyx_tuple__306 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_id, __pyx_n_s_bkey); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 2273, __pyx_L1_error)
106393 __Pyx_GOTREF(__pyx_tuple__306);
106394 __Pyx_GIVEREF(__pyx_tuple__306);
106395 __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_add, 2273, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 2273, __pyx_L1_error)
106396
106397 /* "pysam/libcbcf.pyx":2315
106398 * bcf_remove_filter(hdr, r, id, 0)
106399 *
106400 * def clear(self): # <<<<<<<<<<<<<<
106401 * """Clear all filters"""
106402 * cdef bcf1_t *r = self.record.ptr
106403 */
106404 __pyx_tuple__307 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_r); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 2315, __pyx_L1_error)
106405 __Pyx_GOTREF(__pyx_tuple__307);
106406 __Pyx_GIVEREF(__pyx_tuple__307);
106407 __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_clear, 2315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 2315, __pyx_L1_error)
106408
106409 /* "pysam/libcbcf.pyx":2329
106410 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, r.d.flt[i]))
106411 *
106412 * def get(self, key, default=None): # <<<<<<<<<<<<<<
106413 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
106414 * try:
106415 */
106416 __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 2329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 2329, __pyx_L1_error)
106417
106418 /* "pysam/libcbcf.pyx":2342
106419 * return bcf_has_filter(hdr, r, bkey) == 1
106420 *
106421 * def iterkeys(self): # <<<<<<<<<<<<<<
106422 * """D.iterkeys() -> an iterator over the keys of D"""
106423 * return iter(self)
106424 */
106425 __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 2342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 2342, __pyx_L1_error)
106426
106427 /* "pysam/libcbcf.pyx":2346
106428 * return iter(self)
106429 *
106430 * def itervalues(self): # <<<<<<<<<<<<<<
106431 * """D.itervalues() -> an iterator over the values of D"""
106432 * for key in self:
106433 */
106434 __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 2346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 2346, __pyx_L1_error)
106435
106436 /* "pysam/libcbcf.pyx":2351
106437 * yield self[key]
106438 *
106439 * def iteritems(self): # <<<<<<<<<<<<<<
106440 * """D.iteritems() -> an iterator over the (key, value) items of D"""
106441 * for key in self:
106442 */
106443 __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 2351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 2351, __pyx_L1_error)
106444
106445 /* "pysam/libcbcf.pyx":2356
106446 * yield (key, self[key])
106447 *
106448 * def keys(self): # <<<<<<<<<<<<<<
106449 * """D.keys() -> list of D's keys"""
106450 * return list(self)
106451 */
106452 __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 2356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 2356, __pyx_L1_error)
106453
106454 /* "pysam/libcbcf.pyx":2360
106455 * return list(self)
106456 *
106457 * def items(self): # <<<<<<<<<<<<<<
106458 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
106459 * return list(self.iteritems())
106460 */
106461 __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 2360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 2360, __pyx_L1_error)
106462
106463 /* "pysam/libcbcf.pyx":2364
106464 * return list(self.iteritems())
106465 *
106466 * def values(self): # <<<<<<<<<<<<<<
106467 * """D.values() -> list of D's values"""
106468 * return list(self.itervalues())
106469 */
106470 __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 2364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 2364, __pyx_L1_error)
106471
106472 /* "(tree fragment)":1
106473 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106474 * cdef tuple state
106475 * cdef object _dict
106476 */
106477 __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(4, 1, __pyx_L1_error)
106478
106479 /* "(tree fragment)":16
106480 * else:
106481 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, state)
106482 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106483 * __pyx_unpickle_VariantRecordFilter__set_state(self, __pyx_state)
106484 */
106485 __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(4, 16, __pyx_L1_error)
106486
106487 /* "pysam/libcbcf.pyx":2449
106488 * raise ValueError('Unable to delete FORMAT')
106489 *
106490 * def clear(self): # <<<<<<<<<<<<<<
106491 * """Clear all formats for all samples within the associated
106492 * :class:`VariantRecord` instance"""
106493 */
106494 __pyx_tuple__308 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_fmt, __pyx_n_s_key, __pyx_n_s_i); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 2449, __pyx_L1_error)
106495 __Pyx_GOTREF(__pyx_tuple__308);
106496 __Pyx_GIVEREF(__pyx_tuple__308);
106497 __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_clear, 2449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 2449, __pyx_L1_error)
106498
106499 /* "pysam/libcbcf.pyx":2476
106500 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
106501 *
106502 * def get(self, key, default=None): # <<<<<<<<<<<<<<
106503 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
106504 * try:
106505 */
106506 __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 2476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 2476, __pyx_L1_error)
106507
106508 /* "pysam/libcbcf.pyx":2490
106509 * return fmt != NULL and fmt.p != NULL
106510 *
106511 * def iterkeys(self): # <<<<<<<<<<<<<<
106512 * """D.iterkeys() -> an iterator over the keys of D"""
106513 * return iter(self)
106514 */
106515 __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 2490, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 2490, __pyx_L1_error)
106516
106517 /* "pysam/libcbcf.pyx":2494
106518 * return iter(self)
106519 *
106520 * def itervalues(self): # <<<<<<<<<<<<<<
106521 * """D.itervalues() -> an iterator over the values of D"""
106522 * for key in self:
106523 */
106524 __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 2494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 2494, __pyx_L1_error)
106525
106526 /* "pysam/libcbcf.pyx":2499
106527 * yield self[key]
106528 *
106529 * def iteritems(self): # <<<<<<<<<<<<<<
106530 * """D.iteritems() -> an iterator over the (key, value) items of D"""
106531 * for key in self:
106532 */
106533 __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 2499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 2499, __pyx_L1_error)
106534
106535 /* "pysam/libcbcf.pyx":2504
106536 * yield (key, self[key])
106537 *
106538 * def keys(self): # <<<<<<<<<<<<<<
106539 * """D.keys() -> list of D's keys"""
106540 * return list(self)
106541 */
106542 __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 2504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 2504, __pyx_L1_error)
106543
106544 /* "pysam/libcbcf.pyx":2508
106545 * return list(self)
106546 *
106547 * def items(self): # <<<<<<<<<<<<<<
106548 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
106549 * return list(self.iteritems())
106550 */
106551 __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 2508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 2508, __pyx_L1_error)
106552
106553 /* "pysam/libcbcf.pyx":2512
106554 * return list(self.iteritems())
106555 *
106556 * def values(self): # <<<<<<<<<<<<<<
106557 * """D.values() -> list of D's values"""
106558 * return list(self.itervalues())
106559 */
106560 __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 2512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 2512, __pyx_L1_error)
106561
106562 /* "(tree fragment)":1
106563 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106564 * cdef tuple state
106565 * cdef object _dict
106566 */
106567 __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(4, 1, __pyx_L1_error)
106568
106569 /* "(tree fragment)":16
106570 * else:
106571 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, state)
106572 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106573 * __pyx_unpickle_VariantRecordFormat__set_state(self, __pyx_state)
106574 */
106575 __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(4, 16, __pyx_L1_error)
106576
106577 /* "pysam/libcbcf.pyx":2651
106578 * raise ValueError('Unable to delete INFO')
106579 *
106580 * def clear(self): # <<<<<<<<<<<<<<
106581 * """Clear all info data"""
106582 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106583 */
106584 __pyx_tuple__309 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_info, __pyx_n_s_key, __pyx_n_s_i); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 2651, __pyx_L1_error)
106585 __Pyx_GOTREF(__pyx_tuple__309);
106586 __Pyx_GIVEREF(__pyx_tuple__309);
106587 __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_clear, 2651, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 2651, __pyx_L1_error)
106588
106589 /* "pysam/libcbcf.pyx":2688
106590 * yield bcf_str_cache_get_charptr(key)
106591 *
106592 * def get(self, key, default=None): # <<<<<<<<<<<<<<
106593 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
106594 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106595 */
106596 __pyx_tuple__310 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_bkey, __pyx_n_s_info, __pyx_n_s_info_id); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 2688, __pyx_L1_error)
106597 __Pyx_GOTREF(__pyx_tuple__310);
106598 __Pyx_GIVEREF(__pyx_tuple__310);
106599 __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 2688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 2688, __pyx_L1_error)
106600
106601 /* "pysam/libcbcf.pyx":2734
106602 * return info != NULL and info.vptr != NULL
106603 *
106604 * def iterkeys(self): # <<<<<<<<<<<<<<
106605 * """D.iterkeys() -> an iterator over the keys of D"""
106606 * return iter(self)
106607 */
106608 __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 2734, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 2734, __pyx_L1_error)
106609
106610 /* "pysam/libcbcf.pyx":2738
106611 * return iter(self)
106612 *
106613 * def itervalues(self): # <<<<<<<<<<<<<<
106614 * """D.itervalues() -> an iterator over the values of D"""
106615 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106616 */
106617 __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 2738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 2738, __pyx_L1_error)
106618
106619 /* "pysam/libcbcf.pyx":2756
106620 * yield bcf_info_get_value(self.record, info)
106621 *
106622 * def iteritems(self): # <<<<<<<<<<<<<<
106623 * """D.iteritems() -> an iterator over the (key, value) items of D"""
106624 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106625 */
106626 __pyx_tuple__311 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_info, __pyx_n_s_key, __pyx_n_s_i, __pyx_n_s_value); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 2756, __pyx_L1_error)
106627 __Pyx_GOTREF(__pyx_tuple__311);
106628 __Pyx_GIVEREF(__pyx_tuple__311);
106629 __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 2756, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 2756, __pyx_L1_error)
106630
106631 /* "pysam/libcbcf.pyx":2775
106632 * yield bcf_str_cache_get_charptr(key), value
106633 *
106634 * def keys(self): # <<<<<<<<<<<<<<
106635 * """D.keys() -> list of D's keys"""
106636 * return list(self)
106637 */
106638 __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 2775, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 2775, __pyx_L1_error)
106639
106640 /* "pysam/libcbcf.pyx":2779
106641 * return list(self)
106642 *
106643 * def items(self): # <<<<<<<<<<<<<<
106644 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
106645 * return list(self.iteritems())
106646 */
106647 __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 2779, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 2779, __pyx_L1_error)
106648
106649 /* "pysam/libcbcf.pyx":2783
106650 * return list(self.iteritems())
106651 *
106652 * def values(self): # <<<<<<<<<<<<<<
106653 * """D.values() -> list of D's values"""
106654 * return list(self.itervalues())
106655 */
106656 __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 2783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 2783, __pyx_L1_error)
106657
106658 /* "pysam/libcbcf.pyx":2787
106659 * return list(self.itervalues())
106660 *
106661 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
106662 * """D.update([E, ]**F) -> None.
106663 *
106664 */
106665 __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_update, 2787, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 2787, __pyx_L1_error)
106666
106667 /* "pysam/libcbcf.pyx":2801
106668 * self[k] = v
106669 *
106670 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
106671 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106672 * cdef bcf1_t *r = self.record.ptr
106673 */
106674 __pyx_tuple__312 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_bkey, __pyx_n_s_info, __pyx_n_s_info_id, __pyx_n_s_value); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 2801, __pyx_L1_error)
106675 __Pyx_GOTREF(__pyx_tuple__312);
106676 __Pyx_GIVEREF(__pyx_tuple__312);
106677 __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_pop, 2801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 2801, __pyx_L1_error)
106678
106679 /* "(tree fragment)":1
106680 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106681 * cdef tuple state
106682 * cdef object _dict
106683 */
106684 __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(4, 1, __pyx_L1_error)
106685
106686 /* "(tree fragment)":16
106687 * else:
106688 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, state)
106689 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106690 * __pyx_unpickle_VariantRecordInfo__set_state(self, __pyx_state)
106691 */
106692 __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(4, 16, __pyx_L1_error)
106693
106694 /* "pysam/libcbcf.pyx":2907
106695 * yield charptr_to_str(hdr.samples[i])
106696 *
106697 * def get(self, key, default=None): # <<<<<<<<<<<<<<
106698 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
106699 * try:
106700 */
106701 __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 2907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 2907, __pyx_L1_error)
106702
106703 /* "pysam/libcbcf.pyx":2932
106704 * return 0 <= sample_index < n
106705 *
106706 * def iterkeys(self): # <<<<<<<<<<<<<<
106707 * """D.iterkeys() -> an iterator over the keys of D"""
106708 * return iter(self)
106709 */
106710 __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 2932, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 2932, __pyx_L1_error)
106711
106712 /* "pysam/libcbcf.pyx":2936
106713 * return iter(self)
106714 *
106715 * def itervalues(self): # <<<<<<<<<<<<<<
106716 * """D.itervalues() -> an iterator over the values of D"""
106717 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106718 */
106719 __pyx_tuple__313 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_i, __pyx_n_s_n); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 2936, __pyx_L1_error)
106720 __Pyx_GOTREF(__pyx_tuple__313);
106721 __Pyx_GIVEREF(__pyx_tuple__313);
106722 __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 2936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 2936, __pyx_L1_error)
106723
106724 /* "pysam/libcbcf.pyx":2945
106725 * yield makeVariantRecordSample(self.record, i)
106726 *
106727 * def iteritems(self): # <<<<<<<<<<<<<<
106728 * """D.iteritems() -> an iterator over the (key, value) items of D"""
106729 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106730 */
106731 __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 2945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 2945, __pyx_L1_error)
106732
106733 /* "pysam/libcbcf.pyx":2954
106734 * yield (charptr_to_str(hdr.samples[i]), makeVariantRecordSample(self.record, i))
106735 *
106736 * def keys(self): # <<<<<<<<<<<<<<
106737 * """D.keys() -> list of D's keys"""
106738 * return list(self)
106739 */
106740 __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 2954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 2954, __pyx_L1_error)
106741
106742 /* "pysam/libcbcf.pyx":2958
106743 * return list(self)
106744 *
106745 * def items(self): # <<<<<<<<<<<<<<
106746 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
106747 * return list(self.iteritems())
106748 */
106749 __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 2958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 2958, __pyx_L1_error)
106750
106751 /* "pysam/libcbcf.pyx":2962
106752 * return list(self.iteritems())
106753 *
106754 * def values(self): # <<<<<<<<<<<<<<
106755 * """D.values() -> list of D's values"""
106756 * return list(self.itervalues())
106757 */
106758 __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 2962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 2962, __pyx_L1_error)
106759
106760 /* "pysam/libcbcf.pyx":2966
106761 * return list(self.itervalues())
106762 *
106763 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
106764 * """D.update([E, ]**F) -> None.
106765 *
106766 */
106767 __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_update, 2966, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2966, __pyx_L1_error)
106768
106769 /* "pysam/libcbcf.pyx":2978
106770 * self[k] = v
106771 *
106772 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
106773 * try:
106774 * value = self[key]
106775 */
106776 __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_pop, 2978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 2978, __pyx_L1_error)
106777
106778 /* "(tree fragment)":1
106779 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106780 * cdef tuple state
106781 * cdef object _dict
106782 */
106783 __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(4, 1, __pyx_L1_error)
106784
106785 /* "(tree fragment)":16
106786 * else:
106787 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, state)
106788 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106789 * __pyx_unpickle_VariantRecordSamples__set_state(self, __pyx_state)
106790 */
106791 __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(4, 16, __pyx_L1_error)
106792
106793 /* "pysam/libcbcf.pyx":3027
106794 * self.ptr = NULL
106795 *
106796 * def copy(self): # <<<<<<<<<<<<<<
106797 * """return a copy of this VariantRecord object"""
106798 * return makeVariantRecord(self.header, bcf_dup(self.ptr))
106799 */
106800 __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_copy, 3027, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 3027, __pyx_L1_error)
106801
106802 /* "pysam/libcbcf.pyx":3031
106803 * return makeVariantRecord(self.header, bcf_dup(self.ptr))
106804 *
106805 * def translate(self, VariantHeader dst_header): # <<<<<<<<<<<<<<
106806 * if dst_header is None:
106807 * raise ValueError('dst_header must not be None')
106808 */
106809 __pyx_tuple__314 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_dst_header, __pyx_n_s_src_hdr, __pyx_n_s_dst_hdr, __pyx_n_s_msg); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 3031, __pyx_L1_error)
106810 __Pyx_GOTREF(__pyx_tuple__314);
106811 __Pyx_GIVEREF(__pyx_tuple__314);
106812 __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_translate, 3031, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 3031, __pyx_L1_error)
106813
106814 /* "(tree fragment)":1
106815 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106816 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
106817 * def __setstate_cython__(self, __pyx_state):
106818 */
106819 __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(4, 1, __pyx_L1_error)
106820
106821 /* "(tree fragment)":3
106822 * def __reduce_cython__(self):
106823 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
106824 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106825 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
106826 */
106827 __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(4, 3, __pyx_L1_error)
106828
106829 /* "pysam/libcbcf.pyx":3545
106830 * bcf_format_del_value(self, key)
106831 *
106832 * def clear(self): # <<<<<<<<<<<<<<
106833 * """Clear all format data (including genotype) for this sample"""
106834 * cdef bcf_hdr_t *hdr = self.record.header.ptr
106835 */
106836 __pyx_tuple__315 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_hdr, __pyx_n_s_r, __pyx_n_s_fmt, __pyx_n_s_i); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 3545, __pyx_L1_error)
106837 __Pyx_GOTREF(__pyx_tuple__315);
106838 __Pyx_GIVEREF(__pyx_tuple__315);
106839 __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_clear, 3545, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 3545, __pyx_L1_error)
106840
106841 /* "pysam/libcbcf.pyx":3568
106842 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
106843 *
106844 * def get(self, key, default=None): # <<<<<<<<<<<<<<
106845 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
106846 * try:
106847 */
106848 __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 3568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 3568, __pyx_L1_error)
106849
106850 /* "pysam/libcbcf.pyx":3582
106851 * return fmt != NULL and fmt.p != NULL
106852 *
106853 * def iterkeys(self): # <<<<<<<<<<<<<<
106854 * """D.iterkeys() -> an iterator over the keys of D"""
106855 * return iter(self)
106856 */
106857 __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 3582, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 3582, __pyx_L1_error)
106858
106859 /* "pysam/libcbcf.pyx":3586
106860 * return iter(self)
106861 *
106862 * def itervalues(self): # <<<<<<<<<<<<<<
106863 * """D.itervalues() -> an iterator over the values of D"""
106864 * for key in self:
106865 */
106866 __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 3586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 3586, __pyx_L1_error)
106867
106868 /* "pysam/libcbcf.pyx":3591
106869 * yield self[key]
106870 *
106871 * def iteritems(self): # <<<<<<<<<<<<<<
106872 * """D.iteritems() -> an iterator over the (key, value) items of D"""
106873 * for key in self:
106874 */
106875 __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 3591, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 3591, __pyx_L1_error)
106876
106877 /* "pysam/libcbcf.pyx":3596
106878 * yield (key, self[key])
106879 *
106880 * def keys(self): # <<<<<<<<<<<<<<
106881 * """D.keys() -> list of D's keys"""
106882 * return list(self)
106883 */
106884 __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 3596, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 3596, __pyx_L1_error)
106885
106886 /* "pysam/libcbcf.pyx":3600
106887 * return list(self)
106888 *
106889 * def items(self): # <<<<<<<<<<<<<<
106890 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
106891 * return list(self.iteritems())
106892 */
106893 __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 3600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 3600, __pyx_L1_error)
106894
106895 /* "pysam/libcbcf.pyx":3604
106896 * return list(self.iteritems())
106897 *
106898 * def values(self): # <<<<<<<<<<<<<<
106899 * """D.values() -> list of D's values"""
106900 * return list(self.itervalues())
106901 */
106902 __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 3604, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 3604, __pyx_L1_error)
106903
106904 /* "pysam/libcbcf.pyx":3608
106905 * return list(self.itervalues())
106906 *
106907 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
106908 * """D.update([E, ]**F) -> None.
106909 *
106910 */
106911 __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_update, 3608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 3608, __pyx_L1_error)
106912
106913 /* "pysam/libcbcf.pyx":3620
106914 * self[k] = v
106915 *
106916 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
106917 * try:
106918 * value = self[key]
106919 */
106920 __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_pop, 3620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 3620, __pyx_L1_error)
106921
106922 /* "(tree fragment)":1
106923 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106924 * cdef tuple state
106925 * cdef object _dict
106926 */
106927 __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(4, 1, __pyx_L1_error)
106928
106929 /* "(tree fragment)":16
106930 * else:
106931 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, state)
106932 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106933 * __pyx_unpickle_VariantRecordSample__set_state(self, __pyx_state)
106934 */
106935 __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(4, 16, __pyx_L1_error)
106936
106937 /* "pysam/libcbcf.pyx":3682
106938 * return iter(self.refs)
106939 *
106940 * def get(self, key, default=None): # <<<<<<<<<<<<<<
106941 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
106942 * try:
106943 */
106944 __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get, 3682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 3682, __pyx_L1_error)
106945
106946 /* "pysam/libcbcf.pyx":3697
106947 * return True
106948 *
106949 * def iterkeys(self): # <<<<<<<<<<<<<<
106950 * """D.iterkeys() -> an iterator over the keys of D"""
106951 * return iter(self)
106952 */
106953 __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iterkeys, 3697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 3697, __pyx_L1_error)
106954
106955 /* "pysam/libcbcf.pyx":3701
106956 * return iter(self)
106957 *
106958 * def itervalues(self): # <<<<<<<<<<<<<<
106959 * """D.itervalues() -> an iterator over the values of D"""
106960 * for key in self:
106961 */
106962 __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_itervalues, 3701, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 3701, __pyx_L1_error)
106963
106964 /* "pysam/libcbcf.pyx":3706
106965 * yield self[key]
106966 *
106967 * def iteritems(self): # <<<<<<<<<<<<<<
106968 * """D.iteritems() -> an iterator over the (key, value) items of D"""
106969 * for key in self:
106970 */
106971 __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_iteritems, 3706, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 3706, __pyx_L1_error)
106972
106973 /* "pysam/libcbcf.pyx":3711
106974 * yield (key, self[key])
106975 *
106976 * def keys(self): # <<<<<<<<<<<<<<
106977 * """D.keys() -> list of D's keys"""
106978 * return list(self)
106979 */
106980 __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_keys, 3711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 3711, __pyx_L1_error)
106981
106982 /* "pysam/libcbcf.pyx":3715
106983 * return list(self)
106984 *
106985 * def items(self): # <<<<<<<<<<<<<<
106986 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
106987 * return list(self.iteritems())
106988 */
106989 __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_items, 3715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 3715, __pyx_L1_error)
106990
106991 /* "pysam/libcbcf.pyx":3719
106992 * return list(self.iteritems())
106993 *
106994 * def values(self): # <<<<<<<<<<<<<<
106995 * """D.values() -> list of D's values"""
106996 * return list(self.itervalues())
106997 */
106998 __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_values, 3719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 3719, __pyx_L1_error)
106999
107000 /* "pysam/libcbcf.pyx":3723
107001 * return list(self.itervalues())
107002 *
107003 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
107004 * """D.update([E, ]**F) -> None.
107005 *
107006 */
107007 __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_update, 3723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 3723, __pyx_L1_error)
107008
107009 /* "pysam/libcbcf.pyx":3735
107010 * self[k] = v
107011 *
107012 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
107013 * try:
107014 * value = self[key]
107015 */
107016 __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_pop, 3735, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 3735, __pyx_L1_error)
107017
107018 /* "(tree fragment)":1
107019 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
107020 * cdef tuple state
107021 * cdef object _dict
107022 */
107023 __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(4, 1, __pyx_L1_error)
107024
107025 /* "(tree fragment)":16
107026 * else:
107027 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, state)
107028 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
107029 * __pyx_unpickle_BaseIndex__set_state(self, __pyx_state)
107030 */
107031 __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(4, 16, __pyx_L1_error)
107032
107033 /* "pysam/libcbcf.pyx":3771
107034 * self.ptr = NULL
107035 *
107036 * def fetch(self, bcf, contig, start, stop, reopen): # <<<<<<<<<<<<<<
107037 * return BCFIterator(bcf, contig, start, stop, reopen)
107038 *
107039 */
107040 __pyx_tuple__316 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_bcf, __pyx_n_s_contig, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_reopen); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 3771, __pyx_L1_error)
107041 __Pyx_GOTREF(__pyx_tuple__316);
107042 __Pyx_GIVEREF(__pyx_tuple__316);
107043 __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_fetch, 3771, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 3771, __pyx_L1_error)
107044
107045 /* "(tree fragment)":1
107046 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
107047 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
107048 * def __setstate_cython__(self, __pyx_state):
107049 */
107050 __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(4, 1, __pyx_L1_error)
107051
107052 /* "(tree fragment)":3
107053 * def __reduce_cython__(self):
107054 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
107055 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
107056 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
107057 */
107058 __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(4, 3, __pyx_L1_error)
107059
107060 /* "pysam/libcbcf.pyx":3810
107061 * self.ptr = NULL
107062 *
107063 * def fetch(self, bcf, contig, start, stop, reopen): # <<<<<<<<<<<<<<
107064 * return TabixIterator(bcf, contig, start, stop, reopen)
107065 *
107066 */
107067 __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_fetch, 3810, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 3810, __pyx_L1_error)
107068
107069 /* "(tree fragment)":1
107070 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
107071 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
107072 * def __setstate_cython__(self, __pyx_state):
107073 */
107074 __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(4, 1, __pyx_L1_error)
107075
107076 /* "(tree fragment)":3
107077 * def __reduce_cython__(self):
107078 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
107079 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
107080 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
107081 */
107082 __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(4, 3, __pyx_L1_error)
107083
107084 /* "(tree fragment)":1
107085 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
107086 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
107087 * def __setstate_cython__(self, __pyx_state):
107088 */
107089 __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(4, 1, __pyx_L1_error)
107090
107091 /* "(tree fragment)":3
107092 * def __reduce_cython__(self):
107093 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
107094 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
107095 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
107096 */
107097 __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(4, 3, __pyx_L1_error)
107098
107099 /* "(tree fragment)":1
107100 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
107101 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
107102 * def __setstate_cython__(self, __pyx_state):
107103 */
107104 __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(4, 1, __pyx_L1_error)
107105
107106 /* "(tree fragment)":3
107107 * def __reduce_cython__(self):
107108 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
107109 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
107110 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
107111 */
107112 __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(4, 3, __pyx_L1_error)
107113
107114 /* "(tree fragment)":1
107115 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
107116 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
107117 * def __setstate_cython__(self, __pyx_state):
107118 */
107119 __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(4, 1, __pyx_L1_error)
107120
107121 /* "(tree fragment)":3
107122 * def __reduce_cython__(self):
107123 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
107124 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
107125 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
107126 */
107127 __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(4, 3, __pyx_L1_error)
107128
107129 /* "pysam/libcbcf.pyx":4135
107130 * raise IOError(errno, force_str(strerror(errno)))
107131 *
107132 * def close(self): # <<<<<<<<<<<<<<
107133 * """closes the :class:`pysam.VariantFile`."""
107134 * if not self.htsfile:
107135 */
107136 __pyx_tuple__317 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 4135, __pyx_L1_error)
107137 __Pyx_GOTREF(__pyx_tuple__317);
107138 __Pyx_GIVEREF(__pyx_tuple__317);
107139 __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_close, 4135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 4135, __pyx_L1_error)
107140
107141 /* "pysam/libcbcf.pyx":4197
107142 * return makeVariantRecord(self.header, record)
107143 *
107144 * def copy(self): # <<<<<<<<<<<<<<
107145 * if not self.is_open:
107146 * raise ValueError
107147 */
107148 __pyx_tuple__318 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_vars, __pyx_n_s_hdr); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 4197, __pyx_L1_error)
107149 __Pyx_GOTREF(__pyx_tuple__318);
107150 __Pyx_GIVEREF(__pyx_tuple__318);
107151 __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_copy, 4197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 4197, __pyx_L1_error)
107152
107153 /* "pysam/libcbcf.pyx":4235
107154 * return vars
107155 *
107156 * def open(self, filename, mode='r', # <<<<<<<<<<<<<<
107157 * index_filename=None,
107158 * VariantHeader header=None,
107159 */
107160 __pyx_tuple__319 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_mode, __pyx_n_s_index_filename, __pyx_n_s_header, __pyx_n_s_drop_samples, __pyx_n_s_duplicate_filehandle, __pyx_n_s_ignore_truncation, __pyx_n_s_threads, __pyx_n_s_hdr, __pyx_n_s_bgzfp, __pyx_n_s_idx, __pyx_n_s_tidx, __pyx_n_s_cfilename, __pyx_n_s_cindex_filename, __pyx_n_s_cmode, __pyx_n_s_format_modes, __pyx_n_s_invalid_modes, __pyx_n_s_m, __pyx_n_s_m); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 4235, __pyx_L1_error)
107161 __Pyx_GOTREF(__pyx_tuple__319);
107162 __Pyx_GIVEREF(__pyx_tuple__319);
107163 __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_open, 4235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 4235, __pyx_L1_error)
107164 __pyx_tuple__320 = PyTuple_Pack(7, __pyx_n_u_r, Py_None, Py_None, Py_False, Py_True, Py_False, __pyx_int_1); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 4235, __pyx_L1_error)
107165 __Pyx_GOTREF(__pyx_tuple__320);
107166 __Pyx_GIVEREF(__pyx_tuple__320);
107167
107168 /* "pysam/libcbcf.pyx":4380
107169 * raise ValueError('unknown mode {}'.format(mode))
107170 *
107171 * def reset(self): # <<<<<<<<<<<<<<
107172 * """reset file position to beginning of file just after the header."""
107173 * return self.seek(self.start_offset)
107174 */
107175 __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_reset, 4380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 4380, __pyx_L1_error)
107176
107177 /* "pysam/libcbcf.pyx":4384
107178 * return self.seek(self.start_offset)
107179 *
107180 * def is_valid_tid(self, tid): # <<<<<<<<<<<<<<
107181 * """
107182 * return True if the numerical :term:`tid` is valid; False otherwise.
107183 */
107184 __pyx_tuple__321 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tid, __pyx_n_s_hdr, __pyx_n_s_rid); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 4384, __pyx_L1_error)
107185 __Pyx_GOTREF(__pyx_tuple__321);
107186 __Pyx_GIVEREF(__pyx_tuple__321);
107187 __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_is_valid_tid, 4384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 4384, __pyx_L1_error)
107188
107189 /* "pysam/libcbcf.pyx":4397
107190 * return 0 <= rid < hdr.n[BCF_DT_CTG]
107191 *
107192 * def get_tid(self, reference): # <<<<<<<<<<<<<<
107193 * """
107194 * return the numerical :term:`tid` corresponding to
107195 */
107196 __pyx_tuple__322 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_reference, __pyx_n_s_d, __pyx_n_s_k); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 4397, __pyx_L1_error)
107197 __Pyx_GOTREF(__pyx_tuple__322);
107198 __Pyx_GIVEREF(__pyx_tuple__322);
107199 __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get_tid, 4397, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(0, 4397, __pyx_L1_error)
107200
107201 /* "pysam/libcbcf.pyx":4412
107202 * return kh_val_vdict(d, k).id if k != kh_end(d) else -1
107203 *
107204 * def get_reference_name(self, tid): # <<<<<<<<<<<<<<
107205 * """
107206 * return :term:`reference` name corresponding to numerical :term:`tid`
107207 */
107208 __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_get_reference_name, 4412, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 4412, __pyx_L1_error)
107209
107210 /* "pysam/libcbcf.pyx":4425
107211 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
107212 *
107213 * def fetch(self, contig=None, start=None, stop=None, region=None, reopen=False, end=None, reference=None): # <<<<<<<<<<<<<<
107214 * """fetch records in a :term:`region`, specified either by
107215 * :term:`contig`, *start*, and *end* (which are 0-based, half-open);
107216 */
107217 __pyx_tuple__324 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_contig, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_region, __pyx_n_s_reopen, __pyx_n_s_end, __pyx_n_s_reference, __pyx_n_s_bcf, __pyx_n_s__323, __pyx_n_s_tid); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 4425, __pyx_L1_error)
107218 __Pyx_GOTREF(__pyx_tuple__324);
107219 __Pyx_GIVEREF(__pyx_tuple__324);
107220 __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_fetch, 4425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 4425, __pyx_L1_error)
107221 __pyx_tuple__325 = PyTuple_Pack(7, Py_None, Py_None, Py_None, Py_None, Py_False, Py_None, Py_None); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 4425, __pyx_L1_error)
107222 __Pyx_GOTREF(__pyx_tuple__325);
107223 __Pyx_GIVEREF(__pyx_tuple__325);
107224
107225 /* "pysam/libcbcf.pyx":4471
107226 * return self.index.fetch(self, contig, start, stop, reopen)
107227 *
107228 * def new_record(self, *args, **kwargs): # <<<<<<<<<<<<<<
107229 * """Create a new empty :class:`VariantRecord`.
107230 *
107231 */
107232 __pyx_tuple__326 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 4471, __pyx_L1_error)
107233 __Pyx_GOTREF(__pyx_tuple__326);
107234 __Pyx_GIVEREF(__pyx_tuple__326);
107235 __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_new_record, 4471, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 4471, __pyx_L1_error)
107236
107237 /* "pysam/libcbcf.pyx":4478
107238 * return self.header.new_record(*args, **kwargs)
107239 *
107240 * cpdef int write(self, VariantRecord record) except -1: # <<<<<<<<<<<<<<
107241 * """
107242 * write a single :class:`pysam.VariantRecord` to disk.
107243 */
107244 __pyx_tuple__327 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_record); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 4478, __pyx_L1_error)
107245 __Pyx_GOTREF(__pyx_tuple__327);
107246 __Pyx_GIVEREF(__pyx_tuple__327);
107247 __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_write, 4478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 4478, __pyx_L1_error)
107248
107249 /* "pysam/libcbcf.pyx":4519
107250 * return ret
107251 *
107252 * def subset_samples(self, include_samples): # <<<<<<<<<<<<<<
107253 * """
107254 * Read only a subset of samples to reduce processing time and memory.
107255 */
107256 __pyx_tuple__328 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_include_samples); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 4519, __pyx_L1_error)
107257 __Pyx_GOTREF(__pyx_tuple__328);
107258 __Pyx_GIVEREF(__pyx_tuple__328);
107259 __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__328, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcbcf_pyx, __pyx_n_s_subset_samples, 4519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 4519, __pyx_L1_error)
107260
107261 /* "(tree fragment)":1
107262 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
107263 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
107264 * def __setstate_cython__(self, __pyx_state):
107265 */
107266 __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(4, 1, __pyx_L1_error)
107267
107268 /* "(tree fragment)":3
107269 * def __reduce_cython__(self):
107270 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
107271 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
107272 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
107273 */
107274 __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(4, 3, __pyx_L1_error)
107275
107276 /* "(tree fragment)":1
107277 * def __pyx_unpickle_VariantHeaderRecords(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
107278 * cdef object __pyx_PickleError
107279 * cdef object __pyx_result
107280 */
107281 __pyx_tuple__329 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(4, 1, __pyx_L1_error)
107282 __Pyx_GOTREF(__pyx_tuple__329);
107283 __Pyx_GIVEREF(__pyx_tuple__329);
107284 __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantHeaderReco, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(4, 1, __pyx_L1_error)
107285 __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantMetadata, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(4, 1, __pyx_L1_error)
107286 __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantHeaderMeta, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(4, 1, __pyx_L1_error)
107287 __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantContig, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(4, 1, __pyx_L1_error)
107288 __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantHeaderCont, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(4, 1, __pyx_L1_error)
107289 __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantHeaderSamp, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(4, 1, __pyx_L1_error)
107290 __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantRecordFilt, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(4, 1, __pyx_L1_error)
107291 __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantRecordForm, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(4, 1, __pyx_L1_error)
107292 __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantRecordInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(4, 1, __pyx_L1_error)
107293 __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantRecordSamp, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(4, 1, __pyx_L1_error)
107294 __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VariantRecordSamp_2, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(4, 1, __pyx_L1_error)
107295 __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseIndex, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(4, 1, __pyx_L1_error)
107296 __Pyx_RefNannyFinishContext();
107297 return 0;
107298 __pyx_L1_error:;
107299 __Pyx_RefNannyFinishContext();
107300 return -1;
107301 }
107302 /* #### Code section: init_constants ### */
107303
107304 static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
107305 __pyx_umethod_PyBytes_Type_split.type = (PyObject*)&PyBytes_Type;
107306 __pyx_umethod_PyBytes_Type_split.method_name = &__pyx_n_s_split;
107307 __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
107308 __pyx_umethod_PyDict_Type_items.method_name = &__pyx_n_s_items;
107309 __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
107310 __pyx_umethod_PyDict_Type_pop.method_name = &__pyx_n_s_pop;
107311 __pyx_umethod_PyUnicode_Type_format.type = (PyObject*)&PyUnicode_Type;
107312 __pyx_umethod_PyUnicode_Type_format.method_name = &__pyx_n_s_format;
107313 if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
107314 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
107315 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
107316 __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
107317 __pyx_int_10091417 = PyInt_FromLong(10091417L); if (unlikely(!__pyx_int_10091417)) __PYX_ERR(0, 1, __pyx_L1_error)
107318 __pyx_int_10698032 = PyInt_FromLong(10698032L); if (unlikely(!__pyx_int_10698032)) __PYX_ERR(0, 1, __pyx_L1_error)
107319 __pyx_int_31479882 = PyInt_FromLong(31479882L); if (unlikely(!__pyx_int_31479882)) __PYX_ERR(0, 1, __pyx_L1_error)
107320 __pyx_int_33440904 = PyInt_FromLong(33440904L); if (unlikely(!__pyx_int_33440904)) __PYX_ERR(0, 1, __pyx_L1_error)
107321 __pyx_int_39264352 = PyInt_FromLong(39264352L); if (unlikely(!__pyx_int_39264352)) __PYX_ERR(0, 1, __pyx_L1_error)
107322 __pyx_int_41264896 = PyInt_FromLong(41264896L); if (unlikely(!__pyx_int_41264896)) __PYX_ERR(0, 1, __pyx_L1_error)
107323 __pyx_int_93650198 = PyInt_FromLong(93650198L); if (unlikely(!__pyx_int_93650198)) __PYX_ERR(0, 1, __pyx_L1_error)
107324 __pyx_int_94171383 = PyInt_FromLong(94171383L); if (unlikely(!__pyx_int_94171383)) __PYX_ERR(0, 1, __pyx_L1_error)
107325 __pyx_int_97976187 = PyInt_FromLong(97976187L); if (unlikely(!__pyx_int_97976187)) __PYX_ERR(0, 1, __pyx_L1_error)
107326 __pyx_int_118286449 = PyInt_FromLong(118286449L); if (unlikely(!__pyx_int_118286449)) __PYX_ERR(0, 1, __pyx_L1_error)
107327 __pyx_int_126454353 = PyInt_FromLong(126454353L); if (unlikely(!__pyx_int_126454353)) __PYX_ERR(0, 1, __pyx_L1_error)
107328 __pyx_int_135711299 = PyInt_FromLong(135711299L); if (unlikely(!__pyx_int_135711299)) __PYX_ERR(0, 1, __pyx_L1_error)
107329 __pyx_int_145625440 = PyInt_FromLong(145625440L); if (unlikely(!__pyx_int_145625440)) __PYX_ERR(0, 1, __pyx_L1_error)
107330 __pyx_int_164668780 = PyInt_FromLong(164668780L); if (unlikely(!__pyx_int_164668780)) __PYX_ERR(0, 1, __pyx_L1_error)
107331 __pyx_int_168021462 = PyInt_FromLong(168021462L); if (unlikely(!__pyx_int_168021462)) __PYX_ERR(0, 1, __pyx_L1_error)
107332 __pyx_int_199651019 = PyInt_FromLong(199651019L); if (unlikely(!__pyx_int_199651019)) __PYX_ERR(0, 1, __pyx_L1_error)
107333 __pyx_int_215036767 = PyInt_FromLong(215036767L); if (unlikely(!__pyx_int_215036767)) __PYX_ERR(0, 1, __pyx_L1_error)
107334 __pyx_int_227765731 = PyInt_FromLong(227765731L); if (unlikely(!__pyx_int_227765731)) __PYX_ERR(0, 1, __pyx_L1_error)
107335 __pyx_int_232881935 = PyInt_FromLong(232881935L); if (unlikely(!__pyx_int_232881935)) __PYX_ERR(0, 1, __pyx_L1_error)
107336 __pyx_int_248899179 = PyInt_FromLong(248899179L); if (unlikely(!__pyx_int_248899179)) __PYX_ERR(0, 1, __pyx_L1_error)
107337 __pyx_int_250317299 = PyInt_FromLong(250317299L); if (unlikely(!__pyx_int_250317299)) __PYX_ERR(0, 1, __pyx_L1_error)
107338 __pyx_int_4294967294 = PyInt_FromString((char *)"4294967294", 0, 0); if (unlikely(!__pyx_int_4294967294)) __PYX_ERR(0, 1, __pyx_L1_error)
107339 __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
107340 return 0;
107341 __pyx_L1_error:;
107342 return -1;
107343 }
107344 /* #### Code section: init_globals ### */
107345
107346 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
107347 /* AssertionsEnabled.init */
107348 if (likely(__Pyx_init_assertions_enabled() == 0)); else
107349
107350 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
107351
107352 return 0;
107353 __pyx_L1_error:;
107354 return -1;
107355 }
107356 /* #### Code section: init_module ### */
107357
107358 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
107359 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
107360 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
107361 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
107362 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
107363 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
107364 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
107365
107366 static int __Pyx_modinit_global_init_code(void) {
107367 __Pyx_RefNannyDeclarations
107368 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
107369 /*--- Global init code ---*/
107370 __pyx_v_5pysam_7libcbcf_VALUE_TYPES = ((PyObject*)Py_None); Py_INCREF(Py_None);
107371 __pyx_v_5pysam_7libcbcf_METADATA_TYPES = ((PyObject*)Py_None); Py_INCREF(Py_None);
107372 __pyx_v_5pysam_7libcbcf_METADATA_LENGTHS = ((PyObject*)Py_None); Py_INCREF(Py_None);
107373 __pyx_v_5pysam_7libcbcf__nothing = Py_None; Py_INCREF(Py_None);
107374 __pyx_v_5pysam_7libcbcf_bcf_str_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
107375 __Pyx_RefNannyFinishContext();
107376 return 0;
107377 }
107378
107379 static int __Pyx_modinit_variable_export_code(void) {
107380 __Pyx_RefNannyDeclarations
107381 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
107382 /*--- Variable export code ---*/
107383 __Pyx_RefNannyFinishContext();
107384 return 0;
107385 }
107386
107387 static int __Pyx_modinit_function_export_code(void) {
107388 __Pyx_RefNannyDeclarations
107389 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
107390 /*--- Function export code ---*/
107391 __Pyx_RefNannyFinishContext();
107392 return 0;
107393 }
107394
107395 static int __Pyx_modinit_type_init_code(void) {
107396 __Pyx_RefNannyDeclarations
107397 PyObject *__pyx_t_1 = NULL;
107398 PyObject *__pyx_t_2 = NULL;
107399 int __pyx_lineno = 0;
107400 const char *__pyx_filename = NULL;
107401 int __pyx_clineno = 0;
107402 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
107403 /*--- Type init code ---*/
107404 __pyx_vtabptr_5pysam_7libcbcf_VariantHeader = &__pyx_vtable_5pysam_7libcbcf_VariantHeader;
107405 __pyx_vtable_5pysam_7libcbcf_VariantHeader._add_sample = (PyObject *(*)(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, PyObject *))__pyx_f_5pysam_7libcbcf_13VariantHeader__add_sample;
107406 __pyx_vtable_5pysam_7libcbcf_VariantHeader._hdr_sync = (PyObject *(*)(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *))__pyx_f_5pysam_7libcbcf_13VariantHeader__hdr_sync;
107407 __pyx_vtable_5pysam_7libcbcf_VariantHeader._subset_samples = (PyObject *(*)(struct __pyx_obj_5pysam_7libcbcf_VariantHeader *, PyObject *))__pyx_f_5pysam_7libcbcf_13VariantHeader__subset_samples;
107408 #if CYTHON_USE_TYPE_SPECS
107409 __pyx_ptype_5pysam_7libcbcf_VariantHeader = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantHeader_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantHeader)) __PYX_ERR(0, 1957, __pyx_L1_error)
107410 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantHeader_spec, __pyx_ptype_5pysam_7libcbcf_VariantHeader) < 0) __PYX_ERR(0, 1957, __pyx_L1_error)
107411 #else
107412 __pyx_ptype_5pysam_7libcbcf_VariantHeader = &__pyx_type_5pysam_7libcbcf_VariantHeader;
107413 #endif
107414 #if !CYTHON_COMPILING_IN_LIMITED_API
107415 #endif
107416 #if !CYTHON_USE_TYPE_SPECS
107417 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantHeader) < 0) __PYX_ERR(0, 1957, __pyx_L1_error)
107418 #endif
107419 #if PY_MAJOR_VERSION < 3
107420 __pyx_ptype_5pysam_7libcbcf_VariantHeader->tp_print = 0;
107421 #endif
107422 #if !CYTHON_COMPILING_IN_LIMITED_API
107423 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantHeader->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantHeader->tp_getattro == PyObject_GenericGetAttr)) {
107424 __pyx_ptype_5pysam_7libcbcf_VariantHeader->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107425 }
107426 #endif
107427 if (__Pyx_SetVtable(__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_vtabptr_5pysam_7libcbcf_VariantHeader) < 0) __PYX_ERR(0, 1957, __pyx_L1_error)
107428 #if !CYTHON_COMPILING_IN_LIMITED_API
107429 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_7libcbcf_VariantHeader) < 0) __PYX_ERR(0, 1957, __pyx_L1_error)
107430 #endif
107431 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantHeader, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeader) < 0) __PYX_ERR(0, 1957, __pyx_L1_error)
107432 #if !CYTHON_COMPILING_IN_LIMITED_API
107433 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeader) < 0) __PYX_ERR(0, 1957, __pyx_L1_error)
107434 #endif
107435 #if CYTHON_USE_TYPE_SPECS
107436 __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantHeaderRecord_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord)) __PYX_ERR(0, 1249, __pyx_L1_error)
107437 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantHeaderRecord_spec, __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord) < 0) __PYX_ERR(0, 1249, __pyx_L1_error)
107438 #else
107439 __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord = &__pyx_type_5pysam_7libcbcf_VariantHeaderRecord;
107440 #endif
107441 #if !CYTHON_COMPILING_IN_LIMITED_API
107442 #endif
107443 #if !CYTHON_USE_TYPE_SPECS
107444 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord) < 0) __PYX_ERR(0, 1249, __pyx_L1_error)
107445 #endif
107446 #if PY_MAJOR_VERSION < 3
107447 __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord->tp_print = 0;
107448 #endif
107449 #if !CYTHON_COMPILING_IN_LIMITED_API
107450 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord->tp_getattro == PyObject_GenericGetAttr)) {
107451 __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107452 }
107453 #endif
107454 #if CYTHON_UPDATE_DESCRIPTOR_DOC
107455 {
107456 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1249, __pyx_L1_error)
107457 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
107458 __pyx_wrapperbase_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
107459 __pyx_wrapperbase_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__.doc = __pyx_doc_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__;
107460 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_7libcbcf_19VariantHeaderRecord_6__getitem__;
107461 }
107462 }
107463 #endif
107464 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantHeaderRecord, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord) < 0) __PYX_ERR(0, 1249, __pyx_L1_error)
107465 #if !CYTHON_COMPILING_IN_LIMITED_API
107466 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord) < 0) __PYX_ERR(0, 1249, __pyx_L1_error)
107467 #endif
107468 #if CYTHON_USE_TYPE_SPECS
107469 __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantHeaderRecords_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords)) __PYX_ERR(0, 1436, __pyx_L1_error)
107470 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantHeaderRecords_spec, __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords) < 0) __PYX_ERR(0, 1436, __pyx_L1_error)
107471 #else
107472 __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords = &__pyx_type_5pysam_7libcbcf_VariantHeaderRecords;
107473 #endif
107474 #if !CYTHON_COMPILING_IN_LIMITED_API
107475 #endif
107476 #if !CYTHON_USE_TYPE_SPECS
107477 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords) < 0) __PYX_ERR(0, 1436, __pyx_L1_error)
107478 #endif
107479 #if PY_MAJOR_VERSION < 3
107480 __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords->tp_print = 0;
107481 #endif
107482 #if !CYTHON_COMPILING_IN_LIMITED_API
107483 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords->tp_getattro == PyObject_GenericGetAttr)) {
107484 __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107485 }
107486 #endif
107487 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantHeaderRecords, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords) < 0) __PYX_ERR(0, 1436, __pyx_L1_error)
107488 #if !CYTHON_COMPILING_IN_LIMITED_API
107489 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords) < 0) __PYX_ERR(0, 1436, __pyx_L1_error)
107490 #endif
107491 #if CYTHON_USE_TYPE_SPECS
107492 __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantHeaderContigs_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs)) __PYX_ERR(0, 1761, __pyx_L1_error)
107493 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantHeaderContigs_spec, __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs) < 0) __PYX_ERR(0, 1761, __pyx_L1_error)
107494 #else
107495 __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs = &__pyx_type_5pysam_7libcbcf_VariantHeaderContigs;
107496 #endif
107497 #if !CYTHON_COMPILING_IN_LIMITED_API
107498 #endif
107499 #if !CYTHON_USE_TYPE_SPECS
107500 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs) < 0) __PYX_ERR(0, 1761, __pyx_L1_error)
107501 #endif
107502 #if PY_MAJOR_VERSION < 3
107503 __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs->tp_print = 0;
107504 #endif
107505 #if !CYTHON_COMPILING_IN_LIMITED_API
107506 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs->tp_getattro == PyObject_GenericGetAttr)) {
107507 __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107508 }
107509 #endif
107510 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantHeaderContigs, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs) < 0) __PYX_ERR(0, 1761, __pyx_L1_error)
107511 #if !CYTHON_COMPILING_IN_LIMITED_API
107512 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs) < 0) __PYX_ERR(0, 1761, __pyx_L1_error)
107513 #endif
107514 #if CYTHON_USE_TYPE_SPECS
107515 __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantHeaderSamples_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples)) __PYX_ERR(0, 1901, __pyx_L1_error)
107516 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantHeaderSamples_spec, __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples) < 0) __PYX_ERR(0, 1901, __pyx_L1_error)
107517 #else
107518 __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples = &__pyx_type_5pysam_7libcbcf_VariantHeaderSamples;
107519 #endif
107520 #if !CYTHON_COMPILING_IN_LIMITED_API
107521 #endif
107522 #if !CYTHON_USE_TYPE_SPECS
107523 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples) < 0) __PYX_ERR(0, 1901, __pyx_L1_error)
107524 #endif
107525 #if PY_MAJOR_VERSION < 3
107526 __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples->tp_print = 0;
107527 #endif
107528 #if !CYTHON_COMPILING_IN_LIMITED_API
107529 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples->tp_getattro == PyObject_GenericGetAttr)) {
107530 __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107531 }
107532 #endif
107533 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantHeaderSamples, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples) < 0) __PYX_ERR(0, 1901, __pyx_L1_error)
107534 #if !CYTHON_COMPILING_IN_LIMITED_API
107535 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples) < 0) __PYX_ERR(0, 1901, __pyx_L1_error)
107536 #endif
107537 #if CYTHON_USE_TYPE_SPECS
107538 __pyx_ptype_5pysam_7libcbcf_VariantContig = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantContig_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantContig)) __PYX_ERR(0, 1711, __pyx_L1_error)
107539 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantContig_spec, __pyx_ptype_5pysam_7libcbcf_VariantContig) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
107540 #else
107541 __pyx_ptype_5pysam_7libcbcf_VariantContig = &__pyx_type_5pysam_7libcbcf_VariantContig;
107542 #endif
107543 #if !CYTHON_COMPILING_IN_LIMITED_API
107544 #endif
107545 #if !CYTHON_USE_TYPE_SPECS
107546 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantContig) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
107547 #endif
107548 #if PY_MAJOR_VERSION < 3
107549 __pyx_ptype_5pysam_7libcbcf_VariantContig->tp_print = 0;
107550 #endif
107551 #if !CYTHON_COMPILING_IN_LIMITED_API
107552 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantContig->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantContig->tp_getattro == PyObject_GenericGetAttr)) {
107553 __pyx_ptype_5pysam_7libcbcf_VariantContig->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107554 }
107555 #endif
107556 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantContig, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantContig) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
107557 #if !CYTHON_COMPILING_IN_LIMITED_API
107558 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantContig) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
107559 #endif
107560 #if CYTHON_USE_TYPE_SPECS
107561 __pyx_ptype_5pysam_7libcbcf_VariantMetadata = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantMetadata_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantMetadata)) __PYX_ERR(0, 1470, __pyx_L1_error)
107562 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantMetadata_spec, __pyx_ptype_5pysam_7libcbcf_VariantMetadata) < 0) __PYX_ERR(0, 1470, __pyx_L1_error)
107563 #else
107564 __pyx_ptype_5pysam_7libcbcf_VariantMetadata = &__pyx_type_5pysam_7libcbcf_VariantMetadata;
107565 #endif
107566 #if !CYTHON_COMPILING_IN_LIMITED_API
107567 #endif
107568 #if !CYTHON_USE_TYPE_SPECS
107569 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantMetadata) < 0) __PYX_ERR(0, 1470, __pyx_L1_error)
107570 #endif
107571 #if PY_MAJOR_VERSION < 3
107572 __pyx_ptype_5pysam_7libcbcf_VariantMetadata->tp_print = 0;
107573 #endif
107574 #if !CYTHON_COMPILING_IN_LIMITED_API
107575 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantMetadata->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantMetadata->tp_getattro == PyObject_GenericGetAttr)) {
107576 __pyx_ptype_5pysam_7libcbcf_VariantMetadata->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107577 }
107578 #endif
107579 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantMetadata, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantMetadata) < 0) __PYX_ERR(0, 1470, __pyx_L1_error)
107580 #if !CYTHON_COMPILING_IN_LIMITED_API
107581 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantMetadata) < 0) __PYX_ERR(0, 1470, __pyx_L1_error)
107582 #endif
107583 #if CYTHON_USE_TYPE_SPECS
107584 __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantHeaderMetadata_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata)) __PYX_ERR(0, 1560, __pyx_L1_error)
107585 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantHeaderMetadata_spec, __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
107586 #else
107587 __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata = &__pyx_type_5pysam_7libcbcf_VariantHeaderMetadata;
107588 #endif
107589 #if !CYTHON_COMPILING_IN_LIMITED_API
107590 #endif
107591 #if !CYTHON_USE_TYPE_SPECS
107592 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
107593 #endif
107594 #if PY_MAJOR_VERSION < 3
107595 __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata->tp_print = 0;
107596 #endif
107597 #if !CYTHON_COMPILING_IN_LIMITED_API
107598 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata->tp_getattro == PyObject_GenericGetAttr)) {
107599 __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107600 }
107601 #endif
107602 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantHeaderMetadata, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
107603 #if !CYTHON_COMPILING_IN_LIMITED_API
107604 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
107605 #endif
107606 #if CYTHON_USE_TYPE_SPECS
107607 __pyx_ptype_5pysam_7libcbcf_VariantRecord = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantRecord_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantRecord)) __PYX_ERR(0, 3017, __pyx_L1_error)
107608 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantRecord_spec, __pyx_ptype_5pysam_7libcbcf_VariantRecord) < 0) __PYX_ERR(0, 3017, __pyx_L1_error)
107609 #else
107610 __pyx_ptype_5pysam_7libcbcf_VariantRecord = &__pyx_type_5pysam_7libcbcf_VariantRecord;
107611 #endif
107612 #if !CYTHON_COMPILING_IN_LIMITED_API
107613 #endif
107614 #if !CYTHON_USE_TYPE_SPECS
107615 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantRecord) < 0) __PYX_ERR(0, 3017, __pyx_L1_error)
107616 #endif
107617 #if PY_MAJOR_VERSION < 3
107618 __pyx_ptype_5pysam_7libcbcf_VariantRecord->tp_print = 0;
107619 #endif
107620 #if !CYTHON_COMPILING_IN_LIMITED_API
107621 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantRecord->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantRecord->tp_getattro == PyObject_GenericGetAttr)) {
107622 __pyx_ptype_5pysam_7libcbcf_VariantRecord->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107623 }
107624 #endif
107625 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantRecord, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecord) < 0) __PYX_ERR(0, 3017, __pyx_L1_error)
107626 #if !CYTHON_COMPILING_IN_LIMITED_API
107627 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecord) < 0) __PYX_ERR(0, 3017, __pyx_L1_error)
107628 #endif
107629 #if CYTHON_USE_TYPE_SPECS
107630 __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantRecordFilter_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter)) __PYX_ERR(0, 2236, __pyx_L1_error)
107631 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantRecordFilter_spec, __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter) < 0) __PYX_ERR(0, 2236, __pyx_L1_error)
107632 #else
107633 __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter = &__pyx_type_5pysam_7libcbcf_VariantRecordFilter;
107634 #endif
107635 #if !CYTHON_COMPILING_IN_LIMITED_API
107636 #endif
107637 #if !CYTHON_USE_TYPE_SPECS
107638 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter) < 0) __PYX_ERR(0, 2236, __pyx_L1_error)
107639 #endif
107640 #if PY_MAJOR_VERSION < 3
107641 __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter->tp_print = 0;
107642 #endif
107643 #if !CYTHON_COMPILING_IN_LIMITED_API
107644 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter->tp_getattro == PyObject_GenericGetAttr)) {
107645 __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107646 }
107647 #endif
107648 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantRecordFilter, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter) < 0) __PYX_ERR(0, 2236, __pyx_L1_error)
107649 #if !CYTHON_COMPILING_IN_LIMITED_API
107650 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordFilter) < 0) __PYX_ERR(0, 2236, __pyx_L1_error)
107651 #endif
107652 #if CYTHON_USE_TYPE_SPECS
107653 __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantRecordFormat_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat)) __PYX_ERR(0, 2398, __pyx_L1_error)
107654 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantRecordFormat_spec, __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat) < 0) __PYX_ERR(0, 2398, __pyx_L1_error)
107655 #else
107656 __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat = &__pyx_type_5pysam_7libcbcf_VariantRecordFormat;
107657 #endif
107658 #if !CYTHON_COMPILING_IN_LIMITED_API
107659 #endif
107660 #if !CYTHON_USE_TYPE_SPECS
107661 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat) < 0) __PYX_ERR(0, 2398, __pyx_L1_error)
107662 #endif
107663 #if PY_MAJOR_VERSION < 3
107664 __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat->tp_print = 0;
107665 #endif
107666 #if !CYTHON_COMPILING_IN_LIMITED_API
107667 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat->tp_getattro == PyObject_GenericGetAttr)) {
107668 __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107669 }
107670 #endif
107671 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantRecordFormat, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat) < 0) __PYX_ERR(0, 2398, __pyx_L1_error)
107672 #if !CYTHON_COMPILING_IN_LIMITED_API
107673 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordFormat) < 0) __PYX_ERR(0, 2398, __pyx_L1_error)
107674 #endif
107675 #if CYTHON_USE_TYPE_SPECS
107676 __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantRecordInfo_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo)) __PYX_ERR(0, 2533, __pyx_L1_error)
107677 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantRecordInfo_spec, __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)
107678 #else
107679 __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo = &__pyx_type_5pysam_7libcbcf_VariantRecordInfo;
107680 #endif
107681 #if !CYTHON_COMPILING_IN_LIMITED_API
107682 #endif
107683 #if !CYTHON_USE_TYPE_SPECS
107684 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)
107685 #endif
107686 #if PY_MAJOR_VERSION < 3
107687 __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo->tp_print = 0;
107688 #endif
107689 #if !CYTHON_COMPILING_IN_LIMITED_API
107690 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo->tp_getattro == PyObject_GenericGetAttr)) {
107691 __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107692 }
107693 #endif
107694 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantRecordInfo, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)
107695 #if !CYTHON_COMPILING_IN_LIMITED_API
107696 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordInfo) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)
107697 #endif
107698 #if CYTHON_USE_TYPE_SPECS
107699 __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantRecordSamples_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples)) __PYX_ERR(0, 2867, __pyx_L1_error)
107700 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantRecordSamples_spec, __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples) < 0) __PYX_ERR(0, 2867, __pyx_L1_error)
107701 #else
107702 __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples = &__pyx_type_5pysam_7libcbcf_VariantRecordSamples;
107703 #endif
107704 #if !CYTHON_COMPILING_IN_LIMITED_API
107705 #endif
107706 #if !CYTHON_USE_TYPE_SPECS
107707 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples) < 0) __PYX_ERR(0, 2867, __pyx_L1_error)
107708 #endif
107709 #if PY_MAJOR_VERSION < 3
107710 __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples->tp_print = 0;
107711 #endif
107712 #if !CYTHON_COMPILING_IN_LIMITED_API
107713 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples->tp_getattro == PyObject_GenericGetAttr)) {
107714 __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107715 }
107716 #endif
107717 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantRecordSamples, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples) < 0) __PYX_ERR(0, 2867, __pyx_L1_error)
107718 #if !CYTHON_COMPILING_IN_LIMITED_API
107719 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordSamples) < 0) __PYX_ERR(0, 2867, __pyx_L1_error)
107720 #endif
107721 #if CYTHON_USE_TYPE_SPECS
107722 __pyx_ptype_5pysam_7libcbcf_VariantRecordSample = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantRecordSample_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordSample)) __PYX_ERR(0, 3439, __pyx_L1_error)
107723 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantRecordSample_spec, __pyx_ptype_5pysam_7libcbcf_VariantRecordSample) < 0) __PYX_ERR(0, 3439, __pyx_L1_error)
107724 #else
107725 __pyx_ptype_5pysam_7libcbcf_VariantRecordSample = &__pyx_type_5pysam_7libcbcf_VariantRecordSample;
107726 #endif
107727 #if !CYTHON_COMPILING_IN_LIMITED_API
107728 #endif
107729 #if !CYTHON_USE_TYPE_SPECS
107730 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample) < 0) __PYX_ERR(0, 3439, __pyx_L1_error)
107731 #endif
107732 #if PY_MAJOR_VERSION < 3
107733 __pyx_ptype_5pysam_7libcbcf_VariantRecordSample->tp_print = 0;
107734 #endif
107735 #if !CYTHON_COMPILING_IN_LIMITED_API
107736 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantRecordSample->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantRecordSample->tp_getattro == PyObject_GenericGetAttr)) {
107737 __pyx_ptype_5pysam_7libcbcf_VariantRecordSample->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107738 }
107739 #endif
107740 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantRecordSample, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordSample) < 0) __PYX_ERR(0, 3439, __pyx_L1_error)
107741 #if !CYTHON_COMPILING_IN_LIMITED_API
107742 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantRecordSample) < 0) __PYX_ERR(0, 3439, __pyx_L1_error)
107743 #endif
107744 #if CYTHON_USE_TYPE_SPECS
107745 __pyx_ptype_5pysam_7libcbcf_BaseIndex = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_BaseIndex_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_BaseIndex)) __PYX_ERR(0, 3662, __pyx_L1_error)
107746 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_BaseIndex_spec, __pyx_ptype_5pysam_7libcbcf_BaseIndex) < 0) __PYX_ERR(0, 3662, __pyx_L1_error)
107747 #else
107748 __pyx_ptype_5pysam_7libcbcf_BaseIndex = &__pyx_type_5pysam_7libcbcf_BaseIndex;
107749 #endif
107750 #if !CYTHON_COMPILING_IN_LIMITED_API
107751 #endif
107752 #if !CYTHON_USE_TYPE_SPECS
107753 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_BaseIndex) < 0) __PYX_ERR(0, 3662, __pyx_L1_error)
107754 #endif
107755 #if PY_MAJOR_VERSION < 3
107756 __pyx_ptype_5pysam_7libcbcf_BaseIndex->tp_print = 0;
107757 #endif
107758 #if !CYTHON_COMPILING_IN_LIMITED_API
107759 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_BaseIndex->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_BaseIndex->tp_getattro == PyObject_GenericGetAttr)) {
107760 __pyx_ptype_5pysam_7libcbcf_BaseIndex->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107761 }
107762 #endif
107763 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseIndex, (PyObject *) __pyx_ptype_5pysam_7libcbcf_BaseIndex) < 0) __PYX_ERR(0, 3662, __pyx_L1_error)
107764 #if !CYTHON_COMPILING_IN_LIMITED_API
107765 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_BaseIndex) < 0) __PYX_ERR(0, 3662, __pyx_L1_error)
107766 #endif
107767 #if CYTHON_USE_TYPE_SPECS
107768 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3751, __pyx_L1_error)
107769 __Pyx_GOTREF(__pyx_t_1);
107770 __pyx_ptype_5pysam_7libcbcf_BCFIndex = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_BCFIndex_spec, __pyx_t_1);
107771 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
107772 if (unlikely(!__pyx_ptype_5pysam_7libcbcf_BCFIndex)) __PYX_ERR(0, 3751, __pyx_L1_error)
107773 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_BCFIndex_spec, __pyx_ptype_5pysam_7libcbcf_BCFIndex) < 0) __PYX_ERR(0, 3751, __pyx_L1_error)
107774 #else
107775 __pyx_ptype_5pysam_7libcbcf_BCFIndex = &__pyx_type_5pysam_7libcbcf_BCFIndex;
107776 #endif
107777 #if !CYTHON_COMPILING_IN_LIMITED_API
107778 __pyx_ptype_5pysam_7libcbcf_BCFIndex->tp_base = __pyx_ptype_5pysam_7libcbcf_BaseIndex;
107779 #endif
107780 #if !CYTHON_USE_TYPE_SPECS
107781 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_BCFIndex) < 0) __PYX_ERR(0, 3751, __pyx_L1_error)
107782 #endif
107783 #if PY_MAJOR_VERSION < 3
107784 __pyx_ptype_5pysam_7libcbcf_BCFIndex->tp_print = 0;
107785 #endif
107786 #if !CYTHON_COMPILING_IN_LIMITED_API
107787 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_BCFIndex->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_BCFIndex->tp_getattro == PyObject_GenericGetAttr)) {
107788 __pyx_ptype_5pysam_7libcbcf_BCFIndex->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107789 }
107790 #endif
107791 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BCFIndex, (PyObject *) __pyx_ptype_5pysam_7libcbcf_BCFIndex) < 0) __PYX_ERR(0, 3751, __pyx_L1_error)
107792 #if !CYTHON_COMPILING_IN_LIMITED_API
107793 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_BCFIndex) < 0) __PYX_ERR(0, 3751, __pyx_L1_error)
107794 #endif
107795 #if CYTHON_USE_TYPE_SPECS
107796 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3790, __pyx_L1_error)
107797 __Pyx_GOTREF(__pyx_t_1);
107798 __pyx_ptype_5pysam_7libcbcf_TabixIndex = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_TabixIndex_spec, __pyx_t_1);
107799 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
107800 if (unlikely(!__pyx_ptype_5pysam_7libcbcf_TabixIndex)) __PYX_ERR(0, 3790, __pyx_L1_error)
107801 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_TabixIndex_spec, __pyx_ptype_5pysam_7libcbcf_TabixIndex) < 0) __PYX_ERR(0, 3790, __pyx_L1_error)
107802 #else
107803 __pyx_ptype_5pysam_7libcbcf_TabixIndex = &__pyx_type_5pysam_7libcbcf_TabixIndex;
107804 #endif
107805 #if !CYTHON_COMPILING_IN_LIMITED_API
107806 __pyx_ptype_5pysam_7libcbcf_TabixIndex->tp_base = __pyx_ptype_5pysam_7libcbcf_BaseIndex;
107807 #endif
107808 #if !CYTHON_USE_TYPE_SPECS
107809 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_TabixIndex) < 0) __PYX_ERR(0, 3790, __pyx_L1_error)
107810 #endif
107811 #if PY_MAJOR_VERSION < 3
107812 __pyx_ptype_5pysam_7libcbcf_TabixIndex->tp_print = 0;
107813 #endif
107814 #if !CYTHON_COMPILING_IN_LIMITED_API
107815 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_TabixIndex->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_TabixIndex->tp_getattro == PyObject_GenericGetAttr)) {
107816 __pyx_ptype_5pysam_7libcbcf_TabixIndex->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107817 }
107818 #endif
107819 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TabixIndex, (PyObject *) __pyx_ptype_5pysam_7libcbcf_TabixIndex) < 0) __PYX_ERR(0, 3790, __pyx_L1_error)
107820 #if !CYTHON_COMPILING_IN_LIMITED_API
107821 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_TabixIndex) < 0) __PYX_ERR(0, 3790, __pyx_L1_error)
107822 #endif
107823 #if CYTHON_USE_TYPE_SPECS
107824 __pyx_ptype_5pysam_7libcbcf_BaseIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_BaseIterator_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf_BaseIterator)) __PYX_ERR(0, 3831, __pyx_L1_error)
107825 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_BaseIterator_spec, __pyx_ptype_5pysam_7libcbcf_BaseIterator) < 0) __PYX_ERR(0, 3831, __pyx_L1_error)
107826 #else
107827 __pyx_ptype_5pysam_7libcbcf_BaseIterator = &__pyx_type_5pysam_7libcbcf_BaseIterator;
107828 #endif
107829 #if !CYTHON_COMPILING_IN_LIMITED_API
107830 #endif
107831 #if !CYTHON_USE_TYPE_SPECS
107832 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_BaseIterator) < 0) __PYX_ERR(0, 3831, __pyx_L1_error)
107833 #endif
107834 #if PY_MAJOR_VERSION < 3
107835 __pyx_ptype_5pysam_7libcbcf_BaseIterator->tp_print = 0;
107836 #endif
107837 #if !CYTHON_COMPILING_IN_LIMITED_API
107838 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_BaseIterator->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_BaseIterator->tp_getattro == PyObject_GenericGetAttr)) {
107839 __pyx_ptype_5pysam_7libcbcf_BaseIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107840 }
107841 #endif
107842 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseIterator, (PyObject *) __pyx_ptype_5pysam_7libcbcf_BaseIterator) < 0) __PYX_ERR(0, 3831, __pyx_L1_error)
107843 #if !CYTHON_COMPILING_IN_LIMITED_API
107844 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_BaseIterator) < 0) __PYX_ERR(0, 3831, __pyx_L1_error)
107845 #endif
107846 #if CYTHON_USE_TYPE_SPECS
107847 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIterator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3845, __pyx_L1_error)
107848 __Pyx_GOTREF(__pyx_t_1);
107849 __pyx_ptype_5pysam_7libcbcf_BCFIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_BCFIterator_spec, __pyx_t_1);
107850 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
107851 if (unlikely(!__pyx_ptype_5pysam_7libcbcf_BCFIterator)) __PYX_ERR(0, 3845, __pyx_L1_error)
107852 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_BCFIterator_spec, __pyx_ptype_5pysam_7libcbcf_BCFIterator) < 0) __PYX_ERR(0, 3845, __pyx_L1_error)
107853 #else
107854 __pyx_ptype_5pysam_7libcbcf_BCFIterator = &__pyx_type_5pysam_7libcbcf_BCFIterator;
107855 #endif
107856 #if !CYTHON_COMPILING_IN_LIMITED_API
107857 __pyx_ptype_5pysam_7libcbcf_BCFIterator->tp_base = __pyx_ptype_5pysam_7libcbcf_BaseIterator;
107858 #endif
107859 #if !CYTHON_USE_TYPE_SPECS
107860 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_BCFIterator) < 0) __PYX_ERR(0, 3845, __pyx_L1_error)
107861 #endif
107862 #if PY_MAJOR_VERSION < 3
107863 __pyx_ptype_5pysam_7libcbcf_BCFIterator->tp_print = 0;
107864 #endif
107865 #if !CYTHON_COMPILING_IN_LIMITED_API
107866 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_BCFIterator->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_BCFIterator->tp_getattro == PyObject_GenericGetAttr)) {
107867 __pyx_ptype_5pysam_7libcbcf_BCFIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107868 }
107869 #endif
107870 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BCFIterator, (PyObject *) __pyx_ptype_5pysam_7libcbcf_BCFIterator) < 0) __PYX_ERR(0, 3845, __pyx_L1_error)
107871 #if !CYTHON_COMPILING_IN_LIMITED_API
107872 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_BCFIterator) < 0) __PYX_ERR(0, 3845, __pyx_L1_error)
107873 #endif
107874 #if CYTHON_USE_TYPE_SPECS
107875 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIterator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3931, __pyx_L1_error)
107876 __Pyx_GOTREF(__pyx_t_1);
107877 __pyx_ptype_5pysam_7libcbcf_TabixIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_TabixIterator_spec, __pyx_t_1);
107878 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
107879 if (unlikely(!__pyx_ptype_5pysam_7libcbcf_TabixIterator)) __PYX_ERR(0, 3931, __pyx_L1_error)
107880 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_TabixIterator_spec, __pyx_ptype_5pysam_7libcbcf_TabixIterator) < 0) __PYX_ERR(0, 3931, __pyx_L1_error)
107881 #else
107882 __pyx_ptype_5pysam_7libcbcf_TabixIterator = &__pyx_type_5pysam_7libcbcf_TabixIterator;
107883 #endif
107884 #if !CYTHON_COMPILING_IN_LIMITED_API
107885 __pyx_ptype_5pysam_7libcbcf_TabixIterator->tp_base = __pyx_ptype_5pysam_7libcbcf_BaseIterator;
107886 #endif
107887 #if !CYTHON_USE_TYPE_SPECS
107888 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_TabixIterator) < 0) __PYX_ERR(0, 3931, __pyx_L1_error)
107889 #endif
107890 #if PY_MAJOR_VERSION < 3
107891 __pyx_ptype_5pysam_7libcbcf_TabixIterator->tp_print = 0;
107892 #endif
107893 #if !CYTHON_COMPILING_IN_LIMITED_API
107894 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_TabixIterator->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_TabixIterator->tp_getattro == PyObject_GenericGetAttr)) {
107895 __pyx_ptype_5pysam_7libcbcf_TabixIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107896 }
107897 #endif
107898 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TabixIterator, (PyObject *) __pyx_ptype_5pysam_7libcbcf_TabixIterator) < 0) __PYX_ERR(0, 3931, __pyx_L1_error)
107899 #if !CYTHON_COMPILING_IN_LIMITED_API
107900 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_TabixIterator) < 0) __PYX_ERR(0, 3931, __pyx_L1_error)
107901 #endif
107902 __pyx_t_1 = PyImport_ImportModule("pysam.libchtslib"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
107903 __Pyx_GOTREF(__pyx_t_1);
107904 __pyx_ptype_5pysam_10libchtslib_HTSFile = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libchtslib", "HTSFile", sizeof(struct __pyx_obj_5pysam_10libchtslib_HTSFile), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_10libchtslib_HTSFile),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_10libchtslib_HTSFile) __PYX_ERR(0, 1, __pyx_L1_error)
107905 __pyx_vtabptr_5pysam_10libchtslib_HTSFile = (struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile*)__Pyx_GetVtable(__pyx_ptype_5pysam_10libchtslib_HTSFile); if (unlikely(!__pyx_vtabptr_5pysam_10libchtslib_HTSFile)) __PYX_ERR(0, 1, __pyx_L1_error)
107906 __pyx_vtabptr_5pysam_7libcbcf_VariantFile = &__pyx_vtable_5pysam_7libcbcf_VariantFile;
107907 __pyx_vtable_5pysam_7libcbcf_VariantFile.__pyx_base = *__pyx_vtabptr_5pysam_10libchtslib_HTSFile;
107908 __pyx_vtable_5pysam_7libcbcf_VariantFile.write = (int (*)(struct __pyx_obj_5pysam_7libcbcf_VariantFile *, struct __pyx_obj_5pysam_7libcbcf_VariantRecord *, int __pyx_skip_dispatch))__pyx_f_5pysam_7libcbcf_11VariantFile_write;
107909 #if CYTHON_USE_TYPE_SPECS
107910 __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_10libchtslib_HTSFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4033, __pyx_L1_error)
107911 __Pyx_GOTREF(__pyx_t_2);
107912 __pyx_ptype_5pysam_7libcbcf_VariantFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf_VariantFile_spec, __pyx_t_2);
107913 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
107914 if (unlikely(!__pyx_ptype_5pysam_7libcbcf_VariantFile)) __PYX_ERR(0, 4033, __pyx_L1_error)
107915 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf_VariantFile_spec, __pyx_ptype_5pysam_7libcbcf_VariantFile) < 0) __PYX_ERR(0, 4033, __pyx_L1_error)
107916 #else
107917 __pyx_ptype_5pysam_7libcbcf_VariantFile = &__pyx_type_5pysam_7libcbcf_VariantFile;
107918 #endif
107919 #if !CYTHON_COMPILING_IN_LIMITED_API
107920 __pyx_ptype_5pysam_7libcbcf_VariantFile->tp_base = __pyx_ptype_5pysam_10libchtslib_HTSFile;
107921 #endif
107922 #if !CYTHON_USE_TYPE_SPECS
107923 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf_VariantFile) < 0) __PYX_ERR(0, 4033, __pyx_L1_error)
107924 #endif
107925 #if PY_MAJOR_VERSION < 3
107926 __pyx_ptype_5pysam_7libcbcf_VariantFile->tp_print = 0;
107927 #endif
107928 #if !CYTHON_COMPILING_IN_LIMITED_API
107929 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf_VariantFile->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf_VariantFile->tp_getattro == PyObject_GenericGetAttr)) {
107930 __pyx_ptype_5pysam_7libcbcf_VariantFile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
107931 }
107932 #endif
107933 if (__Pyx_SetVtable(__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_vtabptr_5pysam_7libcbcf_VariantFile) < 0) __PYX_ERR(0, 4033, __pyx_L1_error)
107934 #if !CYTHON_COMPILING_IN_LIMITED_API
107935 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_7libcbcf_VariantFile) < 0) __PYX_ERR(0, 4033, __pyx_L1_error)
107936 #endif
107937 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VariantFile, (PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantFile) < 0) __PYX_ERR(0, 4033, __pyx_L1_error)
107938 #if !CYTHON_COMPILING_IN_LIMITED_API
107939 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcbcf_VariantFile) < 0) __PYX_ERR(0, 4033, __pyx_L1_error)
107940 #endif
107941 #if CYTHON_USE_TYPE_SPECS
107942 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple)) __PYX_ERR(0, 267, __pyx_L1_error)
107943 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
107944 #else
107945 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple;
107946 #endif
107947 #if !CYTHON_COMPILING_IN_LIMITED_API
107948 #endif
107949 #if !CYTHON_USE_TYPE_SPECS
107950 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
107951 #endif
107952 #if PY_MAJOR_VERSION < 3
107953 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple->tp_print = 0;
107954 #endif
107955 #if !CYTHON_COMPILING_IN_LIMITED_API
107956 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple->tp_getattro == PyObject_GenericGetAttr)) {
107957 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct____pyx_f_5pysam_7libcbcf_char_array_to_tuple->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
107958 }
107959 #endif
107960 #if CYTHON_USE_TYPE_SPECS
107961 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 271, __pyx_L1_error)
107962 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
107963 #else
107964 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_1_genexpr;
107965 #endif
107966 #if !CYTHON_COMPILING_IN_LIMITED_API
107967 #endif
107968 #if !CYTHON_USE_TYPE_SPECS
107969 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
107970 #endif
107971 #if PY_MAJOR_VERSION < 3
107972 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr->tp_print = 0;
107973 #endif
107974 #if !CYTHON_COMPILING_IN_LIMITED_API
107975 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
107976 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_1_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
107977 }
107978 #endif
107979 #if CYTHON_USE_TYPE_SPECS
107980 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 302, __pyx_L1_error)
107981 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
107982 #else
107983 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_2_genexpr;
107984 #endif
107985 #if !CYTHON_COMPILING_IN_LIMITED_API
107986 #endif
107987 #if !CYTHON_USE_TYPE_SPECS
107988 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
107989 #endif
107990 #if PY_MAJOR_VERSION < 3
107991 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr->tp_print = 0;
107992 #endif
107993 #if !CYTHON_COMPILING_IN_LIMITED_API
107994 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
107995 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_2_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
107996 }
107997 #endif
107998 #if CYTHON_USE_TYPE_SPECS
107999 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 360, __pyx_L1_error)
108000 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
108001 #else
108002 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_3_genexpr;
108003 #endif
108004 #if !CYTHON_COMPILING_IN_LIMITED_API
108005 #endif
108006 #if !CYTHON_USE_TYPE_SPECS
108007 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
108008 #endif
108009 #if PY_MAJOR_VERSION < 3
108010 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr->tp_print = 0;
108011 #endif
108012 #if !CYTHON_COMPILING_IN_LIMITED_API
108013 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
108014 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_3_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108015 }
108016 #endif
108017 #if CYTHON_USE_TYPE_SPECS
108018 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 614, __pyx_L1_error)
108019 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
108020 #else
108021 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_4_genexpr;
108022 #endif
108023 #if !CYTHON_COMPILING_IN_LIMITED_API
108024 #endif
108025 #if !CYTHON_USE_TYPE_SPECS
108026 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
108027 #endif
108028 #if PY_MAJOR_VERSION < 3
108029 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr->tp_print = 0;
108030 #endif
108031 #if !CYTHON_COMPILING_IN_LIMITED_API
108032 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
108033 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_4_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108034 }
108035 #endif
108036 #if CYTHON_USE_TYPE_SPECS
108037 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__)) __PYX_ERR(0, 1274, __pyx_L1_error)
108038 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__) < 0) __PYX_ERR(0, 1274, __pyx_L1_error)
108039 #else
108040 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_5___get__;
108041 #endif
108042 #if !CYTHON_COMPILING_IN_LIMITED_API
108043 #endif
108044 #if !CYTHON_USE_TYPE_SPECS
108045 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__) < 0) __PYX_ERR(0, 1274, __pyx_L1_error)
108046 #endif
108047 #if PY_MAJOR_VERSION < 3
108048 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__->tp_print = 0;
108049 #endif
108050 #if !CYTHON_COMPILING_IN_LIMITED_API
108051 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__->tp_getattro == PyObject_GenericGetAttr)) {
108052 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_5___get__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108053 }
108054 #endif
108055 #if CYTHON_USE_TYPE_SPECS
108056 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr)) __PYX_ERR(0, 1281, __pyx_L1_error)
108057 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
108058 #else
108059 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_6_genexpr;
108060 #endif
108061 #if !CYTHON_COMPILING_IN_LIMITED_API
108062 #endif
108063 #if !CYTHON_USE_TYPE_SPECS
108064 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
108065 #endif
108066 #if PY_MAJOR_VERSION < 3
108067 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr->tp_print = 0;
108068 #endif
108069 #if !CYTHON_COMPILING_IN_LIMITED_API
108070 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
108071 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_6_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108072 }
108073 #endif
108074 #if CYTHON_USE_TYPE_SPECS
108075 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__)) __PYX_ERR(0, 1304, __pyx_L1_error)
108076 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__) < 0) __PYX_ERR(0, 1304, __pyx_L1_error)
108077 #else
108078 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_7___iter__;
108079 #endif
108080 #if !CYTHON_COMPILING_IN_LIMITED_API
108081 #endif
108082 #if !CYTHON_USE_TYPE_SPECS
108083 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__) < 0) __PYX_ERR(0, 1304, __pyx_L1_error)
108084 #endif
108085 #if PY_MAJOR_VERSION < 3
108086 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__->tp_print = 0;
108087 #endif
108088 #if !CYTHON_COMPILING_IN_LIMITED_API
108089 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108090 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_7___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108091 }
108092 #endif
108093 #if CYTHON_USE_TYPE_SPECS
108094 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues)) __PYX_ERR(0, 1332, __pyx_L1_error)
108095 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues) < 0) __PYX_ERR(0, 1332, __pyx_L1_error)
108096 #else
108097 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_8_itervalues;
108098 #endif
108099 #if !CYTHON_COMPILING_IN_LIMITED_API
108100 #endif
108101 #if !CYTHON_USE_TYPE_SPECS
108102 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues) < 0) __PYX_ERR(0, 1332, __pyx_L1_error)
108103 #endif
108104 #if PY_MAJOR_VERSION < 3
108105 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues->tp_print = 0;
108106 #endif
108107 #if !CYTHON_COMPILING_IN_LIMITED_API
108108 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108109 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_8_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108110 }
108111 #endif
108112 #if CYTHON_USE_TYPE_SPECS
108113 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems)) __PYX_ERR(0, 1342, __pyx_L1_error)
108114 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems) < 0) __PYX_ERR(0, 1342, __pyx_L1_error)
108115 #else
108116 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_9_iteritems;
108117 #endif
108118 #if !CYTHON_COMPILING_IN_LIMITED_API
108119 #endif
108120 #if !CYTHON_USE_TYPE_SPECS
108121 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems) < 0) __PYX_ERR(0, 1342, __pyx_L1_error)
108122 #endif
108123 #if PY_MAJOR_VERSION < 3
108124 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems->tp_print = 0;
108125 #endif
108126 #if !CYTHON_COMPILING_IN_LIMITED_API
108127 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108128 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_9_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108129 }
108130 #endif
108131 #if CYTHON_USE_TYPE_SPECS
108132 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__)) __PYX_ERR(0, 1453, __pyx_L1_error)
108133 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__) < 0) __PYX_ERR(0, 1453, __pyx_L1_error)
108134 #else
108135 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_10___iter__;
108136 #endif
108137 #if !CYTHON_COMPILING_IN_LIMITED_API
108138 #endif
108139 #if !CYTHON_USE_TYPE_SPECS
108140 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__) < 0) __PYX_ERR(0, 1453, __pyx_L1_error)
108141 #endif
108142 #if PY_MAJOR_VERSION < 3
108143 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__->tp_print = 0;
108144 #endif
108145 #if !CYTHON_COMPILING_IN_LIMITED_API
108146 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108147 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_10___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108148 }
108149 #endif
108150 #if CYTHON_USE_TYPE_SPECS
108151 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__)) __PYX_ERR(0, 1643, __pyx_L1_error)
108152 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__) < 0) __PYX_ERR(0, 1643, __pyx_L1_error)
108153 #else
108154 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_11___iter__;
108155 #endif
108156 #if !CYTHON_COMPILING_IN_LIMITED_API
108157 #endif
108158 #if !CYTHON_USE_TYPE_SPECS
108159 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__) < 0) __PYX_ERR(0, 1643, __pyx_L1_error)
108160 #endif
108161 #if PY_MAJOR_VERSION < 3
108162 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__->tp_print = 0;
108163 #endif
108164 #if !CYTHON_COMPILING_IN_LIMITED_API
108165 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108166 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_11___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108167 }
108168 #endif
108169 #if CYTHON_USE_TYPE_SPECS
108170 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues)) __PYX_ERR(0, 1672, __pyx_L1_error)
108171 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
108172 #else
108173 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_12_itervalues;
108174 #endif
108175 #if !CYTHON_COMPILING_IN_LIMITED_API
108176 #endif
108177 #if !CYTHON_USE_TYPE_SPECS
108178 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
108179 #endif
108180 #if PY_MAJOR_VERSION < 3
108181 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues->tp_print = 0;
108182 #endif
108183 #if !CYTHON_COMPILING_IN_LIMITED_API
108184 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108185 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_12_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108186 }
108187 #endif
108188 #if CYTHON_USE_TYPE_SPECS
108189 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems)) __PYX_ERR(0, 1677, __pyx_L1_error)
108190 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems) < 0) __PYX_ERR(0, 1677, __pyx_L1_error)
108191 #else
108192 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_13_iteritems;
108193 #endif
108194 #if !CYTHON_COMPILING_IN_LIMITED_API
108195 #endif
108196 #if !CYTHON_USE_TYPE_SPECS
108197 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems) < 0) __PYX_ERR(0, 1677, __pyx_L1_error)
108198 #endif
108199 #if PY_MAJOR_VERSION < 3
108200 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems->tp_print = 0;
108201 #endif
108202 #if !CYTHON_COMPILING_IN_LIMITED_API
108203 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108204 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_13_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108205 }
108206 #endif
108207 #if CYTHON_USE_TYPE_SPECS
108208 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__)) __PYX_ERR(0, 1823, __pyx_L1_error)
108209 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__) < 0) __PYX_ERR(0, 1823, __pyx_L1_error)
108210 #else
108211 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_14___iter__;
108212 #endif
108213 #if !CYTHON_COMPILING_IN_LIMITED_API
108214 #endif
108215 #if !CYTHON_USE_TYPE_SPECS
108216 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__) < 0) __PYX_ERR(0, 1823, __pyx_L1_error)
108217 #endif
108218 #if PY_MAJOR_VERSION < 3
108219 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__->tp_print = 0;
108220 #endif
108221 #if !CYTHON_COMPILING_IN_LIMITED_API
108222 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108223 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_14___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108224 }
108225 #endif
108226 #if CYTHON_USE_TYPE_SPECS
108227 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues)) __PYX_ERR(0, 1852, __pyx_L1_error)
108228 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
108229 #else
108230 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_15_itervalues;
108231 #endif
108232 #if !CYTHON_COMPILING_IN_LIMITED_API
108233 #endif
108234 #if !CYTHON_USE_TYPE_SPECS
108235 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
108236 #endif
108237 #if PY_MAJOR_VERSION < 3
108238 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues->tp_print = 0;
108239 #endif
108240 #if !CYTHON_COMPILING_IN_LIMITED_API
108241 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108242 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_15_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108243 }
108244 #endif
108245 #if CYTHON_USE_TYPE_SPECS
108246 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems)) __PYX_ERR(0, 1857, __pyx_L1_error)
108247 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
108248 #else
108249 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_16_iteritems;
108250 #endif
108251 #if !CYTHON_COMPILING_IN_LIMITED_API
108252 #endif
108253 #if !CYTHON_USE_TYPE_SPECS
108254 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
108255 #endif
108256 #if PY_MAJOR_VERSION < 3
108257 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems->tp_print = 0;
108258 #endif
108259 #if !CYTHON_COMPILING_IN_LIMITED_API
108260 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108261 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_16_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108262 }
108263 #endif
108264 #if CYTHON_USE_TYPE_SPECS
108265 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__)) __PYX_ERR(0, 1922, __pyx_L1_error)
108266 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__) < 0) __PYX_ERR(0, 1922, __pyx_L1_error)
108267 #else
108268 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_17___iter__;
108269 #endif
108270 #if !CYTHON_COMPILING_IN_LIMITED_API
108271 #endif
108272 #if !CYTHON_USE_TYPE_SPECS
108273 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__) < 0) __PYX_ERR(0, 1922, __pyx_L1_error)
108274 #endif
108275 #if PY_MAJOR_VERSION < 3
108276 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__->tp_print = 0;
108277 #endif
108278 #if !CYTHON_COMPILING_IN_LIMITED_API
108279 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108280 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_17___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108281 }
108282 #endif
108283 #if CYTHON_USE_TYPE_SPECS
108284 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__)) __PYX_ERR(0, 2321, __pyx_L1_error)
108285 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__) < 0) __PYX_ERR(0, 2321, __pyx_L1_error)
108286 #else
108287 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_18___iter__;
108288 #endif
108289 #if !CYTHON_COMPILING_IN_LIMITED_API
108290 #endif
108291 #if !CYTHON_USE_TYPE_SPECS
108292 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__) < 0) __PYX_ERR(0, 2321, __pyx_L1_error)
108293 #endif
108294 #if PY_MAJOR_VERSION < 3
108295 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__->tp_print = 0;
108296 #endif
108297 #if !CYTHON_COMPILING_IN_LIMITED_API
108298 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108299 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_18___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108300 }
108301 #endif
108302 #if CYTHON_USE_TYPE_SPECS
108303 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues)) __PYX_ERR(0, 2346, __pyx_L1_error)
108304 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues) < 0) __PYX_ERR(0, 2346, __pyx_L1_error)
108305 #else
108306 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_19_itervalues;
108307 #endif
108308 #if !CYTHON_COMPILING_IN_LIMITED_API
108309 #endif
108310 #if !CYTHON_USE_TYPE_SPECS
108311 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues) < 0) __PYX_ERR(0, 2346, __pyx_L1_error)
108312 #endif
108313 #if PY_MAJOR_VERSION < 3
108314 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues->tp_print = 0;
108315 #endif
108316 #if !CYTHON_COMPILING_IN_LIMITED_API
108317 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108318 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_19_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108319 }
108320 #endif
108321 #if CYTHON_USE_TYPE_SPECS
108322 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems)) __PYX_ERR(0, 2351, __pyx_L1_error)
108323 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems) < 0) __PYX_ERR(0, 2351, __pyx_L1_error)
108324 #else
108325 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_20_iteritems;
108326 #endif
108327 #if !CYTHON_COMPILING_IN_LIMITED_API
108328 #endif
108329 #if !CYTHON_USE_TYPE_SPECS
108330 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems) < 0) __PYX_ERR(0, 2351, __pyx_L1_error)
108331 #endif
108332 #if PY_MAJOR_VERSION < 3
108333 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems->tp_print = 0;
108334 #endif
108335 #if !CYTHON_COMPILING_IN_LIMITED_API
108336 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108337 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_20_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108338 }
108339 #endif
108340 #if CYTHON_USE_TYPE_SPECS
108341 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__)) __PYX_ERR(0, 2465, __pyx_L1_error)
108342 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__) < 0) __PYX_ERR(0, 2465, __pyx_L1_error)
108343 #else
108344 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_21___iter__;
108345 #endif
108346 #if !CYTHON_COMPILING_IN_LIMITED_API
108347 #endif
108348 #if !CYTHON_USE_TYPE_SPECS
108349 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__) < 0) __PYX_ERR(0, 2465, __pyx_L1_error)
108350 #endif
108351 #if PY_MAJOR_VERSION < 3
108352 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__->tp_print = 0;
108353 #endif
108354 #if !CYTHON_COMPILING_IN_LIMITED_API
108355 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108356 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_21___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108357 }
108358 #endif
108359 #if CYTHON_USE_TYPE_SPECS
108360 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues)) __PYX_ERR(0, 2494, __pyx_L1_error)
108361 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues) < 0) __PYX_ERR(0, 2494, __pyx_L1_error)
108362 #else
108363 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_22_itervalues;
108364 #endif
108365 #if !CYTHON_COMPILING_IN_LIMITED_API
108366 #endif
108367 #if !CYTHON_USE_TYPE_SPECS
108368 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues) < 0) __PYX_ERR(0, 2494, __pyx_L1_error)
108369 #endif
108370 #if PY_MAJOR_VERSION < 3
108371 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues->tp_print = 0;
108372 #endif
108373 #if !CYTHON_COMPILING_IN_LIMITED_API
108374 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108375 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_22_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108376 }
108377 #endif
108378 #if CYTHON_USE_TYPE_SPECS
108379 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems)) __PYX_ERR(0, 2499, __pyx_L1_error)
108380 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems) < 0) __PYX_ERR(0, 2499, __pyx_L1_error)
108381 #else
108382 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_23_iteritems;
108383 #endif
108384 #if !CYTHON_COMPILING_IN_LIMITED_API
108385 #endif
108386 #if !CYTHON_USE_TYPE_SPECS
108387 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems) < 0) __PYX_ERR(0, 2499, __pyx_L1_error)
108388 #endif
108389 #if PY_MAJOR_VERSION < 3
108390 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems->tp_print = 0;
108391 #endif
108392 #if !CYTHON_COMPILING_IN_LIMITED_API
108393 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108394 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_23_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108395 }
108396 #endif
108397 #if CYTHON_USE_TYPE_SPECS
108398 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__)) __PYX_ERR(0, 2671, __pyx_L1_error)
108399 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__) < 0) __PYX_ERR(0, 2671, __pyx_L1_error)
108400 #else
108401 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_24___iter__;
108402 #endif
108403 #if !CYTHON_COMPILING_IN_LIMITED_API
108404 #endif
108405 #if !CYTHON_USE_TYPE_SPECS
108406 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__) < 0) __PYX_ERR(0, 2671, __pyx_L1_error)
108407 #endif
108408 #if PY_MAJOR_VERSION < 3
108409 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__->tp_print = 0;
108410 #endif
108411 #if !CYTHON_COMPILING_IN_LIMITED_API
108412 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108413 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_24___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108414 }
108415 #endif
108416 #if CYTHON_USE_TYPE_SPECS
108417 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues)) __PYX_ERR(0, 2738, __pyx_L1_error)
108418 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues) < 0) __PYX_ERR(0, 2738, __pyx_L1_error)
108419 #else
108420 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_25_itervalues;
108421 #endif
108422 #if !CYTHON_COMPILING_IN_LIMITED_API
108423 #endif
108424 #if !CYTHON_USE_TYPE_SPECS
108425 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues) < 0) __PYX_ERR(0, 2738, __pyx_L1_error)
108426 #endif
108427 #if PY_MAJOR_VERSION < 3
108428 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues->tp_print = 0;
108429 #endif
108430 #if !CYTHON_COMPILING_IN_LIMITED_API
108431 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108432 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_25_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108433 }
108434 #endif
108435 #if CYTHON_USE_TYPE_SPECS
108436 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems)) __PYX_ERR(0, 2756, __pyx_L1_error)
108437 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems) < 0) __PYX_ERR(0, 2756, __pyx_L1_error)
108438 #else
108439 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_26_iteritems;
108440 #endif
108441 #if !CYTHON_COMPILING_IN_LIMITED_API
108442 #endif
108443 #if !CYTHON_USE_TYPE_SPECS
108444 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems) < 0) __PYX_ERR(0, 2756, __pyx_L1_error)
108445 #endif
108446 #if PY_MAJOR_VERSION < 3
108447 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems->tp_print = 0;
108448 #endif
108449 #if !CYTHON_COMPILING_IN_LIMITED_API
108450 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108451 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_26_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108452 }
108453 #endif
108454 #if CYTHON_USE_TYPE_SPECS
108455 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__)) __PYX_ERR(0, 2899, __pyx_L1_error)
108456 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__) < 0) __PYX_ERR(0, 2899, __pyx_L1_error)
108457 #else
108458 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_27___iter__;
108459 #endif
108460 #if !CYTHON_COMPILING_IN_LIMITED_API
108461 #endif
108462 #if !CYTHON_USE_TYPE_SPECS
108463 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__) < 0) __PYX_ERR(0, 2899, __pyx_L1_error)
108464 #endif
108465 #if PY_MAJOR_VERSION < 3
108466 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__->tp_print = 0;
108467 #endif
108468 #if !CYTHON_COMPILING_IN_LIMITED_API
108469 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108470 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_27___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108471 }
108472 #endif
108473 #if CYTHON_USE_TYPE_SPECS
108474 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues)) __PYX_ERR(0, 2936, __pyx_L1_error)
108475 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues) < 0) __PYX_ERR(0, 2936, __pyx_L1_error)
108476 #else
108477 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_28_itervalues;
108478 #endif
108479 #if !CYTHON_COMPILING_IN_LIMITED_API
108480 #endif
108481 #if !CYTHON_USE_TYPE_SPECS
108482 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues) < 0) __PYX_ERR(0, 2936, __pyx_L1_error)
108483 #endif
108484 #if PY_MAJOR_VERSION < 3
108485 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues->tp_print = 0;
108486 #endif
108487 #if !CYTHON_COMPILING_IN_LIMITED_API
108488 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108489 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_28_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108490 }
108491 #endif
108492 #if CYTHON_USE_TYPE_SPECS
108493 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems)) __PYX_ERR(0, 2945, __pyx_L1_error)
108494 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems) < 0) __PYX_ERR(0, 2945, __pyx_L1_error)
108495 #else
108496 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_29_iteritems;
108497 #endif
108498 #if !CYTHON_COMPILING_IN_LIMITED_API
108499 #endif
108500 #if !CYTHON_USE_TYPE_SPECS
108501 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems) < 0) __PYX_ERR(0, 2945, __pyx_L1_error)
108502 #endif
108503 #if PY_MAJOR_VERSION < 3
108504 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems->tp_print = 0;
108505 #endif
108506 #if !CYTHON_COMPILING_IN_LIMITED_API
108507 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108508 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_29_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108509 }
108510 #endif
108511 #if CYTHON_USE_TYPE_SPECS
108512 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__)) __PYX_ERR(0, 3477, __pyx_L1_error)
108513 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__) < 0) __PYX_ERR(0, 3477, __pyx_L1_error)
108514 #else
108515 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_30___set__;
108516 #endif
108517 #if !CYTHON_COMPILING_IN_LIMITED_API
108518 #endif
108519 #if !CYTHON_USE_TYPE_SPECS
108520 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__) < 0) __PYX_ERR(0, 3477, __pyx_L1_error)
108521 #endif
108522 #if PY_MAJOR_VERSION < 3
108523 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__->tp_print = 0;
108524 #endif
108525 #if !CYTHON_COMPILING_IN_LIMITED_API
108526 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__->tp_getattro == PyObject_GenericGetAttr)) {
108527 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_30___set__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108528 }
108529 #endif
108530 #if CYTHON_USE_TYPE_SPECS
108531 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr)) __PYX_ERR(0, 3487, __pyx_L1_error)
108532 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr) < 0) __PYX_ERR(0, 3487, __pyx_L1_error)
108533 #else
108534 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_31_genexpr;
108535 #endif
108536 #if !CYTHON_COMPILING_IN_LIMITED_API
108537 #endif
108538 #if !CYTHON_USE_TYPE_SPECS
108539 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr) < 0) __PYX_ERR(0, 3487, __pyx_L1_error)
108540 #endif
108541 #if PY_MAJOR_VERSION < 3
108542 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr->tp_print = 0;
108543 #endif
108544 #if !CYTHON_COMPILING_IN_LIMITED_API
108545 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
108546 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_31_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108547 }
108548 #endif
108549 #if CYTHON_USE_TYPE_SPECS
108550 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr)) __PYX_ERR(0, 3492, __pyx_L1_error)
108551 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr) < 0) __PYX_ERR(0, 3492, __pyx_L1_error)
108552 #else
108553 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_32_genexpr;
108554 #endif
108555 #if !CYTHON_COMPILING_IN_LIMITED_API
108556 #endif
108557 #if !CYTHON_USE_TYPE_SPECS
108558 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr) < 0) __PYX_ERR(0, 3492, __pyx_L1_error)
108559 #endif
108560 #if PY_MAJOR_VERSION < 3
108561 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr->tp_print = 0;
108562 #endif
108563 #if !CYTHON_COMPILING_IN_LIMITED_API
108564 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
108565 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_32_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108566 }
108567 #endif
108568 #if CYTHON_USE_TYPE_SPECS
108569 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter___spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__)) __PYX_ERR(0, 3557, __pyx_L1_error)
108570 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter___spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__) < 0) __PYX_ERR(0, 3557, __pyx_L1_error)
108571 #else
108572 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__ = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_33___iter__;
108573 #endif
108574 #if !CYTHON_COMPILING_IN_LIMITED_API
108575 #endif
108576 #if !CYTHON_USE_TYPE_SPECS
108577 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__) < 0) __PYX_ERR(0, 3557, __pyx_L1_error)
108578 #endif
108579 #if PY_MAJOR_VERSION < 3
108580 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__->tp_print = 0;
108581 #endif
108582 #if !CYTHON_COMPILING_IN_LIMITED_API
108583 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__->tp_getattro == PyObject_GenericGetAttr)) {
108584 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_33___iter__->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108585 }
108586 #endif
108587 #if CYTHON_USE_TYPE_SPECS
108588 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues)) __PYX_ERR(0, 3586, __pyx_L1_error)
108589 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues) < 0) __PYX_ERR(0, 3586, __pyx_L1_error)
108590 #else
108591 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_34_itervalues;
108592 #endif
108593 #if !CYTHON_COMPILING_IN_LIMITED_API
108594 #endif
108595 #if !CYTHON_USE_TYPE_SPECS
108596 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues) < 0) __PYX_ERR(0, 3586, __pyx_L1_error)
108597 #endif
108598 #if PY_MAJOR_VERSION < 3
108599 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues->tp_print = 0;
108600 #endif
108601 #if !CYTHON_COMPILING_IN_LIMITED_API
108602 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108603 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_34_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108604 }
108605 #endif
108606 #if CYTHON_USE_TYPE_SPECS
108607 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems)) __PYX_ERR(0, 3591, __pyx_L1_error)
108608 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems) < 0) __PYX_ERR(0, 3591, __pyx_L1_error)
108609 #else
108610 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_35_iteritems;
108611 #endif
108612 #if !CYTHON_COMPILING_IN_LIMITED_API
108613 #endif
108614 #if !CYTHON_USE_TYPE_SPECS
108615 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems) < 0) __PYX_ERR(0, 3591, __pyx_L1_error)
108616 #endif
108617 #if PY_MAJOR_VERSION < 3
108618 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems->tp_print = 0;
108619 #endif
108620 #if !CYTHON_COMPILING_IN_LIMITED_API
108621 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108622 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_35_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108623 }
108624 #endif
108625 #if CYTHON_USE_TYPE_SPECS
108626 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues)) __PYX_ERR(0, 3701, __pyx_L1_error)
108627 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues) < 0) __PYX_ERR(0, 3701, __pyx_L1_error)
108628 #else
108629 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_36_itervalues;
108630 #endif
108631 #if !CYTHON_COMPILING_IN_LIMITED_API
108632 #endif
108633 #if !CYTHON_USE_TYPE_SPECS
108634 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues) < 0) __PYX_ERR(0, 3701, __pyx_L1_error)
108635 #endif
108636 #if PY_MAJOR_VERSION < 3
108637 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues->tp_print = 0;
108638 #endif
108639 #if !CYTHON_COMPILING_IN_LIMITED_API
108640 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues->tp_getattro == PyObject_GenericGetAttr)) {
108641 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_36_itervalues->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108642 }
108643 #endif
108644 #if CYTHON_USE_TYPE_SPECS
108645 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems)) __PYX_ERR(0, 3706, __pyx_L1_error)
108646 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems_spec, __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems) < 0) __PYX_ERR(0, 3706, __pyx_L1_error)
108647 #else
108648 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems = &__pyx_type_5pysam_7libcbcf___pyx_scope_struct_37_iteritems;
108649 #endif
108650 #if !CYTHON_COMPILING_IN_LIMITED_API
108651 #endif
108652 #if !CYTHON_USE_TYPE_SPECS
108653 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems) < 0) __PYX_ERR(0, 3706, __pyx_L1_error)
108654 #endif
108655 #if PY_MAJOR_VERSION < 3
108656 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems->tp_print = 0;
108657 #endif
108658 #if !CYTHON_COMPILING_IN_LIMITED_API
108659 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems->tp_dictoffset && __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems->tp_getattro == PyObject_GenericGetAttr)) {
108660 __pyx_ptype_5pysam_7libcbcf___pyx_scope_struct_37_iteritems->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
108661 }
108662 #endif
108663 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
108664 __Pyx_RefNannyFinishContext();
108665 return 0;
108666 __pyx_L1_error:;
108667 __Pyx_XDECREF(__pyx_t_1);
108668 __Pyx_XDECREF(__pyx_t_2);
108669 __Pyx_RefNannyFinishContext();
108670 return -1;
108671 }
108672
108673 static int __Pyx_modinit_type_import_code(void) {
108674 __Pyx_RefNannyDeclarations
108675 PyObject *__pyx_t_1 = NULL;
108676 int __pyx_lineno = 0;
108677 const char *__pyx_filename = NULL;
108678 int __pyx_clineno = 0;
108679 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
108680 /*--- Type import code ---*/
108681 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9, __pyx_L1_error)
108682 __Pyx_GOTREF(__pyx_t_1);
108683 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
108684 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
108685 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
108686 #elif CYTHON_COMPILING_IN_LIMITED_API
108687 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
108688 #else
108689 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
108690 #endif
108691 __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error)
108692 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
108693 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 8, __pyx_L1_error)
108694 __Pyx_GOTREF(__pyx_t_1);
108695 __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(6, 8, __pyx_L1_error)
108696 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
108697 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error)
108698 __Pyx_GOTREF(__pyx_t_1);
108699 __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(7, 15, __pyx_L1_error)
108700 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
108701 __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 69, __pyx_L1_error)
108702 __Pyx_GOTREF(__pyx_t_1);
108703 __pyx_ptype_7cpython_5array_array = __Pyx_ImportType_3_0_11(__pyx_t_1, "array", "array", sizeof(arrayobject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(arrayobject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(2, 69, __pyx_L1_error)
108704 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
108705 __Pyx_RefNannyFinishContext();
108706 return 0;
108707 __pyx_L1_error:;
108708 __Pyx_XDECREF(__pyx_t_1);
108709 __Pyx_RefNannyFinishContext();
108710 return -1;
108711 }
108712
108713 static int __Pyx_modinit_variable_import_code(void) {
108714 __Pyx_RefNannyDeclarations
108715 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
108716 /*--- Variable import code ---*/
108717 __Pyx_RefNannyFinishContext();
108718 return 0;
108719 }
108720
108721 static int __Pyx_modinit_function_import_code(void) {
108722 __Pyx_RefNannyDeclarations
108723 PyObject *__pyx_t_1 = NULL;
108724 int __pyx_lineno = 0;
108725 const char *__pyx_filename = NULL;
108726 int __pyx_clineno = 0;
108727 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
108728 /*--- Function import code ---*/
108729 __pyx_t_1 = PyImport_ImportModule("pysam.libcutils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
108730 __Pyx_GOTREF(__pyx_t_1);
108731 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "charptr_to_str", (void (**)(void))&__pyx_f_5pysam_9libcutils_charptr_to_str, "PyObject *(char const *, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108732 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "charptr_to_str_w_len", (void (**)(void))&__pyx_f_5pysam_9libcutils_charptr_to_str_w_len, "PyObject *(char const *, size_t, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108733 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "force_str", (void (**)(void))&__pyx_f_5pysam_9libcutils_force_str, "PyObject *(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108734 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "force_bytes", (void (**)(void))&__pyx_f_5pysam_9libcutils_force_bytes, "PyObject *(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_bytes *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108735 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "decode_bytes", (void (**)(void))&__pyx_f_5pysam_9libcutils_decode_bytes, "PyObject *(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_decode_bytes *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108736 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "encode_filename", (void (**)(void))&__pyx_f_5pysam_9libcutils_encode_filename, "PyObject *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108737 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "from_string_and_size", (void (**)(void))&__pyx_f_5pysam_9libcutils_from_string_and_size, "PyObject *(char const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108738 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
108739 __Pyx_RefNannyFinishContext();
108740 return 0;
108741 __pyx_L1_error:;
108742 __Pyx_XDECREF(__pyx_t_1);
108743 __Pyx_RefNannyFinishContext();
108744 return -1;
108745 }
108746
108747
108748 #if PY_MAJOR_VERSION >= 3
108749 #if CYTHON_PEP489_MULTI_PHASE_INIT
108750 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
108751 static int __pyx_pymod_exec_libcbcf(PyObject* module); /*proto*/
108752 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
108753 {Py_mod_create, (void*)__pyx_pymod_create},
108754 {Py_mod_exec, (void*)__pyx_pymod_exec_libcbcf},
108755 {0, NULL}
108756 };
108757 #endif
108758
108759 #ifdef __cplusplus
108760 namespace {
108761 struct PyModuleDef __pyx_moduledef =
108762 #else
108763 static struct PyModuleDef __pyx_moduledef =
108764 #endif
108765 {
108766 PyModuleDef_HEAD_INIT,
108767 "libcbcf",
108768 0, /* m_doc */
108769 #if CYTHON_PEP489_MULTI_PHASE_INIT
108770 0, /* m_size */
108771 #elif CYTHON_USE_MODULE_STATE
108772 sizeof(__pyx_mstate), /* m_size */
108773 #else
108774 -1, /* m_size */
108775 #endif
108776 __pyx_methods /* m_methods */,
108777 #if CYTHON_PEP489_MULTI_PHASE_INIT
108778 __pyx_moduledef_slots, /* m_slots */
108779 #else
108780 NULL, /* m_reload */
108781 #endif
108782 #if CYTHON_USE_MODULE_STATE
108783 __pyx_m_traverse, /* m_traverse */
108784 __pyx_m_clear, /* m_clear */
108785 NULL /* m_free */
108786 #else
108787 NULL, /* m_traverse */
108788 NULL, /* m_clear */
108789 NULL /* m_free */
108790 #endif
108791 };
108792 #ifdef __cplusplus
108793 } /* anonymous namespace */
108794 #endif
108795 #endif
108796
108797 #ifndef CYTHON_NO_PYINIT_EXPORT
108798 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
108799 #elif PY_MAJOR_VERSION < 3
108800 #ifdef __cplusplus
108801 #define __Pyx_PyMODINIT_FUNC extern "C" void
108802 #else
108803 #define __Pyx_PyMODINIT_FUNC void
108804 #endif
108805 #else
108806 #ifdef __cplusplus
108807 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
108808 #else
108809 #define __Pyx_PyMODINIT_FUNC PyObject *
108810 #endif
108811 #endif
108812
108813
108814 #if PY_MAJOR_VERSION < 3
108815 __Pyx_PyMODINIT_FUNC initlibcbcf(void) CYTHON_SMALL_CODE; /*proto*/
108816 __Pyx_PyMODINIT_FUNC initlibcbcf(void)
108817 #else
108818 __Pyx_PyMODINIT_FUNC PyInit_libcbcf(void) CYTHON_SMALL_CODE; /*proto*/
108819 __Pyx_PyMODINIT_FUNC PyInit_libcbcf(void)
108820 #if CYTHON_PEP489_MULTI_PHASE_INIT
108821 {
108822 return PyModuleDef_Init(&__pyx_moduledef);
108823 }
108824 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
108825 #if PY_VERSION_HEX >= 0x030700A1
108826 static PY_INT64_T main_interpreter_id = -1;
108827 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
108828 if (main_interpreter_id == -1) {
108829 main_interpreter_id = current_id;
108830 return (unlikely(current_id == -1)) ? -1 : 0;
108831 } else if (unlikely(main_interpreter_id != current_id))
108832 #else
108833 static PyInterpreterState *main_interpreter = NULL;
108834 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
108835 if (!main_interpreter) {
108836 main_interpreter = current_interpreter;
108837 } else if (unlikely(main_interpreter != current_interpreter))
108838 #endif
108839 {
108840 PyErr_SetString(
108841 PyExc_ImportError,
108842 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
108843 return -1;
108844 }
108845 return 0;
108846 }
108847 #if CYTHON_COMPILING_IN_LIMITED_API
108848 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
108849 #else
108850 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
108851 #endif
108852 {
108853 PyObject *value = PyObject_GetAttrString(spec, from_name);
108854 int result = 0;
108855 if (likely(value)) {
108856 if (allow_none || value != Py_None) {
108857 #if CYTHON_COMPILING_IN_LIMITED_API
108858 result = PyModule_AddObject(module, to_name, value);
108859 #else
108860 result = PyDict_SetItemString(moddict, to_name, value);
108861 #endif
108862 }
108863 Py_DECREF(value);
108864 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
108865 PyErr_Clear();
108866 } else {
108867 result = -1;
108868 }
108869 return result;
108870 }
108871 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
108872 PyObject *module = NULL, *moddict, *modname;
108873 CYTHON_UNUSED_VAR(def);
108874 if (__Pyx_check_single_interpreter())
108875 return NULL;
108876 if (__pyx_m)
108877 return __Pyx_NewRef(__pyx_m);
108878 modname = PyObject_GetAttrString(spec, "name");
108879 if (unlikely(!modname)) goto bad;
108880 module = PyModule_NewObject(modname);
108881 Py_DECREF(modname);
108882 if (unlikely(!module)) goto bad;
108883 #if CYTHON_COMPILING_IN_LIMITED_API
108884 moddict = module;
108885 #else
108886 moddict = PyModule_GetDict(module);
108887 if (unlikely(!moddict)) goto bad;
108888 #endif
108889 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
108890 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
108891 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
108892 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
108893 return module;
108894 bad:
108895 Py_XDECREF(module);
108896 return NULL;
108897 }
108898
108899
108900 static CYTHON_SMALL_CODE int __pyx_pymod_exec_libcbcf(PyObject *__pyx_pyinit_module)
108901 #endif
108902 #endif
108903 {
108904 int stringtab_initialized = 0;
108905 #if CYTHON_USE_MODULE_STATE
108906 int pystate_addmodule_run = 0;
108907 #endif
108908 __Pyx_TraceDeclarations
108909 PyObject *__pyx_t_1 = NULL;
108910 PyObject *__pyx_t_2 = NULL;
108911 PyObject *__pyx_t_3 = NULL;
108912 int __pyx_lineno = 0;
108913 const char *__pyx_filename = NULL;
108914 int __pyx_clineno = 0;
108915 __Pyx_RefNannyDeclarations
108916 #if CYTHON_PEP489_MULTI_PHASE_INIT
108917 if (__pyx_m) {
108918 if (__pyx_m == __pyx_pyinit_module) return 0;
108919 PyErr_SetString(PyExc_RuntimeError, "Module 'libcbcf' has already been imported. Re-initialisation is not supported.");
108920 return -1;
108921 }
108922 #elif PY_MAJOR_VERSION >= 3
108923 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
108924 #endif
108925 /*--- Module creation code ---*/
108926 #if CYTHON_PEP489_MULTI_PHASE_INIT
108927 __pyx_m = __pyx_pyinit_module;
108928 Py_INCREF(__pyx_m);
108929 #else
108930 #if PY_MAJOR_VERSION < 3
108931 __pyx_m = Py_InitModule4("libcbcf", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
108932 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
108933 #elif CYTHON_USE_MODULE_STATE
108934 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
108935 {
108936 int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
108937 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "libcbcf" pseudovariable */
108938 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
108939 pystate_addmodule_run = 1;
108940 }
108941 #else
108942 __pyx_m = PyModule_Create(&__pyx_moduledef);
108943 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
108944 #endif
108945 #endif
108946 CYTHON_UNUSED_VAR(__pyx_t_1);
108947 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
108948 Py_INCREF(__pyx_d);
108949 __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
108950 __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
108951 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108952 #if CYTHON_REFNANNY
108953 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
108954 if (!__Pyx_RefNanny) {
108955 PyErr_Clear();
108956 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
108957 if (!__Pyx_RefNanny)
108958 Py_FatalError("failed to import 'refnanny' module");
108959 }
108960 #endif
108961 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_libcbcf(void)", 0);
108962 if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108963 #ifdef __Pxy_PyFrame_Initialize_Offsets
108964 __Pxy_PyFrame_Initialize_Offsets();
108965 #endif
108966 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
108967 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
108968 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
108969 #ifdef __Pyx_CyFunction_USED
108970 if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108971 #endif
108972 #ifdef __Pyx_FusedFunction_USED
108973 if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108974 #endif
108975 #ifdef __Pyx_Coroutine_USED
108976 if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108977 #endif
108978 #ifdef __Pyx_Generator_USED
108979 if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108980 #endif
108981 #ifdef __Pyx_AsyncGen_USED
108982 if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108983 #endif
108984 #ifdef __Pyx_StopAsyncIteration_USED
108985 if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108986 #endif
108987 /*--- Library function declarations ---*/
108988 /*--- Threads initialization code ---*/
108989 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
108990 PyEval_InitThreads();
108991 #endif
108992 /*--- Initialize various global constants etc. ---*/
108993 if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108994 stringtab_initialized = 1;
108995 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108996 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
108997 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
108998 #endif
108999 if (__pyx_module_is_main_pysam__libcbcf) {
109000 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
109001 }
109002 #if PY_MAJOR_VERSION >= 3
109003 {
109004 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
109005 if (!PyDict_GetItemString(modules, "pysam.libcbcf")) {
109006 if (unlikely((PyDict_SetItemString(modules, "pysam.libcbcf", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
109007 }
109008 }
109009 #endif
109010 /*--- Builtin init code ---*/
109011 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
109012 /*--- Constants init code ---*/
109013 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
109014 /*--- Global type/function init code ---*/
109015 (void)__Pyx_modinit_global_init_code();
109016 (void)__Pyx_modinit_variable_export_code();
109017 (void)__Pyx_modinit_function_export_code();
109018 if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
109019 if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
109020 (void)__Pyx_modinit_variable_import_code();
109021 if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
109022 /*--- Execution code ---*/
109023 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
109024 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
109025 #endif
109026 __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_libcbcf(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
109027
109028 /* "pysam/libcbcf.pyx":85
109029 * from __future__ import division, print_function
109030 *
109031 * import os # <<<<<<<<<<<<<<
109032 * import sys
109033 *
109034 */
109035 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
109036 __Pyx_GOTREF(__pyx_t_2);
109037 if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
109038 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109039
109040 /* "pysam/libcbcf.pyx":86
109041 *
109042 * import os
109043 * import sys # <<<<<<<<<<<<<<
109044 *
109045 * from libc.errno cimport errno, EPIPE
109046 */
109047 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
109048 __Pyx_GOTREF(__pyx_t_2);
109049 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
109050 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109051
109052 /* "pysam/libcbcf.pyx":103
109053 * from pysam.libchtslib cimport HTSFile, hisremote
109054 *
109055 * from pysam.utils import unquoted_str # <<<<<<<<<<<<<<
109056 *
109057 *
109058 */
109059 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
109060 __Pyx_GOTREF(__pyx_t_2);
109061 __Pyx_INCREF(__pyx_n_s_unquoted_str);
109062 __Pyx_GIVEREF(__pyx_n_s_unquoted_str);
109063 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_unquoted_str)) __PYX_ERR(0, 103, __pyx_L1_error);
109064 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pysam_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
109065 __Pyx_GOTREF(__pyx_t_3);
109066 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109067 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_unquoted_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
109068 __Pyx_GOTREF(__pyx_t_2);
109069 if (PyDict_SetItem(__pyx_d, __pyx_n_s_unquoted_str, __pyx_t_2) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
109070 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109071 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109072
109073 /* "pysam/libcbcf.pyx":106
109074 *
109075 *
109076 * __all__ = ['VariantFile', # <<<<<<<<<<<<<<
109077 * 'VariantHeader',
109078 * 'VariantHeaderRecord',
109079 */
109080 __pyx_t_3 = PyList_New(22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
109081 __Pyx_GOTREF(__pyx_t_3);
109082 __Pyx_INCREF(__pyx_n_u_VariantFile);
109083 __Pyx_GIVEREF(__pyx_n_u_VariantFile);
109084 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_VariantFile)) __PYX_ERR(0, 106, __pyx_L1_error);
109085 __Pyx_INCREF(__pyx_n_u_VariantHeader);
109086 __Pyx_GIVEREF(__pyx_n_u_VariantHeader);
109087 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_VariantHeader)) __PYX_ERR(0, 106, __pyx_L1_error);
109088 __Pyx_INCREF(__pyx_n_u_VariantHeaderRecord);
109089 __Pyx_GIVEREF(__pyx_n_u_VariantHeaderRecord);
109090 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_u_VariantHeaderRecord)) __PYX_ERR(0, 106, __pyx_L1_error);
109091 __Pyx_INCREF(__pyx_n_u_VariantHeaderRecords);
109092 __Pyx_GIVEREF(__pyx_n_u_VariantHeaderRecords);
109093 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_u_VariantHeaderRecords)) __PYX_ERR(0, 106, __pyx_L1_error);
109094 __Pyx_INCREF(__pyx_n_u_VariantMetadata);
109095 __Pyx_GIVEREF(__pyx_n_u_VariantMetadata);
109096 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_u_VariantMetadata)) __PYX_ERR(0, 106, __pyx_L1_error);
109097 __Pyx_INCREF(__pyx_n_u_VariantHeaderMetadata);
109098 __Pyx_GIVEREF(__pyx_n_u_VariantHeaderMetadata);
109099 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_u_VariantHeaderMetadata)) __PYX_ERR(0, 106, __pyx_L1_error);
109100 __Pyx_INCREF(__pyx_n_u_VariantContig);
109101 __Pyx_GIVEREF(__pyx_n_u_VariantContig);
109102 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 6, __pyx_n_u_VariantContig)) __PYX_ERR(0, 106, __pyx_L1_error);
109103 __Pyx_INCREF(__pyx_n_u_VariantHeaderContigs);
109104 __Pyx_GIVEREF(__pyx_n_u_VariantHeaderContigs);
109105 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 7, __pyx_n_u_VariantHeaderContigs)) __PYX_ERR(0, 106, __pyx_L1_error);
109106 __Pyx_INCREF(__pyx_n_u_VariantHeaderSamples);
109107 __Pyx_GIVEREF(__pyx_n_u_VariantHeaderSamples);
109108 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 8, __pyx_n_u_VariantHeaderSamples)) __PYX_ERR(0, 106, __pyx_L1_error);
109109 __Pyx_INCREF(__pyx_n_u_VariantRecordFilter);
109110 __Pyx_GIVEREF(__pyx_n_u_VariantRecordFilter);
109111 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 9, __pyx_n_u_VariantRecordFilter)) __PYX_ERR(0, 106, __pyx_L1_error);
109112 __Pyx_INCREF(__pyx_n_u_VariantRecordFormat);
109113 __Pyx_GIVEREF(__pyx_n_u_VariantRecordFormat);
109114 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 10, __pyx_n_u_VariantRecordFormat)) __PYX_ERR(0, 106, __pyx_L1_error);
109115 __Pyx_INCREF(__pyx_n_u_VariantRecordInfo);
109116 __Pyx_GIVEREF(__pyx_n_u_VariantRecordInfo);
109117 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 11, __pyx_n_u_VariantRecordInfo)) __PYX_ERR(0, 106, __pyx_L1_error);
109118 __Pyx_INCREF(__pyx_n_u_VariantRecordSamples);
109119 __Pyx_GIVEREF(__pyx_n_u_VariantRecordSamples);
109120 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 12, __pyx_n_u_VariantRecordSamples)) __PYX_ERR(0, 106, __pyx_L1_error);
109121 __Pyx_INCREF(__pyx_n_u_VariantRecord);
109122 __Pyx_GIVEREF(__pyx_n_u_VariantRecord);
109123 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 13, __pyx_n_u_VariantRecord)) __PYX_ERR(0, 106, __pyx_L1_error);
109124 __Pyx_INCREF(__pyx_n_u_VariantRecordSample);
109125 __Pyx_GIVEREF(__pyx_n_u_VariantRecordSample);
109126 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 14, __pyx_n_u_VariantRecordSample)) __PYX_ERR(0, 106, __pyx_L1_error);
109127 __Pyx_INCREF(__pyx_n_u_BaseIndex);
109128 __Pyx_GIVEREF(__pyx_n_u_BaseIndex);
109129 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 15, __pyx_n_u_BaseIndex)) __PYX_ERR(0, 106, __pyx_L1_error);
109130 __Pyx_INCREF(__pyx_n_u_BCFIndex);
109131 __Pyx_GIVEREF(__pyx_n_u_BCFIndex);
109132 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 16, __pyx_n_u_BCFIndex)) __PYX_ERR(0, 106, __pyx_L1_error);
109133 __Pyx_INCREF(__pyx_n_u_TabixIndex);
109134 __Pyx_GIVEREF(__pyx_n_u_TabixIndex);
109135 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 17, __pyx_n_u_TabixIndex)) __PYX_ERR(0, 106, __pyx_L1_error);
109136 __Pyx_INCREF(__pyx_n_u_BaseIterator);
109137 __Pyx_GIVEREF(__pyx_n_u_BaseIterator);
109138 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 18, __pyx_n_u_BaseIterator)) __PYX_ERR(0, 106, __pyx_L1_error);
109139 __Pyx_INCREF(__pyx_n_u_BCFIterator);
109140 __Pyx_GIVEREF(__pyx_n_u_BCFIterator);
109141 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 19, __pyx_n_u_BCFIterator)) __PYX_ERR(0, 106, __pyx_L1_error);
109142 __Pyx_INCREF(__pyx_n_u_TabixIterator);
109143 __Pyx_GIVEREF(__pyx_n_u_TabixIterator);
109144 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 20, __pyx_n_u_TabixIterator)) __PYX_ERR(0, 106, __pyx_L1_error);
109145 __Pyx_INCREF(__pyx_n_u_VariantRecord);
109146 __Pyx_GIVEREF(__pyx_n_u_VariantRecord);
109147 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 21, __pyx_n_u_VariantRecord)) __PYX_ERR(0, 106, __pyx_L1_error);
109148 if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_3) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
109149 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109150
109151 /* "pysam/libcbcf.pyx":134
109152 * ########################################################################
109153 *
109154 * cdef int MAX_POS = (1 << 31) - 1 # <<<<<<<<<<<<<<
109155 * cdef tuple VALUE_TYPES = ('Flag', 'Integer', 'Float', 'String')
109156 * cdef tuple METADATA_TYPES = ('FILTER', 'INFO', 'FORMAT', 'CONTIG', 'STRUCTURED', 'GENERIC')
109157 */
109158 __pyx_v_5pysam_7libcbcf_MAX_POS = 0x7fffffff;
109159
109160 /* "pysam/libcbcf.pyx":135
109161 *
109162 * cdef int MAX_POS = (1 << 31) - 1
109163 * cdef tuple VALUE_TYPES = ('Flag', 'Integer', 'Float', 'String') # <<<<<<<<<<<<<<
109164 * cdef tuple METADATA_TYPES = ('FILTER', 'INFO', 'FORMAT', 'CONTIG', 'STRUCTURED', 'GENERIC')
109165 * cdef tuple METADATA_LENGTHS = ('FIXED', 'VARIABLE', 'A', 'G', 'R')
109166 */
109167 __Pyx_INCREF(__pyx_tuple__279);
109168 __Pyx_XGOTREF(__pyx_v_5pysam_7libcbcf_VALUE_TYPES);
109169 __Pyx_DECREF_SET(__pyx_v_5pysam_7libcbcf_VALUE_TYPES, __pyx_tuple__279);
109170 __Pyx_GIVEREF(__pyx_tuple__279);
109171
109172 /* "pysam/libcbcf.pyx":136
109173 * cdef int MAX_POS = (1 << 31) - 1
109174 * cdef tuple VALUE_TYPES = ('Flag', 'Integer', 'Float', 'String')
109175 * cdef tuple METADATA_TYPES = ('FILTER', 'INFO', 'FORMAT', 'CONTIG', 'STRUCTURED', 'GENERIC') # <<<<<<<<<<<<<<
109176 * cdef tuple METADATA_LENGTHS = ('FIXED', 'VARIABLE', 'A', 'G', 'R')
109177 *
109178 */
109179 __Pyx_INCREF(__pyx_tuple__280);
109180 __Pyx_XGOTREF(__pyx_v_5pysam_7libcbcf_METADATA_TYPES);
109181 __Pyx_DECREF_SET(__pyx_v_5pysam_7libcbcf_METADATA_TYPES, __pyx_tuple__280);
109182 __Pyx_GIVEREF(__pyx_tuple__280);
109183
109184 /* "pysam/libcbcf.pyx":137
109185 * cdef tuple VALUE_TYPES = ('Flag', 'Integer', 'Float', 'String')
109186 * cdef tuple METADATA_TYPES = ('FILTER', 'INFO', 'FORMAT', 'CONTIG', 'STRUCTURED', 'GENERIC')
109187 * cdef tuple METADATA_LENGTHS = ('FIXED', 'VARIABLE', 'A', 'G', 'R') # <<<<<<<<<<<<<<
109188 *
109189 *
109190 */
109191 __Pyx_INCREF(__pyx_tuple__281);
109192 __Pyx_XGOTREF(__pyx_v_5pysam_7libcbcf_METADATA_LENGTHS);
109193 __Pyx_DECREF_SET(__pyx_v_5pysam_7libcbcf_METADATA_LENGTHS, __pyx_tuple__281);
109194 __Pyx_GIVEREF(__pyx_tuple__281);
109195
109196 /* "pysam/libcbcf.pyx":154
109197 * ########################################################################
109198 *
109199 * cdef object _nothing = object() # <<<<<<<<<<<<<<
109200 *
109201 * ########################################################################
109202 */
109203 __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
109204 __Pyx_GOTREF(__pyx_t_3);
109205 __Pyx_XGOTREF(__pyx_v_5pysam_7libcbcf__nothing);
109206 __Pyx_DECREF_SET(__pyx_v_5pysam_7libcbcf__nothing, __pyx_t_3);
109207 __Pyx_GIVEREF(__pyx_t_3);
109208 __pyx_t_3 = 0;
109209
109210 /* "pysam/libcbcf.pyx":161
109211 * ########################################################################
109212 *
109213 * cdef dict bcf_str_cache = {} # <<<<<<<<<<<<<<
109214 *
109215 * cdef inline bcf_str_cache_get_charptr(const char* s):
109216 */
109217 __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
109218 __Pyx_GOTREF(__pyx_t_3);
109219 __Pyx_XGOTREF(__pyx_v_5pysam_7libcbcf_bcf_str_cache);
109220 __Pyx_DECREF_SET(__pyx_v_5pysam_7libcbcf_bcf_str_cache, ((PyObject*)__pyx_t_3));
109221 __Pyx_GIVEREF(__pyx_t_3);
109222 __pyx_t_3 = 0;
109223
109224 /* "pysam/libcbcf.pyx":1313
109225 * yield bcf_str_cache_get_charptr(r.keys[i])
109226 *
109227 * def get(self, key, default=None): # <<<<<<<<<<<<<<
109228 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
109229 * try:
109230 */
109231 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_12get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
109232 __Pyx_GOTREF(__pyx_t_3);
109233 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__4);
109234 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_get, __pyx_t_3) < 0) __PYX_ERR(0, 1313, __pyx_L1_error)
109235 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109236 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109237
109238 /* "pysam/libcbcf.pyx":1328
109239 * return True
109240 *
109241 * def iterkeys(self): # <<<<<<<<<<<<<<
109242 * """D.iterkeys() -> an iterator over the keys of D"""
109243 * return iter(self)
109244 */
109245 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_16iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1328, __pyx_L1_error)
109246 __Pyx_GOTREF(__pyx_t_3);
109247 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_iterkeys, __pyx_t_3) < 0) __PYX_ERR(0, 1328, __pyx_L1_error)
109248 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109249 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109250
109251 /* "pysam/libcbcf.pyx":1332
109252 * return iter(self)
109253 *
109254 * def itervalues(self): # <<<<<<<<<<<<<<
109255 * """D.itervalues() -> an iterator over the values of D"""
109256 * cdef bcf_hrec_t *r = self.ptr
109257 */
109258 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_18itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
109259 __Pyx_GOTREF(__pyx_t_3);
109260 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_itervalues, __pyx_t_3) < 0) __PYX_ERR(0, 1332, __pyx_L1_error)
109261 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109262 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109263
109264 /* "pysam/libcbcf.pyx":1342
109265 * yield charptr_to_str(r.vals[i]) if r.vals[i] else None
109266 *
109267 * def iteritems(self): # <<<<<<<<<<<<<<
109268 * """D.iteritems() -> an iterator over the (key, value) items of D"""
109269 * cdef bcf_hrec_t *r = self.ptr
109270 */
109271 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_21iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
109272 __Pyx_GOTREF(__pyx_t_3);
109273 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_iteritems, __pyx_t_3) < 0) __PYX_ERR(0, 1342, __pyx_L1_error)
109274 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109275 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109276
109277 /* "pysam/libcbcf.pyx":1352
109278 * yield (bcf_str_cache_get_charptr(r.keys[i]), charptr_to_str(r.vals[i]) if r.vals[i] else None)
109279 *
109280 * def keys(self): # <<<<<<<<<<<<<<
109281 * """D.keys() -> list of D's keys"""
109282 * return list(self)
109283 */
109284 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_24keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error)
109285 __Pyx_GOTREF(__pyx_t_3);
109286 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_keys, __pyx_t_3) < 0) __PYX_ERR(0, 1352, __pyx_L1_error)
109287 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109288 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109289
109290 /* "pysam/libcbcf.pyx":1356
109291 * return list(self)
109292 *
109293 * def items(self): # <<<<<<<<<<<<<<
109294 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
109295 * return list(self.iteritems())
109296 */
109297 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_26items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1356, __pyx_L1_error)
109298 __Pyx_GOTREF(__pyx_t_3);
109299 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_items, __pyx_t_3) < 0) __PYX_ERR(0, 1356, __pyx_L1_error)
109300 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109301 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109302
109303 /* "pysam/libcbcf.pyx":1360
109304 * return list(self.iteritems())
109305 *
109306 * def values(self): # <<<<<<<<<<<<<<
109307 * """D.values() -> list of D's values"""
109308 * return list(self.itervalues())
109309 */
109310 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_28values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error)
109311 __Pyx_GOTREF(__pyx_t_3);
109312 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_values, __pyx_t_3) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
109313 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109314 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109315
109316 /* "pysam/libcbcf.pyx":1364
109317 * return list(self.itervalues())
109318 *
109319 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
109320 * """D.update([E, ]**F) -> None.
109321 *
109322 */
109323 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_30update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_update, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error)
109324 __Pyx_GOTREF(__pyx_t_3);
109325 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__4);
109326 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_update, __pyx_t_3) < 0) __PYX_ERR(0, 1364, __pyx_L1_error)
109327 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109328 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109329
109330 /* "pysam/libcbcf.pyx":1376
109331 * self[k] = v
109332 *
109333 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
109334 * try:
109335 * value = self[key]
109336 */
109337 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
109338 __pyx_k__41 = __pyx_v_5pysam_7libcbcf__nothing;
109339 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
109340 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1376, __pyx_L1_error)
109341 __Pyx_GOTREF(__pyx_t_3);
109342 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
109343 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
109344 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_5pysam_7libcbcf__nothing)) __PYX_ERR(0, 1376, __pyx_L1_error);
109345 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_32pop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_pop, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
109346 __Pyx_GOTREF(__pyx_t_2);
109347 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
109348 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
109349 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_pop, __pyx_t_2) < 0) __PYX_ERR(0, 1376, __pyx_L1_error)
109350 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109351 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109352
109353 /* "pysam/libcbcf.pyx":1387
109354 *
109355 * # Mappings are not hashable by default, but subclasses can change this
109356 * __hash__ = None # <<<<<<<<<<<<<<
109357 *
109358 * #TODO: implement __richcmp__
109359 */
109360 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 1387, __pyx_L1_error)
109361 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109362
109363 /* "pysam/libcbcf.pyx":1411
109364 *
109365 * # FIXME: Not safe -- causes trivial segfaults at the moment
109366 * def remove(self): # <<<<<<<<<<<<<<
109367 * cdef bcf_hdr_t *hdr = self.header.ptr
109368 * cdef bcf_hrec_t *r = self.ptr
109369 */
109370 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_36remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord_remove, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error)
109371 __Pyx_GOTREF(__pyx_t_2);
109372 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord, __pyx_n_s_remove, __pyx_t_2) < 0) __PYX_ERR(0, 1411, __pyx_L1_error)
109373 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109374 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecord);
109375
109376 /* "(tree fragment)":1
109377 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
109378 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
109379 * def __setstate_cython__(self, __pyx_state):
109380 */
109381 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_38__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord___reduce_cyt, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
109382 __Pyx_GOTREF(__pyx_t_2);
109383 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
109384 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109385
109386 /* "(tree fragment)":3
109387 * def __reduce_cython__(self):
109388 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
109389 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
109390 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
109391 */
109392 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantHeaderRecord_40__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecord___setstate_c, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
109393 __Pyx_GOTREF(__pyx_t_2);
109394 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
109395 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109396
109397 /* "pysam/libcbcf.pyx":1458
109398 * yield makeVariantHeaderRecord(self.header, self.header.ptr.hrec[i])
109399 *
109400 * __hash__ = None # <<<<<<<<<<<<<<
109401 *
109402 *
109403 */
109404 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
109405 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords);
109406
109407 /* "(tree fragment)":1
109408 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
109409 * cdef tuple state
109410 * cdef object _dict
109411 */
109412 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderRecords_12__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecords___reduce_cy, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
109413 __Pyx_GOTREF(__pyx_t_2);
109414 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
109415 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109416 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords);
109417
109418 /* "(tree fragment)":16
109419 * else:
109420 * return __pyx_unpickle_VariantHeaderRecords, (type(self), 0x1e0584a, state)
109421 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
109422 * __pyx_unpickle_VariantHeaderRecords__set_state(self, __pyx_state)
109423 */
109424 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderRecords_14__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderRecords___setstate, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
109425 __Pyx_GOTREF(__pyx_t_2);
109426 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
109427 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109428 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderRecords);
109429
109430 /* "pysam/libcbcf.pyx":1536
109431 * return makeVariantHeaderRecord(self.header, hrec)
109432 *
109433 * def remove_header(self): # <<<<<<<<<<<<<<
109434 * cdef bcf_hdr_t *hdr = self.header.ptr
109435 * cdef const char *key = hdr.id[BCF_DT_ID][self.id].key
109436 */
109437 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_15VariantMetadata_3remove_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantMetadata_remove_header, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
109438 __Pyx_GOTREF(__pyx_t_2);
109439 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantMetadata, __pyx_n_s_remove_header, __pyx_t_2) < 0) __PYX_ERR(0, 1536, __pyx_L1_error)
109440 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109441 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantMetadata);
109442
109443 /* "(tree fragment)":1
109444 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
109445 * cdef tuple state
109446 * cdef object _dict
109447 */
109448 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_15VariantMetadata_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantMetadata___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
109449 __Pyx_GOTREF(__pyx_t_2);
109450 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantMetadata, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
109451 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109452 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantMetadata);
109453
109454 /* "(tree fragment)":16
109455 * else:
109456 * return __pyx_unpickle_VariantMetadata, (type(self), 0xcd1335f, state)
109457 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
109458 * __pyx_unpickle_VariantMetadata__set_state(self, __pyx_state)
109459 */
109460 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_15VariantMetadata_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantMetadata___setstate_cytho, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
109461 __Pyx_GOTREF(__pyx_t_2);
109462 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantMetadata, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
109463 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109464 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantMetadata);
109465
109466 /* "pysam/libcbcf.pyx":1565
109467 * raise TypeError('this class cannot be instantiated from Python')
109468 *
109469 * def add(self, id, number, type, description, **kwargs): # <<<<<<<<<<<<<<
109470 * """Add a new filter, info or format record"""
109471 * if id in self:
109472 */
109473 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_3add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_add, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error)
109474 __Pyx_GOTREF(__pyx_t_2);
109475 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_add, __pyx_t_2) < 0) __PYX_ERR(0, 1565, __pyx_L1_error)
109476 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109477 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109478
109479 /* "pysam/libcbcf.pyx":1625
109480 * return makeVariantMetadata(self.header, self.type, kh_val_vdict(d, k).id)
109481 *
109482 * def remove_header(self, key): # <<<<<<<<<<<<<<
109483 * cdef bcf_hdr_t *hdr = self.header.ptr
109484 * cdef vdict_t *d = <vdict_t *>hdr.dict[BCF_DT_ID]
109485 */
109486 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_11remove_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_remove_hea, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L1_error)
109487 __Pyx_GOTREF(__pyx_t_2);
109488 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_remove_header, __pyx_t_2) < 0) __PYX_ERR(0, 1625, __pyx_L1_error)
109489 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109490 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109491
109492 /* "pysam/libcbcf.pyx":1638
109493 * #bcf_hdr_sync(hdr)
109494 *
109495 * def clear_header(self): # <<<<<<<<<<<<<<
109496 * cdef bcf_hdr_t *hdr = self.header.ptr
109497 * bcf_hdr_remove(hdr, self.type, NULL)
109498 */
109499 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_13clear_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_clear_head, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1638, __pyx_L1_error)
109500 __Pyx_GOTREF(__pyx_t_2);
109501 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_clear_header, __pyx_t_2) < 0) __PYX_ERR(0, 1638, __pyx_L1_error)
109502 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109503 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109504
109505 /* "pysam/libcbcf.pyx":1653
109506 * yield bcf_str_cache_get_charptr(idpair.key)
109507 *
109508 * def get(self, key, default=None): # <<<<<<<<<<<<<<
109509 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
109510 * try:
109511 */
109512 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_18get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1653, __pyx_L1_error)
109513 __Pyx_GOTREF(__pyx_t_2);
109514 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
109515 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 1653, __pyx_L1_error)
109516 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109517 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109518
109519 /* "pysam/libcbcf.pyx":1668
109520 * return True
109521 *
109522 * def iterkeys(self): # <<<<<<<<<<<<<<
109523 * """D.iterkeys() -> an iterator over the keys of D"""
109524 * return iter(self)
109525 */
109526 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_22iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
109527 __Pyx_GOTREF(__pyx_t_2);
109528 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_iterkeys, __pyx_t_2) < 0) __PYX_ERR(0, 1668, __pyx_L1_error)
109529 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109530 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109531
109532 /* "pysam/libcbcf.pyx":1672
109533 * return iter(self)
109534 *
109535 * def itervalues(self): # <<<<<<<<<<<<<<
109536 * """D.itervalues() -> an iterator over the values of D"""
109537 * for key in self:
109538 */
109539 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_24itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error)
109540 __Pyx_GOTREF(__pyx_t_2);
109541 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_itervalues, __pyx_t_2) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
109542 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109543 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109544
109545 /* "pysam/libcbcf.pyx":1677
109546 * yield self[key]
109547 *
109548 * def iteritems(self): # <<<<<<<<<<<<<<
109549 * """D.iteritems() -> an iterator over the (key, value) items of D"""
109550 * for key in self:
109551 */
109552 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_27iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __pyx_L1_error)
109553 __Pyx_GOTREF(__pyx_t_2);
109554 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(0, 1677, __pyx_L1_error)
109555 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109556 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109557
109558 /* "pysam/libcbcf.pyx":1682
109559 * yield (key, self[key])
109560 *
109561 * def keys(self): # <<<<<<<<<<<<<<
109562 * """D.keys() -> list of D's keys"""
109563 * return list(self)
109564 */
109565 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_30keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error)
109566 __Pyx_GOTREF(__pyx_t_2);
109567 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 1682, __pyx_L1_error)
109568 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109569 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109570
109571 /* "pysam/libcbcf.pyx":1686
109572 * return list(self)
109573 *
109574 * def items(self): # <<<<<<<<<<<<<<
109575 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
109576 * return list(self.iteritems())
109577 */
109578 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_32items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1686, __pyx_L1_error)
109579 __Pyx_GOTREF(__pyx_t_2);
109580 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_items, __pyx_t_2) < 0) __PYX_ERR(0, 1686, __pyx_L1_error)
109581 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109582 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109583
109584 /* "pysam/libcbcf.pyx":1690
109585 * return list(self.iteritems())
109586 *
109587 * def values(self): # <<<<<<<<<<<<<<
109588 * """D.values() -> list of D's values"""
109589 * return list(self.itervalues())
109590 */
109591 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_34values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
109592 __Pyx_GOTREF(__pyx_t_2);
109593 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_values, __pyx_t_2) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
109594 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109595 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109596
109597 /* "pysam/libcbcf.pyx":1695
109598 *
109599 * # Mappings are not hashable by default, but subclasses can change this
109600 * __hash__ = None # <<<<<<<<<<<<<<
109601 *
109602 * #TODO: implement __richcmp__
109603 */
109604 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 1695, __pyx_L1_error)
109605 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109606
109607 /* "(tree fragment)":1
109608 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
109609 * cdef tuple state
109610 * cdef object _dict
109611 */
109612 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_36__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata___reduce_c, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
109613 __Pyx_GOTREF(__pyx_t_2);
109614 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
109615 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109616 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109617
109618 /* "(tree fragment)":16
109619 * else:
109620 * return __pyx_unpickle_VariantHeaderMetadata, (type(self), 0x816ca43, state)
109621 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
109622 * __pyx_unpickle_VariantHeaderMetadata__set_state(self, __pyx_state)
109623 */
109624 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21VariantHeaderMetadata_38__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderMetadata___setstate, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
109625 __Pyx_GOTREF(__pyx_t_2);
109626 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
109627 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109628 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderMetadata);
109629
109630 /* "pysam/libcbcf.pyx":1741
109631 * return makeVariantHeaderRecord(self.header, hrec)
109632 *
109633 * def remove_header(self): # <<<<<<<<<<<<<<
109634 * cdef bcf_hdr_t *hdr = self.header.ptr
109635 * cdef const char *key = hdr.id[BCF_DT_CTG][self.id].key
109636 */
109637 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantContig_3remove_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantContig_remove_header, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1741, __pyx_L1_error)
109638 __Pyx_GOTREF(__pyx_t_2);
109639 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantContig, __pyx_n_s_remove_header, __pyx_t_2) < 0) __PYX_ERR(0, 1741, __pyx_L1_error)
109640 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109641 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantContig);
109642
109643 /* "(tree fragment)":1
109644 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
109645 * cdef tuple state
109646 * cdef object _dict
109647 */
109648 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantContig_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantContig___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
109649 __Pyx_GOTREF(__pyx_t_2);
109650 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantContig, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
109651 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109652 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantContig);
109653
109654 /* "(tree fragment)":16
109655 * else:
109656 * return __pyx_unpickle_VariantContig, (type(self), 0x2572060, state)
109657 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
109658 * __pyx_unpickle_VariantContig__set_state(self, __pyx_state)
109659 */
109660 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantContig_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantContig___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
109661 __Pyx_GOTREF(__pyx_t_2);
109662 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantContig, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
109663 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109664 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantContig);
109665
109666 /* "pysam/libcbcf.pyx":1797
109667 * return makeVariantContig(self.header, id)
109668 *
109669 * def remove_header(self, key): # <<<<<<<<<<<<<<
109670 * cdef bcf_hdr_t *hdr = self.header.ptr
109671 * cdef int index
109672 */
109673 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_9remove_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_remove_head, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1797, __pyx_L1_error)
109674 __Pyx_GOTREF(__pyx_t_2);
109675 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_remove_header, __pyx_t_2) < 0) __PYX_ERR(0, 1797, __pyx_L1_error)
109676 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109677 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109678
109679 /* "pysam/libcbcf.pyx":1818
109680 * bcf_hdr_remove(hdr, BCF_HL_CTG, ckey)
109681 *
109682 * def clear_header(self): # <<<<<<<<<<<<<<
109683 * cdef bcf_hdr_t *hdr = self.header.ptr
109684 * bcf_hdr_remove(hdr, BCF_HL_CTG, NULL)
109685 */
109686 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_11clear_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_clear_heade, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1818, __pyx_L1_error)
109687 __Pyx_GOTREF(__pyx_t_2);
109688 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_clear_header, __pyx_t_2) < 0) __PYX_ERR(0, 1818, __pyx_L1_error)
109689 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109690 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109691
109692 /* "pysam/libcbcf.pyx":1833
109693 * yield bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, i))
109694 *
109695 * def get(self, key, default=None): # <<<<<<<<<<<<<<
109696 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
109697 * try:
109698 */
109699 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_16get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1833, __pyx_L1_error)
109700 __Pyx_GOTREF(__pyx_t_2);
109701 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
109702 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 1833, __pyx_L1_error)
109703 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109704 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109705
109706 /* "pysam/libcbcf.pyx":1848
109707 * return True
109708 *
109709 * def iterkeys(self): # <<<<<<<<<<<<<<
109710 * """D.iterkeys() -> an iterator over the keys of D"""
109711 * return iter(self)
109712 */
109713 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_20iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L1_error)
109714 __Pyx_GOTREF(__pyx_t_2);
109715 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_iterkeys, __pyx_t_2) < 0) __PYX_ERR(0, 1848, __pyx_L1_error)
109716 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109717 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109718
109719 /* "pysam/libcbcf.pyx":1852
109720 * return iter(self)
109721 *
109722 * def itervalues(self): # <<<<<<<<<<<<<<
109723 * """D.itervalues() -> an iterator over the values of D"""
109724 * for key in self:
109725 */
109726 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_22itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1852, __pyx_L1_error)
109727 __Pyx_GOTREF(__pyx_t_2);
109728 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_itervalues, __pyx_t_2) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
109729 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109730 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109731
109732 /* "pysam/libcbcf.pyx":1857
109733 * yield self[key]
109734 *
109735 * def iteritems(self): # <<<<<<<<<<<<<<
109736 * """D.iteritems() -> an iterator over the (key, value) items of D"""
109737 * for key in self:
109738 */
109739 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_25iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
109740 __Pyx_GOTREF(__pyx_t_2);
109741 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
109742 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109743 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109744
109745 /* "pysam/libcbcf.pyx":1862
109746 * yield (key, self[key])
109747 *
109748 * def keys(self): # <<<<<<<<<<<<<<
109749 * """D.keys() -> list of D's keys"""
109750 * return list(self)
109751 */
109752 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_28keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error)
109753 __Pyx_GOTREF(__pyx_t_2);
109754 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 1862, __pyx_L1_error)
109755 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109756 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109757
109758 /* "pysam/libcbcf.pyx":1866
109759 * return list(self)
109760 *
109761 * def items(self): # <<<<<<<<<<<<<<
109762 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
109763 * return list(self.iteritems())
109764 */
109765 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_30items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error)
109766 __Pyx_GOTREF(__pyx_t_2);
109767 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_items, __pyx_t_2) < 0) __PYX_ERR(0, 1866, __pyx_L1_error)
109768 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109769 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109770
109771 /* "pysam/libcbcf.pyx":1870
109772 * return list(self.iteritems())
109773 *
109774 * def values(self): # <<<<<<<<<<<<<<
109775 * """D.values() -> list of D's values"""
109776 * return list(self.itervalues())
109777 */
109778 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_32values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1870, __pyx_L1_error)
109779 __Pyx_GOTREF(__pyx_t_2);
109780 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_values, __pyx_t_2) < 0) __PYX_ERR(0, 1870, __pyx_L1_error)
109781 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109782 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109783
109784 /* "pysam/libcbcf.pyx":1875
109785 *
109786 * # Mappings are not hashable by default, but subclasses can change this
109787 * __hash__ = None # <<<<<<<<<<<<<<
109788 *
109789 * #TODO: implement __richcmp__
109790 */
109791 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 1875, __pyx_L1_error)
109792 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109793
109794 /* "pysam/libcbcf.pyx":1879
109795 * #TODO: implement __richcmp__
109796 *
109797 * def add(self, id, length=None, **kwargs): # <<<<<<<<<<<<<<
109798 * """Add a new contig record"""
109799 * if id in self:
109800 */
109801 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_34add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs_add, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
109802 __Pyx_GOTREF(__pyx_t_2);
109803 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
109804 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_add, __pyx_t_2) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
109805 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109806 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109807
109808 /* "(tree fragment)":1
109809 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
109810 * cdef tuple state
109811 * cdef object _dict
109812 */
109813 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_36__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs___reduce_cy, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
109814 __Pyx_GOTREF(__pyx_t_2);
109815 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
109816 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109817 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109818
109819 /* "(tree fragment)":16
109820 * else:
109821 * return __pyx_unpickle_VariantHeaderContigs, (type(self), 0x1e0584a, state)
109822 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
109823 * __pyx_unpickle_VariantHeaderContigs__set_state(self, __pyx_state)
109824 */
109825 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderContigs_38__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderContigs___setstate, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
109826 __Pyx_GOTREF(__pyx_t_2);
109827 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
109828 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109829 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderContigs);
109830
109831 /* "pysam/libcbcf.pyx":1938
109832 *
109833 * # Mappings are not hashable by default, but subclasses can change this
109834 * __hash__ = None # <<<<<<<<<<<<<<
109835 *
109836 * #TODO: implement __richcmp__
109837 */
109838 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 1938, __pyx_L1_error)
109839 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples);
109840
109841 /* "pysam/libcbcf.pyx":1942
109842 * #TODO: implement __richcmp__
109843 *
109844 * def add(self, name): # <<<<<<<<<<<<<<
109845 * """Add a new sample"""
109846 * self.header.add_sample(name)
109847 */
109848 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderSamples_14add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderSamples_add, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1942, __pyx_L1_error)
109849 __Pyx_GOTREF(__pyx_t_2);
109850 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples, __pyx_n_s_add, __pyx_t_2) < 0) __PYX_ERR(0, 1942, __pyx_L1_error)
109851 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109852 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples);
109853
109854 /* "(tree fragment)":1
109855 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
109856 * cdef tuple state
109857 * cdef object _dict
109858 */
109859 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderSamples_16__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderSamples___reduce_cy, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
109860 __Pyx_GOTREF(__pyx_t_2);
109861 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
109862 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109863 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples);
109864
109865 /* "(tree fragment)":16
109866 * else:
109867 * return __pyx_unpickle_VariantHeaderSamples, (type(self), 0x1e0584a, state)
109868 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
109869 * __pyx_unpickle_VariantHeaderSamples__set_state(self, __pyx_state)
109870 */
109871 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantHeaderSamples_18__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeaderSamples___setstate, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
109872 __Pyx_GOTREF(__pyx_t_2);
109873 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
109874 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109875 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeaderSamples);
109876
109877 /* "pysam/libcbcf.pyx":1981
109878 * return self.ptr != NULL
109879 *
109880 * def copy(self): # <<<<<<<<<<<<<<
109881 * return makeVariantHeader(bcf_hdr_dup(self.ptr))
109882 *
109883 */
109884 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_9copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader_copy, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1981, __pyx_L1_error)
109885 __Pyx_GOTREF(__pyx_t_2);
109886 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 1981, __pyx_L1_error)
109887 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109888 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeader);
109889
109890 /* "pysam/libcbcf.pyx":1984
109891 * return makeVariantHeader(bcf_hdr_dup(self.ptr))
109892 *
109893 * def merge(self, VariantHeader header): # <<<<<<<<<<<<<<
109894 * if header is None:
109895 * raise ValueError('header must not be None')
109896 */
109897 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_11merge, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader_merge, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1984, __pyx_L1_error)
109898 __Pyx_GOTREF(__pyx_t_2);
109899 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_n_s_merge, __pyx_t_2) < 0) __PYX_ERR(0, 1984, __pyx_L1_error)
109900 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109901 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeader);
109902
109903 /* "pysam/libcbcf.pyx":2076
109904 * return ret
109905 *
109906 * def new_record(self, contig=None, start=0, stop=0, alleles=None, # <<<<<<<<<<<<<<
109907 * id=None, qual=None, filter=None, info=None, samples=None,
109908 * **kwargs):
109909 */
109910 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_15new_record, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader_new_record, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error)
109911 __Pyx_GOTREF(__pyx_t_2);
109912 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__300);
109913 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_n_s_new_record, __pyx_t_2) < 0) __PYX_ERR(0, 2076, __pyx_L1_error)
109914 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109915 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeader);
109916
109917 /* "pysam/libcbcf.pyx":2122
109918 * return rec
109919 *
109920 * def add_record(self, VariantHeaderRecord record): # <<<<<<<<<<<<<<
109921 * """Add an existing :class:`VariantHeaderRecord` to this header"""
109922 * if record is None:
109923 */
109924 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_17add_record, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader_add_record, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2122, __pyx_L1_error)
109925 __Pyx_GOTREF(__pyx_t_2);
109926 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_n_s_add_record, __pyx_t_2) < 0) __PYX_ERR(0, 2122, __pyx_L1_error)
109927 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109928 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeader);
109929
109930 /* "pysam/libcbcf.pyx":2133
109931 * self._hdr_sync()
109932 *
109933 * def add_line(self, line): # <<<<<<<<<<<<<<
109934 * """Add a metadata line to this header"""
109935 * bline = force_bytes(line)
109936 */
109937 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_19add_line, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader_add_line, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error)
109938 __Pyx_GOTREF(__pyx_t_2);
109939 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_n_s_add_line, __pyx_t_2) < 0) __PYX_ERR(0, 2133, __pyx_L1_error)
109940 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109941 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeader);
109942
109943 /* "pysam/libcbcf.pyx":2142
109944 *
109945 *
109946 * def add_meta(self, key, value=None, items=None): # <<<<<<<<<<<<<<
109947 * """Add metadata to this header"""
109948 * if not ((value is not None) ^ (items is not None)):
109949 */
109950 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_21add_meta, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader_add_meta, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2142, __pyx_L1_error)
109951 __Pyx_GOTREF(__pyx_t_2);
109952 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__304);
109953 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_n_s_add_meta, __pyx_t_2) < 0) __PYX_ERR(0, 2142, __pyx_L1_error)
109954 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109955 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeader);
109956
109957 /* "pysam/libcbcf.pyx":2184
109958 * raise MemoryError('unable to reallocate VariantHeader')
109959 *
109960 * def add_sample(self, name): # <<<<<<<<<<<<<<
109961 * """Add a new sample to this header"""
109962 * self._add_sample(name)
109963 */
109964 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_23add_sample, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader_add_sample, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2184, __pyx_L1_error)
109965 __Pyx_GOTREF(__pyx_t_2);
109966 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_n_s_add_sample, __pyx_t_2) < 0) __PYX_ERR(0, 2184, __pyx_L1_error)
109967 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109968 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeader);
109969
109970 /* "pysam/libcbcf.pyx":2189
109971 * self._hdr_sync()
109972 *
109973 * def add_samples(self, *args): # <<<<<<<<<<<<<<
109974 * """Add several new samples to this header.
109975 * This function takes multiple arguments, each of which may
109976 */
109977 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_25add_samples, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader_add_samples, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2189, __pyx_L1_error)
109978 __Pyx_GOTREF(__pyx_t_2);
109979 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantHeader, __pyx_n_s_add_samples, __pyx_t_2) < 0) __PYX_ERR(0, 2189, __pyx_L1_error)
109980 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109981 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantHeader);
109982
109983 /* "(tree fragment)":1
109984 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
109985 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
109986 * def __setstate_cython__(self, __pyx_state):
109987 */
109988 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_27__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
109989 __Pyx_GOTREF(__pyx_t_2);
109990 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
109991 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109992
109993 /* "(tree fragment)":3
109994 * def __reduce_cython__(self):
109995 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
109996 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
109997 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
109998 */
109999 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantHeader_29__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantHeader___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
110000 __Pyx_GOTREF(__pyx_t_2);
110001 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
110002 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110003
110004 /* "pysam/libcbcf.pyx":2273
110005 * return makeVariantMetadata(self.record.header, BCF_HL_FLT, id)
110006 *
110007 * def add(self, key): # <<<<<<<<<<<<<<
110008 * """Add a new filter"""
110009 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110010 */
110011 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_9add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_add, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2273, __pyx_L1_error)
110012 __Pyx_GOTREF(__pyx_t_2);
110013 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_add, __pyx_t_2) < 0) __PYX_ERR(0, 2273, __pyx_L1_error)
110014 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110015 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110016
110017 /* "pysam/libcbcf.pyx":2315
110018 * bcf_remove_filter(hdr, r, id, 0)
110019 *
110020 * def clear(self): # <<<<<<<<<<<<<<
110021 * """Clear all filters"""
110022 * cdef bcf1_t *r = self.record.ptr
110023 */
110024 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_13clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_clear, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2315, __pyx_L1_error)
110025 __Pyx_GOTREF(__pyx_t_2);
110026 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_clear, __pyx_t_2) < 0) __PYX_ERR(0, 2315, __pyx_L1_error)
110027 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110028 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110029
110030 /* "pysam/libcbcf.pyx":2329
110031 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, r.d.flt[i]))
110032 *
110033 * def get(self, key, default=None): # <<<<<<<<<<<<<<
110034 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
110035 * try:
110036 */
110037 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_18get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
110038 __Pyx_GOTREF(__pyx_t_2);
110039 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
110040 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 2329, __pyx_L1_error)
110041 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110042 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110043
110044 /* "pysam/libcbcf.pyx":2342
110045 * return bcf_has_filter(hdr, r, bkey) == 1
110046 *
110047 * def iterkeys(self): # <<<<<<<<<<<<<<
110048 * """D.iterkeys() -> an iterator over the keys of D"""
110049 * return iter(self)
110050 */
110051 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_22iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __pyx_L1_error)
110052 __Pyx_GOTREF(__pyx_t_2);
110053 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_iterkeys, __pyx_t_2) < 0) __PYX_ERR(0, 2342, __pyx_L1_error)
110054 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110055 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110056
110057 /* "pysam/libcbcf.pyx":2346
110058 * return iter(self)
110059 *
110060 * def itervalues(self): # <<<<<<<<<<<<<<
110061 * """D.itervalues() -> an iterator over the values of D"""
110062 * for key in self:
110063 */
110064 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_24itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2346, __pyx_L1_error)
110065 __Pyx_GOTREF(__pyx_t_2);
110066 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_itervalues, __pyx_t_2) < 0) __PYX_ERR(0, 2346, __pyx_L1_error)
110067 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110068 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110069
110070 /* "pysam/libcbcf.pyx":2351
110071 * yield self[key]
110072 *
110073 * def iteritems(self): # <<<<<<<<<<<<<<
110074 * """D.iteritems() -> an iterator over the (key, value) items of D"""
110075 * for key in self:
110076 */
110077 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_27iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2351, __pyx_L1_error)
110078 __Pyx_GOTREF(__pyx_t_2);
110079 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(0, 2351, __pyx_L1_error)
110080 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110081 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110082
110083 /* "pysam/libcbcf.pyx":2356
110084 * yield (key, self[key])
110085 *
110086 * def keys(self): # <<<<<<<<<<<<<<
110087 * """D.keys() -> list of D's keys"""
110088 * return list(self)
110089 */
110090 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_30keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2356, __pyx_L1_error)
110091 __Pyx_GOTREF(__pyx_t_2);
110092 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 2356, __pyx_L1_error)
110093 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110094 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110095
110096 /* "pysam/libcbcf.pyx":2360
110097 * return list(self)
110098 *
110099 * def items(self): # <<<<<<<<<<<<<<
110100 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
110101 * return list(self.iteritems())
110102 */
110103 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_32items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2360, __pyx_L1_error)
110104 __Pyx_GOTREF(__pyx_t_2);
110105 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_items, __pyx_t_2) < 0) __PYX_ERR(0, 2360, __pyx_L1_error)
110106 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110107 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110108
110109 /* "pysam/libcbcf.pyx":2364
110110 * return list(self.iteritems())
110111 *
110112 * def values(self): # <<<<<<<<<<<<<<
110113 * """D.values() -> list of D's values"""
110114 * return list(self.itervalues())
110115 */
110116 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_34values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2364, __pyx_L1_error)
110117 __Pyx_GOTREF(__pyx_t_2);
110118 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_values, __pyx_t_2) < 0) __PYX_ERR(0, 2364, __pyx_L1_error)
110119 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110120 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110121
110122 /* "pysam/libcbcf.pyx":2383
110123 *
110124 * # Mappings are not hashable by default, but subclasses can change this
110125 * __hash__ = None # <<<<<<<<<<<<<<
110126 *
110127 * #TODO: implement __richcmp__
110128 */
110129 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 2383, __pyx_L1_error)
110130 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110131
110132 /* "(tree fragment)":1
110133 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
110134 * cdef tuple state
110135 * cdef object _dict
110136 */
110137 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_38__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter___reduce_cyt, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
110138 __Pyx_GOTREF(__pyx_t_2);
110139 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
110140 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110141 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110142
110143 /* "(tree fragment)":16
110144 * else:
110145 * return __pyx_unpickle_VariantRecordFilter, (type(self), 0x70ce871, state)
110146 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
110147 * __pyx_unpickle_VariantRecordFilter__set_state(self, __pyx_state)
110148 */
110149 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFilter_40__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFilter___setstate_c, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
110150 __Pyx_GOTREF(__pyx_t_2);
110151 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
110152 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110153 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFilter);
110154
110155 /* "pysam/libcbcf.pyx":2449
110156 * raise ValueError('Unable to delete FORMAT')
110157 *
110158 * def clear(self): # <<<<<<<<<<<<<<
110159 * """Clear all formats for all samples within the associated
110160 * :class:`VariantRecord` instance"""
110161 */
110162 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_11clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat_clear, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2449, __pyx_L1_error)
110163 __Pyx_GOTREF(__pyx_t_2);
110164 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_clear, __pyx_t_2) < 0) __PYX_ERR(0, 2449, __pyx_L1_error)
110165 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110166 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110167
110168 /* "pysam/libcbcf.pyx":2476
110169 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
110170 *
110171 * def get(self, key, default=None): # <<<<<<<<<<<<<<
110172 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
110173 * try:
110174 */
110175 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_16get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2476, __pyx_L1_error)
110176 __Pyx_GOTREF(__pyx_t_2);
110177 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
110178 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 2476, __pyx_L1_error)
110179 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110180 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110181
110182 /* "pysam/libcbcf.pyx":2490
110183 * return fmt != NULL and fmt.p != NULL
110184 *
110185 * def iterkeys(self): # <<<<<<<<<<<<<<
110186 * """D.iterkeys() -> an iterator over the keys of D"""
110187 * return iter(self)
110188 */
110189 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_20iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2490, __pyx_L1_error)
110190 __Pyx_GOTREF(__pyx_t_2);
110191 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_iterkeys, __pyx_t_2) < 0) __PYX_ERR(0, 2490, __pyx_L1_error)
110192 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110193 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110194
110195 /* "pysam/libcbcf.pyx":2494
110196 * return iter(self)
110197 *
110198 * def itervalues(self): # <<<<<<<<<<<<<<
110199 * """D.itervalues() -> an iterator over the values of D"""
110200 * for key in self:
110201 */
110202 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_22itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2494, __pyx_L1_error)
110203 __Pyx_GOTREF(__pyx_t_2);
110204 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_itervalues, __pyx_t_2) < 0) __PYX_ERR(0, 2494, __pyx_L1_error)
110205 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110206 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110207
110208 /* "pysam/libcbcf.pyx":2499
110209 * yield self[key]
110210 *
110211 * def iteritems(self): # <<<<<<<<<<<<<<
110212 * """D.iteritems() -> an iterator over the (key, value) items of D"""
110213 * for key in self:
110214 */
110215 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_25iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2499, __pyx_L1_error)
110216 __Pyx_GOTREF(__pyx_t_2);
110217 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(0, 2499, __pyx_L1_error)
110218 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110219 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110220
110221 /* "pysam/libcbcf.pyx":2504
110222 * yield (key, self[key])
110223 *
110224 * def keys(self): # <<<<<<<<<<<<<<
110225 * """D.keys() -> list of D's keys"""
110226 * return list(self)
110227 */
110228 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_28keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error)
110229 __Pyx_GOTREF(__pyx_t_2);
110230 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 2504, __pyx_L1_error)
110231 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110232 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110233
110234 /* "pysam/libcbcf.pyx":2508
110235 * return list(self)
110236 *
110237 * def items(self): # <<<<<<<<<<<<<<
110238 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
110239 * return list(self.iteritems())
110240 */
110241 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_30items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2508, __pyx_L1_error)
110242 __Pyx_GOTREF(__pyx_t_2);
110243 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_items, __pyx_t_2) < 0) __PYX_ERR(0, 2508, __pyx_L1_error)
110244 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110245 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110246
110247 /* "pysam/libcbcf.pyx":2512
110248 * return list(self.iteritems())
110249 *
110250 * def values(self): # <<<<<<<<<<<<<<
110251 * """D.values() -> list of D's values"""
110252 * return list(self.itervalues())
110253 */
110254 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_32values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2512, __pyx_L1_error)
110255 __Pyx_GOTREF(__pyx_t_2);
110256 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_values, __pyx_t_2) < 0) __PYX_ERR(0, 2512, __pyx_L1_error)
110257 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110258 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110259
110260 /* "pysam/libcbcf.pyx":2517
110261 *
110262 * # Mappings are not hashable by default, but subclasses can change this
110263 * __hash__ = None # <<<<<<<<<<<<<<
110264 *
110265 * #TODO: implement __richcmp__
110266 */
110267 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 2517, __pyx_L1_error)
110268 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110269
110270 /* "(tree fragment)":1
110271 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
110272 * cdef tuple state
110273 * cdef object _dict
110274 */
110275 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_34__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat___reduce_cyt, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
110276 __Pyx_GOTREF(__pyx_t_2);
110277 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
110278 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110279 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110280
110281 /* "(tree fragment)":16
110282 * else:
110283 * return __pyx_unpickle_VariantRecordFormat, (type(self), 0x70ce871, state)
110284 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
110285 * __pyx_unpickle_VariantRecordFormat__set_state(self, __pyx_state)
110286 */
110287 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordFormat_36__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordFormat___setstate_c, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
110288 __Pyx_GOTREF(__pyx_t_2);
110289 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
110290 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110291 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordFormat);
110292
110293 /* "pysam/libcbcf.pyx":2651
110294 * raise ValueError('Unable to delete INFO')
110295 *
110296 * def clear(self): # <<<<<<<<<<<<<<
110297 * """Clear all info data"""
110298 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110299 */
110300 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_13clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_clear, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2651, __pyx_L1_error)
110301 __Pyx_GOTREF(__pyx_t_2);
110302 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_clear, __pyx_t_2) < 0) __PYX_ERR(0, 2651, __pyx_L1_error)
110303 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110304 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110305
110306 /* "pysam/libcbcf.pyx":2688
110307 * yield bcf_str_cache_get_charptr(key)
110308 *
110309 * def get(self, key, default=None): # <<<<<<<<<<<<<<
110310 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
110311 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110312 */
110313 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_18get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2688, __pyx_L1_error)
110314 __Pyx_GOTREF(__pyx_t_2);
110315 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
110316 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 2688, __pyx_L1_error)
110317 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110318 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110319
110320 /* "pysam/libcbcf.pyx":2734
110321 * return info != NULL and info.vptr != NULL
110322 *
110323 * def iterkeys(self): # <<<<<<<<<<<<<<
110324 * """D.iterkeys() -> an iterator over the keys of D"""
110325 * return iter(self)
110326 */
110327 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_22iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2734, __pyx_L1_error)
110328 __Pyx_GOTREF(__pyx_t_2);
110329 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_iterkeys, __pyx_t_2) < 0) __PYX_ERR(0, 2734, __pyx_L1_error)
110330 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110331 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110332
110333 /* "pysam/libcbcf.pyx":2738
110334 * return iter(self)
110335 *
110336 * def itervalues(self): # <<<<<<<<<<<<<<
110337 * """D.itervalues() -> an iterator over the values of D"""
110338 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110339 */
110340 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_24itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2738, __pyx_L1_error)
110341 __Pyx_GOTREF(__pyx_t_2);
110342 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_itervalues, __pyx_t_2) < 0) __PYX_ERR(0, 2738, __pyx_L1_error)
110343 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110344 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110345
110346 /* "pysam/libcbcf.pyx":2756
110347 * yield bcf_info_get_value(self.record, info)
110348 *
110349 * def iteritems(self): # <<<<<<<<<<<<<<
110350 * """D.iteritems() -> an iterator over the (key, value) items of D"""
110351 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110352 */
110353 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_27iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2756, __pyx_L1_error)
110354 __Pyx_GOTREF(__pyx_t_2);
110355 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(0, 2756, __pyx_L1_error)
110356 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110357 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110358
110359 /* "pysam/libcbcf.pyx":2775
110360 * yield bcf_str_cache_get_charptr(key), value
110361 *
110362 * def keys(self): # <<<<<<<<<<<<<<
110363 * """D.keys() -> list of D's keys"""
110364 * return list(self)
110365 */
110366 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_30keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2775, __pyx_L1_error)
110367 __Pyx_GOTREF(__pyx_t_2);
110368 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 2775, __pyx_L1_error)
110369 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110370 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110371
110372 /* "pysam/libcbcf.pyx":2779
110373 * return list(self)
110374 *
110375 * def items(self): # <<<<<<<<<<<<<<
110376 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
110377 * return list(self.iteritems())
110378 */
110379 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_32items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2779, __pyx_L1_error)
110380 __Pyx_GOTREF(__pyx_t_2);
110381 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_items, __pyx_t_2) < 0) __PYX_ERR(0, 2779, __pyx_L1_error)
110382 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110383 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110384
110385 /* "pysam/libcbcf.pyx":2783
110386 * return list(self.iteritems())
110387 *
110388 * def values(self): # <<<<<<<<<<<<<<
110389 * """D.values() -> list of D's values"""
110390 * return list(self.itervalues())
110391 */
110392 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_34values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2783, __pyx_L1_error)
110393 __Pyx_GOTREF(__pyx_t_2);
110394 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_values, __pyx_t_2) < 0) __PYX_ERR(0, 2783, __pyx_L1_error)
110395 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110396 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110397
110398 /* "pysam/libcbcf.pyx":2787
110399 * return list(self.itervalues())
110400 *
110401 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
110402 * """D.update([E, ]**F) -> None.
110403 *
110404 */
110405 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_36update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_update, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2787, __pyx_L1_error)
110406 __Pyx_GOTREF(__pyx_t_2);
110407 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
110408 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_update, __pyx_t_2) < 0) __PYX_ERR(0, 2787, __pyx_L1_error)
110409 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110410 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110411
110412 /* "pysam/libcbcf.pyx":2801
110413 * self[k] = v
110414 *
110415 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
110416 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110417 * cdef bcf1_t *r = self.record.ptr
110418 */
110419 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
110420 __pyx_k__146 = __pyx_v_5pysam_7libcbcf__nothing;
110421 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
110422 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2801, __pyx_L1_error)
110423 __Pyx_GOTREF(__pyx_t_2);
110424 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
110425 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
110426 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_5pysam_7libcbcf__nothing)) __PYX_ERR(0, 2801, __pyx_L1_error);
110427 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_38pop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo_pop, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2801, __pyx_L1_error)
110428 __Pyx_GOTREF(__pyx_t_3);
110429 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
110430 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110431 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_pop, __pyx_t_3) < 0) __PYX_ERR(0, 2801, __pyx_L1_error)
110432 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110433 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110434
110435 /* "pysam/libcbcf.pyx":2854
110436 *
110437 * # Mappings are not hashable by default, but subclasses can change this
110438 * __hash__ = None # <<<<<<<<<<<<<<
110439 *
110440 *
110441 */
110442 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 2854, __pyx_L1_error)
110443 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110444
110445 /* "(tree fragment)":1
110446 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
110447 * cdef tuple state
110448 * cdef object _dict
110449 */
110450 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_42__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo___reduce_cytho, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1, __pyx_L1_error)
110451 __Pyx_GOTREF(__pyx_t_3);
110452 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
110453 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110454 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110455
110456 /* "(tree fragment)":16
110457 * else:
110458 * return __pyx_unpickle_VariantRecordInfo, (type(self), 0x70ce871, state)
110459 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
110460 * __pyx_unpickle_VariantRecordInfo__set_state(self, __pyx_state)
110461 */
110462 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17VariantRecordInfo_44__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordInfo___setstate_cyt, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 16, __pyx_L1_error)
110463 __Pyx_GOTREF(__pyx_t_3);
110464 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
110465 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110466 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordInfo);
110467
110468 /* "pysam/libcbcf.pyx":2907
110469 * yield charptr_to_str(hdr.samples[i])
110470 *
110471 * def get(self, key, default=None): # <<<<<<<<<<<<<<
110472 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
110473 * try:
110474 */
110475 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_12get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2907, __pyx_L1_error)
110476 __Pyx_GOTREF(__pyx_t_3);
110477 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__4);
110478 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_get, __pyx_t_3) < 0) __PYX_ERR(0, 2907, __pyx_L1_error)
110479 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110480 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110481
110482 /* "pysam/libcbcf.pyx":2932
110483 * return 0 <= sample_index < n
110484 *
110485 * def iterkeys(self): # <<<<<<<<<<<<<<
110486 * """D.iterkeys() -> an iterator over the keys of D"""
110487 * return iter(self)
110488 */
110489 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_16iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2932, __pyx_L1_error)
110490 __Pyx_GOTREF(__pyx_t_3);
110491 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_iterkeys, __pyx_t_3) < 0) __PYX_ERR(0, 2932, __pyx_L1_error)
110492 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110493 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110494
110495 /* "pysam/libcbcf.pyx":2936
110496 * return iter(self)
110497 *
110498 * def itervalues(self): # <<<<<<<<<<<<<<
110499 * """D.itervalues() -> an iterator over the values of D"""
110500 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110501 */
110502 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_18itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2936, __pyx_L1_error)
110503 __Pyx_GOTREF(__pyx_t_3);
110504 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_itervalues, __pyx_t_3) < 0) __PYX_ERR(0, 2936, __pyx_L1_error)
110505 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110506 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110507
110508 /* "pysam/libcbcf.pyx":2945
110509 * yield makeVariantRecordSample(self.record, i)
110510 *
110511 * def iteritems(self): # <<<<<<<<<<<<<<
110512 * """D.iteritems() -> an iterator over the (key, value) items of D"""
110513 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110514 */
110515 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_21iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2945, __pyx_L1_error)
110516 __Pyx_GOTREF(__pyx_t_3);
110517 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_iteritems, __pyx_t_3) < 0) __PYX_ERR(0, 2945, __pyx_L1_error)
110518 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110519 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110520
110521 /* "pysam/libcbcf.pyx":2954
110522 * yield (charptr_to_str(hdr.samples[i]), makeVariantRecordSample(self.record, i))
110523 *
110524 * def keys(self): # <<<<<<<<<<<<<<
110525 * """D.keys() -> list of D's keys"""
110526 * return list(self)
110527 */
110528 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_24keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2954, __pyx_L1_error)
110529 __Pyx_GOTREF(__pyx_t_3);
110530 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_keys, __pyx_t_3) < 0) __PYX_ERR(0, 2954, __pyx_L1_error)
110531 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110532 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110533
110534 /* "pysam/libcbcf.pyx":2958
110535 * return list(self)
110536 *
110537 * def items(self): # <<<<<<<<<<<<<<
110538 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
110539 * return list(self.iteritems())
110540 */
110541 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_26items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2958, __pyx_L1_error)
110542 __Pyx_GOTREF(__pyx_t_3);
110543 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_items, __pyx_t_3) < 0) __PYX_ERR(0, 2958, __pyx_L1_error)
110544 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110545 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110546
110547 /* "pysam/libcbcf.pyx":2962
110548 * return list(self.iteritems())
110549 *
110550 * def values(self): # <<<<<<<<<<<<<<
110551 * """D.values() -> list of D's values"""
110552 * return list(self.itervalues())
110553 */
110554 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_28values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2962, __pyx_L1_error)
110555 __Pyx_GOTREF(__pyx_t_3);
110556 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_values, __pyx_t_3) < 0) __PYX_ERR(0, 2962, __pyx_L1_error)
110557 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110558 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110559
110560 /* "pysam/libcbcf.pyx":2966
110561 * return list(self.itervalues())
110562 *
110563 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
110564 * """D.update([E, ]**F) -> None.
110565 *
110566 */
110567 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_30update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_update, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2966, __pyx_L1_error)
110568 __Pyx_GOTREF(__pyx_t_3);
110569 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__4);
110570 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_update, __pyx_t_3) < 0) __PYX_ERR(0, 2966, __pyx_L1_error)
110571 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110572 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110573
110574 /* "pysam/libcbcf.pyx":2978
110575 * self[k] = v
110576 *
110577 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
110578 * try:
110579 * value = self[key]
110580 */
110581 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
110582 __pyx_k__158 = __pyx_v_5pysam_7libcbcf__nothing;
110583 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
110584 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2978, __pyx_L1_error)
110585 __Pyx_GOTREF(__pyx_t_3);
110586 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
110587 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
110588 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_5pysam_7libcbcf__nothing)) __PYX_ERR(0, 2978, __pyx_L1_error);
110589 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_32pop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples_pop, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2978, __pyx_L1_error)
110590 __Pyx_GOTREF(__pyx_t_2);
110591 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
110592 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110593 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_pop, __pyx_t_2) < 0) __PYX_ERR(0, 2978, __pyx_L1_error)
110594 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110595 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110596
110597 /* "pysam/libcbcf.pyx":3003
110598 *
110599 * # Mappings are not hashable by default, but subclasses can change this
110600 * __hash__ = None # <<<<<<<<<<<<<<
110601 *
110602 *
110603 */
110604 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 3003, __pyx_L1_error)
110605 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110606
110607 /* "(tree fragment)":1
110608 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
110609 * cdef tuple state
110610 * cdef object _dict
110611 */
110612 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_36__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples___reduce_cy, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
110613 __Pyx_GOTREF(__pyx_t_2);
110614 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
110615 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110616 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110617
110618 /* "(tree fragment)":16
110619 * else:
110620 * return __pyx_unpickle_VariantRecordSamples, (type(self), 0x70ce871, state)
110621 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
110622 * __pyx_unpickle_VariantRecordSamples__set_state(self, __pyx_state)
110623 */
110624 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_20VariantRecordSamples_38__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSamples___setstate, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
110625 __Pyx_GOTREF(__pyx_t_2);
110626 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
110627 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110628 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSamples);
110629
110630 /* "pysam/libcbcf.pyx":3027
110631 * self.ptr = NULL
110632 *
110633 * def copy(self): # <<<<<<<<<<<<<<
110634 * """return a copy of this VariantRecord object"""
110635 * return makeVariantRecord(self.header, bcf_dup(self.ptr))
110636 */
110637 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantRecord_5copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecord_copy, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3027, __pyx_L1_error)
110638 __Pyx_GOTREF(__pyx_t_2);
110639 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecord, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 3027, __pyx_L1_error)
110640 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110641 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecord);
110642
110643 /* "pysam/libcbcf.pyx":3031
110644 * return makeVariantRecord(self.header, bcf_dup(self.ptr))
110645 *
110646 * def translate(self, VariantHeader dst_header): # <<<<<<<<<<<<<<
110647 * if dst_header is None:
110648 * raise ValueError('dst_header must not be None')
110649 */
110650 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantRecord_7translate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecord_translate, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
110651 __Pyx_GOTREF(__pyx_t_2);
110652 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecord, __pyx_n_s_translate, __pyx_t_2) < 0) __PYX_ERR(0, 3031, __pyx_L1_error)
110653 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110654 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecord);
110655
110656 /* "(tree fragment)":1
110657 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
110658 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
110659 * def __setstate_cython__(self, __pyx_state):
110660 */
110661 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantRecord_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecord___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
110662 __Pyx_GOTREF(__pyx_t_2);
110663 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
110664 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110665
110666 /* "(tree fragment)":3
110667 * def __reduce_cython__(self):
110668 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
110669 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
110670 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
110671 */
110672 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13VariantRecord_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecord___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
110673 __Pyx_GOTREF(__pyx_t_2);
110674 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
110675 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110676
110677 /* "pysam/libcbcf.pyx":3545
110678 * bcf_format_del_value(self, key)
110679 *
110680 * def clear(self): # <<<<<<<<<<<<<<
110681 * """Clear all format data (including genotype) for this sample"""
110682 * cdef bcf_hdr_t *hdr = self.record.header.ptr
110683 */
110684 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_13clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_clear, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3545, __pyx_L1_error)
110685 __Pyx_GOTREF(__pyx_t_2);
110686 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_clear, __pyx_t_2) < 0) __PYX_ERR(0, 3545, __pyx_L1_error)
110687 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110688 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110689
110690 /* "pysam/libcbcf.pyx":3568
110691 * yield bcf_str_cache_get_charptr(bcf_hdr_int2id(hdr, BCF_DT_ID, fmt.id))
110692 *
110693 * def get(self, key, default=None): # <<<<<<<<<<<<<<
110694 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
110695 * try:
110696 */
110697 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_18get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3568, __pyx_L1_error)
110698 __Pyx_GOTREF(__pyx_t_2);
110699 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
110700 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 3568, __pyx_L1_error)
110701 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110702 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110703
110704 /* "pysam/libcbcf.pyx":3582
110705 * return fmt != NULL and fmt.p != NULL
110706 *
110707 * def iterkeys(self): # <<<<<<<<<<<<<<
110708 * """D.iterkeys() -> an iterator over the keys of D"""
110709 * return iter(self)
110710 */
110711 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_22iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3582, __pyx_L1_error)
110712 __Pyx_GOTREF(__pyx_t_2);
110713 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_iterkeys, __pyx_t_2) < 0) __PYX_ERR(0, 3582, __pyx_L1_error)
110714 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110715 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110716
110717 /* "pysam/libcbcf.pyx":3586
110718 * return iter(self)
110719 *
110720 * def itervalues(self): # <<<<<<<<<<<<<<
110721 * """D.itervalues() -> an iterator over the values of D"""
110722 * for key in self:
110723 */
110724 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_24itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3586, __pyx_L1_error)
110725 __Pyx_GOTREF(__pyx_t_2);
110726 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_itervalues, __pyx_t_2) < 0) __PYX_ERR(0, 3586, __pyx_L1_error)
110727 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110728 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110729
110730 /* "pysam/libcbcf.pyx":3591
110731 * yield self[key]
110732 *
110733 * def iteritems(self): # <<<<<<<<<<<<<<
110734 * """D.iteritems() -> an iterator over the (key, value) items of D"""
110735 * for key in self:
110736 */
110737 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_27iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3591, __pyx_L1_error)
110738 __Pyx_GOTREF(__pyx_t_2);
110739 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(0, 3591, __pyx_L1_error)
110740 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110741 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110742
110743 /* "pysam/libcbcf.pyx":3596
110744 * yield (key, self[key])
110745 *
110746 * def keys(self): # <<<<<<<<<<<<<<
110747 * """D.keys() -> list of D's keys"""
110748 * return list(self)
110749 */
110750 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_30keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3596, __pyx_L1_error)
110751 __Pyx_GOTREF(__pyx_t_2);
110752 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 3596, __pyx_L1_error)
110753 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110754 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110755
110756 /* "pysam/libcbcf.pyx":3600
110757 * return list(self)
110758 *
110759 * def items(self): # <<<<<<<<<<<<<<
110760 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
110761 * return list(self.iteritems())
110762 */
110763 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_32items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3600, __pyx_L1_error)
110764 __Pyx_GOTREF(__pyx_t_2);
110765 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_items, __pyx_t_2) < 0) __PYX_ERR(0, 3600, __pyx_L1_error)
110766 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110767 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110768
110769 /* "pysam/libcbcf.pyx":3604
110770 * return list(self.iteritems())
110771 *
110772 * def values(self): # <<<<<<<<<<<<<<
110773 * """D.values() -> list of D's values"""
110774 * return list(self.itervalues())
110775 */
110776 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_34values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3604, __pyx_L1_error)
110777 __Pyx_GOTREF(__pyx_t_2);
110778 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_values, __pyx_t_2) < 0) __PYX_ERR(0, 3604, __pyx_L1_error)
110779 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110780 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110781
110782 /* "pysam/libcbcf.pyx":3608
110783 * return list(self.itervalues())
110784 *
110785 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
110786 * """D.update([E, ]**F) -> None.
110787 *
110788 */
110789 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_36update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_update, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3608, __pyx_L1_error)
110790 __Pyx_GOTREF(__pyx_t_2);
110791 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__4);
110792 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_update, __pyx_t_2) < 0) __PYX_ERR(0, 3608, __pyx_L1_error)
110793 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110794 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110795
110796 /* "pysam/libcbcf.pyx":3620
110797 * self[k] = v
110798 *
110799 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
110800 * try:
110801 * value = self[key]
110802 */
110803 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
110804 __pyx_k__193 = __pyx_v_5pysam_7libcbcf__nothing;
110805 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
110806 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3620, __pyx_L1_error)
110807 __Pyx_GOTREF(__pyx_t_2);
110808 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
110809 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
110810 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_5pysam_7libcbcf__nothing)) __PYX_ERR(0, 3620, __pyx_L1_error);
110811 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_38pop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample_pop, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3620, __pyx_L1_error)
110812 __Pyx_GOTREF(__pyx_t_3);
110813 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
110814 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110815 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_pop, __pyx_t_3) < 0) __PYX_ERR(0, 3620, __pyx_L1_error)
110816 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110817 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110818
110819 /* "pysam/libcbcf.pyx":3642
110820 *
110821 * # Mappings are not hashable by default, but subclasses can change this
110822 * __hash__ = None # <<<<<<<<<<<<<<
110823 *
110824 *
110825 */
110826 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 3642, __pyx_L1_error)
110827 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110828
110829 /* "(tree fragment)":1
110830 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
110831 * cdef tuple state
110832 * cdef object _dict
110833 */
110834 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_42__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample___reduce_cyt, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1, __pyx_L1_error)
110835 __Pyx_GOTREF(__pyx_t_3);
110836 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
110837 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110838 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110839
110840 /* "(tree fragment)":16
110841 * else:
110842 * return __pyx_unpickle_VariantRecordSample, (type(self), 0xeeb89f3, state)
110843 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
110844 * __pyx_unpickle_VariantRecordSample__set_state(self, __pyx_state)
110845 */
110846 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19VariantRecordSample_44__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantRecordSample___setstate_c, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 16, __pyx_L1_error)
110847 __Pyx_GOTREF(__pyx_t_3);
110848 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantRecordSample, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
110849 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110850 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantRecordSample);
110851
110852 /* "pysam/libcbcf.pyx":3682
110853 * return iter(self.refs)
110854 *
110855 * def get(self, key, default=None): # <<<<<<<<<<<<<<
110856 * """D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."""
110857 * try:
110858 */
110859 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_11get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_get, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3682, __pyx_L1_error)
110860 __Pyx_GOTREF(__pyx_t_3);
110861 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__4);
110862 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_get, __pyx_t_3) < 0) __PYX_ERR(0, 3682, __pyx_L1_error)
110863 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110864 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110865
110866 /* "pysam/libcbcf.pyx":3697
110867 * return True
110868 *
110869 * def iterkeys(self): # <<<<<<<<<<<<<<
110870 * """D.iterkeys() -> an iterator over the keys of D"""
110871 * return iter(self)
110872 */
110873 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_15iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_iterkeys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3697, __pyx_L1_error)
110874 __Pyx_GOTREF(__pyx_t_3);
110875 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_iterkeys, __pyx_t_3) < 0) __PYX_ERR(0, 3697, __pyx_L1_error)
110876 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110877 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110878
110879 /* "pysam/libcbcf.pyx":3701
110880 * return iter(self)
110881 *
110882 * def itervalues(self): # <<<<<<<<<<<<<<
110883 * """D.itervalues() -> an iterator over the values of D"""
110884 * for key in self:
110885 */
110886 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_17itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_itervalues, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3701, __pyx_L1_error)
110887 __Pyx_GOTREF(__pyx_t_3);
110888 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_itervalues, __pyx_t_3) < 0) __PYX_ERR(0, 3701, __pyx_L1_error)
110889 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110890 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110891
110892 /* "pysam/libcbcf.pyx":3706
110893 * yield self[key]
110894 *
110895 * def iteritems(self): # <<<<<<<<<<<<<<
110896 * """D.iteritems() -> an iterator over the (key, value) items of D"""
110897 * for key in self:
110898 */
110899 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_20iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_iteritems, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3706, __pyx_L1_error)
110900 __Pyx_GOTREF(__pyx_t_3);
110901 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_iteritems, __pyx_t_3) < 0) __PYX_ERR(0, 3706, __pyx_L1_error)
110902 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110903 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110904
110905 /* "pysam/libcbcf.pyx":3711
110906 * yield (key, self[key])
110907 *
110908 * def keys(self): # <<<<<<<<<<<<<<
110909 * """D.keys() -> list of D's keys"""
110910 * return list(self)
110911 */
110912 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_23keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_keys, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3711, __pyx_L1_error)
110913 __Pyx_GOTREF(__pyx_t_3);
110914 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_keys, __pyx_t_3) < 0) __PYX_ERR(0, 3711, __pyx_L1_error)
110915 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110916 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110917
110918 /* "pysam/libcbcf.pyx":3715
110919 * return list(self)
110920 *
110921 * def items(self): # <<<<<<<<<<<<<<
110922 * """D.items() -> list of D's (key, value) pairs, as 2-tuples"""
110923 * return list(self.iteritems())
110924 */
110925 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_25items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_items, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3715, __pyx_L1_error)
110926 __Pyx_GOTREF(__pyx_t_3);
110927 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_items, __pyx_t_3) < 0) __PYX_ERR(0, 3715, __pyx_L1_error)
110928 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110929 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110930
110931 /* "pysam/libcbcf.pyx":3719
110932 * return list(self.iteritems())
110933 *
110934 * def values(self): # <<<<<<<<<<<<<<
110935 * """D.values() -> list of D's values"""
110936 * return list(self.itervalues())
110937 */
110938 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_27values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_values, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3719, __pyx_L1_error)
110939 __Pyx_GOTREF(__pyx_t_3);
110940 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_values, __pyx_t_3) < 0) __PYX_ERR(0, 3719, __pyx_L1_error)
110941 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110942 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110943
110944 /* "pysam/libcbcf.pyx":3723
110945 * return list(self.itervalues())
110946 *
110947 * def update(self, items=None, **kwargs): # <<<<<<<<<<<<<<
110948 * """D.update([E, ]**F) -> None.
110949 *
110950 */
110951 __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_29update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_update, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3723, __pyx_L1_error)
110952 __Pyx_GOTREF(__pyx_t_3);
110953 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__4);
110954 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_update, __pyx_t_3) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
110955 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110956 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110957
110958 /* "pysam/libcbcf.pyx":3735
110959 * self[k] = v
110960 *
110961 * def pop(self, key, default=_nothing): # <<<<<<<<<<<<<<
110962 * try:
110963 * value = self[key]
110964 */
110965 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
110966 __pyx_k__206 = __pyx_v_5pysam_7libcbcf__nothing;
110967 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
110968 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3735, __pyx_L1_error)
110969 __Pyx_GOTREF(__pyx_t_3);
110970 __Pyx_INCREF(__pyx_v_5pysam_7libcbcf__nothing);
110971 __Pyx_GIVEREF(__pyx_v_5pysam_7libcbcf__nothing);
110972 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_5pysam_7libcbcf__nothing)) __PYX_ERR(0, 3735, __pyx_L1_error);
110973 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_31pop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex_pop, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3735, __pyx_L1_error)
110974 __Pyx_GOTREF(__pyx_t_2);
110975 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
110976 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
110977 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_pop, __pyx_t_2) < 0) __PYX_ERR(0, 3735, __pyx_L1_error)
110978 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
110979 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110980
110981 /* "pysam/libcbcf.pyx":3746
110982 *
110983 * # Mappings are not hashable by default, but subclasses can change this
110984 * __hash__ = None # <<<<<<<<<<<<<<
110985 *
110986 * #TODO: implement __richcmp__
110987 */
110988 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 3746, __pyx_L1_error)
110989 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
110990
110991 /* "(tree fragment)":1
110992 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
110993 * cdef tuple state
110994 * cdef object _dict
110995 */
110996 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_33__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
110997 __Pyx_GOTREF(__pyx_t_2);
110998 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
110999 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111000 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
111001
111002 /* "(tree fragment)":16
111003 * else:
111004 * return __pyx_unpickle_BaseIndex, (type(self), 0x7898a51, state)
111005 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
111006 * __pyx_unpickle_BaseIndex__set_state(self, __pyx_state)
111007 */
111008 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9BaseIndex_35__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIndex___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error)
111009 __Pyx_GOTREF(__pyx_t_2);
111010 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BaseIndex, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 16, __pyx_L1_error)
111011 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111012 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BaseIndex);
111013
111014 /* "pysam/libcbcf.pyx":3771
111015 * self.ptr = NULL
111016 *
111017 * def fetch(self, bcf, contig, start, stop, reopen): # <<<<<<<<<<<<<<
111018 * return BCFIterator(bcf, contig, start, stop, reopen)
111019 *
111020 */
111021 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_8BCFIndex_5fetch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BCFIndex_fetch, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3771, __pyx_L1_error)
111022 __Pyx_GOTREF(__pyx_t_2);
111023 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_BCFIndex, __pyx_n_s_fetch, __pyx_t_2) < 0) __PYX_ERR(0, 3771, __pyx_L1_error)
111024 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111025 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_BCFIndex);
111026
111027 /* "(tree fragment)":1
111028 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
111029 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
111030 * def __setstate_cython__(self, __pyx_state):
111031 */
111032 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_8BCFIndex_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BCFIndex___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111033 __Pyx_GOTREF(__pyx_t_2);
111034 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111035 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111036
111037 /* "(tree fragment)":3
111038 * def __reduce_cython__(self):
111039 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
111040 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
111041 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
111042 */
111043 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_8BCFIndex_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BCFIndex___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
111044 __Pyx_GOTREF(__pyx_t_2);
111045 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
111046 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111047
111048 /* "pysam/libcbcf.pyx":3810
111049 * self.ptr = NULL
111050 *
111051 * def fetch(self, bcf, contig, start, stop, reopen): # <<<<<<<<<<<<<<
111052 * return TabixIterator(bcf, contig, start, stop, reopen)
111053 *
111054 */
111055 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_10TabixIndex_5fetch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIndex_fetch, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3810, __pyx_L1_error)
111056 __Pyx_GOTREF(__pyx_t_2);
111057 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_TabixIndex, __pyx_n_s_fetch, __pyx_t_2) < 0) __PYX_ERR(0, 3810, __pyx_L1_error)
111058 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111059 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_TabixIndex);
111060
111061 /* "(tree fragment)":1
111062 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
111063 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
111064 * def __setstate_cython__(self, __pyx_state):
111065 */
111066 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_10TabixIndex_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIndex___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111067 __Pyx_GOTREF(__pyx_t_2);
111068 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111069 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111070
111071 /* "(tree fragment)":3
111072 * def __reduce_cython__(self):
111073 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
111074 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
111075 * raise TypeError, "self.ptr cannot be converted to a Python object for pickling"
111076 */
111077 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_10TabixIndex_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIndex___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
111078 __Pyx_GOTREF(__pyx_t_2);
111079 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
111080 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111081
111082 /* "(tree fragment)":1
111083 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
111084 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
111085 * def __setstate_cython__(self, __pyx_state):
111086 */
111087 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_12BaseIterator_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIterator___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111088 __Pyx_GOTREF(__pyx_t_2);
111089 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111090 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111091
111092 /* "(tree fragment)":3
111093 * def __reduce_cython__(self):
111094 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
111095 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
111096 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
111097 */
111098 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_12BaseIterator_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseIterator___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
111099 __Pyx_GOTREF(__pyx_t_2);
111100 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
111101 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111102
111103 /* "(tree fragment)":1
111104 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
111105 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
111106 * def __setstate_cython__(self, __pyx_state):
111107 */
111108 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11BCFIterator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BCFIterator___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111109 __Pyx_GOTREF(__pyx_t_2);
111110 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111111 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111112
111113 /* "(tree fragment)":3
111114 * def __reduce_cython__(self):
111115 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
111116 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
111117 * raise TypeError, "self.iter cannot be converted to a Python object for pickling"
111118 */
111119 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11BCFIterator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BCFIterator___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
111120 __Pyx_GOTREF(__pyx_t_2);
111121 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
111122 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111123
111124 /* "(tree fragment)":1
111125 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
111126 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
111127 * def __setstate_cython__(self, __pyx_state):
111128 */
111129 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13TabixIterator_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIterator___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111130 __Pyx_GOTREF(__pyx_t_2);
111131 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111132 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111133
111134 /* "(tree fragment)":3
111135 * def __reduce_cython__(self):
111136 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
111137 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
111138 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
111139 */
111140 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13TabixIterator_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TabixIterator___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
111141 __Pyx_GOTREF(__pyx_t_2);
111142 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
111143 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111144
111145 /* "pysam/libcbcf.pyx":4135
111146 * raise IOError(errno, force_str(strerror(errno)))
111147 *
111148 * def close(self): # <<<<<<<<<<<<<<
111149 * """closes the :class:`pysam.VariantFile`."""
111150 * if not self.htsfile:
111151 */
111152 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_7close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_close, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4135, __pyx_L1_error)
111153 __Pyx_GOTREF(__pyx_t_2);
111154 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(0, 4135, __pyx_L1_error)
111155 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111156 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111157
111158 /* "pysam/libcbcf.pyx":4197
111159 * return makeVariantRecord(self.header, record)
111160 *
111161 * def copy(self): # <<<<<<<<<<<<<<
111162 * if not self.is_open:
111163 * raise ValueError
111164 */
111165 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_13copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_copy, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4197, __pyx_L1_error)
111166 __Pyx_GOTREF(__pyx_t_2);
111167 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 4197, __pyx_L1_error)
111168 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111169 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111170
111171 /* "pysam/libcbcf.pyx":4235
111172 * return vars
111173 *
111174 * def open(self, filename, mode='r', # <<<<<<<<<<<<<<
111175 * index_filename=None,
111176 * VariantHeader header=None,
111177 */
111178 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_15open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_open, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4235, __pyx_L1_error)
111179 __Pyx_GOTREF(__pyx_t_2);
111180 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__320);
111181 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_open, __pyx_t_2) < 0) __PYX_ERR(0, 4235, __pyx_L1_error)
111182 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111183 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111184
111185 /* "pysam/libcbcf.pyx":4380
111186 * raise ValueError('unknown mode {}'.format(mode))
111187 *
111188 * def reset(self): # <<<<<<<<<<<<<<
111189 * """reset file position to beginning of file just after the header."""
111190 * return self.seek(self.start_offset)
111191 */
111192 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_17reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_reset, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4380, __pyx_L1_error)
111193 __Pyx_GOTREF(__pyx_t_2);
111194 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_reset, __pyx_t_2) < 0) __PYX_ERR(0, 4380, __pyx_L1_error)
111195 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111196 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111197
111198 /* "pysam/libcbcf.pyx":4384
111199 * return self.seek(self.start_offset)
111200 *
111201 * def is_valid_tid(self, tid): # <<<<<<<<<<<<<<
111202 * """
111203 * return True if the numerical :term:`tid` is valid; False otherwise.
111204 */
111205 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_19is_valid_tid, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_is_valid_tid, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4384, __pyx_L1_error)
111206 __Pyx_GOTREF(__pyx_t_2);
111207 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_is_valid_tid, __pyx_t_2) < 0) __PYX_ERR(0, 4384, __pyx_L1_error)
111208 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111209 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111210
111211 /* "pysam/libcbcf.pyx":4397
111212 * return 0 <= rid < hdr.n[BCF_DT_CTG]
111213 *
111214 * def get_tid(self, reference): # <<<<<<<<<<<<<<
111215 * """
111216 * return the numerical :term:`tid` corresponding to
111217 */
111218 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_21get_tid, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_get_tid, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4397, __pyx_L1_error)
111219 __Pyx_GOTREF(__pyx_t_2);
111220 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_get_tid, __pyx_t_2) < 0) __PYX_ERR(0, 4397, __pyx_L1_error)
111221 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111222 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111223
111224 /* "pysam/libcbcf.pyx":4412
111225 * return kh_val_vdict(d, k).id if k != kh_end(d) else -1
111226 *
111227 * def get_reference_name(self, tid): # <<<<<<<<<<<<<<
111228 * """
111229 * return :term:`reference` name corresponding to numerical :term:`tid`
111230 */
111231 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_23get_reference_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_get_reference_name, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4412, __pyx_L1_error)
111232 __Pyx_GOTREF(__pyx_t_2);
111233 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_get_reference_name, __pyx_t_2) < 0) __PYX_ERR(0, 4412, __pyx_L1_error)
111234 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111235 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111236
111237 /* "pysam/libcbcf.pyx":4425
111238 * return bcf_str_cache_get_charptr(bcf_hdr_id2name(hdr, rid))
111239 *
111240 * def fetch(self, contig=None, start=None, stop=None, region=None, reopen=False, end=None, reference=None): # <<<<<<<<<<<<<<
111241 * """fetch records in a :term:`region`, specified either by
111242 * :term:`contig`, *start*, and *end* (which are 0-based, half-open);
111243 */
111244 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_25fetch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_fetch, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4425, __pyx_L1_error)
111245 __Pyx_GOTREF(__pyx_t_2);
111246 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__325);
111247 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_fetch, __pyx_t_2) < 0) __PYX_ERR(0, 4425, __pyx_L1_error)
111248 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111249 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111250
111251 /* "pysam/libcbcf.pyx":4471
111252 * return self.index.fetch(self, contig, start, stop, reopen)
111253 *
111254 * def new_record(self, *args, **kwargs): # <<<<<<<<<<<<<<
111255 * """Create a new empty :class:`VariantRecord`.
111256 *
111257 */
111258 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_27new_record, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_new_record, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4471, __pyx_L1_error)
111259 __Pyx_GOTREF(__pyx_t_2);
111260 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_new_record, __pyx_t_2) < 0) __PYX_ERR(0, 4471, __pyx_L1_error)
111261 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111262 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111263
111264 /* "pysam/libcbcf.pyx":4478
111265 * return self.header.new_record(*args, **kwargs)
111266 *
111267 * cpdef int write(self, VariantRecord record) except -1: # <<<<<<<<<<<<<<
111268 * """
111269 * write a single :class:`pysam.VariantRecord` to disk.
111270 */
111271 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_29write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_write, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4478, __pyx_L1_error)
111272 __Pyx_GOTREF(__pyx_t_2);
111273 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(0, 4478, __pyx_L1_error)
111274 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111275 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111276
111277 /* "pysam/libcbcf.pyx":4519
111278 * return ret
111279 *
111280 * def subset_samples(self, include_samples): # <<<<<<<<<<<<<<
111281 * """
111282 * Read only a subset of samples to reduce processing time and memory.
111283 */
111284 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_31subset_samples, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile_subset_samples, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4519, __pyx_L1_error)
111285 __Pyx_GOTREF(__pyx_t_2);
111286 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcbcf_VariantFile, __pyx_n_s_subset_samples, __pyx_t_2) < 0) __PYX_ERR(0, 4519, __pyx_L1_error)
111287 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111288 PyType_Modified(__pyx_ptype_5pysam_7libcbcf_VariantFile);
111289
111290 /* "(tree fragment)":1
111291 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
111292 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
111293 * def __setstate_cython__(self, __pyx_state):
111294 */
111295 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_33__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile___reduce_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111296 __Pyx_GOTREF(__pyx_t_2);
111297 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111298 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111299
111300 /* "(tree fragment)":3
111301 * def __reduce_cython__(self):
111302 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
111303 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
111304 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
111305 */
111306 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11VariantFile_35__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VariantFile___setstate_cython, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
111307 __Pyx_GOTREF(__pyx_t_2);
111308 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
111309 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111310
111311 /* "(tree fragment)":1
111312 * def __pyx_unpickle_VariantHeaderRecords(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
111313 * cdef object __pyx_PickleError
111314 * cdef object __pyx_result
111315 */
111316 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_1__pyx_unpickle_VariantHeaderRecords, 0, __pyx_n_s_pyx_unpickle_VariantHeaderReco, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111317 __Pyx_GOTREF(__pyx_t_2);
111318 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantHeaderReco, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111319 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111320
111321 /* "(tree fragment)":11
111322 * __pyx_unpickle_VariantHeaderRecords__set_state(<VariantHeaderRecords> __pyx_result, __pyx_state)
111323 * return __pyx_result
111324 * cdef __pyx_unpickle_VariantHeaderRecords__set_state(VariantHeaderRecords __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
111325 * __pyx_result.header = __pyx_state[0]
111326 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
111327 */
111328 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_3__pyx_unpickle_VariantMetadata, 0, __pyx_n_s_pyx_unpickle_VariantMetadata, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111329 __Pyx_GOTREF(__pyx_t_2);
111330 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantMetadata, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111331 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111332
111333 /* "(tree fragment)":1
111334 * def __pyx_unpickle_VariantHeaderMetadata(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
111335 * cdef object __pyx_PickleError
111336 * cdef object __pyx_result
111337 */
111338 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_5__pyx_unpickle_VariantHeaderMetadata, 0, __pyx_n_s_pyx_unpickle_VariantHeaderMeta, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111339 __Pyx_GOTREF(__pyx_t_2);
111340 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantHeaderMeta, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111341 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111342
111343 /* "(tree fragment)":11
111344 * __pyx_unpickle_VariantHeaderMetadata__set_state(<VariantHeaderMetadata> __pyx_result, __pyx_state)
111345 * return __pyx_result
111346 * cdef __pyx_unpickle_VariantHeaderMetadata__set_state(VariantHeaderMetadata __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
111347 * __pyx_result.header = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
111348 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
111349 */
111350 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_7__pyx_unpickle_VariantContig, 0, __pyx_n_s_pyx_unpickle_VariantContig, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111351 __Pyx_GOTREF(__pyx_t_2);
111352 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantContig, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111353 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111354
111355 /* "(tree fragment)":1
111356 * def __pyx_unpickle_VariantHeaderContigs(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
111357 * cdef object __pyx_PickleError
111358 * cdef object __pyx_result
111359 */
111360 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_9__pyx_unpickle_VariantHeaderContigs, 0, __pyx_n_s_pyx_unpickle_VariantHeaderCont, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111361 __Pyx_GOTREF(__pyx_t_2);
111362 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantHeaderCont, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111363 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111364
111365 /* "(tree fragment)":11
111366 * __pyx_unpickle_VariantHeaderContigs__set_state(<VariantHeaderContigs> __pyx_result, __pyx_state)
111367 * return __pyx_result
111368 * cdef __pyx_unpickle_VariantHeaderContigs__set_state(VariantHeaderContigs __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
111369 * __pyx_result.header = __pyx_state[0]
111370 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
111371 */
111372 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_11__pyx_unpickle_VariantHeaderSamples, 0, __pyx_n_s_pyx_unpickle_VariantHeaderSamp, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__268)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111373 __Pyx_GOTREF(__pyx_t_2);
111374 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantHeaderSamp, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111375 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111376
111377 /* "(tree fragment)":1
111378 * def __pyx_unpickle_VariantRecordFilter(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
111379 * cdef object __pyx_PickleError
111380 * cdef object __pyx_result
111381 */
111382 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_13__pyx_unpickle_VariantRecordFilter, 0, __pyx_n_s_pyx_unpickle_VariantRecordFilt, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111383 __Pyx_GOTREF(__pyx_t_2);
111384 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantRecordFilt, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111385 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111386
111387 /* "(tree fragment)":11
111388 * __pyx_unpickle_VariantRecordFilter__set_state(<VariantRecordFilter> __pyx_result, __pyx_state)
111389 * return __pyx_result
111390 * cdef __pyx_unpickle_VariantRecordFilter__set_state(VariantRecordFilter __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
111391 * __pyx_result.record = __pyx_state[0]
111392 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
111393 */
111394 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_15__pyx_unpickle_VariantRecordFormat, 0, __pyx_n_s_pyx_unpickle_VariantRecordForm, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111395 __Pyx_GOTREF(__pyx_t_2);
111396 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantRecordForm, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111397 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111398
111399 /* "(tree fragment)":1
111400 * def __pyx_unpickle_VariantRecordInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
111401 * cdef object __pyx_PickleError
111402 * cdef object __pyx_result
111403 */
111404 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_17__pyx_unpickle_VariantRecordInfo, 0, __pyx_n_s_pyx_unpickle_VariantRecordInfo, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111405 __Pyx_GOTREF(__pyx_t_2);
111406 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantRecordInfo, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111407 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111408
111409 /* "(tree fragment)":11
111410 * __pyx_unpickle_VariantRecordInfo__set_state(<VariantRecordInfo> __pyx_result, __pyx_state)
111411 * return __pyx_result
111412 * cdef __pyx_unpickle_VariantRecordInfo__set_state(VariantRecordInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
111413 * __pyx_result.record = __pyx_state[0]
111414 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
111415 */
111416 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_19__pyx_unpickle_VariantRecordSamples, 0, __pyx_n_s_pyx_unpickle_VariantRecordSamp, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111417 __Pyx_GOTREF(__pyx_t_2);
111418 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantRecordSamp, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111419 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111420
111421 /* "(tree fragment)":1
111422 * def __pyx_unpickle_VariantRecordSample(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
111423 * cdef object __pyx_PickleError
111424 * cdef object __pyx_result
111425 */
111426 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_21__pyx_unpickle_VariantRecordSample, 0, __pyx_n_s_pyx_unpickle_VariantRecordSamp_2, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111427 __Pyx_GOTREF(__pyx_t_2);
111428 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VariantRecordSamp_2, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111429 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111430
111431 /* "(tree fragment)":11
111432 * __pyx_unpickle_VariantRecordSample__set_state(<VariantRecordSample> __pyx_result, __pyx_state)
111433 * return __pyx_result
111434 * cdef __pyx_unpickle_VariantRecordSample__set_state(VariantRecordSample __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
111435 * __pyx_result.index = __pyx_state[0]; __pyx_result.record = __pyx_state[1]
111436 * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
111437 */
111438 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcbcf_23__pyx_unpickle_BaseIndex, 0, __pyx_n_s_pyx_unpickle_BaseIndex, NULL, __pyx_n_s_pysam_libcbcf, __pyx_d, ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
111439 __Pyx_GOTREF(__pyx_t_2);
111440 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BaseIndex, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
111441 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111442
111443 /* "pysam/libcbcf.pyx":1
111444 * # cython: language_level=3 # <<<<<<<<<<<<<<
111445 * # cython: embedsignature=True
111446 * # cython: profile=True
111447 */
111448 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
111449 __Pyx_GOTREF(__pyx_t_2);
111450 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
111451 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
111452 __Pyx_TraceReturn(Py_None, 0);
111453
111454 /*--- Wrapped vars code ---*/
111455
111456 goto __pyx_L0;
111457 __pyx_L1_error:;
111458 __Pyx_XDECREF(__pyx_t_2);
111459 __Pyx_XDECREF(__pyx_t_3);
111460 if (__pyx_m) {
111461 if (__pyx_d && stringtab_initialized) {
111462 __Pyx_AddTraceback("init pysam.libcbcf", __pyx_clineno, __pyx_lineno, __pyx_filename);
111463 }
111464 #if !CYTHON_USE_MODULE_STATE
111465 Py_CLEAR(__pyx_m);
111466 #else
111467 Py_DECREF(__pyx_m);
111468 if (pystate_addmodule_run) {
111469 PyObject *tp, *value, *tb;
111470 PyErr_Fetch(&tp, &value, &tb);
111471 PyState_RemoveModule(&__pyx_moduledef);
111472 PyErr_Restore(tp, value, tb);
111473 }
111474 #endif
111475 } else if (!PyErr_Occurred()) {
111476 PyErr_SetString(PyExc_ImportError, "init pysam.libcbcf");
111477 }
111478 __pyx_L0:;
111479 __Pyx_RefNannyFinishContext();
111480 #if CYTHON_PEP489_MULTI_PHASE_INIT
111481 return (__pyx_m != NULL) ? 0 : -1;
111482 #elif PY_MAJOR_VERSION >= 3
111483 return __pyx_m;
111484 #else
111485 return;
111486 #endif
111487 }
111488 /* #### Code section: cleanup_globals ### */
111489 /* #### Code section: cleanup_module ### */
111490 /* #### Code section: main_method ### */
111491 /* #### Code section: utility_code_pragmas ### */
111492 #ifdef _MSC_VER
111493 #pragma warning( push )
111494 /* Warning 4127: conditional expression is constant
111495 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
111496 * compile-time, so this warning is not useful
111497 */
111498 #pragma warning( disable : 4127 )
111499 #endif
111500
111501
111502
111503 /* #### Code section: utility_code_def ### */
111504
111505 /* --- Runtime support code --- */
111506 /* Refnanny */
111507 #if CYTHON_REFNANNY
111508 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
111509 PyObject *m = NULL, *p = NULL;
111510 void *r = NULL;
111511 m = PyImport_ImportModule(modname);
111512 if (!m) goto end;
111513 p = PyObject_GetAttrString(m, "RefNannyAPI");
111514 if (!p) goto end;
111515 r = PyLong_AsVoidPtr(p);
111516 end:
111517 Py_XDECREF(p);
111518 Py_XDECREF(m);
111519 return (__Pyx_RefNannyAPIStruct *)r;
111520 }
111521 #endif
111522
111523 /* PyErrExceptionMatches */
111524 #if CYTHON_FAST_THREAD_STATE
111525 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
111526 Py_ssize_t i, n;
111527 n = PyTuple_GET_SIZE(tuple);
111528 #if PY_MAJOR_VERSION >= 3
111529 for (i=0; i<n; i++) {
111530 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
111531 }
111532 #endif
111533 for (i=0; i<n; i++) {
111534 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
111535 }
111536 return 0;
111537 }
111538 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
111539 int result;
111540 PyObject *exc_type;
111541 #if PY_VERSION_HEX >= 0x030C00A6
111542 PyObject *current_exception = tstate->current_exception;
111543 if (unlikely(!current_exception)) return 0;
111544 exc_type = (PyObject*) Py_TYPE(current_exception);
111545 if (exc_type == err) return 1;
111546 #else
111547 exc_type = tstate->curexc_type;
111548 if (exc_type == err) return 1;
111549 if (unlikely(!exc_type)) return 0;
111550 #endif
111551 #if CYTHON_AVOID_BORROWED_REFS
111552 Py_INCREF(exc_type);
111553 #endif
111554 if (unlikely(PyTuple_Check(err))) {
111555 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
111556 } else {
111557 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
111558 }
111559 #if CYTHON_AVOID_BORROWED_REFS
111560 Py_DECREF(exc_type);
111561 #endif
111562 return result;
111563 }
111564 #endif
111565
111566 /* PyErrFetchRestore */
111567 #if CYTHON_FAST_THREAD_STATE
111568 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
111569 #if PY_VERSION_HEX >= 0x030C00A6
111570 PyObject *tmp_value;
111571 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
111572 if (value) {
111573 #if CYTHON_COMPILING_IN_CPYTHON
111574 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
111575 #endif
111576 PyException_SetTraceback(value, tb);
111577 }
111578 tmp_value = tstate->current_exception;
111579 tstate->current_exception = value;
111580 Py_XDECREF(tmp_value);
111581 Py_XDECREF(type);
111582 Py_XDECREF(tb);
111583 #else
111584 PyObject *tmp_type, *tmp_value, *tmp_tb;
111585 tmp_type = tstate->curexc_type;
111586 tmp_value = tstate->curexc_value;
111587 tmp_tb = tstate->curexc_traceback;
111588 tstate->curexc_type = type;
111589 tstate->curexc_value = value;
111590 tstate->curexc_traceback = tb;
111591 Py_XDECREF(tmp_type);
111592 Py_XDECREF(tmp_value);
111593 Py_XDECREF(tmp_tb);
111594 #endif
111595 }
111596 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
111597 #if PY_VERSION_HEX >= 0x030C00A6
111598 PyObject* exc_value;
111599 exc_value = tstate->current_exception;
111600 tstate->current_exception = 0;
111601 *value = exc_value;
111602 *type = NULL;
111603 *tb = NULL;
111604 if (exc_value) {
111605 *type = (PyObject*) Py_TYPE(exc_value);
111606 Py_INCREF(*type);
111607 #if CYTHON_COMPILING_IN_CPYTHON
111608 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
111609 Py_XINCREF(*tb);
111610 #else
111611 *tb = PyException_GetTraceback(exc_value);
111612 #endif
111613 }
111614 #else
111615 *type = tstate->curexc_type;
111616 *value = tstate->curexc_value;
111617 *tb = tstate->curexc_traceback;
111618 tstate->curexc_type = 0;
111619 tstate->curexc_value = 0;
111620 tstate->curexc_traceback = 0;
111621 #endif
111622 }
111623 #endif
111624
111625 /* PyObjectGetAttrStr */
111626 #if CYTHON_USE_TYPE_SLOTS
111627 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
111628 PyTypeObject* tp = Py_TYPE(obj);
111629 if (likely(tp->tp_getattro))
111630 return tp->tp_getattro(obj, attr_name);
111631 #if PY_MAJOR_VERSION < 3
111632 if (likely(tp->tp_getattr))
111633 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
111634 #endif
111635 return PyObject_GetAttr(obj, attr_name);
111636 }
111637 #endif
111638
111639 /* PyObjectGetAttrStrNoError */
111640 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
111641 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
111642 __Pyx_PyThreadState_declare
111643 __Pyx_PyThreadState_assign
111644 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
111645 __Pyx_PyErr_Clear();
111646 }
111647 #endif
111648 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
111649 PyObject *result;
111650 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
111651 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
111652 return result;
111653 #else
111654 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
111655 PyTypeObject* tp = Py_TYPE(obj);
111656 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
111657 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
111658 }
111659 #endif
111660 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
111661 if (unlikely(!result)) {
111662 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
111663 }
111664 return result;
111665 #endif
111666 }
111667
111668 /* GetBuiltinName */
111669 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
111670 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
111671 if (unlikely(!result) && !PyErr_Occurred()) {
111672 PyErr_Format(PyExc_NameError,
111673 #if PY_MAJOR_VERSION >= 3
111674 "name '%U' is not defined", name);
111675 #else
111676 "name '%.200s' is not defined", PyString_AS_STRING(name));
111677 #endif
111678 }
111679 return result;
111680 }
111681
111682 /* TupleAndListFromArray */
111683 #if CYTHON_COMPILING_IN_CPYTHON
111684 static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
111685 PyObject *v;
111686 Py_ssize_t i;
111687 for (i = 0; i < length; i++) {
111688 v = dest[i] = src[i];
111689 Py_INCREF(v);
111690 }
111691 }
111692 static CYTHON_INLINE PyObject *
111693 __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
111694 {
111695 PyObject *res;
111696 if (n <= 0) {
111697 Py_INCREF(__pyx_empty_tuple);
111698 return __pyx_empty_tuple;
111699 }
111700 res = PyTuple_New(n);
111701 if (unlikely(res == NULL)) return NULL;
111702 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
111703 return res;
111704 }
111705 static CYTHON_INLINE PyObject *
111706 __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
111707 {
111708 PyObject *res;
111709 if (n <= 0) {
111710 return PyList_New(0);
111711 }
111712 res = PyList_New(n);
111713 if (unlikely(res == NULL)) return NULL;
111714 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
111715 return res;
111716 }
111717 #endif
111718
111719 /* BytesEquals */
111720 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
111721 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
111722 return PyObject_RichCompareBool(s1, s2, equals);
111723 #else
111724 if (s1 == s2) {
111725 return (equals == Py_EQ);
111726 } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
111727 const char *ps1, *ps2;
111728 Py_ssize_t length = PyBytes_GET_SIZE(s1);
111729 if (length != PyBytes_GET_SIZE(s2))
111730 return (equals == Py_NE);
111731 ps1 = PyBytes_AS_STRING(s1);
111732 ps2 = PyBytes_AS_STRING(s2);
111733 if (ps1[0] != ps2[0]) {
111734 return (equals == Py_NE);
111735 } else if (length == 1) {
111736 return (equals == Py_EQ);
111737 } else {
111738 int result;
111739 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
111740 Py_hash_t hash1, hash2;
111741 hash1 = ((PyBytesObject*)s1)->ob_shash;
111742 hash2 = ((PyBytesObject*)s2)->ob_shash;
111743 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
111744 return (equals == Py_NE);
111745 }
111746 #endif
111747 result = memcmp(ps1, ps2, (size_t)length);
111748 return (equals == Py_EQ) ? (result == 0) : (result != 0);
111749 }
111750 } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
111751 return (equals == Py_NE);
111752 } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
111753 return (equals == Py_NE);
111754 } else {
111755 int result;
111756 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
111757 if (!py_result)
111758 return -1;
111759 result = __Pyx_PyObject_IsTrue(py_result);
111760 Py_DECREF(py_result);
111761 return result;
111762 }
111763 #endif
111764 }
111765
111766 /* UnicodeEquals */
111767 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
111768 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
111769 return PyObject_RichCompareBool(s1, s2, equals);
111770 #else
111771 #if PY_MAJOR_VERSION < 3
111772 PyObject* owned_ref = NULL;
111773 #endif
111774 int s1_is_unicode, s2_is_unicode;
111775 if (s1 == s2) {
111776 goto return_eq;
111777 }
111778 s1_is_unicode = PyUnicode_CheckExact(s1);
111779 s2_is_unicode = PyUnicode_CheckExact(s2);
111780 #if PY_MAJOR_VERSION < 3
111781 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
111782 owned_ref = PyUnicode_FromObject(s2);
111783 if (unlikely(!owned_ref))
111784 return -1;
111785 s2 = owned_ref;
111786 s2_is_unicode = 1;
111787 } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
111788 owned_ref = PyUnicode_FromObject(s1);
111789 if (unlikely(!owned_ref))
111790 return -1;
111791 s1 = owned_ref;
111792 s1_is_unicode = 1;
111793 } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
111794 return __Pyx_PyBytes_Equals(s1, s2, equals);
111795 }
111796 #endif
111797 if (s1_is_unicode & s2_is_unicode) {
111798 Py_ssize_t length;
111799 int kind;
111800 void *data1, *data2;
111801 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
111802 return -1;
111803 length = __Pyx_PyUnicode_GET_LENGTH(s1);
111804 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
111805 goto return_ne;
111806 }
111807 #if CYTHON_USE_UNICODE_INTERNALS
111808 {
111809 Py_hash_t hash1, hash2;
111810 #if CYTHON_PEP393_ENABLED
111811 hash1 = ((PyASCIIObject*)s1)->hash;
111812 hash2 = ((PyASCIIObject*)s2)->hash;
111813 #else
111814 hash1 = ((PyUnicodeObject*)s1)->hash;
111815 hash2 = ((PyUnicodeObject*)s2)->hash;
111816 #endif
111817 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
111818 goto return_ne;
111819 }
111820 }
111821 #endif
111822 kind = __Pyx_PyUnicode_KIND(s1);
111823 if (kind != __Pyx_PyUnicode_KIND(s2)) {
111824 goto return_ne;
111825 }
111826 data1 = __Pyx_PyUnicode_DATA(s1);
111827 data2 = __Pyx_PyUnicode_DATA(s2);
111828 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
111829 goto return_ne;
111830 } else if (length == 1) {
111831 goto return_eq;
111832 } else {
111833 int result = memcmp(data1, data2, (size_t)(length * kind));
111834 #if PY_MAJOR_VERSION < 3
111835 Py_XDECREF(owned_ref);
111836 #endif
111837 return (equals == Py_EQ) ? (result == 0) : (result != 0);
111838 }
111839 } else if ((s1 == Py_None) & s2_is_unicode) {
111840 goto return_ne;
111841 } else if ((s2 == Py_None) & s1_is_unicode) {
111842 goto return_ne;
111843 } else {
111844 int result;
111845 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
111846 #if PY_MAJOR_VERSION < 3
111847 Py_XDECREF(owned_ref);
111848 #endif
111849 if (!py_result)
111850 return -1;
111851 result = __Pyx_PyObject_IsTrue(py_result);
111852 Py_DECREF(py_result);
111853 return result;
111854 }
111855 return_eq:
111856 #if PY_MAJOR_VERSION < 3
111857 Py_XDECREF(owned_ref);
111858 #endif
111859 return (equals == Py_EQ);
111860 return_ne:
111861 #if PY_MAJOR_VERSION < 3
111862 Py_XDECREF(owned_ref);
111863 #endif
111864 return (equals == Py_NE);
111865 #endif
111866 }
111867
111868 /* fastcall */
111869 #if CYTHON_METH_FASTCALL
111870 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
111871 {
111872 Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
111873 for (i = 0; i < n; i++)
111874 {
111875 if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
111876 }
111877 for (i = 0; i < n; i++)
111878 {
111879 int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
111880 if (unlikely(eq != 0)) {
111881 if (unlikely(eq < 0)) return NULL;
111882 return kwvalues[i];
111883 }
111884 }
111885 return NULL;
111886 }
111887 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
111888 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
111889 Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
111890 PyObject *dict;
111891 dict = PyDict_New();
111892 if (unlikely(!dict))
111893 return NULL;
111894 for (i=0; i<nkwargs; i++) {
111895 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
111896 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
111897 goto bad;
111898 }
111899 return dict;
111900 bad:
111901 Py_DECREF(dict);
111902 return NULL;
111903 }
111904 #endif
111905 #endif
111906
111907 /* Profile */
111908 #if CYTHON_PROFILE
111909 static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
111910 PyFrameObject** frame,
111911 PyThreadState* tstate,
111912 const char *funcname,
111913 const char *srcfile,
111914 int firstlineno) {
111915 PyObject *type, *value, *traceback;
111916 int retval;
111917 if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
111918 if (*code == NULL) {
111919 *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
111920 if (*code == NULL) return 0;
111921 }
111922 *frame = PyFrame_New(
111923 tstate, /*PyThreadState *tstate*/
111924 *code, /*PyCodeObject *code*/
111925 __pyx_d, /*PyObject *globals*/
111926 0 /*PyObject *locals*/
111927 );
111928 if (*frame == NULL) return 0;
111929 if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
111930 Py_INCREF(Py_None);
111931 (*frame)->f_trace = Py_None;
111932 }
111933 #if PY_VERSION_HEX < 0x030400B1
111934 } else {
111935 (*frame)->f_tstate = tstate;
111936 #endif
111937 }
111938 __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
111939 retval = 1;
111940 __Pyx_EnterTracing(tstate);
111941 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
111942 #if CYTHON_TRACE
111943 if (tstate->c_tracefunc)
111944 retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
111945 if (retval && tstate->c_profilefunc)
111946 #endif
111947 retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
111948 __Pyx_LeaveTracing(tstate);
111949 if (retval) {
111950 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
111951 return __Pyx_IsTracing(tstate, 0, 0) && retval;
111952 } else {
111953 Py_XDECREF(type);
111954 Py_XDECREF(value);
111955 Py_XDECREF(traceback);
111956 return -1;
111957 }
111958 }
111959 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
111960 PyCodeObject *py_code = 0;
111961 #if PY_MAJOR_VERSION >= 3
111962 py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
111963 if (likely(py_code)) {
111964 py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
111965 }
111966 #else
111967 PyObject *py_srcfile = 0;
111968 PyObject *py_funcname = 0;
111969 py_funcname = PyString_FromString(funcname);
111970 if (unlikely(!py_funcname)) goto bad;
111971 py_srcfile = PyString_FromString(srcfile);
111972 if (unlikely(!py_srcfile)) goto bad;
111973 py_code = PyCode_New(
111974 0,
111975 0,
111976 0,
111977 CO_OPTIMIZED | CO_NEWLOCALS,
111978 __pyx_empty_bytes, /*PyObject *code,*/
111979 __pyx_empty_tuple, /*PyObject *consts,*/
111980 __pyx_empty_tuple, /*PyObject *names,*/
111981 __pyx_empty_tuple, /*PyObject *varnames,*/
111982 __pyx_empty_tuple, /*PyObject *freevars,*/
111983 __pyx_empty_tuple, /*PyObject *cellvars,*/
111984 py_srcfile, /*PyObject *filename,*/
111985 py_funcname, /*PyObject *name,*/
111986 firstlineno,
111987 __pyx_empty_bytes /*PyObject *lnotab*/
111988 );
111989 bad:
111990 Py_XDECREF(py_srcfile);
111991 Py_XDECREF(py_funcname);
111992 #endif
111993 return py_code;
111994 }
111995 #endif
111996
111997 /* DivInt[long] */
111998 static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
111999 long q = a / b;
112000 long r = a - q*b;
112001 q -= ((r != 0) & ((r ^ b) < 0));
112002 return q;
112003 }
112004
112005 /* PyObjectCall */
112006 #if CYTHON_COMPILING_IN_CPYTHON
112007 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
112008 PyObject *result;
112009 ternaryfunc call = Py_TYPE(func)->tp_call;
112010 if (unlikely(!call))
112011 return PyObject_Call(func, arg, kw);
112012 #if PY_MAJOR_VERSION < 3
112013 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
112014 return NULL;
112015 #else
112016 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
112017 return NULL;
112018 #endif
112019 result = (*call)(func, arg, kw);
112020 Py_LeaveRecursiveCall();
112021 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
112022 PyErr_SetString(
112023 PyExc_SystemError,
112024 "NULL result without error in PyObject_Call");
112025 }
112026 return result;
112027 }
112028 #endif
112029
112030 /* PyIntBinop */
112031 #if !CYTHON_COMPILING_IN_PYPY
112032 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
112033 CYTHON_MAYBE_UNUSED_VAR(intval);
112034 CYTHON_MAYBE_UNUSED_VAR(inplace);
112035 CYTHON_UNUSED_VAR(zerodivision_check);
112036 #if PY_MAJOR_VERSION < 3
112037 if (likely(PyInt_CheckExact(op1))) {
112038 const long b = intval;
112039 long x;
112040 long a = PyInt_AS_LONG(op1);
112041
112042 x = (long)((unsigned long)a + (unsigned long)b);
112043 if (likely((x^a) >= 0 || (x^b) >= 0))
112044 return PyInt_FromLong(x);
112045 return PyLong_Type.tp_as_number->nb_add(op1, op2);
112046 }
112047 #endif
112048 #if CYTHON_USE_PYLONG_INTERNALS
112049 if (likely(PyLong_CheckExact(op1))) {
112050 const long b = intval;
112051 long a, x;
112052 #ifdef HAVE_LONG_LONG
112053 const PY_LONG_LONG llb = intval;
112054 PY_LONG_LONG lla, llx;
112055 #endif
112056 if (unlikely(__Pyx_PyLong_IsZero(op1))) {
112057 return __Pyx_NewRef(op2);
112058 }
112059 if (likely(__Pyx_PyLong_IsCompact(op1))) {
112060 a = __Pyx_PyLong_CompactValue(op1);
112061 } else {
112062 const digit* digits = __Pyx_PyLong_Digits(op1);
112063 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
112064 switch (size) {
112065 case -2:
112066 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
112067 a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
112068 break;
112069 #ifdef HAVE_LONG_LONG
112070 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
112071 lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
112072 goto long_long;
112073 #endif
112074 }
112075 CYTHON_FALLTHROUGH;
112076 case 2:
112077 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
112078 a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
112079 break;
112080 #ifdef HAVE_LONG_LONG
112081 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
112082 lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
112083 goto long_long;
112084 #endif
112085 }
112086 CYTHON_FALLTHROUGH;
112087 case -3:
112088 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
112089 a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
112090 break;
112091 #ifdef HAVE_LONG_LONG
112092 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
112093 lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
112094 goto long_long;
112095 #endif
112096 }
112097 CYTHON_FALLTHROUGH;
112098 case 3:
112099 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
112100 a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
112101 break;
112102 #ifdef HAVE_LONG_LONG
112103 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
112104 lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
112105 goto long_long;
112106 #endif
112107 }
112108 CYTHON_FALLTHROUGH;
112109 case -4:
112110 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
112111 a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
112112 break;
112113 #ifdef HAVE_LONG_LONG
112114 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
112115 lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
112116 goto long_long;
112117 #endif
112118 }
112119 CYTHON_FALLTHROUGH;
112120 case 4:
112121 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
112122 a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
112123 break;
112124 #ifdef HAVE_LONG_LONG
112125 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
112126 lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
112127 goto long_long;
112128 #endif
112129 }
112130 CYTHON_FALLTHROUGH;
112131 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
112132 }
112133 }
112134 x = a + b;
112135 return PyLong_FromLong(x);
112136 #ifdef HAVE_LONG_LONG
112137 long_long:
112138 llx = lla + llb;
112139 return PyLong_FromLongLong(llx);
112140 #endif
112141
112142
112143 }
112144 #endif
112145 if (PyFloat_CheckExact(op1)) {
112146 const long b = intval;
112147 #if CYTHON_COMPILING_IN_LIMITED_API
112148 double a = __pyx_PyFloat_AsDouble(op1);
112149 #else
112150 double a = PyFloat_AS_DOUBLE(op1);
112151 #endif
112152 double result;
112153
112154 PyFPE_START_PROTECT("add", return NULL)
112155 result = ((double)a) + (double)b;
112156 PyFPE_END_PROTECT(result)
112157 return PyFloat_FromDouble(result);
112158 }
112159 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
112160 }
112161 #endif
112162
112163 /* RaiseException */
112164 #if PY_MAJOR_VERSION < 3
112165 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
112166 __Pyx_PyThreadState_declare
112167 CYTHON_UNUSED_VAR(cause);
112168 Py_XINCREF(type);
112169 if (!value || value == Py_None)
112170 value = NULL;
112171 else
112172 Py_INCREF(value);
112173 if (!tb || tb == Py_None)
112174 tb = NULL;
112175 else {
112176 Py_INCREF(tb);
112177 if (!PyTraceBack_Check(tb)) {
112178 PyErr_SetString(PyExc_TypeError,
112179 "raise: arg 3 must be a traceback or None");
112180 goto raise_error;
112181 }
112182 }
112183 if (PyType_Check(type)) {
112184 #if CYTHON_COMPILING_IN_PYPY
112185 if (!value) {
112186 Py_INCREF(Py_None);
112187 value = Py_None;
112188 }
112189 #endif
112190 PyErr_NormalizeException(&type, &value, &tb);
112191 } else {
112192 if (value) {
112193 PyErr_SetString(PyExc_TypeError,
112194 "instance exception may not have a separate value");
112195 goto raise_error;
112196 }
112197 value = type;
112198 type = (PyObject*) Py_TYPE(type);
112199 Py_INCREF(type);
112200 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
112201 PyErr_SetString(PyExc_TypeError,
112202 "raise: exception class must be a subclass of BaseException");
112203 goto raise_error;
112204 }
112205 }
112206 __Pyx_PyThreadState_assign
112207 __Pyx_ErrRestore(type, value, tb);
112208 return;
112209 raise_error:
112210 Py_XDECREF(value);
112211 Py_XDECREF(type);
112212 Py_XDECREF(tb);
112213 return;
112214 }
112215 #else
112216 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
112217 PyObject* owned_instance = NULL;
112218 if (tb == Py_None) {
112219 tb = 0;
112220 } else if (tb && !PyTraceBack_Check(tb)) {
112221 PyErr_SetString(PyExc_TypeError,
112222 "raise: arg 3 must be a traceback or None");
112223 goto bad;
112224 }
112225 if (value == Py_None)
112226 value = 0;
112227 if (PyExceptionInstance_Check(type)) {
112228 if (value) {
112229 PyErr_SetString(PyExc_TypeError,
112230 "instance exception may not have a separate value");
112231 goto bad;
112232 }
112233 value = type;
112234 type = (PyObject*) Py_TYPE(value);
112235 } else if (PyExceptionClass_Check(type)) {
112236 PyObject *instance_class = NULL;
112237 if (value && PyExceptionInstance_Check(value)) {
112238 instance_class = (PyObject*) Py_TYPE(value);
112239 if (instance_class != type) {
112240 int is_subclass = PyObject_IsSubclass(instance_class, type);
112241 if (!is_subclass) {
112242 instance_class = NULL;
112243 } else if (unlikely(is_subclass == -1)) {
112244 goto bad;
112245 } else {
112246 type = instance_class;
112247 }
112248 }
112249 }
112250 if (!instance_class) {
112251 PyObject *args;
112252 if (!value)
112253 args = PyTuple_New(0);
112254 else if (PyTuple_Check(value)) {
112255 Py_INCREF(value);
112256 args = value;
112257 } else
112258 args = PyTuple_Pack(1, value);
112259 if (!args)
112260 goto bad;
112261 owned_instance = PyObject_Call(type, args, NULL);
112262 Py_DECREF(args);
112263 if (!owned_instance)
112264 goto bad;
112265 value = owned_instance;
112266 if (!PyExceptionInstance_Check(value)) {
112267 PyErr_Format(PyExc_TypeError,
112268 "calling %R should have returned an instance of "
112269 "BaseException, not %R",
112270 type, Py_TYPE(value));
112271 goto bad;
112272 }
112273 }
112274 } else {
112275 PyErr_SetString(PyExc_TypeError,
112276 "raise: exception class must be a subclass of BaseException");
112277 goto bad;
112278 }
112279 if (cause) {
112280 PyObject *fixed_cause;
112281 if (cause == Py_None) {
112282 fixed_cause = NULL;
112283 } else if (PyExceptionClass_Check(cause)) {
112284 fixed_cause = PyObject_CallObject(cause, NULL);
112285 if (fixed_cause == NULL)
112286 goto bad;
112287 } else if (PyExceptionInstance_Check(cause)) {
112288 fixed_cause = cause;
112289 Py_INCREF(fixed_cause);
112290 } else {
112291 PyErr_SetString(PyExc_TypeError,
112292 "exception causes must derive from "
112293 "BaseException");
112294 goto bad;
112295 }
112296 PyException_SetCause(value, fixed_cause);
112297 }
112298 PyErr_SetObject(type, value);
112299 if (tb) {
112300 #if PY_VERSION_HEX >= 0x030C00A6
112301 PyException_SetTraceback(value, tb);
112302 #elif CYTHON_FAST_THREAD_STATE
112303 PyThreadState *tstate = __Pyx_PyThreadState_Current;
112304 PyObject* tmp_tb = tstate->curexc_traceback;
112305 if (tb != tmp_tb) {
112306 Py_INCREF(tb);
112307 tstate->curexc_traceback = tb;
112308 Py_XDECREF(tmp_tb);
112309 }
112310 #else
112311 PyObject *tmp_type, *tmp_value, *tmp_tb;
112312 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
112313 Py_INCREF(tb);
112314 PyErr_Restore(tmp_type, tmp_value, tb);
112315 Py_XDECREF(tmp_tb);
112316 #endif
112317 }
112318 bad:
112319 Py_XDECREF(owned_instance);
112320 return;
112321 }
112322 #endif
112323
112324 /* GetException */
112325 #if CYTHON_FAST_THREAD_STATE
112326 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
112327 #else
112328 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
112329 #endif
112330 {
112331 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
112332 #if CYTHON_FAST_THREAD_STATE
112333 PyObject *tmp_type, *tmp_value, *tmp_tb;
112334 #if PY_VERSION_HEX >= 0x030C00A6
112335 local_value = tstate->current_exception;
112336 tstate->current_exception = 0;
112337 if (likely(local_value)) {
112338 local_type = (PyObject*) Py_TYPE(local_value);
112339 Py_INCREF(local_type);
112340 local_tb = PyException_GetTraceback(local_value);
112341 }
112342 #else
112343 local_type = tstate->curexc_type;
112344 local_value = tstate->curexc_value;
112345 local_tb = tstate->curexc_traceback;
112346 tstate->curexc_type = 0;
112347 tstate->curexc_value = 0;
112348 tstate->curexc_traceback = 0;
112349 #endif
112350 #else
112351 PyErr_Fetch(&local_type, &local_value, &local_tb);
112352 #endif
112353 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
112354 #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
112355 if (unlikely(tstate->current_exception))
112356 #elif CYTHON_FAST_THREAD_STATE
112357 if (unlikely(tstate->curexc_type))
112358 #else
112359 if (unlikely(PyErr_Occurred()))
112360 #endif
112361 goto bad;
112362 #if PY_MAJOR_VERSION >= 3
112363 if (local_tb) {
112364 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
112365 goto bad;
112366 }
112367 #endif
112368 Py_XINCREF(local_tb);
112369 Py_XINCREF(local_type);
112370 Py_XINCREF(local_value);
112371 *type = local_type;
112372 *value = local_value;
112373 *tb = local_tb;
112374 #if CYTHON_FAST_THREAD_STATE
112375 #if CYTHON_USE_EXC_INFO_STACK
112376 {
112377 _PyErr_StackItem *exc_info = tstate->exc_info;
112378 #if PY_VERSION_HEX >= 0x030B00a4
112379 tmp_value = exc_info->exc_value;
112380 exc_info->exc_value = local_value;
112381 tmp_type = NULL;
112382 tmp_tb = NULL;
112383 Py_XDECREF(local_type);
112384 Py_XDECREF(local_tb);
112385 #else
112386 tmp_type = exc_info->exc_type;
112387 tmp_value = exc_info->exc_value;
112388 tmp_tb = exc_info->exc_traceback;
112389 exc_info->exc_type = local_type;
112390 exc_info->exc_value = local_value;
112391 exc_info->exc_traceback = local_tb;
112392 #endif
112393 }
112394 #else
112395 tmp_type = tstate->exc_type;
112396 tmp_value = tstate->exc_value;
112397 tmp_tb = tstate->exc_traceback;
112398 tstate->exc_type = local_type;
112399 tstate->exc_value = local_value;
112400 tstate->exc_traceback = local_tb;
112401 #endif
112402 Py_XDECREF(tmp_type);
112403 Py_XDECREF(tmp_value);
112404 Py_XDECREF(tmp_tb);
112405 #else
112406 PyErr_SetExcInfo(local_type, local_value, local_tb);
112407 #endif
112408 return 0;
112409 bad:
112410 *type = 0;
112411 *value = 0;
112412 *tb = 0;
112413 Py_XDECREF(local_type);
112414 Py_XDECREF(local_value);
112415 Py_XDECREF(local_tb);
112416 return -1;
112417 }
112418
112419 /* pep479 */
112420 static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) {
112421 PyObject *exc, *val, *tb, *cur_exc;
112422 __Pyx_PyThreadState_declare
112423 #ifdef __Pyx_StopAsyncIteration_USED
112424 int is_async_stopiteration = 0;
112425 #endif
112426 CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
112427 cur_exc = PyErr_Occurred();
112428 if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
112429 #ifdef __Pyx_StopAsyncIteration_USED
112430 if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) {
112431 is_async_stopiteration = 1;
112432 } else
112433 #endif
112434 return;
112435 }
112436 __Pyx_PyThreadState_assign
112437 __Pyx_GetException(&exc, &val, &tb);
112438 Py_XDECREF(exc);
112439 Py_XDECREF(val);
112440 Py_XDECREF(tb);
112441 PyErr_SetString(PyExc_RuntimeError,
112442 #ifdef __Pyx_StopAsyncIteration_USED
112443 is_async_stopiteration ? "async generator raised StopAsyncIteration" :
112444 in_async_gen ? "async generator raised StopIteration" :
112445 #endif
112446 "generator raised StopIteration");
112447 }
112448
112449 /* SwapException */
112450 #if CYTHON_FAST_THREAD_STATE
112451 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
112452 PyObject *tmp_type, *tmp_value, *tmp_tb;
112453 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
112454 _PyErr_StackItem *exc_info = tstate->exc_info;
112455 tmp_value = exc_info->exc_value;
112456 exc_info->exc_value = *value;
112457 if (tmp_value == NULL || tmp_value == Py_None) {
112458 Py_XDECREF(tmp_value);
112459 tmp_value = NULL;
112460 tmp_type = NULL;
112461 tmp_tb = NULL;
112462 } else {
112463 tmp_type = (PyObject*) Py_TYPE(tmp_value);
112464 Py_INCREF(tmp_type);
112465 #if CYTHON_COMPILING_IN_CPYTHON
112466 tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
112467 Py_XINCREF(tmp_tb);
112468 #else
112469 tmp_tb = PyException_GetTraceback(tmp_value);
112470 #endif
112471 }
112472 #elif CYTHON_USE_EXC_INFO_STACK
112473 _PyErr_StackItem *exc_info = tstate->exc_info;
112474 tmp_type = exc_info->exc_type;
112475 tmp_value = exc_info->exc_value;
112476 tmp_tb = exc_info->exc_traceback;
112477 exc_info->exc_type = *type;
112478 exc_info->exc_value = *value;
112479 exc_info->exc_traceback = *tb;
112480 #else
112481 tmp_type = tstate->exc_type;
112482 tmp_value = tstate->exc_value;
112483 tmp_tb = tstate->exc_traceback;
112484 tstate->exc_type = *type;
112485 tstate->exc_value = *value;
112486 tstate->exc_traceback = *tb;
112487 #endif
112488 *type = tmp_type;
112489 *value = tmp_value;
112490 *tb = tmp_tb;
112491 }
112492 #else
112493 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
112494 PyObject *tmp_type, *tmp_value, *tmp_tb;
112495 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
112496 PyErr_SetExcInfo(*type, *value, *tb);
112497 *type = tmp_type;
112498 *value = tmp_value;
112499 *tb = tmp_tb;
112500 }
112501 #endif
112502
112503 /* GetTopmostException */
112504 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
112505 static _PyErr_StackItem *
112506 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
112507 {
112508 _PyErr_StackItem *exc_info = tstate->exc_info;
112509 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
112510 exc_info->previous_item != NULL)
112511 {
112512 exc_info = exc_info->previous_item;
112513 }
112514 return exc_info;
112515 }
112516 #endif
112517
112518 /* SaveResetException */
112519 #if CYTHON_FAST_THREAD_STATE
112520 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
112521 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
112522 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
112523 PyObject *exc_value = exc_info->exc_value;
112524 if (exc_value == NULL || exc_value == Py_None) {
112525 *value = NULL;
112526 *type = NULL;
112527 *tb = NULL;
112528 } else {
112529 *value = exc_value;
112530 Py_INCREF(*value);
112531 *type = (PyObject*) Py_TYPE(exc_value);
112532 Py_INCREF(*type);
112533 *tb = PyException_GetTraceback(exc_value);
112534 }
112535 #elif CYTHON_USE_EXC_INFO_STACK
112536 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
112537 *type = exc_info->exc_type;
112538 *value = exc_info->exc_value;
112539 *tb = exc_info->exc_traceback;
112540 Py_XINCREF(*type);
112541 Py_XINCREF(*value);
112542 Py_XINCREF(*tb);
112543 #else
112544 *type = tstate->exc_type;
112545 *value = tstate->exc_value;
112546 *tb = tstate->exc_traceback;
112547 Py_XINCREF(*type);
112548 Py_XINCREF(*value);
112549 Py_XINCREF(*tb);
112550 #endif
112551 }
112552 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
112553 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
112554 _PyErr_StackItem *exc_info = tstate->exc_info;
112555 PyObject *tmp_value = exc_info->exc_value;
112556 exc_info->exc_value = value;
112557 Py_XDECREF(tmp_value);
112558 Py_XDECREF(type);
112559 Py_XDECREF(tb);
112560 #else
112561 PyObject *tmp_type, *tmp_value, *tmp_tb;
112562 #if CYTHON_USE_EXC_INFO_STACK
112563 _PyErr_StackItem *exc_info = tstate->exc_info;
112564 tmp_type = exc_info->exc_type;
112565 tmp_value = exc_info->exc_value;
112566 tmp_tb = exc_info->exc_traceback;
112567 exc_info->exc_type = type;
112568 exc_info->exc_value = value;
112569 exc_info->exc_traceback = tb;
112570 #else
112571 tmp_type = tstate->exc_type;
112572 tmp_value = tstate->exc_value;
112573 tmp_tb = tstate->exc_traceback;
112574 tstate->exc_type = type;
112575 tstate->exc_value = value;
112576 tstate->exc_traceback = tb;
112577 #endif
112578 Py_XDECREF(tmp_type);
112579 Py_XDECREF(tmp_value);
112580 Py_XDECREF(tmp_tb);
112581 #endif
112582 }
112583 #endif
112584
112585 /* RaiseUnboundLocalError */
112586 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
112587 PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
112588 }
112589
112590 /* UnpackUnboundCMethod */
112591 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
112592 PyObject *result;
112593 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
112594 if (unlikely(!selfless_args)) return NULL;
112595 result = PyObject_Call(method, selfless_args, kwargs);
112596 Py_DECREF(selfless_args);
112597 return result;
112598 }
112599 static PyMethodDef __Pyx_UnboundCMethod_Def = {
112600 "CythonUnboundCMethod",
112601 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
112602 METH_VARARGS | METH_KEYWORDS,
112603 NULL
112604 };
112605 static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
112606 PyObject *method;
112607 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
112608 if (unlikely(!method))
112609 return -1;
112610 target->method = method;
112611 #if CYTHON_COMPILING_IN_CPYTHON
112612 #if PY_MAJOR_VERSION >= 3
112613 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
112614 #else
112615 if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
112616 #endif
112617 {
112618 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
112619 target->func = descr->d_method->ml_meth;
112620 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
112621 } else
112622 #endif
112623 #if CYTHON_COMPILING_IN_PYPY
112624 #else
112625 if (PyCFunction_Check(method))
112626 #endif
112627 {
112628 PyObject *self;
112629 int self_found;
112630 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
112631 self = PyObject_GetAttrString(method, "__self__");
112632 if (!self) {
112633 PyErr_Clear();
112634 }
112635 #else
112636 self = PyCFunction_GET_SELF(method);
112637 #endif
112638 self_found = (self && self != Py_None);
112639 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
112640 Py_XDECREF(self);
112641 #endif
112642 if (self_found) {
112643 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
112644 if (unlikely(!unbound_method)) return -1;
112645 Py_DECREF(method);
112646 target->method = unbound_method;
112647 }
112648 }
112649 return 0;
112650 }
112651
112652 /* CallUnboundCMethod1 */
112653 #if CYTHON_COMPILING_IN_CPYTHON
112654 static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
112655 if (likely(cfunc->func)) {
112656 int flag = cfunc->flag;
112657 if (flag == METH_O) {
112658 return (*(cfunc->func))(self, arg);
112659 } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) {
112660 #if PY_VERSION_HEX >= 0x030700A0
112661 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
112662 #else
112663 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
112664 #endif
112665 } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) {
112666 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
112667 }
112668 }
112669 return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
112670 }
112671 #endif
112672 static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
112673 PyObject *args, *result = NULL;
112674 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
112675 #if CYTHON_COMPILING_IN_CPYTHON
112676 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
112677 args = PyTuple_New(1);
112678 if (unlikely(!args)) goto bad;
112679 Py_INCREF(arg);
112680 PyTuple_SET_ITEM(args, 0, arg);
112681 if (cfunc->flag & METH_KEYWORDS)
112682 result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
112683 else
112684 result = (*cfunc->func)(self, args);
112685 } else {
112686 args = PyTuple_New(2);
112687 if (unlikely(!args)) goto bad;
112688 Py_INCREF(self);
112689 PyTuple_SET_ITEM(args, 0, self);
112690 Py_INCREF(arg);
112691 PyTuple_SET_ITEM(args, 1, arg);
112692 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
112693 }
112694 #else
112695 args = PyTuple_Pack(2, self, arg);
112696 if (unlikely(!args)) goto bad;
112697 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
112698 #endif
112699 bad:
112700 Py_XDECREF(args);
112701 return result;
112702 }
112703
112704 /* RaiseUnexpectedTypeError */
112705 static int
112706 __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
112707 {
112708 __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
112709 PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
112710 expected, obj_type_name);
112711 __Pyx_DECREF_TypeName(obj_type_name);
112712 return 0;
112713 }
112714
112715 /* PyFunctionFastCall */
112716 #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
112717 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
112718 PyObject *globals) {
112719 PyFrameObject *f;
112720 PyThreadState *tstate = __Pyx_PyThreadState_Current;
112721 PyObject **fastlocals;
112722 Py_ssize_t i;
112723 PyObject *result;
112724 assert(globals != NULL);
112725 /* XXX Perhaps we should create a specialized
112726 PyFrame_New() that doesn't take locals, but does
112727 take builtins without sanity checking them.
112728 */
112729 assert(tstate != NULL);
112730 f = PyFrame_New(tstate, co, globals, NULL);
112731 if (f == NULL) {
112732 return NULL;
112733 }
112734 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
112735 for (i = 0; i < na; i++) {
112736 Py_INCREF(*args);
112737 fastlocals[i] = *args++;
112738 }
112739 result = PyEval_EvalFrameEx(f,0);
112740 ++tstate->recursion_depth;
112741 Py_DECREF(f);
112742 --tstate->recursion_depth;
112743 return result;
112744 }
112745 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
112746 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
112747 PyObject *globals = PyFunction_GET_GLOBALS(func);
112748 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
112749 PyObject *closure;
112750 #if PY_MAJOR_VERSION >= 3
112751 PyObject *kwdefs;
112752 #endif
112753 PyObject *kwtuple, **k;
112754 PyObject **d;
112755 Py_ssize_t nd;
112756 Py_ssize_t nk;
112757 PyObject *result;
112758 assert(kwargs == NULL || PyDict_Check(kwargs));
112759 nk = kwargs ? PyDict_Size(kwargs) : 0;
112760 #if PY_MAJOR_VERSION < 3
112761 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
112762 return NULL;
112763 }
112764 #else
112765 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
112766 return NULL;
112767 }
112768 #endif
112769 if (
112770 #if PY_MAJOR_VERSION >= 3
112771 co->co_kwonlyargcount == 0 &&
112772 #endif
112773 likely(kwargs == NULL || nk == 0) &&
112774 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
112775 if (argdefs == NULL && co->co_argcount == nargs) {
112776 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
112777 goto done;
112778 }
112779 else if (nargs == 0 && argdefs != NULL
112780 && co->co_argcount == Py_SIZE(argdefs)) {
112781 /* function called with no arguments, but all parameters have
112782 a default value: use default values as arguments .*/
112783 args = &PyTuple_GET_ITEM(argdefs, 0);
112784 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
112785 goto done;
112786 }
112787 }
112788 if (kwargs != NULL) {
112789 Py_ssize_t pos, i;
112790 kwtuple = PyTuple_New(2 * nk);
112791 if (kwtuple == NULL) {
112792 result = NULL;
112793 goto done;
112794 }
112795 k = &PyTuple_GET_ITEM(kwtuple, 0);
112796 pos = i = 0;
112797 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
112798 Py_INCREF(k[i]);
112799 Py_INCREF(k[i+1]);
112800 i += 2;
112801 }
112802 nk = i / 2;
112803 }
112804 else {
112805 kwtuple = NULL;
112806 k = NULL;
112807 }
112808 closure = PyFunction_GET_CLOSURE(func);
112809 #if PY_MAJOR_VERSION >= 3
112810 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
112811 #endif
112812 if (argdefs != NULL) {
112813 d = &PyTuple_GET_ITEM(argdefs, 0);
112814 nd = Py_SIZE(argdefs);
112815 }
112816 else {
112817 d = NULL;
112818 nd = 0;
112819 }
112820 #if PY_MAJOR_VERSION >= 3
112821 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
112822 args, (int)nargs,
112823 k, (int)nk,
112824 d, (int)nd, kwdefs, closure);
112825 #else
112826 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
112827 args, (int)nargs,
112828 k, (int)nk,
112829 d, (int)nd, closure);
112830 #endif
112831 Py_XDECREF(kwtuple);
112832 done:
112833 Py_LeaveRecursiveCall();
112834 return result;
112835 }
112836 #endif
112837
112838 /* PyObjectCallMethO */
112839 #if CYTHON_COMPILING_IN_CPYTHON
112840 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
112841 PyObject *self, *result;
112842 PyCFunction cfunc;
112843 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
112844 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
112845 #if PY_MAJOR_VERSION < 3
112846 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
112847 return NULL;
112848 #else
112849 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
112850 return NULL;
112851 #endif
112852 result = cfunc(self, arg);
112853 Py_LeaveRecursiveCall();
112854 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
112855 PyErr_SetString(
112856 PyExc_SystemError,
112857 "NULL result without error in PyObject_Call");
112858 }
112859 return result;
112860 }
112861 #endif
112862
112863 /* PyObjectFastCall */
112864 #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
112865 static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
112866 PyObject *argstuple;
112867 PyObject *result = 0;
112868 size_t i;
112869 argstuple = PyTuple_New((Py_ssize_t)nargs);
112870 if (unlikely(!argstuple)) return NULL;
112871 for (i = 0; i < nargs; i++) {
112872 Py_INCREF(args[i]);
112873 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
112874 }
112875 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
112876 bad:
112877 Py_DECREF(argstuple);
112878 return result;
112879 }
112880 #endif
112881 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
112882 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
112883 #if CYTHON_COMPILING_IN_CPYTHON
112884 if (nargs == 0 && kwargs == NULL) {
112885 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
112886 return __Pyx_PyObject_CallMethO(func, NULL);
112887 }
112888 else if (nargs == 1 && kwargs == NULL) {
112889 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
112890 return __Pyx_PyObject_CallMethO(func, args[0]);
112891 }
112892 #endif
112893 #if PY_VERSION_HEX < 0x030800B1
112894 #if CYTHON_FAST_PYCCALL
112895 if (PyCFunction_Check(func)) {
112896 if (kwargs) {
112897 return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
112898 } else {
112899 return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
112900 }
112901 }
112902 #if PY_VERSION_HEX >= 0x030700A1
112903 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
112904 return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
112905 }
112906 #endif
112907 #endif
112908 #if CYTHON_FAST_PYCALL
112909 if (PyFunction_Check(func)) {
112910 return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
112911 }
112912 #endif
112913 #endif
112914 if (kwargs == NULL) {
112915 #if CYTHON_VECTORCALL
112916 #if PY_VERSION_HEX < 0x03090000
112917 vectorcallfunc f = _PyVectorcall_Function(func);
112918 #else
112919 vectorcallfunc f = PyVectorcall_Function(func);
112920 #endif
112921 if (f) {
112922 return f(func, args, (size_t)nargs, NULL);
112923 }
112924 #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
112925 if (__Pyx_CyFunction_CheckExact(func)) {
112926 __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
112927 if (f) return f(func, args, (size_t)nargs, NULL);
112928 }
112929 #endif
112930 }
112931 if (nargs == 0) {
112932 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
112933 }
112934 #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
112935 return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
112936 #else
112937 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
112938 #endif
112939 }
112940
112941 /* PyObjectCall2Args */
112942 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
112943 PyObject *args[3] = {NULL, arg1, arg2};
112944 return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
112945 }
112946
112947 /* PyObjectCallOneArg */
112948 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
112949 PyObject *args[2] = {NULL, arg};
112950 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
112951 }
112952
112953 /* PyObjectGetMethod */
112954 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
112955 PyObject *attr;
112956 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
112957 __Pyx_TypeName type_name;
112958 PyTypeObject *tp = Py_TYPE(obj);
112959 PyObject *descr;
112960 descrgetfunc f = NULL;
112961 PyObject **dictptr, *dict;
112962 int meth_found = 0;
112963 assert (*method == NULL);
112964 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
112965 attr = __Pyx_PyObject_GetAttrStr(obj, name);
112966 goto try_unpack;
112967 }
112968 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
112969 return 0;
112970 }
112971 descr = _PyType_Lookup(tp, name);
112972 if (likely(descr != NULL)) {
112973 Py_INCREF(descr);
112974 #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
112975 if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
112976 #elif PY_MAJOR_VERSION >= 3
112977 #ifdef __Pyx_CyFunction_USED
112978 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
112979 #else
112980 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
112981 #endif
112982 #else
112983 #ifdef __Pyx_CyFunction_USED
112984 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
112985 #else
112986 if (likely(PyFunction_Check(descr)))
112987 #endif
112988 #endif
112989 {
112990 meth_found = 1;
112991 } else {
112992 f = Py_TYPE(descr)->tp_descr_get;
112993 if (f != NULL && PyDescr_IsData(descr)) {
112994 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
112995 Py_DECREF(descr);
112996 goto try_unpack;
112997 }
112998 }
112999 }
113000 dictptr = _PyObject_GetDictPtr(obj);
113001 if (dictptr != NULL && (dict = *dictptr) != NULL) {
113002 Py_INCREF(dict);
113003 attr = __Pyx_PyDict_GetItemStr(dict, name);
113004 if (attr != NULL) {
113005 Py_INCREF(attr);
113006 Py_DECREF(dict);
113007 Py_XDECREF(descr);
113008 goto try_unpack;
113009 }
113010 Py_DECREF(dict);
113011 }
113012 if (meth_found) {
113013 *method = descr;
113014 return 1;
113015 }
113016 if (f != NULL) {
113017 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
113018 Py_DECREF(descr);
113019 goto try_unpack;
113020 }
113021 if (likely(descr != NULL)) {
113022 *method = descr;
113023 return 0;
113024 }
113025 type_name = __Pyx_PyType_GetName(tp);
113026 PyErr_Format(PyExc_AttributeError,
113027 #if PY_MAJOR_VERSION >= 3
113028 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
113029 type_name, name);
113030 #else
113031 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
113032 type_name, PyString_AS_STRING(name));
113033 #endif
113034 __Pyx_DECREF_TypeName(type_name);
113035 return 0;
113036 #else
113037 attr = __Pyx_PyObject_GetAttrStr(obj, name);
113038 goto try_unpack;
113039 #endif
113040 try_unpack:
113041 #if CYTHON_UNPACK_METHODS
113042 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
113043 PyObject *function = PyMethod_GET_FUNCTION(attr);
113044 Py_INCREF(function);
113045 Py_DECREF(attr);
113046 *method = function;
113047 return 1;
113048 }
113049 #endif
113050 *method = attr;
113051 return 0;
113052 }
113053
113054 /* PyObjectCallMethod1 */
113055 #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2)
113056 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
113057 PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
113058 Py_DECREF(method);
113059 return result;
113060 }
113061 #endif
113062 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
113063 #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2
113064 PyObject *args[2] = {obj, arg};
113065 (void) __Pyx_PyObject_GetMethod;
113066 (void) __Pyx_PyObject_CallOneArg;
113067 (void) __Pyx_PyObject_Call2Args;
113068 return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
113069 #else
113070 PyObject *method = NULL, *result;
113071 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
113072 if (likely(is_method)) {
113073 result = __Pyx_PyObject_Call2Args(method, obj, arg);
113074 Py_DECREF(method);
113075 return result;
113076 }
113077 if (unlikely(!method)) return NULL;
113078 return __Pyx__PyObject_CallMethod1(method, arg);
113079 #endif
113080 }
113081
113082 /* append */
113083 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
113084 if (likely(PyList_CheckExact(L))) {
113085 if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
113086 } else {
113087 PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
113088 if (unlikely(!retval))
113089 return -1;
113090 Py_DECREF(retval);
113091 }
113092 return 0;
113093 }
113094
113095 /* PySequenceMultiply */
113096 static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
113097 PyObject *result, *pymul = PyInt_FromSsize_t(mul);
113098 if (unlikely(!pymul))
113099 return NULL;
113100 result = PyNumber_Multiply(seq, pymul);
113101 Py_DECREF(pymul);
113102 return result;
113103 }
113104 static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
113105 #if CYTHON_USE_TYPE_SLOTS
113106 PyTypeObject *type = Py_TYPE(seq);
113107 if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
113108 return type->tp_as_sequence->sq_repeat(seq, mul);
113109 } else
113110 #endif
113111 {
113112 return __Pyx_PySequence_Multiply_Generic(seq, mul);
113113 }
113114 }
113115
113116 /* GetItemInt */
113117 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
113118 PyObject *r;
113119 if (unlikely(!j)) return NULL;
113120 r = PyObject_GetItem(o, j);
113121 Py_DECREF(j);
113122 return r;
113123 }
113124 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
113125 CYTHON_NCP_UNUSED int wraparound,
113126 CYTHON_NCP_UNUSED int boundscheck) {
113127 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
113128 Py_ssize_t wrapped_i = i;
113129 if (wraparound & unlikely(i < 0)) {
113130 wrapped_i += PyList_GET_SIZE(o);
113131 }
113132 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
113133 PyObject *r = PyList_GET_ITEM(o, wrapped_i);
113134 Py_INCREF(r);
113135 return r;
113136 }
113137 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
113138 #else
113139 return PySequence_GetItem(o, i);
113140 #endif
113141 }
113142 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
113143 CYTHON_NCP_UNUSED int wraparound,
113144 CYTHON_NCP_UNUSED int boundscheck) {
113145 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
113146 Py_ssize_t wrapped_i = i;
113147 if (wraparound & unlikely(i < 0)) {
113148 wrapped_i += PyTuple_GET_SIZE(o);
113149 }
113150 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
113151 PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
113152 Py_INCREF(r);
113153 return r;
113154 }
113155 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
113156 #else
113157 return PySequence_GetItem(o, i);
113158 #endif
113159 }
113160 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
113161 CYTHON_NCP_UNUSED int wraparound,
113162 CYTHON_NCP_UNUSED int boundscheck) {
113163 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
113164 if (is_list || PyList_CheckExact(o)) {
113165 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
113166 if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
113167 PyObject *r = PyList_GET_ITEM(o, n);
113168 Py_INCREF(r);
113169 return r;
113170 }
113171 }
113172 else if (PyTuple_CheckExact(o)) {
113173 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
113174 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
113175 PyObject *r = PyTuple_GET_ITEM(o, n);
113176 Py_INCREF(r);
113177 return r;
113178 }
113179 } else {
113180 PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
113181 PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
113182 if (mm && mm->mp_subscript) {
113183 PyObject *r, *key = PyInt_FromSsize_t(i);
113184 if (unlikely(!key)) return NULL;
113185 r = mm->mp_subscript(o, key);
113186 Py_DECREF(key);
113187 return r;
113188 }
113189 if (likely(sm && sm->sq_item)) {
113190 if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
113191 Py_ssize_t l = sm->sq_length(o);
113192 if (likely(l >= 0)) {
113193 i += l;
113194 } else {
113195 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
113196 return NULL;
113197 PyErr_Clear();
113198 }
113199 }
113200 return sm->sq_item(o, i);
113201 }
113202 }
113203 #else
113204 if (is_list || !PyMapping_Check(o)) {
113205 return PySequence_GetItem(o, i);
113206 }
113207 #endif
113208 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
113209 }
113210
113211 /* StringJoin */
113212 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
113213 (void) __Pyx_PyObject_CallMethod1;
113214 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION < 3
113215 return _PyString_Join(sep, values);
113216 #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
113217 return _PyBytes_Join(sep, values);
113218 #else
113219 return __Pyx_PyObject_CallMethod1(sep, __pyx_n_s_join, values);
113220 #endif
113221 }
113222
113223 /* PyIntCompare */
113224 static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
113225 CYTHON_MAYBE_UNUSED_VAR(intval);
113226 CYTHON_UNUSED_VAR(inplace);
113227 if (op1 == op2) {
113228 return 0;
113229 }
113230 #if PY_MAJOR_VERSION < 3
113231 if (likely(PyInt_CheckExact(op1))) {
113232 const long b = intval;
113233 long a = PyInt_AS_LONG(op1);
113234 return (a != b);
113235 }
113236 #endif
113237 #if CYTHON_USE_PYLONG_INTERNALS
113238 if (likely(PyLong_CheckExact(op1))) {
113239 int unequal;
113240 unsigned long uintval;
113241 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
113242 const digit* digits = __Pyx_PyLong_Digits(op1);
113243 if (intval == 0) {
113244 return (__Pyx_PyLong_IsZero(op1) != 1);
113245 } else if (intval < 0) {
113246 if (__Pyx_PyLong_IsNonNeg(op1))
113247 return 1;
113248 intval = -intval;
113249 } else {
113250 if (__Pyx_PyLong_IsNeg(op1))
113251 return 1;
113252 }
113253 uintval = (unsigned long) intval;
113254 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
113255 if (uintval >> (PyLong_SHIFT * 4)) {
113256 unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
113257 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
113258 } else
113259 #endif
113260 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
113261 if (uintval >> (PyLong_SHIFT * 3)) {
113262 unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
113263 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
113264 } else
113265 #endif
113266 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
113267 if (uintval >> (PyLong_SHIFT * 2)) {
113268 unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
113269 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
113270 } else
113271 #endif
113272 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
113273 if (uintval >> (PyLong_SHIFT * 1)) {
113274 unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
113275 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
113276 } else
113277 #endif
113278 unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
113279 return (unequal != 0);
113280 }
113281 #endif
113282 if (PyFloat_CheckExact(op1)) {
113283 const long b = intval;
113284 #if CYTHON_COMPILING_IN_LIMITED_API
113285 double a = __pyx_PyFloat_AsDouble(op1);
113286 #else
113287 double a = PyFloat_AS_DOUBLE(op1);
113288 #endif
113289 return ((double)a != (double)b);
113290 }
113291 return __Pyx_PyObject_IsTrueAndDecref(
113292 PyObject_RichCompare(op1, op2, Py_NE));
113293 }
113294
113295 /* PyObjectSetAttrStr */
113296 #if CYTHON_USE_TYPE_SLOTS
113297 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
113298 PyTypeObject* tp = Py_TYPE(obj);
113299 if (likely(tp->tp_setattro))
113300 return tp->tp_setattro(obj, attr_name, value);
113301 #if PY_MAJOR_VERSION < 3
113302 if (likely(tp->tp_setattr))
113303 return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
113304 #endif
113305 return PyObject_SetAttr(obj, attr_name, value);
113306 }
113307 #endif
113308
113309 /* KeywordStringCheck */
113310 static int __Pyx_CheckKeywordStrings(
113311 PyObject *kw,
113312 const char* function_name,
113313 int kw_allowed)
113314 {
113315 PyObject* key = 0;
113316 Py_ssize_t pos = 0;
113317 #if CYTHON_COMPILING_IN_PYPY
113318 if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
113319 goto invalid_keyword;
113320 return 1;
113321 #else
113322 if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
113323 Py_ssize_t kwsize;
113324 #if CYTHON_ASSUME_SAFE_MACROS
113325 kwsize = PyTuple_GET_SIZE(kw);
113326 #else
113327 kwsize = PyTuple_Size(kw);
113328 if (kwsize < 0) return 0;
113329 #endif
113330 if (unlikely(kwsize == 0))
113331 return 1;
113332 if (!kw_allowed) {
113333 #if CYTHON_ASSUME_SAFE_MACROS
113334 key = PyTuple_GET_ITEM(kw, 0);
113335 #else
113336 key = PyTuple_GetItem(kw, pos);
113337 if (!key) return 0;
113338 #endif
113339 goto invalid_keyword;
113340 }
113341 #if PY_VERSION_HEX < 0x03090000
113342 for (pos = 0; pos < kwsize; pos++) {
113343 #if CYTHON_ASSUME_SAFE_MACROS
113344 key = PyTuple_GET_ITEM(kw, pos);
113345 #else
113346 key = PyTuple_GetItem(kw, pos);
113347 if (!key) return 0;
113348 #endif
113349 if (unlikely(!PyUnicode_Check(key)))
113350 goto invalid_keyword_type;
113351 }
113352 #endif
113353 return 1;
113354 }
113355 while (PyDict_Next(kw, &pos, &key, 0)) {
113356 #if PY_MAJOR_VERSION < 3
113357 if (unlikely(!PyString_Check(key)))
113358 #endif
113359 if (unlikely(!PyUnicode_Check(key)))
113360 goto invalid_keyword_type;
113361 }
113362 if (!kw_allowed && unlikely(key))
113363 goto invalid_keyword;
113364 return 1;
113365 invalid_keyword_type:
113366 PyErr_Format(PyExc_TypeError,
113367 "%.200s() keywords must be strings", function_name);
113368 return 0;
113369 #endif
113370 invalid_keyword:
113371 #if PY_MAJOR_VERSION < 3
113372 PyErr_Format(PyExc_TypeError,
113373 "%.200s() got an unexpected keyword argument '%.200s'",
113374 function_name, PyString_AsString(key));
113375 #else
113376 PyErr_Format(PyExc_TypeError,
113377 "%s() got an unexpected keyword argument '%U'",
113378 function_name, key);
113379 #endif
113380 return 0;
113381 }
113382
113383 /* RaiseDoubleKeywords */
113384 static void __Pyx_RaiseDoubleKeywordsError(
113385 const char* func_name,
113386 PyObject* kw_name)
113387 {
113388 PyErr_Format(PyExc_TypeError,
113389 #if PY_MAJOR_VERSION >= 3
113390 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
113391 #else
113392 "%s() got multiple values for keyword argument '%s'", func_name,
113393 PyString_AsString(kw_name));
113394 #endif
113395 }
113396
113397 /* ParseKeywords */
113398 static int __Pyx_ParseOptionalKeywords(
113399 PyObject *kwds,
113400 PyObject *const *kwvalues,
113401 PyObject **argnames[],
113402 PyObject *kwds2,
113403 PyObject *values[],
113404 Py_ssize_t num_pos_args,
113405 const char* function_name)
113406 {
113407 PyObject *key = 0, *value = 0;
113408 Py_ssize_t pos = 0;
113409 PyObject*** name;
113410 PyObject*** first_kw_arg = argnames + num_pos_args;
113411 int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
113412 while (1) {
113413 Py_XDECREF(key); key = NULL;
113414 Py_XDECREF(value); value = NULL;
113415 if (kwds_is_tuple) {
113416 Py_ssize_t size;
113417 #if CYTHON_ASSUME_SAFE_MACROS
113418 size = PyTuple_GET_SIZE(kwds);
113419 #else
113420 size = PyTuple_Size(kwds);
113421 if (size < 0) goto bad;
113422 #endif
113423 if (pos >= size) break;
113424 #if CYTHON_AVOID_BORROWED_REFS
113425 key = __Pyx_PySequence_ITEM(kwds, pos);
113426 if (!key) goto bad;
113427 #elif CYTHON_ASSUME_SAFE_MACROS
113428 key = PyTuple_GET_ITEM(kwds, pos);
113429 #else
113430 key = PyTuple_GetItem(kwds, pos);
113431 if (!key) goto bad;
113432 #endif
113433 value = kwvalues[pos];
113434 pos++;
113435 }
113436 else
113437 {
113438 if (!PyDict_Next(kwds, &pos, &key, &value)) break;
113439 #if CYTHON_AVOID_BORROWED_REFS
113440 Py_INCREF(key);
113441 #endif
113442 }
113443 name = first_kw_arg;
113444 while (*name && (**name != key)) name++;
113445 if (*name) {
113446 values[name-argnames] = value;
113447 #if CYTHON_AVOID_BORROWED_REFS
113448 Py_INCREF(value);
113449 Py_DECREF(key);
113450 #endif
113451 key = NULL;
113452 value = NULL;
113453 continue;
113454 }
113455 #if !CYTHON_AVOID_BORROWED_REFS
113456 Py_INCREF(key);
113457 #endif
113458 Py_INCREF(value);
113459 name = first_kw_arg;
113460 #if PY_MAJOR_VERSION < 3
113461 if (likely(PyString_Check(key))) {
113462 while (*name) {
113463 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
113464 && _PyString_Eq(**name, key)) {
113465 values[name-argnames] = value;
113466 #if CYTHON_AVOID_BORROWED_REFS
113467 value = NULL;
113468 #endif
113469 break;
113470 }
113471 name++;
113472 }
113473 if (*name) continue;
113474 else {
113475 PyObject*** argname = argnames;
113476 while (argname != first_kw_arg) {
113477 if ((**argname == key) || (
113478 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
113479 && _PyString_Eq(**argname, key))) {
113480 goto arg_passed_twice;
113481 }
113482 argname++;
113483 }
113484 }
113485 } else
113486 #endif
113487 if (likely(PyUnicode_Check(key))) {
113488 while (*name) {
113489 int cmp = (
113490 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
113491 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
113492 #endif
113493 PyUnicode_Compare(**name, key)
113494 );
113495 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
113496 if (cmp == 0) {
113497 values[name-argnames] = value;
113498 #if CYTHON_AVOID_BORROWED_REFS
113499 value = NULL;
113500 #endif
113501 break;
113502 }
113503 name++;
113504 }
113505 if (*name) continue;
113506 else {
113507 PyObject*** argname = argnames;
113508 while (argname != first_kw_arg) {
113509 int cmp = (**argname == key) ? 0 :
113510 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
113511 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
113512 #endif
113513 PyUnicode_Compare(**argname, key);
113514 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
113515 if (cmp == 0) goto arg_passed_twice;
113516 argname++;
113517 }
113518 }
113519 } else
113520 goto invalid_keyword_type;
113521 if (kwds2) {
113522 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
113523 } else {
113524 goto invalid_keyword;
113525 }
113526 }
113527 Py_XDECREF(key);
113528 Py_XDECREF(value);
113529 return 0;
113530 arg_passed_twice:
113531 __Pyx_RaiseDoubleKeywordsError(function_name, key);
113532 goto bad;
113533 invalid_keyword_type:
113534 PyErr_Format(PyExc_TypeError,
113535 "%.200s() keywords must be strings", function_name);
113536 goto bad;
113537 invalid_keyword:
113538 #if PY_MAJOR_VERSION < 3
113539 PyErr_Format(PyExc_TypeError,
113540 "%.200s() got an unexpected keyword argument '%.200s'",
113541 function_name, PyString_AsString(key));
113542 #else
113543 PyErr_Format(PyExc_TypeError,
113544 "%s() got an unexpected keyword argument '%U'",
113545 function_name, key);
113546 #endif
113547 bad:
113548 Py_XDECREF(key);
113549 Py_XDECREF(value);
113550 return -1;
113551 }
113552
113553 /* RaiseArgTupleInvalid */
113554 static void __Pyx_RaiseArgtupleInvalid(
113555 const char* func_name,
113556 int exact,
113557 Py_ssize_t num_min,
113558 Py_ssize_t num_max,
113559 Py_ssize_t num_found)
113560 {
113561 Py_ssize_t num_expected;
113562 const char *more_or_less;
113563 if (num_found < num_min) {
113564 num_expected = num_min;
113565 more_or_less = "at least";
113566 } else {
113567 num_expected = num_max;
113568 more_or_less = "at most";
113569 }
113570 if (exact) {
113571 more_or_less = "exactly";
113572 }
113573 PyErr_Format(PyExc_TypeError,
113574 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
113575 func_name, more_or_less, num_expected,
113576 (num_expected == 1) ? "" : "s", num_found);
113577 }
113578
113579 /* ObjectGetItem */
113580 #if CYTHON_USE_TYPE_SLOTS
113581 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
113582 PyObject *runerr = NULL;
113583 Py_ssize_t key_value;
113584 key_value = __Pyx_PyIndex_AsSsize_t(index);
113585 if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
113586 return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
113587 }
113588 if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
113589 __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
113590 PyErr_Clear();
113591 PyErr_Format(PyExc_IndexError,
113592 "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
113593 __Pyx_DECREF_TypeName(index_type_name);
113594 }
113595 return NULL;
113596 }
113597 static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
113598 __Pyx_TypeName obj_type_name;
113599 if (likely(PyType_Check(obj))) {
113600 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
113601 if (!meth) {
113602 PyErr_Clear();
113603 } else {
113604 PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
113605 Py_DECREF(meth);
113606 return result;
113607 }
113608 }
113609 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
113610 PyErr_Format(PyExc_TypeError,
113611 "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
113612 __Pyx_DECREF_TypeName(obj_type_name);
113613 return NULL;
113614 }
113615 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
113616 PyTypeObject *tp = Py_TYPE(obj);
113617 PyMappingMethods *mm = tp->tp_as_mapping;
113618 PySequenceMethods *sm = tp->tp_as_sequence;
113619 if (likely(mm && mm->mp_subscript)) {
113620 return mm->mp_subscript(obj, key);
113621 }
113622 if (likely(sm && sm->sq_item)) {
113623 return __Pyx_PyObject_GetIndex(obj, key);
113624 }
113625 return __Pyx_PyObject_GetItem_Slow(obj, key);
113626 }
113627 #endif
113628
113629 /* IterFinish */
113630 static CYTHON_INLINE int __Pyx_IterFinish(void) {
113631 PyObject* exc_type;
113632 __Pyx_PyThreadState_declare
113633 __Pyx_PyThreadState_assign
113634 exc_type = __Pyx_PyErr_CurrentExceptionType();
113635 if (unlikely(exc_type)) {
113636 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
113637 return -1;
113638 __Pyx_PyErr_Clear();
113639 return 0;
113640 }
113641 return 0;
113642 }
113643
113644 /* PyObjectCallNoArg */
113645 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
113646 PyObject *arg[2] = {NULL, NULL};
113647 return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
113648 }
113649
113650 /* PyObjectCallMethod0 */
113651 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
113652 PyObject *method = NULL, *result = NULL;
113653 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
113654 if (likely(is_method)) {
113655 result = __Pyx_PyObject_CallOneArg(method, obj);
113656 Py_DECREF(method);
113657 return result;
113658 }
113659 if (unlikely(!method)) goto bad;
113660 result = __Pyx_PyObject_CallNoArg(method);
113661 Py_DECREF(method);
113662 bad:
113663 return result;
113664 }
113665
113666 /* RaiseNeedMoreValuesToUnpack */
113667 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
113668 PyErr_Format(PyExc_ValueError,
113669 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
113670 index, (index == 1) ? "" : "s");
113671 }
113672
113673 /* RaiseTooManyValuesToUnpack */
113674 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
113675 PyErr_Format(PyExc_ValueError,
113676 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
113677 }
113678
113679 /* UnpackItemEndCheck */
113680 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
113681 if (unlikely(retval)) {
113682 Py_DECREF(retval);
113683 __Pyx_RaiseTooManyValuesError(expected);
113684 return -1;
113685 }
113686 return __Pyx_IterFinish();
113687 }
113688
113689 /* RaiseNoneIterError */
113690 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
113691 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
113692 }
113693
113694 /* UnpackTupleError */
113695 static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
113696 if (t == Py_None) {
113697 __Pyx_RaiseNoneNotIterableError();
113698 } else if (PyTuple_GET_SIZE(t) < index) {
113699 __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
113700 } else {
113701 __Pyx_RaiseTooManyValuesError(index);
113702 }
113703 }
113704
113705 /* UnpackTuple2 */
113706 static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
113707 PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
113708 PyObject *value1 = NULL, *value2 = NULL;
113709 #if CYTHON_COMPILING_IN_PYPY
113710 value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad;
113711 value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad;
113712 #else
113713 value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1);
113714 value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2);
113715 #endif
113716 if (decref_tuple) {
113717 Py_DECREF(tuple);
113718 }
113719 *pvalue1 = value1;
113720 *pvalue2 = value2;
113721 return 0;
113722 #if CYTHON_COMPILING_IN_PYPY
113723 bad:
113724 Py_XDECREF(value1);
113725 Py_XDECREF(value2);
113726 if (decref_tuple) { Py_XDECREF(tuple); }
113727 return -1;
113728 #endif
113729 }
113730 static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
113731 int has_known_size, int decref_tuple) {
113732 Py_ssize_t index;
113733 PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
113734 iternextfunc iternext;
113735 iter = PyObject_GetIter(tuple);
113736 if (unlikely(!iter)) goto bad;
113737 if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
113738 iternext = __Pyx_PyObject_GetIterNextFunc(iter);
113739 value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
113740 value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
113741 if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
113742 Py_DECREF(iter);
113743 *pvalue1 = value1;
113744 *pvalue2 = value2;
113745 return 0;
113746 unpacking_failed:
113747 if (!has_known_size && __Pyx_IterFinish() == 0)
113748 __Pyx_RaiseNeedMoreValuesError(index);
113749 bad:
113750 Py_XDECREF(iter);
113751 Py_XDECREF(value1);
113752 Py_XDECREF(value2);
113753 if (decref_tuple) { Py_XDECREF(tuple); }
113754 return -1;
113755 }
113756
113757 /* dict_iter */
113758 #if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
113759 #include <string.h>
113760 #endif
113761 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
113762 Py_ssize_t* p_orig_length, int* p_source_is_dict) {
113763 is_dict = is_dict || likely(PyDict_CheckExact(iterable));
113764 *p_source_is_dict = is_dict;
113765 if (is_dict) {
113766 #if !CYTHON_COMPILING_IN_PYPY
113767 *p_orig_length = PyDict_Size(iterable);
113768 Py_INCREF(iterable);
113769 return iterable;
113770 #elif PY_MAJOR_VERSION >= 3
113771 static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
113772 PyObject **pp = NULL;
113773 if (method_name) {
113774 const char *name = PyUnicode_AsUTF8(method_name);
113775 if (strcmp(name, "iteritems") == 0) pp = &py_items;
113776 else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
113777 else if (strcmp(name, "itervalues") == 0) pp = &py_values;
113778 if (pp) {
113779 if (!*pp) {
113780 *pp = PyUnicode_FromString(name + 4);
113781 if (!*pp)
113782 return NULL;
113783 }
113784 method_name = *pp;
113785 }
113786 }
113787 #endif
113788 }
113789 *p_orig_length = 0;
113790 if (method_name) {
113791 PyObject* iter;
113792 iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
113793 if (!iterable)
113794 return NULL;
113795 #if !CYTHON_COMPILING_IN_PYPY
113796 if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
113797 return iterable;
113798 #endif
113799 iter = PyObject_GetIter(iterable);
113800 Py_DECREF(iterable);
113801 return iter;
113802 }
113803 return PyObject_GetIter(iterable);
113804 }
113805 static CYTHON_INLINE int __Pyx_dict_iter_next(
113806 PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
113807 PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
113808 PyObject* next_item;
113809 #if !CYTHON_COMPILING_IN_PYPY
113810 if (source_is_dict) {
113811 PyObject *key, *value;
113812 if (unlikely(orig_length != PyDict_Size(iter_obj))) {
113813 PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
113814 return -1;
113815 }
113816 if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
113817 return 0;
113818 }
113819 if (pitem) {
113820 PyObject* tuple = PyTuple_New(2);
113821 if (unlikely(!tuple)) {
113822 return -1;
113823 }
113824 Py_INCREF(key);
113825 Py_INCREF(value);
113826 PyTuple_SET_ITEM(tuple, 0, key);
113827 PyTuple_SET_ITEM(tuple, 1, value);
113828 *pitem = tuple;
113829 } else {
113830 if (pkey) {
113831 Py_INCREF(key);
113832 *pkey = key;
113833 }
113834 if (pvalue) {
113835 Py_INCREF(value);
113836 *pvalue = value;
113837 }
113838 }
113839 return 1;
113840 } else if (PyTuple_CheckExact(iter_obj)) {
113841 Py_ssize_t pos = *ppos;
113842 if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
113843 *ppos = pos + 1;
113844 next_item = PyTuple_GET_ITEM(iter_obj, pos);
113845 Py_INCREF(next_item);
113846 } else if (PyList_CheckExact(iter_obj)) {
113847 Py_ssize_t pos = *ppos;
113848 if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
113849 *ppos = pos + 1;
113850 next_item = PyList_GET_ITEM(iter_obj, pos);
113851 Py_INCREF(next_item);
113852 } else
113853 #endif
113854 {
113855 next_item = PyIter_Next(iter_obj);
113856 if (unlikely(!next_item)) {
113857 return __Pyx_IterFinish();
113858 }
113859 }
113860 if (pitem) {
113861 *pitem = next_item;
113862 } else if (pkey && pvalue) {
113863 if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
113864 return -1;
113865 } else if (pkey) {
113866 *pkey = next_item;
113867 } else {
113868 *pvalue = next_item;
113869 }
113870 return 1;
113871 }
113872
113873 /* GetAttr3 */
113874 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
113875 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
113876 __Pyx_PyThreadState_declare
113877 __Pyx_PyThreadState_assign
113878 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
113879 return NULL;
113880 __Pyx_PyErr_Clear();
113881 Py_INCREF(d);
113882 return d;
113883 }
113884 #endif
113885 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
113886 PyObject *r;
113887 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
113888 int res = PyObject_GetOptionalAttr(o, n, &r);
113889 return (res != 0) ? r : __Pyx_NewRef(d);
113890 #else
113891 #if CYTHON_USE_TYPE_SLOTS
113892 if (likely(PyString_Check(n))) {
113893 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
113894 if (unlikely(!r) && likely(!PyErr_Occurred())) {
113895 r = __Pyx_NewRef(d);
113896 }
113897 return r;
113898 }
113899 #endif
113900 r = PyObject_GetAttr(o, n);
113901 return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
113902 #endif
113903 }
113904
113905 /* PyDictVersioning */
113906 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
113907 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
113908 PyObject *dict = Py_TYPE(obj)->tp_dict;
113909 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
113910 }
113911 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
113912 PyObject **dictptr = NULL;
113913 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
113914 if (offset) {
113915 #if CYTHON_COMPILING_IN_CPYTHON
113916 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
113917 #else
113918 dictptr = _PyObject_GetDictPtr(obj);
113919 #endif
113920 }
113921 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
113922 }
113923 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
113924 PyObject *dict = Py_TYPE(obj)->tp_dict;
113925 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
113926 return 0;
113927 return obj_dict_version == __Pyx_get_object_dict_version(obj);
113928 }
113929 #endif
113930
113931 /* GetModuleGlobalName */
113932 #if CYTHON_USE_DICT_VERSIONS
113933 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
113934 #else
113935 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
113936 #endif
113937 {
113938 PyObject *result;
113939 #if !CYTHON_AVOID_BORROWED_REFS
113940 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
113941 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
113942 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
113943 if (likely(result)) {
113944 return __Pyx_NewRef(result);
113945 } else if (unlikely(PyErr_Occurred())) {
113946 return NULL;
113947 }
113948 #elif CYTHON_COMPILING_IN_LIMITED_API
113949 if (unlikely(!__pyx_m)) {
113950 return NULL;
113951 }
113952 result = PyObject_GetAttr(__pyx_m, name);
113953 if (likely(result)) {
113954 return result;
113955 }
113956 #else
113957 result = PyDict_GetItem(__pyx_d, name);
113958 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
113959 if (likely(result)) {
113960 return __Pyx_NewRef(result);
113961 }
113962 #endif
113963 #else
113964 result = PyObject_GetItem(__pyx_d, name);
113965 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
113966 if (likely(result)) {
113967 return __Pyx_NewRef(result);
113968 }
113969 PyErr_Clear();
113970 #endif
113971 return __Pyx_GetBuiltinName(name);
113972 }
113973
113974 /* CallUnboundCMethod0 */
113975 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
113976 PyObject *args, *result = NULL;
113977 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
113978 #if CYTHON_ASSUME_SAFE_MACROS
113979 args = PyTuple_New(1);
113980 if (unlikely(!args)) goto bad;
113981 Py_INCREF(self);
113982 PyTuple_SET_ITEM(args, 0, self);
113983 #else
113984 args = PyTuple_Pack(1, self);
113985 if (unlikely(!args)) goto bad;
113986 #endif
113987 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
113988 Py_DECREF(args);
113989 bad:
113990 return result;
113991 }
113992
113993 /* py_dict_items */
113994 static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
113995 if (PY_MAJOR_VERSION >= 3)
113996 return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
113997 else
113998 return PyDict_Items(d);
113999 }
114000
114001 /* WriteUnraisableException */
114002 static void __Pyx_WriteUnraisable(const char *name, int clineno,
114003 int lineno, const char *filename,
114004 int full_traceback, int nogil) {
114005 PyObject *old_exc, *old_val, *old_tb;
114006 PyObject *ctx;
114007 __Pyx_PyThreadState_declare
114008 #ifdef WITH_THREAD
114009 PyGILState_STATE state;
114010 if (nogil)
114011 state = PyGILState_Ensure();
114012 else state = (PyGILState_STATE)0;
114013 #endif
114014 CYTHON_UNUSED_VAR(clineno);
114015 CYTHON_UNUSED_VAR(lineno);
114016 CYTHON_UNUSED_VAR(filename);
114017 CYTHON_MAYBE_UNUSED_VAR(nogil);
114018 __Pyx_PyThreadState_assign
114019 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
114020 if (full_traceback) {
114021 Py_XINCREF(old_exc);
114022 Py_XINCREF(old_val);
114023 Py_XINCREF(old_tb);
114024 __Pyx_ErrRestore(old_exc, old_val, old_tb);
114025 PyErr_PrintEx(0);
114026 }
114027 #if PY_MAJOR_VERSION < 3
114028 ctx = PyString_FromString(name);
114029 #else
114030 ctx = PyUnicode_FromString(name);
114031 #endif
114032 __Pyx_ErrRestore(old_exc, old_val, old_tb);
114033 if (!ctx) {
114034 PyErr_WriteUnraisable(Py_None);
114035 } else {
114036 PyErr_WriteUnraisable(ctx);
114037 Py_DECREF(ctx);
114038 }
114039 #ifdef WITH_THREAD
114040 if (nogil)
114041 PyGILState_Release(state);
114042 #endif
114043 }
114044
114045 /* ArgTypeTest */
114046 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
114047 {
114048 __Pyx_TypeName type_name;
114049 __Pyx_TypeName obj_type_name;
114050 if (unlikely(!type)) {
114051 PyErr_SetString(PyExc_SystemError, "Missing type object");
114052 return 0;
114053 }
114054 else if (exact) {
114055 #if PY_MAJOR_VERSION == 2
114056 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
114057 #endif
114058 }
114059 else {
114060 if (likely(__Pyx_TypeCheck(obj, type))) return 1;
114061 }
114062 type_name = __Pyx_PyType_GetName(type);
114063 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
114064 PyErr_Format(PyExc_TypeError,
114065 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
114066 ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
114067 __Pyx_DECREF_TypeName(type_name);
114068 __Pyx_DECREF_TypeName(obj_type_name);
114069 return 0;
114070 }
114071
114072 /* DictGetItem */
114073 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
114074 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
114075 PyObject *value;
114076 value = PyDict_GetItemWithError(d, key);
114077 if (unlikely(!value)) {
114078 if (!PyErr_Occurred()) {
114079 if (unlikely(PyTuple_Check(key))) {
114080 PyObject* args = PyTuple_Pack(1, key);
114081 if (likely(args)) {
114082 PyErr_SetObject(PyExc_KeyError, args);
114083 Py_DECREF(args);
114084 }
114085 } else {
114086 PyErr_SetObject(PyExc_KeyError, key);
114087 }
114088 }
114089 return NULL;
114090 }
114091 Py_INCREF(value);
114092 return value;
114093 }
114094 #endif
114095
114096 /* CallUnboundCMethod2 */
114097 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
114098 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
114099 if (likely(cfunc->func)) {
114100 PyObject *args[2] = {arg1, arg2};
114101 if (cfunc->flag == METH_FASTCALL) {
114102 #if PY_VERSION_HEX >= 0x030700A0
114103 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
114104 #else
114105 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
114106 #endif
114107 }
114108 #if PY_VERSION_HEX >= 0x030700A0
114109 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
114110 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
114111 #endif
114112 }
114113 return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
114114 }
114115 #endif
114116 static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
114117 PyObject *args, *result = NULL;
114118 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
114119 #if CYTHON_COMPILING_IN_CPYTHON
114120 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
114121 args = PyTuple_New(2);
114122 if (unlikely(!args)) goto bad;
114123 Py_INCREF(arg1);
114124 PyTuple_SET_ITEM(args, 0, arg1);
114125 Py_INCREF(arg2);
114126 PyTuple_SET_ITEM(args, 1, arg2);
114127 if (cfunc->flag & METH_KEYWORDS)
114128 result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
114129 else
114130 result = (*cfunc->func)(self, args);
114131 } else {
114132 args = PyTuple_New(3);
114133 if (unlikely(!args)) goto bad;
114134 Py_INCREF(self);
114135 PyTuple_SET_ITEM(args, 0, self);
114136 Py_INCREF(arg1);
114137 PyTuple_SET_ITEM(args, 1, arg1);
114138 Py_INCREF(arg2);
114139 PyTuple_SET_ITEM(args, 2, arg2);
114140 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
114141 }
114142 #else
114143 args = PyTuple_Pack(3, self, arg1, arg2);
114144 if (unlikely(!args)) goto bad;
114145 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
114146 #endif
114147 bad:
114148 Py_XDECREF(args);
114149 return result;
114150 }
114151
114152 /* py_dict_pop */
114153 static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) {
114154 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3 & PY_VERSION_HEX < 0x030d0000
114155 if ((1)) {
114156 return _PyDict_Pop(d, key, default_value);
114157 } else
114158 #endif
114159 if (default_value) {
114160 return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value);
114161 } else {
114162 return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key);
114163 }
114164 }
114165
114166 /* SetItemInt */
114167 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
114168 int r;
114169 if (unlikely(!j)) return -1;
114170 r = PyObject_SetItem(o, j, v);
114171 Py_DECREF(j);
114172 return r;
114173 }
114174 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
114175 CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
114176 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
114177 if (is_list || PyList_CheckExact(o)) {
114178 Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
114179 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
114180 PyObject* old = PyList_GET_ITEM(o, n);
114181 Py_INCREF(v);
114182 PyList_SET_ITEM(o, n, v);
114183 Py_DECREF(old);
114184 return 1;
114185 }
114186 } else {
114187 PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
114188 PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
114189 if (mm && mm->mp_ass_subscript) {
114190 int r;
114191 PyObject *key = PyInt_FromSsize_t(i);
114192 if (unlikely(!key)) return -1;
114193 r = mm->mp_ass_subscript(o, key, v);
114194 Py_DECREF(key);
114195 return r;
114196 }
114197 if (likely(sm && sm->sq_ass_item)) {
114198 if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
114199 Py_ssize_t l = sm->sq_length(o);
114200 if (likely(l >= 0)) {
114201 i += l;
114202 } else {
114203 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
114204 return -1;
114205 PyErr_Clear();
114206 }
114207 }
114208 return sm->sq_ass_item(o, i, v);
114209 }
114210 }
114211 #else
114212 if (is_list || !PyMapping_Check(o))
114213 {
114214 return PySequence_SetItem(o, i, v);
114215 }
114216 #endif
114217 return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
114218 }
114219
114220 /* PyIntBinop */
114221 #if !CYTHON_COMPILING_IN_PYPY
114222 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
114223 CYTHON_MAYBE_UNUSED_VAR(intval);
114224 CYTHON_MAYBE_UNUSED_VAR(inplace);
114225 CYTHON_UNUSED_VAR(zerodivision_check);
114226 #if PY_MAJOR_VERSION < 3
114227 if (likely(PyInt_CheckExact(op1))) {
114228 const long b = intval;
114229 long x;
114230 long a = PyInt_AS_LONG(op1);
114231
114232 x = (long)((unsigned long)a - (unsigned long)b);
114233 if (likely((x^a) >= 0 || (x^~b) >= 0))
114234 return PyInt_FromLong(x);
114235 return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
114236 }
114237 #endif
114238 #if CYTHON_USE_PYLONG_INTERNALS
114239 if (likely(PyLong_CheckExact(op1))) {
114240 const long b = intval;
114241 long a, x;
114242 #ifdef HAVE_LONG_LONG
114243 const PY_LONG_LONG llb = intval;
114244 PY_LONG_LONG lla, llx;
114245 #endif
114246 if (unlikely(__Pyx_PyLong_IsZero(op1))) {
114247 return PyLong_FromLong(-intval);
114248 }
114249 if (likely(__Pyx_PyLong_IsCompact(op1))) {
114250 a = __Pyx_PyLong_CompactValue(op1);
114251 } else {
114252 const digit* digits = __Pyx_PyLong_Digits(op1);
114253 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
114254 switch (size) {
114255 case -2:
114256 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
114257 a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
114258 break;
114259 #ifdef HAVE_LONG_LONG
114260 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
114261 lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
114262 goto long_long;
114263 #endif
114264 }
114265 CYTHON_FALLTHROUGH;
114266 case 2:
114267 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
114268 a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
114269 break;
114270 #ifdef HAVE_LONG_LONG
114271 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
114272 lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
114273 goto long_long;
114274 #endif
114275 }
114276 CYTHON_FALLTHROUGH;
114277 case -3:
114278 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
114279 a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
114280 break;
114281 #ifdef HAVE_LONG_LONG
114282 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
114283 lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
114284 goto long_long;
114285 #endif
114286 }
114287 CYTHON_FALLTHROUGH;
114288 case 3:
114289 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
114290 a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
114291 break;
114292 #ifdef HAVE_LONG_LONG
114293 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
114294 lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
114295 goto long_long;
114296 #endif
114297 }
114298 CYTHON_FALLTHROUGH;
114299 case -4:
114300 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
114301 a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
114302 break;
114303 #ifdef HAVE_LONG_LONG
114304 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
114305 lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
114306 goto long_long;
114307 #endif
114308 }
114309 CYTHON_FALLTHROUGH;
114310 case 4:
114311 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
114312 a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
114313 break;
114314 #ifdef HAVE_LONG_LONG
114315 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
114316 lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
114317 goto long_long;
114318 #endif
114319 }
114320 CYTHON_FALLTHROUGH;
114321 default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
114322 }
114323 }
114324 x = a - b;
114325 return PyLong_FromLong(x);
114326 #ifdef HAVE_LONG_LONG
114327 long_long:
114328 llx = lla - llb;
114329 return PyLong_FromLongLong(llx);
114330 #endif
114331
114332
114333 }
114334 #endif
114335 if (PyFloat_CheckExact(op1)) {
114336 const long b = intval;
114337 #if CYTHON_COMPILING_IN_LIMITED_API
114338 double a = __pyx_PyFloat_AsDouble(op1);
114339 #else
114340 double a = PyFloat_AS_DOUBLE(op1);
114341 #endif
114342 double result;
114343
114344 PyFPE_START_PROTECT("subtract", return NULL)
114345 result = ((double)a) - (double)b;
114346 PyFPE_END_PROTECT(result)
114347 return PyFloat_FromDouble(result);
114348 }
114349 return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
114350 }
114351 #endif
114352
114353 /* RaiseClosureNameError */
114354 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
114355 PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
114356 }
114357
114358 /* ExtTypeTest */
114359 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
114360 __Pyx_TypeName obj_type_name;
114361 __Pyx_TypeName type_name;
114362 if (unlikely(!type)) {
114363 PyErr_SetString(PyExc_SystemError, "Missing type object");
114364 return 0;
114365 }
114366 if (likely(__Pyx_TypeCheck(obj, type)))
114367 return 1;
114368 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
114369 type_name = __Pyx_PyType_GetName(type);
114370 PyErr_Format(PyExc_TypeError,
114371 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
114372 obj_type_name, type_name);
114373 __Pyx_DECREF_TypeName(obj_type_name);
114374 __Pyx_DECREF_TypeName(type_name);
114375 return 0;
114376 }
114377
114378 /* SliceObject */
114379 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
114380 Py_ssize_t cstart, Py_ssize_t cstop,
114381 PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
114382 int has_cstart, int has_cstop, int wraparound) {
114383 __Pyx_TypeName obj_type_name;
114384 #if CYTHON_USE_TYPE_SLOTS
114385 PyMappingMethods* mp;
114386 #if PY_MAJOR_VERSION < 3
114387 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
114388 if (likely(ms && ms->sq_slice)) {
114389 if (!has_cstart) {
114390 if (_py_start && (*_py_start != Py_None)) {
114391 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
114392 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
114393 } else
114394 cstart = 0;
114395 }
114396 if (!has_cstop) {
114397 if (_py_stop && (*_py_stop != Py_None)) {
114398 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
114399 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
114400 } else
114401 cstop = PY_SSIZE_T_MAX;
114402 }
114403 if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
114404 Py_ssize_t l = ms->sq_length(obj);
114405 if (likely(l >= 0)) {
114406 if (cstop < 0) {
114407 cstop += l;
114408 if (cstop < 0) cstop = 0;
114409 }
114410 if (cstart < 0) {
114411 cstart += l;
114412 if (cstart < 0) cstart = 0;
114413 }
114414 } else {
114415 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
114416 goto bad;
114417 PyErr_Clear();
114418 }
114419 }
114420 return ms->sq_slice(obj, cstart, cstop);
114421 }
114422 #else
114423 CYTHON_UNUSED_VAR(wraparound);
114424 #endif
114425 mp = Py_TYPE(obj)->tp_as_mapping;
114426 if (likely(mp && mp->mp_subscript))
114427 #else
114428 CYTHON_UNUSED_VAR(wraparound);
114429 #endif
114430 {
114431 PyObject* result;
114432 PyObject *py_slice, *py_start, *py_stop;
114433 if (_py_slice) {
114434 py_slice = *_py_slice;
114435 } else {
114436 PyObject* owned_start = NULL;
114437 PyObject* owned_stop = NULL;
114438 if (_py_start) {
114439 py_start = *_py_start;
114440 } else {
114441 if (has_cstart) {
114442 owned_start = py_start = PyInt_FromSsize_t(cstart);
114443 if (unlikely(!py_start)) goto bad;
114444 } else
114445 py_start = Py_None;
114446 }
114447 if (_py_stop) {
114448 py_stop = *_py_stop;
114449 } else {
114450 if (has_cstop) {
114451 owned_stop = py_stop = PyInt_FromSsize_t(cstop);
114452 if (unlikely(!py_stop)) {
114453 Py_XDECREF(owned_start);
114454 goto bad;
114455 }
114456 } else
114457 py_stop = Py_None;
114458 }
114459 py_slice = PySlice_New(py_start, py_stop, Py_None);
114460 Py_XDECREF(owned_start);
114461 Py_XDECREF(owned_stop);
114462 if (unlikely(!py_slice)) goto bad;
114463 }
114464 #if CYTHON_USE_TYPE_SLOTS
114465 result = mp->mp_subscript(obj, py_slice);
114466 #else
114467 result = PyObject_GetItem(obj, py_slice);
114468 #endif
114469 if (!_py_slice) {
114470 Py_DECREF(py_slice);
114471 }
114472 return result;
114473 }
114474 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
114475 PyErr_Format(PyExc_TypeError,
114476 "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
114477 __Pyx_DECREF_TypeName(obj_type_name);
114478 bad:
114479 return NULL;
114480 }
114481
114482 /* Import */
114483 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
114484 PyObject *module = 0;
114485 PyObject *empty_dict = 0;
114486 PyObject *empty_list = 0;
114487 #if PY_MAJOR_VERSION < 3
114488 PyObject *py_import;
114489 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
114490 if (unlikely(!py_import))
114491 goto bad;
114492 if (!from_list) {
114493 empty_list = PyList_New(0);
114494 if (unlikely(!empty_list))
114495 goto bad;
114496 from_list = empty_list;
114497 }
114498 #endif
114499 empty_dict = PyDict_New();
114500 if (unlikely(!empty_dict))
114501 goto bad;
114502 {
114503 #if PY_MAJOR_VERSION >= 3
114504 if (level == -1) {
114505 if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
114506 module = PyImport_ImportModuleLevelObject(
114507 name, __pyx_d, empty_dict, from_list, 1);
114508 if (unlikely(!module)) {
114509 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
114510 goto bad;
114511 PyErr_Clear();
114512 }
114513 }
114514 level = 0;
114515 }
114516 #endif
114517 if (!module) {
114518 #if PY_MAJOR_VERSION < 3
114519 PyObject *py_level = PyInt_FromLong(level);
114520 if (unlikely(!py_level))
114521 goto bad;
114522 module = PyObject_CallFunctionObjArgs(py_import,
114523 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
114524 Py_DECREF(py_level);
114525 #else
114526 module = PyImport_ImportModuleLevelObject(
114527 name, __pyx_d, empty_dict, from_list, level);
114528 #endif
114529 }
114530 }
114531 bad:
114532 Py_XDECREF(empty_dict);
114533 Py_XDECREF(empty_list);
114534 #if PY_MAJOR_VERSION < 3
114535 Py_XDECREF(py_import);
114536 #endif
114537 return module;
114538 }
114539
114540 /* ImportFrom */
114541 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
114542 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
114543 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
114544 const char* module_name_str = 0;
114545 PyObject* module_name = 0;
114546 PyObject* module_dot = 0;
114547 PyObject* full_name = 0;
114548 PyErr_Clear();
114549 module_name_str = PyModule_GetName(module);
114550 if (unlikely(!module_name_str)) { goto modbad; }
114551 module_name = PyUnicode_FromString(module_name_str);
114552 if (unlikely(!module_name)) { goto modbad; }
114553 module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__52);
114554 if (unlikely(!module_dot)) { goto modbad; }
114555 full_name = PyUnicode_Concat(module_dot, name);
114556 if (unlikely(!full_name)) { goto modbad; }
114557 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
114558 {
114559 PyObject *modules = PyImport_GetModuleDict();
114560 if (unlikely(!modules))
114561 goto modbad;
114562 value = PyObject_GetItem(modules, full_name);
114563 }
114564 #else
114565 value = PyImport_GetModule(full_name);
114566 #endif
114567 modbad:
114568 Py_XDECREF(full_name);
114569 Py_XDECREF(module_dot);
114570 Py_XDECREF(module_name);
114571 }
114572 if (unlikely(!value)) {
114573 PyErr_Format(PyExc_ImportError,
114574 #if PY_MAJOR_VERSION < 3
114575 "cannot import name %.230s", PyString_AS_STRING(name));
114576 #else
114577 "cannot import name %S", name);
114578 #endif
114579 }
114580 return value;
114581 }
114582
114583 /* GetAttr */
114584 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
114585 #if CYTHON_USE_TYPE_SLOTS
114586 #if PY_MAJOR_VERSION >= 3
114587 if (likely(PyUnicode_Check(n)))
114588 #else
114589 if (likely(PyString_Check(n)))
114590 #endif
114591 return __Pyx_PyObject_GetAttrStr(o, n);
114592 #endif
114593 return PyObject_GetAttr(o, n);
114594 }
114595
114596 /* HasAttr */
114597 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
114598 PyObject *r;
114599 if (unlikely(!__Pyx_PyBaseString_Check(n))) {
114600 PyErr_SetString(PyExc_TypeError,
114601 "hasattr(): attribute name must be string");
114602 return -1;
114603 }
114604 r = __Pyx_GetAttr(o, n);
114605 if (!r) {
114606 PyErr_Clear();
114607 return 0;
114608 } else {
114609 Py_DECREF(r);
114610 return 1;
114611 }
114612 }
114613
114614 /* CallNextTpDealloc */
114615 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
114616 PyTypeObject* type = Py_TYPE(obj);
114617 destructor tp_dealloc = NULL;
114618 while (type && __Pyx_PyType_GetSlot(type, tp_dealloc, destructor) != current_tp_dealloc)
114619 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
114620 while (type && (tp_dealloc = __Pyx_PyType_GetSlot(type, tp_dealloc, destructor)) == current_tp_dealloc)
114621 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
114622 if (type)
114623 tp_dealloc(obj);
114624 }
114625
114626 /* CallNextTpTraverse */
114627 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
114628 PyTypeObject* type = Py_TYPE(obj);
114629 traverseproc tp_traverse = NULL;
114630 while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse)
114631 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
114632 while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse)
114633 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
114634 if (type && tp_traverse)
114635 return tp_traverse(obj, v, a);
114636 return 0;
114637 }
114638
114639 /* CallNextTpClear */
114640 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
114641 PyTypeObject* type = Py_TYPE(obj);
114642 inquiry tp_clear = NULL;
114643 while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear)
114644 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
114645 while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear)
114646 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
114647 if (type && tp_clear)
114648 tp_clear(obj);
114649 }
114650
114651 /* FixUpExtensionType */
114652 #if CYTHON_USE_TYPE_SPECS
114653 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
114654 #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
114655 CYTHON_UNUSED_VAR(spec);
114656 CYTHON_UNUSED_VAR(type);
114657 #else
114658 const PyType_Slot *slot = spec->slots;
114659 while (slot && slot->slot && slot->slot != Py_tp_members)
114660 slot++;
114661 if (slot && slot->slot == Py_tp_members) {
114662 int changed = 0;
114663 #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
114664 const
114665 #endif
114666 PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
114667 while (memb && memb->name) {
114668 if (memb->name[0] == '_' && memb->name[1] == '_') {
114669 #if PY_VERSION_HEX < 0x030900b1
114670 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
114671 assert(memb->type == T_PYSSIZET);
114672 assert(memb->flags == READONLY);
114673 type->tp_weaklistoffset = memb->offset;
114674 changed = 1;
114675 }
114676 else if (strcmp(memb->name, "__dictoffset__") == 0) {
114677 assert(memb->type == T_PYSSIZET);
114678 assert(memb->flags == READONLY);
114679 type->tp_dictoffset = memb->offset;
114680 changed = 1;
114681 }
114682 #if CYTHON_METH_FASTCALL
114683 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
114684 assert(memb->type == T_PYSSIZET);
114685 assert(memb->flags == READONLY);
114686 #if PY_VERSION_HEX >= 0x030800b4
114687 type->tp_vectorcall_offset = memb->offset;
114688 #else
114689 type->tp_print = (printfunc) memb->offset;
114690 #endif
114691 changed = 1;
114692 }
114693 #endif
114694 #else
114695 if ((0));
114696 #endif
114697 #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
114698 else if (strcmp(memb->name, "__module__") == 0) {
114699 PyObject *descr;
114700 assert(memb->type == T_OBJECT);
114701 assert(memb->flags == 0 || memb->flags == READONLY);
114702 descr = PyDescr_NewMember(type, memb);
114703 if (unlikely(!descr))
114704 return -1;
114705 if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
114706 Py_DECREF(descr);
114707 return -1;
114708 }
114709 Py_DECREF(descr);
114710 changed = 1;
114711 }
114712 #endif
114713 }
114714 memb++;
114715 }
114716 if (changed)
114717 PyType_Modified(type);
114718 }
114719 #endif
114720 return 0;
114721 }
114722 #endif
114723
114724 /* ValidateBasesTuple */
114725 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
114726 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
114727 Py_ssize_t i, n;
114728 #if CYTHON_ASSUME_SAFE_MACROS
114729 n = PyTuple_GET_SIZE(bases);
114730 #else
114731 n = PyTuple_Size(bases);
114732 if (n < 0) return -1;
114733 #endif
114734 for (i = 1; i < n; i++)
114735 {
114736 #if CYTHON_AVOID_BORROWED_REFS
114737 PyObject *b0 = PySequence_GetItem(bases, i);
114738 if (!b0) return -1;
114739 #elif CYTHON_ASSUME_SAFE_MACROS
114740 PyObject *b0 = PyTuple_GET_ITEM(bases, i);
114741 #else
114742 PyObject *b0 = PyTuple_GetItem(bases, i);
114743 if (!b0) return -1;
114744 #endif
114745 PyTypeObject *b;
114746 #if PY_MAJOR_VERSION < 3
114747 if (PyClass_Check(b0))
114748 {
114749 PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
114750 PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
114751 #if CYTHON_AVOID_BORROWED_REFS
114752 Py_DECREF(b0);
114753 #endif
114754 return -1;
114755 }
114756 #endif
114757 b = (PyTypeObject*) b0;
114758 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
114759 {
114760 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
114761 PyErr_Format(PyExc_TypeError,
114762 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
114763 __Pyx_DECREF_TypeName(b_name);
114764 #if CYTHON_AVOID_BORROWED_REFS
114765 Py_DECREF(b0);
114766 #endif
114767 return -1;
114768 }
114769 if (dictoffset == 0)
114770 {
114771 Py_ssize_t b_dictoffset = 0;
114772 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
114773 b_dictoffset = b->tp_dictoffset;
114774 #else
114775 PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
114776 if (!py_b_dictoffset) goto dictoffset_return;
114777 b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
114778 Py_DECREF(py_b_dictoffset);
114779 if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
114780 #endif
114781 if (b_dictoffset) {
114782 {
114783 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
114784 PyErr_Format(PyExc_TypeError,
114785 "extension type '%.200s' has no __dict__ slot, "
114786 "but base type '" __Pyx_FMT_TYPENAME "' has: "
114787 "either add 'cdef dict __dict__' to the extension type "
114788 "or add '__slots__ = [...]' to the base type",
114789 type_name, b_name);
114790 __Pyx_DECREF_TypeName(b_name);
114791 }
114792 #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
114793 dictoffset_return:
114794 #endif
114795 #if CYTHON_AVOID_BORROWED_REFS
114796 Py_DECREF(b0);
114797 #endif
114798 return -1;
114799 }
114800 }
114801 #if CYTHON_AVOID_BORROWED_REFS
114802 Py_DECREF(b0);
114803 #endif
114804 }
114805 return 0;
114806 }
114807 #endif
114808
114809 /* PyType_Ready */
114810 static int __Pyx_PyType_Ready(PyTypeObject *t) {
114811 #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
114812 (void)__Pyx_PyObject_CallMethod0;
114813 #if CYTHON_USE_TYPE_SPECS
114814 (void)__Pyx_validate_bases_tuple;
114815 #endif
114816 return PyType_Ready(t);
114817 #else
114818 int r;
114819 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
114820 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
114821 return -1;
114822 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
114823 {
114824 int gc_was_enabled;
114825 #if PY_VERSION_HEX >= 0x030A00b1
114826 gc_was_enabled = PyGC_Disable();
114827 (void)__Pyx_PyObject_CallMethod0;
114828 #else
114829 PyObject *ret, *py_status;
114830 PyObject *gc = NULL;
114831 #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
114832 gc = PyImport_GetModule(__pyx_kp_u_gc);
114833 #endif
114834 if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
114835 if (unlikely(!gc)) return -1;
114836 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
114837 if (unlikely(!py_status)) {
114838 Py_DECREF(gc);
114839 return -1;
114840 }
114841 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
114842 Py_DECREF(py_status);
114843 if (gc_was_enabled > 0) {
114844 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
114845 if (unlikely(!ret)) {
114846 Py_DECREF(gc);
114847 return -1;
114848 }
114849 Py_DECREF(ret);
114850 } else if (unlikely(gc_was_enabled == -1)) {
114851 Py_DECREF(gc);
114852 return -1;
114853 }
114854 #endif
114855 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
114856 #if PY_VERSION_HEX >= 0x030A0000
114857 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
114858 #endif
114859 #else
114860 (void)__Pyx_PyObject_CallMethod0;
114861 #endif
114862 r = PyType_Ready(t);
114863 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
114864 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
114865 #if PY_VERSION_HEX >= 0x030A00b1
114866 if (gc_was_enabled)
114867 PyGC_Enable();
114868 #else
114869 if (gc_was_enabled) {
114870 PyObject *tp, *v, *tb;
114871 PyErr_Fetch(&tp, &v, &tb);
114872 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
114873 if (likely(ret || r == -1)) {
114874 Py_XDECREF(ret);
114875 PyErr_Restore(tp, v, tb);
114876 } else {
114877 Py_XDECREF(tp);
114878 Py_XDECREF(v);
114879 Py_XDECREF(tb);
114880 r = -1;
114881 }
114882 }
114883 Py_DECREF(gc);
114884 #endif
114885 }
114886 #endif
114887 return r;
114888 #endif
114889 }
114890
114891 /* PyObject_GenericGetAttrNoDict */
114892 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
114893 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
114894 __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
114895 PyErr_Format(PyExc_AttributeError,
114896 #if PY_MAJOR_VERSION >= 3
114897 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
114898 type_name, attr_name);
114899 #else
114900 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
114901 type_name, PyString_AS_STRING(attr_name));
114902 #endif
114903 __Pyx_DECREF_TypeName(type_name);
114904 return NULL;
114905 }
114906 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
114907 PyObject *descr;
114908 PyTypeObject *tp = Py_TYPE(obj);
114909 if (unlikely(!PyString_Check(attr_name))) {
114910 return PyObject_GenericGetAttr(obj, attr_name);
114911 }
114912 assert(!tp->tp_dictoffset);
114913 descr = _PyType_Lookup(tp, attr_name);
114914 if (unlikely(!descr)) {
114915 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
114916 }
114917 Py_INCREF(descr);
114918 #if PY_MAJOR_VERSION < 3
114919 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
114920 #endif
114921 {
114922 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
114923 if (unlikely(f)) {
114924 PyObject *res = f(descr, obj, (PyObject *)tp);
114925 Py_DECREF(descr);
114926 return res;
114927 }
114928 }
114929 return descr;
114930 }
114931 #endif
114932
114933 /* PyObject_GenericGetAttr */
114934 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
114935 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
114936 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
114937 return PyObject_GenericGetAttr(obj, attr_name);
114938 }
114939 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
114940 }
114941 #endif
114942
114943 /* SetVTable */
114944 static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
114945 PyObject *ob = PyCapsule_New(vtable, 0, 0);
114946 if (unlikely(!ob))
114947 goto bad;
114948 #if CYTHON_COMPILING_IN_LIMITED_API
114949 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
114950 #else
114951 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
114952 #endif
114953 goto bad;
114954 Py_DECREF(ob);
114955 return 0;
114956 bad:
114957 Py_XDECREF(ob);
114958 return -1;
114959 }
114960
114961 /* GetVTable */
114962 static void* __Pyx_GetVtable(PyTypeObject *type) {
114963 void* ptr;
114964 #if CYTHON_COMPILING_IN_LIMITED_API
114965 PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
114966 #else
114967 PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
114968 #endif
114969 if (!ob)
114970 goto bad;
114971 ptr = PyCapsule_GetPointer(ob, 0);
114972 if (!ptr && !PyErr_Occurred())
114973 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
114974 Py_DECREF(ob);
114975 return ptr;
114976 bad:
114977 Py_XDECREF(ob);
114978 return NULL;
114979 }
114980
114981 /* MergeVTables */
114982 #if !CYTHON_COMPILING_IN_LIMITED_API
114983 static int __Pyx_MergeVtables(PyTypeObject *type) {
114984 int i;
114985 void** base_vtables;
114986 __Pyx_TypeName tp_base_name;
114987 __Pyx_TypeName base_name;
114988 void* unknown = (void*)-1;
114989 PyObject* bases = type->tp_bases;
114990 int base_depth = 0;
114991 {
114992 PyTypeObject* base = type->tp_base;
114993 while (base) {
114994 base_depth += 1;
114995 base = base->tp_base;
114996 }
114997 }
114998 base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
114999 base_vtables[0] = unknown;
115000 for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
115001 void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
115002 if (base_vtable != NULL) {
115003 int j;
115004 PyTypeObject* base = type->tp_base;
115005 for (j = 0; j < base_depth; j++) {
115006 if (base_vtables[j] == unknown) {
115007 base_vtables[j] = __Pyx_GetVtable(base);
115008 base_vtables[j + 1] = unknown;
115009 }
115010 if (base_vtables[j] == base_vtable) {
115011 break;
115012 } else if (base_vtables[j] == NULL) {
115013 goto bad;
115014 }
115015 base = base->tp_base;
115016 }
115017 }
115018 }
115019 PyErr_Clear();
115020 free(base_vtables);
115021 return 0;
115022 bad:
115023 tp_base_name = __Pyx_PyType_GetName(type->tp_base);
115024 base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
115025 PyErr_Format(PyExc_TypeError,
115026 "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
115027 __Pyx_DECREF_TypeName(tp_base_name);
115028 __Pyx_DECREF_TypeName(base_name);
115029 free(base_vtables);
115030 return -1;
115031 }
115032 #endif
115033
115034 /* SetupReduce */
115035 #if !CYTHON_COMPILING_IN_LIMITED_API
115036 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
115037 int ret;
115038 PyObject *name_attr;
115039 name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
115040 if (likely(name_attr)) {
115041 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
115042 } else {
115043 ret = -1;
115044 }
115045 if (unlikely(ret < 0)) {
115046 PyErr_Clear();
115047 ret = 0;
115048 }
115049 Py_XDECREF(name_attr);
115050 return ret;
115051 }
115052 static int __Pyx_setup_reduce(PyObject* type_obj) {
115053 int ret = 0;
115054 PyObject *object_reduce = NULL;
115055 PyObject *object_getstate = NULL;
115056 PyObject *object_reduce_ex = NULL;
115057 PyObject *reduce = NULL;
115058 PyObject *reduce_ex = NULL;
115059 PyObject *reduce_cython = NULL;
115060 PyObject *setstate = NULL;
115061 PyObject *setstate_cython = NULL;
115062 PyObject *getstate = NULL;
115063 #if CYTHON_USE_PYTYPE_LOOKUP
115064 getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
115065 #else
115066 getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
115067 if (!getstate && PyErr_Occurred()) {
115068 goto __PYX_BAD;
115069 }
115070 #endif
115071 if (getstate) {
115072 #if CYTHON_USE_PYTYPE_LOOKUP
115073 object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
115074 #else
115075 object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
115076 if (!object_getstate && PyErr_Occurred()) {
115077 goto __PYX_BAD;
115078 }
115079 #endif
115080 if (object_getstate != getstate) {
115081 goto __PYX_GOOD;
115082 }
115083 }
115084 #if CYTHON_USE_PYTYPE_LOOKUP
115085 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
115086 #else
115087 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
115088 #endif
115089 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
115090 if (reduce_ex == object_reduce_ex) {
115091 #if CYTHON_USE_PYTYPE_LOOKUP
115092 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
115093 #else
115094 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
115095 #endif
115096 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
115097 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
115098 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
115099 if (likely(reduce_cython)) {
115100 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
115101 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
115102 } else if (reduce == object_reduce || PyErr_Occurred()) {
115103 goto __PYX_BAD;
115104 }
115105 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
115106 if (!setstate) PyErr_Clear();
115107 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
115108 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
115109 if (likely(setstate_cython)) {
115110 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
115111 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
115112 } else if (!setstate || PyErr_Occurred()) {
115113 goto __PYX_BAD;
115114 }
115115 }
115116 PyType_Modified((PyTypeObject*)type_obj);
115117 }
115118 }
115119 goto __PYX_GOOD;
115120 __PYX_BAD:
115121 if (!PyErr_Occurred()) {
115122 __Pyx_TypeName type_obj_name =
115123 __Pyx_PyType_GetName((PyTypeObject*)type_obj);
115124 PyErr_Format(PyExc_RuntimeError,
115125 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
115126 __Pyx_DECREF_TypeName(type_obj_name);
115127 }
115128 ret = -1;
115129 __PYX_GOOD:
115130 #if !CYTHON_USE_PYTYPE_LOOKUP
115131 Py_XDECREF(object_reduce);
115132 Py_XDECREF(object_reduce_ex);
115133 Py_XDECREF(object_getstate);
115134 Py_XDECREF(getstate);
115135 #endif
115136 Py_XDECREF(reduce);
115137 Py_XDECREF(reduce_ex);
115138 Py_XDECREF(reduce_cython);
115139 Py_XDECREF(setstate);
115140 Py_XDECREF(setstate_cython);
115141 return ret;
115142 }
115143 #endif
115144
115145 /* TypeImport */
115146 #ifndef __PYX_HAVE_RT_ImportType_3_0_11
115147 #define __PYX_HAVE_RT_ImportType_3_0_11
115148 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
115149 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
115150 {
115151 PyObject *result = 0;
115152 char warning[200];
115153 Py_ssize_t basicsize;
115154 Py_ssize_t itemsize;
115155 #if CYTHON_COMPILING_IN_LIMITED_API
115156 PyObject *py_basicsize;
115157 PyObject *py_itemsize;
115158 #endif
115159 result = PyObject_GetAttrString(module, class_name);
115160 if (!result)
115161 goto bad;
115162 if (!PyType_Check(result)) {
115163 PyErr_Format(PyExc_TypeError,
115164 "%.200s.%.200s is not a type object",
115165 module_name, class_name);
115166 goto bad;
115167 }
115168 #if !CYTHON_COMPILING_IN_LIMITED_API
115169 basicsize = ((PyTypeObject *)result)->tp_basicsize;
115170 itemsize = ((PyTypeObject *)result)->tp_itemsize;
115171 #else
115172 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
115173 if (!py_basicsize)
115174 goto bad;
115175 basicsize = PyLong_AsSsize_t(py_basicsize);
115176 Py_DECREF(py_basicsize);
115177 py_basicsize = 0;
115178 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
115179 goto bad;
115180 py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
115181 if (!py_itemsize)
115182 goto bad;
115183 itemsize = PyLong_AsSsize_t(py_itemsize);
115184 Py_DECREF(py_itemsize);
115185 py_itemsize = 0;
115186 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
115187 goto bad;
115188 #endif
115189 if (itemsize) {
115190 if (size % alignment) {
115191 alignment = size % alignment;
115192 }
115193 if (itemsize < (Py_ssize_t)alignment)
115194 itemsize = (Py_ssize_t)alignment;
115195 }
115196 if ((size_t)(basicsize + itemsize) < size) {
115197 PyErr_Format(PyExc_ValueError,
115198 "%.200s.%.200s size changed, may indicate binary incompatibility. "
115199 "Expected %zd from C header, got %zd from PyObject",
115200 module_name, class_name, size, basicsize+itemsize);
115201 goto bad;
115202 }
115203 if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
115204 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
115205 PyErr_Format(PyExc_ValueError,
115206 "%.200s.%.200s size changed, may indicate binary incompatibility. "
115207 "Expected %zd from C header, got %zd-%zd from PyObject",
115208 module_name, class_name, size, basicsize, basicsize+itemsize);
115209 goto bad;
115210 }
115211 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
115212 PyOS_snprintf(warning, sizeof(warning),
115213 "%s.%s size changed, may indicate binary incompatibility. "
115214 "Expected %zd from C header, got %zd from PyObject",
115215 module_name, class_name, size, basicsize);
115216 if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
115217 }
115218 return (PyTypeObject *)result;
115219 bad:
115220 Py_XDECREF(result);
115221 return NULL;
115222 }
115223 #endif
115224
115225 /* ImportDottedModule */
115226 #if PY_MAJOR_VERSION >= 3
115227 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
115228 PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
115229 if (unlikely(PyErr_Occurred())) {
115230 PyErr_Clear();
115231 }
115232 if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
115233 partial_name = name;
115234 } else {
115235 slice = PySequence_GetSlice(parts_tuple, 0, count);
115236 if (unlikely(!slice))
115237 goto bad;
115238 sep = PyUnicode_FromStringAndSize(".", 1);
115239 if (unlikely(!sep))
115240 goto bad;
115241 partial_name = PyUnicode_Join(sep, slice);
115242 }
115243 PyErr_Format(
115244 #if PY_MAJOR_VERSION < 3
115245 PyExc_ImportError,
115246 "No module named '%s'", PyString_AS_STRING(partial_name));
115247 #else
115248 #if PY_VERSION_HEX >= 0x030600B1
115249 PyExc_ModuleNotFoundError,
115250 #else
115251 PyExc_ImportError,
115252 #endif
115253 "No module named '%U'", partial_name);
115254 #endif
115255 bad:
115256 Py_XDECREF(sep);
115257 Py_XDECREF(slice);
115258 Py_XDECREF(partial_name);
115259 return NULL;
115260 }
115261 #endif
115262 #if PY_MAJOR_VERSION >= 3
115263 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
115264 PyObject *imported_module;
115265 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
115266 PyObject *modules = PyImport_GetModuleDict();
115267 if (unlikely(!modules))
115268 return NULL;
115269 imported_module = __Pyx_PyDict_GetItemStr(modules, name);
115270 Py_XINCREF(imported_module);
115271 #else
115272 imported_module = PyImport_GetModule(name);
115273 #endif
115274 return imported_module;
115275 }
115276 #endif
115277 #if PY_MAJOR_VERSION >= 3
115278 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
115279 Py_ssize_t i, nparts;
115280 nparts = PyTuple_GET_SIZE(parts_tuple);
115281 for (i=1; i < nparts && module; i++) {
115282 PyObject *part, *submodule;
115283 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
115284 part = PyTuple_GET_ITEM(parts_tuple, i);
115285 #else
115286 part = PySequence_ITEM(parts_tuple, i);
115287 #endif
115288 submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
115289 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
115290 Py_DECREF(part);
115291 #endif
115292 Py_DECREF(module);
115293 module = submodule;
115294 }
115295 if (unlikely(!module)) {
115296 return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
115297 }
115298 return module;
115299 }
115300 #endif
115301 static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
115302 #if PY_MAJOR_VERSION < 3
115303 PyObject *module, *from_list, *star = __pyx_n_s__278;
115304 CYTHON_UNUSED_VAR(parts_tuple);
115305 from_list = PyList_New(1);
115306 if (unlikely(!from_list))
115307 return NULL;
115308 Py_INCREF(star);
115309 PyList_SET_ITEM(from_list, 0, star);
115310 module = __Pyx_Import(name, from_list, 0);
115311 Py_DECREF(from_list);
115312 return module;
115313 #else
115314 PyObject *imported_module;
115315 PyObject *module = __Pyx_Import(name, NULL, 0);
115316 if (!parts_tuple || unlikely(!module))
115317 return module;
115318 imported_module = __Pyx__ImportDottedModule_Lookup(name);
115319 if (likely(imported_module)) {
115320 Py_DECREF(module);
115321 return imported_module;
115322 }
115323 PyErr_Clear();
115324 return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
115325 #endif
115326 }
115327 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
115328 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
115329 PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
115330 if (likely(module)) {
115331 PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
115332 if (likely(spec)) {
115333 PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
115334 if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
115335 Py_DECREF(spec);
115336 spec = NULL;
115337 }
115338 Py_XDECREF(unsafe);
115339 }
115340 if (likely(!spec)) {
115341 PyErr_Clear();
115342 return module;
115343 }
115344 Py_DECREF(spec);
115345 Py_DECREF(module);
115346 } else if (PyErr_Occurred()) {
115347 PyErr_Clear();
115348 }
115349 #endif
115350 return __Pyx__ImportDottedModule(name, parts_tuple);
115351 }
115352
115353 /* FetchSharedCythonModule */
115354 static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
115355 return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
115356 }
115357
115358 /* FetchCommonType */
115359 static int __Pyx_VerifyCachedType(PyObject *cached_type,
115360 const char *name,
115361 Py_ssize_t basicsize,
115362 Py_ssize_t expected_basicsize) {
115363 if (!PyType_Check(cached_type)) {
115364 PyErr_Format(PyExc_TypeError,
115365 "Shared Cython type %.200s is not a type object", name);
115366 return -1;
115367 }
115368 if (basicsize != expected_basicsize) {
115369 PyErr_Format(PyExc_TypeError,
115370 "Shared Cython type %.200s has the wrong size, try recompiling",
115371 name);
115372 return -1;
115373 }
115374 return 0;
115375 }
115376 #if !CYTHON_USE_TYPE_SPECS
115377 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
115378 PyObject* abi_module;
115379 const char* object_name;
115380 PyTypeObject *cached_type = NULL;
115381 abi_module = __Pyx_FetchSharedCythonABIModule();
115382 if (!abi_module) return NULL;
115383 object_name = strrchr(type->tp_name, '.');
115384 object_name = object_name ? object_name+1 : type->tp_name;
115385 cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
115386 if (cached_type) {
115387 if (__Pyx_VerifyCachedType(
115388 (PyObject *)cached_type,
115389 object_name,
115390 cached_type->tp_basicsize,
115391 type->tp_basicsize) < 0) {
115392 goto bad;
115393 }
115394 goto done;
115395 }
115396 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
115397 PyErr_Clear();
115398 if (PyType_Ready(type) < 0) goto bad;
115399 if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
115400 goto bad;
115401 Py_INCREF(type);
115402 cached_type = type;
115403 done:
115404 Py_DECREF(abi_module);
115405 return cached_type;
115406 bad:
115407 Py_XDECREF(cached_type);
115408 cached_type = NULL;
115409 goto done;
115410 }
115411 #else
115412 static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
115413 PyObject *abi_module, *cached_type = NULL;
115414 const char* object_name = strrchr(spec->name, '.');
115415 object_name = object_name ? object_name+1 : spec->name;
115416 abi_module = __Pyx_FetchSharedCythonABIModule();
115417 if (!abi_module) return NULL;
115418 cached_type = PyObject_GetAttrString(abi_module, object_name);
115419 if (cached_type) {
115420 Py_ssize_t basicsize;
115421 #if CYTHON_COMPILING_IN_LIMITED_API
115422 PyObject *py_basicsize;
115423 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
115424 if (unlikely(!py_basicsize)) goto bad;
115425 basicsize = PyLong_AsSsize_t(py_basicsize);
115426 Py_DECREF(py_basicsize);
115427 py_basicsize = 0;
115428 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
115429 #else
115430 basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
115431 #endif
115432 if (__Pyx_VerifyCachedType(
115433 cached_type,
115434 object_name,
115435 basicsize,
115436 spec->basicsize) < 0) {
115437 goto bad;
115438 }
115439 goto done;
115440 }
115441 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
115442 PyErr_Clear();
115443 CYTHON_UNUSED_VAR(module);
115444 cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
115445 if (unlikely(!cached_type)) goto bad;
115446 if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
115447 if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
115448 done:
115449 Py_DECREF(abi_module);
115450 assert(cached_type == NULL || PyType_Check(cached_type));
115451 return (PyTypeObject *) cached_type;
115452 bad:
115453 Py_XDECREF(cached_type);
115454 cached_type = NULL;
115455 goto done;
115456 }
115457 #endif
115458
115459 /* PyVectorcallFastCallDict */
115460 #if CYTHON_METH_FASTCALL
115461 static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
115462 {
115463 PyObject *res = NULL;
115464 PyObject *kwnames;
115465 PyObject **newargs;
115466 PyObject **kwvalues;
115467 Py_ssize_t i, pos;
115468 size_t j;
115469 PyObject *key, *value;
115470 unsigned long keys_are_strings;
115471 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
115472 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
115473 if (unlikely(newargs == NULL)) {
115474 PyErr_NoMemory();
115475 return NULL;
115476 }
115477 for (j = 0; j < nargs; j++) newargs[j] = args[j];
115478 kwnames = PyTuple_New(nkw);
115479 if (unlikely(kwnames == NULL)) {
115480 PyMem_Free(newargs);
115481 return NULL;
115482 }
115483 kwvalues = newargs + nargs;
115484 pos = i = 0;
115485 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
115486 while (PyDict_Next(kw, &pos, &key, &value)) {
115487 keys_are_strings &= Py_TYPE(key)->tp_flags;
115488 Py_INCREF(key);
115489 Py_INCREF(value);
115490 PyTuple_SET_ITEM(kwnames, i, key);
115491 kwvalues[i] = value;
115492 i++;
115493 }
115494 if (unlikely(!keys_are_strings)) {
115495 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
115496 goto cleanup;
115497 }
115498 res = vc(func, newargs, nargs, kwnames);
115499 cleanup:
115500 Py_DECREF(kwnames);
115501 for (i = 0; i < nkw; i++)
115502 Py_DECREF(kwvalues[i]);
115503 PyMem_Free(newargs);
115504 return res;
115505 }
115506 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
115507 {
115508 if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
115509 return vc(func, args, nargs, NULL);
115510 }
115511 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
115512 }
115513 #endif
115514
115515 /* CythonFunctionShared */
115516 #if CYTHON_COMPILING_IN_LIMITED_API
115517 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
115518 if (__Pyx_CyFunction_Check(func)) {
115519 return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
115520 } else if (PyCFunction_Check(func)) {
115521 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
115522 }
115523 return 0;
115524 }
115525 #else
115526 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
115527 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
115528 }
115529 #endif
115530 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
115531 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
115532 __Pyx_Py_XDECREF_SET(
115533 __Pyx_CyFunction_GetClassObj(f),
115534 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
115535 #else
115536 __Pyx_Py_XDECREF_SET(
115537 ((PyCMethodObject *) (f))->mm_class,
115538 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
115539 #endif
115540 }
115541 static PyObject *
115542 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
115543 {
115544 CYTHON_UNUSED_VAR(closure);
115545 if (unlikely(op->func_doc == NULL)) {
115546 #if CYTHON_COMPILING_IN_LIMITED_API
115547 op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
115548 if (unlikely(!op->func_doc)) return NULL;
115549 #else
115550 if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
115551 #if PY_MAJOR_VERSION >= 3
115552 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
115553 #else
115554 op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
115555 #endif
115556 if (unlikely(op->func_doc == NULL))
115557 return NULL;
115558 } else {
115559 Py_INCREF(Py_None);
115560 return Py_None;
115561 }
115562 #endif
115563 }
115564 Py_INCREF(op->func_doc);
115565 return op->func_doc;
115566 }
115567 static int
115568 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
115569 {
115570 CYTHON_UNUSED_VAR(context);
115571 if (value == NULL) {
115572 value = Py_None;
115573 }
115574 Py_INCREF(value);
115575 __Pyx_Py_XDECREF_SET(op->func_doc, value);
115576 return 0;
115577 }
115578 static PyObject *
115579 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
115580 {
115581 CYTHON_UNUSED_VAR(context);
115582 if (unlikely(op->func_name == NULL)) {
115583 #if CYTHON_COMPILING_IN_LIMITED_API
115584 op->func_name = PyObject_GetAttrString(op->func, "__name__");
115585 #elif PY_MAJOR_VERSION >= 3
115586 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
115587 #else
115588 op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
115589 #endif
115590 if (unlikely(op->func_name == NULL))
115591 return NULL;
115592 }
115593 Py_INCREF(op->func_name);
115594 return op->func_name;
115595 }
115596 static int
115597 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
115598 {
115599 CYTHON_UNUSED_VAR(context);
115600 #if PY_MAJOR_VERSION >= 3
115601 if (unlikely(value == NULL || !PyUnicode_Check(value)))
115602 #else
115603 if (unlikely(value == NULL || !PyString_Check(value)))
115604 #endif
115605 {
115606 PyErr_SetString(PyExc_TypeError,
115607 "__name__ must be set to a string object");
115608 return -1;
115609 }
115610 Py_INCREF(value);
115611 __Pyx_Py_XDECREF_SET(op->func_name, value);
115612 return 0;
115613 }
115614 static PyObject *
115615 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
115616 {
115617 CYTHON_UNUSED_VAR(context);
115618 Py_INCREF(op->func_qualname);
115619 return op->func_qualname;
115620 }
115621 static int
115622 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
115623 {
115624 CYTHON_UNUSED_VAR(context);
115625 #if PY_MAJOR_VERSION >= 3
115626 if (unlikely(value == NULL || !PyUnicode_Check(value)))
115627 #else
115628 if (unlikely(value == NULL || !PyString_Check(value)))
115629 #endif
115630 {
115631 PyErr_SetString(PyExc_TypeError,
115632 "__qualname__ must be set to a string object");
115633 return -1;
115634 }
115635 Py_INCREF(value);
115636 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
115637 return 0;
115638 }
115639 static PyObject *
115640 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
115641 {
115642 CYTHON_UNUSED_VAR(context);
115643 if (unlikely(op->func_dict == NULL)) {
115644 op->func_dict = PyDict_New();
115645 if (unlikely(op->func_dict == NULL))
115646 return NULL;
115647 }
115648 Py_INCREF(op->func_dict);
115649 return op->func_dict;
115650 }
115651 static int
115652 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
115653 {
115654 CYTHON_UNUSED_VAR(context);
115655 if (unlikely(value == NULL)) {
115656 PyErr_SetString(PyExc_TypeError,
115657 "function's dictionary may not be deleted");
115658 return -1;
115659 }
115660 if (unlikely(!PyDict_Check(value))) {
115661 PyErr_SetString(PyExc_TypeError,
115662 "setting function's dictionary to a non-dict");
115663 return -1;
115664 }
115665 Py_INCREF(value);
115666 __Pyx_Py_XDECREF_SET(op->func_dict, value);
115667 return 0;
115668 }
115669 static PyObject *
115670 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
115671 {
115672 CYTHON_UNUSED_VAR(context);
115673 Py_INCREF(op->func_globals);
115674 return op->func_globals;
115675 }
115676 static PyObject *
115677 __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
115678 {
115679 CYTHON_UNUSED_VAR(op);
115680 CYTHON_UNUSED_VAR(context);
115681 Py_INCREF(Py_None);
115682 return Py_None;
115683 }
115684 static PyObject *
115685 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
115686 {
115687 PyObject* result = (op->func_code) ? op->func_code : Py_None;
115688 CYTHON_UNUSED_VAR(context);
115689 Py_INCREF(result);
115690 return result;
115691 }
115692 static int
115693 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
115694 int result = 0;
115695 PyObject *res = op->defaults_getter((PyObject *) op);
115696 if (unlikely(!res))
115697 return -1;
115698 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
115699 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
115700 Py_INCREF(op->defaults_tuple);
115701 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
115702 Py_INCREF(op->defaults_kwdict);
115703 #else
115704 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
115705 if (unlikely(!op->defaults_tuple)) result = -1;
115706 else {
115707 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
115708 if (unlikely(!op->defaults_kwdict)) result = -1;
115709 }
115710 #endif
115711 Py_DECREF(res);
115712 return result;
115713 }
115714 static int
115715 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
115716 CYTHON_UNUSED_VAR(context);
115717 if (!value) {
115718 value = Py_None;
115719 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
115720 PyErr_SetString(PyExc_TypeError,
115721 "__defaults__ must be set to a tuple object");
115722 return -1;
115723 }
115724 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
115725 "currently affect the values used in function calls", 1);
115726 Py_INCREF(value);
115727 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
115728 return 0;
115729 }
115730 static PyObject *
115731 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
115732 PyObject* result = op->defaults_tuple;
115733 CYTHON_UNUSED_VAR(context);
115734 if (unlikely(!result)) {
115735 if (op->defaults_getter) {
115736 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
115737 result = op->defaults_tuple;
115738 } else {
115739 result = Py_None;
115740 }
115741 }
115742 Py_INCREF(result);
115743 return result;
115744 }
115745 static int
115746 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
115747 CYTHON_UNUSED_VAR(context);
115748 if (!value) {
115749 value = Py_None;
115750 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
115751 PyErr_SetString(PyExc_TypeError,
115752 "__kwdefaults__ must be set to a dict object");
115753 return -1;
115754 }
115755 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
115756 "currently affect the values used in function calls", 1);
115757 Py_INCREF(value);
115758 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
115759 return 0;
115760 }
115761 static PyObject *
115762 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
115763 PyObject* result = op->defaults_kwdict;
115764 CYTHON_UNUSED_VAR(context);
115765 if (unlikely(!result)) {
115766 if (op->defaults_getter) {
115767 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
115768 result = op->defaults_kwdict;
115769 } else {
115770 result = Py_None;
115771 }
115772 }
115773 Py_INCREF(result);
115774 return result;
115775 }
115776 static int
115777 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
115778 CYTHON_UNUSED_VAR(context);
115779 if (!value || value == Py_None) {
115780 value = NULL;
115781 } else if (unlikely(!PyDict_Check(value))) {
115782 PyErr_SetString(PyExc_TypeError,
115783 "__annotations__ must be set to a dict object");
115784 return -1;
115785 }
115786 Py_XINCREF(value);
115787 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
115788 return 0;
115789 }
115790 static PyObject *
115791 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
115792 PyObject* result = op->func_annotations;
115793 CYTHON_UNUSED_VAR(context);
115794 if (unlikely(!result)) {
115795 result = PyDict_New();
115796 if (unlikely(!result)) return NULL;
115797 op->func_annotations = result;
115798 }
115799 Py_INCREF(result);
115800 return result;
115801 }
115802 static PyObject *
115803 __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
115804 int is_coroutine;
115805 CYTHON_UNUSED_VAR(context);
115806 if (op->func_is_coroutine) {
115807 return __Pyx_NewRef(op->func_is_coroutine);
115808 }
115809 is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
115810 #if PY_VERSION_HEX >= 0x03050000
115811 if (is_coroutine) {
115812 PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
115813 fromlist = PyList_New(1);
115814 if (unlikely(!fromlist)) return NULL;
115815 Py_INCREF(marker);
115816 #if CYTHON_ASSUME_SAFE_MACROS
115817 PyList_SET_ITEM(fromlist, 0, marker);
115818 #else
115819 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
115820 Py_DECREF(marker);
115821 Py_DECREF(fromlist);
115822 return NULL;
115823 }
115824 #endif
115825 module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
115826 Py_DECREF(fromlist);
115827 if (unlikely(!module)) goto ignore;
115828 op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
115829 Py_DECREF(module);
115830 if (likely(op->func_is_coroutine)) {
115831 return __Pyx_NewRef(op->func_is_coroutine);
115832 }
115833 ignore:
115834 PyErr_Clear();
115835 }
115836 #endif
115837 op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
115838 return __Pyx_NewRef(op->func_is_coroutine);
115839 }
115840 #if CYTHON_COMPILING_IN_LIMITED_API
115841 static PyObject *
115842 __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
115843 CYTHON_UNUSED_VAR(context);
115844 return PyObject_GetAttrString(op->func, "__module__");
115845 }
115846 static int
115847 __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
115848 CYTHON_UNUSED_VAR(context);
115849 return PyObject_SetAttrString(op->func, "__module__", value);
115850 }
115851 #endif
115852 static PyGetSetDef __pyx_CyFunction_getsets[] = {
115853 {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
115854 {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
115855 {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
115856 {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
115857 {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
115858 {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
115859 {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
115860 {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
115861 {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
115862 {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
115863 {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
115864 {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
115865 {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
115866 {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
115867 {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
115868 {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
115869 {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
115870 {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
115871 #if CYTHON_COMPILING_IN_LIMITED_API
115872 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
115873 #endif
115874 {0, 0, 0, 0, 0}
115875 };
115876 static PyMemberDef __pyx_CyFunction_members[] = {
115877 #if !CYTHON_COMPILING_IN_LIMITED_API
115878 {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
115879 #endif
115880 #if CYTHON_USE_TYPE_SPECS
115881 {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
115882 #if CYTHON_METH_FASTCALL
115883 #if CYTHON_BACKPORT_VECTORCALL
115884 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
115885 #else
115886 #if !CYTHON_COMPILING_IN_LIMITED_API
115887 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
115888 #endif
115889 #endif
115890 #endif
115891 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
115892 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
115893 #else
115894 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
115895 #endif
115896 #endif
115897 {0, 0, 0, 0, 0}
115898 };
115899 static PyObject *
115900 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
115901 {
115902 CYTHON_UNUSED_VAR(args);
115903 #if PY_MAJOR_VERSION >= 3
115904 Py_INCREF(m->func_qualname);
115905 return m->func_qualname;
115906 #else
115907 return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
115908 #endif
115909 }
115910 static PyMethodDef __pyx_CyFunction_methods[] = {
115911 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
115912 {0, 0, 0, 0}
115913 };
115914 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
115915 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
115916 #else
115917 #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
115918 #endif
115919 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
115920 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
115921 #if !CYTHON_COMPILING_IN_LIMITED_API
115922 PyCFunctionObject *cf = (PyCFunctionObject*) op;
115923 #endif
115924 if (unlikely(op == NULL))
115925 return NULL;
115926 #if CYTHON_COMPILING_IN_LIMITED_API
115927 op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
115928 if (unlikely(!op->func)) return NULL;
115929 #endif
115930 op->flags = flags;
115931 __Pyx_CyFunction_weakreflist(op) = NULL;
115932 #if !CYTHON_COMPILING_IN_LIMITED_API
115933 cf->m_ml = ml;
115934 cf->m_self = (PyObject *) op;
115935 #endif
115936 Py_XINCREF(closure);
115937 op->func_closure = closure;
115938 #if !CYTHON_COMPILING_IN_LIMITED_API
115939 Py_XINCREF(module);
115940 cf->m_module = module;
115941 #endif
115942 op->func_dict = NULL;
115943 op->func_name = NULL;
115944 Py_INCREF(qualname);
115945 op->func_qualname = qualname;
115946 op->func_doc = NULL;
115947 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
115948 op->func_classobj = NULL;
115949 #else
115950 ((PyCMethodObject*)op)->mm_class = NULL;
115951 #endif
115952 op->func_globals = globals;
115953 Py_INCREF(op->func_globals);
115954 Py_XINCREF(code);
115955 op->func_code = code;
115956 op->defaults_pyobjects = 0;
115957 op->defaults_size = 0;
115958 op->defaults = NULL;
115959 op->defaults_tuple = NULL;
115960 op->defaults_kwdict = NULL;
115961 op->defaults_getter = NULL;
115962 op->func_annotations = NULL;
115963 op->func_is_coroutine = NULL;
115964 #if CYTHON_METH_FASTCALL
115965 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
115966 case METH_NOARGS:
115967 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
115968 break;
115969 case METH_O:
115970 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
115971 break;
115972 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
115973 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
115974 break;
115975 case METH_FASTCALL | METH_KEYWORDS:
115976 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
115977 break;
115978 case METH_VARARGS | METH_KEYWORDS:
115979 __Pyx_CyFunction_func_vectorcall(op) = NULL;
115980 break;
115981 default:
115982 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
115983 Py_DECREF(op);
115984 return NULL;
115985 }
115986 #endif
115987 return (PyObject *) op;
115988 }
115989 static int
115990 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
115991 {
115992 Py_CLEAR(m->func_closure);
115993 #if CYTHON_COMPILING_IN_LIMITED_API
115994 Py_CLEAR(m->func);
115995 #else
115996 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
115997 #endif
115998 Py_CLEAR(m->func_dict);
115999 Py_CLEAR(m->func_name);
116000 Py_CLEAR(m->func_qualname);
116001 Py_CLEAR(m->func_doc);
116002 Py_CLEAR(m->func_globals);
116003 Py_CLEAR(m->func_code);
116004 #if !CYTHON_COMPILING_IN_LIMITED_API
116005 #if PY_VERSION_HEX < 0x030900B1
116006 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
116007 #else
116008 {
116009 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
116010 ((PyCMethodObject *) (m))->mm_class = NULL;
116011 Py_XDECREF(cls);
116012 }
116013 #endif
116014 #endif
116015 Py_CLEAR(m->defaults_tuple);
116016 Py_CLEAR(m->defaults_kwdict);
116017 Py_CLEAR(m->func_annotations);
116018 Py_CLEAR(m->func_is_coroutine);
116019 if (m->defaults) {
116020 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
116021 int i;
116022 for (i = 0; i < m->defaults_pyobjects; i++)
116023 Py_XDECREF(pydefaults[i]);
116024 PyObject_Free(m->defaults);
116025 m->defaults = NULL;
116026 }
116027 return 0;
116028 }
116029 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
116030 {
116031 if (__Pyx_CyFunction_weakreflist(m) != NULL)
116032 PyObject_ClearWeakRefs((PyObject *) m);
116033 __Pyx_CyFunction_clear(m);
116034 __Pyx_PyHeapTypeObject_GC_Del(m);
116035 }
116036 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
116037 {
116038 PyObject_GC_UnTrack(m);
116039 __Pyx__CyFunction_dealloc(m);
116040 }
116041 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
116042 {
116043 Py_VISIT(m->func_closure);
116044 #if CYTHON_COMPILING_IN_LIMITED_API
116045 Py_VISIT(m->func);
116046 #else
116047 Py_VISIT(((PyCFunctionObject*)m)->m_module);
116048 #endif
116049 Py_VISIT(m->func_dict);
116050 Py_VISIT(m->func_name);
116051 Py_VISIT(m->func_qualname);
116052 Py_VISIT(m->func_doc);
116053 Py_VISIT(m->func_globals);
116054 Py_VISIT(m->func_code);
116055 #if !CYTHON_COMPILING_IN_LIMITED_API
116056 Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
116057 #endif
116058 Py_VISIT(m->defaults_tuple);
116059 Py_VISIT(m->defaults_kwdict);
116060 Py_VISIT(m->func_is_coroutine);
116061 if (m->defaults) {
116062 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
116063 int i;
116064 for (i = 0; i < m->defaults_pyobjects; i++)
116065 Py_VISIT(pydefaults[i]);
116066 }
116067 return 0;
116068 }
116069 static PyObject*
116070 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
116071 {
116072 #if PY_MAJOR_VERSION >= 3
116073 return PyUnicode_FromFormat("<cyfunction %U at %p>",
116074 op->func_qualname, (void *)op);
116075 #else
116076 return PyString_FromFormat("<cyfunction %s at %p>",
116077 PyString_AsString(op->func_qualname), (void *)op);
116078 #endif
116079 }
116080 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
116081 #if CYTHON_COMPILING_IN_LIMITED_API
116082 PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
116083 PyObject *py_name = NULL;
116084 PyCFunction meth;
116085 int flags;
116086 meth = PyCFunction_GetFunction(f);
116087 if (unlikely(!meth)) return NULL;
116088 flags = PyCFunction_GetFlags(f);
116089 if (unlikely(flags < 0)) return NULL;
116090 #else
116091 PyCFunctionObject* f = (PyCFunctionObject*)func;
116092 PyCFunction meth = f->m_ml->ml_meth;
116093 int flags = f->m_ml->ml_flags;
116094 #endif
116095 Py_ssize_t size;
116096 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
116097 case METH_VARARGS:
116098 if (likely(kw == NULL || PyDict_Size(kw) == 0))
116099 return (*meth)(self, arg);
116100 break;
116101 case METH_VARARGS | METH_KEYWORDS:
116102 return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
116103 case METH_NOARGS:
116104 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
116105 #if CYTHON_ASSUME_SAFE_MACROS
116106 size = PyTuple_GET_SIZE(arg);
116107 #else
116108 size = PyTuple_Size(arg);
116109 if (unlikely(size < 0)) return NULL;
116110 #endif
116111 if (likely(size == 0))
116112 return (*meth)(self, NULL);
116113 #if CYTHON_COMPILING_IN_LIMITED_API
116114 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
116115 if (!py_name) return NULL;
116116 PyErr_Format(PyExc_TypeError,
116117 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
116118 py_name, size);
116119 Py_DECREF(py_name);
116120 #else
116121 PyErr_Format(PyExc_TypeError,
116122 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
116123 f->m_ml->ml_name, size);
116124 #endif
116125 return NULL;
116126 }
116127 break;
116128 case METH_O:
116129 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
116130 #if CYTHON_ASSUME_SAFE_MACROS
116131 size = PyTuple_GET_SIZE(arg);
116132 #else
116133 size = PyTuple_Size(arg);
116134 if (unlikely(size < 0)) return NULL;
116135 #endif
116136 if (likely(size == 1)) {
116137 PyObject *result, *arg0;
116138 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
116139 arg0 = PyTuple_GET_ITEM(arg, 0);
116140 #else
116141 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
116142 #endif
116143 result = (*meth)(self, arg0);
116144 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
116145 Py_DECREF(arg0);
116146 #endif
116147 return result;
116148 }
116149 #if CYTHON_COMPILING_IN_LIMITED_API
116150 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
116151 if (!py_name) return NULL;
116152 PyErr_Format(PyExc_TypeError,
116153 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
116154 py_name, size);
116155 Py_DECREF(py_name);
116156 #else
116157 PyErr_Format(PyExc_TypeError,
116158 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
116159 f->m_ml->ml_name, size);
116160 #endif
116161 return NULL;
116162 }
116163 break;
116164 default:
116165 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
116166 return NULL;
116167 }
116168 #if CYTHON_COMPILING_IN_LIMITED_API
116169 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
116170 if (!py_name) return NULL;
116171 PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
116172 py_name);
116173 Py_DECREF(py_name);
116174 #else
116175 PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
116176 f->m_ml->ml_name);
116177 #endif
116178 return NULL;
116179 }
116180 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
116181 PyObject *self, *result;
116182 #if CYTHON_COMPILING_IN_LIMITED_API
116183 self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
116184 if (unlikely(!self) && PyErr_Occurred()) return NULL;
116185 #else
116186 self = ((PyCFunctionObject*)func)->m_self;
116187 #endif
116188 result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
116189 return result;
116190 }
116191 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
116192 PyObject *result;
116193 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
116194 #if CYTHON_METH_FASTCALL
116195 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
116196 if (vc) {
116197 #if CYTHON_ASSUME_SAFE_MACROS
116198 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
116199 #else
116200 (void) &__Pyx_PyVectorcall_FastCallDict;
116201 return PyVectorcall_Call(func, args, kw);
116202 #endif
116203 }
116204 #endif
116205 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
116206 Py_ssize_t argc;
116207 PyObject *new_args;
116208 PyObject *self;
116209 #if CYTHON_ASSUME_SAFE_MACROS
116210 argc = PyTuple_GET_SIZE(args);
116211 #else
116212 argc = PyTuple_Size(args);
116213 if (unlikely(!argc) < 0) return NULL;
116214 #endif
116215 new_args = PyTuple_GetSlice(args, 1, argc);
116216 if (unlikely(!new_args))
116217 return NULL;
116218 self = PyTuple_GetItem(args, 0);
116219 if (unlikely(!self)) {
116220 Py_DECREF(new_args);
116221 #if PY_MAJOR_VERSION > 2
116222 PyErr_Format(PyExc_TypeError,
116223 "unbound method %.200S() needs an argument",
116224 cyfunc->func_qualname);
116225 #else
116226 PyErr_SetString(PyExc_TypeError,
116227 "unbound method needs an argument");
116228 #endif
116229 return NULL;
116230 }
116231 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
116232 Py_DECREF(new_args);
116233 } else {
116234 result = __Pyx_CyFunction_Call(func, args, kw);
116235 }
116236 return result;
116237 }
116238 #if CYTHON_METH_FASTCALL
116239 static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
116240 {
116241 int ret = 0;
116242 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
116243 if (unlikely(nargs < 1)) {
116244 PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
116245 ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
116246 return -1;
116247 }
116248 ret = 1;
116249 }
116250 if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
116251 PyErr_Format(PyExc_TypeError,
116252 "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
116253 return -1;
116254 }
116255 return ret;
116256 }
116257 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
116258 {
116259 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
116260 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
116261 #if CYTHON_BACKPORT_VECTORCALL
116262 Py_ssize_t nargs = (Py_ssize_t)nargsf;
116263 #else
116264 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
116265 #endif
116266 PyObject *self;
116267 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
116268 case 1:
116269 self = args[0];
116270 args += 1;
116271 nargs -= 1;
116272 break;
116273 case 0:
116274 self = ((PyCFunctionObject*)cyfunc)->m_self;
116275 break;
116276 default:
116277 return NULL;
116278 }
116279 if (unlikely(nargs != 0)) {
116280 PyErr_Format(PyExc_TypeError,
116281 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
116282 def->ml_name, nargs);
116283 return NULL;
116284 }
116285 return def->ml_meth(self, NULL);
116286 }
116287 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
116288 {
116289 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
116290 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
116291 #if CYTHON_BACKPORT_VECTORCALL
116292 Py_ssize_t nargs = (Py_ssize_t)nargsf;
116293 #else
116294 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
116295 #endif
116296 PyObject *self;
116297 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
116298 case 1:
116299 self = args[0];
116300 args += 1;
116301 nargs -= 1;
116302 break;
116303 case 0:
116304 self = ((PyCFunctionObject*)cyfunc)->m_self;
116305 break;
116306 default:
116307 return NULL;
116308 }
116309 if (unlikely(nargs != 1)) {
116310 PyErr_Format(PyExc_TypeError,
116311 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
116312 def->ml_name, nargs);
116313 return NULL;
116314 }
116315 return def->ml_meth(self, args[0]);
116316 }
116317 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
116318 {
116319 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
116320 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
116321 #if CYTHON_BACKPORT_VECTORCALL
116322 Py_ssize_t nargs = (Py_ssize_t)nargsf;
116323 #else
116324 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
116325 #endif
116326 PyObject *self;
116327 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
116328 case 1:
116329 self = args[0];
116330 args += 1;
116331 nargs -= 1;
116332 break;
116333 case 0:
116334 self = ((PyCFunctionObject*)cyfunc)->m_self;
116335 break;
116336 default:
116337 return NULL;
116338 }
116339 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
116340 }
116341 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
116342 {
116343 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
116344 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
116345 PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
116346 #if CYTHON_BACKPORT_VECTORCALL
116347 Py_ssize_t nargs = (Py_ssize_t)nargsf;
116348 #else
116349 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
116350 #endif
116351 PyObject *self;
116352 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
116353 case 1:
116354 self = args[0];
116355 args += 1;
116356 nargs -= 1;
116357 break;
116358 case 0:
116359 self = ((PyCFunctionObject*)cyfunc)->m_self;
116360 break;
116361 default:
116362 return NULL;
116363 }
116364 return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
116365 }
116366 #endif
116367 #if CYTHON_USE_TYPE_SPECS
116368 static PyType_Slot __pyx_CyFunctionType_slots[] = {
116369 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
116370 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
116371 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
116372 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
116373 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
116374 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
116375 {Py_tp_members, (void *)__pyx_CyFunction_members},
116376 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
116377 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
116378 {0, 0},
116379 };
116380 static PyType_Spec __pyx_CyFunctionType_spec = {
116381 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
116382 sizeof(__pyx_CyFunctionObject),
116383 0,
116384 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
116385 Py_TPFLAGS_METHOD_DESCRIPTOR |
116386 #endif
116387 #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
116388 _Py_TPFLAGS_HAVE_VECTORCALL |
116389 #endif
116390 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
116391 __pyx_CyFunctionType_slots
116392 };
116393 #else
116394 static PyTypeObject __pyx_CyFunctionType_type = {
116395 PyVarObject_HEAD_INIT(0, 0)
116396 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
116397 sizeof(__pyx_CyFunctionObject),
116398 0,
116399 (destructor) __Pyx_CyFunction_dealloc,
116400 #if !CYTHON_METH_FASTCALL
116401 0,
116402 #elif CYTHON_BACKPORT_VECTORCALL
116403 (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
116404 #else
116405 offsetof(PyCFunctionObject, vectorcall),
116406 #endif
116407 0,
116408 0,
116409 #if PY_MAJOR_VERSION < 3
116410 0,
116411 #else
116412 0,
116413 #endif
116414 (reprfunc) __Pyx_CyFunction_repr,
116415 0,
116416 0,
116417 0,
116418 0,
116419 __Pyx_CyFunction_CallAsMethod,
116420 0,
116421 0,
116422 0,
116423 0,
116424 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
116425 Py_TPFLAGS_METHOD_DESCRIPTOR |
116426 #endif
116427 #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
116428 _Py_TPFLAGS_HAVE_VECTORCALL |
116429 #endif
116430 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
116431 0,
116432 (traverseproc) __Pyx_CyFunction_traverse,
116433 (inquiry) __Pyx_CyFunction_clear,
116434 0,
116435 #if PY_VERSION_HEX < 0x030500A0
116436 offsetof(__pyx_CyFunctionObject, func_weakreflist),
116437 #else
116438 offsetof(PyCFunctionObject, m_weakreflist),
116439 #endif
116440 0,
116441 0,
116442 __pyx_CyFunction_methods,
116443 __pyx_CyFunction_members,
116444 __pyx_CyFunction_getsets,
116445 0,
116446 0,
116447 __Pyx_PyMethod_New,
116448 0,
116449 offsetof(__pyx_CyFunctionObject, func_dict),
116450 0,
116451 0,
116452 0,
116453 0,
116454 0,
116455 0,
116456 0,
116457 0,
116458 0,
116459 0,
116460 0,
116461 0,
116462 #if PY_VERSION_HEX >= 0x030400a1
116463 0,
116464 #endif
116465 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
116466 0,
116467 #endif
116468 #if __PYX_NEED_TP_PRINT_SLOT
116469 0,
116470 #endif
116471 #if PY_VERSION_HEX >= 0x030C0000
116472 0,
116473 #endif
116474 #if PY_VERSION_HEX >= 0x030d00A4
116475 0,
116476 #endif
116477 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
116478 0,
116479 #endif
116480 };
116481 #endif
116482 static int __pyx_CyFunction_init(PyObject *module) {
116483 #if CYTHON_USE_TYPE_SPECS
116484 __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
116485 #else
116486 CYTHON_UNUSED_VAR(module);
116487 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
116488 #endif
116489 if (unlikely(__pyx_CyFunctionType == NULL)) {
116490 return -1;
116491 }
116492 return 0;
116493 }
116494 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
116495 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
116496 m->defaults = PyObject_Malloc(size);
116497 if (unlikely(!m->defaults))
116498 return PyErr_NoMemory();
116499 memset(m->defaults, 0, size);
116500 m->defaults_pyobjects = pyobjects;
116501 m->defaults_size = size;
116502 return m->defaults;
116503 }
116504 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
116505 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
116506 m->defaults_tuple = tuple;
116507 Py_INCREF(tuple);
116508 }
116509 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
116510 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
116511 m->defaults_kwdict = dict;
116512 Py_INCREF(dict);
116513 }
116514 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
116515 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
116516 m->func_annotations = dict;
116517 Py_INCREF(dict);
116518 }
116519
116520 /* CythonFunction */
116521 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
116522 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
116523 PyObject *op = __Pyx_CyFunction_Init(
116524 PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
116525 ml, flags, qualname, closure, module, globals, code
116526 );
116527 if (likely(op)) {
116528 PyObject_GC_Track(op);
116529 }
116530 return op;
116531 }
116532
116533 /* CLineInTraceback */
116534 #ifndef CYTHON_CLINE_IN_TRACEBACK
116535 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
116536 PyObject *use_cline;
116537 PyObject *ptype, *pvalue, *ptraceback;
116538 #if CYTHON_COMPILING_IN_CPYTHON
116539 PyObject **cython_runtime_dict;
116540 #endif
116541 CYTHON_MAYBE_UNUSED_VAR(tstate);
116542 if (unlikely(!__pyx_cython_runtime)) {
116543 return c_line;
116544 }
116545 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
116546 #if CYTHON_COMPILING_IN_CPYTHON
116547 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
116548 if (likely(cython_runtime_dict)) {
116549 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
116550 use_cline, *cython_runtime_dict,
116551 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
116552 } else
116553 #endif
116554 {
116555 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
116556 if (use_cline_obj) {
116557 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
116558 Py_DECREF(use_cline_obj);
116559 } else {
116560 PyErr_Clear();
116561 use_cline = NULL;
116562 }
116563 }
116564 if (!use_cline) {
116565 c_line = 0;
116566 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
116567 }
116568 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
116569 c_line = 0;
116570 }
116571 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
116572 return c_line;
116573 }
116574 #endif
116575
116576 /* CodeObjectCache */
116577 #if !CYTHON_COMPILING_IN_LIMITED_API
116578 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
116579 int start = 0, mid = 0, end = count - 1;
116580 if (end >= 0 && code_line > entries[end].code_line) {
116581 return count;
116582 }
116583 while (start < end) {
116584 mid = start + (end - start) / 2;
116585 if (code_line < entries[mid].code_line) {
116586 end = mid;
116587 } else if (code_line > entries[mid].code_line) {
116588 start = mid + 1;
116589 } else {
116590 return mid;
116591 }
116592 }
116593 if (code_line <= entries[mid].code_line) {
116594 return mid;
116595 } else {
116596 return mid + 1;
116597 }
116598 }
116599 static PyCodeObject *__pyx_find_code_object(int code_line) {
116600 PyCodeObject* code_object;
116601 int pos;
116602 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
116603 return NULL;
116604 }
116605 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
116606 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
116607 return NULL;
116608 }
116609 code_object = __pyx_code_cache.entries[pos].code_object;
116610 Py_INCREF(code_object);
116611 return code_object;
116612 }
116613 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
116614 int pos, i;
116615 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
116616 if (unlikely(!code_line)) {
116617 return;
116618 }
116619 if (unlikely(!entries)) {
116620 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
116621 if (likely(entries)) {
116622 __pyx_code_cache.entries = entries;
116623 __pyx_code_cache.max_count = 64;
116624 __pyx_code_cache.count = 1;
116625 entries[0].code_line = code_line;
116626 entries[0].code_object = code_object;
116627 Py_INCREF(code_object);
116628 }
116629 return;
116630 }
116631 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
116632 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
116633 PyCodeObject* tmp = entries[pos].code_object;
116634 entries[pos].code_object = code_object;
116635 Py_DECREF(tmp);
116636 return;
116637 }
116638 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
116639 int new_max = __pyx_code_cache.max_count + 64;
116640 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
116641 __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
116642 if (unlikely(!entries)) {
116643 return;
116644 }
116645 __pyx_code_cache.entries = entries;
116646 __pyx_code_cache.max_count = new_max;
116647 }
116648 for (i=__pyx_code_cache.count; i>pos; i--) {
116649 entries[i] = entries[i-1];
116650 }
116651 entries[pos].code_line = code_line;
116652 entries[pos].code_object = code_object;
116653 __pyx_code_cache.count++;
116654 Py_INCREF(code_object);
116655 }
116656 #endif
116657
116658 /* AddTraceback */
116659 #include "compile.h"
116660 #include "frameobject.h"
116661 #include "traceback.h"
116662 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
116663 #ifndef Py_BUILD_CORE
116664 #define Py_BUILD_CORE 1
116665 #endif
116666 #include "internal/pycore_frame.h"
116667 #endif
116668 #if CYTHON_COMPILING_IN_LIMITED_API
116669 static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
116670 PyObject *firstlineno, PyObject *name) {
116671 PyObject *replace = NULL;
116672 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
116673 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
116674 replace = PyObject_GetAttrString(code, "replace");
116675 if (likely(replace)) {
116676 PyObject *result;
116677 result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
116678 Py_DECREF(replace);
116679 return result;
116680 }
116681 PyErr_Clear();
116682 #if __PYX_LIMITED_VERSION_HEX < 0x030780000
116683 {
116684 PyObject *compiled = NULL, *result = NULL;
116685 if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
116686 if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
116687 compiled = Py_CompileString(
116688 "out = type(code)(\n"
116689 " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
116690 " code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
116691 " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
116692 " code.co_lnotab)\n", "<dummy>", Py_file_input);
116693 if (!compiled) return NULL;
116694 result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
116695 Py_DECREF(compiled);
116696 if (!result) PyErr_Print();
116697 Py_DECREF(result);
116698 result = PyDict_GetItemString(scratch_dict, "out");
116699 if (result) Py_INCREF(result);
116700 return result;
116701 }
116702 #else
116703 return NULL;
116704 #endif
116705 }
116706 static void __Pyx_AddTraceback(const char *funcname, int c_line,
116707 int py_line, const char *filename) {
116708 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
116709 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
116710 PyObject *exc_type, *exc_value, *exc_traceback;
116711 int success = 0;
116712 if (c_line) {
116713 (void) __pyx_cfilenm;
116714 (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
116715 }
116716 PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
116717 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
116718 if (unlikely(!code_object)) goto bad;
116719 py_py_line = PyLong_FromLong(py_line);
116720 if (unlikely(!py_py_line)) goto bad;
116721 py_funcname = PyUnicode_FromString(funcname);
116722 if (unlikely(!py_funcname)) goto bad;
116723 dict = PyDict_New();
116724 if (unlikely(!dict)) goto bad;
116725 {
116726 PyObject *old_code_object = code_object;
116727 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
116728 Py_DECREF(old_code_object);
116729 }
116730 if (unlikely(!code_object)) goto bad;
116731 getframe = PySys_GetObject("_getframe");
116732 if (unlikely(!getframe)) goto bad;
116733 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
116734 frame = PyEval_EvalCode(code_object, dict, dict);
116735 if (unlikely(!frame) || frame == Py_None) goto bad;
116736 success = 1;
116737 bad:
116738 PyErr_Restore(exc_type, exc_value, exc_traceback);
116739 Py_XDECREF(code_object);
116740 Py_XDECREF(py_py_line);
116741 Py_XDECREF(py_funcname);
116742 Py_XDECREF(dict);
116743 Py_XDECREF(replace);
116744 if (success) {
116745 PyTraceBack_Here(
116746 (struct _frame*)frame);
116747 }
116748 Py_XDECREF(frame);
116749 }
116750 #else
116751 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
116752 const char *funcname, int c_line,
116753 int py_line, const char *filename) {
116754 PyCodeObject *py_code = NULL;
116755 PyObject *py_funcname = NULL;
116756 #if PY_MAJOR_VERSION < 3
116757 PyObject *py_srcfile = NULL;
116758 py_srcfile = PyString_FromString(filename);
116759 if (!py_srcfile) goto bad;
116760 #endif
116761 if (c_line) {
116762 #if PY_MAJOR_VERSION < 3
116763 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
116764 if (!py_funcname) goto bad;
116765 #else
116766 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
116767 if (!py_funcname) goto bad;
116768 funcname = PyUnicode_AsUTF8(py_funcname);
116769 if (!funcname) goto bad;
116770 #endif
116771 }
116772 else {
116773 #if PY_MAJOR_VERSION < 3
116774 py_funcname = PyString_FromString(funcname);
116775 if (!py_funcname) goto bad;
116776 #endif
116777 }
116778 #if PY_MAJOR_VERSION < 3
116779 py_code = __Pyx_PyCode_New(
116780 0,
116781 0,
116782 0,
116783 0,
116784 0,
116785 0,
116786 __pyx_empty_bytes, /*PyObject *code,*/
116787 __pyx_empty_tuple, /*PyObject *consts,*/
116788 __pyx_empty_tuple, /*PyObject *names,*/
116789 __pyx_empty_tuple, /*PyObject *varnames,*/
116790 __pyx_empty_tuple, /*PyObject *freevars,*/
116791 __pyx_empty_tuple, /*PyObject *cellvars,*/
116792 py_srcfile, /*PyObject *filename,*/
116793 py_funcname, /*PyObject *name,*/
116794 py_line,
116795 __pyx_empty_bytes /*PyObject *lnotab*/
116796 );
116797 Py_DECREF(py_srcfile);
116798 #else
116799 py_code = PyCode_NewEmpty(filename, funcname, py_line);
116800 #endif
116801 Py_XDECREF(py_funcname);
116802 return py_code;
116803 bad:
116804 Py_XDECREF(py_funcname);
116805 #if PY_MAJOR_VERSION < 3
116806 Py_XDECREF(py_srcfile);
116807 #endif
116808 return NULL;
116809 }
116810 static void __Pyx_AddTraceback(const char *funcname, int c_line,
116811 int py_line, const char *filename) {
116812 PyCodeObject *py_code = 0;
116813 PyFrameObject *py_frame = 0;
116814 PyThreadState *tstate = __Pyx_PyThreadState_Current;
116815 PyObject *ptype, *pvalue, *ptraceback;
116816 if (c_line) {
116817 c_line = __Pyx_CLineForTraceback(tstate, c_line);
116818 }
116819 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
116820 if (!py_code) {
116821 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
116822 py_code = __Pyx_CreateCodeObjectForTraceback(
116823 funcname, c_line, py_line, filename);
116824 if (!py_code) {
116825 /* If the code object creation fails, then we should clear the
116826 fetched exception references and propagate the new exception */
116827 Py_XDECREF(ptype);
116828 Py_XDECREF(pvalue);
116829 Py_XDECREF(ptraceback);
116830 goto bad;
116831 }
116832 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
116833 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
116834 }
116835 py_frame = PyFrame_New(
116836 tstate, /*PyThreadState *tstate,*/
116837 py_code, /*PyCodeObject *code,*/
116838 __pyx_d, /*PyObject *globals,*/
116839 0 /*PyObject *locals*/
116840 );
116841 if (!py_frame) goto bad;
116842 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
116843 PyTraceBack_Here(py_frame);
116844 bad:
116845 Py_XDECREF(py_code);
116846 Py_XDECREF(py_frame);
116847 }
116848 #endif
116849
116850 /* CIntFromPyVerify */
116851 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
116852 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
116853 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
116854 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
116855 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
116856 {\
116857 func_type value = func_value;\
116858 if (sizeof(target_type) < sizeof(func_type)) {\
116859 if (unlikely(value != (func_type) (target_type) value)) {\
116860 func_type zero = 0;\
116861 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
116862 return (target_type) -1;\
116863 if (is_unsigned && unlikely(value < zero))\
116864 goto raise_neg_overflow;\
116865 else\
116866 goto raise_overflow;\
116867 }\
116868 }\
116869 return (target_type) value;\
116870 }
116871
116872 /* CIntToPy */
116873 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
116874 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
116875 #pragma GCC diagnostic push
116876 #pragma GCC diagnostic ignored "-Wconversion"
116877 #endif
116878 const int neg_one = (int) -1, const_zero = (int) 0;
116879 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
116880 #pragma GCC diagnostic pop
116881 #endif
116882 const int is_unsigned = neg_one > const_zero;
116883 if (is_unsigned) {
116884 if (sizeof(int) < sizeof(long)) {
116885 return PyInt_FromLong((long) value);
116886 } else if (sizeof(int) <= sizeof(unsigned long)) {
116887 return PyLong_FromUnsignedLong((unsigned long) value);
116888 #ifdef HAVE_LONG_LONG
116889 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
116890 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
116891 #endif
116892 }
116893 } else {
116894 if (sizeof(int) <= sizeof(long)) {
116895 return PyInt_FromLong((long) value);
116896 #ifdef HAVE_LONG_LONG
116897 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
116898 return PyLong_FromLongLong((PY_LONG_LONG) value);
116899 #endif
116900 }
116901 }
116902 {
116903 unsigned char *bytes = (unsigned char *)&value;
116904 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
116905 if (is_unsigned) {
116906 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
116907 } else {
116908 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
116909 }
116910 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
116911 int one = 1; int little = (int)*(unsigned char *)&one;
116912 return _PyLong_FromByteArray(bytes, sizeof(int),
116913 little, !is_unsigned);
116914 #else
116915 int one = 1; int little = (int)*(unsigned char *)&one;
116916 PyObject *from_bytes, *result = NULL;
116917 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
116918 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
116919 if (!from_bytes) return NULL;
116920 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
116921 if (!py_bytes) goto limited_bad;
116922 order_str = PyUnicode_FromString(little ? "little" : "big");
116923 if (!order_str) goto limited_bad;
116924 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
116925 if (!arg_tuple) goto limited_bad;
116926 if (!is_unsigned) {
116927 kwds = PyDict_New();
116928 if (!kwds) goto limited_bad;
116929 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
116930 }
116931 result = PyObject_Call(from_bytes, arg_tuple, kwds);
116932 limited_bad:
116933 Py_XDECREF(kwds);
116934 Py_XDECREF(arg_tuple);
116935 Py_XDECREF(order_str);
116936 Py_XDECREF(py_bytes);
116937 Py_XDECREF(from_bytes);
116938 return result;
116939 #endif
116940 }
116941 }
116942
116943 /* CIntFromPy */
116944 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
116945 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
116946 #pragma GCC diagnostic push
116947 #pragma GCC diagnostic ignored "-Wconversion"
116948 #endif
116949 const int neg_one = (int) -1, const_zero = (int) 0;
116950 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
116951 #pragma GCC diagnostic pop
116952 #endif
116953 const int is_unsigned = neg_one > const_zero;
116954 #if PY_MAJOR_VERSION < 3
116955 if (likely(PyInt_Check(x))) {
116956 if ((sizeof(int) < sizeof(long))) {
116957 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
116958 } else {
116959 long val = PyInt_AS_LONG(x);
116960 if (is_unsigned && unlikely(val < 0)) {
116961 goto raise_neg_overflow;
116962 }
116963 return (int) val;
116964 }
116965 }
116966 #endif
116967 if (unlikely(!PyLong_Check(x))) {
116968 int val;
116969 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
116970 if (!tmp) return (int) -1;
116971 val = __Pyx_PyInt_As_int(tmp);
116972 Py_DECREF(tmp);
116973 return val;
116974 }
116975 if (is_unsigned) {
116976 #if CYTHON_USE_PYLONG_INTERNALS
116977 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
116978 goto raise_neg_overflow;
116979 } else if (__Pyx_PyLong_IsCompact(x)) {
116980 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
116981 } else {
116982 const digit* digits = __Pyx_PyLong_Digits(x);
116983 assert(__Pyx_PyLong_DigitCount(x) > 1);
116984 switch (__Pyx_PyLong_DigitCount(x)) {
116985 case 2:
116986 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
116987 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
116988 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
116989 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
116990 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
116991 }
116992 }
116993 break;
116994 case 3:
116995 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
116996 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
116997 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
116998 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
116999 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
117000 }
117001 }
117002 break;
117003 case 4:
117004 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
117005 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117006 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117007 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
117008 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
117009 }
117010 }
117011 break;
117012 }
117013 }
117014 #endif
117015 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
117016 if (unlikely(Py_SIZE(x) < 0)) {
117017 goto raise_neg_overflow;
117018 }
117019 #else
117020 {
117021 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
117022 if (unlikely(result < 0))
117023 return (int) -1;
117024 if (unlikely(result == 1))
117025 goto raise_neg_overflow;
117026 }
117027 #endif
117028 if ((sizeof(int) <= sizeof(unsigned long))) {
117029 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
117030 #ifdef HAVE_LONG_LONG
117031 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
117032 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
117033 #endif
117034 }
117035 } else {
117036 #if CYTHON_USE_PYLONG_INTERNALS
117037 if (__Pyx_PyLong_IsCompact(x)) {
117038 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
117039 } else {
117040 const digit* digits = __Pyx_PyLong_Digits(x);
117041 assert(__Pyx_PyLong_DigitCount(x) > 1);
117042 switch (__Pyx_PyLong_SignedDigitCount(x)) {
117043 case -2:
117044 if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
117045 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
117046 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117047 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
117048 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
117049 }
117050 }
117051 break;
117052 case 2:
117053 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
117054 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
117055 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117056 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
117057 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
117058 }
117059 }
117060 break;
117061 case -3:
117062 if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
117063 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
117064 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117065 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
117066 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
117067 }
117068 }
117069 break;
117070 case 3:
117071 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
117072 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
117073 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117074 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
117075 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
117076 }
117077 }
117078 break;
117079 case -4:
117080 if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
117081 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117082 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117083 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
117084 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
117085 }
117086 }
117087 break;
117088 case 4:
117089 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
117090 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117091 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117092 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
117093 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
117094 }
117095 }
117096 break;
117097 }
117098 }
117099 #endif
117100 if ((sizeof(int) <= sizeof(long))) {
117101 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
117102 #ifdef HAVE_LONG_LONG
117103 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
117104 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
117105 #endif
117106 }
117107 }
117108 {
117109 int val;
117110 int ret = -1;
117111 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
117112 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
117113 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
117114 if (unlikely(bytes_copied == -1)) {
117115 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
117116 goto raise_overflow;
117117 } else {
117118 ret = 0;
117119 }
117120 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
117121 int one = 1; int is_little = (int)*(unsigned char *)&one;
117122 unsigned char *bytes = (unsigned char *)&val;
117123 ret = _PyLong_AsByteArray((PyLongObject *)x,
117124 bytes, sizeof(val),
117125 is_little, !is_unsigned);
117126 #else
117127 PyObject *v;
117128 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
117129 int bits, remaining_bits, is_negative = 0;
117130 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
117131 if (likely(PyLong_CheckExact(x))) {
117132 v = __Pyx_NewRef(x);
117133 } else {
117134 v = PyNumber_Long(x);
117135 if (unlikely(!v)) return (int) -1;
117136 assert(PyLong_CheckExact(v));
117137 }
117138 {
117139 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
117140 if (unlikely(result < 0)) {
117141 Py_DECREF(v);
117142 return (int) -1;
117143 }
117144 is_negative = result == 1;
117145 }
117146 if (is_unsigned && unlikely(is_negative)) {
117147 Py_DECREF(v);
117148 goto raise_neg_overflow;
117149 } else if (is_negative) {
117150 stepval = PyNumber_Invert(v);
117151 Py_DECREF(v);
117152 if (unlikely(!stepval))
117153 return (int) -1;
117154 } else {
117155 stepval = v;
117156 }
117157 v = NULL;
117158 val = (int) 0;
117159 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
117160 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
117161 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
117162 PyObject *tmp, *digit;
117163 long idigit;
117164 digit = PyNumber_And(stepval, mask);
117165 if (unlikely(!digit)) goto done;
117166 idigit = PyLong_AsLong(digit);
117167 Py_DECREF(digit);
117168 if (unlikely(idigit < 0)) goto done;
117169 val |= ((int) idigit) << bits;
117170 tmp = PyNumber_Rshift(stepval, shift);
117171 if (unlikely(!tmp)) goto done;
117172 Py_DECREF(stepval); stepval = tmp;
117173 }
117174 Py_DECREF(shift); shift = NULL;
117175 Py_DECREF(mask); mask = NULL;
117176 {
117177 long idigit = PyLong_AsLong(stepval);
117178 if (unlikely(idigit < 0)) goto done;
117179 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
117180 if (unlikely(idigit >= (1L << remaining_bits)))
117181 goto raise_overflow;
117182 val |= ((int) idigit) << bits;
117183 }
117184 if (!is_unsigned) {
117185 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
117186 goto raise_overflow;
117187 if (is_negative)
117188 val = ~val;
117189 }
117190 ret = 0;
117191 done:
117192 Py_XDECREF(shift);
117193 Py_XDECREF(mask);
117194 Py_XDECREF(stepval);
117195 #endif
117196 if (unlikely(ret))
117197 return (int) -1;
117198 return val;
117199 }
117200 raise_overflow:
117201 PyErr_SetString(PyExc_OverflowError,
117202 "value too large to convert to int");
117203 return (int) -1;
117204 raise_neg_overflow:
117205 PyErr_SetString(PyExc_OverflowError,
117206 "can't convert negative value to int");
117207 return (int) -1;
117208 }
117209
117210 /* CIntToPy */
117211 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
117212 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117213 #pragma GCC diagnostic push
117214 #pragma GCC diagnostic ignored "-Wconversion"
117215 #endif
117216 const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
117217 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117218 #pragma GCC diagnostic pop
117219 #endif
117220 const int is_unsigned = neg_one > const_zero;
117221 if (is_unsigned) {
117222 if (sizeof(int32_t) < sizeof(long)) {
117223 return PyInt_FromLong((long) value);
117224 } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
117225 return PyLong_FromUnsignedLong((unsigned long) value);
117226 #ifdef HAVE_LONG_LONG
117227 } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
117228 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
117229 #endif
117230 }
117231 } else {
117232 if (sizeof(int32_t) <= sizeof(long)) {
117233 return PyInt_FromLong((long) value);
117234 #ifdef HAVE_LONG_LONG
117235 } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
117236 return PyLong_FromLongLong((PY_LONG_LONG) value);
117237 #endif
117238 }
117239 }
117240 {
117241 unsigned char *bytes = (unsigned char *)&value;
117242 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
117243 if (is_unsigned) {
117244 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
117245 } else {
117246 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
117247 }
117248 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
117249 int one = 1; int little = (int)*(unsigned char *)&one;
117250 return _PyLong_FromByteArray(bytes, sizeof(int32_t),
117251 little, !is_unsigned);
117252 #else
117253 int one = 1; int little = (int)*(unsigned char *)&one;
117254 PyObject *from_bytes, *result = NULL;
117255 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
117256 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
117257 if (!from_bytes) return NULL;
117258 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t));
117259 if (!py_bytes) goto limited_bad;
117260 order_str = PyUnicode_FromString(little ? "little" : "big");
117261 if (!order_str) goto limited_bad;
117262 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
117263 if (!arg_tuple) goto limited_bad;
117264 if (!is_unsigned) {
117265 kwds = PyDict_New();
117266 if (!kwds) goto limited_bad;
117267 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
117268 }
117269 result = PyObject_Call(from_bytes, arg_tuple, kwds);
117270 limited_bad:
117271 Py_XDECREF(kwds);
117272 Py_XDECREF(arg_tuple);
117273 Py_XDECREF(order_str);
117274 Py_XDECREF(py_bytes);
117275 Py_XDECREF(from_bytes);
117276 return result;
117277 #endif
117278 }
117279 }
117280
117281 /* CIntFromPy */
117282 static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
117283 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117284 #pragma GCC diagnostic push
117285 #pragma GCC diagnostic ignored "-Wconversion"
117286 #endif
117287 const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
117288 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117289 #pragma GCC diagnostic pop
117290 #endif
117291 const int is_unsigned = neg_one > const_zero;
117292 #if PY_MAJOR_VERSION < 3
117293 if (likely(PyInt_Check(x))) {
117294 if ((sizeof(int32_t) < sizeof(long))) {
117295 __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
117296 } else {
117297 long val = PyInt_AS_LONG(x);
117298 if (is_unsigned && unlikely(val < 0)) {
117299 goto raise_neg_overflow;
117300 }
117301 return (int32_t) val;
117302 }
117303 }
117304 #endif
117305 if (unlikely(!PyLong_Check(x))) {
117306 int32_t val;
117307 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
117308 if (!tmp) return (int32_t) -1;
117309 val = __Pyx_PyInt_As_int32_t(tmp);
117310 Py_DECREF(tmp);
117311 return val;
117312 }
117313 if (is_unsigned) {
117314 #if CYTHON_USE_PYLONG_INTERNALS
117315 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
117316 goto raise_neg_overflow;
117317 } else if (__Pyx_PyLong_IsCompact(x)) {
117318 __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
117319 } else {
117320 const digit* digits = __Pyx_PyLong_Digits(x);
117321 assert(__Pyx_PyLong_DigitCount(x) > 1);
117322 switch (__Pyx_PyLong_DigitCount(x)) {
117323 case 2:
117324 if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
117325 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
117326 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117327 } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) {
117328 return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
117329 }
117330 }
117331 break;
117332 case 3:
117333 if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
117334 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
117335 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117336 } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) {
117337 return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
117338 }
117339 }
117340 break;
117341 case 4:
117342 if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
117343 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117344 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117345 } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) {
117346 return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
117347 }
117348 }
117349 break;
117350 }
117351 }
117352 #endif
117353 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
117354 if (unlikely(Py_SIZE(x) < 0)) {
117355 goto raise_neg_overflow;
117356 }
117357 #else
117358 {
117359 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
117360 if (unlikely(result < 0))
117361 return (int32_t) -1;
117362 if (unlikely(result == 1))
117363 goto raise_neg_overflow;
117364 }
117365 #endif
117366 if ((sizeof(int32_t) <= sizeof(unsigned long))) {
117367 __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
117368 #ifdef HAVE_LONG_LONG
117369 } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) {
117370 __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
117371 #endif
117372 }
117373 } else {
117374 #if CYTHON_USE_PYLONG_INTERNALS
117375 if (__Pyx_PyLong_IsCompact(x)) {
117376 __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
117377 } else {
117378 const digit* digits = __Pyx_PyLong_Digits(x);
117379 assert(__Pyx_PyLong_DigitCount(x) > 1);
117380 switch (__Pyx_PyLong_SignedDigitCount(x)) {
117381 case -2:
117382 if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) {
117383 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
117384 __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117385 } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
117386 return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
117387 }
117388 }
117389 break;
117390 case 2:
117391 if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
117392 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
117393 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117394 } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
117395 return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
117396 }
117397 }
117398 break;
117399 case -3:
117400 if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
117401 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
117402 __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117403 } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
117404 return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
117405 }
117406 }
117407 break;
117408 case 3:
117409 if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
117410 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
117411 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117412 } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
117413 return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
117414 }
117415 }
117416 break;
117417 case -4:
117418 if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
117419 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117420 __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117421 } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) {
117422 return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
117423 }
117424 }
117425 break;
117426 case 4:
117427 if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
117428 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117429 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117430 } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) {
117431 return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
117432 }
117433 }
117434 break;
117435 }
117436 }
117437 #endif
117438 if ((sizeof(int32_t) <= sizeof(long))) {
117439 __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
117440 #ifdef HAVE_LONG_LONG
117441 } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) {
117442 __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
117443 #endif
117444 }
117445 }
117446 {
117447 int32_t val;
117448 int ret = -1;
117449 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
117450 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
117451 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
117452 if (unlikely(bytes_copied == -1)) {
117453 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
117454 goto raise_overflow;
117455 } else {
117456 ret = 0;
117457 }
117458 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
117459 int one = 1; int is_little = (int)*(unsigned char *)&one;
117460 unsigned char *bytes = (unsigned char *)&val;
117461 ret = _PyLong_AsByteArray((PyLongObject *)x,
117462 bytes, sizeof(val),
117463 is_little, !is_unsigned);
117464 #else
117465 PyObject *v;
117466 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
117467 int bits, remaining_bits, is_negative = 0;
117468 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
117469 if (likely(PyLong_CheckExact(x))) {
117470 v = __Pyx_NewRef(x);
117471 } else {
117472 v = PyNumber_Long(x);
117473 if (unlikely(!v)) return (int32_t) -1;
117474 assert(PyLong_CheckExact(v));
117475 }
117476 {
117477 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
117478 if (unlikely(result < 0)) {
117479 Py_DECREF(v);
117480 return (int32_t) -1;
117481 }
117482 is_negative = result == 1;
117483 }
117484 if (is_unsigned && unlikely(is_negative)) {
117485 Py_DECREF(v);
117486 goto raise_neg_overflow;
117487 } else if (is_negative) {
117488 stepval = PyNumber_Invert(v);
117489 Py_DECREF(v);
117490 if (unlikely(!stepval))
117491 return (int32_t) -1;
117492 } else {
117493 stepval = v;
117494 }
117495 v = NULL;
117496 val = (int32_t) 0;
117497 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
117498 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
117499 for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) {
117500 PyObject *tmp, *digit;
117501 long idigit;
117502 digit = PyNumber_And(stepval, mask);
117503 if (unlikely(!digit)) goto done;
117504 idigit = PyLong_AsLong(digit);
117505 Py_DECREF(digit);
117506 if (unlikely(idigit < 0)) goto done;
117507 val |= ((int32_t) idigit) << bits;
117508 tmp = PyNumber_Rshift(stepval, shift);
117509 if (unlikely(!tmp)) goto done;
117510 Py_DECREF(stepval); stepval = tmp;
117511 }
117512 Py_DECREF(shift); shift = NULL;
117513 Py_DECREF(mask); mask = NULL;
117514 {
117515 long idigit = PyLong_AsLong(stepval);
117516 if (unlikely(idigit < 0)) goto done;
117517 remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1);
117518 if (unlikely(idigit >= (1L << remaining_bits)))
117519 goto raise_overflow;
117520 val |= ((int32_t) idigit) << bits;
117521 }
117522 if (!is_unsigned) {
117523 if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1))))
117524 goto raise_overflow;
117525 if (is_negative)
117526 val = ~val;
117527 }
117528 ret = 0;
117529 done:
117530 Py_XDECREF(shift);
117531 Py_XDECREF(mask);
117532 Py_XDECREF(stepval);
117533 #endif
117534 if (unlikely(ret))
117535 return (int32_t) -1;
117536 return val;
117537 }
117538 raise_overflow:
117539 PyErr_SetString(PyExc_OverflowError,
117540 "value too large to convert to int32_t");
117541 return (int32_t) -1;
117542 raise_neg_overflow:
117543 PyErr_SetString(PyExc_OverflowError,
117544 "can't convert negative value to int32_t");
117545 return (int32_t) -1;
117546 }
117547
117548 /* CIntFromPy */
117549 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
117550 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117551 #pragma GCC diagnostic push
117552 #pragma GCC diagnostic ignored "-Wconversion"
117553 #endif
117554 const long neg_one = (long) -1, const_zero = (long) 0;
117555 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117556 #pragma GCC diagnostic pop
117557 #endif
117558 const int is_unsigned = neg_one > const_zero;
117559 #if PY_MAJOR_VERSION < 3
117560 if (likely(PyInt_Check(x))) {
117561 if ((sizeof(long) < sizeof(long))) {
117562 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
117563 } else {
117564 long val = PyInt_AS_LONG(x);
117565 if (is_unsigned && unlikely(val < 0)) {
117566 goto raise_neg_overflow;
117567 }
117568 return (long) val;
117569 }
117570 }
117571 #endif
117572 if (unlikely(!PyLong_Check(x))) {
117573 long val;
117574 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
117575 if (!tmp) return (long) -1;
117576 val = __Pyx_PyInt_As_long(tmp);
117577 Py_DECREF(tmp);
117578 return val;
117579 }
117580 if (is_unsigned) {
117581 #if CYTHON_USE_PYLONG_INTERNALS
117582 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
117583 goto raise_neg_overflow;
117584 } else if (__Pyx_PyLong_IsCompact(x)) {
117585 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
117586 } else {
117587 const digit* digits = __Pyx_PyLong_Digits(x);
117588 assert(__Pyx_PyLong_DigitCount(x) > 1);
117589 switch (__Pyx_PyLong_DigitCount(x)) {
117590 case 2:
117591 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
117592 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
117593 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117594 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
117595 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
117596 }
117597 }
117598 break;
117599 case 3:
117600 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
117601 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
117602 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117603 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
117604 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
117605 }
117606 }
117607 break;
117608 case 4:
117609 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
117610 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117611 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117612 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
117613 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
117614 }
117615 }
117616 break;
117617 }
117618 }
117619 #endif
117620 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
117621 if (unlikely(Py_SIZE(x) < 0)) {
117622 goto raise_neg_overflow;
117623 }
117624 #else
117625 {
117626 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
117627 if (unlikely(result < 0))
117628 return (long) -1;
117629 if (unlikely(result == 1))
117630 goto raise_neg_overflow;
117631 }
117632 #endif
117633 if ((sizeof(long) <= sizeof(unsigned long))) {
117634 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
117635 #ifdef HAVE_LONG_LONG
117636 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
117637 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
117638 #endif
117639 }
117640 } else {
117641 #if CYTHON_USE_PYLONG_INTERNALS
117642 if (__Pyx_PyLong_IsCompact(x)) {
117643 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
117644 } else {
117645 const digit* digits = __Pyx_PyLong_Digits(x);
117646 assert(__Pyx_PyLong_DigitCount(x) > 1);
117647 switch (__Pyx_PyLong_SignedDigitCount(x)) {
117648 case -2:
117649 if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
117650 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
117651 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117652 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
117653 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
117654 }
117655 }
117656 break;
117657 case 2:
117658 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
117659 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
117660 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117661 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
117662 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
117663 }
117664 }
117665 break;
117666 case -3:
117667 if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
117668 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
117669 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117670 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
117671 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
117672 }
117673 }
117674 break;
117675 case 3:
117676 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
117677 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
117678 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117679 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
117680 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
117681 }
117682 }
117683 break;
117684 case -4:
117685 if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
117686 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117687 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117688 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
117689 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
117690 }
117691 }
117692 break;
117693 case 4:
117694 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
117695 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
117696 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
117697 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
117698 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
117699 }
117700 }
117701 break;
117702 }
117703 }
117704 #endif
117705 if ((sizeof(long) <= sizeof(long))) {
117706 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
117707 #ifdef HAVE_LONG_LONG
117708 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
117709 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
117710 #endif
117711 }
117712 }
117713 {
117714 long val;
117715 int ret = -1;
117716 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
117717 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
117718 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
117719 if (unlikely(bytes_copied == -1)) {
117720 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
117721 goto raise_overflow;
117722 } else {
117723 ret = 0;
117724 }
117725 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
117726 int one = 1; int is_little = (int)*(unsigned char *)&one;
117727 unsigned char *bytes = (unsigned char *)&val;
117728 ret = _PyLong_AsByteArray((PyLongObject *)x,
117729 bytes, sizeof(val),
117730 is_little, !is_unsigned);
117731 #else
117732 PyObject *v;
117733 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
117734 int bits, remaining_bits, is_negative = 0;
117735 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
117736 if (likely(PyLong_CheckExact(x))) {
117737 v = __Pyx_NewRef(x);
117738 } else {
117739 v = PyNumber_Long(x);
117740 if (unlikely(!v)) return (long) -1;
117741 assert(PyLong_CheckExact(v));
117742 }
117743 {
117744 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
117745 if (unlikely(result < 0)) {
117746 Py_DECREF(v);
117747 return (long) -1;
117748 }
117749 is_negative = result == 1;
117750 }
117751 if (is_unsigned && unlikely(is_negative)) {
117752 Py_DECREF(v);
117753 goto raise_neg_overflow;
117754 } else if (is_negative) {
117755 stepval = PyNumber_Invert(v);
117756 Py_DECREF(v);
117757 if (unlikely(!stepval))
117758 return (long) -1;
117759 } else {
117760 stepval = v;
117761 }
117762 v = NULL;
117763 val = (long) 0;
117764 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
117765 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
117766 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
117767 PyObject *tmp, *digit;
117768 long idigit;
117769 digit = PyNumber_And(stepval, mask);
117770 if (unlikely(!digit)) goto done;
117771 idigit = PyLong_AsLong(digit);
117772 Py_DECREF(digit);
117773 if (unlikely(idigit < 0)) goto done;
117774 val |= ((long) idigit) << bits;
117775 tmp = PyNumber_Rshift(stepval, shift);
117776 if (unlikely(!tmp)) goto done;
117777 Py_DECREF(stepval); stepval = tmp;
117778 }
117779 Py_DECREF(shift); shift = NULL;
117780 Py_DECREF(mask); mask = NULL;
117781 {
117782 long idigit = PyLong_AsLong(stepval);
117783 if (unlikely(idigit < 0)) goto done;
117784 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
117785 if (unlikely(idigit >= (1L << remaining_bits)))
117786 goto raise_overflow;
117787 val |= ((long) idigit) << bits;
117788 }
117789 if (!is_unsigned) {
117790 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
117791 goto raise_overflow;
117792 if (is_negative)
117793 val = ~val;
117794 }
117795 ret = 0;
117796 done:
117797 Py_XDECREF(shift);
117798 Py_XDECREF(mask);
117799 Py_XDECREF(stepval);
117800 #endif
117801 if (unlikely(ret))
117802 return (long) -1;
117803 return val;
117804 }
117805 raise_overflow:
117806 PyErr_SetString(PyExc_OverflowError,
117807 "value too large to convert to long");
117808 return (long) -1;
117809 raise_neg_overflow:
117810 PyErr_SetString(PyExc_OverflowError,
117811 "can't convert negative value to long");
117812 return (long) -1;
117813 }
117814
117815 /* CIntToPy */
117816 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
117817 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117818 #pragma GCC diagnostic push
117819 #pragma GCC diagnostic ignored "-Wconversion"
117820 #endif
117821 const long neg_one = (long) -1, const_zero = (long) 0;
117822 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117823 #pragma GCC diagnostic pop
117824 #endif
117825 const int is_unsigned = neg_one > const_zero;
117826 if (is_unsigned) {
117827 if (sizeof(long) < sizeof(long)) {
117828 return PyInt_FromLong((long) value);
117829 } else if (sizeof(long) <= sizeof(unsigned long)) {
117830 return PyLong_FromUnsignedLong((unsigned long) value);
117831 #ifdef HAVE_LONG_LONG
117832 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
117833 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
117834 #endif
117835 }
117836 } else {
117837 if (sizeof(long) <= sizeof(long)) {
117838 return PyInt_FromLong((long) value);
117839 #ifdef HAVE_LONG_LONG
117840 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
117841 return PyLong_FromLongLong((PY_LONG_LONG) value);
117842 #endif
117843 }
117844 }
117845 {
117846 unsigned char *bytes = (unsigned char *)&value;
117847 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
117848 if (is_unsigned) {
117849 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
117850 } else {
117851 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
117852 }
117853 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
117854 int one = 1; int little = (int)*(unsigned char *)&one;
117855 return _PyLong_FromByteArray(bytes, sizeof(long),
117856 little, !is_unsigned);
117857 #else
117858 int one = 1; int little = (int)*(unsigned char *)&one;
117859 PyObject *from_bytes, *result = NULL;
117860 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
117861 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
117862 if (!from_bytes) return NULL;
117863 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
117864 if (!py_bytes) goto limited_bad;
117865 order_str = PyUnicode_FromString(little ? "little" : "big");
117866 if (!order_str) goto limited_bad;
117867 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
117868 if (!arg_tuple) goto limited_bad;
117869 if (!is_unsigned) {
117870 kwds = PyDict_New();
117871 if (!kwds) goto limited_bad;
117872 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
117873 }
117874 result = PyObject_Call(from_bytes, arg_tuple, kwds);
117875 limited_bad:
117876 Py_XDECREF(kwds);
117877 Py_XDECREF(arg_tuple);
117878 Py_XDECREF(order_str);
117879 Py_XDECREF(py_bytes);
117880 Py_XDECREF(from_bytes);
117881 return result;
117882 #endif
117883 }
117884 }
117885
117886 /* CIntToPy */
117887 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int8_t(int8_t value) {
117888 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117889 #pragma GCC diagnostic push
117890 #pragma GCC diagnostic ignored "-Wconversion"
117891 #endif
117892 const int8_t neg_one = (int8_t) -1, const_zero = (int8_t) 0;
117893 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117894 #pragma GCC diagnostic pop
117895 #endif
117896 const int is_unsigned = neg_one > const_zero;
117897 if (is_unsigned) {
117898 if (sizeof(int8_t) < sizeof(long)) {
117899 return PyInt_FromLong((long) value);
117900 } else if (sizeof(int8_t) <= sizeof(unsigned long)) {
117901 return PyLong_FromUnsignedLong((unsigned long) value);
117902 #ifdef HAVE_LONG_LONG
117903 } else if (sizeof(int8_t) <= sizeof(unsigned PY_LONG_LONG)) {
117904 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
117905 #endif
117906 }
117907 } else {
117908 if (sizeof(int8_t) <= sizeof(long)) {
117909 return PyInt_FromLong((long) value);
117910 #ifdef HAVE_LONG_LONG
117911 } else if (sizeof(int8_t) <= sizeof(PY_LONG_LONG)) {
117912 return PyLong_FromLongLong((PY_LONG_LONG) value);
117913 #endif
117914 }
117915 }
117916 {
117917 unsigned char *bytes = (unsigned char *)&value;
117918 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
117919 if (is_unsigned) {
117920 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
117921 } else {
117922 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
117923 }
117924 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
117925 int one = 1; int little = (int)*(unsigned char *)&one;
117926 return _PyLong_FromByteArray(bytes, sizeof(int8_t),
117927 little, !is_unsigned);
117928 #else
117929 int one = 1; int little = (int)*(unsigned char *)&one;
117930 PyObject *from_bytes, *result = NULL;
117931 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
117932 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
117933 if (!from_bytes) return NULL;
117934 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int8_t));
117935 if (!py_bytes) goto limited_bad;
117936 order_str = PyUnicode_FromString(little ? "little" : "big");
117937 if (!order_str) goto limited_bad;
117938 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
117939 if (!arg_tuple) goto limited_bad;
117940 if (!is_unsigned) {
117941 kwds = PyDict_New();
117942 if (!kwds) goto limited_bad;
117943 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
117944 }
117945 result = PyObject_Call(from_bytes, arg_tuple, kwds);
117946 limited_bad:
117947 Py_XDECREF(kwds);
117948 Py_XDECREF(arg_tuple);
117949 Py_XDECREF(order_str);
117950 Py_XDECREF(py_bytes);
117951 Py_XDECREF(from_bytes);
117952 return result;
117953 #endif
117954 }
117955 }
117956
117957 /* CIntToPy */
117958 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value) {
117959 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117960 #pragma GCC diagnostic push
117961 #pragma GCC diagnostic ignored "-Wconversion"
117962 #endif
117963 const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
117964 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
117965 #pragma GCC diagnostic pop
117966 #endif
117967 const int is_unsigned = neg_one > const_zero;
117968 if (is_unsigned) {
117969 if (sizeof(int16_t) < sizeof(long)) {
117970 return PyInt_FromLong((long) value);
117971 } else if (sizeof(int16_t) <= sizeof(unsigned long)) {
117972 return PyLong_FromUnsignedLong((unsigned long) value);
117973 #ifdef HAVE_LONG_LONG
117974 } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) {
117975 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
117976 #endif
117977 }
117978 } else {
117979 if (sizeof(int16_t) <= sizeof(long)) {
117980 return PyInt_FromLong((long) value);
117981 #ifdef HAVE_LONG_LONG
117982 } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
117983 return PyLong_FromLongLong((PY_LONG_LONG) value);
117984 #endif
117985 }
117986 }
117987 {
117988 unsigned char *bytes = (unsigned char *)&value;
117989 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
117990 if (is_unsigned) {
117991 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
117992 } else {
117993 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
117994 }
117995 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
117996 int one = 1; int little = (int)*(unsigned char *)&one;
117997 return _PyLong_FromByteArray(bytes, sizeof(int16_t),
117998 little, !is_unsigned);
117999 #else
118000 int one = 1; int little = (int)*(unsigned char *)&one;
118001 PyObject *from_bytes, *result = NULL;
118002 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
118003 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
118004 if (!from_bytes) return NULL;
118005 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int16_t));
118006 if (!py_bytes) goto limited_bad;
118007 order_str = PyUnicode_FromString(little ? "little" : "big");
118008 if (!order_str) goto limited_bad;
118009 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
118010 if (!arg_tuple) goto limited_bad;
118011 if (!is_unsigned) {
118012 kwds = PyDict_New();
118013 if (!kwds) goto limited_bad;
118014 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
118015 }
118016 result = PyObject_Call(from_bytes, arg_tuple, kwds);
118017 limited_bad:
118018 Py_XDECREF(kwds);
118019 Py_XDECREF(arg_tuple);
118020 Py_XDECREF(order_str);
118021 Py_XDECREF(py_bytes);
118022 Py_XDECREF(from_bytes);
118023 return result;
118024 #endif
118025 }
118026 }
118027
118028 /* CIntFromPy */
118029 static CYTHON_INLINE int8_t __Pyx_PyInt_As_int8_t(PyObject *x) {
118030 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118031 #pragma GCC diagnostic push
118032 #pragma GCC diagnostic ignored "-Wconversion"
118033 #endif
118034 const int8_t neg_one = (int8_t) -1, const_zero = (int8_t) 0;
118035 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118036 #pragma GCC diagnostic pop
118037 #endif
118038 const int is_unsigned = neg_one > const_zero;
118039 #if PY_MAJOR_VERSION < 3
118040 if (likely(PyInt_Check(x))) {
118041 if ((sizeof(int8_t) < sizeof(long))) {
118042 __PYX_VERIFY_RETURN_INT(int8_t, long, PyInt_AS_LONG(x))
118043 } else {
118044 long val = PyInt_AS_LONG(x);
118045 if (is_unsigned && unlikely(val < 0)) {
118046 goto raise_neg_overflow;
118047 }
118048 return (int8_t) val;
118049 }
118050 }
118051 #endif
118052 if (unlikely(!PyLong_Check(x))) {
118053 int8_t val;
118054 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
118055 if (!tmp) return (int8_t) -1;
118056 val = __Pyx_PyInt_As_int8_t(tmp);
118057 Py_DECREF(tmp);
118058 return val;
118059 }
118060 if (is_unsigned) {
118061 #if CYTHON_USE_PYLONG_INTERNALS
118062 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
118063 goto raise_neg_overflow;
118064 } else if (__Pyx_PyLong_IsCompact(x)) {
118065 __PYX_VERIFY_RETURN_INT(int8_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
118066 } else {
118067 const digit* digits = __Pyx_PyLong_Digits(x);
118068 assert(__Pyx_PyLong_DigitCount(x) > 1);
118069 switch (__Pyx_PyLong_DigitCount(x)) {
118070 case 2:
118071 if ((8 * sizeof(int8_t) > 1 * PyLong_SHIFT)) {
118072 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118073 __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118074 } else if ((8 * sizeof(int8_t) >= 2 * PyLong_SHIFT)) {
118075 return (int8_t) (((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0]));
118076 }
118077 }
118078 break;
118079 case 3:
118080 if ((8 * sizeof(int8_t) > 2 * PyLong_SHIFT)) {
118081 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118082 __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118083 } else if ((8 * sizeof(int8_t) >= 3 * PyLong_SHIFT)) {
118084 return (int8_t) (((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0]));
118085 }
118086 }
118087 break;
118088 case 4:
118089 if ((8 * sizeof(int8_t) > 3 * PyLong_SHIFT)) {
118090 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118091 __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118092 } else if ((8 * sizeof(int8_t) >= 4 * PyLong_SHIFT)) {
118093 return (int8_t) (((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0]));
118094 }
118095 }
118096 break;
118097 }
118098 }
118099 #endif
118100 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
118101 if (unlikely(Py_SIZE(x) < 0)) {
118102 goto raise_neg_overflow;
118103 }
118104 #else
118105 {
118106 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
118107 if (unlikely(result < 0))
118108 return (int8_t) -1;
118109 if (unlikely(result == 1))
118110 goto raise_neg_overflow;
118111 }
118112 #endif
118113 if ((sizeof(int8_t) <= sizeof(unsigned long))) {
118114 __PYX_VERIFY_RETURN_INT_EXC(int8_t, unsigned long, PyLong_AsUnsignedLong(x))
118115 #ifdef HAVE_LONG_LONG
118116 } else if ((sizeof(int8_t) <= sizeof(unsigned PY_LONG_LONG))) {
118117 __PYX_VERIFY_RETURN_INT_EXC(int8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
118118 #endif
118119 }
118120 } else {
118121 #if CYTHON_USE_PYLONG_INTERNALS
118122 if (__Pyx_PyLong_IsCompact(x)) {
118123 __PYX_VERIFY_RETURN_INT(int8_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
118124 } else {
118125 const digit* digits = __Pyx_PyLong_Digits(x);
118126 assert(__Pyx_PyLong_DigitCount(x) > 1);
118127 switch (__Pyx_PyLong_SignedDigitCount(x)) {
118128 case -2:
118129 if ((8 * sizeof(int8_t) - 1 > 1 * PyLong_SHIFT)) {
118130 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118131 __PYX_VERIFY_RETURN_INT(int8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118132 } else if ((8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT)) {
118133 return (int8_t) (((int8_t)-1)*(((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
118134 }
118135 }
118136 break;
118137 case 2:
118138 if ((8 * sizeof(int8_t) > 1 * PyLong_SHIFT)) {
118139 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118140 __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118141 } else if ((8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT)) {
118142 return (int8_t) ((((((int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
118143 }
118144 }
118145 break;
118146 case -3:
118147 if ((8 * sizeof(int8_t) - 1 > 2 * PyLong_SHIFT)) {
118148 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118149 __PYX_VERIFY_RETURN_INT(int8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118150 } else if ((8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT)) {
118151 return (int8_t) (((int8_t)-1)*(((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
118152 }
118153 }
118154 break;
118155 case 3:
118156 if ((8 * sizeof(int8_t) > 2 * PyLong_SHIFT)) {
118157 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118158 __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118159 } else if ((8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT)) {
118160 return (int8_t) ((((((((int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
118161 }
118162 }
118163 break;
118164 case -4:
118165 if ((8 * sizeof(int8_t) - 1 > 3 * PyLong_SHIFT)) {
118166 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118167 __PYX_VERIFY_RETURN_INT(int8_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118168 } else if ((8 * sizeof(int8_t) - 1 > 4 * PyLong_SHIFT)) {
118169 return (int8_t) (((int8_t)-1)*(((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
118170 }
118171 }
118172 break;
118173 case 4:
118174 if ((8 * sizeof(int8_t) > 3 * PyLong_SHIFT)) {
118175 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118176 __PYX_VERIFY_RETURN_INT(int8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118177 } else if ((8 * sizeof(int8_t) - 1 > 4 * PyLong_SHIFT)) {
118178 return (int8_t) ((((((((((int8_t)digits[3]) << PyLong_SHIFT) | (int8_t)digits[2]) << PyLong_SHIFT) | (int8_t)digits[1]) << PyLong_SHIFT) | (int8_t)digits[0])));
118179 }
118180 }
118181 break;
118182 }
118183 }
118184 #endif
118185 if ((sizeof(int8_t) <= sizeof(long))) {
118186 __PYX_VERIFY_RETURN_INT_EXC(int8_t, long, PyLong_AsLong(x))
118187 #ifdef HAVE_LONG_LONG
118188 } else if ((sizeof(int8_t) <= sizeof(PY_LONG_LONG))) {
118189 __PYX_VERIFY_RETURN_INT_EXC(int8_t, PY_LONG_LONG, PyLong_AsLongLong(x))
118190 #endif
118191 }
118192 }
118193 {
118194 int8_t val;
118195 int ret = -1;
118196 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
118197 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
118198 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
118199 if (unlikely(bytes_copied == -1)) {
118200 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
118201 goto raise_overflow;
118202 } else {
118203 ret = 0;
118204 }
118205 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
118206 int one = 1; int is_little = (int)*(unsigned char *)&one;
118207 unsigned char *bytes = (unsigned char *)&val;
118208 ret = _PyLong_AsByteArray((PyLongObject *)x,
118209 bytes, sizeof(val),
118210 is_little, !is_unsigned);
118211 #else
118212 PyObject *v;
118213 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
118214 int bits, remaining_bits, is_negative = 0;
118215 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
118216 if (likely(PyLong_CheckExact(x))) {
118217 v = __Pyx_NewRef(x);
118218 } else {
118219 v = PyNumber_Long(x);
118220 if (unlikely(!v)) return (int8_t) -1;
118221 assert(PyLong_CheckExact(v));
118222 }
118223 {
118224 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
118225 if (unlikely(result < 0)) {
118226 Py_DECREF(v);
118227 return (int8_t) -1;
118228 }
118229 is_negative = result == 1;
118230 }
118231 if (is_unsigned && unlikely(is_negative)) {
118232 Py_DECREF(v);
118233 goto raise_neg_overflow;
118234 } else if (is_negative) {
118235 stepval = PyNumber_Invert(v);
118236 Py_DECREF(v);
118237 if (unlikely(!stepval))
118238 return (int8_t) -1;
118239 } else {
118240 stepval = v;
118241 }
118242 v = NULL;
118243 val = (int8_t) 0;
118244 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
118245 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
118246 for (bits = 0; bits < (int) sizeof(int8_t) * 8 - chunk_size; bits += chunk_size) {
118247 PyObject *tmp, *digit;
118248 long idigit;
118249 digit = PyNumber_And(stepval, mask);
118250 if (unlikely(!digit)) goto done;
118251 idigit = PyLong_AsLong(digit);
118252 Py_DECREF(digit);
118253 if (unlikely(idigit < 0)) goto done;
118254 val |= ((int8_t) idigit) << bits;
118255 tmp = PyNumber_Rshift(stepval, shift);
118256 if (unlikely(!tmp)) goto done;
118257 Py_DECREF(stepval); stepval = tmp;
118258 }
118259 Py_DECREF(shift); shift = NULL;
118260 Py_DECREF(mask); mask = NULL;
118261 {
118262 long idigit = PyLong_AsLong(stepval);
118263 if (unlikely(idigit < 0)) goto done;
118264 remaining_bits = ((int) sizeof(int8_t) * 8) - bits - (is_unsigned ? 0 : 1);
118265 if (unlikely(idigit >= (1L << remaining_bits)))
118266 goto raise_overflow;
118267 val |= ((int8_t) idigit) << bits;
118268 }
118269 if (!is_unsigned) {
118270 if (unlikely(val & (((int8_t) 1) << (sizeof(int8_t) * 8 - 1))))
118271 goto raise_overflow;
118272 if (is_negative)
118273 val = ~val;
118274 }
118275 ret = 0;
118276 done:
118277 Py_XDECREF(shift);
118278 Py_XDECREF(mask);
118279 Py_XDECREF(stepval);
118280 #endif
118281 if (unlikely(ret))
118282 return (int8_t) -1;
118283 return val;
118284 }
118285 raise_overflow:
118286 PyErr_SetString(PyExc_OverflowError,
118287 "value too large to convert to int8_t");
118288 return (int8_t) -1;
118289 raise_neg_overflow:
118290 PyErr_SetString(PyExc_OverflowError,
118291 "can't convert negative value to int8_t");
118292 return (int8_t) -1;
118293 }
118294
118295 /* CIntFromPy */
118296 static CYTHON_INLINE int16_t __Pyx_PyInt_As_int16_t(PyObject *x) {
118297 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118298 #pragma GCC diagnostic push
118299 #pragma GCC diagnostic ignored "-Wconversion"
118300 #endif
118301 const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
118302 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118303 #pragma GCC diagnostic pop
118304 #endif
118305 const int is_unsigned = neg_one > const_zero;
118306 #if PY_MAJOR_VERSION < 3
118307 if (likely(PyInt_Check(x))) {
118308 if ((sizeof(int16_t) < sizeof(long))) {
118309 __PYX_VERIFY_RETURN_INT(int16_t, long, PyInt_AS_LONG(x))
118310 } else {
118311 long val = PyInt_AS_LONG(x);
118312 if (is_unsigned && unlikely(val < 0)) {
118313 goto raise_neg_overflow;
118314 }
118315 return (int16_t) val;
118316 }
118317 }
118318 #endif
118319 if (unlikely(!PyLong_Check(x))) {
118320 int16_t val;
118321 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
118322 if (!tmp) return (int16_t) -1;
118323 val = __Pyx_PyInt_As_int16_t(tmp);
118324 Py_DECREF(tmp);
118325 return val;
118326 }
118327 if (is_unsigned) {
118328 #if CYTHON_USE_PYLONG_INTERNALS
118329 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
118330 goto raise_neg_overflow;
118331 } else if (__Pyx_PyLong_IsCompact(x)) {
118332 __PYX_VERIFY_RETURN_INT(int16_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
118333 } else {
118334 const digit* digits = __Pyx_PyLong_Digits(x);
118335 assert(__Pyx_PyLong_DigitCount(x) > 1);
118336 switch (__Pyx_PyLong_DigitCount(x)) {
118337 case 2:
118338 if ((8 * sizeof(int16_t) > 1 * PyLong_SHIFT)) {
118339 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118340 __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118341 } else if ((8 * sizeof(int16_t) >= 2 * PyLong_SHIFT)) {
118342 return (int16_t) (((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]));
118343 }
118344 }
118345 break;
118346 case 3:
118347 if ((8 * sizeof(int16_t) > 2 * PyLong_SHIFT)) {
118348 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118349 __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118350 } else if ((8 * sizeof(int16_t) >= 3 * PyLong_SHIFT)) {
118351 return (int16_t) (((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]));
118352 }
118353 }
118354 break;
118355 case 4:
118356 if ((8 * sizeof(int16_t) > 3 * PyLong_SHIFT)) {
118357 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118358 __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118359 } else if ((8 * sizeof(int16_t) >= 4 * PyLong_SHIFT)) {
118360 return (int16_t) (((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]));
118361 }
118362 }
118363 break;
118364 }
118365 }
118366 #endif
118367 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
118368 if (unlikely(Py_SIZE(x) < 0)) {
118369 goto raise_neg_overflow;
118370 }
118371 #else
118372 {
118373 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
118374 if (unlikely(result < 0))
118375 return (int16_t) -1;
118376 if (unlikely(result == 1))
118377 goto raise_neg_overflow;
118378 }
118379 #endif
118380 if ((sizeof(int16_t) <= sizeof(unsigned long))) {
118381 __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned long, PyLong_AsUnsignedLong(x))
118382 #ifdef HAVE_LONG_LONG
118383 } else if ((sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG))) {
118384 __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
118385 #endif
118386 }
118387 } else {
118388 #if CYTHON_USE_PYLONG_INTERNALS
118389 if (__Pyx_PyLong_IsCompact(x)) {
118390 __PYX_VERIFY_RETURN_INT(int16_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
118391 } else {
118392 const digit* digits = __Pyx_PyLong_Digits(x);
118393 assert(__Pyx_PyLong_DigitCount(x) > 1);
118394 switch (__Pyx_PyLong_SignedDigitCount(x)) {
118395 case -2:
118396 if ((8 * sizeof(int16_t) - 1 > 1 * PyLong_SHIFT)) {
118397 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118398 __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118399 } else if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) {
118400 return (int16_t) (((int16_t)-1)*(((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
118401 }
118402 }
118403 break;
118404 case 2:
118405 if ((8 * sizeof(int16_t) > 1 * PyLong_SHIFT)) {
118406 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118407 __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118408 } else if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) {
118409 return (int16_t) ((((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
118410 }
118411 }
118412 break;
118413 case -3:
118414 if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) {
118415 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118416 __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118417 } else if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) {
118418 return (int16_t) (((int16_t)-1)*(((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
118419 }
118420 }
118421 break;
118422 case 3:
118423 if ((8 * sizeof(int16_t) > 2 * PyLong_SHIFT)) {
118424 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118425 __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118426 } else if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) {
118427 return (int16_t) ((((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
118428 }
118429 }
118430 break;
118431 case -4:
118432 if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) {
118433 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118434 __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118435 } else if ((8 * sizeof(int16_t) - 1 > 4 * PyLong_SHIFT)) {
118436 return (int16_t) (((int16_t)-1)*(((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
118437 }
118438 }
118439 break;
118440 case 4:
118441 if ((8 * sizeof(int16_t) > 3 * PyLong_SHIFT)) {
118442 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118443 __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118444 } else if ((8 * sizeof(int16_t) - 1 > 4 * PyLong_SHIFT)) {
118445 return (int16_t) ((((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
118446 }
118447 }
118448 break;
118449 }
118450 }
118451 #endif
118452 if ((sizeof(int16_t) <= sizeof(long))) {
118453 __PYX_VERIFY_RETURN_INT_EXC(int16_t, long, PyLong_AsLong(x))
118454 #ifdef HAVE_LONG_LONG
118455 } else if ((sizeof(int16_t) <= sizeof(PY_LONG_LONG))) {
118456 __PYX_VERIFY_RETURN_INT_EXC(int16_t, PY_LONG_LONG, PyLong_AsLongLong(x))
118457 #endif
118458 }
118459 }
118460 {
118461 int16_t val;
118462 int ret = -1;
118463 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
118464 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
118465 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
118466 if (unlikely(bytes_copied == -1)) {
118467 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
118468 goto raise_overflow;
118469 } else {
118470 ret = 0;
118471 }
118472 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
118473 int one = 1; int is_little = (int)*(unsigned char *)&one;
118474 unsigned char *bytes = (unsigned char *)&val;
118475 ret = _PyLong_AsByteArray((PyLongObject *)x,
118476 bytes, sizeof(val),
118477 is_little, !is_unsigned);
118478 #else
118479 PyObject *v;
118480 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
118481 int bits, remaining_bits, is_negative = 0;
118482 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
118483 if (likely(PyLong_CheckExact(x))) {
118484 v = __Pyx_NewRef(x);
118485 } else {
118486 v = PyNumber_Long(x);
118487 if (unlikely(!v)) return (int16_t) -1;
118488 assert(PyLong_CheckExact(v));
118489 }
118490 {
118491 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
118492 if (unlikely(result < 0)) {
118493 Py_DECREF(v);
118494 return (int16_t) -1;
118495 }
118496 is_negative = result == 1;
118497 }
118498 if (is_unsigned && unlikely(is_negative)) {
118499 Py_DECREF(v);
118500 goto raise_neg_overflow;
118501 } else if (is_negative) {
118502 stepval = PyNumber_Invert(v);
118503 Py_DECREF(v);
118504 if (unlikely(!stepval))
118505 return (int16_t) -1;
118506 } else {
118507 stepval = v;
118508 }
118509 v = NULL;
118510 val = (int16_t) 0;
118511 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
118512 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
118513 for (bits = 0; bits < (int) sizeof(int16_t) * 8 - chunk_size; bits += chunk_size) {
118514 PyObject *tmp, *digit;
118515 long idigit;
118516 digit = PyNumber_And(stepval, mask);
118517 if (unlikely(!digit)) goto done;
118518 idigit = PyLong_AsLong(digit);
118519 Py_DECREF(digit);
118520 if (unlikely(idigit < 0)) goto done;
118521 val |= ((int16_t) idigit) << bits;
118522 tmp = PyNumber_Rshift(stepval, shift);
118523 if (unlikely(!tmp)) goto done;
118524 Py_DECREF(stepval); stepval = tmp;
118525 }
118526 Py_DECREF(shift); shift = NULL;
118527 Py_DECREF(mask); mask = NULL;
118528 {
118529 long idigit = PyLong_AsLong(stepval);
118530 if (unlikely(idigit < 0)) goto done;
118531 remaining_bits = ((int) sizeof(int16_t) * 8) - bits - (is_unsigned ? 0 : 1);
118532 if (unlikely(idigit >= (1L << remaining_bits)))
118533 goto raise_overflow;
118534 val |= ((int16_t) idigit) << bits;
118535 }
118536 if (!is_unsigned) {
118537 if (unlikely(val & (((int16_t) 1) << (sizeof(int16_t) * 8 - 1))))
118538 goto raise_overflow;
118539 if (is_negative)
118540 val = ~val;
118541 }
118542 ret = 0;
118543 done:
118544 Py_XDECREF(shift);
118545 Py_XDECREF(mask);
118546 Py_XDECREF(stepval);
118547 #endif
118548 if (unlikely(ret))
118549 return (int16_t) -1;
118550 return val;
118551 }
118552 raise_overflow:
118553 PyErr_SetString(PyExc_OverflowError,
118554 "value too large to convert to int16_t");
118555 return (int16_t) -1;
118556 raise_neg_overflow:
118557 PyErr_SetString(PyExc_OverflowError,
118558 "can't convert negative value to int16_t");
118559 return (int16_t) -1;
118560 }
118561
118562 /* CIntToPy */
118563 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
118564 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118565 #pragma GCC diagnostic push
118566 #pragma GCC diagnostic ignored "-Wconversion"
118567 #endif
118568 const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
118569 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118570 #pragma GCC diagnostic pop
118571 #endif
118572 const int is_unsigned = neg_one > const_zero;
118573 if (is_unsigned) {
118574 if (sizeof(uint32_t) < sizeof(long)) {
118575 return PyInt_FromLong((long) value);
118576 } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
118577 return PyLong_FromUnsignedLong((unsigned long) value);
118578 #ifdef HAVE_LONG_LONG
118579 } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
118580 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
118581 #endif
118582 }
118583 } else {
118584 if (sizeof(uint32_t) <= sizeof(long)) {
118585 return PyInt_FromLong((long) value);
118586 #ifdef HAVE_LONG_LONG
118587 } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
118588 return PyLong_FromLongLong((PY_LONG_LONG) value);
118589 #endif
118590 }
118591 }
118592 {
118593 unsigned char *bytes = (unsigned char *)&value;
118594 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
118595 if (is_unsigned) {
118596 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
118597 } else {
118598 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
118599 }
118600 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
118601 int one = 1; int little = (int)*(unsigned char *)&one;
118602 return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
118603 little, !is_unsigned);
118604 #else
118605 int one = 1; int little = (int)*(unsigned char *)&one;
118606 PyObject *from_bytes, *result = NULL;
118607 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
118608 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
118609 if (!from_bytes) return NULL;
118610 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint32_t));
118611 if (!py_bytes) goto limited_bad;
118612 order_str = PyUnicode_FromString(little ? "little" : "big");
118613 if (!order_str) goto limited_bad;
118614 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
118615 if (!arg_tuple) goto limited_bad;
118616 if (!is_unsigned) {
118617 kwds = PyDict_New();
118618 if (!kwds) goto limited_bad;
118619 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
118620 }
118621 result = PyObject_Call(from_bytes, arg_tuple, kwds);
118622 limited_bad:
118623 Py_XDECREF(kwds);
118624 Py_XDECREF(arg_tuple);
118625 Py_XDECREF(order_str);
118626 Py_XDECREF(py_bytes);
118627 Py_XDECREF(from_bytes);
118628 return result;
118629 #endif
118630 }
118631 }
118632
118633 /* CIntFromPy */
118634 static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
118635 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118636 #pragma GCC diagnostic push
118637 #pragma GCC diagnostic ignored "-Wconversion"
118638 #endif
118639 const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
118640 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118641 #pragma GCC diagnostic pop
118642 #endif
118643 const int is_unsigned = neg_one > const_zero;
118644 #if PY_MAJOR_VERSION < 3
118645 if (likely(PyInt_Check(x))) {
118646 if ((sizeof(uint32_t) < sizeof(long))) {
118647 __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x))
118648 } else {
118649 long val = PyInt_AS_LONG(x);
118650 if (is_unsigned && unlikely(val < 0)) {
118651 goto raise_neg_overflow;
118652 }
118653 return (uint32_t) val;
118654 }
118655 }
118656 #endif
118657 if (unlikely(!PyLong_Check(x))) {
118658 uint32_t val;
118659 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
118660 if (!tmp) return (uint32_t) -1;
118661 val = __Pyx_PyInt_As_uint32_t(tmp);
118662 Py_DECREF(tmp);
118663 return val;
118664 }
118665 if (is_unsigned) {
118666 #if CYTHON_USE_PYLONG_INTERNALS
118667 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
118668 goto raise_neg_overflow;
118669 } else if (__Pyx_PyLong_IsCompact(x)) {
118670 __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
118671 } else {
118672 const digit* digits = __Pyx_PyLong_Digits(x);
118673 assert(__Pyx_PyLong_DigitCount(x) > 1);
118674 switch (__Pyx_PyLong_DigitCount(x)) {
118675 case 2:
118676 if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) {
118677 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118678 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118679 } else if ((8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT)) {
118680 return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
118681 }
118682 }
118683 break;
118684 case 3:
118685 if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) {
118686 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118687 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118688 } else if ((8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT)) {
118689 return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
118690 }
118691 }
118692 break;
118693 case 4:
118694 if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) {
118695 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118696 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118697 } else if ((8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT)) {
118698 return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
118699 }
118700 }
118701 break;
118702 }
118703 }
118704 #endif
118705 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
118706 if (unlikely(Py_SIZE(x) < 0)) {
118707 goto raise_neg_overflow;
118708 }
118709 #else
118710 {
118711 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
118712 if (unlikely(result < 0))
118713 return (uint32_t) -1;
118714 if (unlikely(result == 1))
118715 goto raise_neg_overflow;
118716 }
118717 #endif
118718 if ((sizeof(uint32_t) <= sizeof(unsigned long))) {
118719 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
118720 #ifdef HAVE_LONG_LONG
118721 } else if ((sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG))) {
118722 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
118723 #endif
118724 }
118725 } else {
118726 #if CYTHON_USE_PYLONG_INTERNALS
118727 if (__Pyx_PyLong_IsCompact(x)) {
118728 __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
118729 } else {
118730 const digit* digits = __Pyx_PyLong_Digits(x);
118731 assert(__Pyx_PyLong_DigitCount(x) > 1);
118732 switch (__Pyx_PyLong_SignedDigitCount(x)) {
118733 case -2:
118734 if ((8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT)) {
118735 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118736 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118737 } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
118738 return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
118739 }
118740 }
118741 break;
118742 case 2:
118743 if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) {
118744 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
118745 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118746 } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
118747 return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
118748 }
118749 }
118750 break;
118751 case -3:
118752 if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) {
118753 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118754 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118755 } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
118756 return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
118757 }
118758 }
118759 break;
118760 case 3:
118761 if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) {
118762 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
118763 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118764 } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
118765 return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
118766 }
118767 }
118768 break;
118769 case -4:
118770 if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) {
118771 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118772 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118773 } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) {
118774 return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
118775 }
118776 }
118777 break;
118778 case 4:
118779 if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) {
118780 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
118781 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
118782 } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) {
118783 return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
118784 }
118785 }
118786 break;
118787 }
118788 }
118789 #endif
118790 if ((sizeof(uint32_t) <= sizeof(long))) {
118791 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
118792 #ifdef HAVE_LONG_LONG
118793 } else if ((sizeof(uint32_t) <= sizeof(PY_LONG_LONG))) {
118794 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
118795 #endif
118796 }
118797 }
118798 {
118799 uint32_t val;
118800 int ret = -1;
118801 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
118802 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
118803 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
118804 if (unlikely(bytes_copied == -1)) {
118805 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
118806 goto raise_overflow;
118807 } else {
118808 ret = 0;
118809 }
118810 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
118811 int one = 1; int is_little = (int)*(unsigned char *)&one;
118812 unsigned char *bytes = (unsigned char *)&val;
118813 ret = _PyLong_AsByteArray((PyLongObject *)x,
118814 bytes, sizeof(val),
118815 is_little, !is_unsigned);
118816 #else
118817 PyObject *v;
118818 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
118819 int bits, remaining_bits, is_negative = 0;
118820 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
118821 if (likely(PyLong_CheckExact(x))) {
118822 v = __Pyx_NewRef(x);
118823 } else {
118824 v = PyNumber_Long(x);
118825 if (unlikely(!v)) return (uint32_t) -1;
118826 assert(PyLong_CheckExact(v));
118827 }
118828 {
118829 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
118830 if (unlikely(result < 0)) {
118831 Py_DECREF(v);
118832 return (uint32_t) -1;
118833 }
118834 is_negative = result == 1;
118835 }
118836 if (is_unsigned && unlikely(is_negative)) {
118837 Py_DECREF(v);
118838 goto raise_neg_overflow;
118839 } else if (is_negative) {
118840 stepval = PyNumber_Invert(v);
118841 Py_DECREF(v);
118842 if (unlikely(!stepval))
118843 return (uint32_t) -1;
118844 } else {
118845 stepval = v;
118846 }
118847 v = NULL;
118848 val = (uint32_t) 0;
118849 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
118850 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
118851 for (bits = 0; bits < (int) sizeof(uint32_t) * 8 - chunk_size; bits += chunk_size) {
118852 PyObject *tmp, *digit;
118853 long idigit;
118854 digit = PyNumber_And(stepval, mask);
118855 if (unlikely(!digit)) goto done;
118856 idigit = PyLong_AsLong(digit);
118857 Py_DECREF(digit);
118858 if (unlikely(idigit < 0)) goto done;
118859 val |= ((uint32_t) idigit) << bits;
118860 tmp = PyNumber_Rshift(stepval, shift);
118861 if (unlikely(!tmp)) goto done;
118862 Py_DECREF(stepval); stepval = tmp;
118863 }
118864 Py_DECREF(shift); shift = NULL;
118865 Py_DECREF(mask); mask = NULL;
118866 {
118867 long idigit = PyLong_AsLong(stepval);
118868 if (unlikely(idigit < 0)) goto done;
118869 remaining_bits = ((int) sizeof(uint32_t) * 8) - bits - (is_unsigned ? 0 : 1);
118870 if (unlikely(idigit >= (1L << remaining_bits)))
118871 goto raise_overflow;
118872 val |= ((uint32_t) idigit) << bits;
118873 }
118874 if (!is_unsigned) {
118875 if (unlikely(val & (((uint32_t) 1) << (sizeof(uint32_t) * 8 - 1))))
118876 goto raise_overflow;
118877 if (is_negative)
118878 val = ~val;
118879 }
118880 ret = 0;
118881 done:
118882 Py_XDECREF(shift);
118883 Py_XDECREF(mask);
118884 Py_XDECREF(stepval);
118885 #endif
118886 if (unlikely(ret))
118887 return (uint32_t) -1;
118888 return val;
118889 }
118890 raise_overflow:
118891 PyErr_SetString(PyExc_OverflowError,
118892 "value too large to convert to uint32_t");
118893 return (uint32_t) -1;
118894 raise_neg_overflow:
118895 PyErr_SetString(PyExc_OverflowError,
118896 "can't convert negative value to uint32_t");
118897 return (uint32_t) -1;
118898 }
118899
118900 /* CIntToPy */
118901 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint8_t(uint8_t value) {
118902 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118903 #pragma GCC diagnostic push
118904 #pragma GCC diagnostic ignored "-Wconversion"
118905 #endif
118906 const uint8_t neg_one = (uint8_t) -1, const_zero = (uint8_t) 0;
118907 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118908 #pragma GCC diagnostic pop
118909 #endif
118910 const int is_unsigned = neg_one > const_zero;
118911 if (is_unsigned) {
118912 if (sizeof(uint8_t) < sizeof(long)) {
118913 return PyInt_FromLong((long) value);
118914 } else if (sizeof(uint8_t) <= sizeof(unsigned long)) {
118915 return PyLong_FromUnsignedLong((unsigned long) value);
118916 #ifdef HAVE_LONG_LONG
118917 } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG)) {
118918 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
118919 #endif
118920 }
118921 } else {
118922 if (sizeof(uint8_t) <= sizeof(long)) {
118923 return PyInt_FromLong((long) value);
118924 #ifdef HAVE_LONG_LONG
118925 } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONG)) {
118926 return PyLong_FromLongLong((PY_LONG_LONG) value);
118927 #endif
118928 }
118929 }
118930 {
118931 unsigned char *bytes = (unsigned char *)&value;
118932 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
118933 if (is_unsigned) {
118934 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
118935 } else {
118936 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
118937 }
118938 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
118939 int one = 1; int little = (int)*(unsigned char *)&one;
118940 return _PyLong_FromByteArray(bytes, sizeof(uint8_t),
118941 little, !is_unsigned);
118942 #else
118943 int one = 1; int little = (int)*(unsigned char *)&one;
118944 PyObject *from_bytes, *result = NULL;
118945 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
118946 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
118947 if (!from_bytes) return NULL;
118948 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint8_t));
118949 if (!py_bytes) goto limited_bad;
118950 order_str = PyUnicode_FromString(little ? "little" : "big");
118951 if (!order_str) goto limited_bad;
118952 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
118953 if (!arg_tuple) goto limited_bad;
118954 if (!is_unsigned) {
118955 kwds = PyDict_New();
118956 if (!kwds) goto limited_bad;
118957 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
118958 }
118959 result = PyObject_Call(from_bytes, arg_tuple, kwds);
118960 limited_bad:
118961 Py_XDECREF(kwds);
118962 Py_XDECREF(arg_tuple);
118963 Py_XDECREF(order_str);
118964 Py_XDECREF(py_bytes);
118965 Py_XDECREF(from_bytes);
118966 return result;
118967 #endif
118968 }
118969 }
118970
118971 /* CIntFromPy */
118972 static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
118973 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118974 #pragma GCC diagnostic push
118975 #pragma GCC diagnostic ignored "-Wconversion"
118976 #endif
118977 const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
118978 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
118979 #pragma GCC diagnostic pop
118980 #endif
118981 const int is_unsigned = neg_one > const_zero;
118982 #if PY_MAJOR_VERSION < 3
118983 if (likely(PyInt_Check(x))) {
118984 if ((sizeof(int64_t) < sizeof(long))) {
118985 __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
118986 } else {
118987 long val = PyInt_AS_LONG(x);
118988 if (is_unsigned && unlikely(val < 0)) {
118989 goto raise_neg_overflow;
118990 }
118991 return (int64_t) val;
118992 }
118993 }
118994 #endif
118995 if (unlikely(!PyLong_Check(x))) {
118996 int64_t val;
118997 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
118998 if (!tmp) return (int64_t) -1;
118999 val = __Pyx_PyInt_As_int64_t(tmp);
119000 Py_DECREF(tmp);
119001 return val;
119002 }
119003 if (is_unsigned) {
119004 #if CYTHON_USE_PYLONG_INTERNALS
119005 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
119006 goto raise_neg_overflow;
119007 } else if (__Pyx_PyLong_IsCompact(x)) {
119008 __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
119009 } else {
119010 const digit* digits = __Pyx_PyLong_Digits(x);
119011 assert(__Pyx_PyLong_DigitCount(x) > 1);
119012 switch (__Pyx_PyLong_DigitCount(x)) {
119013 case 2:
119014 if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
119015 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
119016 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119017 } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) {
119018 return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
119019 }
119020 }
119021 break;
119022 case 3:
119023 if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
119024 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
119025 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119026 } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) {
119027 return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
119028 }
119029 }
119030 break;
119031 case 4:
119032 if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
119033 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
119034 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119035 } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) {
119036 return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
119037 }
119038 }
119039 break;
119040 }
119041 }
119042 #endif
119043 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
119044 if (unlikely(Py_SIZE(x) < 0)) {
119045 goto raise_neg_overflow;
119046 }
119047 #else
119048 {
119049 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
119050 if (unlikely(result < 0))
119051 return (int64_t) -1;
119052 if (unlikely(result == 1))
119053 goto raise_neg_overflow;
119054 }
119055 #endif
119056 if ((sizeof(int64_t) <= sizeof(unsigned long))) {
119057 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
119058 #ifdef HAVE_LONG_LONG
119059 } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) {
119060 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
119061 #endif
119062 }
119063 } else {
119064 #if CYTHON_USE_PYLONG_INTERNALS
119065 if (__Pyx_PyLong_IsCompact(x)) {
119066 __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
119067 } else {
119068 const digit* digits = __Pyx_PyLong_Digits(x);
119069 assert(__Pyx_PyLong_DigitCount(x) > 1);
119070 switch (__Pyx_PyLong_SignedDigitCount(x)) {
119071 case -2:
119072 if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) {
119073 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
119074 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119075 } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
119076 return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
119077 }
119078 }
119079 break;
119080 case 2:
119081 if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
119082 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
119083 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119084 } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
119085 return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
119086 }
119087 }
119088 break;
119089 case -3:
119090 if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
119091 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
119092 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119093 } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
119094 return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
119095 }
119096 }
119097 break;
119098 case 3:
119099 if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
119100 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
119101 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119102 } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
119103 return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
119104 }
119105 }
119106 break;
119107 case -4:
119108 if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
119109 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
119110 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119111 } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) {
119112 return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
119113 }
119114 }
119115 break;
119116 case 4:
119117 if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
119118 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
119119 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
119120 } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) {
119121 return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
119122 }
119123 }
119124 break;
119125 }
119126 }
119127 #endif
119128 if ((sizeof(int64_t) <= sizeof(long))) {
119129 __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
119130 #ifdef HAVE_LONG_LONG
119131 } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) {
119132 __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
119133 #endif
119134 }
119135 }
119136 {
119137 int64_t val;
119138 int ret = -1;
119139 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
119140 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
119141 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
119142 if (unlikely(bytes_copied == -1)) {
119143 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
119144 goto raise_overflow;
119145 } else {
119146 ret = 0;
119147 }
119148 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
119149 int one = 1; int is_little = (int)*(unsigned char *)&one;
119150 unsigned char *bytes = (unsigned char *)&val;
119151 ret = _PyLong_AsByteArray((PyLongObject *)x,
119152 bytes, sizeof(val),
119153 is_little, !is_unsigned);
119154 #else
119155 PyObject *v;
119156 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
119157 int bits, remaining_bits, is_negative = 0;
119158 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
119159 if (likely(PyLong_CheckExact(x))) {
119160 v = __Pyx_NewRef(x);
119161 } else {
119162 v = PyNumber_Long(x);
119163 if (unlikely(!v)) return (int64_t) -1;
119164 assert(PyLong_CheckExact(v));
119165 }
119166 {
119167 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
119168 if (unlikely(result < 0)) {
119169 Py_DECREF(v);
119170 return (int64_t) -1;
119171 }
119172 is_negative = result == 1;
119173 }
119174 if (is_unsigned && unlikely(is_negative)) {
119175 Py_DECREF(v);
119176 goto raise_neg_overflow;
119177 } else if (is_negative) {
119178 stepval = PyNumber_Invert(v);
119179 Py_DECREF(v);
119180 if (unlikely(!stepval))
119181 return (int64_t) -1;
119182 } else {
119183 stepval = v;
119184 }
119185 v = NULL;
119186 val = (int64_t) 0;
119187 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
119188 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
119189 for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) {
119190 PyObject *tmp, *digit;
119191 long idigit;
119192 digit = PyNumber_And(stepval, mask);
119193 if (unlikely(!digit)) goto done;
119194 idigit = PyLong_AsLong(digit);
119195 Py_DECREF(digit);
119196 if (unlikely(idigit < 0)) goto done;
119197 val |= ((int64_t) idigit) << bits;
119198 tmp = PyNumber_Rshift(stepval, shift);
119199 if (unlikely(!tmp)) goto done;
119200 Py_DECREF(stepval); stepval = tmp;
119201 }
119202 Py_DECREF(shift); shift = NULL;
119203 Py_DECREF(mask); mask = NULL;
119204 {
119205 long idigit = PyLong_AsLong(stepval);
119206 if (unlikely(idigit < 0)) goto done;
119207 remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1);
119208 if (unlikely(idigit >= (1L << remaining_bits)))
119209 goto raise_overflow;
119210 val |= ((int64_t) idigit) << bits;
119211 }
119212 if (!is_unsigned) {
119213 if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1))))
119214 goto raise_overflow;
119215 if (is_negative)
119216 val = ~val;
119217 }
119218 ret = 0;
119219 done:
119220 Py_XDECREF(shift);
119221 Py_XDECREF(mask);
119222 Py_XDECREF(stepval);
119223 #endif
119224 if (unlikely(ret))
119225 return (int64_t) -1;
119226 return val;
119227 }
119228 raise_overflow:
119229 PyErr_SetString(PyExc_OverflowError,
119230 "value too large to convert to int64_t");
119231 return (int64_t) -1;
119232 raise_neg_overflow:
119233 PyErr_SetString(PyExc_OverflowError,
119234 "can't convert negative value to int64_t");
119235 return (int64_t) -1;
119236 }
119237
119238 /* CIntToPy */
119239 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
119240 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
119241 #pragma GCC diagnostic push
119242 #pragma GCC diagnostic ignored "-Wconversion"
119243 #endif
119244 const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
119245 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
119246 #pragma GCC diagnostic pop
119247 #endif
119248 const int is_unsigned = neg_one > const_zero;
119249 if (is_unsigned) {
119250 if (sizeof(int64_t) < sizeof(long)) {
119251 return PyInt_FromLong((long) value);
119252 } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
119253 return PyLong_FromUnsignedLong((unsigned long) value);
119254 #ifdef HAVE_LONG_LONG
119255 } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
119256 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
119257 #endif
119258 }
119259 } else {
119260 if (sizeof(int64_t) <= sizeof(long)) {
119261 return PyInt_FromLong((long) value);
119262 #ifdef HAVE_LONG_LONG
119263 } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
119264 return PyLong_FromLongLong((PY_LONG_LONG) value);
119265 #endif
119266 }
119267 }
119268 {
119269 unsigned char *bytes = (unsigned char *)&value;
119270 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
119271 if (is_unsigned) {
119272 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
119273 } else {
119274 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
119275 }
119276 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
119277 int one = 1; int little = (int)*(unsigned char *)&one;
119278 return _PyLong_FromByteArray(bytes, sizeof(int64_t),
119279 little, !is_unsigned);
119280 #else
119281 int one = 1; int little = (int)*(unsigned char *)&one;
119282 PyObject *from_bytes, *result = NULL;
119283 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
119284 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
119285 if (!from_bytes) return NULL;
119286 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t));
119287 if (!py_bytes) goto limited_bad;
119288 order_str = PyUnicode_FromString(little ? "little" : "big");
119289 if (!order_str) goto limited_bad;
119290 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
119291 if (!arg_tuple) goto limited_bad;
119292 if (!is_unsigned) {
119293 kwds = PyDict_New();
119294 if (!kwds) goto limited_bad;
119295 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
119296 }
119297 result = PyObject_Call(from_bytes, arg_tuple, kwds);
119298 limited_bad:
119299 Py_XDECREF(kwds);
119300 Py_XDECREF(arg_tuple);
119301 Py_XDECREF(order_str);
119302 Py_XDECREF(py_bytes);
119303 Py_XDECREF(from_bytes);
119304 return result;
119305 #endif
119306 }
119307 }
119308
119309 /* FormatTypeName */
119310 #if CYTHON_COMPILING_IN_LIMITED_API
119311 static __Pyx_TypeName
119312 __Pyx_PyType_GetName(PyTypeObject* tp)
119313 {
119314 PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
119315 __pyx_n_s_name_2);
119316 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
119317 PyErr_Clear();
119318 Py_XDECREF(name);
119319 name = __Pyx_NewRef(__pyx_n_s__330);
119320 }
119321 return name;
119322 }
119323 #endif
119324
119325 /* FastTypeChecks */
119326 #if CYTHON_COMPILING_IN_CPYTHON
119327 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
119328 while (a) {
119329 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
119330 if (a == b)
119331 return 1;
119332 }
119333 return b == &PyBaseObject_Type;
119334 }
119335 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
119336 PyObject *mro;
119337 if (a == b) return 1;
119338 mro = a->tp_mro;
119339 if (likely(mro)) {
119340 Py_ssize_t i, n;
119341 n = PyTuple_GET_SIZE(mro);
119342 for (i = 0; i < n; i++) {
119343 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
119344 return 1;
119345 }
119346 return 0;
119347 }
119348 return __Pyx_InBases(a, b);
119349 }
119350 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
119351 PyObject *mro;
119352 if (cls == a || cls == b) return 1;
119353 mro = cls->tp_mro;
119354 if (likely(mro)) {
119355 Py_ssize_t i, n;
119356 n = PyTuple_GET_SIZE(mro);
119357 for (i = 0; i < n; i++) {
119358 PyObject *base = PyTuple_GET_ITEM(mro, i);
119359 if (base == (PyObject *)a || base == (PyObject *)b)
119360 return 1;
119361 }
119362 return 0;
119363 }
119364 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
119365 }
119366 #if PY_MAJOR_VERSION == 2
119367 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
119368 PyObject *exception, *value, *tb;
119369 int res;
119370 __Pyx_PyThreadState_declare
119371 __Pyx_PyThreadState_assign
119372 __Pyx_ErrFetch(&exception, &value, &tb);
119373 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
119374 if (unlikely(res == -1)) {
119375 PyErr_WriteUnraisable(err);
119376 res = 0;
119377 }
119378 if (!res) {
119379 res = PyObject_IsSubclass(err, exc_type2);
119380 if (unlikely(res == -1)) {
119381 PyErr_WriteUnraisable(err);
119382 res = 0;
119383 }
119384 }
119385 __Pyx_ErrRestore(exception, value, tb);
119386 return res;
119387 }
119388 #else
119389 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
119390 if (exc_type1) {
119391 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
119392 } else {
119393 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
119394 }
119395 }
119396 #endif
119397 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
119398 Py_ssize_t i, n;
119399 assert(PyExceptionClass_Check(exc_type));
119400 n = PyTuple_GET_SIZE(tuple);
119401 #if PY_MAJOR_VERSION >= 3
119402 for (i=0; i<n; i++) {
119403 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
119404 }
119405 #endif
119406 for (i=0; i<n; i++) {
119407 PyObject *t = PyTuple_GET_ITEM(tuple, i);
119408 #if PY_MAJOR_VERSION < 3
119409 if (likely(exc_type == t)) return 1;
119410 #endif
119411 if (likely(PyExceptionClass_Check(t))) {
119412 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
119413 } else {
119414 }
119415 }
119416 return 0;
119417 }
119418 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
119419 if (likely(err == exc_type)) return 1;
119420 if (likely(PyExceptionClass_Check(err))) {
119421 if (likely(PyExceptionClass_Check(exc_type))) {
119422 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
119423 } else if (likely(PyTuple_Check(exc_type))) {
119424 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
119425 } else {
119426 }
119427 }
119428 return PyErr_GivenExceptionMatches(err, exc_type);
119429 }
119430 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
119431 assert(PyExceptionClass_Check(exc_type1));
119432 assert(PyExceptionClass_Check(exc_type2));
119433 if (likely(err == exc_type1 || err == exc_type2)) return 1;
119434 if (likely(PyExceptionClass_Check(err))) {
119435 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
119436 }
119437 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
119438 }
119439 #endif
119440
119441 /* CoroutineBase */
119442 #include <frameobject.h>
119443 #if PY_VERSION_HEX >= 0x030b00a6
119444 #ifndef Py_BUILD_CORE
119445 #define Py_BUILD_CORE 1
119446 #endif
119447 #include "internal/pycore_frame.h"
119448 #endif
119449 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
119450 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
119451 PyObject *et, *ev, *tb;
119452 PyObject *value = NULL;
119453 CYTHON_UNUSED_VAR(__pyx_tstate);
119454 __Pyx_ErrFetch(&et, &ev, &tb);
119455 if (!et) {
119456 Py_XDECREF(tb);
119457 Py_XDECREF(ev);
119458 Py_INCREF(Py_None);
119459 *pvalue = Py_None;
119460 return 0;
119461 }
119462 if (likely(et == PyExc_StopIteration)) {
119463 if (!ev) {
119464 Py_INCREF(Py_None);
119465 value = Py_None;
119466 }
119467 #if PY_VERSION_HEX >= 0x030300A0
119468 else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
119469 value = ((PyStopIterationObject *)ev)->value;
119470 Py_INCREF(value);
119471 Py_DECREF(ev);
119472 }
119473 #endif
119474 else if (unlikely(PyTuple_Check(ev))) {
119475 if (PyTuple_GET_SIZE(ev) >= 1) {
119476 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
119477 value = PyTuple_GET_ITEM(ev, 0);
119478 Py_INCREF(value);
119479 #else
119480 value = PySequence_ITEM(ev, 0);
119481 #endif
119482 } else {
119483 Py_INCREF(Py_None);
119484 value = Py_None;
119485 }
119486 Py_DECREF(ev);
119487 }
119488 else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
119489 value = ev;
119490 }
119491 if (likely(value)) {
119492 Py_XDECREF(tb);
119493 Py_DECREF(et);
119494 *pvalue = value;
119495 return 0;
119496 }
119497 } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
119498 __Pyx_ErrRestore(et, ev, tb);
119499 return -1;
119500 }
119501 PyErr_NormalizeException(&et, &ev, &tb);
119502 if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
119503 __Pyx_ErrRestore(et, ev, tb);
119504 return -1;
119505 }
119506 Py_XDECREF(tb);
119507 Py_DECREF(et);
119508 #if PY_VERSION_HEX >= 0x030300A0
119509 value = ((PyStopIterationObject *)ev)->value;
119510 Py_INCREF(value);
119511 Py_DECREF(ev);
119512 #else
119513 {
119514 PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
119515 Py_DECREF(ev);
119516 if (likely(args)) {
119517 value = PySequence_GetItem(args, 0);
119518 Py_DECREF(args);
119519 }
119520 if (unlikely(!value)) {
119521 __Pyx_ErrRestore(NULL, NULL, NULL);
119522 Py_INCREF(Py_None);
119523 value = Py_None;
119524 }
119525 }
119526 #endif
119527 *pvalue = value;
119528 return 0;
119529 }
119530 static CYTHON_INLINE
119531 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
119532 #if PY_VERSION_HEX >= 0x030B00a4
119533 Py_CLEAR(exc_state->exc_value);
119534 #else
119535 PyObject *t, *v, *tb;
119536 t = exc_state->exc_type;
119537 v = exc_state->exc_value;
119538 tb = exc_state->exc_traceback;
119539 exc_state->exc_type = NULL;
119540 exc_state->exc_value = NULL;
119541 exc_state->exc_traceback = NULL;
119542 Py_XDECREF(t);
119543 Py_XDECREF(v);
119544 Py_XDECREF(tb);
119545 #endif
119546 }
119547 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
119548 static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
119549 const char *msg;
119550 CYTHON_MAYBE_UNUSED_VAR(gen);
119551 if ((0)) {
119552 #ifdef __Pyx_Coroutine_USED
119553 } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
119554 msg = "coroutine already executing";
119555 #endif
119556 #ifdef __Pyx_AsyncGen_USED
119557 } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
119558 msg = "async generator already executing";
119559 #endif
119560 } else {
119561 msg = "generator already executing";
119562 }
119563 PyErr_SetString(PyExc_ValueError, msg);
119564 }
119565 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
119566 static void __Pyx__Coroutine_NotStartedError(PyObject *gen) {
119567 const char *msg;
119568 CYTHON_MAYBE_UNUSED_VAR(gen);
119569 if ((0)) {
119570 #ifdef __Pyx_Coroutine_USED
119571 } else if (__Pyx_Coroutine_Check(gen)) {
119572 msg = "can't send non-None value to a just-started coroutine";
119573 #endif
119574 #ifdef __Pyx_AsyncGen_USED
119575 } else if (__Pyx_AsyncGen_CheckExact(gen)) {
119576 msg = "can't send non-None value to a just-started async generator";
119577 #endif
119578 } else {
119579 msg = "can't send non-None value to a just-started generator";
119580 }
119581 PyErr_SetString(PyExc_TypeError, msg);
119582 }
119583 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
119584 static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) {
119585 CYTHON_MAYBE_UNUSED_VAR(gen);
119586 CYTHON_MAYBE_UNUSED_VAR(closing);
119587 #ifdef __Pyx_Coroutine_USED
119588 if (!closing && __Pyx_Coroutine_Check(gen)) {
119589 PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
119590 } else
119591 #endif
119592 if (value) {
119593 #ifdef __Pyx_AsyncGen_USED
119594 if (__Pyx_AsyncGen_CheckExact(gen))
119595 PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
119596 else
119597 #endif
119598 PyErr_SetNone(PyExc_StopIteration);
119599 }
119600 }
119601 static
119602 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
119603 __Pyx_PyThreadState_declare
119604 PyThreadState *tstate;
119605 __Pyx_ExcInfoStruct *exc_state;
119606 PyObject *retval;
119607 assert(!self->is_running);
119608 if (unlikely(self->resume_label == 0)) {
119609 if (unlikely(value && value != Py_None)) {
119610 return __Pyx_Coroutine_NotStartedError((PyObject*)self);
119611 }
119612 }
119613 if (unlikely(self->resume_label == -1)) {
119614 return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
119615 }
119616 #if CYTHON_FAST_THREAD_STATE
119617 __Pyx_PyThreadState_assign
119618 tstate = __pyx_tstate;
119619 #else
119620 tstate = __Pyx_PyThreadState_Current;
119621 #endif
119622 exc_state = &self->gi_exc_state;
119623 if (exc_state->exc_value) {
119624 #if CYTHON_COMPILING_IN_PYPY
119625 #else
119626 PyObject *exc_tb;
119627 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
119628 exc_tb = PyException_GetTraceback(exc_state->exc_value);
119629 #elif PY_VERSION_HEX >= 0x030B00a4
119630 exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback;
119631 #else
119632 exc_tb = exc_state->exc_traceback;
119633 #endif
119634 if (exc_tb) {
119635 PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
119636 PyFrameObject *f = tb->tb_frame;
119637 assert(f->f_back == NULL);
119638 #if PY_VERSION_HEX >= 0x030B00A1
119639 f->f_back = PyThreadState_GetFrame(tstate);
119640 #else
119641 Py_XINCREF(tstate->frame);
119642 f->f_back = tstate->frame;
119643 #endif
119644 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
119645 Py_DECREF(exc_tb);
119646 #endif
119647 }
119648 #endif
119649 }
119650 #if CYTHON_USE_EXC_INFO_STACK
119651 exc_state->previous_item = tstate->exc_info;
119652 tstate->exc_info = exc_state;
119653 #else
119654 if (exc_state->exc_type) {
119655 __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
119656 } else {
119657 __Pyx_Coroutine_ExceptionClear(exc_state);
119658 __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
119659 }
119660 #endif
119661 self->is_running = 1;
119662 retval = self->body(self, tstate, value);
119663 self->is_running = 0;
119664 #if CYTHON_USE_EXC_INFO_STACK
119665 exc_state = &self->gi_exc_state;
119666 tstate->exc_info = exc_state->previous_item;
119667 exc_state->previous_item = NULL;
119668 __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
119669 #endif
119670 return retval;
119671 }
119672 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
119673 #if CYTHON_COMPILING_IN_PYPY
119674 CYTHON_UNUSED_VAR(exc_state);
119675 #else
119676 PyObject *exc_tb;
119677 #if PY_VERSION_HEX >= 0x030B00a4
119678 if (!exc_state->exc_value) return;
119679 exc_tb = PyException_GetTraceback(exc_state->exc_value);
119680 #else
119681 exc_tb = exc_state->exc_traceback;
119682 #endif
119683 if (likely(exc_tb)) {
119684 PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
119685 PyFrameObject *f = tb->tb_frame;
119686 Py_CLEAR(f->f_back);
119687 #if PY_VERSION_HEX >= 0x030B00a4
119688 Py_DECREF(exc_tb);
119689 #endif
119690 }
119691 #endif
119692 }
119693 static CYTHON_INLINE
119694 PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) {
119695 CYTHON_MAYBE_UNUSED_VAR(gen);
119696 if (unlikely(!retval)) {
119697 __Pyx_PyThreadState_declare
119698 __Pyx_PyThreadState_assign
119699 if (!__Pyx_PyErr_Occurred()) {
119700 PyObject *exc = PyExc_StopIteration;
119701 #ifdef __Pyx_AsyncGen_USED
119702 if (__Pyx_AsyncGen_CheckExact(gen))
119703 exc = __Pyx_PyExc_StopAsyncIteration;
119704 #endif
119705 __Pyx_PyErr_SetNone(exc);
119706 }
119707 }
119708 return retval;
119709 }
119710 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
119711 static CYTHON_INLINE
119712 PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
119713 #if PY_VERSION_HEX <= 0x030A00A1
119714 return _PyGen_Send(gen, arg);
119715 #else
119716 PyObject *result;
119717 if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
119718 if (PyAsyncGen_CheckExact(gen)) {
119719 assert(result == Py_None);
119720 PyErr_SetNone(PyExc_StopAsyncIteration);
119721 }
119722 else if (result == Py_None) {
119723 PyErr_SetNone(PyExc_StopIteration);
119724 }
119725 else {
119726 #if PY_VERSION_HEX < 0x030d00A1
119727 _PyGen_SetStopIterationValue(result);
119728 #else
119729 if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) {
119730 PyErr_SetObject(PyExc_StopIteration, result);
119731 } else {
119732 PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result);
119733 if (likely(exc != NULL)) {
119734 PyErr_SetObject(PyExc_StopIteration, exc);
119735 Py_DECREF(exc);
119736 }
119737 }
119738 #endif
119739 }
119740 Py_DECREF(result);
119741 result = NULL;
119742 }
119743 return result;
119744 #endif
119745 }
119746 #endif
119747 static CYTHON_INLINE
119748 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
119749 PyObject *ret;
119750 PyObject *val = NULL;
119751 __Pyx_Coroutine_Undelegate(gen);
119752 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
119753 ret = __Pyx_Coroutine_SendEx(gen, val, 0);
119754 Py_XDECREF(val);
119755 return ret;
119756 }
119757 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
119758 PyObject *retval;
119759 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
119760 PyObject *yf = gen->yieldfrom;
119761 if (unlikely(gen->is_running))
119762 return __Pyx_Coroutine_AlreadyRunningError(gen);
119763 if (yf) {
119764 PyObject *ret;
119765 gen->is_running = 1;
119766 #ifdef __Pyx_Generator_USED
119767 if (__Pyx_Generator_CheckExact(yf)) {
119768 ret = __Pyx_Coroutine_Send(yf, value);
119769 } else
119770 #endif
119771 #ifdef __Pyx_Coroutine_USED
119772 if (__Pyx_Coroutine_Check(yf)) {
119773 ret = __Pyx_Coroutine_Send(yf, value);
119774 } else
119775 #endif
119776 #ifdef __Pyx_AsyncGen_USED
119777 if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
119778 ret = __Pyx_async_gen_asend_send(yf, value);
119779 } else
119780 #endif
119781 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
119782 if (PyGen_CheckExact(yf)) {
119783 ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
119784 } else
119785 #endif
119786 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
119787 if (PyCoro_CheckExact(yf)) {
119788 ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
119789 } else
119790 #endif
119791 {
119792 if (value == Py_None)
119793 ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
119794 else
119795 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
119796 }
119797 gen->is_running = 0;
119798 if (likely(ret)) {
119799 return ret;
119800 }
119801 retval = __Pyx_Coroutine_FinishDelegation(gen);
119802 } else {
119803 retval = __Pyx_Coroutine_SendEx(gen, value, 0);
119804 }
119805 return __Pyx_Coroutine_MethodReturn(self, retval);
119806 }
119807 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
119808 PyObject *retval = NULL;
119809 int err = 0;
119810 #ifdef __Pyx_Generator_USED
119811 if (__Pyx_Generator_CheckExact(yf)) {
119812 retval = __Pyx_Coroutine_Close(yf);
119813 if (!retval)
119814 return -1;
119815 } else
119816 #endif
119817 #ifdef __Pyx_Coroutine_USED
119818 if (__Pyx_Coroutine_Check(yf)) {
119819 retval = __Pyx_Coroutine_Close(yf);
119820 if (!retval)
119821 return -1;
119822 } else
119823 if (__Pyx_CoroutineAwait_CheckExact(yf)) {
119824 retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
119825 if (!retval)
119826 return -1;
119827 } else
119828 #endif
119829 #ifdef __Pyx_AsyncGen_USED
119830 if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
119831 retval = __Pyx_async_gen_asend_close(yf, NULL);
119832 } else
119833 if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
119834 retval = __Pyx_async_gen_athrow_close(yf, NULL);
119835 } else
119836 #endif
119837 {
119838 PyObject *meth;
119839 gen->is_running = 1;
119840 meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close);
119841 if (unlikely(!meth)) {
119842 if (unlikely(PyErr_Occurred())) {
119843 PyErr_WriteUnraisable(yf);
119844 }
119845 } else {
119846 retval = __Pyx_PyObject_CallNoArg(meth);
119847 Py_DECREF(meth);
119848 if (unlikely(!retval))
119849 err = -1;
119850 }
119851 gen->is_running = 0;
119852 }
119853 Py_XDECREF(retval);
119854 return err;
119855 }
119856 static PyObject *__Pyx_Generator_Next(PyObject *self) {
119857 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
119858 PyObject *yf = gen->yieldfrom;
119859 if (unlikely(gen->is_running))
119860 return __Pyx_Coroutine_AlreadyRunningError(gen);
119861 if (yf) {
119862 PyObject *ret;
119863 gen->is_running = 1;
119864 #ifdef __Pyx_Generator_USED
119865 if (__Pyx_Generator_CheckExact(yf)) {
119866 ret = __Pyx_Generator_Next(yf);
119867 } else
119868 #endif
119869 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
119870 if (PyGen_CheckExact(yf)) {
119871 ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
119872 } else
119873 #endif
119874 #ifdef __Pyx_Coroutine_USED
119875 if (__Pyx_Coroutine_Check(yf)) {
119876 ret = __Pyx_Coroutine_Send(yf, Py_None);
119877 } else
119878 #endif
119879 ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
119880 gen->is_running = 0;
119881 if (likely(ret)) {
119882 return ret;
119883 }
119884 return __Pyx_Coroutine_FinishDelegation(gen);
119885 }
119886 return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
119887 }
119888 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
119889 CYTHON_UNUSED_VAR(arg);
119890 return __Pyx_Coroutine_Close(self);
119891 }
119892 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
119893 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
119894 PyObject *retval, *raised_exception;
119895 PyObject *yf = gen->yieldfrom;
119896 int err = 0;
119897 if (unlikely(gen->is_running))
119898 return __Pyx_Coroutine_AlreadyRunningError(gen);
119899 if (yf) {
119900 Py_INCREF(yf);
119901 err = __Pyx_Coroutine_CloseIter(gen, yf);
119902 __Pyx_Coroutine_Undelegate(gen);
119903 Py_DECREF(yf);
119904 }
119905 if (err == 0)
119906 PyErr_SetNone(PyExc_GeneratorExit);
119907 retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
119908 if (unlikely(retval)) {
119909 const char *msg;
119910 Py_DECREF(retval);
119911 if ((0)) {
119912 #ifdef __Pyx_Coroutine_USED
119913 } else if (__Pyx_Coroutine_Check(self)) {
119914 msg = "coroutine ignored GeneratorExit";
119915 #endif
119916 #ifdef __Pyx_AsyncGen_USED
119917 } else if (__Pyx_AsyncGen_CheckExact(self)) {
119918 #if PY_VERSION_HEX < 0x03060000
119919 msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
119920 #else
119921 msg = "async generator ignored GeneratorExit";
119922 #endif
119923 #endif
119924 } else {
119925 msg = "generator ignored GeneratorExit";
119926 }
119927 PyErr_SetString(PyExc_RuntimeError, msg);
119928 return NULL;
119929 }
119930 raised_exception = PyErr_Occurred();
119931 if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
119932 if (raised_exception) PyErr_Clear();
119933 Py_INCREF(Py_None);
119934 return Py_None;
119935 }
119936 return NULL;
119937 }
119938 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
119939 PyObject *args, int close_on_genexit) {
119940 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
119941 PyObject *yf = gen->yieldfrom;
119942 if (unlikely(gen->is_running))
119943 return __Pyx_Coroutine_AlreadyRunningError(gen);
119944 if (yf) {
119945 PyObject *ret;
119946 Py_INCREF(yf);
119947 if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
119948 int err = __Pyx_Coroutine_CloseIter(gen, yf);
119949 Py_DECREF(yf);
119950 __Pyx_Coroutine_Undelegate(gen);
119951 if (err < 0)
119952 return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
119953 goto throw_here;
119954 }
119955 gen->is_running = 1;
119956 if (0
119957 #ifdef __Pyx_Generator_USED
119958 || __Pyx_Generator_CheckExact(yf)
119959 #endif
119960 #ifdef __Pyx_Coroutine_USED
119961 || __Pyx_Coroutine_Check(yf)
119962 #endif
119963 ) {
119964 ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
119965 #ifdef __Pyx_Coroutine_USED
119966 } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
119967 ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
119968 #endif
119969 } else {
119970 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw);
119971 if (unlikely(!meth)) {
119972 Py_DECREF(yf);
119973 if (unlikely(PyErr_Occurred())) {
119974 gen->is_running = 0;
119975 return NULL;
119976 }
119977 __Pyx_Coroutine_Undelegate(gen);
119978 gen->is_running = 0;
119979 goto throw_here;
119980 }
119981 if (likely(args)) {
119982 ret = __Pyx_PyObject_Call(meth, args, NULL);
119983 } else {
119984 PyObject *cargs[4] = {NULL, typ, val, tb};
119985 ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
119986 }
119987 Py_DECREF(meth);
119988 }
119989 gen->is_running = 0;
119990 Py_DECREF(yf);
119991 if (!ret) {
119992 ret = __Pyx_Coroutine_FinishDelegation(gen);
119993 }
119994 return __Pyx_Coroutine_MethodReturn(self, ret);
119995 }
119996 throw_here:
119997 __Pyx_Raise(typ, val, tb, NULL);
119998 return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
119999 }
120000 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
120001 PyObject *typ;
120002 PyObject *val = NULL;
120003 PyObject *tb = NULL;
120004 if (unlikely(!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)))
120005 return NULL;
120006 return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
120007 }
120008 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
120009 #if PY_VERSION_HEX >= 0x030B00a4
120010 Py_VISIT(exc_state->exc_value);
120011 #else
120012 Py_VISIT(exc_state->exc_type);
120013 Py_VISIT(exc_state->exc_value);
120014 Py_VISIT(exc_state->exc_traceback);
120015 #endif
120016 return 0;
120017 }
120018 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
120019 Py_VISIT(gen->closure);
120020 Py_VISIT(gen->classobj);
120021 Py_VISIT(gen->yieldfrom);
120022 return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
120023 }
120024 static int __Pyx_Coroutine_clear(PyObject *self) {
120025 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
120026 Py_CLEAR(gen->closure);
120027 Py_CLEAR(gen->classobj);
120028 Py_CLEAR(gen->yieldfrom);
120029 __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
120030 #ifdef __Pyx_AsyncGen_USED
120031 if (__Pyx_AsyncGen_CheckExact(self)) {
120032 Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
120033 }
120034 #endif
120035 Py_CLEAR(gen->gi_code);
120036 Py_CLEAR(gen->gi_frame);
120037 Py_CLEAR(gen->gi_name);
120038 Py_CLEAR(gen->gi_qualname);
120039 Py_CLEAR(gen->gi_modulename);
120040 return 0;
120041 }
120042 static void __Pyx_Coroutine_dealloc(PyObject *self) {
120043 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
120044 PyObject_GC_UnTrack(gen);
120045 if (gen->gi_weakreflist != NULL)
120046 PyObject_ClearWeakRefs(self);
120047 if (gen->resume_label >= 0) {
120048 PyObject_GC_Track(self);
120049 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
120050 if (unlikely(PyObject_CallFinalizerFromDealloc(self)))
120051 #else
120052 Py_TYPE(gen)->tp_del(self);
120053 if (unlikely(Py_REFCNT(self) > 0))
120054 #endif
120055 {
120056 return;
120057 }
120058 PyObject_GC_UnTrack(self);
120059 }
120060 #ifdef __Pyx_AsyncGen_USED
120061 if (__Pyx_AsyncGen_CheckExact(self)) {
120062 /* We have to handle this case for asynchronous generators
120063 right here, because this code has to be between UNTRACK
120064 and GC_Del. */
120065 Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
120066 }
120067 #endif
120068 __Pyx_Coroutine_clear(self);
120069 __Pyx_PyHeapTypeObject_GC_Del(gen);
120070 }
120071 static void __Pyx_Coroutine_del(PyObject *self) {
120072 PyObject *error_type, *error_value, *error_traceback;
120073 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
120074 __Pyx_PyThreadState_declare
120075 if (gen->resume_label < 0) {
120076 return;
120077 }
120078 #if !CYTHON_USE_TP_FINALIZE
120079 assert(self->ob_refcnt == 0);
120080 __Pyx_SET_REFCNT(self, 1);
120081 #endif
120082 __Pyx_PyThreadState_assign
120083 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
120084 #ifdef __Pyx_AsyncGen_USED
120085 if (__Pyx_AsyncGen_CheckExact(self)) {
120086 __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
120087 PyObject *finalizer = agen->ag_finalizer;
120088 if (finalizer && !agen->ag_closed) {
120089 PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
120090 if (unlikely(!res)) {
120091 PyErr_WriteUnraisable(self);
120092 } else {
120093 Py_DECREF(res);
120094 }
120095 __Pyx_ErrRestore(error_type, error_value, error_traceback);
120096 return;
120097 }
120098 }
120099 #endif
120100 if (unlikely(gen->resume_label == 0 && !error_value)) {
120101 #ifdef __Pyx_Coroutine_USED
120102 #ifdef __Pyx_Generator_USED
120103 if (!__Pyx_Generator_CheckExact(self))
120104 #endif
120105 {
120106 PyObject_GC_UnTrack(self);
120107 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
120108 if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
120109 PyErr_WriteUnraisable(self);
120110 #else
120111 {PyObject *msg;
120112 char *cmsg;
120113 #if CYTHON_COMPILING_IN_PYPY
120114 msg = NULL;
120115 cmsg = (char*) "coroutine was never awaited";
120116 #else
120117 char *cname;
120118 PyObject *qualname;
120119 qualname = gen->gi_qualname;
120120 cname = PyString_AS_STRING(qualname);
120121 msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
120122 if (unlikely(!msg)) {
120123 PyErr_Clear();
120124 cmsg = (char*) "coroutine was never awaited";
120125 } else {
120126 cmsg = PyString_AS_STRING(msg);
120127 }
120128 #endif
120129 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
120130 PyErr_WriteUnraisable(self);
120131 Py_XDECREF(msg);}
120132 #endif
120133 PyObject_GC_Track(self);
120134 }
120135 #endif
120136 } else {
120137 PyObject *res = __Pyx_Coroutine_Close(self);
120138 if (unlikely(!res)) {
120139 if (PyErr_Occurred())
120140 PyErr_WriteUnraisable(self);
120141 } else {
120142 Py_DECREF(res);
120143 }
120144 }
120145 __Pyx_ErrRestore(error_type, error_value, error_traceback);
120146 #if !CYTHON_USE_TP_FINALIZE
120147 assert(Py_REFCNT(self) > 0);
120148 if (likely(--self->ob_refcnt == 0)) {
120149 return;
120150 }
120151 {
120152 Py_ssize_t refcnt = Py_REFCNT(self);
120153 _Py_NewReference(self);
120154 __Pyx_SET_REFCNT(self, refcnt);
120155 }
120156 #if CYTHON_COMPILING_IN_CPYTHON
120157 assert(PyType_IS_GC(Py_TYPE(self)) &&
120158 _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
120159 _Py_DEC_REFTOTAL;
120160 #endif
120161 #ifdef COUNT_ALLOCS
120162 --Py_TYPE(self)->tp_frees;
120163 --Py_TYPE(self)->tp_allocs;
120164 #endif
120165 #endif
120166 }
120167 static PyObject *
120168 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context)
120169 {
120170 PyObject *name = self->gi_name;
120171 CYTHON_UNUSED_VAR(context);
120172 if (unlikely(!name)) name = Py_None;
120173 Py_INCREF(name);
120174 return name;
120175 }
120176 static int
120177 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context)
120178 {
120179 CYTHON_UNUSED_VAR(context);
120180 #if PY_MAJOR_VERSION >= 3
120181 if (unlikely(value == NULL || !PyUnicode_Check(value)))
120182 #else
120183 if (unlikely(value == NULL || !PyString_Check(value)))
120184 #endif
120185 {
120186 PyErr_SetString(PyExc_TypeError,
120187 "__name__ must be set to a string object");
120188 return -1;
120189 }
120190 Py_INCREF(value);
120191 __Pyx_Py_XDECREF_SET(self->gi_name, value);
120192 return 0;
120193 }
120194 static PyObject *
120195 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context)
120196 {
120197 PyObject *name = self->gi_qualname;
120198 CYTHON_UNUSED_VAR(context);
120199 if (unlikely(!name)) name = Py_None;
120200 Py_INCREF(name);
120201 return name;
120202 }
120203 static int
120204 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context)
120205 {
120206 CYTHON_UNUSED_VAR(context);
120207 #if PY_MAJOR_VERSION >= 3
120208 if (unlikely(value == NULL || !PyUnicode_Check(value)))
120209 #else
120210 if (unlikely(value == NULL || !PyString_Check(value)))
120211 #endif
120212 {
120213 PyErr_SetString(PyExc_TypeError,
120214 "__qualname__ must be set to a string object");
120215 return -1;
120216 }
120217 Py_INCREF(value);
120218 __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
120219 return 0;
120220 }
120221 static PyObject *
120222 __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context)
120223 {
120224 PyObject *frame = self->gi_frame;
120225 CYTHON_UNUSED_VAR(context);
120226 if (!frame) {
120227 if (unlikely(!self->gi_code)) {
120228 Py_RETURN_NONE;
120229 }
120230 frame = (PyObject *) PyFrame_New(
120231 PyThreadState_Get(), /*PyThreadState *tstate,*/
120232 (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/
120233 __pyx_d, /*PyObject *globals,*/
120234 0 /*PyObject *locals*/
120235 );
120236 if (unlikely(!frame))
120237 return NULL;
120238 self->gi_frame = frame;
120239 }
120240 Py_INCREF(frame);
120241 return frame;
120242 }
120243 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
120244 PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
120245 PyObject *name, PyObject *qualname, PyObject *module_name) {
120246 __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
120247 if (unlikely(!gen))
120248 return NULL;
120249 return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
120250 }
120251 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
120252 __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
120253 PyObject *name, PyObject *qualname, PyObject *module_name) {
120254 gen->body = body;
120255 gen->closure = closure;
120256 Py_XINCREF(closure);
120257 gen->is_running = 0;
120258 gen->resume_label = 0;
120259 gen->classobj = NULL;
120260 gen->yieldfrom = NULL;
120261 #if PY_VERSION_HEX >= 0x030B00a4
120262 gen->gi_exc_state.exc_value = NULL;
120263 #else
120264 gen->gi_exc_state.exc_type = NULL;
120265 gen->gi_exc_state.exc_value = NULL;
120266 gen->gi_exc_state.exc_traceback = NULL;
120267 #endif
120268 #if CYTHON_USE_EXC_INFO_STACK
120269 gen->gi_exc_state.previous_item = NULL;
120270 #endif
120271 gen->gi_weakreflist = NULL;
120272 Py_XINCREF(qualname);
120273 gen->gi_qualname = qualname;
120274 Py_XINCREF(name);
120275 gen->gi_name = name;
120276 Py_XINCREF(module_name);
120277 gen->gi_modulename = module_name;
120278 Py_XINCREF(code);
120279 gen->gi_code = code;
120280 gen->gi_frame = NULL;
120281 PyObject_GC_Track(gen);
120282 return gen;
120283 }
120284
120285 /* PatchModuleWithCoroutine */
120286 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
120287 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
120288 int result;
120289 PyObject *globals, *result_obj;
120290 globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
120291 result = PyDict_SetItemString(globals, "_cython_coroutine_type",
120292 #ifdef __Pyx_Coroutine_USED
120293 (PyObject*)__pyx_CoroutineType);
120294 #else
120295 Py_None);
120296 #endif
120297 if (unlikely(result < 0)) goto ignore;
120298 result = PyDict_SetItemString(globals, "_cython_generator_type",
120299 #ifdef __Pyx_Generator_USED
120300 (PyObject*)__pyx_GeneratorType);
120301 #else
120302 Py_None);
120303 #endif
120304 if (unlikely(result < 0)) goto ignore;
120305 if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
120306 if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
120307 result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
120308 if (unlikely(!result_obj)) goto ignore;
120309 Py_DECREF(result_obj);
120310 Py_DECREF(globals);
120311 return module;
120312 ignore:
120313 Py_XDECREF(globals);
120314 PyErr_WriteUnraisable(module);
120315 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
120316 Py_DECREF(module);
120317 module = NULL;
120318 }
120319 #else
120320 py_code++;
120321 #endif
120322 return module;
120323 }
120324
120325 /* PatchGeneratorABC */
120326 #ifndef CYTHON_REGISTER_ABCS
120327 #define CYTHON_REGISTER_ABCS 1
120328 #endif
120329 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
120330 static PyObject* __Pyx_patch_abc_module(PyObject *module);
120331 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
120332 module = __Pyx_Coroutine_patch_module(
120333 module, ""
120334 "if _cython_generator_type is not None:\n"
120335 " try: Generator = _module.Generator\n"
120336 " except AttributeError: pass\n"
120337 " else: Generator.register(_cython_generator_type)\n"
120338 "if _cython_coroutine_type is not None:\n"
120339 " try: Coroutine = _module.Coroutine\n"
120340 " except AttributeError: pass\n"
120341 " else: Coroutine.register(_cython_coroutine_type)\n"
120342 );
120343 return module;
120344 }
120345 #endif
120346 static int __Pyx_patch_abc(void) {
120347 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
120348 static int abc_patched = 0;
120349 if (CYTHON_REGISTER_ABCS && !abc_patched) {
120350 PyObject *module;
120351 module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
120352 if (unlikely(!module)) {
120353 PyErr_WriteUnraisable(NULL);
120354 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
120355 ((PY_MAJOR_VERSION >= 3) ?
120356 "Cython module failed to register with collections.abc module" :
120357 "Cython module failed to register with collections module"), 1) < 0)) {
120358 return -1;
120359 }
120360 } else {
120361 module = __Pyx_patch_abc_module(module);
120362 abc_patched = 1;
120363 if (unlikely(!module))
120364 return -1;
120365 Py_DECREF(module);
120366 }
120367 module = PyImport_ImportModule("backports_abc");
120368 if (module) {
120369 module = __Pyx_patch_abc_module(module);
120370 Py_XDECREF(module);
120371 }
120372 if (!module) {
120373 PyErr_Clear();
120374 }
120375 }
120376 #else
120377 if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
120378 #endif
120379 return 0;
120380 }
120381
120382 /* Generator */
120383 static PyMethodDef __pyx_Generator_methods[] = {
120384 {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
120385 (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
120386 {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
120387 (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
120388 {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
120389 (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
120390 {0, 0, 0, 0}
120391 };
120392 static PyMemberDef __pyx_Generator_memberlist[] = {
120393 {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
120394 {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
120395 (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
120396 {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
120397 {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
120398 #if CYTHON_USE_TYPE_SPECS
120399 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
120400 #endif
120401 {0, 0, 0, 0, 0}
120402 };
120403 static PyGetSetDef __pyx_Generator_getsets[] = {
120404 {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
120405 (char*) PyDoc_STR("name of the generator"), 0},
120406 {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
120407 (char*) PyDoc_STR("qualified name of the generator"), 0},
120408 {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
120409 (char*) PyDoc_STR("Frame of the generator"), 0},
120410 {0, 0, 0, 0, 0}
120411 };
120412 #if CYTHON_USE_TYPE_SPECS
120413 static PyType_Slot __pyx_GeneratorType_slots[] = {
120414 {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc},
120415 {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse},
120416 {Py_tp_iter, (void *)PyObject_SelfIter},
120417 {Py_tp_iternext, (void *)__Pyx_Generator_Next},
120418 {Py_tp_methods, (void *)__pyx_Generator_methods},
120419 {Py_tp_members, (void *)__pyx_Generator_memberlist},
120420 {Py_tp_getset, (void *)__pyx_Generator_getsets},
120421 {Py_tp_getattro, (void *) __Pyx_PyObject_GenericGetAttrNoDict},
120422 #if CYTHON_USE_TP_FINALIZE
120423 {Py_tp_finalize, (void *)__Pyx_Coroutine_del},
120424 #endif
120425 {0, 0},
120426 };
120427 static PyType_Spec __pyx_GeneratorType_spec = {
120428 __PYX_TYPE_MODULE_PREFIX "generator",
120429 sizeof(__pyx_CoroutineObject),
120430 0,
120431 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
120432 __pyx_GeneratorType_slots
120433 };
120434 #else
120435 static PyTypeObject __pyx_GeneratorType_type = {
120436 PyVarObject_HEAD_INIT(0, 0)
120437 __PYX_TYPE_MODULE_PREFIX "generator",
120438 sizeof(__pyx_CoroutineObject),
120439 0,
120440 (destructor) __Pyx_Coroutine_dealloc,
120441 0,
120442 0,
120443 0,
120444 0,
120445 0,
120446 0,
120447 0,
120448 0,
120449 0,
120450 0,
120451 0,
120452 0,
120453 0,
120454 0,
120455 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
120456 0,
120457 (traverseproc) __Pyx_Coroutine_traverse,
120458 0,
120459 0,
120460 offsetof(__pyx_CoroutineObject, gi_weakreflist),
120461 0,
120462 (iternextfunc) __Pyx_Generator_Next,
120463 __pyx_Generator_methods,
120464 __pyx_Generator_memberlist,
120465 __pyx_Generator_getsets,
120466 0,
120467 0,
120468 0,
120469 0,
120470 0,
120471 0,
120472 0,
120473 0,
120474 0,
120475 0,
120476 0,
120477 0,
120478 0,
120479 0,
120480 0,
120481 #if CYTHON_USE_TP_FINALIZE
120482 0,
120483 #else
120484 __Pyx_Coroutine_del,
120485 #endif
120486 0,
120487 #if CYTHON_USE_TP_FINALIZE
120488 __Pyx_Coroutine_del,
120489 #elif PY_VERSION_HEX >= 0x030400a1
120490 0,
120491 #endif
120492 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
120493 0,
120494 #endif
120495 #if __PYX_NEED_TP_PRINT_SLOT
120496 0,
120497 #endif
120498 #if PY_VERSION_HEX >= 0x030C0000
120499 0,
120500 #endif
120501 #if PY_VERSION_HEX >= 0x030d00A4
120502 0,
120503 #endif
120504 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
120505 0,
120506 #endif
120507 };
120508 #endif
120509 static int __pyx_Generator_init(PyObject *module) {
120510 #if CYTHON_USE_TYPE_SPECS
120511 __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL);
120512 #else
120513 CYTHON_UNUSED_VAR(module);
120514 __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
120515 __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
120516 __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
120517 #endif
120518 if (unlikely(!__pyx_GeneratorType)) {
120519 return -1;
120520 }
120521 return 0;
120522 }
120523
120524 /* CheckBinaryVersion */
120525 static unsigned long __Pyx_get_runtime_version(void) {
120526 #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
120527 return Py_Version & ~0xFFUL;
120528 #else
120529 const char* rt_version = Py_GetVersion();
120530 unsigned long version = 0;
120531 unsigned long factor = 0x01000000UL;
120532 unsigned int digit = 0;
120533 int i = 0;
120534 while (factor) {
120535 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
120536 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
120537 ++i;
120538 }
120539 version += factor * digit;
120540 if (rt_version[i] != '.')
120541 break;
120542 digit = 0;
120543 factor >>= 8;
120544 ++i;
120545 }
120546 return version;
120547 #endif
120548 }
120549 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
120550 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
120551 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
120552 return 0;
120553 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
120554 return 1;
120555 {
120556 char message[200];
120557 PyOS_snprintf(message, sizeof(message),
120558 "compile time Python version %d.%d "
120559 "of module '%.100s' "
120560 "%s "
120561 "runtime version %d.%d",
120562 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
120563 __Pyx_MODULE_NAME,
120564 (allow_newer) ? "was newer than" : "does not match",
120565 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
120566 );
120567 return PyErr_WarnEx(NULL, message, 1);
120568 }
120569 }
120570
120571 /* FunctionImport */
120572 #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
120573 #define __PYX_HAVE_RT_ImportFunction_3_0_11
120574 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
120575 PyObject *d = 0;
120576 PyObject *cobj = 0;
120577 union {
120578 void (*fp)(void);
120579 void *p;
120580 } tmp;
120581 d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
120582 if (!d)
120583 goto bad;
120584 cobj = PyDict_GetItemString(d, funcname);
120585 if (!cobj) {
120586 PyErr_Format(PyExc_ImportError,
120587 "%.200s does not export expected C function %.200s",
120588 PyModule_GetName(module), funcname);
120589 goto bad;
120590 }
120591 if (!PyCapsule_IsValid(cobj, sig)) {
120592 PyErr_Format(PyExc_TypeError,
120593 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
120594 PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
120595 goto bad;
120596 }
120597 tmp.p = PyCapsule_GetPointer(cobj, sig);
120598 *f = tmp.fp;
120599 if (!(*f))
120600 goto bad;
120601 Py_DECREF(d);
120602 return 0;
120603 bad:
120604 Py_XDECREF(d);
120605 return -1;
120606 }
120607 #endif
120608
120609 /* InitStrings */
120610 #if PY_MAJOR_VERSION >= 3
120611 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
120612 if (t.is_unicode | t.is_str) {
120613 if (t.intern) {
120614 *str = PyUnicode_InternFromString(t.s);
120615 } else if (t.encoding) {
120616 *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
120617 } else {
120618 *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
120619 }
120620 } else {
120621 *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
120622 }
120623 if (!*str)
120624 return -1;
120625 if (PyObject_Hash(*str) == -1)
120626 return -1;
120627 return 0;
120628 }
120629 #endif
120630 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
120631 while (t->p) {
120632 #if PY_MAJOR_VERSION >= 3
120633 __Pyx_InitString(*t, t->p);
120634 #else
120635 if (t->is_unicode) {
120636 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
120637 } else if (t->intern) {
120638 *t->p = PyString_InternFromString(t->s);
120639 } else {
120640 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
120641 }
120642 if (!*t->p)
120643 return -1;
120644 if (PyObject_Hash(*t->p) == -1)
120645 return -1;
120646 #endif
120647 ++t;
120648 }
120649 return 0;
120650 }
120651
120652 #include <string.h>
120653 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
120654 size_t len = strlen(s);
120655 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
120656 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
120657 return -1;
120658 }
120659 return (Py_ssize_t) len;
120660 }
120661 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
120662 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
120663 if (unlikely(len < 0)) return NULL;
120664 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
120665 }
120666 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
120667 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
120668 if (unlikely(len < 0)) return NULL;
120669 return PyByteArray_FromStringAndSize(c_str, len);
120670 }
120671 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
120672 Py_ssize_t ignore;
120673 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
120674 }
120675 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
120676 #if !CYTHON_PEP393_ENABLED
120677 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
120678 char* defenc_c;
120679 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
120680 if (!defenc) return NULL;
120681 defenc_c = PyBytes_AS_STRING(defenc);
120682 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
120683 {
120684 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
120685 char* c;
120686 for (c = defenc_c; c < end; c++) {
120687 if ((unsigned char) (*c) >= 128) {
120688 PyUnicode_AsASCIIString(o);
120689 return NULL;
120690 }
120691 }
120692 }
120693 #endif
120694 *length = PyBytes_GET_SIZE(defenc);
120695 return defenc_c;
120696 }
120697 #else
120698 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
120699 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
120700 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
120701 if (likely(PyUnicode_IS_ASCII(o))) {
120702 *length = PyUnicode_GET_LENGTH(o);
120703 return PyUnicode_AsUTF8(o);
120704 } else {
120705 PyUnicode_AsASCIIString(o);
120706 return NULL;
120707 }
120708 #else
120709 return PyUnicode_AsUTF8AndSize(o, length);
120710 #endif
120711 }
120712 #endif
120713 #endif
120714 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
120715 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
120716 if (
120717 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
120718 __Pyx_sys_getdefaultencoding_not_ascii &&
120719 #endif
120720 PyUnicode_Check(o)) {
120721 return __Pyx_PyUnicode_AsStringAndSize(o, length);
120722 } else
120723 #endif
120724 #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
120725 if (PyByteArray_Check(o)) {
120726 *length = PyByteArray_GET_SIZE(o);
120727 return PyByteArray_AS_STRING(o);
120728 } else
120729 #endif
120730 {
120731 char* result;
120732 int r = PyBytes_AsStringAndSize(o, &result, length);
120733 if (unlikely(r < 0)) {
120734 return NULL;
120735 } else {
120736 return result;
120737 }
120738 }
120739 }
120740 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
120741 int is_true = x == Py_True;
120742 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
120743 else return PyObject_IsTrue(x);
120744 }
120745 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
120746 int retval;
120747 if (unlikely(!x)) return -1;
120748 retval = __Pyx_PyObject_IsTrue(x);
120749 Py_DECREF(x);
120750 return retval;
120751 }
120752 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
120753 __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
120754 #if PY_MAJOR_VERSION >= 3
120755 if (PyLong_Check(result)) {
120756 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
120757 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
120758 "The ability to return an instance of a strict subclass of int is deprecated, "
120759 "and may be removed in a future version of Python.",
120760 result_type_name)) {
120761 __Pyx_DECREF_TypeName(result_type_name);
120762 Py_DECREF(result);
120763 return NULL;
120764 }
120765 __Pyx_DECREF_TypeName(result_type_name);
120766 return result;
120767 }
120768 #endif
120769 PyErr_Format(PyExc_TypeError,
120770 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
120771 type_name, type_name, result_type_name);
120772 __Pyx_DECREF_TypeName(result_type_name);
120773 Py_DECREF(result);
120774 return NULL;
120775 }
120776 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
120777 #if CYTHON_USE_TYPE_SLOTS
120778 PyNumberMethods *m;
120779 #endif
120780 const char *name = NULL;
120781 PyObject *res = NULL;
120782 #if PY_MAJOR_VERSION < 3
120783 if (likely(PyInt_Check(x) || PyLong_Check(x)))
120784 #else
120785 if (likely(PyLong_Check(x)))
120786 #endif
120787 return __Pyx_NewRef(x);
120788 #if CYTHON_USE_TYPE_SLOTS
120789 m = Py_TYPE(x)->tp_as_number;
120790 #if PY_MAJOR_VERSION < 3
120791 if (m && m->nb_int) {
120792 name = "int";
120793 res = m->nb_int(x);
120794 }
120795 else if (m && m->nb_long) {
120796 name = "long";
120797 res = m->nb_long(x);
120798 }
120799 #else
120800 if (likely(m && m->nb_int)) {
120801 name = "int";
120802 res = m->nb_int(x);
120803 }
120804 #endif
120805 #else
120806 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
120807 res = PyNumber_Int(x);
120808 }
120809 #endif
120810 if (likely(res)) {
120811 #if PY_MAJOR_VERSION < 3
120812 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
120813 #else
120814 if (unlikely(!PyLong_CheckExact(res))) {
120815 #endif
120816 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
120817 }
120818 }
120819 else if (!PyErr_Occurred()) {
120820 PyErr_SetString(PyExc_TypeError,
120821 "an integer is required");
120822 }
120823 return res;
120824 }
120825 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
120826 Py_ssize_t ival;
120827 PyObject *x;
120828 #if PY_MAJOR_VERSION < 3
120829 if (likely(PyInt_CheckExact(b))) {
120830 if (sizeof(Py_ssize_t) >= sizeof(long))
120831 return PyInt_AS_LONG(b);
120832 else
120833 return PyInt_AsSsize_t(b);
120834 }
120835 #endif
120836 if (likely(PyLong_CheckExact(b))) {
120837 #if CYTHON_USE_PYLONG_INTERNALS
120838 if (likely(__Pyx_PyLong_IsCompact(b))) {
120839 return __Pyx_PyLong_CompactValue(b);
120840 } else {
120841 const digit* digits = __Pyx_PyLong_Digits(b);
120842 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
120843 switch (size) {
120844 case 2:
120845 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
120846 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
120847 }
120848 break;
120849 case -2:
120850 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
120851 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
120852 }
120853 break;
120854 case 3:
120855 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
120856 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
120857 }
120858 break;
120859 case -3:
120860 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
120861 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
120862 }
120863 break;
120864 case 4:
120865 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
120866 return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
120867 }
120868 break;
120869 case -4:
120870 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
120871 return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
120872 }
120873 break;
120874 }
120875 }
120876 #endif
120877 return PyLong_AsSsize_t(b);
120878 }
120879 x = PyNumber_Index(b);
120880 if (!x) return -1;
120881 ival = PyInt_AsSsize_t(x);
120882 Py_DECREF(x);
120883 return ival;
120884 }
120885 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
120886 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
120887 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
120888 #if PY_MAJOR_VERSION < 3
120889 } else if (likely(PyInt_CheckExact(o))) {
120890 return PyInt_AS_LONG(o);
120891 #endif
120892 } else {
120893 Py_ssize_t ival;
120894 PyObject *x;
120895 x = PyNumber_Index(o);
120896 if (!x) return -1;
120897 ival = PyInt_AsLong(x);
120898 Py_DECREF(x);
120899 return ival;
120900 }
120901 }
120902 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
120903 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
120904 }
120905 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
120906 return PyInt_FromSize_t(ival);
120907 }
120908
120909
120910 /* #### Code section: utility_code_pragmas_end ### */
120911 #ifdef _MSC_VER
120912 #pragma warning( pop )
120913 #endif
120914
120915
120916
120917 /* #### Code section: end ### */
120918 #endif /* Py_PYTHON_H */